blob: ed2da6176f7f9286afc71e0bbb197faf3acb2aa8 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00002# From configure.in Revision: 80647 .
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
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00002410# If the user set CFLAGS, use this instead of the automatically
2411# determined setting
2412preset_cflags="$CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +00002413ac_ext=c
2414ac_cpp='$CPP $CPPFLAGS'
2415ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2416ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2417ac_compiler_gnu=$ac_cv_c_compiler_gnu
2418if test -n "$ac_tool_prefix"; then
2419 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2420set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002421{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2422echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002423if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002424 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002425else
2426 if test -n "$CC"; then
2427 ac_cv_prog_CC="$CC" # Let the user override the test.
2428else
Martin v. Löwis11437992002-04-12 09:54:03 +00002429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2430for as_dir in $PATH
2431do
2432 IFS=$as_save_IFS
2433 test -z "$as_dir" && as_dir=.
2434 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002435 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 +00002436 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002437 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002438 break 2
2439 fi
2440done
2441done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002442IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
Jack Jansendd19cf82001-12-06 22:36:17 +00002444fi
2445fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002446CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002447if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002448 { echo "$as_me:$LINENO: result: $CC" >&5
2449echo "${ECHO_T}$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002450else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002451 { echo "$as_me:$LINENO: result: no" >&5
2452echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002453fi
2454
Martin v. Löwiseba40652007-08-30 20:10:57 +00002455
Martin v. Löwis11437992002-04-12 09:54:03 +00002456fi
2457if test -z "$ac_cv_prog_CC"; then
2458 ac_ct_CC=$CC
2459 # Extract the first word of "gcc", so it can be a program name with args.
2460set dummy gcc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002461{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2462echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002463if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002464 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002465else
2466 if test -n "$ac_ct_CC"; then
2467 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2468else
2469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2470for as_dir in $PATH
2471do
2472 IFS=$as_save_IFS
2473 test -z "$as_dir" && as_dir=.
2474 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002475 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 +00002476 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002477 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002478 break 2
2479 fi
2480done
2481done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002482IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002483
2484fi
2485fi
2486ac_ct_CC=$ac_cv_prog_ac_ct_CC
2487if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002488 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2489echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002490else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002491 { echo "$as_me:$LINENO: result: no" >&5
2492echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002493fi
2494
Martin v. Löwiseba40652007-08-30 20:10:57 +00002495 if test "x$ac_ct_CC" = x; then
2496 CC=""
2497 else
2498 case $cross_compiling:$ac_tool_warned in
2499yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002500{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2501whose name does not start with the host triplet. If you think this
2502configuration is useful to you, please write to autoconf@gnu.org." >&5
2503echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2504whose name does not start with the host triplet. If you think this
2505configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002506ac_tool_warned=yes ;;
2507esac
2508 CC=$ac_ct_CC
2509 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002510else
2511 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002512fi
2513
Jack Jansendd19cf82001-12-06 22:36:17 +00002514if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002515 if test -n "$ac_tool_prefix"; then
2516 # 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 +00002517set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002518{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2519echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002520if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002521 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002522else
2523 if test -n "$CC"; then
2524 ac_cv_prog_CC="$CC" # Let the user override the test.
2525else
Martin v. Löwis11437992002-04-12 09:54:03 +00002526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2527for as_dir in $PATH
2528do
2529 IFS=$as_save_IFS
2530 test -z "$as_dir" && as_dir=.
2531 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002532 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002533 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002534 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002535 break 2
2536 fi
2537done
2538done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002539IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002540
2541fi
2542fi
2543CC=$ac_cv_prog_CC
2544if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002545 { echo "$as_me:$LINENO: result: $CC" >&5
2546echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002548 { echo "$as_me:$LINENO: result: no" >&5
2549echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002550fi
2551
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552
Martin v. Löwis11437992002-04-12 09:54:03 +00002553 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002554fi
2555if test -z "$CC"; then
2556 # Extract the first word of "cc", so it can be a program name with args.
2557set dummy cc; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002558{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2559echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002560if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002561 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002562else
2563 if test -n "$CC"; then
2564 ac_cv_prog_CC="$CC" # Let the user override the test.
2565else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002566 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002567as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2568for as_dir in $PATH
2569do
2570 IFS=$as_save_IFS
2571 test -z "$as_dir" && as_dir=.
2572 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002573 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 +00002574 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2575 ac_prog_rejected=yes
2576 continue
2577 fi
2578 ac_cv_prog_CC="cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002579 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002580 break 2
2581 fi
2582done
2583done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002584IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002585
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002586if test $ac_prog_rejected = yes; then
2587 # We found a bogon in the path, so make sure we never use it.
2588 set dummy $ac_cv_prog_CC
2589 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002590 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002591 # We chose a different compiler from the bogus one.
2592 # However, it has the same basename, so the bogon will be chosen
2593 # first if we set CC to just the basename; use the full file name.
2594 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002595 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002596 fi
2597fi
2598fi
2599fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002600CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002601if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002602 { echo "$as_me:$LINENO: result: $CC" >&5
2603echo "${ECHO_T}$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002604else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002605 { echo "$as_me:$LINENO: result: no" >&5
2606echo "${ECHO_T}no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002607fi
2608
Martin v. Löwiseba40652007-08-30 20:10:57 +00002609
Martin v. Löwis11437992002-04-12 09:54:03 +00002610fi
2611if test -z "$CC"; then
2612 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002613 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002614 do
2615 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2616set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002617{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2618echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002619if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002620 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002621else
2622 if test -n "$CC"; then
2623 ac_cv_prog_CC="$CC" # Let the user override the test.
2624else
Martin v. Löwis11437992002-04-12 09:54:03 +00002625as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2626for as_dir in $PATH
2627do
2628 IFS=$as_save_IFS
2629 test -z "$as_dir" && as_dir=.
2630 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002631 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 +00002632 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002633 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002634 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002635 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002636done
2637done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002638IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002639
2640fi
2641fi
2642CC=$ac_cv_prog_CC
2643if test -n "$CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002644 { echo "$as_me:$LINENO: result: $CC" >&5
2645echo "${ECHO_T}$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002646else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002647 { echo "$as_me:$LINENO: result: no" >&5
2648echo "${ECHO_T}no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002649fi
2650
Martin v. Löwiseba40652007-08-30 20:10:57 +00002651
Martin v. Löwis11437992002-04-12 09:54:03 +00002652 test -n "$CC" && break
2653 done
2654fi
2655if test -z "$CC"; then
2656 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002657 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002658do
2659 # Extract the first word of "$ac_prog", so it can be a program name with args.
2660set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002661{ echo "$as_me:$LINENO: checking for $ac_word" >&5
2662echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002663if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002664 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002665else
2666 if test -n "$ac_ct_CC"; then
2667 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2668else
2669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2670for as_dir in $PATH
2671do
2672 IFS=$as_save_IFS
2673 test -z "$as_dir" && as_dir=.
2674 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002675 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 +00002676 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002677 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002678 break 2
2679 fi
2680done
2681done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002682IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002683
Martin v. Löwis11437992002-04-12 09:54:03 +00002684fi
2685fi
2686ac_ct_CC=$ac_cv_prog_ac_ct_CC
2687if test -n "$ac_ct_CC"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002688 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2689echo "${ECHO_T}$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002690else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002691 { echo "$as_me:$LINENO: result: no" >&5
2692echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002693fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002694
Martin v. Löwiseba40652007-08-30 20:10:57 +00002695
Martin v. Löwis11437992002-04-12 09:54:03 +00002696 test -n "$ac_ct_CC" && break
2697done
Michael W. Hudson54241132001-12-07 15:38:26 +00002698
Martin v. Löwiseba40652007-08-30 20:10:57 +00002699 if test "x$ac_ct_CC" = x; then
2700 CC=""
2701 else
2702 case $cross_compiling:$ac_tool_warned in
2703yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002704{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
2705whose name does not start with the host triplet. If you think this
2706configuration is useful to you, please write to autoconf@gnu.org." >&5
2707echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2708whose name does not start with the host triplet. If you think this
2709configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002710ac_tool_warned=yes ;;
2711esac
2712 CC=$ac_ct_CC
2713 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002714fi
2715
2716fi
2717
2718
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002719test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002720See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002721echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002722See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002723 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002724
2725# Provide some information about the compiler.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002726echo "$as_me:$LINENO: checking for C compiler version" >&5
2727ac_compiler=`set X $ac_compile; echo $2`
Martin v. Löwiseba40652007-08-30 20:10:57 +00002728{ (ac_try="$ac_compiler --version >&5"
2729case "(($ac_try" in
2730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2731 *) ac_try_echo=$ac_try;;
2732esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002733eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002734 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002735 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002737 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002738{ (ac_try="$ac_compiler -v >&5"
2739case "(($ac_try" in
2740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2741 *) ac_try_echo=$ac_try;;
2742esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002744 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002745 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002747 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002748{ (ac_try="$ac_compiler -V >&5"
2749case "(($ac_try" in
2750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2751 *) ac_try_echo=$ac_try;;
2752esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002754 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002755 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002757 (exit $ac_status); }
2758
2759cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002760/* confdefs.h. */
2761_ACEOF
2762cat confdefs.h >>conftest.$ac_ext
2763cat >>conftest.$ac_ext <<_ACEOF
2764/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002765
Martin v. Löwis11437992002-04-12 09:54:03 +00002766int
2767main ()
2768{
2769
2770 ;
2771 return 0;
2772}
2773_ACEOF
2774ac_clean_files_save=$ac_clean_files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002775ac_clean_files="$ac_clean_files a.out a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002776# Try to create an executable without -o first, disregard a.out.
2777# It will help us diagnose broken compilers, and finding out an intuition
2778# of exeext.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002779{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2780echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; }
2781ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2782#
2783# List of possible output files, starting from the most likely.
2784# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
2785# only as a last resort. b.out is created by i960 compilers.
2786ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2787#
2788# The IRIX 6 linker writes into existing files which may not be
2789# executable, retaining their permissions. Remove them first so a
2790# subsequent execution test works.
Martin v. Löwiseba40652007-08-30 20:10:57 +00002791ac_rmfiles=
2792for ac_file in $ac_files
2793do
2794 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002795 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002796 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2797 esac
2798done
2799rm -f $ac_rmfiles
2800
2801if { (ac_try="$ac_link_default"
2802case "(($ac_try" in
2803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2804 *) ac_try_echo=$ac_try;;
2805esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002807 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002808 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002811 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2812# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2813# in a Makefile. We should not override ac_cv_exeext if it was cached,
2814# so that the user can short-circuit this test for compilers unknown to
2815# Autoconf.
2816for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002817do
2818 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002819 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002820 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002821 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002822 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002823 # We found the default executable, but exeext='' is most
2824 # certainly right.
2825 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002826 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002827 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2828 then :; else
2829 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2830 fi
2831 # We set ac_cv_exeext here because the later test for it is not
2832 # safe: cross compilers may not add the suffix if given an `-o'
2833 # argument, so we may need to know it at that point already.
2834 # Even if this section looks crufty: it has the advantage of
2835 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002836 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002837 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002838 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 esac
2840done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002841test "$ac_cv_exeext" = no && ac_cv_exeext=
2842
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002843else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002844 ac_file=''
2845fi
2846
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002847{ echo "$as_me:$LINENO: result: $ac_file" >&5
2848echo "${ECHO_T}$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002849if test -z "$ac_file"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002850 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002851sed 's/^/| /' conftest.$ac_ext >&5
2852
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002853{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002854See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002855echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002856See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002857 { (exit 77); exit 77; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002858fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002859
Martin v. Löwis11437992002-04-12 09:54:03 +00002860ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002861
Martin v. Löwiseba40652007-08-30 20:10:57 +00002862# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002863# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002864{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2865echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002866# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2867# If not cross compiling, check that we can run a simple program.
2868if test "$cross_compiling" != yes; then
2869 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002870 { (case "(($ac_try" in
2871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2872 *) ac_try_echo=$ac_try;;
2873esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002874eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002875 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002876 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002878 (exit $ac_status); }; }; then
2879 cross_compiling=no
2880 else
2881 if test "$cross_compiling" = maybe; then
2882 cross_compiling=yes
2883 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002884 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002885If you meant to cross compile, use \`--host'.
2886See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002887echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002888If you meant to cross compile, use \`--host'.
2889See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002890 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002891 fi
2892 fi
2893fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002894{ echo "$as_me:$LINENO: result: yes" >&5
2895echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002896
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002897rm -f a.out a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002898ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002899# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002900# the compiler is broken, or we cross compile.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002901{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2902echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2903{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2904echo "${ECHO_T}$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002905
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002906{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2907echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002908if { (ac_try="$ac_link"
2909case "(($ac_try" in
2910 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2911 *) ac_try_echo=$ac_try;;
2912esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002913eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002914 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002915 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002917 (exit $ac_status); }; then
2918 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2919# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2920# work properly (i.e., refer to `conftest.exe'), while it won't with
2921# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002922for ac_file in conftest.exe conftest conftest.*; do
2923 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002924 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002925 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002926 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00002927 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002928 * ) break;;
2929 esac
2930done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002931else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002932 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002933See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002934echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002935See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002936 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002937fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002938
Martin v. Löwis11437992002-04-12 09:54:03 +00002939rm -f conftest$ac_cv_exeext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002940{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2941echo "${ECHO_T}$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002942
2943rm -f conftest.$ac_ext
2944EXEEXT=$ac_cv_exeext
2945ac_exeext=$EXEEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002946{ echo "$as_me:$LINENO: checking for suffix of object files" >&5
2947echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002948if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002949 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002950else
Martin v. Löwis11437992002-04-12 09:54:03 +00002951 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002952/* confdefs.h. */
2953_ACEOF
2954cat confdefs.h >>conftest.$ac_ext
2955cat >>conftest.$ac_ext <<_ACEOF
2956/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002957
Martin v. Löwis11437992002-04-12 09:54:03 +00002958int
2959main ()
2960{
2961
2962 ;
2963 return 0;
2964}
2965_ACEOF
2966rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00002967if { (ac_try="$ac_compile"
2968case "(($ac_try" in
2969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2970 *) ac_try_echo=$ac_try;;
2971esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002973 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002974 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002975 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002976 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002977 for ac_file in conftest.o conftest.obj conftest.*; do
2978 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002979 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002980 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002981 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2982 break;;
2983 esac
2984done
2985else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002986 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002987sed 's/^/| /' conftest.$ac_ext >&5
2988
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002989{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002990See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002991echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002992See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002993 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002994fi
2995
2996rm -f conftest.$ac_cv_objext conftest.$ac_ext
2997fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00002998{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2999echo "${ECHO_T}$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003000OBJEXT=$ac_cv_objext
3001ac_objext=$OBJEXT
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003002{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3003echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003004if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003005 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003006else
3007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003008/* confdefs.h. */
3009_ACEOF
3010cat confdefs.h >>conftest.$ac_ext
3011cat >>conftest.$ac_ext <<_ACEOF
3012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003013
Martin v. Löwis11437992002-04-12 09:54:03 +00003014int
3015main ()
3016{
3017#ifndef __GNUC__
3018 choke me
3019#endif
3020
3021 ;
3022 return 0;
3023}
3024_ACEOF
3025rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003026if { (ac_try="$ac_compile"
3027case "(($ac_try" in
3028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3029 *) ac_try_echo=$ac_try;;
3030esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003031eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003032 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003034 grep -v '^ *+' conftest.er1 >conftest.err
3035 rm -f conftest.er1
3036 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003037 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003038 (exit $ac_status); } && {
3039 test -z "$ac_c_werror_flag" ||
3040 test ! -s conftest.err
3041 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003042 ac_compiler_gnu=yes
3043else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003044 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003045sed 's/^/| /' conftest.$ac_ext >&5
3046
Martin v. Löwiseba40652007-08-30 20:10:57 +00003047 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003048fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003049
3050rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003051ac_cv_c_compiler_gnu=$ac_compiler_gnu
3052
3053fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003054{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3055echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; }
3056GCC=`test $ac_compiler_gnu = yes && echo yes`
Martin v. Löwis11437992002-04-12 09:54:03 +00003057ac_test_CFLAGS=${CFLAGS+set}
3058ac_save_CFLAGS=$CFLAGS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003059{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3060echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003061if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003062 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003063else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003064 ac_save_c_werror_flag=$ac_c_werror_flag
3065 ac_c_werror_flag=yes
3066 ac_cv_prog_cc_g=no
3067 CFLAGS="-g"
3068 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003069/* confdefs.h. */
3070_ACEOF
3071cat confdefs.h >>conftest.$ac_ext
3072cat >>conftest.$ac_ext <<_ACEOF
3073/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003074
Martin v. Löwis11437992002-04-12 09:54:03 +00003075int
3076main ()
3077{
3078
3079 ;
3080 return 0;
3081}
3082_ACEOF
3083rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003084if { (ac_try="$ac_compile"
3085case "(($ac_try" in
3086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3087 *) ac_try_echo=$ac_try;;
3088esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003090 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003092 grep -v '^ *+' conftest.er1 >conftest.err
3093 rm -f conftest.er1
3094 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003095 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003096 (exit $ac_status); } && {
3097 test -z "$ac_c_werror_flag" ||
3098 test ! -s conftest.err
3099 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003100 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003101else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003102 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003103sed 's/^/| /' conftest.$ac_ext >&5
3104
Martin v. Löwiseba40652007-08-30 20:10:57 +00003105 CFLAGS=""
3106 cat >conftest.$ac_ext <<_ACEOF
3107/* confdefs.h. */
3108_ACEOF
3109cat confdefs.h >>conftest.$ac_ext
3110cat >>conftest.$ac_ext <<_ACEOF
3111/* end confdefs.h. */
3112
3113int
3114main ()
3115{
3116
3117 ;
3118 return 0;
3119}
3120_ACEOF
3121rm -f conftest.$ac_objext
3122if { (ac_try="$ac_compile"
3123case "(($ac_try" in
3124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3125 *) ac_try_echo=$ac_try;;
3126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003128 (eval "$ac_compile") 2>conftest.er1
3129 ac_status=$?
3130 grep -v '^ *+' conftest.er1 >conftest.err
3131 rm -f conftest.er1
3132 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003134 (exit $ac_status); } && {
3135 test -z "$ac_c_werror_flag" ||
3136 test ! -s conftest.err
3137 } && test -s conftest.$ac_objext; then
3138 :
3139else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003140 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003141sed 's/^/| /' conftest.$ac_ext >&5
3142
3143 ac_c_werror_flag=$ac_save_c_werror_flag
3144 CFLAGS="-g"
3145 cat >conftest.$ac_ext <<_ACEOF
3146/* confdefs.h. */
3147_ACEOF
3148cat confdefs.h >>conftest.$ac_ext
3149cat >>conftest.$ac_ext <<_ACEOF
3150/* end confdefs.h. */
3151
3152int
3153main ()
3154{
3155
3156 ;
3157 return 0;
3158}
3159_ACEOF
3160rm -f conftest.$ac_objext
3161if { (ac_try="$ac_compile"
3162case "(($ac_try" in
3163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3164 *) ac_try_echo=$ac_try;;
3165esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003166eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003167 (eval "$ac_compile") 2>conftest.er1
3168 ac_status=$?
3169 grep -v '^ *+' conftest.er1 >conftest.err
3170 rm -f conftest.er1
3171 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003172 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003173 (exit $ac_status); } && {
3174 test -z "$ac_c_werror_flag" ||
3175 test ! -s conftest.err
3176 } && test -s conftest.$ac_objext; then
3177 ac_cv_prog_cc_g=yes
3178else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003179 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003180sed 's/^/| /' conftest.$ac_ext >&5
3181
3182
Guido van Rossum627b2d71993-12-24 10:39:16 +00003183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003184
3185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003186fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003187
3188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3189fi
3190
3191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3192 ac_c_werror_flag=$ac_save_c_werror_flag
3193fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003194{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3195echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003196if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003197 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003198elif test $ac_cv_prog_cc_g = yes; then
3199 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003200 CFLAGS="-g -O2"
3201 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003202 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003203 fi
3204else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003205 if test "$GCC" = yes; then
3206 CFLAGS="-O2"
3207 else
3208 CFLAGS=
3209 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003210fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003211{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3212echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003213if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003214 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003215else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003216 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003217ac_save_CC=$CC
3218cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003219/* confdefs.h. */
3220_ACEOF
3221cat confdefs.h >>conftest.$ac_ext
3222cat >>conftest.$ac_ext <<_ACEOF
3223/* end confdefs.h. */
3224#include <stdarg.h>
3225#include <stdio.h>
3226#include <sys/types.h>
3227#include <sys/stat.h>
3228/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3229struct buf { int x; };
3230FILE * (*rcsopen) (struct buf *, struct stat *, int);
3231static char *e (p, i)
3232 char **p;
3233 int i;
3234{
3235 return p[i];
3236}
3237static char *f (char * (*g) (char **, int), char **p, ...)
3238{
3239 char *s;
3240 va_list v;
3241 va_start (v,p);
3242 s = g (p, va_arg (v,int));
3243 va_end (v);
3244 return s;
3245}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003246
3247/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3248 function prototypes and stuff, but not '\xHH' hex character constants.
3249 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003250 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003251 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3252 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003253 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003254int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3255
Martin v. Löwiseba40652007-08-30 20:10:57 +00003256/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3257 inside strings and character constants. */
3258#define FOO(x) 'x'
3259int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3260
Skip Montanaro6dead952003-09-25 14:50:04 +00003261int test (int i, double x);
3262struct s1 {int (*f) (int a);};
3263struct s2 {int (*f) (double a);};
3264int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3265int argc;
3266char **argv;
3267int
3268main ()
3269{
3270return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3271 ;
3272 return 0;
3273}
3274_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003275for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3276 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003277do
3278 CC="$ac_save_CC $ac_arg"
3279 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003280if { (ac_try="$ac_compile"
3281case "(($ac_try" in
3282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3283 *) ac_try_echo=$ac_try;;
3284esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003286 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003288 grep -v '^ *+' conftest.er1 >conftest.err
3289 rm -f conftest.er1
3290 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003292 (exit $ac_status); } && {
3293 test -z "$ac_c_werror_flag" ||
3294 test ! -s conftest.err
3295 } && test -s conftest.$ac_objext; then
3296 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003297else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003299sed 's/^/| /' conftest.$ac_ext >&5
3300
Martin v. Löwiseba40652007-08-30 20:10:57 +00003301
Skip Montanaro6dead952003-09-25 14:50:04 +00003302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003303
3304rm -f core conftest.err conftest.$ac_objext
3305 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003306done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003307rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003308CC=$ac_save_CC
3309
3310fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003311# AC_CACHE_VAL
3312case "x$ac_cv_prog_cc_c89" in
3313 x)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003314 { echo "$as_me:$LINENO: result: none needed" >&5
3315echo "${ECHO_T}none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003316 xno)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003317 { echo "$as_me:$LINENO: result: unsupported" >&5
3318echo "${ECHO_T}unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003319 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003320 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003321 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3322echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003323esac
3324
Skip Montanaro6dead952003-09-25 14:50:04 +00003325
Martin v. Löwis11437992002-04-12 09:54:03 +00003326ac_ext=c
3327ac_cpp='$CPP $CPPFLAGS'
3328ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3329ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3330ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003331
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003332if test ! -z "$preset_cflags"
3333then
3334 CFLAGS=$preset_cflags
3335fi
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003336
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003337
3338
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003339{ echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3340echo $ECHO_N "checking for --with-cxx-main=<compiler>... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003341
Martin v. Löwiseba40652007-08-30 20:10:57 +00003342# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003343if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003344 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003345
3346 case $withval in
3347 no) with_cxx_main=no
3348 MAINCC='$(CC)';;
3349 yes) with_cxx_main=yes
3350 MAINCC='$(CXX)';;
3351 *) with_cxx_main=yes
3352 MAINCC=$withval
3353 if test -z "$CXX"
3354 then
3355 CXX=$withval
3356 fi;;
3357 esac
3358else
3359
3360 with_cxx_main=no
3361 MAINCC='$(CC)'
3362
Martin v. Löwiseba40652007-08-30 20:10:57 +00003363fi
3364
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003365{ echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3366echo "${ECHO_T}$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003367
3368preset_cxx="$CXX"
3369if test -z "$CXX"
3370then
3371 case "$CC" in
3372 gcc) # Extract the first word of "g++", so it can be a program name with args.
3373set dummy g++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003374{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3375echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003376if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003377 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003378else
3379 case $CXX in
3380 [\\/]* | ?:[\\/]*)
3381 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3382 ;;
3383 *)
3384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3385for as_dir in notfound
3386do
3387 IFS=$as_save_IFS
3388 test -z "$as_dir" && as_dir=.
3389 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003390 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 +00003391 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003392 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003393 break 2
3394 fi
3395done
3396done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003397IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003398
3399 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3400 ;;
3401esac
3402fi
3403CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003404if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003405 { echo "$as_me:$LINENO: result: $CXX" >&5
3406echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003407else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003408 { echo "$as_me:$LINENO: result: no" >&5
3409echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003410fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003411
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003412 ;;
3413 cc) # Extract the first word of "c++", so it can be a program name with args.
3414set dummy c++; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003415{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3416echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003417if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003418 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003419else
3420 case $CXX in
3421 [\\/]* | ?:[\\/]*)
3422 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3423 ;;
3424 *)
3425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3426for as_dir in notfound
3427do
3428 IFS=$as_save_IFS
3429 test -z "$as_dir" && as_dir=.
3430 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003431 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 +00003432 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003433 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003434 break 2
3435 fi
3436done
3437done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003438IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003439
3440 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3441 ;;
3442esac
3443fi
3444CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003445if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003446 { echo "$as_me:$LINENO: result: $CXX" >&5
3447echo "${ECHO_T}$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003448else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003449 { echo "$as_me:$LINENO: result: no" >&5
3450echo "${ECHO_T}no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003451fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003452
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003453 ;;
3454 esac
3455 if test "$CXX" = "notfound"
3456 then
3457 CXX=""
3458 fi
3459fi
3460if test -z "$CXX"
3461then
3462 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3463do
3464 # Extract the first word of "$ac_prog", so it can be a program name with args.
3465set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003466{ echo "$as_me:$LINENO: checking for $ac_word" >&5
3467echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003468if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003469 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003470else
3471 if test -n "$CXX"; then
3472 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3473else
3474as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3475for as_dir in $PATH
3476do
3477 IFS=$as_save_IFS
3478 test -z "$as_dir" && as_dir=.
3479 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003480 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 +00003481 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003482 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003483 break 2
3484 fi
3485done
3486done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003487IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003488
3489fi
3490fi
3491CXX=$ac_cv_prog_CXX
3492if test -n "$CXX"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003493 { echo "$as_me:$LINENO: result: $CXX" >&5
3494echo "${ECHO_T}$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003495else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003496 { echo "$as_me:$LINENO: result: no" >&5
3497echo "${ECHO_T}no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003498fi
3499
Martin v. Löwiseba40652007-08-30 20:10:57 +00003500
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003501 test -n "$CXX" && break
3502done
3503test -n "$CXX" || CXX="notfound"
3504
3505 if test "$CXX" = "notfound"
3506 then
3507 CXX=""
3508 fi
3509fi
3510if test "$preset_cxx" != "$CXX"
3511then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003512 { echo "$as_me:$LINENO: 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 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003517echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003518
3519 By default, distutils will build C++ extension modules with \"$CXX\".
3520 If this is not intended, then set CXX on the configure command line.
3521 " >&2;}
3522fi
3523
3524
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003525# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003526
3527ac_ext=c
3528ac_cpp='$CPP $CPPFLAGS'
3529ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3530ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3531ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003532{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3533echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003534# On Suns, sometimes $CPP names a directory.
3535if test -n "$CPP" && test -d "$CPP"; then
3536 CPP=
3537fi
3538if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003539 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003540 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003541else
Martin v. Löwis11437992002-04-12 09:54:03 +00003542 # Double quotes because CPP needs to be expanded
3543 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3544 do
3545 ac_preproc_ok=false
3546for ac_c_preproc_warn_flag in '' yes
3547do
3548 # Use a header file that comes with gcc, so configuring glibc
3549 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003550 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3551 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003552 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003553 # not just through cpp. "Syntax error" is here to catch this case.
3554 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003555/* confdefs.h. */
3556_ACEOF
3557cat confdefs.h >>conftest.$ac_ext
3558cat >>conftest.$ac_ext <<_ACEOF
3559/* end confdefs.h. */
3560#ifdef __STDC__
3561# include <limits.h>
3562#else
3563# include <assert.h>
3564#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003565 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003566_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003567if { (ac_try="$ac_cpp conftest.$ac_ext"
3568case "(($ac_try" in
3569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3570 *) ac_try_echo=$ac_try;;
3571esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003573 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003575 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 rm -f conftest.er1
3577 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003579 (exit $ac_status); } >/dev/null && {
3580 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3581 test ! -s conftest.err
3582 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003583 :
3584else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003585 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003586sed 's/^/| /' conftest.$ac_ext >&5
3587
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 # Broken: fails on valid input.
3589continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003591
Martin v. Löwis11437992002-04-12 09:54:03 +00003592rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003593
Martin v. Löwiseba40652007-08-30 20:10:57 +00003594 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 # can be detected and how.
3596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003597/* confdefs.h. */
3598_ACEOF
3599cat confdefs.h >>conftest.$ac_ext
3600cat >>conftest.$ac_ext <<_ACEOF
3601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003602#include <ac_nonexistent.h>
3603_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003604if { (ac_try="$ac_cpp conftest.$ac_ext"
3605case "(($ac_try" in
3606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3607 *) ac_try_echo=$ac_try;;
3608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003610 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003612 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 rm -f conftest.er1
3614 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003616 (exit $ac_status); } >/dev/null && {
3617 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3618 test ! -s conftest.err
3619 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003620 # Broken: success on invalid input.
3621continue
3622else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003623 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003624sed 's/^/| /' conftest.$ac_ext >&5
3625
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 # Passes both tests.
3627ac_preproc_ok=:
3628break
3629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003630
Martin v. Löwis11437992002-04-12 09:54:03 +00003631rm -f conftest.err conftest.$ac_ext
3632
3633done
3634# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3635rm -f conftest.err conftest.$ac_ext
3636if $ac_preproc_ok; then
3637 break
3638fi
3639
3640 done
3641 ac_cv_prog_CPP=$CPP
3642
3643fi
3644 CPP=$ac_cv_prog_CPP
3645else
3646 ac_cv_prog_CPP=$CPP
3647fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003648{ echo "$as_me:$LINENO: result: $CPP" >&5
3649echo "${ECHO_T}$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003650ac_preproc_ok=false
3651for ac_c_preproc_warn_flag in '' yes
3652do
3653 # Use a header file that comes with gcc, so configuring glibc
3654 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003655 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3656 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003657 # On the NeXT, cc -E runs the code through the compiler's parser,
3658 # not just through cpp. "Syntax error" is here to catch this case.
3659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003660/* confdefs.h. */
3661_ACEOF
3662cat confdefs.h >>conftest.$ac_ext
3663cat >>conftest.$ac_ext <<_ACEOF
3664/* end confdefs.h. */
3665#ifdef __STDC__
3666# include <limits.h>
3667#else
3668# include <assert.h>
3669#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003670 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003671_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003672if { (ac_try="$ac_cpp conftest.$ac_ext"
3673case "(($ac_try" in
3674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3675 *) ac_try_echo=$ac_try;;
3676esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003677eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003678 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003680 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 rm -f conftest.er1
3682 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003683 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003684 (exit $ac_status); } >/dev/null && {
3685 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3686 test ! -s conftest.err
3687 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003688 :
3689else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003690 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003691sed 's/^/| /' conftest.$ac_ext >&5
3692
Martin v. Löwis11437992002-04-12 09:54:03 +00003693 # Broken: fails on valid input.
3694continue
3695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003696
Martin v. Löwis11437992002-04-12 09:54:03 +00003697rm -f conftest.err conftest.$ac_ext
3698
Martin v. Löwiseba40652007-08-30 20:10:57 +00003699 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 # can be detected and how.
3701 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003702/* confdefs.h. */
3703_ACEOF
3704cat confdefs.h >>conftest.$ac_ext
3705cat >>conftest.$ac_ext <<_ACEOF
3706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003707#include <ac_nonexistent.h>
3708_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003709if { (ac_try="$ac_cpp conftest.$ac_ext"
3710case "(($ac_try" in
3711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3712 *) ac_try_echo=$ac_try;;
3713esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003715 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003716 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003717 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 rm -f conftest.er1
3719 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003721 (exit $ac_status); } >/dev/null && {
3722 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3723 test ! -s conftest.err
3724 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003725 # Broken: success on invalid input.
3726continue
3727else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003728 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003729sed 's/^/| /' conftest.$ac_ext >&5
3730
Martin v. Löwis11437992002-04-12 09:54:03 +00003731 # Passes both tests.
3732ac_preproc_ok=:
3733break
3734fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003735
Martin v. Löwis11437992002-04-12 09:54:03 +00003736rm -f conftest.err conftest.$ac_ext
3737
3738done
3739# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3740rm -f conftest.err conftest.$ac_ext
3741if $ac_preproc_ok; then
3742 :
3743else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003744 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003745See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003746echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003747See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003748 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003749fi
3750
3751ac_ext=c
3752ac_cpp='$CPP $CPPFLAGS'
3753ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3754ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3755ac_compiler_gnu=$ac_cv_c_compiler_gnu
3756
3757
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003758{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3759echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003760if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003761 echo $ECHO_N "(cached) $ECHO_C" >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003762else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003763 # Extract the first word of "grep ggrep" to use in msg output
3764if test -z "$GREP"; then
3765set dummy grep ggrep; ac_prog_name=$2
3766if test "${ac_cv_path_GREP+set}" = set; then
3767 echo $ECHO_N "(cached) $ECHO_C" >&6
3768else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003769 ac_path_GREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003770# Loop through the user's path and test for each of PROGNAME-LIST
3771as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003772for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3773do
3774 IFS=$as_save_IFS
3775 test -z "$as_dir" && as_dir=.
3776 for ac_prog in grep ggrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003777 for ac_exec_ext in '' $ac_executable_extensions; do
3778 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3779 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3780 # Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003781 # Check for GNU $ac_path_GREP
3782case `"$ac_path_GREP" --version 2>&1` in
3783*GNU*)
3784 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3785*)
3786 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003787 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003788 while :
3789 do
3790 cat "conftest.in" "conftest.in" >"conftest.tmp"
3791 mv "conftest.tmp" "conftest.in"
3792 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003793 echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003794 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3795 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3796 ac_count=`expr $ac_count + 1`
3797 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3798 # Best one so far, save it but keep looking for a better one
3799 ac_cv_path_GREP="$ac_path_GREP"
3800 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003801 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003802 # 10*(2^10) chars as input seems more than enough
3803 test $ac_count -gt 10 && break
3804 done
3805 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3806esac
3807
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003808
3809 $ac_path_GREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003810 done
3811done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003812
3813done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003814IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003815
3816
3817fi
3818
3819GREP="$ac_cv_path_GREP"
3820if test -z "$GREP"; then
3821 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3822echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003823 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003824fi
3825
Martin v. Löwiseba40652007-08-30 20:10:57 +00003826else
3827 ac_cv_path_GREP=$GREP
3828fi
3829
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003830
Martin v. Löwiseba40652007-08-30 20:10:57 +00003831fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003832{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3833echo "${ECHO_T}$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003834 GREP="$ac_cv_path_GREP"
3835
3836
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003837{ echo "$as_me:$LINENO: checking for egrep" >&5
3838echo $ECHO_N "checking for egrep... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003839if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003840 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003841else
3842 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3843 then ac_cv_path_EGREP="$GREP -E"
3844 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003845 # Extract the first word of "egrep" to use in msg output
3846if test -z "$EGREP"; then
3847set dummy egrep; ac_prog_name=$2
3848if test "${ac_cv_path_EGREP+set}" = set; then
3849 echo $ECHO_N "(cached) $ECHO_C" >&6
3850else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003851 ac_path_EGREP_found=false
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003852# Loop through the user's path and test for each of PROGNAME-LIST
3853as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003854for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3855do
3856 IFS=$as_save_IFS
3857 test -z "$as_dir" && as_dir=.
3858 for ac_prog in egrep; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003859 for ac_exec_ext in '' $ac_executable_extensions; do
3860 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3861 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3862 # Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003863 # Check for GNU $ac_path_EGREP
3864case `"$ac_path_EGREP" --version 2>&1` in
3865*GNU*)
3866 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3867*)
3868 ac_count=0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003869 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003870 while :
3871 do
3872 cat "conftest.in" "conftest.in" >"conftest.tmp"
3873 mv "conftest.tmp" "conftest.in"
3874 cp "conftest.in" "conftest.nl"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003875 echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003876 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3877 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3878 ac_count=`expr $ac_count + 1`
3879 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3880 # Best one so far, save it but keep looking for a better one
3881 ac_cv_path_EGREP="$ac_path_EGREP"
3882 ac_path_EGREP_max=$ac_count
3883 fi
3884 # 10*(2^10) chars as input seems more than enough
3885 test $ac_count -gt 10 && break
3886 done
3887 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3888esac
3889
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003890
3891 $ac_path_EGREP_found && break 3
Martin v. Löwiseba40652007-08-30 20:10:57 +00003892 done
3893done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003894
3895done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003896IFS=$as_save_IFS
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003897
3898
3899fi
3900
3901EGREP="$ac_cv_path_EGREP"
3902if test -z "$EGREP"; then
3903 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3904echo "$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 +00003905 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003906fi
3907
Martin v. Löwiseba40652007-08-30 20:10:57 +00003908else
3909 ac_cv_path_EGREP=$EGREP
3910fi
3911
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003912
Martin v. Löwiseba40652007-08-30 20:10:57 +00003913 fi
3914fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003915{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3916echo "${ECHO_T}$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003917 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003918
3919
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003920
3921{ echo "$as_me:$LINENO: checking for AIX" >&5
3922echo $ECHO_N "checking for AIX... $ECHO_C" >&6; }
3923cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003924/* confdefs.h. */
3925_ACEOF
3926cat confdefs.h >>conftest.$ac_ext
3927cat >>conftest.$ac_ext <<_ACEOF
3928/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003929#ifdef _AIX
3930 yes
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003931#endif
3932
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003933_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3935 $EGREP "yes" >/dev/null 2>&1; then
3936 { echo "$as_me:$LINENO: result: yes" >&5
3937echo "${ECHO_T}yes" >&6; }
Antoine Pitrouf2caeed2009-05-24 20:23:57 +00003938cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003939#define _ALL_SOURCE 1
3940_ACEOF
3941
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003942else
3943 { echo "$as_me:$LINENO: result: no" >&5
3944echo "${ECHO_T}no" >&6; }
3945fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00003946rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003947
3948
3949
3950# Check for unsupported systems
3951case $ac_sys_system/$ac_sys_release in
3952atheos*|Linux*/1*)
3953 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
3954 echo See README for details.
3955 exit 1;;
3956esac
3957
3958
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003959{ echo "$as_me:$LINENO: checking for --with-suffix" >&5
3960echo $ECHO_N "checking for --with-suffix... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003961
3962# Check whether --with-suffix was given.
3963if test "${with_suffix+set}" = set; then
3964 withval=$with_suffix;
3965 case $withval in
3966 no) EXEEXT=;;
3967 yes) EXEEXT=.exe;;
3968 *) EXEEXT=$withval;;
3969 esac
3970fi
3971
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003972{ echo "$as_me:$LINENO: result: $EXEEXT" >&5
3973echo "${ECHO_T}$EXEEXT" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003974
3975# Test whether we're running on a non-case-sensitive system, in which
3976# case we give a warning if no ext is given
3977
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003978{ echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
3979echo $ECHO_N "checking for case-insensitive build directory... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003980if test ! -d CaseSensitiveTestDir; then
3981mkdir CaseSensitiveTestDir
3982fi
3983
3984if test -d casesensitivetestdir
3985then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003986 { echo "$as_me:$LINENO: result: yes" >&5
3987echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003988 BUILDEXEEXT=.exe
3989else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00003990 { echo "$as_me:$LINENO: result: no" >&5
3991echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00003992 BUILDEXEEXT=$EXEEXT
3993fi
3994rmdir CaseSensitiveTestDir
3995
3996case $MACHDEP in
3997bsdos*)
3998 case $CC in
3999 gcc) CC="$CC -D_HAVE_BSDI";;
4000 esac;;
4001esac
4002
4003case $ac_sys_system in
4004hp*|HP*)
4005 case $CC in
4006 cc|*/cc) CC="$CC -Ae";;
4007 esac;;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004008SunOS*)
4009 # Some functions have a prototype only with that define, e.g. confstr
4010
4011cat >>confdefs.h <<\_ACEOF
4012#define __EXTENSIONS__ 1
4013_ACEOF
4014
4015 ;;
4016esac
4017
4018
4019
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004020{ echo "$as_me:$LINENO: checking LIBRARY" >&5
4021echo $ECHO_N "checking LIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004022if test -z "$LIBRARY"
4023then
4024 LIBRARY='libpython$(VERSION).a'
4025fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004026{ echo "$as_me:$LINENO: result: $LIBRARY" >&5
4027echo "${ECHO_T}$LIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004028
4029# LDLIBRARY is the name of the library to link against (as opposed to the
4030# name of the library into which to insert object files). BLDLIBRARY is also
4031# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4032# is blank as the main program is not linked directly against LDLIBRARY.
4033# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4034# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4035# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4036# DLLLIBRARY is the shared (i.e., DLL) library.
4037#
4038# RUNSHARED is used to run shared python without installed libraries
4039#
4040# INSTSONAME is the name of the shared library that will be use to install
4041# on the system - some systems like version suffix, others don't
4042
4043
4044
4045
4046
4047
4048LDLIBRARY="$LIBRARY"
4049BLDLIBRARY='$(LDLIBRARY)'
4050INSTSONAME='$(LDLIBRARY)'
4051DLLLIBRARY=''
4052LDLIBRARYDIR=''
4053RUNSHARED=''
4054
4055# LINKCC is the command that links the python executable -- default is $(CC).
4056# If CXX is set, and if it is needed to link a main function that was
4057# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4058# python might then depend on the C++ runtime
4059# This is altered for AIX in order to build the export list before
4060# linking.
4061
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004062{ echo "$as_me:$LINENO: checking LINKCC" >&5
4063echo $ECHO_N "checking LINKCC... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004064if test -z "$LINKCC"
4065then
4066 LINKCC='$(PURIFY) $(MAINCC)'
4067 case $ac_sys_system in
4068 AIX*)
4069 exp_extra="\"\""
4070 if test $ac_sys_release -ge 5 -o \
4071 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4072 exp_extra="."
4073 fi
4074 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004075 QNX*)
4076 # qcc must be used because the other compilers do not
4077 # support -N.
4078 LINKCC=qcc;;
4079 esac
4080fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004081{ echo "$as_me:$LINENO: result: $LINKCC" >&5
4082echo "${ECHO_T}$LINKCC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004083
4084# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4085# make sure we default having it set to "no": this is used by
4086# distutils.unixccompiler to know if it should add --enable-new-dtags
4087# to linker command lines, and failing to detect GNU ld simply results
4088# in the same bahaviour as before.
4089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004090{ echo "$as_me:$LINENO: checking for GNU ld" >&5
4091echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004092ac_prog=ld
4093if test "$GCC" = yes; then
4094 ac_prog=`$CC -print-prog-name=ld`
4095fi
4096case `"$ac_prog" -V 2>&1 < /dev/null` in
4097 *GNU*)
4098 GNULD=yes;;
4099 *)
4100 GNULD=no;;
4101esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004102{ echo "$as_me:$LINENO: result: $GNULD" >&5
4103echo "${ECHO_T}$GNULD" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004104
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004105{ echo "$as_me:$LINENO: checking for --enable-shared" >&5
4106echo $ECHO_N "checking for --enable-shared... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004107# Check whether --enable-shared was given.
4108if test "${enable_shared+set}" = set; then
4109 enableval=$enable_shared;
4110fi
4111
4112
4113if test -z "$enable_shared"
4114then
4115 case $ac_sys_system in
4116 CYGWIN* | atheos*)
4117 enable_shared="yes";;
4118 *)
4119 enable_shared="no";;
4120 esac
4121fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004122{ echo "$as_me:$LINENO: result: $enable_shared" >&5
4123echo "${ECHO_T}$enable_shared" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004124
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004125{ echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4126echo $ECHO_N "checking for --enable-profiling... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004127# Check whether --enable-profiling was given.
4128if test "${enable_profiling+set}" = set; then
4129 enableval=$enable_profiling; ac_save_cc="$CC"
4130 CC="$CC -pg"
4131 if test "$cross_compiling" = yes; then
4132 ac_enable_profiling="no"
4133else
4134 cat >conftest.$ac_ext <<_ACEOF
4135/* confdefs.h. */
4136_ACEOF
4137cat confdefs.h >>conftest.$ac_ext
4138cat >>conftest.$ac_ext <<_ACEOF
4139/* end confdefs.h. */
4140int main() { return 0; }
4141_ACEOF
4142rm -f conftest$ac_exeext
4143if { (ac_try="$ac_link"
4144case "(($ac_try" in
4145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4146 *) ac_try_echo=$ac_try;;
4147esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004148eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004149 (eval "$ac_link") 2>&5
4150 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004151 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004152 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4153 { (case "(($ac_try" in
4154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4155 *) ac_try_echo=$ac_try;;
4156esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004158 (eval "$ac_try") 2>&5
4159 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004160 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004161 (exit $ac_status); }; }; then
4162 ac_enable_profiling="yes"
4163else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004164 echo "$as_me: program exited with status $ac_status" >&5
4165echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004166sed 's/^/| /' conftest.$ac_ext >&5
4167
4168( exit $ac_status )
4169ac_enable_profiling="no"
4170fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004171rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4172fi
4173
4174
4175 CC="$ac_save_cc"
4176fi
4177
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004178{ echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4179echo "${ECHO_T}$ac_enable_profiling" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004180
4181case "$ac_enable_profiling" in
4182 "yes")
4183 BASECFLAGS="-pg $BASECFLAGS"
4184 LDFLAGS="-pg $LDFLAGS"
4185 ;;
4186esac
4187
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004188{ echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4189echo $ECHO_N "checking LDLIBRARY... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004190
4191# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4192# library that we build, but we do not want to link against it (we
4193# will find it with a -framework option). For this reason there is an
4194# extra variable BLDLIBRARY against which Python and the extension
4195# modules are linked, BLDLIBRARY. This is normally the same as
4196# LDLIBRARY, but empty for MacOSX framework builds.
4197if test "$enable_framework"
4198then
4199 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4200 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4201 BLDLIBRARY=''
4202else
4203 BLDLIBRARY='$(LDLIBRARY)'
4204fi
4205
4206# Other platforms follow
4207if test $enable_shared = "yes"; then
4208
4209cat >>confdefs.h <<\_ACEOF
4210#define Py_ENABLE_SHARED 1
4211_ACEOF
4212
4213 case $ac_sys_system in
4214 BeOS*)
4215 LDLIBRARY='libpython$(VERSION).so'
4216 ;;
4217 CYGWIN*)
4218 LDLIBRARY='libpython$(VERSION).dll.a'
4219 DLLLIBRARY='libpython$(VERSION).dll'
4220 ;;
4221 SunOS*)
4222 LDLIBRARY='libpython$(VERSION).so'
4223 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4224 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4225 INSTSONAME="$LDLIBRARY".$SOVERSION
4226 ;;
4227 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4228 LDLIBRARY='libpython$(VERSION).so'
4229 BLDLIBRARY='-L. -lpython$(VERSION)'
4230 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4231 case $ac_sys_system in
4232 FreeBSD*)
4233 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4234 ;;
4235 esac
4236 INSTSONAME="$LDLIBRARY".$SOVERSION
4237 ;;
4238 hp*|HP*)
4239 case `uname -m` in
4240 ia64)
4241 LDLIBRARY='libpython$(VERSION).so'
4242 ;;
4243 *)
4244 LDLIBRARY='libpython$(VERSION).sl'
4245 ;;
4246 esac
4247 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4248 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4249 ;;
4250 OSF*)
4251 LDLIBRARY='libpython$(VERSION).so'
4252 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4253 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4254 ;;
4255 atheos*)
4256 LDLIBRARY='libpython$(VERSION).so'
4257 BLDLIBRARY='-L. -lpython$(VERSION)'
4258 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4259 ;;
4260 Darwin*)
4261 LDLIBRARY='libpython$(VERSION).dylib'
4262 BLDLIBRARY='-L. -lpython$(VERSION)'
4263 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4264 ;;
4265
4266 esac
4267else # shared is disabled
4268 case $ac_sys_system in
4269 CYGWIN*)
4270 BLDLIBRARY='$(LIBRARY)'
4271 LDLIBRARY='libpython$(VERSION).dll.a'
4272 ;;
4273 esac
4274fi
4275
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004276{ echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4277echo "${ECHO_T}$LDLIBRARY" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004278
4279if test -n "$ac_tool_prefix"; then
4280 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4281set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004282{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4283echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004284if test "${ac_cv_prog_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004285 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004286else
4287 if test -n "$RANLIB"; then
4288 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4289else
4290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4291for as_dir in $PATH
4292do
4293 IFS=$as_save_IFS
4294 test -z "$as_dir" && as_dir=.
4295 for ac_exec_ext in '' $ac_executable_extensions; do
4296 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4297 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004298 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004299 break 2
4300 fi
4301done
4302done
4303IFS=$as_save_IFS
4304
4305fi
4306fi
4307RANLIB=$ac_cv_prog_RANLIB
4308if test -n "$RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004309 { echo "$as_me:$LINENO: result: $RANLIB" >&5
4310echo "${ECHO_T}$RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004311else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004312 { echo "$as_me:$LINENO: result: no" >&5
4313echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004314fi
4315
4316
4317fi
4318if test -z "$ac_cv_prog_RANLIB"; then
4319 ac_ct_RANLIB=$RANLIB
4320 # Extract the first word of "ranlib", so it can be a program name with args.
4321set dummy ranlib; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004322{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4323echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004324if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004325 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004326else
4327 if test -n "$ac_ct_RANLIB"; then
4328 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4329else
4330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4331for as_dir in $PATH
4332do
4333 IFS=$as_save_IFS
4334 test -z "$as_dir" && as_dir=.
4335 for ac_exec_ext in '' $ac_executable_extensions; do
4336 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4337 ac_cv_prog_ac_ct_RANLIB="ranlib"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004338 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004339 break 2
4340 fi
4341done
4342done
4343IFS=$as_save_IFS
4344
4345fi
4346fi
4347ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4348if test -n "$ac_ct_RANLIB"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004349 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4350echo "${ECHO_T}$ac_ct_RANLIB" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004351else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004352 { echo "$as_me:$LINENO: result: no" >&5
4353echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004354fi
4355
4356 if test "x$ac_ct_RANLIB" = x; then
4357 RANLIB=":"
4358 else
4359 case $cross_compiling:$ac_tool_warned in
4360yes:)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004361{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
4362whose name does not start with the host triplet. If you think this
4363configuration is useful to you, please write to autoconf@gnu.org." >&5
4364echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4365whose name does not start with the host triplet. If you think this
4366configuration is useful to you, please write to autoconf@gnu.org." >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004367ac_tool_warned=yes ;;
4368esac
4369 RANLIB=$ac_ct_RANLIB
4370 fi
4371else
4372 RANLIB="$ac_cv_prog_RANLIB"
4373fi
4374
4375
4376for ac_prog in ar aal
4377do
4378 # Extract the first word of "$ac_prog", so it can be a program name with args.
4379set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004380{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004382if test "${ac_cv_prog_AR+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004383 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004384else
4385 if test -n "$AR"; then
4386 ac_cv_prog_AR="$AR" # Let the user override the test.
4387else
4388as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4389for as_dir in $PATH
4390do
4391 IFS=$as_save_IFS
4392 test -z "$as_dir" && as_dir=.
4393 for ac_exec_ext in '' $ac_executable_extensions; do
4394 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4395 ac_cv_prog_AR="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004396 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004397 break 2
4398 fi
4399done
4400done
4401IFS=$as_save_IFS
4402
4403fi
4404fi
4405AR=$ac_cv_prog_AR
4406if test -n "$AR"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004407 { echo "$as_me:$LINENO: result: $AR" >&5
4408echo "${ECHO_T}$AR" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004409else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004410 { echo "$as_me:$LINENO: result: no" >&5
4411echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004412fi
4413
4414
4415 test -n "$AR" && break
4416done
4417test -n "$AR" || AR="ar"
4418
4419
4420# tweak ARFLAGS only if the user didn't set it on the command line
4421
4422if test -z "$ARFLAGS"
4423then
4424 ARFLAGS="rc"
4425fi
4426
4427
4428# Extract the first word of "svnversion", so it can be a program name with args.
4429set dummy svnversion; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004430{ echo "$as_me:$LINENO: checking for $ac_word" >&5
4431echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004432if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004433 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004434else
4435 if test -n "$SVNVERSION"; then
4436 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4437else
4438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4439for as_dir in $PATH
4440do
4441 IFS=$as_save_IFS
4442 test -z "$as_dir" && as_dir=.
4443 for ac_exec_ext in '' $ac_executable_extensions; do
4444 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4445 ac_cv_prog_SVNVERSION="found"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004446 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004447 break 2
4448 fi
4449done
4450done
4451IFS=$as_save_IFS
4452
4453 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4454fi
4455fi
4456SVNVERSION=$ac_cv_prog_SVNVERSION
4457if test -n "$SVNVERSION"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004458 { echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4459echo "${ECHO_T}$SVNVERSION" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004460else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004461 { echo "$as_me:$LINENO: result: no" >&5
4462echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004463fi
4464
4465
4466if test $SVNVERSION = found
4467then
4468 SVNVERSION="svnversion \$(srcdir)"
4469else
4470 SVNVERSION="echo Unversioned directory"
4471fi
4472
4473case $MACHDEP in
4474bsdos*|hp*|HP*)
4475 # install -d does not work on BSDI or HP-UX
4476 if test -z "$INSTALL"
4477 then
4478 INSTALL="${srcdir}/install-sh -c"
4479 fi
4480esac
4481ac_aux_dir=
4482for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4483 if test -f "$ac_dir/install-sh"; then
4484 ac_aux_dir=$ac_dir
4485 ac_install_sh="$ac_aux_dir/install-sh -c"
4486 break
4487 elif test -f "$ac_dir/install.sh"; then
4488 ac_aux_dir=$ac_dir
4489 ac_install_sh="$ac_aux_dir/install.sh -c"
4490 break
4491 elif test -f "$ac_dir/shtool"; then
4492 ac_aux_dir=$ac_dir
4493 ac_install_sh="$ac_aux_dir/shtool install -c"
4494 break
4495 fi
4496done
4497if test -z "$ac_aux_dir"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004498 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4499echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004500 { (exit 1); exit 1; }; }
4501fi
4502
4503# These three variables are undocumented and unsupported,
4504# and are intended to be withdrawn in a future Autoconf release.
4505# They can cause serious problems if a builder's source tree is in a directory
4506# whose full name contains unusual characters.
4507ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4508ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4509ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4510
4511
4512# Find a good install program. We prefer a C program (faster),
4513# so one script is as good as another. But avoid the broken or
4514# incompatible versions:
4515# SysV /etc/install, /usr/sbin/install
4516# SunOS /usr/etc/install
4517# IRIX /sbin/install
4518# AIX /bin/install
4519# AmigaOS /C/install, which installs bootblocks on floppy discs
4520# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4521# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4522# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4523# OS/2's system install, which has a completely different semantic
4524# ./install, which can be erroneously created by make from ./install.sh.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004525{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4526echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004527if test -z "$INSTALL"; then
4528if test "${ac_cv_path_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004529 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004530else
4531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4532for as_dir in $PATH
4533do
4534 IFS=$as_save_IFS
4535 test -z "$as_dir" && as_dir=.
4536 # Account for people who put trailing slashes in PATH elements.
4537case $as_dir/ in
4538 ./ | .// | /cC/* | \
4539 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4540 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4541 /usr/ucb/* ) ;;
4542 *)
4543 # OSF1 and SCO ODT 3.0 have their own names for install.
4544 # Don't use installbsd from OSF since it installs stuff as root
4545 # by default.
4546 for ac_prog in ginstall scoinst install; do
4547 for ac_exec_ext in '' $ac_executable_extensions; do
4548 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4549 if test $ac_prog = install &&
4550 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4551 # AIX install. It has an incompatible calling convention.
4552 :
4553 elif test $ac_prog = install &&
4554 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4555 # program-specific install script used by HP pwplus--don't use.
4556 :
4557 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004558 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4559 break 3
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004560 fi
4561 fi
4562 done
4563 done
4564 ;;
4565esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004566done
4567IFS=$as_save_IFS
4568
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004569
4570fi
4571 if test "${ac_cv_path_install+set}" = set; then
4572 INSTALL=$ac_cv_path_install
4573 else
4574 # As a last resort, use the slow shell script. Don't cache a
4575 # value for INSTALL within a source directory, because that will
4576 # break other packages using the cache if that directory is
4577 # removed, or if the value is a relative name.
4578 INSTALL=$ac_install_sh
4579 fi
4580fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004581{ echo "$as_me:$LINENO: result: $INSTALL" >&5
4582echo "${ECHO_T}$INSTALL" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004583
4584# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4585# It thinks the first close brace ends the variable substitution.
4586test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4587
4588test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4589
4590test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4591
4592
4593# Not every filesystem supports hard links
4594
4595if test -z "$LN" ; then
4596 case $ac_sys_system in
4597 BeOS*) LN="ln -s";;
4598 CYGWIN*) LN="ln -s";;
4599 atheos*) LN="ln -s";;
4600 *) LN=ln;;
4601 esac
4602fi
4603
4604# Check for --with-pydebug
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004605{ echo "$as_me:$LINENO: checking for --with-pydebug" >&5
4606echo $ECHO_N "checking for --with-pydebug... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004607
4608# Check whether --with-pydebug was given.
4609if test "${with_pydebug+set}" = set; then
4610 withval=$with_pydebug;
4611if test "$withval" != no
4612then
4613
4614cat >>confdefs.h <<\_ACEOF
4615#define Py_DEBUG 1
4616_ACEOF
4617
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004618 { echo "$as_me:$LINENO: result: yes" >&5
4619echo "${ECHO_T}yes" >&6; };
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004620 Py_DEBUG='true'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004621else { echo "$as_me:$LINENO: result: no" >&5
4622echo "${ECHO_T}no" >&6; }; Py_DEBUG='false'
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004623fi
4624else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004625 { echo "$as_me:$LINENO: result: no" >&5
4626echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004627fi
4628
4629
4630# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
4631# merged with this chunk of code?
4632
4633# Optimizer/debugger flags
4634# ------------------------
4635# (The following bit of code is complicated enough - please keep things
4636# indented properly. Just pretend you're editing Python code. ;-)
4637
4638# There are two parallel sets of case statements below, one that checks to
4639# see if OPT was set and one that does BASECFLAGS setting based upon
4640# compiler and platform. BASECFLAGS tweaks need to be made even if the
4641# user set OPT.
4642
4643# tweak OPT based on compiler and platform, only if the user didn't set
4644# it on the command line
4645
Benjamin Petersond4b721b2010-03-23 20:58:37 +00004646if test "${OPT-unset}" = "unset"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004647then
4648 case $GCC in
4649 yes)
4650 if test "$CC" != 'g++' ; then
4651 STRICT_PROTO="-Wstrict-prototypes"
4652 fi
4653 # For gcc 4.x we need to use -fwrapv so lets check if its supported
4654 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
4655 WRAP="-fwrapv"
4656 fi
4657 case $ac_cv_prog_cc_g in
4658 yes)
4659 if test "$Py_DEBUG" = 'true' ; then
4660 # Optimization messes up debuggers, so turn it off for
4661 # debug builds.
4662 OPT="-g -Wall $STRICT_PROTO"
4663 else
4664 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
4665 fi
4666 ;;
4667 *)
4668 OPT="-O3 -Wall $STRICT_PROTO"
4669 ;;
4670 esac
4671 case $ac_sys_system in
4672 SCO_SV*) OPT="$OPT -m486 -DSCO5"
4673 ;;
4674 esac
4675 ;;
4676
4677 *)
4678 OPT="-O"
4679 ;;
4680 esac
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004681fi
4682
4683
4684
4685# The -arch flags for universal builds on OSX
4686UNIVERSAL_ARCH_FLAGS=
4687
4688
4689# tweak BASECFLAGS based on compiler and platform
4690case $GCC in
4691yes)
4692 # Python violates C99 rules, by casting between incompatible
4693 # pointer types. GCC may generate bad code as a result of that,
4694 # so use -fno-strict-aliasing if supported.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004695 { echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
4696echo $ECHO_N "checking whether $CC accepts -fno-strict-aliasing... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004697 ac_save_cc="$CC"
4698 CC="$CC -fno-strict-aliasing"
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004699 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
4700 echo $ECHO_N "(cached) $ECHO_C" >&6
4701else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004702 cat >conftest.$ac_ext <<_ACEOF
4703/* confdefs.h. */
4704_ACEOF
4705cat confdefs.h >>conftest.$ac_ext
4706cat >>conftest.$ac_ext <<_ACEOF
4707/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004708
4709int
4710main ()
4711{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004712int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004713 ;
4714 return 0;
4715}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004716_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004717rm -f conftest.$ac_objext
4718if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004719case "(($ac_try" in
4720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4721 *) ac_try_echo=$ac_try;;
4722esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004724 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004725 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004726 grep -v '^ *+' conftest.er1 >conftest.err
4727 rm -f conftest.er1
4728 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004730 (exit $ac_status); } && {
4731 test -z "$ac_c_werror_flag" ||
4732 test ! -s conftest.err
4733 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004734 ac_cv_no_strict_aliasing_ok=yes
4735else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004736 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004737sed 's/^/| /' conftest.$ac_ext >&5
4738
Gregory P. Smith373469a2009-11-01 21:03:38 +00004739 ac_cv_no_strict_aliasing_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004740fi
4741
Gregory P. Smith373469a2009-11-01 21:03:38 +00004742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +00004743fi
4744
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004745 CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004746 { echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
4747echo "${ECHO_T}$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004748 if test $ac_cv_no_strict_aliasing_ok = yes
4749 then
4750 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
4751 fi
4752
4753 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
4754 # support. Without this, treatment of subnormals doesn't follow
4755 # the standard.
4756 case $ac_sys_machine in
4757 alpha*)
4758 BASECFLAGS="$BASECFLAGS -mieee"
4759 ;;
4760 esac
4761
4762 case $ac_sys_system in
4763 SCO_SV*)
4764 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
4765 ;;
4766 # is there any other compiler on Darwin besides gcc?
4767 Darwin*)
4768 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
4769 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004770 if test "${CC}" = gcc
4771 then
4772 { echo "$as_me:$LINENO: checking which compiler should be used" >&5
4773echo $ECHO_N "checking which compiler should be used... $ECHO_C" >&6; }
4774 case "${UNIVERSALSDK}" in
4775 */MacOSX10.4u.sdk)
4776 # Build using 10.4 SDK, force usage of gcc when the
4777 # compiler is gcc, otherwise the user will get very
4778 # confusing error messages when building on OSX 10.6
4779 CC=gcc-4.0
4780 CPP=cpp-4.0
4781 ;;
4782 esac
4783 { echo "$as_me:$LINENO: result: $CC" >&5
4784echo "${ECHO_T}$CC" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004785 fi
4786
4787 # Calculate the right deployment target for this build.
4788 #
4789 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
4790 if test ${cur_target} '>' 10.2; then
4791 cur_target=10.3
Ronald Oussoren25967582009-09-06 10:00:26 +00004792 if test ${enable_universalsdk}; then
4793 if test "${UNIVERSAL_ARCHS}" = "all"; then
4794 # Ensure that the default platform for a
4795 # 4-way universal build is OSX 10.5,
4796 # that's the first OS release where
4797 # 4-way builds make sense.
4798 cur_target='10.5'
Ronald Oussoren23d92532009-09-07 06:12:00 +00004799
4800 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
4801 cur_target='10.5'
4802
4803 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
4804 cur_target='10.5'
4805
4806 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
4807 cur_target='10.5'
Ronald Oussoren25967582009-09-06 10:00:26 +00004808 fi
4809 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +00004810 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren25967582009-09-06 10:00:26 +00004811 # On Intel macs default to a deployment
4812 # target of 10.4, that's the first OSX
4813 # release with Intel support.
4814 cur_target="10.4"
4815 fi
4816 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004817 fi
4818 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
4819
4820 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
4821 # environment with a value that is the same as what we'll use
4822 # in the Makefile to ensure that we'll get the same compiler
4823 # environment during configure and build time.
4824 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
4825 export MACOSX_DEPLOYMENT_TARGET
4826 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
4827
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004828 if test "${enable_universalsdk}"; then
4829 UNIVERSAL_ARCH_FLAGS=""
4830 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
4831 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
4832 ARCH_RUN_32BIT=""
Ronald Oussoren75912852010-04-08 08:13:31 +00004833 LIPO_32BIT_FLAGS=""
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004834
4835 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
4836 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
4837 LIPO_32BIT_FLAGS=""
4838 ARCH_RUN_32BIT="true"
4839
4840 elif test "$UNIVERSAL_ARCHS" = "all" ; then
4841 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
4842 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004843 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004844
4845 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
4846 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
4847 LIPO_32BIT_FLAGS="-extract i386"
Ronald Oussoren92397ce2010-01-17 19:32:00 +00004848 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004849
4850 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
4851 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
4852 LIPO_32BIT_FLAGS="-extract ppc7400 -extract i386"
Ronald Oussoren9922f172010-02-11 13:19:34 +00004853 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004854
4855 else
4856 { { echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
4857echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
4858 { (exit 1); exit 1; }; }
4859
4860 fi
4861
4862
Ronald Oussoren974eb5e2010-04-18 17:59:37 +00004863 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
4864 if test "${UNIVERSALSDK}" != "/"
4865 then
4866 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
4867 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
4868 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
Ronald Oussorena55af9a2010-01-17 16:25:57 +00004869 fi
4870
4871 fi
4872
4873
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004874 ;;
4875 OSF*)
4876 BASECFLAGS="$BASECFLAGS -mieee"
4877 ;;
4878 esac
4879 ;;
4880
4881*)
4882 case $ac_sys_system in
4883 OpenUNIX*|UnixWare*)
4884 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
4885 ;;
4886 OSF*)
4887 BASECFLAGS="$BASECFLAGS -ieee -std"
4888 ;;
4889 SCO_SV*)
4890 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
4891 ;;
4892 esac
4893 ;;
4894esac
4895
4896if test "$Py_DEBUG" = 'true'; then
4897 :
4898else
4899 OPT="-DNDEBUG $OPT"
4900fi
4901
4902if test "$ac_arch_flags"
4903then
4904 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
4905fi
4906
4907# disable check for icc since it seems to pass, but generates a warning
4908if test "$CC" = icc
4909then
4910 ac_cv_opt_olimit_ok=no
4911fi
4912
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004913{ echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
4914echo $ECHO_N "checking whether $CC accepts -OPT:Olimit=0... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004915if test "${ac_cv_opt_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004916 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004917else
4918 ac_save_cc="$CC"
4919CC="$CC -OPT:Olimit=0"
Gregory P. Smith373469a2009-11-01 21:03:38 +00004920cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004921/* confdefs.h. */
4922_ACEOF
4923cat confdefs.h >>conftest.$ac_ext
4924cat >>conftest.$ac_ext <<_ACEOF
4925/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004926
4927int
4928main ()
4929{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004930int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004931 ;
4932 return 0;
4933}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004934_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00004935rm -f conftest.$ac_objext
4936if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004937case "(($ac_try" in
4938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4939 *) ac_try_echo=$ac_try;;
4940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004942 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004943 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00004944 grep -v '^ *+' conftest.er1 >conftest.err
4945 rm -f conftest.er1
4946 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00004948 (exit $ac_status); } && {
4949 test -z "$ac_c_werror_flag" ||
4950 test ! -s conftest.err
4951 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004952 ac_cv_opt_olimit_ok=yes
4953else
Gregory P. Smith373469a2009-11-01 21:03:38 +00004954 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004955sed 's/^/| /' conftest.$ac_ext >&5
4956
Gregory P. Smith373469a2009-11-01 21:03:38 +00004957 ac_cv_opt_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004958fi
4959
Gregory P. Smith373469a2009-11-01 21:03:38 +00004960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004961CC="$ac_save_cc"
4962fi
4963
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004964{ echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
4965echo "${ECHO_T}$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004966if test $ac_cv_opt_olimit_ok = yes; then
4967 case $ac_sys_system in
4968 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
4969 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
4970 # environment?
4971 Darwin*)
4972 ;;
4973 *)
4974 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
4975 ;;
4976 esac
4977else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004978 { echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
4979echo $ECHO_N "checking whether $CC accepts -Olimit 1500... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004980 if test "${ac_cv_olimit_ok+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00004981 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004982else
4983 ac_save_cc="$CC"
4984 CC="$CC -Olimit 1500"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004985 cat >conftest.$ac_ext <<_ACEOF
4986/* confdefs.h. */
4987_ACEOF
4988cat confdefs.h >>conftest.$ac_ext
4989cat >>conftest.$ac_ext <<_ACEOF
4990/* end confdefs.h. */
Gregory P. Smith373469a2009-11-01 21:03:38 +00004991
4992int
4993main ()
4994{
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004995int main() { return 0; }
Gregory P. Smith373469a2009-11-01 21:03:38 +00004996 ;
4997 return 0;
4998}
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00004999_ACEOF
Gregory P. Smith373469a2009-11-01 21:03:38 +00005000rm -f conftest.$ac_objext
5001if { (ac_try="$ac_compile"
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005002case "(($ac_try" in
5003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5004 *) ac_try_echo=$ac_try;;
5005esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00005007 (eval "$ac_compile") 2>conftest.er1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005008 ac_status=$?
Gregory P. Smith373469a2009-11-01 21:03:38 +00005009 grep -v '^ *+' conftest.er1 >conftest.err
5010 rm -f conftest.er1
5011 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Gregory P. Smith373469a2009-11-01 21:03:38 +00005013 (exit $ac_status); } && {
5014 test -z "$ac_c_werror_flag" ||
5015 test ! -s conftest.err
5016 } && test -s conftest.$ac_objext; then
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005017 ac_cv_olimit_ok=yes
5018else
Gregory P. Smith373469a2009-11-01 21:03:38 +00005019 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005020sed 's/^/| /' conftest.$ac_ext >&5
5021
Gregory P. Smith373469a2009-11-01 21:03:38 +00005022 ac_cv_olimit_ok=no
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005023fi
5024
Gregory P. Smith373469a2009-11-01 21:03:38 +00005025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005026 CC="$ac_save_cc"
5027fi
5028
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005029 { echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5030echo "${ECHO_T}$ac_cv_olimit_ok" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005031 if test $ac_cv_olimit_ok = yes; then
5032 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5033 fi
5034fi
5035
5036# Check whether GCC supports PyArg_ParseTuple format
5037if test "$GCC" = "yes"
5038then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005039 { echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5040echo $ECHO_N "checking whether gcc supports ParseTuple __format__... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005041 save_CFLAGS=$CFLAGS
5042 CFLAGS="$CFLAGS -Werror"
5043 cat >conftest.$ac_ext <<_ACEOF
5044/* confdefs.h. */
5045_ACEOF
5046cat confdefs.h >>conftest.$ac_ext
5047cat >>conftest.$ac_ext <<_ACEOF
5048/* end confdefs.h. */
5049
5050 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5051
5052int
5053main ()
5054{
5055
5056 ;
5057 return 0;
5058}
5059_ACEOF
5060rm -f conftest.$ac_objext
5061if { (ac_try="$ac_compile"
5062case "(($ac_try" in
5063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5064 *) ac_try_echo=$ac_try;;
5065esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005067 (eval "$ac_compile") 2>conftest.er1
5068 ac_status=$?
5069 grep -v '^ *+' conftest.er1 >conftest.err
5070 rm -f conftest.er1
5071 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005073 (exit $ac_status); } && {
5074 test -z "$ac_c_werror_flag" ||
5075 test ! -s conftest.err
5076 } && test -s conftest.$ac_objext; then
5077
5078cat >>confdefs.h <<\_ACEOF
5079#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5080_ACEOF
5081
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005082 { echo "$as_me:$LINENO: result: yes" >&5
5083echo "${ECHO_T}yes" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005084else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005085 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005086sed 's/^/| /' conftest.$ac_ext >&5
5087
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005088 { echo "$as_me:$LINENO: result: no" >&5
5089echo "${ECHO_T}no" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005090
5091fi
5092
5093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5094 CFLAGS=$save_CFLAGS
5095fi
5096
5097# On some compilers, pthreads are available without further options
5098# (e.g. MacOS X). On some of these systems, the compiler will not
5099# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5100# So we have to see first whether pthreads are available without
5101# options before we can check whether -Kpthread improves anything.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005102{ echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5103echo $ECHO_N "checking whether pthreads are available without options... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005104if test "${ac_cv_pthread_is_default+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005105 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005106else
5107 if test "$cross_compiling" = yes; then
5108 ac_cv_pthread_is_default=no
5109else
5110 cat >conftest.$ac_ext <<_ACEOF
5111/* confdefs.h. */
5112_ACEOF
5113cat confdefs.h >>conftest.$ac_ext
5114cat >>conftest.$ac_ext <<_ACEOF
5115/* end confdefs.h. */
5116
5117#include <pthread.h>
5118
5119void* routine(void* p){return NULL;}
5120
5121int main(){
5122 pthread_t p;
5123 if(pthread_create(&p,NULL,routine,NULL)!=0)
5124 return 1;
5125 (void)pthread_detach(p);
5126 return 0;
5127}
5128
5129_ACEOF
5130rm -f conftest$ac_exeext
5131if { (ac_try="$ac_link"
5132case "(($ac_try" in
5133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5134 *) ac_try_echo=$ac_try;;
5135esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005137 (eval "$ac_link") 2>&5
5138 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005139 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5141 { (case "(($ac_try" in
5142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5143 *) ac_try_echo=$ac_try;;
5144esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005146 (eval "$ac_try") 2>&5
5147 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005149 (exit $ac_status); }; }; then
5150
5151 ac_cv_pthread_is_default=yes
5152 ac_cv_kthread=no
5153 ac_cv_pthread=no
5154
5155else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005156 echo "$as_me: program exited with status $ac_status" >&5
5157echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005158sed 's/^/| /' conftest.$ac_ext >&5
5159
5160( exit $ac_status )
5161ac_cv_pthread_is_default=no
5162fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5164fi
5165
5166
5167
5168fi
5169
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005170{ echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5171echo "${ECHO_T}$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005172
5173
5174if test $ac_cv_pthread_is_default = yes
5175then
5176 ac_cv_kpthread=no
5177else
5178# -Kpthread, if available, provides the right #defines
5179# and linker options to make pthread_create available
5180# Some compilers won't report that they do not support -Kpthread,
5181# so we need to run a program to see whether it really made the
5182# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005183{ echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5184echo $ECHO_N "checking whether $CC accepts -Kpthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005185if test "${ac_cv_kpthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005186 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005187else
5188 ac_save_cc="$CC"
5189CC="$CC -Kpthread"
5190if test "$cross_compiling" = yes; then
5191 ac_cv_kpthread=no
5192else
5193 cat >conftest.$ac_ext <<_ACEOF
5194/* confdefs.h. */
5195_ACEOF
5196cat confdefs.h >>conftest.$ac_ext
5197cat >>conftest.$ac_ext <<_ACEOF
5198/* end confdefs.h. */
5199
5200#include <pthread.h>
5201
5202void* routine(void* p){return NULL;}
5203
5204int main(){
5205 pthread_t p;
5206 if(pthread_create(&p,NULL,routine,NULL)!=0)
5207 return 1;
5208 (void)pthread_detach(p);
5209 return 0;
5210}
5211
5212_ACEOF
5213rm -f conftest$ac_exeext
5214if { (ac_try="$ac_link"
5215case "(($ac_try" in
5216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5217 *) ac_try_echo=$ac_try;;
5218esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005219eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005220 (eval "$ac_link") 2>&5
5221 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005222 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005223 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5224 { (case "(($ac_try" in
5225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5226 *) ac_try_echo=$ac_try;;
5227esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005229 (eval "$ac_try") 2>&5
5230 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005232 (exit $ac_status); }; }; then
5233 ac_cv_kpthread=yes
5234else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005235 echo "$as_me: program exited with status $ac_status" >&5
5236echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005237sed 's/^/| /' conftest.$ac_ext >&5
5238
5239( exit $ac_status )
5240ac_cv_kpthread=no
5241fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005242rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5243fi
5244
5245
5246CC="$ac_save_cc"
5247fi
5248
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005249{ echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5250echo "${ECHO_T}$ac_cv_kpthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005251fi
5252
5253if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5254then
5255# -Kthread, if available, provides the right #defines
5256# and linker options to make pthread_create available
5257# Some compilers won't report that they do not support -Kthread,
5258# so we need to run a program to see whether it really made the
5259# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005260{ echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5261echo $ECHO_N "checking whether $CC accepts -Kthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005262if test "${ac_cv_kthread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005263 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005264else
5265 ac_save_cc="$CC"
5266CC="$CC -Kthread"
5267if test "$cross_compiling" = yes; then
5268 ac_cv_kthread=no
5269else
5270 cat >conftest.$ac_ext <<_ACEOF
5271/* confdefs.h. */
5272_ACEOF
5273cat confdefs.h >>conftest.$ac_ext
5274cat >>conftest.$ac_ext <<_ACEOF
5275/* end confdefs.h. */
5276
5277#include <pthread.h>
5278
5279void* routine(void* p){return NULL;}
5280
5281int main(){
5282 pthread_t p;
5283 if(pthread_create(&p,NULL,routine,NULL)!=0)
5284 return 1;
5285 (void)pthread_detach(p);
5286 return 0;
5287}
5288
5289_ACEOF
5290rm -f conftest$ac_exeext
5291if { (ac_try="$ac_link"
5292case "(($ac_try" in
5293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5294 *) ac_try_echo=$ac_try;;
5295esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005296eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005297 (eval "$ac_link") 2>&5
5298 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005299 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005300 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5301 { (case "(($ac_try" in
5302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5303 *) ac_try_echo=$ac_try;;
5304esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005306 (eval "$ac_try") 2>&5
5307 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005309 (exit $ac_status); }; }; then
5310 ac_cv_kthread=yes
5311else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005312 echo "$as_me: program exited with status $ac_status" >&5
5313echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005314sed 's/^/| /' conftest.$ac_ext >&5
5315
5316( exit $ac_status )
5317ac_cv_kthread=no
5318fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005319rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5320fi
5321
5322
5323CC="$ac_save_cc"
5324fi
5325
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005326{ echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5327echo "${ECHO_T}$ac_cv_kthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005328fi
5329
5330if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5331then
5332# -pthread, if available, provides the right #defines
5333# and linker options to make pthread_create available
5334# Some compilers won't report that they do not support -pthread,
5335# so we need to run a program to see whether it really made the
5336# function available.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005337{ echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5338echo $ECHO_N "checking whether $CC accepts -pthread... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005339if test "${ac_cv_thread+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005340 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005341else
5342 ac_save_cc="$CC"
5343CC="$CC -pthread"
5344if test "$cross_compiling" = yes; then
5345 ac_cv_pthread=no
5346else
5347 cat >conftest.$ac_ext <<_ACEOF
5348/* confdefs.h. */
5349_ACEOF
5350cat confdefs.h >>conftest.$ac_ext
5351cat >>conftest.$ac_ext <<_ACEOF
5352/* end confdefs.h. */
5353
5354#include <pthread.h>
5355
5356void* routine(void* p){return NULL;}
5357
5358int main(){
5359 pthread_t p;
5360 if(pthread_create(&p,NULL,routine,NULL)!=0)
5361 return 1;
5362 (void)pthread_detach(p);
5363 return 0;
5364}
5365
5366_ACEOF
5367rm -f conftest$ac_exeext
5368if { (ac_try="$ac_link"
5369case "(($ac_try" in
5370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5371 *) ac_try_echo=$ac_try;;
5372esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005373eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005374 (eval "$ac_link") 2>&5
5375 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005376 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005377 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5378 { (case "(($ac_try" in
5379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5380 *) ac_try_echo=$ac_try;;
5381esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005382eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005383 (eval "$ac_try") 2>&5
5384 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005386 (exit $ac_status); }; }; then
5387 ac_cv_pthread=yes
5388else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005389 echo "$as_me: program exited with status $ac_status" >&5
5390echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005391sed 's/^/| /' conftest.$ac_ext >&5
5392
5393( exit $ac_status )
5394ac_cv_pthread=no
5395fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005396rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5397fi
5398
5399
5400CC="$ac_save_cc"
5401fi
5402
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005403{ echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5404echo "${ECHO_T}$ac_cv_pthread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005405fi
5406
5407# If we have set a CC compiler flag for thread support then
5408# check if it works for CXX, too.
5409ac_cv_cxx_thread=no
5410if test ! -z "$CXX"
5411then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005412{ echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5413echo $ECHO_N "checking whether $CXX also accepts flags for thread support... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005414ac_save_cxx="$CXX"
5415
5416if test "$ac_cv_kpthread" = "yes"
5417then
5418 CXX="$CXX -Kpthread"
5419 ac_cv_cxx_thread=yes
5420elif test "$ac_cv_kthread" = "yes"
5421then
5422 CXX="$CXX -Kthread"
5423 ac_cv_cxx_thread=yes
5424elif test "$ac_cv_pthread" = "yes"
5425then
5426 CXX="$CXX -pthread"
5427 ac_cv_cxx_thread=yes
5428fi
5429
5430if test $ac_cv_cxx_thread = yes
5431then
5432 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5433 $CXX -c conftest.$ac_ext 2>&5
5434 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5435 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5436 then
5437 ac_cv_cxx_thread=yes
5438 else
5439 ac_cv_cxx_thread=no
5440 fi
5441 rm -fr conftest*
5442fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005443{ echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5444echo "${ECHO_T}$ac_cv_cxx_thread" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005445fi
5446CXX="$ac_save_cxx"
5447
5448
5449# checks for header files
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005450{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5451echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005452if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005453 echo $ECHO_N "(cached) $ECHO_C" >&6
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005454else
5455 cat >conftest.$ac_ext <<_ACEOF
5456/* confdefs.h. */
5457_ACEOF
5458cat confdefs.h >>conftest.$ac_ext
5459cat >>conftest.$ac_ext <<_ACEOF
5460/* end confdefs.h. */
5461#include <stdlib.h>
5462#include <stdarg.h>
5463#include <string.h>
5464#include <float.h>
5465
5466int
5467main ()
5468{
5469
5470 ;
5471 return 0;
5472}
5473_ACEOF
5474rm -f conftest.$ac_objext
5475if { (ac_try="$ac_compile"
5476case "(($ac_try" in
5477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5478 *) ac_try_echo=$ac_try;;
5479esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005480eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005481 (eval "$ac_compile") 2>conftest.er1
5482 ac_status=$?
5483 grep -v '^ *+' conftest.er1 >conftest.err
5484 rm -f conftest.er1
5485 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005486 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005487 (exit $ac_status); } && {
5488 test -z "$ac_c_werror_flag" ||
5489 test ! -s conftest.err
5490 } && test -s conftest.$ac_objext; then
5491 ac_cv_header_stdc=yes
5492else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005493 echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005494sed 's/^/| /' conftest.$ac_ext >&5
5495
5496 ac_cv_header_stdc=no
5497fi
5498
5499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5500
5501if test $ac_cv_header_stdc = yes; then
5502 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5503 cat >conftest.$ac_ext <<_ACEOF
5504/* confdefs.h. */
5505_ACEOF
5506cat confdefs.h >>conftest.$ac_ext
5507cat >>conftest.$ac_ext <<_ACEOF
5508/* end confdefs.h. */
5509#include <string.h>
5510
5511_ACEOF
5512if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5513 $EGREP "memchr" >/dev/null 2>&1; then
5514 :
5515else
5516 ac_cv_header_stdc=no
5517fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005518rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005519
5520fi
5521
5522if test $ac_cv_header_stdc = yes; then
5523 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5524 cat >conftest.$ac_ext <<_ACEOF
5525/* confdefs.h. */
5526_ACEOF
5527cat confdefs.h >>conftest.$ac_ext
5528cat >>conftest.$ac_ext <<_ACEOF
5529/* end confdefs.h. */
5530#include <stdlib.h>
5531
5532_ACEOF
5533if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5534 $EGREP "free" >/dev/null 2>&1; then
5535 :
5536else
5537 ac_cv_header_stdc=no
5538fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00005539rm -f conftest*
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005540
5541fi
5542
5543if test $ac_cv_header_stdc = yes; then
5544 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5545 if test "$cross_compiling" = yes; then
5546 :
5547else
5548 cat >conftest.$ac_ext <<_ACEOF
5549/* confdefs.h. */
5550_ACEOF
5551cat confdefs.h >>conftest.$ac_ext
5552cat >>conftest.$ac_ext <<_ACEOF
5553/* end confdefs.h. */
5554#include <ctype.h>
5555#include <stdlib.h>
5556#if ((' ' & 0x0FF) == 0x020)
5557# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5558# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5559#else
5560# define ISLOWER(c) \
5561 (('a' <= (c) && (c) <= 'i') \
5562 || ('j' <= (c) && (c) <= 'r') \
5563 || ('s' <= (c) && (c) <= 'z'))
5564# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5565#endif
5566
5567#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5568int
5569main ()
5570{
5571 int i;
5572 for (i = 0; i < 256; i++)
5573 if (XOR (islower (i), ISLOWER (i))
5574 || toupper (i) != TOUPPER (i))
5575 return 2;
5576 return 0;
5577}
5578_ACEOF
5579rm -f conftest$ac_exeext
5580if { (ac_try="$ac_link"
5581case "(($ac_try" in
5582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5583 *) ac_try_echo=$ac_try;;
5584esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005585eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005586 (eval "$ac_link") 2>&5
5587 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005588 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005589 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5590 { (case "(($ac_try" in
5591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5592 *) ac_try_echo=$ac_try;;
5593esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005594eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005595 (eval "$ac_try") 2>&5
5596 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005597 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005598 (exit $ac_status); }; }; then
5599 :
5600else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005601 echo "$as_me: program exited with status $ac_status" >&5
5602echo "$as_me: failed program was:" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005603sed 's/^/| /' conftest.$ac_ext >&5
5604
5605( exit $ac_status )
5606ac_cv_header_stdc=no
5607fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5609fi
5610
5611
5612fi
5613fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005614{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
5615echo "${ECHO_T}$ac_cv_header_stdc" >&6; }
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005616if test $ac_cv_header_stdc = yes; then
5617
5618cat >>confdefs.h <<\_ACEOF
5619#define STDC_HEADERS 1
5620_ACEOF
5621
5622fi
5623
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005624# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5635 inttypes.h stdint.h unistd.h
5636do
5637as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5638{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5639echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
5640if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
5641 echo $ECHO_N "(cached) $ECHO_C" >&6
5642else
5643 cat >conftest.$ac_ext <<_ACEOF
5644/* confdefs.h. */
5645_ACEOF
5646cat confdefs.h >>conftest.$ac_ext
5647cat >>conftest.$ac_ext <<_ACEOF
5648/* end confdefs.h. */
5649$ac_includes_default
5650
5651#include <$ac_header>
5652_ACEOF
5653rm -f conftest.$ac_objext
5654if { (ac_try="$ac_compile"
5655case "(($ac_try" in
5656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5657 *) ac_try_echo=$ac_try;;
5658esac
5659eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5660 (eval "$ac_compile") 2>conftest.er1
5661 ac_status=$?
5662 grep -v '^ *+' conftest.er1 >conftest.err
5663 rm -f conftest.er1
5664 cat conftest.err >&5
5665 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5666 (exit $ac_status); } && {
5667 test -z "$ac_c_werror_flag" ||
5668 test ! -s conftest.err
5669 } && test -s conftest.$ac_objext; then
5670 eval "$as_ac_Header=yes"
5671else
5672 echo "$as_me: failed program was:" >&5
5673sed 's/^/| /' conftest.$ac_ext >&5
5674
5675 eval "$as_ac_Header=no"
5676fi
5677
5678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5679fi
5680ac_res=`eval echo '${'$as_ac_Header'}'`
5681 { echo "$as_me:$LINENO: result: $ac_res" >&5
5682echo "${ECHO_T}$ac_res" >&6; }
5683if test `eval echo '${'$as_ac_Header'}'` = yes; then
5684 cat >>confdefs.h <<_ACEOF
5685#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5686_ACEOF
5687
5688fi
5689
5690done
5691
5692
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00005693
Martin v. Löwis11437992002-04-12 09:54:03 +00005694
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
5724
5725
5726
5727
5728
Anthony Baxter8a560de2004-10-13 15:30:56 +00005729
Martin v. Löwisc3001752005-01-23 09:27:24 +00005730
Martin v. Löwis11017b12006-01-14 18:12:57 +00005731
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00005732
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005733
5734
5735
5736
5737
5738
5739
5740
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005741
Christian Heimesfb2d25a2008-01-07 16:12:44 +00005742
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005743
5744
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005745
Martin v. Löwis8c255e42008-05-23 15:06:50 +00005746
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005747
5748
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005749for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
5750fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00005751ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00005752shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00005753unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00005754sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
5755sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005756sys/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 +00005757sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00005758sys/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 +00005759sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Ronald Oussorena55af9a2010-01-17 16:25:57 +00005760bluetooth/bluetooth.h linux/tipc.h spawn.h util.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00005761do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005762as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00005763if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005764 { echo "$as_me:$LINENO: checking for $ac_header" >&5
5765echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005766if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005767 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00005768fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005769ac_res=`eval echo '${'$as_ac_Header'}'`
5770 { echo "$as_me:$LINENO: result: $ac_res" >&5
5771echo "${ECHO_T}$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005772else
Martin v. Löwis11437992002-04-12 09:54:03 +00005773 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005774{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
5775echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005776cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005777/* confdefs.h. */
5778_ACEOF
5779cat confdefs.h >>conftest.$ac_ext
5780cat >>conftest.$ac_ext <<_ACEOF
5781/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005782$ac_includes_default
5783#include <$ac_header>
5784_ACEOF
5785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005786if { (ac_try="$ac_compile"
5787case "(($ac_try" in
5788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5789 *) ac_try_echo=$ac_try;;
5790esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005794 grep -v '^ *+' conftest.er1 >conftest.err
5795 rm -f conftest.er1
5796 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005798 (exit $ac_status); } && {
5799 test -z "$ac_c_werror_flag" ||
5800 test ! -s conftest.err
5801 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005802 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00005803else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005804 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005805sed 's/^/| /' conftest.$ac_ext >&5
5806
Martin v. Löwiseba40652007-08-30 20:10:57 +00005807 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005808fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005809
5810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005811{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
5812echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005813
5814# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005815{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
5816echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005817cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005818/* confdefs.h. */
5819_ACEOF
5820cat confdefs.h >>conftest.$ac_ext
5821cat >>conftest.$ac_ext <<_ACEOF
5822/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005823#include <$ac_header>
5824_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00005825if { (ac_try="$ac_cpp conftest.$ac_ext"
5826case "(($ac_try" in
5827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5828 *) ac_try_echo=$ac_try;;
5829esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005830eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005831 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005832 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00005833 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00005834 rm -f conftest.er1
5835 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005837 (exit $ac_status); } >/dev/null && {
5838 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
5839 test ! -s conftest.err
5840 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005841 ac_header_preproc=yes
5842else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005843 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005844sed 's/^/| /' conftest.$ac_ext >&5
5845
Martin v. Löwis11437992002-04-12 09:54:03 +00005846 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00005847fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005848
Martin v. Löwis11437992002-04-12 09:54:03 +00005849rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005850{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
5851echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005852
5853# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005854case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
5855 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005856 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
5857echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
5858 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
5859echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00005860 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00005861 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00005862 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005863 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
5864echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
5865 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
5866echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
5867 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
5868echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
5869 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
5870echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
5871 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
5872echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
5873 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
5874echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00005875 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00005876## -------------------------------------- ##
5877## Report this to http://bugs.python.org/ ##
5878## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00005879_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00005880 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00005881 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00005882esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005883{ echo "$as_me:$LINENO: checking for $ac_header" >&5
5884echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005885if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005886 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00005887else
Skip Montanarof0d5f792004-08-15 14:08:23 +00005888 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005889fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005890ac_res=`eval echo '${'$as_ac_Header'}'`
5891 { echo "$as_me:$LINENO: result: $ac_res" >&5
5892echo "${ECHO_T}$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005893
5894fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005895if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005896 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005897#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005898_ACEOF
5899
5900fi
5901
Guido van Rossum627b2d71993-12-24 10:39:16 +00005902done
5903
Martin v. Löwis11437992002-04-12 09:54:03 +00005904
5905
5906
5907
5908
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005909ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00005910for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005911 as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
5912{ echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
5913echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005914if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005915 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00005916else
Martin v. Löwis11437992002-04-12 09:54:03 +00005917 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005918/* confdefs.h. */
5919_ACEOF
5920cat confdefs.h >>conftest.$ac_ext
5921cat >>conftest.$ac_ext <<_ACEOF
5922/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005923#include <sys/types.h>
5924#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00005925
Martin v. Löwis11437992002-04-12 09:54:03 +00005926int
5927main ()
5928{
5929if ((DIR *) 0)
5930return 0;
5931 ;
5932 return 0;
5933}
5934_ACEOF
5935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005936if { (ac_try="$ac_compile"
5937case "(($ac_try" in
5938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5939 *) ac_try_echo=$ac_try;;
5940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00005943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00005944 grep -v '^ *+' conftest.er1 >conftest.err
5945 rm -f conftest.er1
5946 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005948 (exit $ac_status); } && {
5949 test -z "$ac_c_werror_flag" ||
5950 test ! -s conftest.err
5951 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005952 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00005953else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005954 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005955sed 's/^/| /' conftest.$ac_ext >&5
5956
Martin v. Löwiseba40652007-08-30 20:10:57 +00005957 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005958fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005959
5960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00005961fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005962ac_res=`eval echo '${'$as_ac_Header'}'`
5963 { echo "$as_me:$LINENO: result: $ac_res" >&5
5964echo "${ECHO_T}$ac_res" >&6; }
5965if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005966 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005967#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005968_ACEOF
5969
5970ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00005971fi
Martin v. Löwis11437992002-04-12 09:54:03 +00005972
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005973done
5974# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
5975if test $ac_header_dirent = dirent.h; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005976 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
5977echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005978if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00005979 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005980else
Martin v. Löwis11437992002-04-12 09:54:03 +00005981 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00005982cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005983/* confdefs.h. */
5984_ACEOF
5985cat confdefs.h >>conftest.$ac_ext
5986cat >>conftest.$ac_ext <<_ACEOF
5987/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005988
Martin v. Löwiseba40652007-08-30 20:10:57 +00005989/* Override any GCC internal prototype to avoid an error.
5990 Use char because int might match the return type of a GCC
5991 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00005992#ifdef __cplusplus
5993extern "C"
5994#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00005995char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00005996int
5997main ()
5998{
Martin v. Löwiseba40652007-08-30 20:10:57 +00005999return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006000 ;
6001 return 0;
6002}
6003_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006004for ac_lib in '' dir; do
6005 if test -z "$ac_lib"; then
6006 ac_res="none required"
6007 else
6008 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006009 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006010 fi
6011 rm -f conftest.$ac_objext conftest$ac_exeext
6012if { (ac_try="$ac_link"
6013case "(($ac_try" in
6014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6015 *) ac_try_echo=$ac_try;;
6016esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006017eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006018 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006019 ac_status=$?
6020 grep -v '^ *+' conftest.er1 >conftest.err
6021 rm -f conftest.er1
6022 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006023 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006024 (exit $ac_status); } && {
6025 test -z "$ac_c_werror_flag" ||
6026 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006027 } && test -s conftest$ac_exeext &&
6028 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006029 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006030else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006031 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006032sed 's/^/| /' conftest.$ac_ext >&5
6033
Martin v. Löwiseba40652007-08-30 20:10:57 +00006034
Brett Cannon19fab762007-06-02 03:02:29 +00006035fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006036
6037rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6038 conftest$ac_exeext
6039 if test "${ac_cv_search_opendir+set}" = set; then
6040 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006042done
6043if test "${ac_cv_search_opendir+set}" = set; then
6044 :
6045else
6046 ac_cv_search_opendir=no
6047fi
6048rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006049LIBS=$ac_func_search_save_LIBS
6050fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006051{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6052echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006053ac_res=$ac_cv_search_opendir
6054if test "$ac_res" != no; then
6055 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006056
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006057fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006058
Michael W. Hudson54241132001-12-07 15:38:26 +00006059else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006060 { echo "$as_me:$LINENO: checking for library containing opendir" >&5
6061echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006062if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006063 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006064else
6065 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006066cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006067/* confdefs.h. */
6068_ACEOF
6069cat confdefs.h >>conftest.$ac_ext
6070cat >>conftest.$ac_ext <<_ACEOF
6071/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006072
Martin v. Löwiseba40652007-08-30 20:10:57 +00006073/* Override any GCC internal prototype to avoid an error.
6074 Use char because int might match the return type of a GCC
6075 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006076#ifdef __cplusplus
6077extern "C"
6078#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006079char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006080int
6081main ()
6082{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006083return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006084 ;
6085 return 0;
6086}
6087_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006088for ac_lib in '' x; do
6089 if test -z "$ac_lib"; then
6090 ac_res="none required"
6091 else
6092 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006093 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006094 fi
6095 rm -f conftest.$ac_objext conftest$ac_exeext
6096if { (ac_try="$ac_link"
6097case "(($ac_try" in
6098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6099 *) ac_try_echo=$ac_try;;
6100esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006101eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006102 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006103 ac_status=$?
6104 grep -v '^ *+' conftest.er1 >conftest.err
6105 rm -f conftest.er1
6106 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006107 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006108 (exit $ac_status); } && {
6109 test -z "$ac_c_werror_flag" ||
6110 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006111 } && test -s conftest$ac_exeext &&
6112 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006113 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006114else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006115 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006116sed 's/^/| /' conftest.$ac_ext >&5
6117
Martin v. Löwiseba40652007-08-30 20:10:57 +00006118
Brett Cannon19fab762007-06-02 03:02:29 +00006119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006120
6121rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6122 conftest$ac_exeext
6123 if test "${ac_cv_search_opendir+set}" = set; then
6124 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006125fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006126done
6127if test "${ac_cv_search_opendir+set}" = set; then
6128 :
6129else
6130 ac_cv_search_opendir=no
6131fi
6132rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006133LIBS=$ac_func_search_save_LIBS
6134fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006135{ echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6136echo "${ECHO_T}$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006137ac_res=$ac_cv_search_opendir
6138if test "$ac_res" != no; then
6139 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006140
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006141fi
6142
6143fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006144
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006145{ echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6146echo $ECHO_N "checking whether sys/types.h defines makedev... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006147if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006148 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006149else
6150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006151/* confdefs.h. */
6152_ACEOF
6153cat confdefs.h >>conftest.$ac_ext
6154cat >>conftest.$ac_ext <<_ACEOF
6155/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006156#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006157int
6158main ()
6159{
6160return makedev(0, 0);
6161 ;
6162 return 0;
6163}
6164_ACEOF
6165rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006166if { (ac_try="$ac_link"
6167case "(($ac_try" in
6168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6169 *) ac_try_echo=$ac_try;;
6170esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006171eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006172 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006174 grep -v '^ *+' conftest.er1 >conftest.err
6175 rm -f conftest.er1
6176 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006177 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006178 (exit $ac_status); } && {
6179 test -z "$ac_c_werror_flag" ||
6180 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006181 } && test -s conftest$ac_exeext &&
6182 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006183 ac_cv_header_sys_types_h_makedev=yes
6184else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006185 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006186sed 's/^/| /' conftest.$ac_ext >&5
6187
Martin v. Löwiseba40652007-08-30 20:10:57 +00006188 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006189fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006190
6191rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006192 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006193
6194fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006195{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6196echo "${ECHO_T}$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006197
6198if test $ac_cv_header_sys_types_h_makedev = no; then
6199if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006200 { echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6201echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006202if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006203 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006204fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006205{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6206echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006207else
6208 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006209{ echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6210echo $ECHO_N "checking sys/mkdev.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006211cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006212/* confdefs.h. */
6213_ACEOF
6214cat confdefs.h >>conftest.$ac_ext
6215cat >>conftest.$ac_ext <<_ACEOF
6216/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006217$ac_includes_default
6218#include <sys/mkdev.h>
6219_ACEOF
6220rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006221if { (ac_try="$ac_compile"
6222case "(($ac_try" in
6223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6224 *) ac_try_echo=$ac_try;;
6225esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006229 grep -v '^ *+' conftest.er1 >conftest.err
6230 rm -f conftest.er1
6231 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006233 (exit $ac_status); } && {
6234 test -z "$ac_c_werror_flag" ||
6235 test ! -s conftest.err
6236 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006237 ac_header_compiler=yes
6238else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006239 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006240sed 's/^/| /' conftest.$ac_ext >&5
6241
Martin v. Löwiseba40652007-08-30 20:10:57 +00006242 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006244
6245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006246{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6247echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006248
6249# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006250{ echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6251echo $ECHO_N "checking sys/mkdev.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006253/* confdefs.h. */
6254_ACEOF
6255cat confdefs.h >>conftest.$ac_ext
6256cat >>conftest.$ac_ext <<_ACEOF
6257/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006258#include <sys/mkdev.h>
6259_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006260if { (ac_try="$ac_cpp conftest.$ac_ext"
6261case "(($ac_try" in
6262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6263 *) ac_try_echo=$ac_try;;
6264esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006265eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006266 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006267 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006268 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006269 rm -f conftest.er1
6270 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006271 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006272 (exit $ac_status); } >/dev/null && {
6273 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6274 test ! -s conftest.err
6275 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006276 ac_header_preproc=yes
6277else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006279sed 's/^/| /' conftest.$ac_ext >&5
6280
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006281 ac_header_preproc=no
6282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006283
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006284rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006285{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6286echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006287
6288# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006289case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6290 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006291 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6292echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6293 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6294echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006295 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006296 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006297 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006298 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6299echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6300 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6301echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6302 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6303echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6304 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6305echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6306 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6307echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6308 { echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6309echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006310 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006311## -------------------------------------- ##
6312## Report this to http://bugs.python.org/ ##
6313## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006314_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006315 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006316 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006317esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006318{ echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6319echo $ECHO_N "checking for sys/mkdev.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006320if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006321 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006322else
6323 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6324fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006325{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6326echo "${ECHO_T}$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006327
6328fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006329if test $ac_cv_header_sys_mkdev_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006330
6331cat >>confdefs.h <<\_ACEOF
6332#define MAJOR_IN_MKDEV 1
6333_ACEOF
6334
6335fi
6336
6337
6338
6339 if test $ac_cv_header_sys_mkdev_h = no; then
6340 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006341 { echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6342echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006343if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006344 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006345fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006346{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6347echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006348else
6349 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006350{ echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6351echo $ECHO_N "checking sys/sysmacros.h usability... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006352cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006353/* confdefs.h. */
6354_ACEOF
6355cat confdefs.h >>conftest.$ac_ext
6356cat >>conftest.$ac_ext <<_ACEOF
6357/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006358$ac_includes_default
6359#include <sys/sysmacros.h>
6360_ACEOF
6361rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006362if { (ac_try="$ac_compile"
6363case "(($ac_try" in
6364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6365 *) ac_try_echo=$ac_try;;
6366esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006368 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006369 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006370 grep -v '^ *+' conftest.er1 >conftest.err
6371 rm -f conftest.er1
6372 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006374 (exit $ac_status); } && {
6375 test -z "$ac_c_werror_flag" ||
6376 test ! -s conftest.err
6377 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006378 ac_header_compiler=yes
6379else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006380 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006381sed 's/^/| /' conftest.$ac_ext >&5
6382
Martin v. Löwiseba40652007-08-30 20:10:57 +00006383 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006385
6386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006387{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6388echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006389
6390# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006391{ echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6392echo $ECHO_N "checking sys/sysmacros.h presence... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006393cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006394/* confdefs.h. */
6395_ACEOF
6396cat confdefs.h >>conftest.$ac_ext
6397cat >>conftest.$ac_ext <<_ACEOF
6398/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006399#include <sys/sysmacros.h>
6400_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006401if { (ac_try="$ac_cpp conftest.$ac_ext"
6402case "(($ac_try" in
6403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6404 *) ac_try_echo=$ac_try;;
6405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006407 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006408 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006409 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006410 rm -f conftest.er1
6411 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006413 (exit $ac_status); } >/dev/null && {
6414 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6415 test ! -s conftest.err
6416 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006417 ac_header_preproc=yes
6418else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006420sed 's/^/| /' conftest.$ac_ext >&5
6421
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006422 ac_header_preproc=no
6423fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006424
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006425rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006426{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6427echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006428
6429# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006430case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6431 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006432 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6433echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6434 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6435echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006436 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006437 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006438 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006439 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6440echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6441 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6442echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6443 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6444echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6445 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6446echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6447 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6448echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6449 { echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6450echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006451 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +00006452## -------------------------------------- ##
6453## Report this to http://bugs.python.org/ ##
6454## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006455_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006456 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006457 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006458esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006459{ echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6460echo $ECHO_N "checking for sys/sysmacros.h... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006461if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006462 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006463else
6464 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6465fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006466{ echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6467echo "${ECHO_T}$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006468
6469fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006470if test $ac_cv_header_sys_sysmacros_h = yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006471
6472cat >>confdefs.h <<\_ACEOF
6473#define MAJOR_IN_SYSMACROS 1
6474_ACEOF
6475
6476fi
6477
6478
6479 fi
6480fi
6481
Michael W. Hudson54241132001-12-07 15:38:26 +00006482
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006483# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006484
6485for ac_header in term.h
6486do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006487as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6488{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6489echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006490if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006491 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006492else
6493 cat >conftest.$ac_ext <<_ACEOF
6494/* confdefs.h. */
6495_ACEOF
6496cat confdefs.h >>conftest.$ac_ext
6497cat >>conftest.$ac_ext <<_ACEOF
6498/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006499
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006500#ifdef HAVE_CURSES_H
6501#include <curses.h>
6502#endif
6503
6504
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006505#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006506_ACEOF
6507rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006508if { (ac_try="$ac_compile"
6509case "(($ac_try" in
6510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6511 *) ac_try_echo=$ac_try;;
6512esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006514 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006515 ac_status=$?
6516 grep -v '^ *+' conftest.er1 >conftest.err
6517 rm -f conftest.er1
6518 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006519 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006520 (exit $ac_status); } && {
6521 test -z "$ac_c_werror_flag" ||
6522 test ! -s conftest.err
6523 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006524 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006525else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006526 echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006527sed 's/^/| /' conftest.$ac_ext >&5
6528
Martin v. Löwiseba40652007-08-30 20:10:57 +00006529 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006531
6532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006533fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006534ac_res=`eval echo '${'$as_ac_Header'}'`
6535 { echo "$as_me:$LINENO: result: $ac_res" >&5
6536echo "${ECHO_T}$ac_res" >&6; }
6537if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006538 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006539#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006540_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006541
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006542fi
6543
6544done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006545
6546
Martin v. Löwis11017b12006-01-14 18:12:57 +00006547# On Linux, netlink.h requires asm/types.h
6548
6549for ac_header in linux/netlink.h
6550do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006551as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6552{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6553echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006554if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006555 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006556else
6557 cat >conftest.$ac_ext <<_ACEOF
6558/* confdefs.h. */
6559_ACEOF
6560cat confdefs.h >>conftest.$ac_ext
6561cat >>conftest.$ac_ext <<_ACEOF
6562/* end confdefs.h. */
6563
6564#ifdef HAVE_ASM_TYPES_H
6565#include <asm/types.h>
6566#endif
6567#ifdef HAVE_SYS_SOCKET_H
6568#include <sys/socket.h>
6569#endif
6570
6571
6572#include <$ac_header>
6573_ACEOF
6574rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006575if { (ac_try="$ac_compile"
6576case "(($ac_try" in
6577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6578 *) ac_try_echo=$ac_try;;
6579esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006580eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006582 ac_status=$?
6583 grep -v '^ *+' conftest.er1 >conftest.err
6584 rm -f conftest.er1
6585 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006587 (exit $ac_status); } && {
6588 test -z "$ac_c_werror_flag" ||
6589 test ! -s conftest.err
6590 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006591 eval "$as_ac_Header=yes"
6592else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006593 echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006594sed 's/^/| /' conftest.$ac_ext >&5
6595
Martin v. Löwiseba40652007-08-30 20:10:57 +00006596 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006597fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006598
6599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006600fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006601ac_res=`eval echo '${'$as_ac_Header'}'`
6602 { echo "$as_me:$LINENO: result: $ac_res" >&5
6603echo "${ECHO_T}$ac_res" >&6; }
6604if test `eval echo '${'$as_ac_Header'}'` = yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006605 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006606#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006607_ACEOF
6608
6609fi
6610
6611done
6612
6613
Guido van Rossum627b2d71993-12-24 10:39:16 +00006614# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006615was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006616{ echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6617echo $ECHO_N "checking for clock_t in time.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006618cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006619/* confdefs.h. */
6620_ACEOF
6621cat confdefs.h >>conftest.$ac_ext
6622cat >>conftest.$ac_ext <<_ACEOF
6623/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006624#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006625
6626_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006627if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006628 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006629 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006630else
Martin v. Löwis11437992002-04-12 09:54:03 +00006631
6632
6633cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006634#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006635_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006636
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006637
Guido van Rossum627b2d71993-12-24 10:39:16 +00006638fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00006639rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00006640
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006641{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
6642echo "${ECHO_T}$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006643
Neal Norwitz11690112002-07-30 01:08:28 +00006644# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006645{ echo "$as_me:$LINENO: checking for makedev" >&5
6646echo $ECHO_N "checking for makedev... $ECHO_C" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006647cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006648/* confdefs.h. */
6649_ACEOF
6650cat confdefs.h >>conftest.$ac_ext
6651cat >>conftest.$ac_ext <<_ACEOF
6652/* end confdefs.h. */
Jesus Cea616de772010-04-28 10:32:30 +00006653
6654#if defined(MAJOR_IN_MKDEV)
6655#include <sys/mkdev.h>
6656#elif defined(MAJOR_IN_SYSMACROS)
6657#include <sys/sysmacros.h>
6658#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006659#include <sys/types.h>
Jesus Cea616de772010-04-28 10:32:30 +00006660#endif
Neal Norwitz11690112002-07-30 01:08:28 +00006661int
6662main ()
6663{
6664 makedev(0, 0)
6665 ;
6666 return 0;
6667}
6668_ACEOF
6669rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006670if { (ac_try="$ac_link"
6671case "(($ac_try" in
6672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6673 *) ac_try_echo=$ac_try;;
6674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006678 grep -v '^ *+' conftest.er1 >conftest.err
6679 rm -f conftest.er1
6680 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006682 (exit $ac_status); } && {
6683 test -z "$ac_c_werror_flag" ||
6684 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006685 } && test -s conftest$ac_exeext &&
6686 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006687 ac_cv_has_makedev=yes
6688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006690sed 's/^/| /' conftest.$ac_ext >&5
6691
Martin v. Löwiseba40652007-08-30 20:10:57 +00006692 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006694
6695rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006696 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006697if test "$ac_cv_has_makedev" = "no"; then
6698 # we didn't link, try if _OSF_SOURCE will allow us to link
6699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006700/* confdefs.h. */
6701_ACEOF
6702cat confdefs.h >>conftest.$ac_ext
6703cat >>conftest.$ac_ext <<_ACEOF
6704/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00006705
Neal Norwitz6eb37f02003-02-23 23:28:15 +00006706#define _OSF_SOURCE 1
6707#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00006708
Neal Norwitz11690112002-07-30 01:08:28 +00006709int
6710main ()
6711{
6712 makedev(0, 0)
6713 ;
6714 return 0;
6715}
6716_ACEOF
6717rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006718if { (ac_try="$ac_link"
6719case "(($ac_try" in
6720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6721 *) ac_try_echo=$ac_try;;
6722esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006723eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006724 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00006725 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006726 grep -v '^ *+' conftest.er1 >conftest.err
6727 rm -f conftest.er1
6728 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006730 (exit $ac_status); } && {
6731 test -z "$ac_c_werror_flag" ||
6732 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006733 } && test -s conftest$ac_exeext &&
6734 $as_test_x conftest$ac_exeext; then
Neal Norwitz11690112002-07-30 01:08:28 +00006735 ac_cv_has_makedev=yes
6736else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006737 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006738sed 's/^/| /' conftest.$ac_ext >&5
6739
Martin v. Löwiseba40652007-08-30 20:10:57 +00006740 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00006741fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006742
6743rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006744 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00006745 if test "$ac_cv_has_makedev" = "yes"; then
6746
6747cat >>confdefs.h <<\_ACEOF
6748#define _OSF_SOURCE 1
6749_ACEOF
6750
6751 fi
6752fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006753{ echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
6754echo "${ECHO_T}$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006755if test "$ac_cv_has_makedev" = "yes"; then
6756
6757cat >>confdefs.h <<\_ACEOF
6758#define HAVE_MAKEDEV 1
6759_ACEOF
6760
6761fi
6762
Martin v. Löwis399a6892002-10-04 10:22:02 +00006763# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
6764# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
6765# defined, but the compiler does not support pragma redefine_extname,
6766# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
6767# structures (such as rlimit64) without declaring them. As a
6768# work-around, disable LFS on such configurations
6769
6770use_lfs=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006771{ echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
6772echo $ECHO_N "checking Solaris LFS bug... $ECHO_C" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006773cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006774/* confdefs.h. */
6775_ACEOF
6776cat confdefs.h >>conftest.$ac_ext
6777cat >>conftest.$ac_ext <<_ACEOF
6778/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00006779
6780#define _LARGEFILE_SOURCE 1
6781#define _FILE_OFFSET_BITS 64
6782#include <sys/resource.h>
6783
Martin v. Löwis399a6892002-10-04 10:22:02 +00006784int
6785main ()
6786{
6787struct rlimit foo;
6788 ;
6789 return 0;
6790}
6791_ACEOF
6792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006793if { (ac_try="$ac_compile"
6794case "(($ac_try" in
6795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6796 *) ac_try_echo=$ac_try;;
6797esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006798eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00006800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006801 grep -v '^ *+' conftest.er1 >conftest.err
6802 rm -f conftest.er1
6803 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006804 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006805 (exit $ac_status); } && {
6806 test -z "$ac_c_werror_flag" ||
6807 test ! -s conftest.err
6808 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00006809 sol_lfs_bug=no
6810else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006811 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006812sed 's/^/| /' conftest.$ac_ext >&5
6813
Martin v. Löwiseba40652007-08-30 20:10:57 +00006814 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00006815fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006816
6817rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006818{ echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
6819echo "${ECHO_T}$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00006820if test "$sol_lfs_bug" = "yes"; then
6821 use_lfs=no
6822fi
6823
6824if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00006825# Two defines needed to enable largefile support on various platforms
6826# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00006827
Martin v. Löwis11437992002-04-12 09:54:03 +00006828cat >>confdefs.h <<\_ACEOF
6829#define _LARGEFILE_SOURCE 1
6830_ACEOF
6831
6832
6833cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006834#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00006835_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00006836
Martin v. Löwis399a6892002-10-04 10:22:02 +00006837fi
Michael W. Hudson54241132001-12-07 15:38:26 +00006838
Guido van Rossum84e7b241996-08-19 21:59:00 +00006839# Add some code to confdefs.h so that the test for off_t works on SCO
6840cat >> confdefs.h <<\EOF
6841#if defined(SCO_DS)
6842#undef _OFF_T
6843#endif
6844EOF
6845
Guido van Rossumef2255b2000-03-10 22:30:29 +00006846# Type availability checks
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006847{ echo "$as_me:$LINENO: checking for mode_t" >&5
6848echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006849if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006850 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006851else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006852 cat >conftest.$ac_ext <<_ACEOF
6853/* confdefs.h. */
6854_ACEOF
6855cat confdefs.h >>conftest.$ac_ext
6856cat >>conftest.$ac_ext <<_ACEOF
6857/* end confdefs.h. */
6858$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006859typedef mode_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006860int
6861main ()
6862{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006863if ((ac__type_new_ *) 0)
6864 return 0;
6865if (sizeof (ac__type_new_))
6866 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006867 ;
6868 return 0;
6869}
6870_ACEOF
6871rm -f conftest.$ac_objext
6872if { (ac_try="$ac_compile"
6873case "(($ac_try" in
6874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6875 *) ac_try_echo=$ac_try;;
6876esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006877eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006878 (eval "$ac_compile") 2>conftest.er1
6879 ac_status=$?
6880 grep -v '^ *+' conftest.er1 >conftest.err
6881 rm -f conftest.er1
6882 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006883 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006884 (exit $ac_status); } && {
6885 test -z "$ac_c_werror_flag" ||
6886 test ! -s conftest.err
6887 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006888 ac_cv_type_mode_t=yes
Jack Jansendd19cf82001-12-06 22:36:17 +00006889else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006890 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006891sed 's/^/| /' conftest.$ac_ext >&5
6892
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006893 ac_cv_type_mode_t=no
Jack Jansendd19cf82001-12-06 22:36:17 +00006894fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006895
6896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006897fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006898{ echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
6899echo "${ECHO_T}$ac_cv_type_mode_t" >&6; }
6900if test $ac_cv_type_mode_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006901 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006902else
Martin v. Löwis11437992002-04-12 09:54:03 +00006903
6904cat >>confdefs.h <<_ACEOF
6905#define mode_t int
6906_ACEOF
6907
6908fi
6909
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006910{ echo "$as_me:$LINENO: checking for off_t" >&5
6911echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006912if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006913 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006914else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006915 cat >conftest.$ac_ext <<_ACEOF
6916/* confdefs.h. */
6917_ACEOF
6918cat confdefs.h >>conftest.$ac_ext
6919cat >>conftest.$ac_ext <<_ACEOF
6920/* end confdefs.h. */
6921$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006922typedef off_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006923int
6924main ()
6925{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006926if ((ac__type_new_ *) 0)
6927 return 0;
6928if (sizeof (ac__type_new_))
6929 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006930 ;
6931 return 0;
6932}
6933_ACEOF
6934rm -f conftest.$ac_objext
6935if { (ac_try="$ac_compile"
6936case "(($ac_try" in
6937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6938 *) ac_try_echo=$ac_try;;
6939esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006941 (eval "$ac_compile") 2>conftest.er1
6942 ac_status=$?
6943 grep -v '^ *+' conftest.er1 >conftest.err
6944 rm -f conftest.er1
6945 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006947 (exit $ac_status); } && {
6948 test -z "$ac_c_werror_flag" ||
6949 test ! -s conftest.err
6950 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006951 ac_cv_type_off_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006952else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006953 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006954sed 's/^/| /' conftest.$ac_ext >&5
6955
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006956 ac_cv_type_off_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006957fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006958
6959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006960fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006961{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
6962echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
6963if test $ac_cv_type_off_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006964 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006965else
Martin v. Löwis11437992002-04-12 09:54:03 +00006966
6967cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006968#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00006969_ACEOF
6970
6971fi
6972
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006973{ echo "$as_me:$LINENO: checking for pid_t" >&5
6974echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006975if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006976 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006977else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006978 cat >conftest.$ac_ext <<_ACEOF
6979/* confdefs.h. */
6980_ACEOF
6981cat confdefs.h >>conftest.$ac_ext
6982cat >>conftest.$ac_ext <<_ACEOF
6983/* end confdefs.h. */
6984$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006985typedef pid_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006986int
6987main ()
6988{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00006989if ((ac__type_new_ *) 0)
6990 return 0;
6991if (sizeof (ac__type_new_))
6992 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00006993 ;
6994 return 0;
6995}
6996_ACEOF
6997rm -f conftest.$ac_objext
6998if { (ac_try="$ac_compile"
6999case "(($ac_try" in
7000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7001 *) ac_try_echo=$ac_try;;
7002esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007003eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007004 (eval "$ac_compile") 2>conftest.er1
7005 ac_status=$?
7006 grep -v '^ *+' conftest.er1 >conftest.err
7007 rm -f conftest.er1
7008 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007009 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007010 (exit $ac_status); } && {
7011 test -z "$ac_c_werror_flag" ||
7012 test ! -s conftest.err
7013 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007014 ac_cv_type_pid_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007015else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007016 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007017sed 's/^/| /' conftest.$ac_ext >&5
7018
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007019 ac_cv_type_pid_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007020fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007021
7022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007023fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007024{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7025echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
7026if test $ac_cv_type_pid_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007027 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007028else
Martin v. Löwis11437992002-04-12 09:54:03 +00007029
7030cat >>confdefs.h <<_ACEOF
7031#define pid_t int
7032_ACEOF
7033
7034fi
7035
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007036{ echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7037echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007038if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007039 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007040else
7041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007042/* confdefs.h. */
7043_ACEOF
7044cat confdefs.h >>conftest.$ac_ext
7045cat >>conftest.$ac_ext <<_ACEOF
7046/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007047#include <sys/types.h>
7048#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007049
Martin v. Löwis11437992002-04-12 09:54:03 +00007050int
7051main ()
7052{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007053return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007054 ;
7055 return 0;
7056}
7057_ACEOF
7058rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007059if { (ac_try="$ac_compile"
7060case "(($ac_try" in
7061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7062 *) ac_try_echo=$ac_try;;
7063esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007064eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007065 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007066 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007067 grep -v '^ *+' conftest.er1 >conftest.err
7068 rm -f conftest.er1
7069 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007070 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007071 (exit $ac_status); } && {
7072 test -z "$ac_c_werror_flag" ||
7073 test ! -s conftest.err
7074 } && test -s conftest.$ac_objext; then
7075 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007076else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007077 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007078sed 's/^/| /' conftest.$ac_ext >&5
7079
Martin v. Löwiseba40652007-08-30 20:10:57 +00007080 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007081fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007082
7083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007084fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007085{ echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7086echo "${ECHO_T}$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007087
Martin v. Löwis11437992002-04-12 09:54:03 +00007088cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007089#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007090_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007091
Michael W. Hudson54241132001-12-07 15:38:26 +00007092
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007093{ echo "$as_me:$LINENO: checking for size_t" >&5
7094echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007095if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007096 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007097else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007098 cat >conftest.$ac_ext <<_ACEOF
7099/* confdefs.h. */
7100_ACEOF
7101cat confdefs.h >>conftest.$ac_ext
7102cat >>conftest.$ac_ext <<_ACEOF
7103/* end confdefs.h. */
7104$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007105typedef size_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007106int
7107main ()
7108{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007109if ((ac__type_new_ *) 0)
7110 return 0;
7111if (sizeof (ac__type_new_))
7112 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007113 ;
7114 return 0;
7115}
7116_ACEOF
7117rm -f conftest.$ac_objext
7118if { (ac_try="$ac_compile"
7119case "(($ac_try" in
7120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7121 *) ac_try_echo=$ac_try;;
7122esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007124 (eval "$ac_compile") 2>conftest.er1
7125 ac_status=$?
7126 grep -v '^ *+' conftest.er1 >conftest.err
7127 rm -f conftest.er1
7128 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007130 (exit $ac_status); } && {
7131 test -z "$ac_c_werror_flag" ||
7132 test ! -s conftest.err
7133 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007134 ac_cv_type_size_t=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007135else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007136 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007137sed 's/^/| /' conftest.$ac_ext >&5
7138
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007139 ac_cv_type_size_t=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00007140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007141
7142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007143fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007144{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7145echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
7146if test $ac_cv_type_size_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007147 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007148else
Martin v. Löwis11437992002-04-12 09:54:03 +00007149
7150cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007151#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007152_ACEOF
7153
7154fi
7155
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007156{ echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7157echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007158if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007159 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007160else
7161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007162/* confdefs.h. */
7163_ACEOF
7164cat confdefs.h >>conftest.$ac_ext
7165cat >>conftest.$ac_ext <<_ACEOF
7166/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007167#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007168
7169_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007170if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007171 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007172 ac_cv_type_uid_t=yes
7173else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007174 ac_cv_type_uid_t=no
7175fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +00007176rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007177
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007178fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007179{ echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7180echo "${ECHO_T}$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007181if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007182
Martin v. Löwis11437992002-04-12 09:54:03 +00007183cat >>confdefs.h <<\_ACEOF
7184#define uid_t int
7185_ACEOF
7186
7187
7188cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007189#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007190_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007191
7192fi
7193
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007194
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007195 { echo "$as_me:$LINENO: checking for uint32_t" >&5
7196echo $ECHO_N "checking for uint32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007197if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007198 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007199else
7200 ac_cv_c_uint32_t=no
7201 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7202 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7203 cat >conftest.$ac_ext <<_ACEOF
7204/* confdefs.h. */
7205_ACEOF
7206cat confdefs.h >>conftest.$ac_ext
7207cat >>conftest.$ac_ext <<_ACEOF
7208/* end confdefs.h. */
7209$ac_includes_default
7210int
7211main ()
7212{
7213static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7214test_array [0] = 0
7215
7216 ;
7217 return 0;
7218}
7219_ACEOF
7220rm -f conftest.$ac_objext
7221if { (ac_try="$ac_compile"
7222case "(($ac_try" in
7223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7224 *) ac_try_echo=$ac_try;;
7225esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007227 (eval "$ac_compile") 2>conftest.er1
7228 ac_status=$?
7229 grep -v '^ *+' conftest.er1 >conftest.err
7230 rm -f conftest.er1
7231 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007233 (exit $ac_status); } && {
7234 test -z "$ac_c_werror_flag" ||
7235 test ! -s conftest.err
7236 } && test -s conftest.$ac_objext; then
7237 case $ac_type in
7238 uint32_t) ac_cv_c_uint32_t=yes ;;
7239 *) ac_cv_c_uint32_t=$ac_type ;;
7240esac
7241
7242else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007243 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007244sed 's/^/| /' conftest.$ac_ext >&5
7245
7246
7247fi
7248
7249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7250 test "$ac_cv_c_uint32_t" != no && break
7251 done
7252fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007253{ echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7254echo "${ECHO_T}$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007255 case $ac_cv_c_uint32_t in #(
7256 no|yes) ;; #(
7257 *)
7258
7259cat >>confdefs.h <<\_ACEOF
7260#define _UINT32_T 1
7261_ACEOF
7262
7263
7264cat >>confdefs.h <<_ACEOF
7265#define uint32_t $ac_cv_c_uint32_t
7266_ACEOF
7267;;
7268 esac
7269
7270
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007271 { echo "$as_me:$LINENO: checking for uint64_t" >&5
7272echo $ECHO_N "checking for uint64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007273if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007274 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007275else
7276 ac_cv_c_uint64_t=no
7277 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7278 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7279 cat >conftest.$ac_ext <<_ACEOF
7280/* confdefs.h. */
7281_ACEOF
7282cat confdefs.h >>conftest.$ac_ext
7283cat >>conftest.$ac_ext <<_ACEOF
7284/* end confdefs.h. */
7285$ac_includes_default
7286int
7287main ()
7288{
7289static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7290test_array [0] = 0
7291
7292 ;
7293 return 0;
7294}
7295_ACEOF
7296rm -f conftest.$ac_objext
7297if { (ac_try="$ac_compile"
7298case "(($ac_try" in
7299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7300 *) ac_try_echo=$ac_try;;
7301esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007302eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007303 (eval "$ac_compile") 2>conftest.er1
7304 ac_status=$?
7305 grep -v '^ *+' conftest.er1 >conftest.err
7306 rm -f conftest.er1
7307 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007308 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007309 (exit $ac_status); } && {
7310 test -z "$ac_c_werror_flag" ||
7311 test ! -s conftest.err
7312 } && test -s conftest.$ac_objext; then
7313 case $ac_type in
7314 uint64_t) ac_cv_c_uint64_t=yes ;;
7315 *) ac_cv_c_uint64_t=$ac_type ;;
7316esac
7317
7318else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007319 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007320sed 's/^/| /' conftest.$ac_ext >&5
7321
7322
7323fi
7324
7325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7326 test "$ac_cv_c_uint64_t" != no && break
7327 done
7328fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007329{ echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7330echo "${ECHO_T}$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007331 case $ac_cv_c_uint64_t in #(
7332 no|yes) ;; #(
7333 *)
7334
7335cat >>confdefs.h <<\_ACEOF
7336#define _UINT64_T 1
7337_ACEOF
7338
7339
7340cat >>confdefs.h <<_ACEOF
7341#define uint64_t $ac_cv_c_uint64_t
7342_ACEOF
7343;;
7344 esac
7345
7346
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007347 { echo "$as_me:$LINENO: checking for int32_t" >&5
7348echo $ECHO_N "checking for int32_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007349if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007350 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007351else
7352 ac_cv_c_int32_t=no
7353 for ac_type in 'int32_t' 'int' 'long int' \
7354 'long long int' 'short int' 'signed char'; do
7355 cat >conftest.$ac_ext <<_ACEOF
7356/* confdefs.h. */
7357_ACEOF
7358cat confdefs.h >>conftest.$ac_ext
7359cat >>conftest.$ac_ext <<_ACEOF
7360/* end confdefs.h. */
7361$ac_includes_default
7362int
7363main ()
7364{
7365static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7366test_array [0] = 0
7367
7368 ;
7369 return 0;
7370}
7371_ACEOF
7372rm -f conftest.$ac_objext
7373if { (ac_try="$ac_compile"
7374case "(($ac_try" in
7375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7376 *) ac_try_echo=$ac_try;;
7377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007379 (eval "$ac_compile") 2>conftest.er1
7380 ac_status=$?
7381 grep -v '^ *+' conftest.er1 >conftest.err
7382 rm -f conftest.er1
7383 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007385 (exit $ac_status); } && {
7386 test -z "$ac_c_werror_flag" ||
7387 test ! -s conftest.err
7388 } && test -s conftest.$ac_objext; then
7389 cat >conftest.$ac_ext <<_ACEOF
7390/* confdefs.h. */
7391_ACEOF
7392cat confdefs.h >>conftest.$ac_ext
7393cat >>conftest.$ac_ext <<_ACEOF
7394/* end confdefs.h. */
7395$ac_includes_default
7396int
7397main ()
7398{
7399static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007400 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007401test_array [0] = 0
7402
7403 ;
7404 return 0;
7405}
7406_ACEOF
7407rm -f conftest.$ac_objext
7408if { (ac_try="$ac_compile"
7409case "(($ac_try" in
7410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7411 *) ac_try_echo=$ac_try;;
7412esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007413eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007414 (eval "$ac_compile") 2>conftest.er1
7415 ac_status=$?
7416 grep -v '^ *+' conftest.er1 >conftest.err
7417 rm -f conftest.er1
7418 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007419 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007420 (exit $ac_status); } && {
7421 test -z "$ac_c_werror_flag" ||
7422 test ! -s conftest.err
7423 } && test -s conftest.$ac_objext; then
7424 :
7425else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007426 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007427sed 's/^/| /' conftest.$ac_ext >&5
7428
7429 case $ac_type in
7430 int32_t) ac_cv_c_int32_t=yes ;;
7431 *) ac_cv_c_int32_t=$ac_type ;;
7432esac
7433
7434fi
7435
7436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7437else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007438 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007439sed 's/^/| /' conftest.$ac_ext >&5
7440
7441
7442fi
7443
7444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7445 test "$ac_cv_c_int32_t" != no && break
7446 done
7447fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007448{ echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
7449echo "${ECHO_T}$ac_cv_c_int32_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007450 case $ac_cv_c_int32_t in #(
7451 no|yes) ;; #(
7452 *)
7453
7454cat >>confdefs.h <<_ACEOF
7455#define int32_t $ac_cv_c_int32_t
7456_ACEOF
7457;;
7458 esac
7459
7460
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007461 { echo "$as_me:$LINENO: checking for int64_t" >&5
7462echo $ECHO_N "checking for int64_t... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007463if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007464 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007465else
7466 ac_cv_c_int64_t=no
7467 for ac_type in 'int64_t' 'int' 'long int' \
7468 'long long int' 'short int' 'signed char'; do
7469 cat >conftest.$ac_ext <<_ACEOF
7470/* confdefs.h. */
7471_ACEOF
7472cat confdefs.h >>conftest.$ac_ext
7473cat >>conftest.$ac_ext <<_ACEOF
7474/* end confdefs.h. */
7475$ac_includes_default
7476int
7477main ()
7478{
7479static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
7480test_array [0] = 0
7481
7482 ;
7483 return 0;
7484}
7485_ACEOF
7486rm -f conftest.$ac_objext
7487if { (ac_try="$ac_compile"
7488case "(($ac_try" in
7489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7490 *) ac_try_echo=$ac_try;;
7491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007493 (eval "$ac_compile") 2>conftest.er1
7494 ac_status=$?
7495 grep -v '^ *+' conftest.er1 >conftest.err
7496 rm -f conftest.er1
7497 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007498 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007499 (exit $ac_status); } && {
7500 test -z "$ac_c_werror_flag" ||
7501 test ! -s conftest.err
7502 } && test -s conftest.$ac_objext; then
7503 cat >conftest.$ac_ext <<_ACEOF
7504/* confdefs.h. */
7505_ACEOF
7506cat confdefs.h >>conftest.$ac_ext
7507cat >>conftest.$ac_ext <<_ACEOF
7508/* end confdefs.h. */
7509$ac_includes_default
7510int
7511main ()
7512{
7513static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007514 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007515test_array [0] = 0
7516
7517 ;
7518 return 0;
7519}
7520_ACEOF
7521rm -f conftest.$ac_objext
7522if { (ac_try="$ac_compile"
7523case "(($ac_try" in
7524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7525 *) ac_try_echo=$ac_try;;
7526esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007528 (eval "$ac_compile") 2>conftest.er1
7529 ac_status=$?
7530 grep -v '^ *+' conftest.er1 >conftest.err
7531 rm -f conftest.er1
7532 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007534 (exit $ac_status); } && {
7535 test -z "$ac_c_werror_flag" ||
7536 test ! -s conftest.err
7537 } && test -s conftest.$ac_objext; then
7538 :
7539else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007540 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007541sed 's/^/| /' conftest.$ac_ext >&5
7542
7543 case $ac_type in
7544 int64_t) ac_cv_c_int64_t=yes ;;
7545 *) ac_cv_c_int64_t=$ac_type ;;
7546esac
7547
7548fi
7549
7550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7551else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007552 echo "$as_me: failed program was:" >&5
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007553sed 's/^/| /' conftest.$ac_ext >&5
7554
7555
7556fi
7557
7558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7559 test "$ac_cv_c_int64_t" != no && break
7560 done
7561fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007562{ echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
7563echo "${ECHO_T}$ac_cv_c_int64_t" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +00007564 case $ac_cv_c_int64_t in #(
7565 no|yes) ;; #(
7566 *)
7567
7568cat >>confdefs.h <<_ACEOF
7569#define int64_t $ac_cv_c_int64_t
7570_ACEOF
7571;;
7572 esac
7573
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007574{ echo "$as_me:$LINENO: checking for ssize_t" >&5
7575echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007576if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007577 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007578else
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007579 cat >conftest.$ac_ext <<_ACEOF
7580/* confdefs.h. */
7581_ACEOF
7582cat confdefs.h >>conftest.$ac_ext
7583cat >>conftest.$ac_ext <<_ACEOF
7584/* end confdefs.h. */
7585$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007586typedef ssize_t ac__type_new_;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007587int
7588main ()
7589{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007590if ((ac__type_new_ *) 0)
7591 return 0;
7592if (sizeof (ac__type_new_))
7593 return 0;
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007594 ;
7595 return 0;
7596}
7597_ACEOF
7598rm -f conftest.$ac_objext
7599if { (ac_try="$ac_compile"
7600case "(($ac_try" in
7601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7602 *) ac_try_echo=$ac_try;;
7603esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007604eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007605 (eval "$ac_compile") 2>conftest.er1
7606 ac_status=$?
7607 grep -v '^ *+' conftest.er1 >conftest.err
7608 rm -f conftest.er1
7609 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottia2db6872009-07-17 07:46:46 +00007611 (exit $ac_status); } && {
7612 test -z "$ac_c_werror_flag" ||
7613 test ! -s conftest.err
7614 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007615 ac_cv_type_ssize_t=yes
Martin v. Löwis18e16552006-02-15 17:27:45 +00007616else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007617 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007618sed 's/^/| /' conftest.$ac_ext >&5
7619
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007620 ac_cv_type_ssize_t=no
Martin v. Löwis18e16552006-02-15 17:27:45 +00007621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007622
7623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007624fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007625{ echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7626echo "${ECHO_T}$ac_cv_type_ssize_t" >&6; }
7627if test $ac_cv_type_ssize_t = yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007628
7629cat >>confdefs.h <<\_ACEOF
7630#define HAVE_SSIZE_T 1
7631_ACEOF
7632
7633fi
7634
Jack Jansendd19cf82001-12-06 22:36:17 +00007635
Michael W. Hudson54241132001-12-07 15:38:26 +00007636# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007637# ANSI C requires sizeof(char) == 1, so no need to check it
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007638{ echo "$as_me:$LINENO: checking for int" >&5
7639echo $ECHO_N "checking for int... $ECHO_C" >&6; }
7640if test "${ac_cv_type_int+set}" = set; then
7641 echo $ECHO_N "(cached) $ECHO_C" >&6
7642else
7643 cat >conftest.$ac_ext <<_ACEOF
7644/* confdefs.h. */
7645_ACEOF
7646cat confdefs.h >>conftest.$ac_ext
7647cat >>conftest.$ac_ext <<_ACEOF
7648/* end confdefs.h. */
7649$ac_includes_default
7650typedef int ac__type_new_;
7651int
7652main ()
7653{
7654if ((ac__type_new_ *) 0)
7655 return 0;
7656if (sizeof (ac__type_new_))
7657 return 0;
7658 ;
7659 return 0;
7660}
7661_ACEOF
7662rm -f conftest.$ac_objext
7663if { (ac_try="$ac_compile"
7664case "(($ac_try" in
7665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7666 *) ac_try_echo=$ac_try;;
7667esac
7668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7669 (eval "$ac_compile") 2>conftest.er1
7670 ac_status=$?
7671 grep -v '^ *+' conftest.er1 >conftest.err
7672 rm -f conftest.er1
7673 cat conftest.err >&5
7674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7675 (exit $ac_status); } && {
7676 test -z "$ac_c_werror_flag" ||
7677 test ! -s conftest.err
7678 } && test -s conftest.$ac_objext; then
7679 ac_cv_type_int=yes
7680else
7681 echo "$as_me: failed program was:" >&5
7682sed 's/^/| /' conftest.$ac_ext >&5
7683
7684 ac_cv_type_int=no
7685fi
7686
7687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7688fi
7689{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
7690echo "${ECHO_T}$ac_cv_type_int" >&6; }
7691
Martin v. Löwiseba40652007-08-30 20:10:57 +00007692# The cast to long int works around a bug in the HP C Compiler
7693# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7694# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7695# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007696{ echo "$as_me:$LINENO: checking size of int" >&5
7697echo $ECHO_N "checking size of int... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007698if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007699 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007700else
Martin v. Löwis11437992002-04-12 09:54:03 +00007701 if test "$cross_compiling" = yes; then
7702 # Depending upon the size, compute the lo and hi bounds.
7703cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007704/* confdefs.h. */
7705_ACEOF
7706cat confdefs.h >>conftest.$ac_ext
7707cat >>conftest.$ac_ext <<_ACEOF
7708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007709$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007710 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007711int
7712main ()
7713{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007714static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007715test_array [0] = 0
7716
7717 ;
7718 return 0;
7719}
7720_ACEOF
7721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007722if { (ac_try="$ac_compile"
7723case "(($ac_try" in
7724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7725 *) ac_try_echo=$ac_try;;
7726esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007727eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007728 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007729 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007730 grep -v '^ *+' conftest.er1 >conftest.err
7731 rm -f conftest.er1
7732 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007734 (exit $ac_status); } && {
7735 test -z "$ac_c_werror_flag" ||
7736 test ! -s conftest.err
7737 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007738 ac_lo=0 ac_mid=0
7739 while :; do
7740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007741/* confdefs.h. */
7742_ACEOF
7743cat confdefs.h >>conftest.$ac_ext
7744cat >>conftest.$ac_ext <<_ACEOF
7745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007746$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007747 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007748int
7749main ()
7750{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007751static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007752test_array [0] = 0
7753
7754 ;
7755 return 0;
7756}
7757_ACEOF
7758rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007759if { (ac_try="$ac_compile"
7760case "(($ac_try" in
7761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7762 *) ac_try_echo=$ac_try;;
7763esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007764eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007767 grep -v '^ *+' conftest.er1 >conftest.err
7768 rm -f conftest.er1
7769 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007770 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007771 (exit $ac_status); } && {
7772 test -z "$ac_c_werror_flag" ||
7773 test ! -s conftest.err
7774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007775 ac_hi=$ac_mid; break
7776else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007777 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007778sed 's/^/| /' conftest.$ac_ext >&5
7779
Martin v. Löwiseba40652007-08-30 20:10:57 +00007780 ac_lo=`expr $ac_mid + 1`
7781 if test $ac_lo -le $ac_mid; then
7782 ac_lo= ac_hi=
7783 break
7784 fi
7785 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007787
7788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007789 done
7790else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007791 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007792sed 's/^/| /' conftest.$ac_ext >&5
7793
Martin v. Löwiseba40652007-08-30 20:10:57 +00007794 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007795/* confdefs.h. */
7796_ACEOF
7797cat confdefs.h >>conftest.$ac_ext
7798cat >>conftest.$ac_ext <<_ACEOF
7799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007800$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007801 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007802int
7803main ()
7804{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007805static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007806test_array [0] = 0
7807
7808 ;
7809 return 0;
7810}
7811_ACEOF
7812rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007813if { (ac_try="$ac_compile"
7814case "(($ac_try" in
7815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7816 *) ac_try_echo=$ac_try;;
7817esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007821 grep -v '^ *+' conftest.er1 >conftest.err
7822 rm -f conftest.er1
7823 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007825 (exit $ac_status); } && {
7826 test -z "$ac_c_werror_flag" ||
7827 test ! -s conftest.err
7828 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007829 ac_hi=-1 ac_mid=-1
7830 while :; do
7831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007832/* confdefs.h. */
7833_ACEOF
7834cat confdefs.h >>conftest.$ac_ext
7835cat >>conftest.$ac_ext <<_ACEOF
7836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007837$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007838 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007839int
7840main ()
7841{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007842static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007843test_array [0] = 0
7844
7845 ;
7846 return 0;
7847}
7848_ACEOF
7849rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007850if { (ac_try="$ac_compile"
7851case "(($ac_try" in
7852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7853 *) ac_try_echo=$ac_try;;
7854esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007858 grep -v '^ *+' conftest.er1 >conftest.err
7859 rm -f conftest.er1
7860 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007862 (exit $ac_status); } && {
7863 test -z "$ac_c_werror_flag" ||
7864 test ! -s conftest.err
7865 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007866 ac_lo=$ac_mid; break
7867else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007869sed 's/^/| /' conftest.$ac_ext >&5
7870
Martin v. Löwiseba40652007-08-30 20:10:57 +00007871 ac_hi=`expr '(' $ac_mid ')' - 1`
7872 if test $ac_mid -le $ac_hi; then
7873 ac_lo= ac_hi=
7874 break
7875 fi
7876 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00007877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007878
7879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007880 done
7881else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007883sed 's/^/| /' conftest.$ac_ext >&5
7884
Martin v. Löwiseba40652007-08-30 20:10:57 +00007885 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00007886fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007887
7888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007890
7891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007892# Binary search between lo and hi bounds.
7893while test "x$ac_lo" != "x$ac_hi"; do
7894 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
7895 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007896/* confdefs.h. */
7897_ACEOF
7898cat confdefs.h >>conftest.$ac_ext
7899cat >>conftest.$ac_ext <<_ACEOF
7900/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007901$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007902 typedef int ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00007903int
7904main ()
7905{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007906static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007907test_array [0] = 0
7908
7909 ;
7910 return 0;
7911}
7912_ACEOF
7913rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007914if { (ac_try="$ac_compile"
7915case "(($ac_try" in
7916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7917 *) ac_try_echo=$ac_try;;
7918esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007919eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007920 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007921 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007922 grep -v '^ *+' conftest.er1 >conftest.err
7923 rm -f conftest.er1
7924 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007925 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007926 (exit $ac_status); } && {
7927 test -z "$ac_c_werror_flag" ||
7928 test ! -s conftest.err
7929 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007930 ac_hi=$ac_mid
7931else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007932 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007933sed 's/^/| /' conftest.$ac_ext >&5
7934
Martin v. Löwiseba40652007-08-30 20:10:57 +00007935 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007936fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007937
7938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007939done
7940case $ac_lo in
7941?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00007942'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007943 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007944See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007945echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00007946See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007947 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007948 else
7949 ac_cv_sizeof_int=0
7950 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00007951esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007952else
Martin v. Löwis11437992002-04-12 09:54:03 +00007953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007954/* confdefs.h. */
7955_ACEOF
7956cat confdefs.h >>conftest.$ac_ext
7957cat >>conftest.$ac_ext <<_ACEOF
7958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007959$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007960 typedef int ac__type_sizeof_;
7961static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
7962static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00007963#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007964#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007965int
7966main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007967{
Martin v. Löwis11437992002-04-12 09:54:03 +00007968
7969 FILE *f = fopen ("conftest.val", "w");
7970 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00007971 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007972 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00007973 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007974 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007975 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007976 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007977 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007978 }
7979 else
7980 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00007981 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007982 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00007983 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007984 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00007985 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007987
7988 ;
7989 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00007990}
Martin v. Löwis11437992002-04-12 09:54:03 +00007991_ACEOF
7992rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007993if { (ac_try="$ac_link"
7994case "(($ac_try" in
7995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7996 *) ac_try_echo=$ac_try;;
7997esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00007998eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007999 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008000 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008001 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008002 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008003 { (case "(($ac_try" in
8004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8005 *) ac_try_echo=$ac_try;;
8006esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008008 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008009 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008011 (exit $ac_status); }; }; then
8012 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008013else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008014 echo "$as_me: program exited with status $ac_status" >&5
8015echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008016sed 's/^/| /' conftest.$ac_ext >&5
8017
Martin v. Löwis11437992002-04-12 09:54:03 +00008018( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008019if test "$ac_cv_type_int" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008020 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008021See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008022echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008023See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008024 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008025 else
8026 ac_cv_sizeof_int=0
8027 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008029rm -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 +00008030fi
8031rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008032fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008033{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8034echo "${ECHO_T}$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008035
8036
8037
Martin v. Löwis11437992002-04-12 09:54:03 +00008038cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008039#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008040_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008041
8042
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008043{ echo "$as_me:$LINENO: checking for long" >&5
8044echo $ECHO_N "checking for long... $ECHO_C" >&6; }
8045if test "${ac_cv_type_long+set}" = set; then
8046 echo $ECHO_N "(cached) $ECHO_C" >&6
8047else
8048 cat >conftest.$ac_ext <<_ACEOF
8049/* confdefs.h. */
8050_ACEOF
8051cat confdefs.h >>conftest.$ac_ext
8052cat >>conftest.$ac_ext <<_ACEOF
8053/* end confdefs.h. */
8054$ac_includes_default
8055typedef long ac__type_new_;
8056int
8057main ()
8058{
8059if ((ac__type_new_ *) 0)
8060 return 0;
8061if (sizeof (ac__type_new_))
8062 return 0;
8063 ;
8064 return 0;
8065}
8066_ACEOF
8067rm -f conftest.$ac_objext
8068if { (ac_try="$ac_compile"
8069case "(($ac_try" in
8070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8071 *) ac_try_echo=$ac_try;;
8072esac
8073eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8074 (eval "$ac_compile") 2>conftest.er1
8075 ac_status=$?
8076 grep -v '^ *+' conftest.er1 >conftest.err
8077 rm -f conftest.er1
8078 cat conftest.err >&5
8079 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8080 (exit $ac_status); } && {
8081 test -z "$ac_c_werror_flag" ||
8082 test ! -s conftest.err
8083 } && test -s conftest.$ac_objext; then
8084 ac_cv_type_long=yes
8085else
8086 echo "$as_me: failed program was:" >&5
8087sed 's/^/| /' conftest.$ac_ext >&5
8088
8089 ac_cv_type_long=no
8090fi
8091
8092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8093fi
8094{ echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5
8095echo "${ECHO_T}$ac_cv_type_long" >&6; }
8096
Martin v. Löwiseba40652007-08-30 20:10:57 +00008097# The cast to long int works around a bug in the HP C Compiler
8098# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8099# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8100# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008101{ echo "$as_me:$LINENO: checking size of long" >&5
8102echo $ECHO_N "checking size of long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008103if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008104 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008105else
Martin v. Löwis11437992002-04-12 09:54:03 +00008106 if test "$cross_compiling" = yes; then
8107 # Depending upon the size, compute the lo and hi bounds.
8108cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008109/* confdefs.h. */
8110_ACEOF
8111cat confdefs.h >>conftest.$ac_ext
8112cat >>conftest.$ac_ext <<_ACEOF
8113/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008114$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008115 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008116int
8117main ()
8118{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008119static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008120test_array [0] = 0
8121
8122 ;
8123 return 0;
8124}
8125_ACEOF
8126rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008127if { (ac_try="$ac_compile"
8128case "(($ac_try" in
8129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8130 *) ac_try_echo=$ac_try;;
8131esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008132eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008133 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008135 grep -v '^ *+' conftest.er1 >conftest.err
8136 rm -f conftest.er1
8137 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008138 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008139 (exit $ac_status); } && {
8140 test -z "$ac_c_werror_flag" ||
8141 test ! -s conftest.err
8142 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008143 ac_lo=0 ac_mid=0
8144 while :; do
8145 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008146/* confdefs.h. */
8147_ACEOF
8148cat confdefs.h >>conftest.$ac_ext
8149cat >>conftest.$ac_ext <<_ACEOF
8150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008151$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008152 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008153int
8154main ()
8155{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008156static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008157test_array [0] = 0
8158
8159 ;
8160 return 0;
8161}
8162_ACEOF
8163rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008164if { (ac_try="$ac_compile"
8165case "(($ac_try" in
8166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8167 *) ac_try_echo=$ac_try;;
8168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008170 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008172 grep -v '^ *+' conftest.er1 >conftest.err
8173 rm -f conftest.er1
8174 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008176 (exit $ac_status); } && {
8177 test -z "$ac_c_werror_flag" ||
8178 test ! -s conftest.err
8179 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008180 ac_hi=$ac_mid; break
8181else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008182 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008183sed 's/^/| /' conftest.$ac_ext >&5
8184
Martin v. Löwiseba40652007-08-30 20:10:57 +00008185 ac_lo=`expr $ac_mid + 1`
8186 if test $ac_lo -le $ac_mid; then
8187 ac_lo= ac_hi=
8188 break
8189 fi
8190 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008191fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008192
8193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008194 done
8195else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008197sed 's/^/| /' conftest.$ac_ext >&5
8198
Martin v. Löwiseba40652007-08-30 20:10:57 +00008199 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008200/* confdefs.h. */
8201_ACEOF
8202cat confdefs.h >>conftest.$ac_ext
8203cat >>conftest.$ac_ext <<_ACEOF
8204/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008205$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008206 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008207int
8208main ()
8209{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008210static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008211test_array [0] = 0
8212
8213 ;
8214 return 0;
8215}
8216_ACEOF
8217rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008218if { (ac_try="$ac_compile"
8219case "(($ac_try" in
8220 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8221 *) ac_try_echo=$ac_try;;
8222esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008223eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008224 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008226 grep -v '^ *+' conftest.er1 >conftest.err
8227 rm -f conftest.er1
8228 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008229 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008230 (exit $ac_status); } && {
8231 test -z "$ac_c_werror_flag" ||
8232 test ! -s conftest.err
8233 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008234 ac_hi=-1 ac_mid=-1
8235 while :; do
8236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008237/* confdefs.h. */
8238_ACEOF
8239cat confdefs.h >>conftest.$ac_ext
8240cat >>conftest.$ac_ext <<_ACEOF
8241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008242$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008243 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008244int
8245main ()
8246{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008247static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008248test_array [0] = 0
8249
8250 ;
8251 return 0;
8252}
8253_ACEOF
8254rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008255if { (ac_try="$ac_compile"
8256case "(($ac_try" in
8257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8258 *) ac_try_echo=$ac_try;;
8259esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008260eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008261 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008263 grep -v '^ *+' conftest.er1 >conftest.err
8264 rm -f conftest.er1
8265 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008266 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008267 (exit $ac_status); } && {
8268 test -z "$ac_c_werror_flag" ||
8269 test ! -s conftest.err
8270 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008271 ac_lo=$ac_mid; break
8272else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008273 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008274sed 's/^/| /' conftest.$ac_ext >&5
8275
Martin v. Löwiseba40652007-08-30 20:10:57 +00008276 ac_hi=`expr '(' $ac_mid ')' - 1`
8277 if test $ac_mid -le $ac_hi; then
8278 ac_lo= ac_hi=
8279 break
8280 fi
8281 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008283
8284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008285 done
8286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008287 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008288sed 's/^/| /' conftest.$ac_ext >&5
8289
Martin v. Löwiseba40652007-08-30 20:10:57 +00008290 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008291fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008292
8293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008295
8296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008297# Binary search between lo and hi bounds.
8298while test "x$ac_lo" != "x$ac_hi"; do
8299 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008301/* confdefs.h. */
8302_ACEOF
8303cat confdefs.h >>conftest.$ac_ext
8304cat >>conftest.$ac_ext <<_ACEOF
8305/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008306$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008307 typedef long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008308int
8309main ()
8310{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008311static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008312test_array [0] = 0
8313
8314 ;
8315 return 0;
8316}
8317_ACEOF
8318rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008319if { (ac_try="$ac_compile"
8320case "(($ac_try" in
8321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8322 *) ac_try_echo=$ac_try;;
8323esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008324eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008327 grep -v '^ *+' conftest.er1 >conftest.err
8328 rm -f conftest.er1
8329 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008330 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008331 (exit $ac_status); } && {
8332 test -z "$ac_c_werror_flag" ||
8333 test ! -s conftest.err
8334 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008335 ac_hi=$ac_mid
8336else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008337 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008338sed 's/^/| /' conftest.$ac_ext >&5
8339
Martin v. Löwiseba40652007-08-30 20:10:57 +00008340 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008341fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008342
8343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008344done
8345case $ac_lo in
8346?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008347'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008348 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008349See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008350echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008351See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008352 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008353 else
8354 ac_cv_sizeof_long=0
8355 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008356esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008357else
Martin v. Löwis11437992002-04-12 09:54:03 +00008358 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008359/* confdefs.h. */
8360_ACEOF
8361cat confdefs.h >>conftest.$ac_ext
8362cat >>conftest.$ac_ext <<_ACEOF
8363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008364$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008365 typedef long ac__type_sizeof_;
8366static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8367static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008368#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008369#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008370int
8371main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008372{
Martin v. Löwis11437992002-04-12 09:54:03 +00008373
8374 FILE *f = fopen ("conftest.val", "w");
8375 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008376 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008377 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008378 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008379 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008380 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008381 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008382 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008383 }
8384 else
8385 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008386 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008387 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008388 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008389 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008390 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008391 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008392
8393 ;
8394 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008395}
Martin v. Löwis11437992002-04-12 09:54:03 +00008396_ACEOF
8397rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008398if { (ac_try="$ac_link"
8399case "(($ac_try" in
8400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8401 *) ac_try_echo=$ac_try;;
8402esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008403eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008404 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008405 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008406 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008407 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008408 { (case "(($ac_try" in
8409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8410 *) ac_try_echo=$ac_try;;
8411esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008412eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008413 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008415 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008416 (exit $ac_status); }; }; then
8417 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008418else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008419 echo "$as_me: program exited with status $ac_status" >&5
8420echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008421sed 's/^/| /' conftest.$ac_ext >&5
8422
Martin v. Löwis11437992002-04-12 09:54:03 +00008423( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008424if test "$ac_cv_type_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008425 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008426See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008427echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008428See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008429 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008430 else
8431 ac_cv_sizeof_long=0
8432 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008434rm -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 +00008435fi
8436rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008437fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008438{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8439echo "${ECHO_T}$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008440
8441
8442
Martin v. Löwis11437992002-04-12 09:54:03 +00008443cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008444#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008445_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008446
8447
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008448{ echo "$as_me:$LINENO: checking for void *" >&5
8449echo $ECHO_N "checking for void *... $ECHO_C" >&6; }
8450if test "${ac_cv_type_void_p+set}" = set; then
8451 echo $ECHO_N "(cached) $ECHO_C" >&6
8452else
8453 cat >conftest.$ac_ext <<_ACEOF
8454/* confdefs.h. */
8455_ACEOF
8456cat confdefs.h >>conftest.$ac_ext
8457cat >>conftest.$ac_ext <<_ACEOF
8458/* end confdefs.h. */
8459$ac_includes_default
8460typedef void * ac__type_new_;
8461int
8462main ()
8463{
8464if ((ac__type_new_ *) 0)
8465 return 0;
8466if (sizeof (ac__type_new_))
8467 return 0;
8468 ;
8469 return 0;
8470}
8471_ACEOF
8472rm -f conftest.$ac_objext
8473if { (ac_try="$ac_compile"
8474case "(($ac_try" in
8475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8476 *) ac_try_echo=$ac_try;;
8477esac
8478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8479 (eval "$ac_compile") 2>conftest.er1
8480 ac_status=$?
8481 grep -v '^ *+' conftest.er1 >conftest.err
8482 rm -f conftest.er1
8483 cat conftest.err >&5
8484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8485 (exit $ac_status); } && {
8486 test -z "$ac_c_werror_flag" ||
8487 test ! -s conftest.err
8488 } && test -s conftest.$ac_objext; then
8489 ac_cv_type_void_p=yes
8490else
8491 echo "$as_me: failed program was:" >&5
8492sed 's/^/| /' conftest.$ac_ext >&5
8493
8494 ac_cv_type_void_p=no
8495fi
8496
8497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8498fi
8499{ echo "$as_me:$LINENO: result: $ac_cv_type_void_p" >&5
8500echo "${ECHO_T}$ac_cv_type_void_p" >&6; }
8501
Martin v. Löwiseba40652007-08-30 20:10:57 +00008502# The cast to long int works around a bug in the HP C Compiler
8503# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8504# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8505# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008506{ echo "$as_me:$LINENO: checking size of void *" >&5
8507echo $ECHO_N "checking size of void *... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008508if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008509 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008510else
Martin v. Löwis11437992002-04-12 09:54:03 +00008511 if test "$cross_compiling" = yes; then
8512 # Depending upon the size, compute the lo and hi bounds.
8513cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008514/* confdefs.h. */
8515_ACEOF
8516cat confdefs.h >>conftest.$ac_ext
8517cat >>conftest.$ac_ext <<_ACEOF
8518/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008519$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008520 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008521int
8522main ()
8523{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008524static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008525test_array [0] = 0
8526
8527 ;
8528 return 0;
8529}
8530_ACEOF
8531rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008532if { (ac_try="$ac_compile"
8533case "(($ac_try" in
8534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8535 *) ac_try_echo=$ac_try;;
8536esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008537eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008538 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008540 grep -v '^ *+' conftest.er1 >conftest.err
8541 rm -f conftest.er1
8542 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008543 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008544 (exit $ac_status); } && {
8545 test -z "$ac_c_werror_flag" ||
8546 test ! -s conftest.err
8547 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 ac_lo=0 ac_mid=0
8549 while :; do
8550 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008551/* confdefs.h. */
8552_ACEOF
8553cat confdefs.h >>conftest.$ac_ext
8554cat >>conftest.$ac_ext <<_ACEOF
8555/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008556$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008557 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008558int
8559main ()
8560{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008561static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008562test_array [0] = 0
8563
8564 ;
8565 return 0;
8566}
8567_ACEOF
8568rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008569if { (ac_try="$ac_compile"
8570case "(($ac_try" in
8571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8572 *) ac_try_echo=$ac_try;;
8573esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008575 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008577 grep -v '^ *+' conftest.er1 >conftest.err
8578 rm -f conftest.er1
8579 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008580 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008581 (exit $ac_status); } && {
8582 test -z "$ac_c_werror_flag" ||
8583 test ! -s conftest.err
8584 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008585 ac_hi=$ac_mid; break
8586else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008588sed 's/^/| /' conftest.$ac_ext >&5
8589
Martin v. Löwiseba40652007-08-30 20:10:57 +00008590 ac_lo=`expr $ac_mid + 1`
8591 if test $ac_lo -le $ac_mid; then
8592 ac_lo= ac_hi=
8593 break
8594 fi
8595 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008597
8598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008599 done
8600else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008601 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008602sed 's/^/| /' conftest.$ac_ext >&5
8603
Martin v. Löwiseba40652007-08-30 20:10:57 +00008604 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008605/* confdefs.h. */
8606_ACEOF
8607cat confdefs.h >>conftest.$ac_ext
8608cat >>conftest.$ac_ext <<_ACEOF
8609/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008610$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008611 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008612int
8613main ()
8614{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008615static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008616test_array [0] = 0
8617
8618 ;
8619 return 0;
8620}
8621_ACEOF
8622rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008623if { (ac_try="$ac_compile"
8624case "(($ac_try" in
8625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8626 *) ac_try_echo=$ac_try;;
8627esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008628eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008629 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008630 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008631 grep -v '^ *+' conftest.er1 >conftest.err
8632 rm -f conftest.er1
8633 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008635 (exit $ac_status); } && {
8636 test -z "$ac_c_werror_flag" ||
8637 test ! -s conftest.err
8638 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 ac_hi=-1 ac_mid=-1
8640 while :; do
8641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008642/* confdefs.h. */
8643_ACEOF
8644cat confdefs.h >>conftest.$ac_ext
8645cat >>conftest.$ac_ext <<_ACEOF
8646/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008647$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008648 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008649int
8650main ()
8651{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008652static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008653test_array [0] = 0
8654
8655 ;
8656 return 0;
8657}
8658_ACEOF
8659rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008660if { (ac_try="$ac_compile"
8661case "(($ac_try" in
8662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8663 *) ac_try_echo=$ac_try;;
8664esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008665eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008666 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008668 grep -v '^ *+' conftest.er1 >conftest.err
8669 rm -f conftest.er1
8670 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008671 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008672 (exit $ac_status); } && {
8673 test -z "$ac_c_werror_flag" ||
8674 test ! -s conftest.err
8675 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008676 ac_lo=$ac_mid; break
8677else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008678 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008679sed 's/^/| /' conftest.$ac_ext >&5
8680
Martin v. Löwiseba40652007-08-30 20:10:57 +00008681 ac_hi=`expr '(' $ac_mid ')' - 1`
8682 if test $ac_mid -le $ac_hi; then
8683 ac_lo= ac_hi=
8684 break
8685 fi
8686 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008687fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008688
8689rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008690 done
8691else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008692 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008693sed 's/^/| /' conftest.$ac_ext >&5
8694
Martin v. Löwiseba40652007-08-30 20:10:57 +00008695 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008697
8698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008700
8701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008702# Binary search between lo and hi bounds.
8703while test "x$ac_lo" != "x$ac_hi"; do
8704 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8705 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008706/* confdefs.h. */
8707_ACEOF
8708cat confdefs.h >>conftest.$ac_ext
8709cat >>conftest.$ac_ext <<_ACEOF
8710/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008711$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008712 typedef void * ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008713int
8714main ()
8715{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008716static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008717test_array [0] = 0
8718
8719 ;
8720 return 0;
8721}
8722_ACEOF
8723rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008724if { (ac_try="$ac_compile"
8725case "(($ac_try" in
8726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8727 *) ac_try_echo=$ac_try;;
8728esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008729eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008730 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008731 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008732 grep -v '^ *+' conftest.er1 >conftest.err
8733 rm -f conftest.er1
8734 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008735 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008736 (exit $ac_status); } && {
8737 test -z "$ac_c_werror_flag" ||
8738 test ! -s conftest.err
8739 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008740 ac_hi=$ac_mid
8741else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008742 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008743sed 's/^/| /' conftest.$ac_ext >&5
8744
Martin v. Löwiseba40652007-08-30 20:10:57 +00008745 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008747
8748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008749done
8750case $ac_lo in
8751?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008752'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008753 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008754See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008755echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008756See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008757 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008758 else
8759 ac_cv_sizeof_void_p=0
8760 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008761esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008762else
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008764/* confdefs.h. */
8765_ACEOF
8766cat confdefs.h >>conftest.$ac_ext
8767cat >>conftest.$ac_ext <<_ACEOF
8768/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008769$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008770 typedef void * ac__type_sizeof_;
8771static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
8772static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008773#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008774#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008775int
8776main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008777{
Martin v. Löwis11437992002-04-12 09:54:03 +00008778
8779 FILE *f = fopen ("conftest.val", "w");
8780 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008781 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008782 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008783 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008784 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008785 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008786 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008787 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008788 }
8789 else
8790 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008791 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008792 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008793 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008794 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008795 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008796 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008797
8798 ;
8799 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008800}
Martin v. Löwis11437992002-04-12 09:54:03 +00008801_ACEOF
8802rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008803if { (ac_try="$ac_link"
8804case "(($ac_try" in
8805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8806 *) ac_try_echo=$ac_try;;
8807esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008809 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008812 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008813 { (case "(($ac_try" in
8814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8815 *) ac_try_echo=$ac_try;;
8816esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008817eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008818 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008819 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008821 (exit $ac_status); }; }; then
8822 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008823else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008824 echo "$as_me: program exited with status $ac_status" >&5
8825echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008826sed 's/^/| /' conftest.$ac_ext >&5
8827
Martin v. Löwis11437992002-04-12 09:54:03 +00008828( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008829if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008830 { { echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008831See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008832echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008833See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008834 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008835 else
8836 ac_cv_sizeof_void_p=0
8837 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008839rm -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 +00008840fi
8841rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008842fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008843{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8844echo "${ECHO_T}$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008845
8846
8847
Martin v. Löwis11437992002-04-12 09:54:03 +00008848cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008849#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008850_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008851
8852
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008853{ echo "$as_me:$LINENO: checking for short" >&5
8854echo $ECHO_N "checking for short... $ECHO_C" >&6; }
8855if test "${ac_cv_type_short+set}" = set; then
8856 echo $ECHO_N "(cached) $ECHO_C" >&6
8857else
8858 cat >conftest.$ac_ext <<_ACEOF
8859/* confdefs.h. */
8860_ACEOF
8861cat confdefs.h >>conftest.$ac_ext
8862cat >>conftest.$ac_ext <<_ACEOF
8863/* end confdefs.h. */
8864$ac_includes_default
8865typedef short ac__type_new_;
8866int
8867main ()
8868{
8869if ((ac__type_new_ *) 0)
8870 return 0;
8871if (sizeof (ac__type_new_))
8872 return 0;
8873 ;
8874 return 0;
8875}
8876_ACEOF
8877rm -f conftest.$ac_objext
8878if { (ac_try="$ac_compile"
8879case "(($ac_try" in
8880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8881 *) ac_try_echo=$ac_try;;
8882esac
8883eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8884 (eval "$ac_compile") 2>conftest.er1
8885 ac_status=$?
8886 grep -v '^ *+' conftest.er1 >conftest.err
8887 rm -f conftest.er1
8888 cat conftest.err >&5
8889 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8890 (exit $ac_status); } && {
8891 test -z "$ac_c_werror_flag" ||
8892 test ! -s conftest.err
8893 } && test -s conftest.$ac_objext; then
8894 ac_cv_type_short=yes
8895else
8896 echo "$as_me: failed program was:" >&5
8897sed 's/^/| /' conftest.$ac_ext >&5
8898
8899 ac_cv_type_short=no
8900fi
8901
8902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8903fi
8904{ echo "$as_me:$LINENO: result: $ac_cv_type_short" >&5
8905echo "${ECHO_T}$ac_cv_type_short" >&6; }
8906
Martin v. Löwiseba40652007-08-30 20:10:57 +00008907# The cast to long int works around a bug in the HP C Compiler
8908# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8909# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8910# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008911{ echo "$as_me:$LINENO: checking size of short" >&5
8912echo $ECHO_N "checking size of short... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008913if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008914 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008915else
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 if test "$cross_compiling" = yes; then
8917 # Depending upon the size, compute the lo and hi bounds.
8918cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008919/* confdefs.h. */
8920_ACEOF
8921cat confdefs.h >>conftest.$ac_ext
8922cat >>conftest.$ac_ext <<_ACEOF
8923/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008924$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008925 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008926int
8927main ()
8928{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008929static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008930test_array [0] = 0
8931
8932 ;
8933 return 0;
8934}
8935_ACEOF
8936rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008937if { (ac_try="$ac_compile"
8938case "(($ac_try" in
8939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8940 *) ac_try_echo=$ac_try;;
8941esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008942eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008943 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008945 grep -v '^ *+' conftest.er1 >conftest.err
8946 rm -f conftest.er1
8947 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008948 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008949 (exit $ac_status); } && {
8950 test -z "$ac_c_werror_flag" ||
8951 test ! -s conftest.err
8952 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008953 ac_lo=0 ac_mid=0
8954 while :; do
8955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008956/* confdefs.h. */
8957_ACEOF
8958cat confdefs.h >>conftest.$ac_ext
8959cat >>conftest.$ac_ext <<_ACEOF
8960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008961$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008962 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00008963int
8964main ()
8965{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008967test_array [0] = 0
8968
8969 ;
8970 return 0;
8971}
8972_ACEOF
8973rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008974if { (ac_try="$ac_compile"
8975case "(($ac_try" in
8976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8977 *) ac_try_echo=$ac_try;;
8978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008982 grep -v '^ *+' conftest.er1 >conftest.err
8983 rm -f conftest.er1
8984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008986 (exit $ac_status); } && {
8987 test -z "$ac_c_werror_flag" ||
8988 test ! -s conftest.err
8989 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 ac_hi=$ac_mid; break
8991else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00008992 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008993sed 's/^/| /' conftest.$ac_ext >&5
8994
Martin v. Löwiseba40652007-08-30 20:10:57 +00008995 ac_lo=`expr $ac_mid + 1`
8996 if test $ac_lo -le $ac_mid; then
8997 ac_lo= ac_hi=
8998 break
8999 fi
9000 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009002
9003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 done
9005else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009006 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009007sed 's/^/| /' conftest.$ac_ext >&5
9008
Martin v. Löwiseba40652007-08-30 20:10:57 +00009009 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009010/* confdefs.h. */
9011_ACEOF
9012cat confdefs.h >>conftest.$ac_ext
9013cat >>conftest.$ac_ext <<_ACEOF
9014/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009015$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009016 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009017int
9018main ()
9019{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009020static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009021test_array [0] = 0
9022
9023 ;
9024 return 0;
9025}
9026_ACEOF
9027rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009028if { (ac_try="$ac_compile"
9029case "(($ac_try" in
9030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9031 *) ac_try_echo=$ac_try;;
9032esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009034 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009036 grep -v '^ *+' conftest.er1 >conftest.err
9037 rm -f conftest.er1
9038 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009039 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009040 (exit $ac_status); } && {
9041 test -z "$ac_c_werror_flag" ||
9042 test ! -s conftest.err
9043 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009044 ac_hi=-1 ac_mid=-1
9045 while :; do
9046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009047/* confdefs.h. */
9048_ACEOF
9049cat confdefs.h >>conftest.$ac_ext
9050cat >>conftest.$ac_ext <<_ACEOF
9051/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009052$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009053 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009054int
9055main ()
9056{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009057static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009058test_array [0] = 0
9059
9060 ;
9061 return 0;
9062}
9063_ACEOF
9064rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009065if { (ac_try="$ac_compile"
9066case "(($ac_try" in
9067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9068 *) ac_try_echo=$ac_try;;
9069esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009071 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009073 grep -v '^ *+' conftest.er1 >conftest.err
9074 rm -f conftest.er1
9075 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009077 (exit $ac_status); } && {
9078 test -z "$ac_c_werror_flag" ||
9079 test ! -s conftest.err
9080 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009081 ac_lo=$ac_mid; break
9082else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009083 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009084sed 's/^/| /' conftest.$ac_ext >&5
9085
Martin v. Löwiseba40652007-08-30 20:10:57 +00009086 ac_hi=`expr '(' $ac_mid ')' - 1`
9087 if test $ac_mid -le $ac_hi; then
9088 ac_lo= ac_hi=
9089 break
9090 fi
9091 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009092fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009093
9094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009095 done
9096else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009097 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009098sed 's/^/| /' conftest.$ac_ext >&5
9099
Martin v. Löwiseba40652007-08-30 20:10:57 +00009100 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009101fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009102
9103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009104fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009105
9106rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009107# Binary search between lo and hi bounds.
9108while test "x$ac_lo" != "x$ac_hi"; do
9109 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009111/* confdefs.h. */
9112_ACEOF
9113cat confdefs.h >>conftest.$ac_ext
9114cat >>conftest.$ac_ext <<_ACEOF
9115/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009116$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009117 typedef short ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009118int
9119main ()
9120{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009121static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009122test_array [0] = 0
9123
9124 ;
9125 return 0;
9126}
9127_ACEOF
9128rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009129if { (ac_try="$ac_compile"
9130case "(($ac_try" in
9131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9132 *) ac_try_echo=$ac_try;;
9133esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009134eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009135 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009137 grep -v '^ *+' conftest.er1 >conftest.err
9138 rm -f conftest.er1
9139 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009140 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009141 (exit $ac_status); } && {
9142 test -z "$ac_c_werror_flag" ||
9143 test ! -s conftest.err
9144 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 ac_hi=$ac_mid
9146else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009147 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009148sed 's/^/| /' conftest.$ac_ext >&5
9149
Martin v. Löwiseba40652007-08-30 20:10:57 +00009150 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009151fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009152
9153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009154done
9155case $ac_lo in
9156?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009157'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009158 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009159See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009160echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009161See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009162 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009163 else
9164 ac_cv_sizeof_short=0
9165 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009166esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009167else
Martin v. Löwis11437992002-04-12 09:54:03 +00009168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009169/* confdefs.h. */
9170_ACEOF
9171cat confdefs.h >>conftest.$ac_ext
9172cat >>conftest.$ac_ext <<_ACEOF
9173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009174$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009175 typedef short ac__type_sizeof_;
9176static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9177static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009178#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009179#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009180int
9181main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009182{
Martin v. Löwis11437992002-04-12 09:54:03 +00009183
9184 FILE *f = fopen ("conftest.val", "w");
9185 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009186 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009187 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009188 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009189 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009190 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009191 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009192 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009193 }
9194 else
9195 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009197 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009198 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009199 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009200 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009201 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009202
9203 ;
9204 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009205}
Martin v. Löwis11437992002-04-12 09:54:03 +00009206_ACEOF
9207rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009208if { (ac_try="$ac_link"
9209case "(($ac_try" in
9210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9211 *) ac_try_echo=$ac_try;;
9212esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009213eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009214 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009215 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009216 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009218 { (case "(($ac_try" in
9219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9220 *) ac_try_echo=$ac_try;;
9221esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009223 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009224 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009225 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009226 (exit $ac_status); }; }; then
9227 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009228else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009229 echo "$as_me: program exited with status $ac_status" >&5
9230echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009231sed 's/^/| /' conftest.$ac_ext >&5
9232
Martin v. Löwis11437992002-04-12 09:54:03 +00009233( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009234if test "$ac_cv_type_short" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009235 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009236See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009237echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009238See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009239 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009240 else
9241 ac_cv_sizeof_short=0
9242 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009244rm -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 +00009245fi
9246rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009247fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009248{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9249echo "${ECHO_T}$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009250
9251
9252
Martin v. Löwis11437992002-04-12 09:54:03 +00009253cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009254#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009255_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009256
9257
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009258{ echo "$as_me:$LINENO: checking for float" >&5
9259echo $ECHO_N "checking for float... $ECHO_C" >&6; }
9260if test "${ac_cv_type_float+set}" = set; then
9261 echo $ECHO_N "(cached) $ECHO_C" >&6
9262else
9263 cat >conftest.$ac_ext <<_ACEOF
9264/* confdefs.h. */
9265_ACEOF
9266cat confdefs.h >>conftest.$ac_ext
9267cat >>conftest.$ac_ext <<_ACEOF
9268/* end confdefs.h. */
9269$ac_includes_default
9270typedef float ac__type_new_;
9271int
9272main ()
9273{
9274if ((ac__type_new_ *) 0)
9275 return 0;
9276if (sizeof (ac__type_new_))
9277 return 0;
9278 ;
9279 return 0;
9280}
9281_ACEOF
9282rm -f conftest.$ac_objext
9283if { (ac_try="$ac_compile"
9284case "(($ac_try" in
9285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9286 *) ac_try_echo=$ac_try;;
9287esac
9288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9289 (eval "$ac_compile") 2>conftest.er1
9290 ac_status=$?
9291 grep -v '^ *+' conftest.er1 >conftest.err
9292 rm -f conftest.er1
9293 cat conftest.err >&5
9294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9295 (exit $ac_status); } && {
9296 test -z "$ac_c_werror_flag" ||
9297 test ! -s conftest.err
9298 } && test -s conftest.$ac_objext; then
9299 ac_cv_type_float=yes
9300else
9301 echo "$as_me: failed program was:" >&5
9302sed 's/^/| /' conftest.$ac_ext >&5
9303
9304 ac_cv_type_float=no
9305fi
9306
9307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9308fi
9309{ echo "$as_me:$LINENO: result: $ac_cv_type_float" >&5
9310echo "${ECHO_T}$ac_cv_type_float" >&6; }
9311
Martin v. Löwiseba40652007-08-30 20:10:57 +00009312# The cast to long int works around a bug in the HP C Compiler
9313# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9314# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9315# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009316{ echo "$as_me:$LINENO: checking size of float" >&5
9317echo $ECHO_N "checking size of float... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009318if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009319 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009320else
Martin v. Löwis11437992002-04-12 09:54:03 +00009321 if test "$cross_compiling" = yes; then
9322 # Depending upon the size, compute the lo and hi bounds.
9323cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009324/* confdefs.h. */
9325_ACEOF
9326cat confdefs.h >>conftest.$ac_ext
9327cat >>conftest.$ac_ext <<_ACEOF
9328/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009329$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009330 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009331int
9332main ()
9333{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009334static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009335test_array [0] = 0
9336
9337 ;
9338 return 0;
9339}
9340_ACEOF
9341rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009342if { (ac_try="$ac_compile"
9343case "(($ac_try" in
9344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9345 *) ac_try_echo=$ac_try;;
9346esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009348 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009349 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009350 grep -v '^ *+' conftest.er1 >conftest.err
9351 rm -f conftest.er1
9352 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009354 (exit $ac_status); } && {
9355 test -z "$ac_c_werror_flag" ||
9356 test ! -s conftest.err
9357 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009358 ac_lo=0 ac_mid=0
9359 while :; do
9360 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009361/* confdefs.h. */
9362_ACEOF
9363cat confdefs.h >>conftest.$ac_ext
9364cat >>conftest.$ac_ext <<_ACEOF
9365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009366$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009367 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009368int
9369main ()
9370{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009371static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009372test_array [0] = 0
9373
9374 ;
9375 return 0;
9376}
9377_ACEOF
9378rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009379if { (ac_try="$ac_compile"
9380case "(($ac_try" in
9381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9382 *) ac_try_echo=$ac_try;;
9383esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009385 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009387 grep -v '^ *+' conftest.er1 >conftest.err
9388 rm -f conftest.er1
9389 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009391 (exit $ac_status); } && {
9392 test -z "$ac_c_werror_flag" ||
9393 test ! -s conftest.err
9394 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009395 ac_hi=$ac_mid; break
9396else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009397 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009398sed 's/^/| /' conftest.$ac_ext >&5
9399
Martin v. Löwiseba40652007-08-30 20:10:57 +00009400 ac_lo=`expr $ac_mid + 1`
9401 if test $ac_lo -le $ac_mid; then
9402 ac_lo= ac_hi=
9403 break
9404 fi
9405 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009406fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009407
9408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 done
9410else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009411 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009412sed 's/^/| /' conftest.$ac_ext >&5
9413
Martin v. Löwiseba40652007-08-30 20:10:57 +00009414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009415/* confdefs.h. */
9416_ACEOF
9417cat confdefs.h >>conftest.$ac_ext
9418cat >>conftest.$ac_ext <<_ACEOF
9419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009420$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009421 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009422int
9423main ()
9424{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009425static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009426test_array [0] = 0
9427
9428 ;
9429 return 0;
9430}
9431_ACEOF
9432rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009433if { (ac_try="$ac_compile"
9434case "(($ac_try" in
9435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9436 *) ac_try_echo=$ac_try;;
9437esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009438eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009439 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009441 grep -v '^ *+' conftest.er1 >conftest.err
9442 rm -f conftest.er1
9443 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009444 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009445 (exit $ac_status); } && {
9446 test -z "$ac_c_werror_flag" ||
9447 test ! -s conftest.err
9448 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009449 ac_hi=-1 ac_mid=-1
9450 while :; do
9451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009452/* confdefs.h. */
9453_ACEOF
9454cat confdefs.h >>conftest.$ac_ext
9455cat >>conftest.$ac_ext <<_ACEOF
9456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009457$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009458 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009459int
9460main ()
9461{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009462static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009463test_array [0] = 0
9464
9465 ;
9466 return 0;
9467}
9468_ACEOF
9469rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009470if { (ac_try="$ac_compile"
9471case "(($ac_try" in
9472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9473 *) ac_try_echo=$ac_try;;
9474esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009475eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009476 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009478 grep -v '^ *+' conftest.er1 >conftest.err
9479 rm -f conftest.er1
9480 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009481 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009482 (exit $ac_status); } && {
9483 test -z "$ac_c_werror_flag" ||
9484 test ! -s conftest.err
9485 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009486 ac_lo=$ac_mid; break
9487else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009488 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009489sed 's/^/| /' conftest.$ac_ext >&5
9490
Martin v. Löwiseba40652007-08-30 20:10:57 +00009491 ac_hi=`expr '(' $ac_mid ')' - 1`
9492 if test $ac_mid -le $ac_hi; then
9493 ac_lo= ac_hi=
9494 break
9495 fi
9496 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009498
9499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 done
9501else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009503sed 's/^/| /' conftest.$ac_ext >&5
9504
Martin v. Löwiseba40652007-08-30 20:10:57 +00009505 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009507
9508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009509fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009510
9511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009512# Binary search between lo and hi bounds.
9513while test "x$ac_lo" != "x$ac_hi"; do
9514 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9515 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009516/* confdefs.h. */
9517_ACEOF
9518cat confdefs.h >>conftest.$ac_ext
9519cat >>conftest.$ac_ext <<_ACEOF
9520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009521$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009522 typedef float ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009523int
9524main ()
9525{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009526static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009527test_array [0] = 0
9528
9529 ;
9530 return 0;
9531}
9532_ACEOF
9533rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009534if { (ac_try="$ac_compile"
9535case "(($ac_try" in
9536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9537 *) ac_try_echo=$ac_try;;
9538esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009540 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009542 grep -v '^ *+' conftest.er1 >conftest.err
9543 rm -f conftest.er1
9544 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009546 (exit $ac_status); } && {
9547 test -z "$ac_c_werror_flag" ||
9548 test ! -s conftest.err
9549 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 ac_hi=$ac_mid
9551else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009553sed 's/^/| /' conftest.$ac_ext >&5
9554
Martin v. Löwiseba40652007-08-30 20:10:57 +00009555 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009557
9558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009559done
9560case $ac_lo in
9561?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009562'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009563 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009564See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009565echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009566See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009567 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009568 else
9569 ac_cv_sizeof_float=0
9570 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009571esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009572else
Martin v. Löwis11437992002-04-12 09:54:03 +00009573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009574/* confdefs.h. */
9575_ACEOF
9576cat confdefs.h >>conftest.$ac_ext
9577cat >>conftest.$ac_ext <<_ACEOF
9578/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009579$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009580 typedef float ac__type_sizeof_;
9581static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9582static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009583#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009584#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009585int
9586main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009587{
Martin v. Löwis11437992002-04-12 09:54:03 +00009588
9589 FILE *f = fopen ("conftest.val", "w");
9590 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009591 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009592 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009593 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009594 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009595 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009596 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009597 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009598 }
9599 else
9600 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009602 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009603 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009604 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009605 }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009606 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009607
9608 ;
9609 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009610}
Martin v. Löwis11437992002-04-12 09:54:03 +00009611_ACEOF
9612rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009613if { (ac_try="$ac_link"
9614case "(($ac_try" in
9615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9616 *) ac_try_echo=$ac_try;;
9617esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009618eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009619 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009620 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009621 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009623 { (case "(($ac_try" in
9624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9625 *) ac_try_echo=$ac_try;;
9626esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009628 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009629 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009631 (exit $ac_status); }; }; then
9632 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009633else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009634 echo "$as_me: program exited with status $ac_status" >&5
9635echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009636sed 's/^/| /' conftest.$ac_ext >&5
9637
Martin v. Löwis11437992002-04-12 09:54:03 +00009638( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009639if test "$ac_cv_type_float" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009640 { { echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009641See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009642echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009643See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009644 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009645 else
9646 ac_cv_sizeof_float=0
9647 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009648fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009649rm -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 +00009650fi
9651rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009652fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009653{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9654echo "${ECHO_T}$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009655
9656
9657
Martin v. Löwis11437992002-04-12 09:54:03 +00009658cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009659#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009660_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009661
9662
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009663{ echo "$as_me:$LINENO: checking for double" >&5
9664echo $ECHO_N "checking for double... $ECHO_C" >&6; }
9665if test "${ac_cv_type_double+set}" = set; then
9666 echo $ECHO_N "(cached) $ECHO_C" >&6
9667else
9668 cat >conftest.$ac_ext <<_ACEOF
9669/* confdefs.h. */
9670_ACEOF
9671cat confdefs.h >>conftest.$ac_ext
9672cat >>conftest.$ac_ext <<_ACEOF
9673/* end confdefs.h. */
9674$ac_includes_default
9675typedef double ac__type_new_;
9676int
9677main ()
9678{
9679if ((ac__type_new_ *) 0)
9680 return 0;
9681if (sizeof (ac__type_new_))
9682 return 0;
9683 ;
9684 return 0;
9685}
9686_ACEOF
9687rm -f conftest.$ac_objext
9688if { (ac_try="$ac_compile"
9689case "(($ac_try" in
9690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9691 *) ac_try_echo=$ac_try;;
9692esac
9693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9694 (eval "$ac_compile") 2>conftest.er1
9695 ac_status=$?
9696 grep -v '^ *+' conftest.er1 >conftest.err
9697 rm -f conftest.er1
9698 cat conftest.err >&5
9699 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9700 (exit $ac_status); } && {
9701 test -z "$ac_c_werror_flag" ||
9702 test ! -s conftest.err
9703 } && test -s conftest.$ac_objext; then
9704 ac_cv_type_double=yes
9705else
9706 echo "$as_me: failed program was:" >&5
9707sed 's/^/| /' conftest.$ac_ext >&5
9708
9709 ac_cv_type_double=no
9710fi
9711
9712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9713fi
9714{ echo "$as_me:$LINENO: result: $ac_cv_type_double" >&5
9715echo "${ECHO_T}$ac_cv_type_double" >&6; }
9716
Martin v. Löwiseba40652007-08-30 20:10:57 +00009717# The cast to long int works around a bug in the HP C Compiler
9718# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9719# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9720# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009721{ echo "$as_me:$LINENO: checking size of double" >&5
9722echo $ECHO_N "checking size of double... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009723if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009724 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009725else
Martin v. Löwis11437992002-04-12 09:54:03 +00009726 if test "$cross_compiling" = yes; then
9727 # Depending upon the size, compute the lo and hi bounds.
9728cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009729/* confdefs.h. */
9730_ACEOF
9731cat confdefs.h >>conftest.$ac_ext
9732cat >>conftest.$ac_ext <<_ACEOF
9733/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009734$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009735 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009736int
9737main ()
9738{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009739static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009740test_array [0] = 0
9741
9742 ;
9743 return 0;
9744}
9745_ACEOF
9746rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009747if { (ac_try="$ac_compile"
9748case "(($ac_try" in
9749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9750 *) ac_try_echo=$ac_try;;
9751esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009752eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009753 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009754 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009755 grep -v '^ *+' conftest.er1 >conftest.err
9756 rm -f conftest.er1
9757 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009758 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009759 (exit $ac_status); } && {
9760 test -z "$ac_c_werror_flag" ||
9761 test ! -s conftest.err
9762 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009763 ac_lo=0 ac_mid=0
9764 while :; do
9765 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009766/* confdefs.h. */
9767_ACEOF
9768cat confdefs.h >>conftest.$ac_ext
9769cat >>conftest.$ac_ext <<_ACEOF
9770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009771$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009772 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009773int
9774main ()
9775{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009776static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009777test_array [0] = 0
9778
9779 ;
9780 return 0;
9781}
9782_ACEOF
9783rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009784if { (ac_try="$ac_compile"
9785case "(($ac_try" in
9786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9787 *) ac_try_echo=$ac_try;;
9788esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009789eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009790 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009792 grep -v '^ *+' conftest.er1 >conftest.err
9793 rm -f conftest.er1
9794 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009795 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009796 (exit $ac_status); } && {
9797 test -z "$ac_c_werror_flag" ||
9798 test ! -s conftest.err
9799 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009800 ac_hi=$ac_mid; break
9801else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009802 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009803sed 's/^/| /' conftest.$ac_ext >&5
9804
Martin v. Löwiseba40652007-08-30 20:10:57 +00009805 ac_lo=`expr $ac_mid + 1`
9806 if test $ac_lo -le $ac_mid; then
9807 ac_lo= ac_hi=
9808 break
9809 fi
9810 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009811fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009812
9813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009814 done
9815else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009816 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009817sed 's/^/| /' conftest.$ac_ext >&5
9818
Martin v. Löwiseba40652007-08-30 20:10:57 +00009819 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009820/* confdefs.h. */
9821_ACEOF
9822cat confdefs.h >>conftest.$ac_ext
9823cat >>conftest.$ac_ext <<_ACEOF
9824/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009825$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009826 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009827int
9828main ()
9829{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009830static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009831test_array [0] = 0
9832
9833 ;
9834 return 0;
9835}
9836_ACEOF
9837rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009838if { (ac_try="$ac_compile"
9839case "(($ac_try" in
9840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9841 *) ac_try_echo=$ac_try;;
9842esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009843eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009844 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009845 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009846 grep -v '^ *+' conftest.er1 >conftest.err
9847 rm -f conftest.er1
9848 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009850 (exit $ac_status); } && {
9851 test -z "$ac_c_werror_flag" ||
9852 test ! -s conftest.err
9853 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009854 ac_hi=-1 ac_mid=-1
9855 while :; do
9856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009857/* confdefs.h. */
9858_ACEOF
9859cat confdefs.h >>conftest.$ac_ext
9860cat >>conftest.$ac_ext <<_ACEOF
9861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009862$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009863 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009864int
9865main ()
9866{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009867static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009868test_array [0] = 0
9869
9870 ;
9871 return 0;
9872}
9873_ACEOF
9874rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009875if { (ac_try="$ac_compile"
9876case "(($ac_try" in
9877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9878 *) ac_try_echo=$ac_try;;
9879esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009881 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009883 grep -v '^ *+' conftest.er1 >conftest.err
9884 rm -f conftest.er1
9885 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009887 (exit $ac_status); } && {
9888 test -z "$ac_c_werror_flag" ||
9889 test ! -s conftest.err
9890 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009891 ac_lo=$ac_mid; break
9892else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009893 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009894sed 's/^/| /' conftest.$ac_ext >&5
9895
Martin v. Löwiseba40652007-08-30 20:10:57 +00009896 ac_hi=`expr '(' $ac_mid ')' - 1`
9897 if test $ac_mid -le $ac_hi; then
9898 ac_lo= ac_hi=
9899 break
9900 fi
9901 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009902fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009903
9904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009905 done
9906else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009907 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009908sed 's/^/| /' conftest.$ac_ext >&5
9909
Martin v. Löwiseba40652007-08-30 20:10:57 +00009910 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009912
9913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009914fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009915
9916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009917# Binary search between lo and hi bounds.
9918while test "x$ac_lo" != "x$ac_hi"; do
9919 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009921/* confdefs.h. */
9922_ACEOF
9923cat confdefs.h >>conftest.$ac_ext
9924cat >>conftest.$ac_ext <<_ACEOF
9925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009926$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009927 typedef double ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +00009928int
9929main ()
9930{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009931static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009932test_array [0] = 0
9933
9934 ;
9935 return 0;
9936}
9937_ACEOF
9938rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009939if { (ac_try="$ac_compile"
9940case "(($ac_try" in
9941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9942 *) ac_try_echo=$ac_try;;
9943esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009944eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009947 grep -v '^ *+' conftest.er1 >conftest.err
9948 rm -f conftest.er1
9949 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009950 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009951 (exit $ac_status); } && {
9952 test -z "$ac_c_werror_flag" ||
9953 test ! -s conftest.err
9954 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 ac_hi=$ac_mid
9956else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009957 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009958sed 's/^/| /' conftest.$ac_ext >&5
9959
Martin v. Löwiseba40652007-08-30 20:10:57 +00009960 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009961fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009962
9963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009964done
9965case $ac_lo in
9966?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009967'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009968 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009969See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009970echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009971See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009972 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009973 else
9974 ac_cv_sizeof_double=0
9975 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009976esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009977else
Martin v. Löwis11437992002-04-12 09:54:03 +00009978 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009979/* confdefs.h. */
9980_ACEOF
9981cat confdefs.h >>conftest.$ac_ext
9982cat >>conftest.$ac_ext <<_ACEOF
9983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009984$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009985 typedef double ac__type_sizeof_;
9986static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
9987static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009988#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009989#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009990int
9991main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009992{
Martin v. Löwis11437992002-04-12 09:54:03 +00009993
9994 FILE *f = fopen ("conftest.val", "w");
9995 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009996 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +00009997 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009998 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009999 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010000 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010001 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010002 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010003 }
10004 else
10005 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010006 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010007 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010008 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010009 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010011 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010012
10013 ;
10014 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010015}
Martin v. Löwis11437992002-04-12 09:54:03 +000010016_ACEOF
10017rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010018if { (ac_try="$ac_link"
10019case "(($ac_try" in
10020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10021 *) ac_try_echo=$ac_try;;
10022esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010023eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010024 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010025 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010026 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010027 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010028 { (case "(($ac_try" in
10029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10030 *) ac_try_echo=$ac_try;;
10031esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010032eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010033 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010034 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010035 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010036 (exit $ac_status); }; }; then
10037 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010038else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010039 echo "$as_me: program exited with status $ac_status" >&5
10040echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010041sed 's/^/| /' conftest.$ac_ext >&5
10042
Martin v. Löwis11437992002-04-12 09:54:03 +000010043( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010044if test "$ac_cv_type_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010045 { { echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010046See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010047echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010048See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010049 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010050 else
10051 ac_cv_sizeof_double=0
10052 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010054rm -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 +000010055fi
10056rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010057fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010058{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10059echo "${ECHO_T}$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010060
10061
10062
Martin v. Löwis11437992002-04-12 09:54:03 +000010063cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010064#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010065_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010066
10067
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010068{ echo "$as_me:$LINENO: checking for fpos_t" >&5
10069echo $ECHO_N "checking for fpos_t... $ECHO_C" >&6; }
10070if test "${ac_cv_type_fpos_t+set}" = set; then
10071 echo $ECHO_N "(cached) $ECHO_C" >&6
10072else
10073 cat >conftest.$ac_ext <<_ACEOF
10074/* confdefs.h. */
10075_ACEOF
10076cat confdefs.h >>conftest.$ac_ext
10077cat >>conftest.$ac_ext <<_ACEOF
10078/* end confdefs.h. */
10079$ac_includes_default
10080typedef fpos_t ac__type_new_;
10081int
10082main ()
10083{
10084if ((ac__type_new_ *) 0)
10085 return 0;
10086if (sizeof (ac__type_new_))
10087 return 0;
10088 ;
10089 return 0;
10090}
10091_ACEOF
10092rm -f conftest.$ac_objext
10093if { (ac_try="$ac_compile"
10094case "(($ac_try" in
10095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10096 *) ac_try_echo=$ac_try;;
10097esac
10098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10099 (eval "$ac_compile") 2>conftest.er1
10100 ac_status=$?
10101 grep -v '^ *+' conftest.er1 >conftest.err
10102 rm -f conftest.er1
10103 cat conftest.err >&5
10104 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10105 (exit $ac_status); } && {
10106 test -z "$ac_c_werror_flag" ||
10107 test ! -s conftest.err
10108 } && test -s conftest.$ac_objext; then
10109 ac_cv_type_fpos_t=yes
10110else
10111 echo "$as_me: failed program was:" >&5
10112sed 's/^/| /' conftest.$ac_ext >&5
10113
10114 ac_cv_type_fpos_t=no
10115fi
10116
10117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10118fi
10119{ echo "$as_me:$LINENO: result: $ac_cv_type_fpos_t" >&5
10120echo "${ECHO_T}$ac_cv_type_fpos_t" >&6; }
10121
Martin v. Löwiseba40652007-08-30 20:10:57 +000010122# The cast to long int works around a bug in the HP C Compiler
10123# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10124# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10125# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010126{ echo "$as_me:$LINENO: checking size of fpos_t" >&5
10127echo $ECHO_N "checking size of fpos_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010128if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010129 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010130else
Martin v. Löwis11437992002-04-12 09:54:03 +000010131 if test "$cross_compiling" = yes; then
10132 # Depending upon the size, compute the lo and hi bounds.
10133cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010134/* confdefs.h. */
10135_ACEOF
10136cat confdefs.h >>conftest.$ac_ext
10137cat >>conftest.$ac_ext <<_ACEOF
10138/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010139$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010140 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010141int
10142main ()
10143{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010144static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010145test_array [0] = 0
10146
10147 ;
10148 return 0;
10149}
10150_ACEOF
10151rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010152if { (ac_try="$ac_compile"
10153case "(($ac_try" in
10154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10155 *) ac_try_echo=$ac_try;;
10156esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010159 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010160 grep -v '^ *+' conftest.er1 >conftest.err
10161 rm -f conftest.er1
10162 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010164 (exit $ac_status); } && {
10165 test -z "$ac_c_werror_flag" ||
10166 test ! -s conftest.err
10167 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010168 ac_lo=0 ac_mid=0
10169 while :; do
10170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010171/* confdefs.h. */
10172_ACEOF
10173cat confdefs.h >>conftest.$ac_ext
10174cat >>conftest.$ac_ext <<_ACEOF
10175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010176$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010177 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010178int
10179main ()
10180{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010181static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010182test_array [0] = 0
10183
10184 ;
10185 return 0;
10186}
10187_ACEOF
10188rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010189if { (ac_try="$ac_compile"
10190case "(($ac_try" in
10191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10192 *) ac_try_echo=$ac_try;;
10193esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010194eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010197 grep -v '^ *+' conftest.er1 >conftest.err
10198 rm -f conftest.er1
10199 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010200 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010201 (exit $ac_status); } && {
10202 test -z "$ac_c_werror_flag" ||
10203 test ! -s conftest.err
10204 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010205 ac_hi=$ac_mid; break
10206else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010207 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010208sed 's/^/| /' conftest.$ac_ext >&5
10209
Martin v. Löwiseba40652007-08-30 20:10:57 +000010210 ac_lo=`expr $ac_mid + 1`
10211 if test $ac_lo -le $ac_mid; then
10212 ac_lo= ac_hi=
10213 break
10214 fi
10215 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010217
10218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010219 done
10220else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010221 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010222sed 's/^/| /' conftest.$ac_ext >&5
10223
Martin v. Löwiseba40652007-08-30 20:10:57 +000010224 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010225/* confdefs.h. */
10226_ACEOF
10227cat confdefs.h >>conftest.$ac_ext
10228cat >>conftest.$ac_ext <<_ACEOF
10229/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010230$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010231 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010232int
10233main ()
10234{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010235static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010236test_array [0] = 0
10237
10238 ;
10239 return 0;
10240}
10241_ACEOF
10242rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010243if { (ac_try="$ac_compile"
10244case "(($ac_try" in
10245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10246 *) ac_try_echo=$ac_try;;
10247esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010249 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010250 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010251 grep -v '^ *+' conftest.er1 >conftest.err
10252 rm -f conftest.er1
10253 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010255 (exit $ac_status); } && {
10256 test -z "$ac_c_werror_flag" ||
10257 test ! -s conftest.err
10258 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 ac_hi=-1 ac_mid=-1
10260 while :; do
10261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010262/* confdefs.h. */
10263_ACEOF
10264cat confdefs.h >>conftest.$ac_ext
10265cat >>conftest.$ac_ext <<_ACEOF
10266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010267$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010268 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010269int
10270main ()
10271{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010272static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010273test_array [0] = 0
10274
10275 ;
10276 return 0;
10277}
10278_ACEOF
10279rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010280if { (ac_try="$ac_compile"
10281case "(($ac_try" in
10282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10283 *) ac_try_echo=$ac_try;;
10284esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010285eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010288 grep -v '^ *+' conftest.er1 >conftest.err
10289 rm -f conftest.er1
10290 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010291 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010292 (exit $ac_status); } && {
10293 test -z "$ac_c_werror_flag" ||
10294 test ! -s conftest.err
10295 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 ac_lo=$ac_mid; break
10297else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010298 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010299sed 's/^/| /' conftest.$ac_ext >&5
10300
Martin v. Löwiseba40652007-08-30 20:10:57 +000010301 ac_hi=`expr '(' $ac_mid ')' - 1`
10302 if test $ac_mid -le $ac_hi; then
10303 ac_lo= ac_hi=
10304 break
10305 fi
10306 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010308
10309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010310 done
10311else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010312 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010313sed 's/^/| /' conftest.$ac_ext >&5
10314
Martin v. Löwiseba40652007-08-30 20:10:57 +000010315 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010317
10318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010320
10321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010322# Binary search between lo and hi bounds.
10323while test "x$ac_lo" != "x$ac_hi"; do
10324 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10325 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010326/* confdefs.h. */
10327_ACEOF
10328cat confdefs.h >>conftest.$ac_ext
10329cat >>conftest.$ac_ext <<_ACEOF
10330/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010331$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010332 typedef fpos_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000010333int
10334main ()
10335{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010336static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010337test_array [0] = 0
10338
10339 ;
10340 return 0;
10341}
10342_ACEOF
10343rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010344if { (ac_try="$ac_compile"
10345case "(($ac_try" in
10346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10347 *) ac_try_echo=$ac_try;;
10348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010352 grep -v '^ *+' conftest.er1 >conftest.err
10353 rm -f conftest.er1
10354 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010356 (exit $ac_status); } && {
10357 test -z "$ac_c_werror_flag" ||
10358 test ! -s conftest.err
10359 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010360 ac_hi=$ac_mid
10361else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010362 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010363sed 's/^/| /' conftest.$ac_ext >&5
10364
Martin v. Löwiseba40652007-08-30 20:10:57 +000010365 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010366fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010367
10368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010369done
10370case $ac_lo in
10371?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010372'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010373 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010374See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010375echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010376See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010377 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010378 else
10379 ac_cv_sizeof_fpos_t=0
10380 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010381esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010382else
Martin v. Löwis11437992002-04-12 09:54:03 +000010383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010384/* confdefs.h. */
10385_ACEOF
10386cat confdefs.h >>conftest.$ac_ext
10387cat >>conftest.$ac_ext <<_ACEOF
10388/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010389$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010390 typedef fpos_t ac__type_sizeof_;
10391static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10392static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010393#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010394#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010395int
10396main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010397{
Martin v. Löwis11437992002-04-12 09:54:03 +000010398
10399 FILE *f = fopen ("conftest.val", "w");
10400 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010401 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010402 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010404 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010405 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010406 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010407 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010408 }
10409 else
10410 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010411 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010412 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010413 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010414 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010415 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010416 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010417
10418 ;
10419 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010420}
Martin v. Löwis11437992002-04-12 09:54:03 +000010421_ACEOF
10422rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010423if { (ac_try="$ac_link"
10424case "(($ac_try" in
10425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10426 *) ac_try_echo=$ac_try;;
10427esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010428eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010429 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010430 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010432 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010433 { (case "(($ac_try" in
10434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10435 *) ac_try_echo=$ac_try;;
10436esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010438 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010440 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010441 (exit $ac_status); }; }; then
10442 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010443else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010444 echo "$as_me: program exited with status $ac_status" >&5
10445echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010446sed 's/^/| /' conftest.$ac_ext >&5
10447
Martin v. Löwis11437992002-04-12 09:54:03 +000010448( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010449if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010450 { { echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010451See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010452echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010453See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010454 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010455 else
10456 ac_cv_sizeof_fpos_t=0
10457 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010459rm -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 +000010460fi
10461rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010462fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010463{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10464echo "${ECHO_T}$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010465
10466
10467
Martin v. Löwis11437992002-04-12 09:54:03 +000010468cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010469#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010470_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010471
Michael W. Hudson54241132001-12-07 15:38:26 +000010472
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010473{ echo "$as_me:$LINENO: checking for size_t" >&5
10474echo $ECHO_N "checking for size_t... $ECHO_C" >&6; }
10475if test "${ac_cv_type_size_t+set}" = set; then
10476 echo $ECHO_N "(cached) $ECHO_C" >&6
10477else
10478 cat >conftest.$ac_ext <<_ACEOF
10479/* confdefs.h. */
10480_ACEOF
10481cat confdefs.h >>conftest.$ac_ext
10482cat >>conftest.$ac_ext <<_ACEOF
10483/* end confdefs.h. */
10484$ac_includes_default
10485typedef size_t ac__type_new_;
10486int
10487main ()
10488{
10489if ((ac__type_new_ *) 0)
10490 return 0;
10491if (sizeof (ac__type_new_))
10492 return 0;
10493 ;
10494 return 0;
10495}
10496_ACEOF
10497rm -f conftest.$ac_objext
10498if { (ac_try="$ac_compile"
10499case "(($ac_try" in
10500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10501 *) ac_try_echo=$ac_try;;
10502esac
10503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10504 (eval "$ac_compile") 2>conftest.er1
10505 ac_status=$?
10506 grep -v '^ *+' conftest.er1 >conftest.err
10507 rm -f conftest.er1
10508 cat conftest.err >&5
10509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10510 (exit $ac_status); } && {
10511 test -z "$ac_c_werror_flag" ||
10512 test ! -s conftest.err
10513 } && test -s conftest.$ac_objext; then
10514 ac_cv_type_size_t=yes
10515else
10516 echo "$as_me: failed program was:" >&5
10517sed 's/^/| /' conftest.$ac_ext >&5
10518
10519 ac_cv_type_size_t=no
10520fi
10521
10522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10523fi
10524{ echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
10525echo "${ECHO_T}$ac_cv_type_size_t" >&6; }
10526
Martin v. Löwiseba40652007-08-30 20:10:57 +000010527# The cast to long int works around a bug in the HP C Compiler
10528# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10529# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10530# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010531{ echo "$as_me:$LINENO: checking size of size_t" >&5
10532echo $ECHO_N "checking size of size_t... $ECHO_C" >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010533if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010534 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010535else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010536 if test "$cross_compiling" = yes; then
10537 # Depending upon the size, compute the lo and hi bounds.
10538cat >conftest.$ac_ext <<_ACEOF
10539/* confdefs.h. */
10540_ACEOF
10541cat confdefs.h >>conftest.$ac_ext
10542cat >>conftest.$ac_ext <<_ACEOF
10543/* end confdefs.h. */
10544$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010545 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010546int
10547main ()
10548{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010549static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010550test_array [0] = 0
10551
10552 ;
10553 return 0;
10554}
10555_ACEOF
10556rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010557if { (ac_try="$ac_compile"
10558case "(($ac_try" in
10559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10560 *) ac_try_echo=$ac_try;;
10561esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010562eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010564 ac_status=$?
10565 grep -v '^ *+' conftest.er1 >conftest.err
10566 rm -f conftest.er1
10567 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010568 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010569 (exit $ac_status); } && {
10570 test -z "$ac_c_werror_flag" ||
10571 test ! -s conftest.err
10572 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010573 ac_lo=0 ac_mid=0
10574 while :; do
10575 cat >conftest.$ac_ext <<_ACEOF
10576/* confdefs.h. */
10577_ACEOF
10578cat confdefs.h >>conftest.$ac_ext
10579cat >>conftest.$ac_ext <<_ACEOF
10580/* end confdefs.h. */
10581$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010582 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010583int
10584main ()
10585{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010586static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587test_array [0] = 0
10588
10589 ;
10590 return 0;
10591}
10592_ACEOF
10593rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010594if { (ac_try="$ac_compile"
10595case "(($ac_try" in
10596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10597 *) ac_try_echo=$ac_try;;
10598esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010599eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010601 ac_status=$?
10602 grep -v '^ *+' conftest.er1 >conftest.err
10603 rm -f conftest.er1
10604 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010605 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010606 (exit $ac_status); } && {
10607 test -z "$ac_c_werror_flag" ||
10608 test ! -s conftest.err
10609 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010610 ac_hi=$ac_mid; break
10611else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010612 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613sed 's/^/| /' conftest.$ac_ext >&5
10614
Martin v. Löwiseba40652007-08-30 20:10:57 +000010615 ac_lo=`expr $ac_mid + 1`
10616 if test $ac_lo -le $ac_mid; then
10617 ac_lo= ac_hi=
10618 break
10619 fi
10620 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010621fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010622
10623rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010624 done
10625else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010626 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627sed 's/^/| /' conftest.$ac_ext >&5
10628
Martin v. Löwiseba40652007-08-30 20:10:57 +000010629 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010630/* confdefs.h. */
10631_ACEOF
10632cat confdefs.h >>conftest.$ac_ext
10633cat >>conftest.$ac_ext <<_ACEOF
10634/* end confdefs.h. */
10635$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010636 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010637int
10638main ()
10639{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010640static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010641test_array [0] = 0
10642
10643 ;
10644 return 0;
10645}
10646_ACEOF
10647rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010648if { (ac_try="$ac_compile"
10649case "(($ac_try" in
10650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10651 *) ac_try_echo=$ac_try;;
10652esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010653eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010654 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655 ac_status=$?
10656 grep -v '^ *+' conftest.er1 >conftest.err
10657 rm -f conftest.er1
10658 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010659 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010660 (exit $ac_status); } && {
10661 test -z "$ac_c_werror_flag" ||
10662 test ! -s conftest.err
10663 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010664 ac_hi=-1 ac_mid=-1
10665 while :; do
10666 cat >conftest.$ac_ext <<_ACEOF
10667/* confdefs.h. */
10668_ACEOF
10669cat confdefs.h >>conftest.$ac_ext
10670cat >>conftest.$ac_ext <<_ACEOF
10671/* end confdefs.h. */
10672$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010673 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010674int
10675main ()
10676{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010677static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010678test_array [0] = 0
10679
10680 ;
10681 return 0;
10682}
10683_ACEOF
10684rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010685if { (ac_try="$ac_compile"
10686case "(($ac_try" in
10687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10688 *) ac_try_echo=$ac_try;;
10689esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010691 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010692 ac_status=$?
10693 grep -v '^ *+' conftest.er1 >conftest.err
10694 rm -f conftest.er1
10695 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010697 (exit $ac_status); } && {
10698 test -z "$ac_c_werror_flag" ||
10699 test ! -s conftest.err
10700 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010701 ac_lo=$ac_mid; break
10702else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010703 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010704sed 's/^/| /' conftest.$ac_ext >&5
10705
Martin v. Löwiseba40652007-08-30 20:10:57 +000010706 ac_hi=`expr '(' $ac_mid ')' - 1`
10707 if test $ac_mid -le $ac_hi; then
10708 ac_lo= ac_hi=
10709 break
10710 fi
10711 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010712fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010713
10714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010715 done
10716else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010717 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010718sed 's/^/| /' conftest.$ac_ext >&5
10719
Martin v. Löwiseba40652007-08-30 20:10:57 +000010720 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010721fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010722
10723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010724fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010725
10726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010727# Binary search between lo and hi bounds.
10728while test "x$ac_lo" != "x$ac_hi"; do
10729 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10730 cat >conftest.$ac_ext <<_ACEOF
10731/* confdefs.h. */
10732_ACEOF
10733cat confdefs.h >>conftest.$ac_ext
10734cat >>conftest.$ac_ext <<_ACEOF
10735/* end confdefs.h. */
10736$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010737 typedef size_t ac__type_sizeof_;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010738int
10739main ()
10740{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010741static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010742test_array [0] = 0
10743
10744 ;
10745 return 0;
10746}
10747_ACEOF
10748rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010749if { (ac_try="$ac_compile"
10750case "(($ac_try" in
10751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10752 *) ac_try_echo=$ac_try;;
10753esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010754eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010755 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010756 ac_status=$?
10757 grep -v '^ *+' conftest.er1 >conftest.err
10758 rm -f conftest.er1
10759 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010761 (exit $ac_status); } && {
10762 test -z "$ac_c_werror_flag" ||
10763 test ! -s conftest.err
10764 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010765 ac_hi=$ac_mid
10766else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010767 echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010768sed 's/^/| /' conftest.$ac_ext >&5
10769
Martin v. Löwiseba40652007-08-30 20:10:57 +000010770 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010771fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010772
10773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010774done
10775case $ac_lo in
10776?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010777'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010778 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010779See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010780echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010781See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010782 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010783 else
10784 ac_cv_sizeof_size_t=0
10785 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010786esac
10787else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010788 cat >conftest.$ac_ext <<_ACEOF
10789/* confdefs.h. */
10790_ACEOF
10791cat confdefs.h >>conftest.$ac_ext
10792cat >>conftest.$ac_ext <<_ACEOF
10793/* end confdefs.h. */
10794$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010795 typedef size_t ac__type_sizeof_;
10796static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
10797static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010798#include <stdio.h>
10799#include <stdlib.h>
10800int
10801main ()
10802{
10803
10804 FILE *f = fopen ("conftest.val", "w");
10805 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010806 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010807 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010808 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010809 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010810 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010811 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010812 fprintf (f, "%ld\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010813 }
10814 else
10815 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010816 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010817 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010818 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010819 fprintf (f, "%lu\n", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010820 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010821 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010822
10823 ;
10824 return 0;
10825}
10826_ACEOF
10827rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010828if { (ac_try="$ac_link"
10829case "(($ac_try" in
10830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10831 *) ac_try_echo=$ac_try;;
10832esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010833eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010834 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010835 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010836 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010837 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010838 { (case "(($ac_try" in
10839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10840 *) ac_try_echo=$ac_try;;
10841esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010843 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010844 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010845 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010846 (exit $ac_status); }; }; then
10847 ac_cv_sizeof_size_t=`cat conftest.val`
10848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010849 echo "$as_me: program exited with status $ac_status" >&5
10850echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010851sed 's/^/| /' conftest.$ac_ext >&5
10852
10853( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010854if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010855 { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010856See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010857echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010858See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010859 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010860 else
10861 ac_cv_sizeof_size_t=0
10862 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010864rm -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 +000010865fi
10866rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010867fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010868{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10869echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010870
10871
10872
Martin v. Löwis18e16552006-02-15 17:27:45 +000010873cat >>confdefs.h <<_ACEOF
10874#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10875_ACEOF
10876
10877
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010878{ echo "$as_me:$LINENO: checking for pid_t" >&5
10879echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; }
10880if test "${ac_cv_type_pid_t+set}" = set; then
10881 echo $ECHO_N "(cached) $ECHO_C" >&6
10882else
10883 cat >conftest.$ac_ext <<_ACEOF
10884/* confdefs.h. */
10885_ACEOF
10886cat confdefs.h >>conftest.$ac_ext
10887cat >>conftest.$ac_ext <<_ACEOF
10888/* end confdefs.h. */
10889$ac_includes_default
10890typedef pid_t ac__type_new_;
10891int
10892main ()
10893{
10894if ((ac__type_new_ *) 0)
10895 return 0;
10896if (sizeof (ac__type_new_))
10897 return 0;
10898 ;
10899 return 0;
10900}
10901_ACEOF
10902rm -f conftest.$ac_objext
10903if { (ac_try="$ac_compile"
10904case "(($ac_try" in
10905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10906 *) ac_try_echo=$ac_try;;
10907esac
10908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10909 (eval "$ac_compile") 2>conftest.er1
10910 ac_status=$?
10911 grep -v '^ *+' conftest.er1 >conftest.err
10912 rm -f conftest.er1
10913 cat conftest.err >&5
10914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10915 (exit $ac_status); } && {
10916 test -z "$ac_c_werror_flag" ||
10917 test ! -s conftest.err
10918 } && test -s conftest.$ac_objext; then
10919 ac_cv_type_pid_t=yes
10920else
10921 echo "$as_me: failed program was:" >&5
10922sed 's/^/| /' conftest.$ac_ext >&5
10923
10924 ac_cv_type_pid_t=no
10925fi
10926
10927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10928fi
10929{ echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
10930echo "${ECHO_T}$ac_cv_type_pid_t" >&6; }
10931
Christian Heimes951cc0f2008-01-31 23:08:23 +000010932# The cast to long int works around a bug in the HP C Compiler
10933# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10934# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10935# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010936{ echo "$as_me:$LINENO: checking size of pid_t" >&5
10937echo $ECHO_N "checking size of pid_t... $ECHO_C" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010938if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010939 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010940else
10941 if test "$cross_compiling" = yes; then
10942 # Depending upon the size, compute the lo and hi bounds.
10943cat >conftest.$ac_ext <<_ACEOF
10944/* confdefs.h. */
10945_ACEOF
10946cat confdefs.h >>conftest.$ac_ext
10947cat >>conftest.$ac_ext <<_ACEOF
10948/* end confdefs.h. */
10949$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010950 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010951int
10952main ()
10953{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010954static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010955test_array [0] = 0
10956
10957 ;
10958 return 0;
10959}
10960_ACEOF
10961rm -f conftest.$ac_objext
10962if { (ac_try="$ac_compile"
10963case "(($ac_try" in
10964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10965 *) ac_try_echo=$ac_try;;
10966esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010968 (eval "$ac_compile") 2>conftest.er1
10969 ac_status=$?
10970 grep -v '^ *+' conftest.er1 >conftest.err
10971 rm -f conftest.er1
10972 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010974 (exit $ac_status); } && {
10975 test -z "$ac_c_werror_flag" ||
10976 test ! -s conftest.err
10977 } && test -s conftest.$ac_objext; then
10978 ac_lo=0 ac_mid=0
10979 while :; do
10980 cat >conftest.$ac_ext <<_ACEOF
10981/* confdefs.h. */
10982_ACEOF
10983cat confdefs.h >>conftest.$ac_ext
10984cat >>conftest.$ac_ext <<_ACEOF
10985/* end confdefs.h. */
10986$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010987 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000010988int
10989main ()
10990{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000010991static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010992test_array [0] = 0
10993
10994 ;
10995 return 0;
10996}
10997_ACEOF
10998rm -f conftest.$ac_objext
10999if { (ac_try="$ac_compile"
11000case "(($ac_try" in
11001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11002 *) ac_try_echo=$ac_try;;
11003esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011005 (eval "$ac_compile") 2>conftest.er1
11006 ac_status=$?
11007 grep -v '^ *+' conftest.er1 >conftest.err
11008 rm -f conftest.er1
11009 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011011 (exit $ac_status); } && {
11012 test -z "$ac_c_werror_flag" ||
11013 test ! -s conftest.err
11014 } && test -s conftest.$ac_objext; then
11015 ac_hi=$ac_mid; break
11016else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011017 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011018sed 's/^/| /' conftest.$ac_ext >&5
11019
11020 ac_lo=`expr $ac_mid + 1`
11021 if test $ac_lo -le $ac_mid; then
11022 ac_lo= ac_hi=
11023 break
11024 fi
11025 ac_mid=`expr 2 '*' $ac_mid + 1`
11026fi
11027
11028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11029 done
11030else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011031 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011032sed 's/^/| /' conftest.$ac_ext >&5
11033
11034 cat >conftest.$ac_ext <<_ACEOF
11035/* confdefs.h. */
11036_ACEOF
11037cat confdefs.h >>conftest.$ac_ext
11038cat >>conftest.$ac_ext <<_ACEOF
11039/* end confdefs.h. */
11040$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011041 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011042int
11043main ()
11044{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011045static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011046test_array [0] = 0
11047
11048 ;
11049 return 0;
11050}
11051_ACEOF
11052rm -f conftest.$ac_objext
11053if { (ac_try="$ac_compile"
11054case "(($ac_try" in
11055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11056 *) ac_try_echo=$ac_try;;
11057esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011058eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011059 (eval "$ac_compile") 2>conftest.er1
11060 ac_status=$?
11061 grep -v '^ *+' conftest.er1 >conftest.err
11062 rm -f conftest.er1
11063 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011064 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011065 (exit $ac_status); } && {
11066 test -z "$ac_c_werror_flag" ||
11067 test ! -s conftest.err
11068 } && test -s conftest.$ac_objext; then
11069 ac_hi=-1 ac_mid=-1
11070 while :; do
11071 cat >conftest.$ac_ext <<_ACEOF
11072/* confdefs.h. */
11073_ACEOF
11074cat confdefs.h >>conftest.$ac_ext
11075cat >>conftest.$ac_ext <<_ACEOF
11076/* end confdefs.h. */
11077$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011078 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011079int
11080main ()
11081{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011082static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011083test_array [0] = 0
11084
11085 ;
11086 return 0;
11087}
11088_ACEOF
11089rm -f conftest.$ac_objext
11090if { (ac_try="$ac_compile"
11091case "(($ac_try" in
11092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11093 *) ac_try_echo=$ac_try;;
11094esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011096 (eval "$ac_compile") 2>conftest.er1
11097 ac_status=$?
11098 grep -v '^ *+' conftest.er1 >conftest.err
11099 rm -f conftest.er1
11100 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011102 (exit $ac_status); } && {
11103 test -z "$ac_c_werror_flag" ||
11104 test ! -s conftest.err
11105 } && test -s conftest.$ac_objext; then
11106 ac_lo=$ac_mid; break
11107else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011108 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011109sed 's/^/| /' conftest.$ac_ext >&5
11110
11111 ac_hi=`expr '(' $ac_mid ')' - 1`
11112 if test $ac_mid -le $ac_hi; then
11113 ac_lo= ac_hi=
11114 break
11115 fi
11116 ac_mid=`expr 2 '*' $ac_mid`
11117fi
11118
11119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11120 done
11121else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011122 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011123sed 's/^/| /' conftest.$ac_ext >&5
11124
11125 ac_lo= ac_hi=
11126fi
11127
11128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11129fi
11130
11131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11132# Binary search between lo and hi bounds.
11133while test "x$ac_lo" != "x$ac_hi"; do
11134 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11135 cat >conftest.$ac_ext <<_ACEOF
11136/* confdefs.h. */
11137_ACEOF
11138cat confdefs.h >>conftest.$ac_ext
11139cat >>conftest.$ac_ext <<_ACEOF
11140/* end confdefs.h. */
11141$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011142 typedef pid_t ac__type_sizeof_;
Christian Heimes951cc0f2008-01-31 23:08:23 +000011143int
11144main ()
11145{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011146static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011147test_array [0] = 0
11148
11149 ;
11150 return 0;
11151}
11152_ACEOF
11153rm -f conftest.$ac_objext
11154if { (ac_try="$ac_compile"
11155case "(($ac_try" in
11156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11157 *) ac_try_echo=$ac_try;;
11158esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011160 (eval "$ac_compile") 2>conftest.er1
11161 ac_status=$?
11162 grep -v '^ *+' conftest.er1 >conftest.err
11163 rm -f conftest.er1
11164 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011166 (exit $ac_status); } && {
11167 test -z "$ac_c_werror_flag" ||
11168 test ! -s conftest.err
11169 } && test -s conftest.$ac_objext; then
11170 ac_hi=$ac_mid
11171else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011172 echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011173sed 's/^/| /' conftest.$ac_ext >&5
11174
11175 ac_lo=`expr '(' $ac_mid ')' + 1`
11176fi
11177
11178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11179done
11180case $ac_lo in
11181?*) ac_cv_sizeof_pid_t=$ac_lo;;
11182'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011183 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011184See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011185echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011186See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011187 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011188 else
11189 ac_cv_sizeof_pid_t=0
11190 fi ;;
11191esac
11192else
11193 cat >conftest.$ac_ext <<_ACEOF
11194/* confdefs.h. */
11195_ACEOF
11196cat confdefs.h >>conftest.$ac_ext
11197cat >>conftest.$ac_ext <<_ACEOF
11198/* end confdefs.h. */
11199$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011200 typedef pid_t ac__type_sizeof_;
11201static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11202static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011203#include <stdio.h>
11204#include <stdlib.h>
11205int
11206main ()
11207{
11208
11209 FILE *f = fopen ("conftest.val", "w");
11210 if (! f)
11211 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011212 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011213 {
11214 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011215 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011216 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011217 fprintf (f, "%ld\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011218 }
11219 else
11220 {
11221 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011222 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011223 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011224 fprintf (f, "%lu\n", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011225 }
11226 return ferror (f) || fclose (f) != 0;
11227
11228 ;
11229 return 0;
11230}
11231_ACEOF
11232rm -f conftest$ac_exeext
11233if { (ac_try="$ac_link"
11234case "(($ac_try" in
11235 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11236 *) ac_try_echo=$ac_try;;
11237esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011238eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011239 (eval "$ac_link") 2>&5
11240 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011241 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011242 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11243 { (case "(($ac_try" in
11244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11245 *) ac_try_echo=$ac_try;;
11246esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011248 (eval "$ac_try") 2>&5
11249 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011250 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011251 (exit $ac_status); }; }; then
11252 ac_cv_sizeof_pid_t=`cat conftest.val`
11253else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011254 echo "$as_me: program exited with status $ac_status" >&5
11255echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011256sed 's/^/| /' conftest.$ac_ext >&5
11257
11258( exit $ac_status )
11259if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011260 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011261See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011262echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011263See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011264 { (exit 77); exit 77; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011265 else
11266 ac_cv_sizeof_pid_t=0
11267 fi
11268fi
11269rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11270fi
11271rm -f conftest.val
11272fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011273{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11274echo "${ECHO_T}$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011275
11276
11277
11278cat >>confdefs.h <<_ACEOF
11279#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11280_ACEOF
11281
11282
Michael W. Hudson54241132001-12-07 15:38:26 +000011283
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011284{ echo "$as_me:$LINENO: checking for long long support" >&5
11285echo $ECHO_N "checking for long long support... $ECHO_C" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011286have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011287cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011288/* confdefs.h. */
11289_ACEOF
11290cat confdefs.h >>conftest.$ac_ext
11291cat >>conftest.$ac_ext <<_ACEOF
11292/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011293
Martin v. Löwis11437992002-04-12 09:54:03 +000011294int
11295main ()
11296{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011297long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011298 ;
11299 return 0;
11300}
11301_ACEOF
11302rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011303if { (ac_try="$ac_compile"
11304case "(($ac_try" in
11305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11306 *) ac_try_echo=$ac_try;;
11307esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011308eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011311 grep -v '^ *+' conftest.er1 >conftest.err
11312 rm -f conftest.er1
11313 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011314 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011315 (exit $ac_status); } && {
11316 test -z "$ac_c_werror_flag" ||
11317 test ! -s conftest.err
11318 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011319
11320
11321cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011322#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011323_ACEOF
11324
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011325 have_long_long=yes
11326
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011327else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011328 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011329sed 's/^/| /' conftest.$ac_ext >&5
11330
Martin v. Löwiseba40652007-08-30 20:10:57 +000011331
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011332fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011333
11334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011335{ echo "$as_me:$LINENO: result: $have_long_long" >&5
11336echo "${ECHO_T}$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011337if test "$have_long_long" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011338{ echo "$as_me:$LINENO: checking for long long" >&5
11339echo $ECHO_N "checking for long long... $ECHO_C" >&6; }
11340if test "${ac_cv_type_long_long+set}" = set; then
11341 echo $ECHO_N "(cached) $ECHO_C" >&6
11342else
11343 cat >conftest.$ac_ext <<_ACEOF
11344/* confdefs.h. */
11345_ACEOF
11346cat confdefs.h >>conftest.$ac_ext
11347cat >>conftest.$ac_ext <<_ACEOF
11348/* end confdefs.h. */
11349$ac_includes_default
11350typedef long long ac__type_new_;
11351int
11352main ()
11353{
11354if ((ac__type_new_ *) 0)
11355 return 0;
11356if (sizeof (ac__type_new_))
11357 return 0;
11358 ;
11359 return 0;
11360}
11361_ACEOF
11362rm -f conftest.$ac_objext
11363if { (ac_try="$ac_compile"
11364case "(($ac_try" in
11365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11366 *) ac_try_echo=$ac_try;;
11367esac
11368eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11369 (eval "$ac_compile") 2>conftest.er1
11370 ac_status=$?
11371 grep -v '^ *+' conftest.er1 >conftest.err
11372 rm -f conftest.er1
11373 cat conftest.err >&5
11374 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11375 (exit $ac_status); } && {
11376 test -z "$ac_c_werror_flag" ||
11377 test ! -s conftest.err
11378 } && test -s conftest.$ac_objext; then
11379 ac_cv_type_long_long=yes
11380else
11381 echo "$as_me: failed program was:" >&5
11382sed 's/^/| /' conftest.$ac_ext >&5
11383
11384 ac_cv_type_long_long=no
11385fi
11386
11387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11388fi
11389{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
11390echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
11391
Martin v. Löwiseba40652007-08-30 20:10:57 +000011392# The cast to long int works around a bug in the HP C Compiler
11393# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11394# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11395# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011396{ echo "$as_me:$LINENO: checking size of long long" >&5
11397echo $ECHO_N "checking size of long long... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011398if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011399 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011400else
Martin v. Löwis11437992002-04-12 09:54:03 +000011401 if test "$cross_compiling" = yes; then
11402 # Depending upon the size, compute the lo and hi bounds.
11403cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011404/* confdefs.h. */
11405_ACEOF
11406cat confdefs.h >>conftest.$ac_ext
11407cat >>conftest.$ac_ext <<_ACEOF
11408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011409$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011410 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011411int
11412main ()
11413{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011414static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011415test_array [0] = 0
11416
11417 ;
11418 return 0;
11419}
11420_ACEOF
11421rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011422if { (ac_try="$ac_compile"
11423case "(($ac_try" in
11424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11425 *) ac_try_echo=$ac_try;;
11426esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011430 grep -v '^ *+' conftest.er1 >conftest.err
11431 rm -f conftest.er1
11432 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011434 (exit $ac_status); } && {
11435 test -z "$ac_c_werror_flag" ||
11436 test ! -s conftest.err
11437 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 ac_lo=0 ac_mid=0
11439 while :; do
11440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011441/* confdefs.h. */
11442_ACEOF
11443cat confdefs.h >>conftest.$ac_ext
11444cat >>conftest.$ac_ext <<_ACEOF
11445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011446$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011447 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011448int
11449main ()
11450{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011451static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011452test_array [0] = 0
11453
11454 ;
11455 return 0;
11456}
11457_ACEOF
11458rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011459if { (ac_try="$ac_compile"
11460case "(($ac_try" in
11461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11462 *) ac_try_echo=$ac_try;;
11463esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011464eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011467 grep -v '^ *+' conftest.er1 >conftest.err
11468 rm -f conftest.er1
11469 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011470 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471 (exit $ac_status); } && {
11472 test -z "$ac_c_werror_flag" ||
11473 test ! -s conftest.err
11474 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011475 ac_hi=$ac_mid; break
11476else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011477 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011478sed 's/^/| /' conftest.$ac_ext >&5
11479
Martin v. Löwiseba40652007-08-30 20:10:57 +000011480 ac_lo=`expr $ac_mid + 1`
11481 if test $ac_lo -le $ac_mid; then
11482 ac_lo= ac_hi=
11483 break
11484 fi
11485 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011486fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011487
11488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011489 done
11490else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011491 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011492sed 's/^/| /' conftest.$ac_ext >&5
11493
Martin v. Löwiseba40652007-08-30 20:10:57 +000011494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011495/* confdefs.h. */
11496_ACEOF
11497cat confdefs.h >>conftest.$ac_ext
11498cat >>conftest.$ac_ext <<_ACEOF
11499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011500$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011501 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011502int
11503main ()
11504{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011505static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011506test_array [0] = 0
11507
11508 ;
11509 return 0;
11510}
11511_ACEOF
11512rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011513if { (ac_try="$ac_compile"
11514case "(($ac_try" in
11515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11516 *) ac_try_echo=$ac_try;;
11517esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011518eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011519 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011520 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011521 grep -v '^ *+' conftest.er1 >conftest.err
11522 rm -f conftest.er1
11523 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011524 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011525 (exit $ac_status); } && {
11526 test -z "$ac_c_werror_flag" ||
11527 test ! -s conftest.err
11528 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011529 ac_hi=-1 ac_mid=-1
11530 while :; do
11531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011532/* confdefs.h. */
11533_ACEOF
11534cat confdefs.h >>conftest.$ac_ext
11535cat >>conftest.$ac_ext <<_ACEOF
11536/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011537$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011538 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011539int
11540main ()
11541{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011542static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011543test_array [0] = 0
11544
11545 ;
11546 return 0;
11547}
11548_ACEOF
11549rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011550if { (ac_try="$ac_compile"
11551case "(($ac_try" in
11552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11553 *) ac_try_echo=$ac_try;;
11554esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011556 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011558 grep -v '^ *+' conftest.er1 >conftest.err
11559 rm -f conftest.er1
11560 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011562 (exit $ac_status); } && {
11563 test -z "$ac_c_werror_flag" ||
11564 test ! -s conftest.err
11565 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011566 ac_lo=$ac_mid; break
11567else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011568 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011569sed 's/^/| /' conftest.$ac_ext >&5
11570
Martin v. Löwiseba40652007-08-30 20:10:57 +000011571 ac_hi=`expr '(' $ac_mid ')' - 1`
11572 if test $ac_mid -le $ac_hi; then
11573 ac_lo= ac_hi=
11574 break
11575 fi
11576 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011578
11579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011580 done
11581else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011582 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011583sed 's/^/| /' conftest.$ac_ext >&5
11584
Martin v. Löwiseba40652007-08-30 20:10:57 +000011585 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011586fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011587
11588rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011590
11591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011592# Binary search between lo and hi bounds.
11593while test "x$ac_lo" != "x$ac_hi"; do
11594 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11595 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011596/* confdefs.h. */
11597_ACEOF
11598cat confdefs.h >>conftest.$ac_ext
11599cat >>conftest.$ac_ext <<_ACEOF
11600/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011601$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011602 typedef long long ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000011603int
11604main ()
11605{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011606static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011607test_array [0] = 0
11608
11609 ;
11610 return 0;
11611}
11612_ACEOF
11613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011614if { (ac_try="$ac_compile"
11615case "(($ac_try" in
11616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11617 *) ac_try_echo=$ac_try;;
11618esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011622 grep -v '^ *+' conftest.er1 >conftest.err
11623 rm -f conftest.er1
11624 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011626 (exit $ac_status); } && {
11627 test -z "$ac_c_werror_flag" ||
11628 test ! -s conftest.err
11629 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011630 ac_hi=$ac_mid
11631else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011632 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011633sed 's/^/| /' conftest.$ac_ext >&5
11634
Martin v. Löwiseba40652007-08-30 20:10:57 +000011635 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011636fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011637
11638rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011639done
11640case $ac_lo in
11641?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011642'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011643 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011644See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011645echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011646See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011647 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011648 else
11649 ac_cv_sizeof_long_long=0
11650 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011651esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011652else
Martin v. Löwis11437992002-04-12 09:54:03 +000011653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011654/* confdefs.h. */
11655_ACEOF
11656cat confdefs.h >>conftest.$ac_ext
11657cat >>conftest.$ac_ext <<_ACEOF
11658/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011659$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011660 typedef long long ac__type_sizeof_;
11661static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
11662static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011663#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011664#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011665int
11666main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011667{
Martin v. Löwis11437992002-04-12 09:54:03 +000011668
11669 FILE *f = fopen ("conftest.val", "w");
11670 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011671 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011672 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011673 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011674 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011675 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011676 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011677 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011678 }
11679 else
11680 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011681 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011682 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011683 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011684 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011685 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011686 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011687
11688 ;
11689 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011690}
Martin v. Löwis11437992002-04-12 09:54:03 +000011691_ACEOF
11692rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011693if { (ac_try="$ac_link"
11694case "(($ac_try" in
11695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11696 *) ac_try_echo=$ac_try;;
11697esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011699 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011701 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011702 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011703 { (case "(($ac_try" in
11704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11705 *) ac_try_echo=$ac_try;;
11706esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011707eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011708 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011709 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011710 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011711 (exit $ac_status); }; }; then
11712 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011713else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011714 echo "$as_me: program exited with status $ac_status" >&5
11715echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011716sed 's/^/| /' conftest.$ac_ext >&5
11717
Martin v. Löwis11437992002-04-12 09:54:03 +000011718( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011719if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011720 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011721See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011722echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011723See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011724 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011725 else
11726 ac_cv_sizeof_long_long=0
11727 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011728fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011729rm -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 +000011730fi
11731rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011732fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011733{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11734echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011735
11736
11737
Martin v. Löwis11437992002-04-12 09:54:03 +000011738cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011739#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011740_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011741
Michael W. Hudson54241132001-12-07 15:38:26 +000011742
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011743fi
11744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011745{ echo "$as_me:$LINENO: checking for long double support" >&5
11746echo $ECHO_N "checking for long double support... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011747have_long_double=no
11748cat >conftest.$ac_ext <<_ACEOF
11749/* confdefs.h. */
11750_ACEOF
11751cat confdefs.h >>conftest.$ac_ext
11752cat >>conftest.$ac_ext <<_ACEOF
11753/* end confdefs.h. */
11754
11755int
11756main ()
11757{
11758long double x; x = (long double)0.;
11759 ;
11760 return 0;
11761}
11762_ACEOF
11763rm -f conftest.$ac_objext
11764if { (ac_try="$ac_compile"
11765case "(($ac_try" in
11766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11767 *) ac_try_echo=$ac_try;;
11768esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011769eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011770 (eval "$ac_compile") 2>conftest.er1
11771 ac_status=$?
11772 grep -v '^ *+' conftest.er1 >conftest.err
11773 rm -f conftest.er1
11774 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011775 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011776 (exit $ac_status); } && {
11777 test -z "$ac_c_werror_flag" ||
11778 test ! -s conftest.err
11779 } && test -s conftest.$ac_objext; then
11780
11781
11782cat >>confdefs.h <<\_ACEOF
11783#define HAVE_LONG_DOUBLE 1
11784_ACEOF
11785
11786 have_long_double=yes
11787
11788else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011789 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011790sed 's/^/| /' conftest.$ac_ext >&5
11791
11792
11793fi
11794
11795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011796{ echo "$as_me:$LINENO: result: $have_long_double" >&5
11797echo "${ECHO_T}$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011798if test "$have_long_double" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011799{ echo "$as_me:$LINENO: checking for long double" >&5
11800echo $ECHO_N "checking for long double... $ECHO_C" >&6; }
11801if test "${ac_cv_type_long_double+set}" = set; then
11802 echo $ECHO_N "(cached) $ECHO_C" >&6
11803else
11804 cat >conftest.$ac_ext <<_ACEOF
11805/* confdefs.h. */
11806_ACEOF
11807cat confdefs.h >>conftest.$ac_ext
11808cat >>conftest.$ac_ext <<_ACEOF
11809/* end confdefs.h. */
11810$ac_includes_default
11811typedef long double ac__type_new_;
11812int
11813main ()
11814{
11815if ((ac__type_new_ *) 0)
11816 return 0;
11817if (sizeof (ac__type_new_))
11818 return 0;
11819 ;
11820 return 0;
11821}
11822_ACEOF
11823rm -f conftest.$ac_objext
11824if { (ac_try="$ac_compile"
11825case "(($ac_try" in
11826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11827 *) ac_try_echo=$ac_try;;
11828esac
11829eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11830 (eval "$ac_compile") 2>conftest.er1
11831 ac_status=$?
11832 grep -v '^ *+' conftest.er1 >conftest.err
11833 rm -f conftest.er1
11834 cat conftest.err >&5
11835 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11836 (exit $ac_status); } && {
11837 test -z "$ac_c_werror_flag" ||
11838 test ! -s conftest.err
11839 } && test -s conftest.$ac_objext; then
11840 ac_cv_type_long_double=yes
11841else
11842 echo "$as_me: failed program was:" >&5
11843sed 's/^/| /' conftest.$ac_ext >&5
11844
11845 ac_cv_type_long_double=no
11846fi
11847
11848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11849fi
11850{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
11851echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
11852
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011853# The cast to long int works around a bug in the HP C Compiler
11854# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11855# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11856# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011857{ echo "$as_me:$LINENO: checking size of long double" >&5
11858echo $ECHO_N "checking size of long double... $ECHO_C" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011859if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011860 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011861else
11862 if test "$cross_compiling" = yes; then
11863 # Depending upon the size, compute the lo and hi bounds.
11864cat >conftest.$ac_ext <<_ACEOF
11865/* confdefs.h. */
11866_ACEOF
11867cat confdefs.h >>conftest.$ac_ext
11868cat >>conftest.$ac_ext <<_ACEOF
11869/* end confdefs.h. */
11870$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011871 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011872int
11873main ()
11874{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011875static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011876test_array [0] = 0
11877
11878 ;
11879 return 0;
11880}
11881_ACEOF
11882rm -f conftest.$ac_objext
11883if { (ac_try="$ac_compile"
11884case "(($ac_try" in
11885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11886 *) ac_try_echo=$ac_try;;
11887esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011889 (eval "$ac_compile") 2>conftest.er1
11890 ac_status=$?
11891 grep -v '^ *+' conftest.er1 >conftest.err
11892 rm -f conftest.er1
11893 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011895 (exit $ac_status); } && {
11896 test -z "$ac_c_werror_flag" ||
11897 test ! -s conftest.err
11898 } && test -s conftest.$ac_objext; then
11899 ac_lo=0 ac_mid=0
11900 while :; do
11901 cat >conftest.$ac_ext <<_ACEOF
11902/* confdefs.h. */
11903_ACEOF
11904cat confdefs.h >>conftest.$ac_ext
11905cat >>conftest.$ac_ext <<_ACEOF
11906/* end confdefs.h. */
11907$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011908 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011909int
11910main ()
11911{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011912static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011913test_array [0] = 0
11914
11915 ;
11916 return 0;
11917}
11918_ACEOF
11919rm -f conftest.$ac_objext
11920if { (ac_try="$ac_compile"
11921case "(($ac_try" in
11922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11923 *) ac_try_echo=$ac_try;;
11924esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011926 (eval "$ac_compile") 2>conftest.er1
11927 ac_status=$?
11928 grep -v '^ *+' conftest.er1 >conftest.err
11929 rm -f conftest.er1
11930 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011932 (exit $ac_status); } && {
11933 test -z "$ac_c_werror_flag" ||
11934 test ! -s conftest.err
11935 } && test -s conftest.$ac_objext; then
11936 ac_hi=$ac_mid; break
11937else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011938 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011939sed 's/^/| /' conftest.$ac_ext >&5
11940
11941 ac_lo=`expr $ac_mid + 1`
11942 if test $ac_lo -le $ac_mid; then
11943 ac_lo= ac_hi=
11944 break
11945 fi
11946 ac_mid=`expr 2 '*' $ac_mid + 1`
11947fi
11948
11949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11950 done
11951else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011952 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011953sed 's/^/| /' conftest.$ac_ext >&5
11954
11955 cat >conftest.$ac_ext <<_ACEOF
11956/* confdefs.h. */
11957_ACEOF
11958cat confdefs.h >>conftest.$ac_ext
11959cat >>conftest.$ac_ext <<_ACEOF
11960/* end confdefs.h. */
11961$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011962 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011963int
11964main ()
11965{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011966static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011967test_array [0] = 0
11968
11969 ;
11970 return 0;
11971}
11972_ACEOF
11973rm -f conftest.$ac_objext
11974if { (ac_try="$ac_compile"
11975case "(($ac_try" in
11976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11977 *) ac_try_echo=$ac_try;;
11978esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011979eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011980 (eval "$ac_compile") 2>conftest.er1
11981 ac_status=$?
11982 grep -v '^ *+' conftest.er1 >conftest.err
11983 rm -f conftest.er1
11984 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011986 (exit $ac_status); } && {
11987 test -z "$ac_c_werror_flag" ||
11988 test ! -s conftest.err
11989 } && test -s conftest.$ac_objext; then
11990 ac_hi=-1 ac_mid=-1
11991 while :; do
11992 cat >conftest.$ac_ext <<_ACEOF
11993/* confdefs.h. */
11994_ACEOF
11995cat confdefs.h >>conftest.$ac_ext
11996cat >>conftest.$ac_ext <<_ACEOF
11997/* end confdefs.h. */
11998$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000011999 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012000int
12001main ()
12002{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012003static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012004test_array [0] = 0
12005
12006 ;
12007 return 0;
12008}
12009_ACEOF
12010rm -f conftest.$ac_objext
12011if { (ac_try="$ac_compile"
12012case "(($ac_try" in
12013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12014 *) ac_try_echo=$ac_try;;
12015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012017 (eval "$ac_compile") 2>conftest.er1
12018 ac_status=$?
12019 grep -v '^ *+' conftest.er1 >conftest.err
12020 rm -f conftest.er1
12021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012023 (exit $ac_status); } && {
12024 test -z "$ac_c_werror_flag" ||
12025 test ! -s conftest.err
12026 } && test -s conftest.$ac_objext; then
12027 ac_lo=$ac_mid; break
12028else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012029 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012030sed 's/^/| /' conftest.$ac_ext >&5
12031
12032 ac_hi=`expr '(' $ac_mid ')' - 1`
12033 if test $ac_mid -le $ac_hi; then
12034 ac_lo= ac_hi=
12035 break
12036 fi
12037 ac_mid=`expr 2 '*' $ac_mid`
12038fi
12039
12040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12041 done
12042else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012043 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012044sed 's/^/| /' conftest.$ac_ext >&5
12045
12046 ac_lo= ac_hi=
12047fi
12048
12049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12050fi
12051
12052rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12053# Binary search between lo and hi bounds.
12054while test "x$ac_lo" != "x$ac_hi"; do
12055 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12056 cat >conftest.$ac_ext <<_ACEOF
12057/* confdefs.h. */
12058_ACEOF
12059cat confdefs.h >>conftest.$ac_ext
12060cat >>conftest.$ac_ext <<_ACEOF
12061/* end confdefs.h. */
12062$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012063 typedef long double ac__type_sizeof_;
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012064int
12065main ()
12066{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012067static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012068test_array [0] = 0
12069
12070 ;
12071 return 0;
12072}
12073_ACEOF
12074rm -f conftest.$ac_objext
12075if { (ac_try="$ac_compile"
12076case "(($ac_try" in
12077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12078 *) ac_try_echo=$ac_try;;
12079esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012080eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012081 (eval "$ac_compile") 2>conftest.er1
12082 ac_status=$?
12083 grep -v '^ *+' conftest.er1 >conftest.err
12084 rm -f conftest.er1
12085 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012086 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012087 (exit $ac_status); } && {
12088 test -z "$ac_c_werror_flag" ||
12089 test ! -s conftest.err
12090 } && test -s conftest.$ac_objext; then
12091 ac_hi=$ac_mid
12092else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012093 echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012094sed 's/^/| /' conftest.$ac_ext >&5
12095
12096 ac_lo=`expr '(' $ac_mid ')' + 1`
12097fi
12098
12099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12100done
12101case $ac_lo in
12102?*) ac_cv_sizeof_long_double=$ac_lo;;
12103'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012104 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012105See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012106echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012107See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012108 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012109 else
12110 ac_cv_sizeof_long_double=0
12111 fi ;;
12112esac
12113else
12114 cat >conftest.$ac_ext <<_ACEOF
12115/* confdefs.h. */
12116_ACEOF
12117cat confdefs.h >>conftest.$ac_ext
12118cat >>conftest.$ac_ext <<_ACEOF
12119/* end confdefs.h. */
12120$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012121 typedef long double ac__type_sizeof_;
12122static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12123static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012124#include <stdio.h>
12125#include <stdlib.h>
12126int
12127main ()
12128{
12129
12130 FILE *f = fopen ("conftest.val", "w");
12131 if (! f)
12132 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012133 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012134 {
12135 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012136 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012137 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012138 fprintf (f, "%ld\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012139 }
12140 else
12141 {
12142 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012143 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012144 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012145 fprintf (f, "%lu\n", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012146 }
12147 return ferror (f) || fclose (f) != 0;
12148
12149 ;
12150 return 0;
12151}
12152_ACEOF
12153rm -f conftest$ac_exeext
12154if { (ac_try="$ac_link"
12155case "(($ac_try" in
12156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12157 *) ac_try_echo=$ac_try;;
12158esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012160 (eval "$ac_link") 2>&5
12161 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012163 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12164 { (case "(($ac_try" in
12165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12166 *) ac_try_echo=$ac_try;;
12167esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012168eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012169 (eval "$ac_try") 2>&5
12170 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012171 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012172 (exit $ac_status); }; }; then
12173 ac_cv_sizeof_long_double=`cat conftest.val`
12174else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012175 echo "$as_me: program exited with status $ac_status" >&5
12176echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012177sed 's/^/| /' conftest.$ac_ext >&5
12178
12179( exit $ac_status )
12180if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012181 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012182See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012183echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012184See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012185 { (exit 77); exit 77; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012186 else
12187 ac_cv_sizeof_long_double=0
12188 fi
12189fi
12190rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12191fi
12192rm -f conftest.val
12193fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012194{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12195echo "${ECHO_T}$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012196
12197
12198
12199cat >>confdefs.h <<_ACEOF
12200#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12201_ACEOF
12202
12203
12204fi
12205
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012206{ echo "$as_me:$LINENO: checking for _Bool support" >&5
12207echo $ECHO_N "checking for _Bool support... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012208have_c99_bool=no
12209cat >conftest.$ac_ext <<_ACEOF
12210/* confdefs.h. */
12211_ACEOF
12212cat confdefs.h >>conftest.$ac_ext
12213cat >>conftest.$ac_ext <<_ACEOF
12214/* end confdefs.h. */
12215
12216int
12217main ()
12218{
12219_Bool x; x = (_Bool)0;
12220 ;
12221 return 0;
12222}
12223_ACEOF
12224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012225if { (ac_try="$ac_compile"
12226case "(($ac_try" in
12227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12228 *) ac_try_echo=$ac_try;;
12229esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012230eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012232 ac_status=$?
12233 grep -v '^ *+' conftest.er1 >conftest.err
12234 rm -f conftest.er1
12235 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012236 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012237 (exit $ac_status); } && {
12238 test -z "$ac_c_werror_flag" ||
12239 test ! -s conftest.err
12240 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012241
12242
12243cat >>confdefs.h <<\_ACEOF
12244#define HAVE_C99_BOOL 1
12245_ACEOF
12246
12247 have_c99_bool=yes
12248
12249else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012250 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012251sed 's/^/| /' conftest.$ac_ext >&5
12252
Martin v. Löwiseba40652007-08-30 20:10:57 +000012253
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012254fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012255
12256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012257{ echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12258echo "${ECHO_T}$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012259if test "$have_c99_bool" = yes ; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012260{ echo "$as_me:$LINENO: checking for _Bool" >&5
12261echo $ECHO_N "checking for _Bool... $ECHO_C" >&6; }
12262if test "${ac_cv_type__Bool+set}" = set; then
12263 echo $ECHO_N "(cached) $ECHO_C" >&6
12264else
12265 cat >conftest.$ac_ext <<_ACEOF
12266/* confdefs.h. */
12267_ACEOF
12268cat confdefs.h >>conftest.$ac_ext
12269cat >>conftest.$ac_ext <<_ACEOF
12270/* end confdefs.h. */
12271$ac_includes_default
12272typedef _Bool ac__type_new_;
12273int
12274main ()
12275{
12276if ((ac__type_new_ *) 0)
12277 return 0;
12278if (sizeof (ac__type_new_))
12279 return 0;
12280 ;
12281 return 0;
12282}
12283_ACEOF
12284rm -f conftest.$ac_objext
12285if { (ac_try="$ac_compile"
12286case "(($ac_try" in
12287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12288 *) ac_try_echo=$ac_try;;
12289esac
12290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12291 (eval "$ac_compile") 2>conftest.er1
12292 ac_status=$?
12293 grep -v '^ *+' conftest.er1 >conftest.err
12294 rm -f conftest.er1
12295 cat conftest.err >&5
12296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12297 (exit $ac_status); } && {
12298 test -z "$ac_c_werror_flag" ||
12299 test ! -s conftest.err
12300 } && test -s conftest.$ac_objext; then
12301 ac_cv_type__Bool=yes
12302else
12303 echo "$as_me: failed program was:" >&5
12304sed 's/^/| /' conftest.$ac_ext >&5
12305
12306 ac_cv_type__Bool=no
12307fi
12308
12309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12310fi
12311{ echo "$as_me:$LINENO: result: $ac_cv_type__Bool" >&5
12312echo "${ECHO_T}$ac_cv_type__Bool" >&6; }
12313
Martin v. Löwiseba40652007-08-30 20:10:57 +000012314# The cast to long int works around a bug in the HP C Compiler
12315# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12316# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12317# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012318{ echo "$as_me:$LINENO: checking size of _Bool" >&5
12319echo $ECHO_N "checking size of _Bool... $ECHO_C" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012320if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012321 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012322else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012323 if test "$cross_compiling" = yes; then
12324 # Depending upon the size, compute the lo and hi bounds.
12325cat >conftest.$ac_ext <<_ACEOF
12326/* confdefs.h. */
12327_ACEOF
12328cat confdefs.h >>conftest.$ac_ext
12329cat >>conftest.$ac_ext <<_ACEOF
12330/* end confdefs.h. */
12331$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012332 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012333int
12334main ()
12335{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012336static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012337test_array [0] = 0
12338
12339 ;
12340 return 0;
12341}
12342_ACEOF
12343rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012344if { (ac_try="$ac_compile"
12345case "(($ac_try" in
12346 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12347 *) ac_try_echo=$ac_try;;
12348esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012349eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012351 ac_status=$?
12352 grep -v '^ *+' conftest.er1 >conftest.err
12353 rm -f conftest.er1
12354 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012355 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012356 (exit $ac_status); } && {
12357 test -z "$ac_c_werror_flag" ||
12358 test ! -s conftest.err
12359 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012360 ac_lo=0 ac_mid=0
12361 while :; do
12362 cat >conftest.$ac_ext <<_ACEOF
12363/* confdefs.h. */
12364_ACEOF
12365cat confdefs.h >>conftest.$ac_ext
12366cat >>conftest.$ac_ext <<_ACEOF
12367/* end confdefs.h. */
12368$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012369 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012370int
12371main ()
12372{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012373static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012374test_array [0] = 0
12375
12376 ;
12377 return 0;
12378}
12379_ACEOF
12380rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012381if { (ac_try="$ac_compile"
12382case "(($ac_try" in
12383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12384 *) ac_try_echo=$ac_try;;
12385esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012387 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012388 ac_status=$?
12389 grep -v '^ *+' conftest.er1 >conftest.err
12390 rm -f conftest.er1
12391 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012393 (exit $ac_status); } && {
12394 test -z "$ac_c_werror_flag" ||
12395 test ! -s conftest.err
12396 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012397 ac_hi=$ac_mid; break
12398else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012399 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012400sed 's/^/| /' conftest.$ac_ext >&5
12401
Martin v. Löwiseba40652007-08-30 20:10:57 +000012402 ac_lo=`expr $ac_mid + 1`
12403 if test $ac_lo -le $ac_mid; then
12404 ac_lo= ac_hi=
12405 break
12406 fi
12407 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012408fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012409
12410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012411 done
12412else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012413 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012414sed 's/^/| /' conftest.$ac_ext >&5
12415
Martin v. Löwiseba40652007-08-30 20:10:57 +000012416 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012417/* confdefs.h. */
12418_ACEOF
12419cat confdefs.h >>conftest.$ac_ext
12420cat >>conftest.$ac_ext <<_ACEOF
12421/* end confdefs.h. */
12422$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012423 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012424int
12425main ()
12426{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012427static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012428test_array [0] = 0
12429
12430 ;
12431 return 0;
12432}
12433_ACEOF
12434rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012435if { (ac_try="$ac_compile"
12436case "(($ac_try" in
12437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12438 *) ac_try_echo=$ac_try;;
12439esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012440eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012442 ac_status=$?
12443 grep -v '^ *+' conftest.er1 >conftest.err
12444 rm -f conftest.er1
12445 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012446 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012447 (exit $ac_status); } && {
12448 test -z "$ac_c_werror_flag" ||
12449 test ! -s conftest.err
12450 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012451 ac_hi=-1 ac_mid=-1
12452 while :; do
12453 cat >conftest.$ac_ext <<_ACEOF
12454/* confdefs.h. */
12455_ACEOF
12456cat confdefs.h >>conftest.$ac_ext
12457cat >>conftest.$ac_ext <<_ACEOF
12458/* end confdefs.h. */
12459$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012460 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012461int
12462main ()
12463{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012464static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012465test_array [0] = 0
12466
12467 ;
12468 return 0;
12469}
12470_ACEOF
12471rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012472if { (ac_try="$ac_compile"
12473case "(($ac_try" in
12474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12475 *) ac_try_echo=$ac_try;;
12476esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012479 ac_status=$?
12480 grep -v '^ *+' conftest.er1 >conftest.err
12481 rm -f conftest.er1
12482 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012484 (exit $ac_status); } && {
12485 test -z "$ac_c_werror_flag" ||
12486 test ! -s conftest.err
12487 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012488 ac_lo=$ac_mid; break
12489else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012490 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012491sed 's/^/| /' conftest.$ac_ext >&5
12492
Martin v. Löwiseba40652007-08-30 20:10:57 +000012493 ac_hi=`expr '(' $ac_mid ')' - 1`
12494 if test $ac_mid -le $ac_hi; then
12495 ac_lo= ac_hi=
12496 break
12497 fi
12498 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012500
12501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012502 done
12503else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012504 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012505sed 's/^/| /' conftest.$ac_ext >&5
12506
Martin v. Löwiseba40652007-08-30 20:10:57 +000012507 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012508fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012509
12510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012511fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012512
12513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012514# Binary search between lo and hi bounds.
12515while test "x$ac_lo" != "x$ac_hi"; do
12516 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12517 cat >conftest.$ac_ext <<_ACEOF
12518/* confdefs.h. */
12519_ACEOF
12520cat confdefs.h >>conftest.$ac_ext
12521cat >>conftest.$ac_ext <<_ACEOF
12522/* end confdefs.h. */
12523$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012524 typedef _Bool ac__type_sizeof_;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012525int
12526main ()
12527{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012528static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012529test_array [0] = 0
12530
12531 ;
12532 return 0;
12533}
12534_ACEOF
12535rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012536if { (ac_try="$ac_compile"
12537case "(($ac_try" in
12538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12539 *) ac_try_echo=$ac_try;;
12540esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012542 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012543 ac_status=$?
12544 grep -v '^ *+' conftest.er1 >conftest.err
12545 rm -f conftest.er1
12546 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012548 (exit $ac_status); } && {
12549 test -z "$ac_c_werror_flag" ||
12550 test ! -s conftest.err
12551 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012552 ac_hi=$ac_mid
12553else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012554 echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012555sed 's/^/| /' conftest.$ac_ext >&5
12556
Martin v. Löwiseba40652007-08-30 20:10:57 +000012557 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012558fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012559
12560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012561done
12562case $ac_lo in
12563?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012564'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012565 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012566See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012567echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012568See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012569 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012570 else
12571 ac_cv_sizeof__Bool=0
12572 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012573esac
12574else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012575 cat >conftest.$ac_ext <<_ACEOF
12576/* confdefs.h. */
12577_ACEOF
12578cat confdefs.h >>conftest.$ac_ext
12579cat >>conftest.$ac_ext <<_ACEOF
12580/* end confdefs.h. */
12581$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012582 typedef _Bool ac__type_sizeof_;
12583static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
12584static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012585#include <stdio.h>
12586#include <stdlib.h>
12587int
12588main ()
12589{
12590
12591 FILE *f = fopen ("conftest.val", "w");
12592 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012593 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012594 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012595 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012596 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012597 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012598 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012599 fprintf (f, "%ld\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012600 }
12601 else
12602 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012603 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012604 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012605 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012606 fprintf (f, "%lu\n", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012607 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012608 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012609
12610 ;
12611 return 0;
12612}
12613_ACEOF
12614rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012615if { (ac_try="$ac_link"
12616case "(($ac_try" in
12617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12618 *) ac_try_echo=$ac_try;;
12619esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012621 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012622 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012624 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012625 { (case "(($ac_try" in
12626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12627 *) ac_try_echo=$ac_try;;
12628esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012630 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012631 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012633 (exit $ac_status); }; }; then
12634 ac_cv_sizeof__Bool=`cat conftest.val`
12635else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012636 echo "$as_me: program exited with status $ac_status" >&5
12637echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012638sed 's/^/| /' conftest.$ac_ext >&5
12639
12640( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012641if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012642 { { echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012643See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012644echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012645See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012646 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012647 else
12648 ac_cv_sizeof__Bool=0
12649 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012650fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012651rm -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 +000012652fi
12653rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012654fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012655{ echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12656echo "${ECHO_T}$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012657
12658
12659
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012660cat >>confdefs.h <<_ACEOF
12661#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12662_ACEOF
12663
12664
12665fi
12666
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012667{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12668echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012669if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012670 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012671else
12672 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012673/* confdefs.h. */
12674_ACEOF
12675cat confdefs.h >>conftest.$ac_ext
12676cat >>conftest.$ac_ext <<_ACEOF
12677/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012678#ifdef HAVE_STDINT_H
12679 #include <stdint.h>
12680 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012681
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012682typedef uintptr_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012683int
12684main ()
12685{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012686if ((ac__type_new_ *) 0)
12687 return 0;
12688if (sizeof (ac__type_new_))
12689 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012690 ;
12691 return 0;
12692}
12693_ACEOF
12694rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012695if { (ac_try="$ac_compile"
12696case "(($ac_try" in
12697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12698 *) ac_try_echo=$ac_try;;
12699esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012703 grep -v '^ *+' conftest.er1 >conftest.err
12704 rm -f conftest.er1
12705 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012707 (exit $ac_status); } && {
12708 test -z "$ac_c_werror_flag" ||
12709 test ! -s conftest.err
12710 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012711 ac_cv_type_uintptr_t=yes
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012712else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012713 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012714sed 's/^/| /' conftest.$ac_ext >&5
12715
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012716 ac_cv_type_uintptr_t=no
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012718
12719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012720fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012721{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12722echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12723if test $ac_cv_type_uintptr_t = yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012724
12725cat >>confdefs.h <<_ACEOF
12726#define HAVE_UINTPTR_T 1
12727_ACEOF
12728
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012729{ echo "$as_me:$LINENO: checking for uintptr_t" >&5
12730echo $ECHO_N "checking for uintptr_t... $ECHO_C" >&6; }
12731if test "${ac_cv_type_uintptr_t+set}" = set; then
12732 echo $ECHO_N "(cached) $ECHO_C" >&6
12733else
12734 cat >conftest.$ac_ext <<_ACEOF
12735/* confdefs.h. */
12736_ACEOF
12737cat confdefs.h >>conftest.$ac_ext
12738cat >>conftest.$ac_ext <<_ACEOF
12739/* end confdefs.h. */
12740$ac_includes_default
12741typedef uintptr_t ac__type_new_;
12742int
12743main ()
12744{
12745if ((ac__type_new_ *) 0)
12746 return 0;
12747if (sizeof (ac__type_new_))
12748 return 0;
12749 ;
12750 return 0;
12751}
12752_ACEOF
12753rm -f conftest.$ac_objext
12754if { (ac_try="$ac_compile"
12755case "(($ac_try" in
12756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12757 *) ac_try_echo=$ac_try;;
12758esac
12759eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12760 (eval "$ac_compile") 2>conftest.er1
12761 ac_status=$?
12762 grep -v '^ *+' conftest.er1 >conftest.err
12763 rm -f conftest.er1
12764 cat conftest.err >&5
12765 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12766 (exit $ac_status); } && {
12767 test -z "$ac_c_werror_flag" ||
12768 test ! -s conftest.err
12769 } && test -s conftest.$ac_objext; then
12770 ac_cv_type_uintptr_t=yes
12771else
12772 echo "$as_me: failed program was:" >&5
12773sed 's/^/| /' conftest.$ac_ext >&5
12774
12775 ac_cv_type_uintptr_t=no
12776fi
12777
12778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12779fi
12780{ echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12781echo "${ECHO_T}$ac_cv_type_uintptr_t" >&6; }
12782
Martin v. Löwiseba40652007-08-30 20:10:57 +000012783# The cast to long int works around a bug in the HP C Compiler
12784# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12785# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12786# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012787{ echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12788echo $ECHO_N "checking size of uintptr_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012789if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012790 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012791else
Martin v. Löwis11437992002-04-12 09:54:03 +000012792 if test "$cross_compiling" = yes; then
12793 # Depending upon the size, compute the lo and hi bounds.
12794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012795/* confdefs.h. */
12796_ACEOF
12797cat confdefs.h >>conftest.$ac_ext
12798cat >>conftest.$ac_ext <<_ACEOF
12799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012800$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012801 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012802int
12803main ()
12804{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012805static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012806test_array [0] = 0
12807
12808 ;
12809 return 0;
12810}
12811_ACEOF
12812rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012813if { (ac_try="$ac_compile"
12814case "(($ac_try" in
12815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12816 *) ac_try_echo=$ac_try;;
12817esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012818eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012819 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012820 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012821 grep -v '^ *+' conftest.er1 >conftest.err
12822 rm -f conftest.er1
12823 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012824 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012825 (exit $ac_status); } && {
12826 test -z "$ac_c_werror_flag" ||
12827 test ! -s conftest.err
12828 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012829 ac_lo=0 ac_mid=0
12830 while :; do
12831 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012832/* confdefs.h. */
12833_ACEOF
12834cat confdefs.h >>conftest.$ac_ext
12835cat >>conftest.$ac_ext <<_ACEOF
12836/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012837$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012838 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012839int
12840main ()
12841{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012842static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012843test_array [0] = 0
12844
12845 ;
12846 return 0;
12847}
12848_ACEOF
12849rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012850if { (ac_try="$ac_compile"
12851case "(($ac_try" in
12852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12853 *) ac_try_echo=$ac_try;;
12854esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012858 grep -v '^ *+' conftest.er1 >conftest.err
12859 rm -f conftest.er1
12860 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012861 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862 (exit $ac_status); } && {
12863 test -z "$ac_c_werror_flag" ||
12864 test ! -s conftest.err
12865 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012866 ac_hi=$ac_mid; break
12867else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012868 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012869sed 's/^/| /' conftest.$ac_ext >&5
12870
Martin v. Löwiseba40652007-08-30 20:10:57 +000012871 ac_lo=`expr $ac_mid + 1`
12872 if test $ac_lo -le $ac_mid; then
12873 ac_lo= ac_hi=
12874 break
12875 fi
12876 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012877fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012878
12879rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012880 done
12881else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012882 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012883sed 's/^/| /' conftest.$ac_ext >&5
12884
Martin v. Löwiseba40652007-08-30 20:10:57 +000012885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012886/* confdefs.h. */
12887_ACEOF
12888cat confdefs.h >>conftest.$ac_ext
12889cat >>conftest.$ac_ext <<_ACEOF
12890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012891$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012892 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012893int
12894main ()
12895{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012896static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012897test_array [0] = 0
12898
12899 ;
12900 return 0;
12901}
12902_ACEOF
12903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012904if { (ac_try="$ac_compile"
12905case "(($ac_try" in
12906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12907 *) ac_try_echo=$ac_try;;
12908esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012909eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012912 grep -v '^ *+' conftest.er1 >conftest.err
12913 rm -f conftest.er1
12914 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012915 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012916 (exit $ac_status); } && {
12917 test -z "$ac_c_werror_flag" ||
12918 test ! -s conftest.err
12919 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012920 ac_hi=-1 ac_mid=-1
12921 while :; do
12922 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012923/* confdefs.h. */
12924_ACEOF
12925cat confdefs.h >>conftest.$ac_ext
12926cat >>conftest.$ac_ext <<_ACEOF
12927/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012928$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012929 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012930int
12931main ()
12932{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012933static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012934test_array [0] = 0
12935
12936 ;
12937 return 0;
12938}
12939_ACEOF
12940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012941if { (ac_try="$ac_compile"
12942case "(($ac_try" in
12943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12944 *) ac_try_echo=$ac_try;;
12945esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012949 grep -v '^ *+' conftest.er1 >conftest.err
12950 rm -f conftest.er1
12951 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012953 (exit $ac_status); } && {
12954 test -z "$ac_c_werror_flag" ||
12955 test ! -s conftest.err
12956 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012957 ac_lo=$ac_mid; break
12958else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012960sed 's/^/| /' conftest.$ac_ext >&5
12961
Martin v. Löwiseba40652007-08-30 20:10:57 +000012962 ac_hi=`expr '(' $ac_mid ')' - 1`
12963 if test $ac_mid -le $ac_hi; then
12964 ac_lo= ac_hi=
12965 break
12966 fi
12967 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012969
12970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012971 done
12972else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012973 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012974sed 's/^/| /' conftest.$ac_ext >&5
12975
Martin v. Löwiseba40652007-08-30 20:10:57 +000012976 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012977fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012978
12979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012980fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012981
12982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012983# Binary search between lo and hi bounds.
12984while test "x$ac_lo" != "x$ac_hi"; do
12985 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012987/* confdefs.h. */
12988_ACEOF
12989cat confdefs.h >>conftest.$ac_ext
12990cat >>conftest.$ac_ext <<_ACEOF
12991/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012992$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012993 typedef uintptr_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000012994int
12995main ()
12996{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000012997static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012998test_array [0] = 0
12999
13000 ;
13001 return 0;
13002}
13003_ACEOF
13004rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013005if { (ac_try="$ac_compile"
13006case "(($ac_try" in
13007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13008 *) ac_try_echo=$ac_try;;
13009esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013011 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013012 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013013 grep -v '^ *+' conftest.er1 >conftest.err
13014 rm -f conftest.er1
13015 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013017 (exit $ac_status); } && {
13018 test -z "$ac_c_werror_flag" ||
13019 test ! -s conftest.err
13020 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 ac_hi=$ac_mid
13022else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013023 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013024sed 's/^/| /' conftest.$ac_ext >&5
13025
Martin v. Löwiseba40652007-08-30 20:10:57 +000013026 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000013027fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013028
13029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013030done
13031case $ac_lo in
13032?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000013033'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013034 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013035See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013036echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013037See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013038 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013039 else
13040 ac_cv_sizeof_uintptr_t=0
13041 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013042esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013043else
Martin v. Löwis11437992002-04-12 09:54:03 +000013044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013045/* confdefs.h. */
13046_ACEOF
13047cat confdefs.h >>conftest.$ac_ext
13048cat >>conftest.$ac_ext <<_ACEOF
13049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013050$ac_includes_default
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013051 typedef uintptr_t ac__type_sizeof_;
13052static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13053static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013054#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013055#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013056int
13057main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013058{
Martin v. Löwis11437992002-04-12 09:54:03 +000013059
13060 FILE *f = fopen ("conftest.val", "w");
13061 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000013062 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013063 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013064 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013065 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013066 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013067 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013068 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013069 }
13070 else
13071 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000013072 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013073 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000013074 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013075 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013076 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013077 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013078
13079 ;
13080 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013081}
Martin v. Löwis11437992002-04-12 09:54:03 +000013082_ACEOF
13083rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013084if { (ac_try="$ac_link"
13085case "(($ac_try" in
13086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13087 *) ac_try_echo=$ac_try;;
13088esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013089eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013090 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013092 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013093 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013094 { (case "(($ac_try" in
13095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13096 *) ac_try_echo=$ac_try;;
13097esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013098eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013099 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013100 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 (exit $ac_status); }; }; then
13103 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013104else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013105 echo "$as_me: program exited with status $ac_status" >&5
13106echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013107sed 's/^/| /' conftest.$ac_ext >&5
13108
Martin v. Löwis11437992002-04-12 09:54:03 +000013109( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000013110if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013111 { { echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013112See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013113echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013114See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013115 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013116 else
13117 ac_cv_sizeof_uintptr_t=0
13118 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013119fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013120rm -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 +000013121fi
13122rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013123fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013124{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13125echo "${ECHO_T}$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013126
13127
13128
Martin v. Löwis11437992002-04-12 09:54:03 +000013129cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013130#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013131_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013132
Michael W. Hudson54241132001-12-07 15:38:26 +000013133
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013134fi
13135
Martin v. Löwisebe26702006-10-02 14:55:51 +000013136
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013137{ echo "$as_me:$LINENO: checking for off_t" >&5
13138echo $ECHO_N "checking for off_t... $ECHO_C" >&6; }
13139if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013140 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013141else
Martin v. Löwis11437992002-04-12 09:54:03 +000013142 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013143/* confdefs.h. */
13144_ACEOF
13145cat confdefs.h >>conftest.$ac_ext
13146cat >>conftest.$ac_ext <<_ACEOF
13147/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013148
13149#ifdef HAVE_SYS_TYPES_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013150#include <sys/types.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013151#endif
13152
13153
13154typedef off_t ac__type_new_;
13155int
13156main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013157{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013158if ((ac__type_new_ *) 0)
13159 return 0;
13160if (sizeof (ac__type_new_))
13161 return 0;
13162 ;
13163 return 0;
13164}
13165_ACEOF
13166rm -f conftest.$ac_objext
13167if { (ac_try="$ac_compile"
13168case "(($ac_try" in
13169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13170 *) ac_try_echo=$ac_try;;
13171esac
13172eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13173 (eval "$ac_compile") 2>conftest.er1
13174 ac_status=$?
13175 grep -v '^ *+' conftest.er1 >conftest.err
13176 rm -f conftest.er1
13177 cat conftest.err >&5
13178 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13179 (exit $ac_status); } && {
13180 test -z "$ac_c_werror_flag" ||
13181 test ! -s conftest.err
13182 } && test -s conftest.$ac_objext; then
13183 ac_cv_type_off_t=yes
13184else
13185 echo "$as_me: failed program was:" >&5
13186sed 's/^/| /' conftest.$ac_ext >&5
13187
13188 ac_cv_type_off_t=no
13189fi
13190
13191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13192fi
13193{ echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
13194echo "${ECHO_T}$ac_cv_type_off_t" >&6; }
13195
13196# The cast to long int works around a bug in the HP C Compiler
13197# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13198# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13199# This bug is HP SR number 8606223364.
13200{ echo "$as_me:$LINENO: checking size of off_t" >&5
13201echo $ECHO_N "checking size of off_t... $ECHO_C" >&6; }
13202if test "${ac_cv_sizeof_off_t+set}" = set; then
13203 echo $ECHO_N "(cached) $ECHO_C" >&6
13204else
13205 if test "$cross_compiling" = yes; then
13206 # Depending upon the size, compute the lo and hi bounds.
13207cat >conftest.$ac_ext <<_ACEOF
13208/* confdefs.h. */
13209_ACEOF
13210cat confdefs.h >>conftest.$ac_ext
13211cat >>conftest.$ac_ext <<_ACEOF
13212/* end confdefs.h. */
13213
13214#ifdef HAVE_SYS_TYPES_H
13215#include <sys/types.h>
13216#endif
13217
13218
13219 typedef off_t ac__type_sizeof_;
13220int
13221main ()
13222{
13223static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13224test_array [0] = 0
13225
13226 ;
13227 return 0;
13228}
13229_ACEOF
13230rm -f conftest.$ac_objext
13231if { (ac_try="$ac_compile"
13232case "(($ac_try" in
13233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13234 *) ac_try_echo=$ac_try;;
13235esac
13236eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13237 (eval "$ac_compile") 2>conftest.er1
13238 ac_status=$?
13239 grep -v '^ *+' conftest.er1 >conftest.err
13240 rm -f conftest.er1
13241 cat conftest.err >&5
13242 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13243 (exit $ac_status); } && {
13244 test -z "$ac_c_werror_flag" ||
13245 test ! -s conftest.err
13246 } && test -s conftest.$ac_objext; then
13247 ac_lo=0 ac_mid=0
13248 while :; do
13249 cat >conftest.$ac_ext <<_ACEOF
13250/* confdefs.h. */
13251_ACEOF
13252cat confdefs.h >>conftest.$ac_ext
13253cat >>conftest.$ac_ext <<_ACEOF
13254/* end confdefs.h. */
13255
13256#ifdef HAVE_SYS_TYPES_H
13257#include <sys/types.h>
13258#endif
13259
13260
13261 typedef off_t ac__type_sizeof_;
13262int
13263main ()
13264{
13265static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13266test_array [0] = 0
13267
13268 ;
13269 return 0;
13270}
13271_ACEOF
13272rm -f conftest.$ac_objext
13273if { (ac_try="$ac_compile"
13274case "(($ac_try" in
13275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13276 *) ac_try_echo=$ac_try;;
13277esac
13278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13279 (eval "$ac_compile") 2>conftest.er1
13280 ac_status=$?
13281 grep -v '^ *+' conftest.er1 >conftest.err
13282 rm -f conftest.er1
13283 cat conftest.err >&5
13284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13285 (exit $ac_status); } && {
13286 test -z "$ac_c_werror_flag" ||
13287 test ! -s conftest.err
13288 } && test -s conftest.$ac_objext; then
13289 ac_hi=$ac_mid; break
13290else
13291 echo "$as_me: failed program was:" >&5
13292sed 's/^/| /' conftest.$ac_ext >&5
13293
13294 ac_lo=`expr $ac_mid + 1`
13295 if test $ac_lo -le $ac_mid; then
13296 ac_lo= ac_hi=
13297 break
13298 fi
13299 ac_mid=`expr 2 '*' $ac_mid + 1`
13300fi
13301
13302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13303 done
13304else
13305 echo "$as_me: failed program was:" >&5
13306sed 's/^/| /' conftest.$ac_ext >&5
13307
13308 cat >conftest.$ac_ext <<_ACEOF
13309/* confdefs.h. */
13310_ACEOF
13311cat confdefs.h >>conftest.$ac_ext
13312cat >>conftest.$ac_ext <<_ACEOF
13313/* end confdefs.h. */
13314
13315#ifdef HAVE_SYS_TYPES_H
13316#include <sys/types.h>
13317#endif
13318
13319
13320 typedef off_t ac__type_sizeof_;
13321int
13322main ()
13323{
13324static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13325test_array [0] = 0
13326
13327 ;
13328 return 0;
13329}
13330_ACEOF
13331rm -f conftest.$ac_objext
13332if { (ac_try="$ac_compile"
13333case "(($ac_try" in
13334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13335 *) ac_try_echo=$ac_try;;
13336esac
13337eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13338 (eval "$ac_compile") 2>conftest.er1
13339 ac_status=$?
13340 grep -v '^ *+' conftest.er1 >conftest.err
13341 rm -f conftest.er1
13342 cat conftest.err >&5
13343 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13344 (exit $ac_status); } && {
13345 test -z "$ac_c_werror_flag" ||
13346 test ! -s conftest.err
13347 } && test -s conftest.$ac_objext; then
13348 ac_hi=-1 ac_mid=-1
13349 while :; do
13350 cat >conftest.$ac_ext <<_ACEOF
13351/* confdefs.h. */
13352_ACEOF
13353cat confdefs.h >>conftest.$ac_ext
13354cat >>conftest.$ac_ext <<_ACEOF
13355/* end confdefs.h. */
13356
13357#ifdef HAVE_SYS_TYPES_H
13358#include <sys/types.h>
13359#endif
13360
13361
13362 typedef off_t ac__type_sizeof_;
13363int
13364main ()
13365{
13366static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13367test_array [0] = 0
13368
13369 ;
13370 return 0;
13371}
13372_ACEOF
13373rm -f conftest.$ac_objext
13374if { (ac_try="$ac_compile"
13375case "(($ac_try" in
13376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13377 *) ac_try_echo=$ac_try;;
13378esac
13379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13380 (eval "$ac_compile") 2>conftest.er1
13381 ac_status=$?
13382 grep -v '^ *+' conftest.er1 >conftest.err
13383 rm -f conftest.er1
13384 cat conftest.err >&5
13385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13386 (exit $ac_status); } && {
13387 test -z "$ac_c_werror_flag" ||
13388 test ! -s conftest.err
13389 } && test -s conftest.$ac_objext; then
13390 ac_lo=$ac_mid; break
13391else
13392 echo "$as_me: failed program was:" >&5
13393sed 's/^/| /' conftest.$ac_ext >&5
13394
13395 ac_hi=`expr '(' $ac_mid ')' - 1`
13396 if test $ac_mid -le $ac_hi; then
13397 ac_lo= ac_hi=
13398 break
13399 fi
13400 ac_mid=`expr 2 '*' $ac_mid`
13401fi
13402
13403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13404 done
13405else
13406 echo "$as_me: failed program was:" >&5
13407sed 's/^/| /' conftest.$ac_ext >&5
13408
13409 ac_lo= ac_hi=
13410fi
13411
13412rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13413fi
13414
13415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13416# Binary search between lo and hi bounds.
13417while test "x$ac_lo" != "x$ac_hi"; do
13418 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13419 cat >conftest.$ac_ext <<_ACEOF
13420/* confdefs.h. */
13421_ACEOF
13422cat confdefs.h >>conftest.$ac_ext
13423cat >>conftest.$ac_ext <<_ACEOF
13424/* end confdefs.h. */
13425
13426#ifdef HAVE_SYS_TYPES_H
13427#include <sys/types.h>
13428#endif
13429
13430
13431 typedef off_t ac__type_sizeof_;
13432int
13433main ()
13434{
13435static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13436test_array [0] = 0
13437
13438 ;
13439 return 0;
13440}
13441_ACEOF
13442rm -f conftest.$ac_objext
13443if { (ac_try="$ac_compile"
13444case "(($ac_try" in
13445 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13446 *) ac_try_echo=$ac_try;;
13447esac
13448eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13449 (eval "$ac_compile") 2>conftest.er1
13450 ac_status=$?
13451 grep -v '^ *+' conftest.er1 >conftest.err
13452 rm -f conftest.er1
13453 cat conftest.err >&5
13454 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13455 (exit $ac_status); } && {
13456 test -z "$ac_c_werror_flag" ||
13457 test ! -s conftest.err
13458 } && test -s conftest.$ac_objext; then
13459 ac_hi=$ac_mid
13460else
13461 echo "$as_me: failed program was:" >&5
13462sed 's/^/| /' conftest.$ac_ext >&5
13463
13464 ac_lo=`expr '(' $ac_mid ')' + 1`
13465fi
13466
13467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13468done
13469case $ac_lo in
13470?*) ac_cv_sizeof_off_t=$ac_lo;;
13471'') if test "$ac_cv_type_off_t" = yes; then
13472 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13473See \`config.log' for more details." >&5
13474echo "$as_me: error: cannot compute sizeof (off_t)
13475See \`config.log' for more details." >&2;}
13476 { (exit 77); exit 77; }; }
13477 else
13478 ac_cv_sizeof_off_t=0
13479 fi ;;
13480esac
13481else
13482 cat >conftest.$ac_ext <<_ACEOF
13483/* confdefs.h. */
13484_ACEOF
13485cat confdefs.h >>conftest.$ac_ext
13486cat >>conftest.$ac_ext <<_ACEOF
13487/* end confdefs.h. */
13488
13489#ifdef HAVE_SYS_TYPES_H
13490#include <sys/types.h>
13491#endif
13492
13493
13494 typedef off_t ac__type_sizeof_;
13495static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13496static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13497#include <stdio.h>
13498#include <stdlib.h>
13499int
13500main ()
13501{
13502
13503 FILE *f = fopen ("conftest.val", "w");
13504 if (! f)
13505 return 1;
13506 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13507 {
13508 long int i = longval ();
13509 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13510 return 1;
13511 fprintf (f, "%ld\n", i);
13512 }
13513 else
13514 {
13515 unsigned long int i = ulongval ();
13516 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13517 return 1;
13518 fprintf (f, "%lu\n", i);
13519 }
13520 return ferror (f) || fclose (f) != 0;
13521
13522 ;
13523 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013524}
Martin v. Löwis11437992002-04-12 09:54:03 +000013525_ACEOF
13526rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013527if { (ac_try="$ac_link"
13528case "(($ac_try" in
13529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13530 *) ac_try_echo=$ac_try;;
13531esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013532eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013533 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013534 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013535 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013536 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013537 { (case "(($ac_try" in
13538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13539 *) ac_try_echo=$ac_try;;
13540esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013542 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013543 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013546 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013547else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013548 echo "$as_me: program exited with status $ac_status" >&5
13549echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013550sed 's/^/| /' conftest.$ac_ext >&5
13551
Martin v. Löwis11437992002-04-12 09:54:03 +000013552( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013553if test "$ac_cv_type_off_t" = yes; then
13554 { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13555See \`config.log' for more details." >&5
13556echo "$as_me: error: cannot compute sizeof (off_t)
13557See \`config.log' for more details." >&2;}
13558 { (exit 77); exit 77; }; }
13559 else
13560 ac_cv_sizeof_off_t=0
13561 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013562fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013563rm -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 +000013564fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013565rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013566fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013567{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13568echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013569
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013570
13571
Martin v. Löwis11437992002-04-12 09:54:03 +000013572cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013573#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013574_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013575
Michael W. Hudson54241132001-12-07 15:38:26 +000013576
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013577
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013578{ echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13579echo $ECHO_N "checking whether to enable large file support... $ECHO_C" >&6; }
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013580if test "$have_long_long" = yes
13581then
13582if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013583 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013584
Martin v. Löwis11437992002-04-12 09:54:03 +000013585cat >>confdefs.h <<\_ACEOF
13586#define HAVE_LARGEFILE_SUPPORT 1
13587_ACEOF
13588
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013589 { echo "$as_me:$LINENO: result: yes" >&5
13590echo "${ECHO_T}yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013592 { echo "$as_me:$LINENO: result: no" >&5
13593echo "${ECHO_T}no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013594fi
Mark Dickinson0ef0b912009-12-31 21:11:48 +000013595else
13596 { echo "$as_me:$LINENO: result: no" >&5
13597echo "${ECHO_T}no" >&6; }
13598fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013599
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013600{ echo "$as_me:$LINENO: checking for time_t" >&5
13601echo $ECHO_N "checking for time_t... $ECHO_C" >&6; }
13602if test "${ac_cv_type_time_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013603 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013604else
Martin v. Löwis11437992002-04-12 09:54:03 +000013605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013606/* confdefs.h. */
13607_ACEOF
13608cat confdefs.h >>conftest.$ac_ext
13609cat >>conftest.$ac_ext <<_ACEOF
13610/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013611
13612#ifdef HAVE_SYS_TYPES_H
13613#include <sys/types.h>
13614#endif
13615#ifdef HAVE_TIME_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000013616#include <time.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013617#endif
13618
13619
13620typedef time_t ac__type_new_;
13621int
13622main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013623{
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000013624if ((ac__type_new_ *) 0)
13625 return 0;
13626if (sizeof (ac__type_new_))
13627 return 0;
13628 ;
13629 return 0;
13630}
13631_ACEOF
13632rm -f conftest.$ac_objext
13633if { (ac_try="$ac_compile"
13634case "(($ac_try" in
13635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13636 *) ac_try_echo=$ac_try;;
13637esac
13638eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13639 (eval "$ac_compile") 2>conftest.er1
13640 ac_status=$?
13641 grep -v '^ *+' conftest.er1 >conftest.err
13642 rm -f conftest.er1
13643 cat conftest.err >&5
13644 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13645 (exit $ac_status); } && {
13646 test -z "$ac_c_werror_flag" ||
13647 test ! -s conftest.err
13648 } && test -s conftest.$ac_objext; then
13649 ac_cv_type_time_t=yes
13650else
13651 echo "$as_me: failed program was:" >&5
13652sed 's/^/| /' conftest.$ac_ext >&5
13653
13654 ac_cv_type_time_t=no
13655fi
13656
13657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13658fi
13659{ echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5
13660echo "${ECHO_T}$ac_cv_type_time_t" >&6; }
13661
13662# The cast to long int works around a bug in the HP C Compiler
13663# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13664# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13665# This bug is HP SR number 8606223364.
13666{ echo "$as_me:$LINENO: checking size of time_t" >&5
13667echo $ECHO_N "checking size of time_t... $ECHO_C" >&6; }
13668if test "${ac_cv_sizeof_time_t+set}" = set; then
13669 echo $ECHO_N "(cached) $ECHO_C" >&6
13670else
13671 if test "$cross_compiling" = yes; then
13672 # Depending upon the size, compute the lo and hi bounds.
13673cat >conftest.$ac_ext <<_ACEOF
13674/* confdefs.h. */
13675_ACEOF
13676cat confdefs.h >>conftest.$ac_ext
13677cat >>conftest.$ac_ext <<_ACEOF
13678/* end confdefs.h. */
13679
13680#ifdef HAVE_SYS_TYPES_H
13681#include <sys/types.h>
13682#endif
13683#ifdef HAVE_TIME_H
13684#include <time.h>
13685#endif
13686
13687
13688 typedef time_t ac__type_sizeof_;
13689int
13690main ()
13691{
13692static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
13693test_array [0] = 0
13694
13695 ;
13696 return 0;
13697}
13698_ACEOF
13699rm -f conftest.$ac_objext
13700if { (ac_try="$ac_compile"
13701case "(($ac_try" in
13702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13703 *) ac_try_echo=$ac_try;;
13704esac
13705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13706 (eval "$ac_compile") 2>conftest.er1
13707 ac_status=$?
13708 grep -v '^ *+' conftest.er1 >conftest.err
13709 rm -f conftest.er1
13710 cat conftest.err >&5
13711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13712 (exit $ac_status); } && {
13713 test -z "$ac_c_werror_flag" ||
13714 test ! -s conftest.err
13715 } && test -s conftest.$ac_objext; then
13716 ac_lo=0 ac_mid=0
13717 while :; do
13718 cat >conftest.$ac_ext <<_ACEOF
13719/* confdefs.h. */
13720_ACEOF
13721cat confdefs.h >>conftest.$ac_ext
13722cat >>conftest.$ac_ext <<_ACEOF
13723/* end confdefs.h. */
13724
13725#ifdef HAVE_SYS_TYPES_H
13726#include <sys/types.h>
13727#endif
13728#ifdef HAVE_TIME_H
13729#include <time.h>
13730#endif
13731
13732
13733 typedef time_t ac__type_sizeof_;
13734int
13735main ()
13736{
13737static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13738test_array [0] = 0
13739
13740 ;
13741 return 0;
13742}
13743_ACEOF
13744rm -f conftest.$ac_objext
13745if { (ac_try="$ac_compile"
13746case "(($ac_try" in
13747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13748 *) ac_try_echo=$ac_try;;
13749esac
13750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13751 (eval "$ac_compile") 2>conftest.er1
13752 ac_status=$?
13753 grep -v '^ *+' conftest.er1 >conftest.err
13754 rm -f conftest.er1
13755 cat conftest.err >&5
13756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13757 (exit $ac_status); } && {
13758 test -z "$ac_c_werror_flag" ||
13759 test ! -s conftest.err
13760 } && test -s conftest.$ac_objext; then
13761 ac_hi=$ac_mid; break
13762else
13763 echo "$as_me: failed program was:" >&5
13764sed 's/^/| /' conftest.$ac_ext >&5
13765
13766 ac_lo=`expr $ac_mid + 1`
13767 if test $ac_lo -le $ac_mid; then
13768 ac_lo= ac_hi=
13769 break
13770 fi
13771 ac_mid=`expr 2 '*' $ac_mid + 1`
13772fi
13773
13774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13775 done
13776else
13777 echo "$as_me: failed program was:" >&5
13778sed 's/^/| /' conftest.$ac_ext >&5
13779
13780 cat >conftest.$ac_ext <<_ACEOF
13781/* confdefs.h. */
13782_ACEOF
13783cat confdefs.h >>conftest.$ac_ext
13784cat >>conftest.$ac_ext <<_ACEOF
13785/* end confdefs.h. */
13786
13787#ifdef HAVE_SYS_TYPES_H
13788#include <sys/types.h>
13789#endif
13790#ifdef HAVE_TIME_H
13791#include <time.h>
13792#endif
13793
13794
13795 typedef time_t ac__type_sizeof_;
13796int
13797main ()
13798{
13799static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
13800test_array [0] = 0
13801
13802 ;
13803 return 0;
13804}
13805_ACEOF
13806rm -f conftest.$ac_objext
13807if { (ac_try="$ac_compile"
13808case "(($ac_try" in
13809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13810 *) ac_try_echo=$ac_try;;
13811esac
13812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13813 (eval "$ac_compile") 2>conftest.er1
13814 ac_status=$?
13815 grep -v '^ *+' conftest.er1 >conftest.err
13816 rm -f conftest.er1
13817 cat conftest.err >&5
13818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13819 (exit $ac_status); } && {
13820 test -z "$ac_c_werror_flag" ||
13821 test ! -s conftest.err
13822 } && test -s conftest.$ac_objext; then
13823 ac_hi=-1 ac_mid=-1
13824 while :; do
13825 cat >conftest.$ac_ext <<_ACEOF
13826/* confdefs.h. */
13827_ACEOF
13828cat confdefs.h >>conftest.$ac_ext
13829cat >>conftest.$ac_ext <<_ACEOF
13830/* end confdefs.h. */
13831
13832#ifdef HAVE_SYS_TYPES_H
13833#include <sys/types.h>
13834#endif
13835#ifdef HAVE_TIME_H
13836#include <time.h>
13837#endif
13838
13839
13840 typedef time_t ac__type_sizeof_;
13841int
13842main ()
13843{
13844static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
13845test_array [0] = 0
13846
13847 ;
13848 return 0;
13849}
13850_ACEOF
13851rm -f conftest.$ac_objext
13852if { (ac_try="$ac_compile"
13853case "(($ac_try" in
13854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13855 *) ac_try_echo=$ac_try;;
13856esac
13857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13858 (eval "$ac_compile") 2>conftest.er1
13859 ac_status=$?
13860 grep -v '^ *+' conftest.er1 >conftest.err
13861 rm -f conftest.er1
13862 cat conftest.err >&5
13863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13864 (exit $ac_status); } && {
13865 test -z "$ac_c_werror_flag" ||
13866 test ! -s conftest.err
13867 } && test -s conftest.$ac_objext; then
13868 ac_lo=$ac_mid; break
13869else
13870 echo "$as_me: failed program was:" >&5
13871sed 's/^/| /' conftest.$ac_ext >&5
13872
13873 ac_hi=`expr '(' $ac_mid ')' - 1`
13874 if test $ac_mid -le $ac_hi; then
13875 ac_lo= ac_hi=
13876 break
13877 fi
13878 ac_mid=`expr 2 '*' $ac_mid`
13879fi
13880
13881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13882 done
13883else
13884 echo "$as_me: failed program was:" >&5
13885sed 's/^/| /' conftest.$ac_ext >&5
13886
13887 ac_lo= ac_hi=
13888fi
13889
13890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13891fi
13892
13893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13894# Binary search between lo and hi bounds.
13895while test "x$ac_lo" != "x$ac_hi"; do
13896 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13897 cat >conftest.$ac_ext <<_ACEOF
13898/* confdefs.h. */
13899_ACEOF
13900cat confdefs.h >>conftest.$ac_ext
13901cat >>conftest.$ac_ext <<_ACEOF
13902/* end confdefs.h. */
13903
13904#ifdef HAVE_SYS_TYPES_H
13905#include <sys/types.h>
13906#endif
13907#ifdef HAVE_TIME_H
13908#include <time.h>
13909#endif
13910
13911
13912 typedef time_t ac__type_sizeof_;
13913int
13914main ()
13915{
13916static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
13917test_array [0] = 0
13918
13919 ;
13920 return 0;
13921}
13922_ACEOF
13923rm -f conftest.$ac_objext
13924if { (ac_try="$ac_compile"
13925case "(($ac_try" in
13926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13927 *) ac_try_echo=$ac_try;;
13928esac
13929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13930 (eval "$ac_compile") 2>conftest.er1
13931 ac_status=$?
13932 grep -v '^ *+' conftest.er1 >conftest.err
13933 rm -f conftest.er1
13934 cat conftest.err >&5
13935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13936 (exit $ac_status); } && {
13937 test -z "$ac_c_werror_flag" ||
13938 test ! -s conftest.err
13939 } && test -s conftest.$ac_objext; then
13940 ac_hi=$ac_mid
13941else
13942 echo "$as_me: failed program was:" >&5
13943sed 's/^/| /' conftest.$ac_ext >&5
13944
13945 ac_lo=`expr '(' $ac_mid ')' + 1`
13946fi
13947
13948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13949done
13950case $ac_lo in
13951?*) ac_cv_sizeof_time_t=$ac_lo;;
13952'') if test "$ac_cv_type_time_t" = yes; then
13953 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13954See \`config.log' for more details." >&5
13955echo "$as_me: error: cannot compute sizeof (time_t)
13956See \`config.log' for more details." >&2;}
13957 { (exit 77); exit 77; }; }
13958 else
13959 ac_cv_sizeof_time_t=0
13960 fi ;;
13961esac
13962else
13963 cat >conftest.$ac_ext <<_ACEOF
13964/* confdefs.h. */
13965_ACEOF
13966cat confdefs.h >>conftest.$ac_ext
13967cat >>conftest.$ac_ext <<_ACEOF
13968/* end confdefs.h. */
13969
13970#ifdef HAVE_SYS_TYPES_H
13971#include <sys/types.h>
13972#endif
13973#ifdef HAVE_TIME_H
13974#include <time.h>
13975#endif
13976
13977
13978 typedef time_t ac__type_sizeof_;
13979static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
13980static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
13981#include <stdio.h>
13982#include <stdlib.h>
13983int
13984main ()
13985{
13986
13987 FILE *f = fopen ("conftest.val", "w");
13988 if (! f)
13989 return 1;
13990 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
13991 {
13992 long int i = longval ();
13993 if (i != ((long int) (sizeof (ac__type_sizeof_))))
13994 return 1;
13995 fprintf (f, "%ld\n", i);
13996 }
13997 else
13998 {
13999 unsigned long int i = ulongval ();
14000 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14001 return 1;
14002 fprintf (f, "%lu\n", i);
14003 }
14004 return ferror (f) || fclose (f) != 0;
14005
14006 ;
14007 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014008}
Martin v. Löwis11437992002-04-12 09:54:03 +000014009_ACEOF
14010rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014011if { (ac_try="$ac_link"
14012case "(($ac_try" in
14013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14014 *) ac_try_echo=$ac_try;;
14015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014017 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014018 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014020 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014021 { (case "(($ac_try" in
14022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14023 *) ac_try_echo=$ac_try;;
14024esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014025eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014026 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014027 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014028 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014029 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014030 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014031else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014032 echo "$as_me: program exited with status $ac_status" >&5
14033echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014034sed 's/^/| /' conftest.$ac_ext >&5
14035
Martin v. Löwis11437992002-04-12 09:54:03 +000014036( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014037if test "$ac_cv_type_time_t" = yes; then
14038 { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
14039See \`config.log' for more details." >&5
14040echo "$as_me: error: cannot compute sizeof (time_t)
14041See \`config.log' for more details." >&2;}
14042 { (exit 77); exit 77; }; }
14043 else
14044 ac_cv_sizeof_time_t=0
14045 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014046fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014047rm -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 +000014048fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014049rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014050fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014051{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
14052echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014053
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014054
14055
Martin v. Löwis11437992002-04-12 09:54:03 +000014056cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014057#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014058_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014059
Michael W. Hudson54241132001-12-07 15:38:26 +000014060
14061
Trent Mick635f6fb2000-08-23 21:33:05 +000014062# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014063ac_save_cc="$CC"
14064if test "$ac_cv_kpthread" = "yes"
14065then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014066elif test "$ac_cv_kthread" = "yes"
14067then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014068elif test "$ac_cv_pthread" = "yes"
14069then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014070fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014071{ echo "$as_me:$LINENO: checking for pthread_t" >&5
14072echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014073have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014075/* confdefs.h. */
14076_ACEOF
14077cat confdefs.h >>conftest.$ac_ext
14078cat >>conftest.$ac_ext <<_ACEOF
14079/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014080#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014081int
14082main ()
14083{
Guido van Rossum12580492000-09-24 16:47:19 +000014084pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014085 ;
14086 return 0;
14087}
14088_ACEOF
14089rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014090if { (ac_try="$ac_compile"
14091case "(($ac_try" in
14092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14093 *) ac_try_echo=$ac_try;;
14094esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014095eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014096 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014098 grep -v '^ *+' conftest.er1 >conftest.err
14099 rm -f conftest.er1
14100 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014101 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014102 (exit $ac_status); } && {
14103 test -z "$ac_c_werror_flag" ||
14104 test ! -s conftest.err
14105 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014106 have_pthread_t=yes
14107else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014108 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014109sed 's/^/| /' conftest.$ac_ext >&5
14110
Martin v. Löwiseba40652007-08-30 20:10:57 +000014111
Trent Mick635f6fb2000-08-23 21:33:05 +000014112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014113
14114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014115{ echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14116echo "${ECHO_T}$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014117if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014118 { echo "$as_me:$LINENO: checking for pthread_t" >&5
14119echo $ECHO_N "checking for pthread_t... $ECHO_C" >&6; }
14120if test "${ac_cv_type_pthread_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014121 echo $ECHO_N "(cached) $ECHO_C" >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014122else
Martin v. Löwis11437992002-04-12 09:54:03 +000014123 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014124/* confdefs.h. */
14125_ACEOF
14126cat confdefs.h >>conftest.$ac_ext
14127cat >>conftest.$ac_ext <<_ACEOF
14128/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014129
14130#ifdef HAVE_PTHREAD_H
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014131#include <pthread.h>
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014132#endif
14133
14134
14135typedef pthread_t ac__type_new_;
14136int
14137main ()
14138{
14139if ((ac__type_new_ *) 0)
14140 return 0;
14141if (sizeof (ac__type_new_))
14142 return 0;
14143 ;
14144 return 0;
14145}
14146_ACEOF
14147rm -f conftest.$ac_objext
14148if { (ac_try="$ac_compile"
14149case "(($ac_try" in
14150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14151 *) ac_try_echo=$ac_try;;
14152esac
14153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14154 (eval "$ac_compile") 2>conftest.er1
14155 ac_status=$?
14156 grep -v '^ *+' conftest.er1 >conftest.err
14157 rm -f conftest.er1
14158 cat conftest.err >&5
14159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14160 (exit $ac_status); } && {
14161 test -z "$ac_c_werror_flag" ||
14162 test ! -s conftest.err
14163 } && test -s conftest.$ac_objext; then
14164 ac_cv_type_pthread_t=yes
14165else
14166 echo "$as_me: failed program was:" >&5
14167sed 's/^/| /' conftest.$ac_ext >&5
14168
14169 ac_cv_type_pthread_t=no
14170fi
14171
14172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14173fi
14174{ echo "$as_me:$LINENO: result: $ac_cv_type_pthread_t" >&5
14175echo "${ECHO_T}$ac_cv_type_pthread_t" >&6; }
14176
14177# The cast to long int works around a bug in the HP C Compiler
14178# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14179# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14180# This bug is HP SR number 8606223364.
14181{ echo "$as_me:$LINENO: checking size of pthread_t" >&5
14182echo $ECHO_N "checking size of pthread_t... $ECHO_C" >&6; }
14183if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14184 echo $ECHO_N "(cached) $ECHO_C" >&6
14185else
14186 if test "$cross_compiling" = yes; then
14187 # Depending upon the size, compute the lo and hi bounds.
14188cat >conftest.$ac_ext <<_ACEOF
14189/* confdefs.h. */
14190_ACEOF
14191cat confdefs.h >>conftest.$ac_ext
14192cat >>conftest.$ac_ext <<_ACEOF
14193/* end confdefs.h. */
14194
14195#ifdef HAVE_PTHREAD_H
14196#include <pthread.h>
14197#endif
14198
14199
14200 typedef pthread_t ac__type_sizeof_;
14201int
14202main ()
14203{
14204static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
14205test_array [0] = 0
14206
14207 ;
14208 return 0;
14209}
14210_ACEOF
14211rm -f conftest.$ac_objext
14212if { (ac_try="$ac_compile"
14213case "(($ac_try" in
14214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14215 *) ac_try_echo=$ac_try;;
14216esac
14217eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14218 (eval "$ac_compile") 2>conftest.er1
14219 ac_status=$?
14220 grep -v '^ *+' conftest.er1 >conftest.err
14221 rm -f conftest.er1
14222 cat conftest.err >&5
14223 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14224 (exit $ac_status); } && {
14225 test -z "$ac_c_werror_flag" ||
14226 test ! -s conftest.err
14227 } && test -s conftest.$ac_objext; then
14228 ac_lo=0 ac_mid=0
14229 while :; do
14230 cat >conftest.$ac_ext <<_ACEOF
14231/* confdefs.h. */
14232_ACEOF
14233cat confdefs.h >>conftest.$ac_ext
14234cat >>conftest.$ac_ext <<_ACEOF
14235/* end confdefs.h. */
14236
14237#ifdef HAVE_PTHREAD_H
14238#include <pthread.h>
14239#endif
14240
14241
14242 typedef pthread_t ac__type_sizeof_;
14243int
14244main ()
14245{
14246static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14247test_array [0] = 0
14248
14249 ;
14250 return 0;
14251}
14252_ACEOF
14253rm -f conftest.$ac_objext
14254if { (ac_try="$ac_compile"
14255case "(($ac_try" in
14256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14257 *) ac_try_echo=$ac_try;;
14258esac
14259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14260 (eval "$ac_compile") 2>conftest.er1
14261 ac_status=$?
14262 grep -v '^ *+' conftest.er1 >conftest.err
14263 rm -f conftest.er1
14264 cat conftest.err >&5
14265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14266 (exit $ac_status); } && {
14267 test -z "$ac_c_werror_flag" ||
14268 test ! -s conftest.err
14269 } && test -s conftest.$ac_objext; then
14270 ac_hi=$ac_mid; break
14271else
14272 echo "$as_me: failed program was:" >&5
14273sed 's/^/| /' conftest.$ac_ext >&5
14274
14275 ac_lo=`expr $ac_mid + 1`
14276 if test $ac_lo -le $ac_mid; then
14277 ac_lo= ac_hi=
14278 break
14279 fi
14280 ac_mid=`expr 2 '*' $ac_mid + 1`
14281fi
14282
14283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14284 done
14285else
14286 echo "$as_me: failed program was:" >&5
14287sed 's/^/| /' conftest.$ac_ext >&5
14288
14289 cat >conftest.$ac_ext <<_ACEOF
14290/* confdefs.h. */
14291_ACEOF
14292cat confdefs.h >>conftest.$ac_ext
14293cat >>conftest.$ac_ext <<_ACEOF
14294/* end confdefs.h. */
14295
14296#ifdef HAVE_PTHREAD_H
14297#include <pthread.h>
14298#endif
14299
14300
14301 typedef pthread_t ac__type_sizeof_;
14302int
14303main ()
14304{
14305static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
14306test_array [0] = 0
14307
14308 ;
14309 return 0;
14310}
14311_ACEOF
14312rm -f conftest.$ac_objext
14313if { (ac_try="$ac_compile"
14314case "(($ac_try" in
14315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14316 *) ac_try_echo=$ac_try;;
14317esac
14318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14319 (eval "$ac_compile") 2>conftest.er1
14320 ac_status=$?
14321 grep -v '^ *+' conftest.er1 >conftest.err
14322 rm -f conftest.er1
14323 cat conftest.err >&5
14324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14325 (exit $ac_status); } && {
14326 test -z "$ac_c_werror_flag" ||
14327 test ! -s conftest.err
14328 } && test -s conftest.$ac_objext; then
14329 ac_hi=-1 ac_mid=-1
14330 while :; do
14331 cat >conftest.$ac_ext <<_ACEOF
14332/* confdefs.h. */
14333_ACEOF
14334cat confdefs.h >>conftest.$ac_ext
14335cat >>conftest.$ac_ext <<_ACEOF
14336/* end confdefs.h. */
14337
14338#ifdef HAVE_PTHREAD_H
14339#include <pthread.h>
14340#endif
14341
14342
14343 typedef pthread_t ac__type_sizeof_;
14344int
14345main ()
14346{
14347static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
14348test_array [0] = 0
14349
14350 ;
14351 return 0;
14352}
14353_ACEOF
14354rm -f conftest.$ac_objext
14355if { (ac_try="$ac_compile"
14356case "(($ac_try" in
14357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14358 *) ac_try_echo=$ac_try;;
14359esac
14360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14361 (eval "$ac_compile") 2>conftest.er1
14362 ac_status=$?
14363 grep -v '^ *+' conftest.er1 >conftest.err
14364 rm -f conftest.er1
14365 cat conftest.err >&5
14366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14367 (exit $ac_status); } && {
14368 test -z "$ac_c_werror_flag" ||
14369 test ! -s conftest.err
14370 } && test -s conftest.$ac_objext; then
14371 ac_lo=$ac_mid; break
14372else
14373 echo "$as_me: failed program was:" >&5
14374sed 's/^/| /' conftest.$ac_ext >&5
14375
14376 ac_hi=`expr '(' $ac_mid ')' - 1`
14377 if test $ac_mid -le $ac_hi; then
14378 ac_lo= ac_hi=
14379 break
14380 fi
14381 ac_mid=`expr 2 '*' $ac_mid`
14382fi
14383
14384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14385 done
14386else
14387 echo "$as_me: failed program was:" >&5
14388sed 's/^/| /' conftest.$ac_ext >&5
14389
14390 ac_lo= ac_hi=
14391fi
14392
14393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14394fi
14395
14396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14397# Binary search between lo and hi bounds.
14398while test "x$ac_lo" != "x$ac_hi"; do
14399 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14400 cat >conftest.$ac_ext <<_ACEOF
14401/* confdefs.h. */
14402_ACEOF
14403cat confdefs.h >>conftest.$ac_ext
14404cat >>conftest.$ac_ext <<_ACEOF
14405/* end confdefs.h. */
14406
14407#ifdef HAVE_PTHREAD_H
14408#include <pthread.h>
14409#endif
14410
14411
14412 typedef pthread_t ac__type_sizeof_;
14413int
14414main ()
14415{
14416static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
14417test_array [0] = 0
14418
14419 ;
14420 return 0;
14421}
14422_ACEOF
14423rm -f conftest.$ac_objext
14424if { (ac_try="$ac_compile"
14425case "(($ac_try" in
14426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14427 *) ac_try_echo=$ac_try;;
14428esac
14429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14430 (eval "$ac_compile") 2>conftest.er1
14431 ac_status=$?
14432 grep -v '^ *+' conftest.er1 >conftest.err
14433 rm -f conftest.er1
14434 cat conftest.err >&5
14435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14436 (exit $ac_status); } && {
14437 test -z "$ac_c_werror_flag" ||
14438 test ! -s conftest.err
14439 } && test -s conftest.$ac_objext; then
14440 ac_hi=$ac_mid
14441else
14442 echo "$as_me: failed program was:" >&5
14443sed 's/^/| /' conftest.$ac_ext >&5
14444
14445 ac_lo=`expr '(' $ac_mid ')' + 1`
14446fi
14447
14448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14449done
14450case $ac_lo in
14451?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14452'') if test "$ac_cv_type_pthread_t" = yes; then
14453 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14454See \`config.log' for more details." >&5
14455echo "$as_me: error: cannot compute sizeof (pthread_t)
14456See \`config.log' for more details." >&2;}
14457 { (exit 77); exit 77; }; }
14458 else
14459 ac_cv_sizeof_pthread_t=0
14460 fi ;;
14461esac
14462else
14463 cat >conftest.$ac_ext <<_ACEOF
14464/* confdefs.h. */
14465_ACEOF
14466cat confdefs.h >>conftest.$ac_ext
14467cat >>conftest.$ac_ext <<_ACEOF
14468/* end confdefs.h. */
14469
14470#ifdef HAVE_PTHREAD_H
14471#include <pthread.h>
14472#endif
14473
14474
14475 typedef pthread_t ac__type_sizeof_;
14476static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
14477static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
14478#include <stdio.h>
14479#include <stdlib.h>
14480int
14481main ()
14482{
14483
14484 FILE *f = fopen ("conftest.val", "w");
14485 if (! f)
14486 return 1;
14487 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
14488 {
14489 long int i = longval ();
14490 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14491 return 1;
14492 fprintf (f, "%ld\n", i);
14493 }
14494 else
14495 {
14496 unsigned long int i = ulongval ();
14497 if (i != ((long int) (sizeof (ac__type_sizeof_))))
14498 return 1;
14499 fprintf (f, "%lu\n", i);
14500 }
14501 return ferror (f) || fclose (f) != 0;
14502
14503 ;
14504 return 0;
14505}
Martin v. Löwis11437992002-04-12 09:54:03 +000014506_ACEOF
14507rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014508if { (ac_try="$ac_link"
14509case "(($ac_try" in
14510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14511 *) ac_try_echo=$ac_try;;
14512esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014513eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014514 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014515 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014517 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000014518 { (case "(($ac_try" in
14519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14520 *) ac_try_echo=$ac_try;;
14521esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014523 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014524 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014526 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014527 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014528else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014529 echo "$as_me: program exited with status $ac_status" >&5
14530echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014531sed 's/^/| /' conftest.$ac_ext >&5
14532
Martin v. Löwis11437992002-04-12 09:54:03 +000014533( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014534if test "$ac_cv_type_pthread_t" = yes; then
14535 { { echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14536See \`config.log' for more details." >&5
14537echo "$as_me: error: cannot compute sizeof (pthread_t)
14538See \`config.log' for more details." >&2;}
14539 { (exit 77); exit 77; }; }
14540 else
14541 ac_cv_sizeof_pthread_t=0
14542 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014543fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014544rm -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 +000014545fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014546rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014547fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014548{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014549echo "${ECHO_T}$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014550
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014551
14552
Martin v. Löwis11437992002-04-12 09:54:03 +000014553cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014554#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014555_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014556
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000014557
Trent Mick635f6fb2000-08-23 21:33:05 +000014558fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014559CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014560
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014561{ echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
14562echo $ECHO_N "checking for --enable-toolbox-glue... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014563# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000014564if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014565 enableval=$enable_toolbox_glue;
14566fi
Jack Jansene578a632001-08-15 01:27:14 +000014567
14568
14569if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000014570then
Jack Jansene578a632001-08-15 01:27:14 +000014571 case $ac_sys_system/$ac_sys_release in
14572 Darwin/*)
14573 enable_toolbox_glue="yes";;
14574 *)
14575 enable_toolbox_glue="no";;
14576 esac
14577fi
14578case "$enable_toolbox_glue" in
14579yes)
Jack Jansene578a632001-08-15 01:27:14 +000014580 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014581 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000014582
14583cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014584#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014585_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000014586
14587 ;;
14588*)
Jack Jansene578a632001-08-15 01:27:14 +000014589 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000014590 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000014591 ;;
14592esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014593{ echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
14594echo "${ECHO_T}$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000014595
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014596
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000014597
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014598case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014599 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014600 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14601 ;;
14602 Darwin/*)
14603 OTHER_LIBTOOL_OPT=""
14604 ;;
14605esac
14606
14607
Ronald Oussoren25967582009-09-06 10:00:26 +000014608ARCH_RUN_32BIT=""
14609
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014610case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000014611 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000014612 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14613 if test "${enable_universalsdk}"; then
14614 :
14615 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014616 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014617 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014618 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014619 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014620 Darwin/*)
Ronald Oussorena55af9a2010-01-17 16:25:57 +000014621 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014622 if test ${gcc_version} '<' 4.0
14623 then
14624 LIBTOOL_CRUFT="-lcc_dynamic"
14625 else
14626 LIBTOOL_CRUFT=""
14627 fi
Ronald Oussoren25967582009-09-06 10:00:26 +000014628 if test "$cross_compiling" = yes; then
Ronald Oussoren23d92532009-09-07 06:12:00 +000014629 ac_osx_32bit=yes
Ronald Oussoren25967582009-09-06 10:00:26 +000014630else
14631 cat >conftest.$ac_ext <<_ACEOF
14632/* confdefs.h. */
14633_ACEOF
14634cat confdefs.h >>conftest.$ac_ext
14635cat >>conftest.$ac_ext <<_ACEOF
14636/* end confdefs.h. */
Ronald Oussoren23d92532009-09-07 06:12:00 +000014637
Ronald Oussoren25967582009-09-06 10:00:26 +000014638 #include <unistd.h>
14639 int main(int argc, char*argv[])
14640 {
14641 if (sizeof(long) == 4) {
14642 return 0;
14643 } else {
14644 return 1;
14645 }
Ronald Oussoren84ddd722009-09-08 07:17:10 +000014646 }
Ronald Oussoren23d92532009-09-07 06:12:00 +000014647
Ronald Oussoren25967582009-09-06 10:00:26 +000014648_ACEOF
14649rm -f conftest$ac_exeext
14650if { (ac_try="$ac_link"
14651case "(($ac_try" in
14652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14653 *) ac_try_echo=$ac_try;;
14654esac
14655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14656 (eval "$ac_link") 2>&5
14657 ac_status=$?
14658 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14659 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14660 { (case "(($ac_try" in
14661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14662 *) ac_try_echo=$ac_try;;
14663esac
14664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14665 (eval "$ac_try") 2>&5
14666 ac_status=$?
14667 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14668 (exit $ac_status); }; }; then
14669 ac_osx_32bit=yes
14670else
14671 echo "$as_me: program exited with status $ac_status" >&5
14672echo "$as_me: failed program was:" >&5
14673sed 's/^/| /' conftest.$ac_ext >&5
14674
14675( exit $ac_status )
14676ac_osx_32bit=no
14677fi
14678rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14679fi
14680
14681
14682
14683 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014684 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014685 i386)
14686 MACOSX_DEFAULT_ARCH="i386"
14687 ;;
14688 ppc)
14689 MACOSX_DEFAULT_ARCH="ppc"
14690 ;;
14691 *)
14692 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14693echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14694 { (exit 1); exit 1; }; }
14695 ;;
14696 esac
14697 else
Ronald Oussorenbc0e83c2010-02-11 13:26:54 +000014698 case `/usr/bin/arch` in
Ronald Oussoren25967582009-09-06 10:00:26 +000014699 i386)
14700 MACOSX_DEFAULT_ARCH="x86_64"
14701 ;;
14702 ppc)
14703 MACOSX_DEFAULT_ARCH="ppc64"
14704 ;;
14705 *)
14706 { { echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14707echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
14708 { (exit 1); exit 1; }; }
14709 ;;
14710 esac
14711
14712 #ARCH_RUN_32BIT="true"
14713 fi
14714
14715 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014716 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014717 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014718esac
14719
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014720{ echo "$as_me:$LINENO: checking for --enable-framework" >&5
14721echo $ECHO_N "checking for --enable-framework... $ECHO_C" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014722if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014723then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014724 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014725 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014726 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014727
Martin v. Löwis11437992002-04-12 09:54:03 +000014728cat >>confdefs.h <<\_ACEOF
14729#define WITH_NEXT_FRAMEWORK 1
14730_ACEOF
14731
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014732 { echo "$as_me:$LINENO: result: yes" >&5
14733echo "${ECHO_T}yes" >&6; }
Ronald Oussoren450d5612009-06-08 21:12:41 +000014734 if test $enable_shared = "yes"
14735 then
Ronald Oussoren9ebd2422009-09-29 13:00:44 +000014736 { { echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
14737echo "$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 +000014738 { (exit 1); exit 1; }; }
14739 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014740else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014741 { echo "$as_me:$LINENO: result: no" >&5
14742echo "${ECHO_T}no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014743fi
14744
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014745{ echo "$as_me:$LINENO: checking for dyld" >&5
14746echo $ECHO_N "checking for dyld... $ECHO_C" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014747case $ac_sys_system/$ac_sys_release in
14748 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014749
Martin v. Löwis11437992002-04-12 09:54:03 +000014750cat >>confdefs.h <<\_ACEOF
14751#define WITH_DYLD 1
14752_ACEOF
14753
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014754 { echo "$as_me:$LINENO: result: always on for Darwin" >&5
14755echo "${ECHO_T}always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014756 ;;
14757 *)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014758 { echo "$as_me:$LINENO: result: no" >&5
14759echo "${ECHO_T}no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014760 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014761esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014762
Guido van Rossum0a516c91994-09-12 10:58:40 +000014763# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014764
Michael W. Hudson54241132001-12-07 15:38:26 +000014765
14766
14767
14768
Ronald Oussoren75912852010-04-08 08:13:31 +000014769
Guido van Rossum0a516c91994-09-12 10:58:40 +000014770# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014771# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014772{ echo "$as_me:$LINENO: checking SO" >&5
14773echo $ECHO_N "checking SO... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014774if test -z "$SO"
14775then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014776 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000014777 hp*|HP*)
14778 case `uname -m` in
14779 ia64) SO=.so;;
14780 *) SO=.sl;;
14781 esac
14782 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014783 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014784 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014785 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014786else
14787 # this might also be a termcap variable, see #610332
14788 echo
14789 echo '====================================================================='
14790 echo '+ +'
14791 echo '+ WARNING: You have set SO in your environment. +'
14792 echo '+ Do you really mean to change the extension for shared libraries? +'
14793 echo '+ Continuing in 10 seconds to let you to ponder. +'
14794 echo '+ +'
14795 echo '====================================================================='
14796 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014797fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014798{ echo "$as_me:$LINENO: result: $SO" >&5
14799echo "${ECHO_T}$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000014800
Ronald Oussoren79f90492009-01-02 10:44:46 +000014801
Neal Norwitz58e28882006-05-19 07:00:58 +000014802cat >>confdefs.h <<_ACEOF
14803#define SHLIB_EXT "$SO"
14804_ACEOF
14805
Guido van Rossum0a516c91994-09-12 10:58:40 +000014806# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014807# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014808# (Shared libraries in this instance are shared modules to be loaded into
14809# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014810{ echo "$as_me:$LINENO: checking LDSHARED" >&5
14811echo $ECHO_N "checking LDSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014812if test -z "$LDSHARED"
14813then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014814 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014815 AIX*)
14816 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014817 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014818 ;;
14819 BeOS*)
14820 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000014821 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014822 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014823 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014824 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014825 SunOS/5*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014826 if test "$GCC" = "yes" ; then
14827 LDSHARED='$(CC) -shared'
14828 LDCXXSHARED='$(CXX) -shared'
14829 else
14830 LDSHARED='$(CC) -G'
14831 LDCXXSHARED='$(CXX) -G'
Greg Ward57c9a662000-05-26 12:22:54 +000014832 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000014833 hp*|HP*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014834 if test "$GCC" = "yes" ; then
14835 LDSHARED='$(CC) -shared'
14836 LDCXXSHARED='$(CXX) -shared'
14837 else
14838 LDSHARED='ld -b'
Thomas Hellerdc96a772008-04-04 10:07:55 +000014839 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014840 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014841 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014842 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014843 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansena3891ea2001-09-07 14:25:12 +000014844 if test "$enable_framework" ; then
14845 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014846 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14847 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014848 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014849 else
14850 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014851 LDSHARED="$LDSHARED -undefined suppress"
Ronald Oussoren75912852010-04-08 08:13:31 +000014852 LDCXXSHARED="$LDCXXSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014853 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014854 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014855 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014856 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansene578a632001-08-15 01:27:14 +000014857 if test "$enable_framework" ; then
14858 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014859 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14860 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014861 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014862 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014863 # No framework, use the Python app as bundle-loader
14864 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014865 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014866 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014867 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014868 Darwin/*)
14869 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14870 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000014871
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014872 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014873 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000014874 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000014875 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000014876 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014877 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Ronald Oussoren75912852010-04-08 08:13:31 +000014878 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle -undefined dynamic_lookup'
Jack Jansen6b08a402004-06-03 12:41:45 +000014879 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014880 else
14881 LDSHARED='$(CC) $(LDFLAGS) -bundle'
Ronald Oussoren75912852010-04-08 08:13:31 +000014882 LDCXXSHARED='$(CXX) $(LDFLAGS) -bundle'
Jack Jansen6b08a402004-06-03 12:41:45 +000014883 if test "$enable_framework" ; then
14884 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014885 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14886 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014887 LDCXXSHARED="$LDCXXSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014888 else
14889 # No framework, use the Python app as bundle-loader
14890 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14891 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Ronald Oussoren75912852010-04-08 08:13:31 +000014892 LDCXXSHARED="$LDCXXSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014893 fi
14894 fi
14895 ;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014896 Linux*|GNU*|QNX*)
14897 LDSHARED='$(CC) -shared'
14898 LDCXXSHARED='$(CXX) -shared';;
14899 BSD/OS*/4*)
14900 LDSHARED="gcc -shared"
14901 LDCXXSHARED="g++ -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014902 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014903 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014904 then
Benjamin Peterson3b2abe92010-03-14 15:06:14 +000014905 LDSHARED='$(CC) -shared ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014906 LDCXXSHARED='$(CXX) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000014907 else
14908 LDSHARED="ld -Bshareable ${LDFLAGS}"
14909 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000014910 OpenBSD*)
14911 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14912 then
14913 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014914 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +000014915 else
14916 case `uname -r` in
14917 [01].* | 2.[0-7] | 2.[0-7].*)
14918 LDSHARED="ld -Bshareable ${LDFLAGS}"
14919 ;;
14920 *)
14921 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
Ronald Oussoren75912852010-04-08 08:13:31 +000014922 LDCXXSHARED='$(CXX) -shared $(CCSHARED) ${LDFLAGS}'
Martin v. Löwis222c5152006-06-03 07:37:13 +000014923 ;;
14924 esac
14925 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014926 NetBSD*|DragonFly*)
14927 LDSHARED="cc -shared ${LDFLAGS}"
14928 LDCXXSHARED="c++ -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014929 OpenUNIX*|UnixWare*)
Ronald Oussoren75912852010-04-08 08:13:31 +000014930 if test "$GCC" = "yes" ; then
14931 LDSHARED='$(CC) -shared'
14932 LDCXXSHARED='$(CXX) -shared'
14933 else
14934 LDSHARED='$(CC) -G'
14935 LDCXXSHARED='$(CXX) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014936 fi;;
Ronald Oussoren75912852010-04-08 08:13:31 +000014937 SCO_SV*)
14938 LDSHARED='$(CC) -Wl,-G,-Bexport'
14939 LDCXXSHARED='$(CXX) -Wl,-G,-Bexport';;
14940 CYGWIN*)
14941 LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
14942 LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
14943 atheos*)
14944 LDSHARED="gcc -shared"
14945 LDCXXSHARED="g++ -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014946 *) LDSHARED="ld";;
14947 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014948fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014949{ echo "$as_me:$LINENO: result: $LDSHARED" >&5
14950echo "${ECHO_T}$LDSHARED" >&6; }
Ronald Oussoren75912852010-04-08 08:13:31 +000014951LDCXXSHARED=${LDCXXSHARED-$LDSHARED}
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014952BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014953# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014954# library (module) -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014955{ echo "$as_me:$LINENO: checking CCSHARED" >&5
14956echo $ECHO_N "checking CCSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014957if test -z "$CCSHARED"
14958then
Guido van Rossum07397971997-04-29 21:49:50 +000014959 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014960 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000014961 then CCSHARED="-fPIC";
14962 elif test `uname -p` = sparc;
14963 then CCSHARED="-xcode=pic32";
14964 else CCSHARED="-Kpic";
14965 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014966 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014967 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014968 else CCSHARED="+z";
14969 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014970 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014971 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014972 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014973 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014974 if test "$GCC" = "yes"
14975 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014976 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014977 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014978 SCO_SV*)
14979 if test "$GCC" = "yes"
14980 then CCSHARED="-fPIC"
14981 else CCSHARED="-Kpic -belf"
14982 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014983 IRIX*/6*) case $CC in
14984 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014985 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014986 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014987 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014988 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014989fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014990{ echo "$as_me:$LINENO: result: $CCSHARED" >&5
14991echo "${ECHO_T}$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014992# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014993# the python executable -- this is only needed for a few systems
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000014994{ echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14995echo $ECHO_N "checking LINKFORSHARED... $ECHO_C" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014996if test -z "$LINKFORSHARED"
14997then
Guido van Rossum07397971997-04-29 21:49:50 +000014998 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014999 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000015000 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000015001 LINKFORSHARED="-Wl,-E -Wl,+s";;
15002# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000015003 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015004 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000015005 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000015006 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000015007 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
15008 # which is
Jack Jansene578a632001-08-15 01:27:14 +000015009 # not used by the core itself but which needs to be in the core so
15010 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000015011 # -prebind is no longer used, because it actually seems to give a
15012 # slowdown in stead of a speedup, maybe due to the large number of
15013 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000015014
15015 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000015016 if test "$enable_framework"
15017 then
Jack Jansenda49e192005-01-07 13:08:22 +000015018 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000015019 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000015020 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000015021 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000015022 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000015023 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000015024 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000015025 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
15026 then
15027 LINKFORSHARED="-Wl,--export-dynamic"
15028 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000015029 SunOS/5*) case $CC in
15030 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000015031 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000015032 then
15033 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000015034 fi;;
15035 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000015036 CYGWIN*)
15037 if test $enable_shared = "no"
15038 then
15039 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
15040 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000015041 QNX*)
15042 # -Wl,-E causes the symbols to be added to the dynamic
15043 # symbol table so that they can be found when a module
15044 # is loaded. -N 2048K causes the stack size to be set
15045 # to 2048 kilobytes so that the stack doesn't overflow
15046 # when running test_compile.py.
15047 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000015048 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000015049fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015050{ echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
15051echo "${ECHO_T}$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000015052
Michael W. Hudson54241132001-12-07 15:38:26 +000015053
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000015054
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015055{ echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
15056echo $ECHO_N "checking CFLAGSFORSHARED... $ECHO_C" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015057if test ! "$LIBRARY" = "$LDLIBRARY"
15058then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000015059 case $ac_sys_system in
15060 CYGWIN*)
15061 # Cygwin needs CCSHARED when building extension DLLs
15062 # but not when building the interpreter DLL.
15063 CFLAGSFORSHARED='';;
15064 *)
15065 CFLAGSFORSHARED='$(CCSHARED)'
15066 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015067fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015068{ echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
15069echo "${ECHO_T}$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000015070
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015071# SHLIBS are libraries (except -lc and -lm) to link to the python shared
15072# library (with --enable-shared).
15073# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015074# symbols, this must be set to $(LIBS) (expanded by make). We do this even
15075# if it is not required, since it creates a dependency of the shared library
15076# to LIBS. This, in turn, means that applications linking the shared libpython
15077# don't need to link LIBS explicitly. The default should be only changed
15078# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015079
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015080{ echo "$as_me:$LINENO: checking SHLIBS" >&5
15081echo $ECHO_N "checking SHLIBS... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015082case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015083 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000015084 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015085esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015086{ echo "$as_me:$LINENO: result: $SHLIBS" >&5
15087echo "${ECHO_T}$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015088
15089
Guido van Rossum627b2d71993-12-24 10:39:16 +000015090# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000015091
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015092{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
15093echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015094if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015095 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015096else
Martin v. Löwis11437992002-04-12 09:54:03 +000015097 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015098LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015099cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015100/* confdefs.h. */
15101_ACEOF
15102cat confdefs.h >>conftest.$ac_ext
15103cat >>conftest.$ac_ext <<_ACEOF
15104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015105
Martin v. Löwiseba40652007-08-30 20:10:57 +000015106/* Override any GCC internal prototype to avoid an error.
15107 Use char because int might match the return type of a GCC
15108 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015109#ifdef __cplusplus
15110extern "C"
15111#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015112char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015113int
15114main ()
15115{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015116return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015117 ;
15118 return 0;
15119}
15120_ACEOF
15121rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015122if { (ac_try="$ac_link"
15123case "(($ac_try" in
15124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15125 *) ac_try_echo=$ac_try;;
15126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015128 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015130 grep -v '^ *+' conftest.er1 >conftest.err
15131 rm -f conftest.er1
15132 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015134 (exit $ac_status); } && {
15135 test -z "$ac_c_werror_flag" ||
15136 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015137 } && test -s conftest$ac_exeext &&
15138 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015139 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015140else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015141 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015142sed 's/^/| /' conftest.$ac_ext >&5
15143
Martin v. Löwiseba40652007-08-30 20:10:57 +000015144 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015145fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015146
15147rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015148 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015149LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015150fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015151{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
15152echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; }
15153if test $ac_cv_lib_dl_dlopen = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015154 cat >>confdefs.h <<_ACEOF
15155#define HAVE_LIBDL 1
15156_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015157
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015158 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000015159
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015160fi
15161 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015162
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015163{ echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15164echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015165if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015166 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015167else
Martin v. Löwis11437992002-04-12 09:54:03 +000015168 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015169LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015170cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015171/* confdefs.h. */
15172_ACEOF
15173cat confdefs.h >>conftest.$ac_ext
15174cat >>conftest.$ac_ext <<_ACEOF
15175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015176
Martin v. Löwiseba40652007-08-30 20:10:57 +000015177/* Override any GCC internal prototype to avoid an error.
15178 Use char because int might match the return type of a GCC
15179 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015180#ifdef __cplusplus
15181extern "C"
15182#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015183char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015184int
15185main ()
15186{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015187return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015188 ;
15189 return 0;
15190}
15191_ACEOF
15192rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015193if { (ac_try="$ac_link"
15194case "(($ac_try" in
15195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15196 *) ac_try_echo=$ac_try;;
15197esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015199 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015201 grep -v '^ *+' conftest.er1 >conftest.err
15202 rm -f conftest.er1
15203 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015205 (exit $ac_status); } && {
15206 test -z "$ac_c_werror_flag" ||
15207 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015208 } && test -s conftest$ac_exeext &&
15209 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015211else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015212 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015213sed 's/^/| /' conftest.$ac_ext >&5
15214
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015217
15218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015219 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015220LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015221fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015222{ echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15223echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; }
15224if test $ac_cv_lib_dld_shl_load = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 cat >>confdefs.h <<_ACEOF
15226#define HAVE_LIBDLD 1
15227_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015228
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015229 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015230
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015231fi
15232 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015233
Ronald Oussoren79f90492009-01-02 10:44:46 +000015234# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015235if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015236 { echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15237echo $ECHO_N "checking for library containing sem_init... $ECHO_C" >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015238if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015239 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015240else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015241 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015242cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015243/* confdefs.h. */
15244_ACEOF
15245cat confdefs.h >>conftest.$ac_ext
15246cat >>conftest.$ac_ext <<_ACEOF
15247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015248
Martin v. Löwiseba40652007-08-30 20:10:57 +000015249/* Override any GCC internal prototype to avoid an error.
15250 Use char because int might match the return type of a GCC
15251 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015252#ifdef __cplusplus
15253extern "C"
15254#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015255char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015256int
15257main ()
15258{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015259return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 ;
15261 return 0;
15262}
15263_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015264for ac_lib in '' pthread rt posix4; do
15265 if test -z "$ac_lib"; then
15266 ac_res="none required"
15267 else
15268 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000015269 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000015270 fi
15271 rm -f conftest.$ac_objext conftest$ac_exeext
15272if { (ac_try="$ac_link"
15273case "(($ac_try" in
15274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15275 *) ac_try_echo=$ac_try;;
15276esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015277eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015278 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000015279 ac_status=$?
15280 grep -v '^ *+' conftest.er1 >conftest.err
15281 rm -f conftest.er1
15282 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015284 (exit $ac_status); } && {
15285 test -z "$ac_c_werror_flag" ||
15286 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015287 } && test -s conftest$ac_exeext &&
15288 $as_test_x conftest$ac_exeext; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015289 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000015290else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015291 echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000015292sed 's/^/| /' conftest.$ac_ext >&5
15293
Martin v. Löwiseba40652007-08-30 20:10:57 +000015294
Brett Cannon19fab762007-06-02 03:02:29 +000015295fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015296
15297rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15298 conftest$ac_exeext
15299 if test "${ac_cv_search_sem_init+set}" = set; then
15300 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000015301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015302done
15303if test "${ac_cv_search_sem_init+set}" = set; then
15304 :
15305else
15306 ac_cv_search_sem_init=no
15307fi
15308rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015309LIBS=$ac_func_search_save_LIBS
15310fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015311{ echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15312echo "${ECHO_T}$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015313ac_res=$ac_cv_search_sem_init
15314if test "$ac_res" != no; then
15315 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015316
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015317fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015318 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015319 # posix4 on Solaris 2.6
15320 # pthread (first!) on Linux
15321fi
15322
Martin v. Löwis19d17342003-06-14 21:03:05 +000015323# check if we need libintl for locale functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015324{ echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15325echo $ECHO_N "checking for textdomain in -lintl... $ECHO_C" >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015326if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015327 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015328else
15329 ac_check_lib_save_LIBS=$LIBS
15330LIBS="-lintl $LIBS"
15331cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015332/* confdefs.h. */
15333_ACEOF
15334cat confdefs.h >>conftest.$ac_ext
15335cat >>conftest.$ac_ext <<_ACEOF
15336/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015337
Martin v. Löwiseba40652007-08-30 20:10:57 +000015338/* Override any GCC internal prototype to avoid an error.
15339 Use char because int might match the return type of a GCC
15340 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015341#ifdef __cplusplus
15342extern "C"
15343#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015344char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015345int
15346main ()
15347{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015348return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015349 ;
15350 return 0;
15351}
15352_ACEOF
15353rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015354if { (ac_try="$ac_link"
15355case "(($ac_try" in
15356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15357 *) ac_try_echo=$ac_try;;
15358esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015359eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015360 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015362 grep -v '^ *+' conftest.er1 >conftest.err
15363 rm -f conftest.er1
15364 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015365 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015366 (exit $ac_status); } && {
15367 test -z "$ac_c_werror_flag" ||
15368 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015369 } && test -s conftest$ac_exeext &&
15370 $as_test_x conftest$ac_exeext; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015371 ac_cv_lib_intl_textdomain=yes
15372else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015373 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015374sed 's/^/| /' conftest.$ac_ext >&5
15375
Martin v. Löwiseba40652007-08-30 20:10:57 +000015376 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015377fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015378
15379rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015380 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015381LIBS=$ac_check_lib_save_LIBS
15382fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015383{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15384echo "${ECHO_T}$ac_cv_lib_intl_textdomain" >&6; }
15385if test $ac_cv_lib_intl_textdomain = yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015386
15387cat >>confdefs.h <<\_ACEOF
15388#define WITH_LIBINTL 1
15389_ACEOF
15390
15391fi
15392
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015393
15394# checks for system dependent C++ extensions support
15395case "$ac_sys_system" in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015396 AIX*) { echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15397echo $ECHO_N "checking for genuine AIX C++ extensions support... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015399/* confdefs.h. */
15400_ACEOF
15401cat confdefs.h >>conftest.$ac_ext
15402cat >>conftest.$ac_ext <<_ACEOF
15403/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015404#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015405int
15406main ()
15407{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015408loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015409 ;
15410 return 0;
15411}
15412_ACEOF
15413rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015414if { (ac_try="$ac_link"
15415case "(($ac_try" in
15416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15417 *) ac_try_echo=$ac_try;;
15418esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015419eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015420 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015422 grep -v '^ *+' conftest.er1 >conftest.err
15423 rm -f conftest.er1
15424 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015425 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015426 (exit $ac_status); } && {
15427 test -z "$ac_c_werror_flag" ||
15428 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015429 } && test -s conftest$ac_exeext &&
15430 $as_test_x conftest$ac_exeext; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015431
Martin v. Löwis11437992002-04-12 09:54:03 +000015432cat >>confdefs.h <<\_ACEOF
15433#define AIX_GENUINE_CPLUSPLUS 1
15434_ACEOF
15435
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015436 { echo "$as_me:$LINENO: result: yes" >&5
15437echo "${ECHO_T}yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015438else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015439 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015440sed 's/^/| /' conftest.$ac_ext >&5
15441
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015442 { echo "$as_me:$LINENO: result: no" >&5
15443echo "${ECHO_T}no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015445
15446rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015447 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015448 *) ;;
15449esac
15450
Guido van Rossum70c7f481998-03-26 18:44:10 +000015451# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015452# BeOS' sockets are stashed in libnet.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015453{ echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15454echo $ECHO_N "checking for t_open in -lnsl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015455if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015456 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015457else
Martin v. Löwis11437992002-04-12 09:54:03 +000015458 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015459LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015460cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015461/* confdefs.h. */
15462_ACEOF
15463cat confdefs.h >>conftest.$ac_ext
15464cat >>conftest.$ac_ext <<_ACEOF
15465/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015466
Martin v. Löwiseba40652007-08-30 20:10:57 +000015467/* Override any GCC internal prototype to avoid an error.
15468 Use char because int might match the return type of a GCC
15469 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015470#ifdef __cplusplus
15471extern "C"
15472#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015473char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015474int
15475main ()
15476{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015477return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015478 ;
15479 return 0;
15480}
15481_ACEOF
15482rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015483if { (ac_try="$ac_link"
15484case "(($ac_try" in
15485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15486 *) ac_try_echo=$ac_try;;
15487esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015489 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015490 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015491 grep -v '^ *+' conftest.er1 >conftest.err
15492 rm -f conftest.er1
15493 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015495 (exit $ac_status); } && {
15496 test -z "$ac_c_werror_flag" ||
15497 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015498 } && test -s conftest$ac_exeext &&
15499 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015500 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015501else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015502 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015503sed 's/^/| /' conftest.$ac_ext >&5
15504
Martin v. Löwiseba40652007-08-30 20:10:57 +000015505 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015506fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507
15508rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015509 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015510LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015511fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015512{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15513echo "${ECHO_T}$ac_cv_lib_nsl_t_open" >&6; }
15514if test $ac_cv_lib_nsl_t_open = yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015515 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015516fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015517 # SVR4
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015518{ echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15519echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015520if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015521 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015522else
Martin v. Löwis11437992002-04-12 09:54:03 +000015523 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015524LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015525cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015526/* confdefs.h. */
15527_ACEOF
15528cat confdefs.h >>conftest.$ac_ext
15529cat >>conftest.$ac_ext <<_ACEOF
15530/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015531
Martin v. Löwiseba40652007-08-30 20:10:57 +000015532/* Override any GCC internal prototype to avoid an error.
15533 Use char because int might match the return type of a GCC
15534 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015535#ifdef __cplusplus
15536extern "C"
15537#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015538char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015539int
15540main ()
15541{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015542return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015543 ;
15544 return 0;
15545}
15546_ACEOF
15547rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015548if { (ac_try="$ac_link"
15549case "(($ac_try" in
15550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15551 *) ac_try_echo=$ac_try;;
15552esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015553eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015554 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015556 grep -v '^ *+' conftest.er1 >conftest.err
15557 rm -f conftest.er1
15558 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015559 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015560 (exit $ac_status); } && {
15561 test -z "$ac_c_werror_flag" ||
15562 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015563 } && test -s conftest$ac_exeext &&
15564 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015565 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015566else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015567 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015568sed 's/^/| /' conftest.$ac_ext >&5
15569
Martin v. Löwiseba40652007-08-30 20:10:57 +000015570 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015572
15573rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015574 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015575LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015576fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015577{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15578echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6; }
15579if test $ac_cv_lib_socket_socket = yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015580 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015581fi
15582 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015583
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000015584case "$ac_sys_system" in
15585BeOS*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015586{ echo "$as_me:$LINENO: checking for socket in -lnet" >&5
15587echo $ECHO_N "checking for socket in -lnet... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015588if test "${ac_cv_lib_net_socket+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015589 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015590else
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015592LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015594/* confdefs.h. */
15595_ACEOF
15596cat confdefs.h >>conftest.$ac_ext
15597cat >>conftest.$ac_ext <<_ACEOF
15598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015599
Martin v. Löwiseba40652007-08-30 20:10:57 +000015600/* Override any GCC internal prototype to avoid an error.
15601 Use char because int might match the return type of a GCC
15602 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015603#ifdef __cplusplus
15604extern "C"
15605#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015606char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015607int
15608main ()
15609{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015610return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015611 ;
15612 return 0;
15613}
15614_ACEOF
15615rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015616if { (ac_try="$ac_link"
15617case "(($ac_try" in
15618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15619 *) ac_try_echo=$ac_try;;
15620esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015621eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015622 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015624 grep -v '^ *+' conftest.er1 >conftest.err
15625 rm -f conftest.er1
15626 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015627 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015628 (exit $ac_status); } && {
15629 test -z "$ac_c_werror_flag" ||
15630 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015631 } && test -s conftest$ac_exeext &&
15632 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015633 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015634else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015635 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015636sed 's/^/| /' conftest.$ac_ext >&5
15637
Martin v. Löwiseba40652007-08-30 20:10:57 +000015638 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015640
15641rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015642 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015643LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000015644fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015645{ echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
15646echo "${ECHO_T}$ac_cv_lib_net_socket" >&6; }
15647if test $ac_cv_lib_net_socket = yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015648 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015649fi
15650 # BeOS
15651;;
15652esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000015653
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015654{ echo "$as_me:$LINENO: checking for --with-libs" >&5
15655echo $ECHO_N "checking for --with-libs... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015656
Martin v. Löwiseba40652007-08-30 20:10:57 +000015657# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015658if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015659 withval=$with_libs;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015660{ echo "$as_me:$LINENO: result: $withval" >&5
15661echo "${ECHO_T}$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015662LIBS="$withval $LIBS"
15663
15664else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015665 { echo "$as_me:$LINENO: result: no" >&5
15666echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015667fi
15668
Guido van Rossum7f43da71994-08-01 12:15:30 +000015669
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015670if test -n "$ac_tool_prefix"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015671 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
15672set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
15673{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15674echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15675if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
15676 echo $ECHO_N "(cached) $ECHO_C" >&6
15677else
15678 case $PKG_CONFIG in
15679 [\\/]* | ?:[\\/]*)
15680 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
15681 ;;
15682 *)
15683 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15684for as_dir in $PATH
15685do
15686 IFS=$as_save_IFS
15687 test -z "$as_dir" && as_dir=.
15688 for ac_exec_ext in '' $ac_executable_extensions; do
15689 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15690 ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15691 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15692 break 2
15693 fi
15694done
15695done
15696IFS=$as_save_IFS
15697
15698 ;;
15699esac
15700fi
15701PKG_CONFIG=$ac_cv_path_PKG_CONFIG
15702if test -n "$PKG_CONFIG"; then
15703 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
15704echo "${ECHO_T}$PKG_CONFIG" >&6; }
15705else
15706 { echo "$as_me:$LINENO: result: no" >&5
15707echo "${ECHO_T}no" >&6; }
15708fi
15709
15710
15711fi
15712if test -z "$ac_cv_path_PKG_CONFIG"; then
15713 ac_pt_PKG_CONFIG=$PKG_CONFIG
15714 # Extract the first word of "pkg-config", so it can be a program name with args.
15715set dummy pkg-config; ac_word=$2
15716{ echo "$as_me:$LINENO: checking for $ac_word" >&5
15717echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
15718if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
15719 echo $ECHO_N "(cached) $ECHO_C" >&6
15720else
15721 case $ac_pt_PKG_CONFIG in
15722 [\\/]* | ?:[\\/]*)
15723 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
15724 ;;
15725 *)
15726 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15727for as_dir in $PATH
15728do
15729 IFS=$as_save_IFS
15730 test -z "$as_dir" && as_dir=.
15731 for ac_exec_ext in '' $ac_executable_extensions; do
15732 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15733 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
15734 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
15735 break 2
15736 fi
15737done
15738done
15739IFS=$as_save_IFS
15740
15741 ;;
15742esac
15743fi
15744ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
15745if test -n "$ac_pt_PKG_CONFIG"; then
15746 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
15747echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; }
15748else
15749 { echo "$as_me:$LINENO: result: no" >&5
15750echo "${ECHO_T}no" >&6; }
15751fi
15752
15753 if test "x$ac_pt_PKG_CONFIG" = x; then
15754 PKG_CONFIG=""
15755 else
15756 case $cross_compiling:$ac_tool_warned in
15757yes:)
15758{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools
15759whose name does not start with the host triplet. If you think this
15760configuration is useful to you, please write to autoconf@gnu.org." >&5
15761echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
15762whose name does not start with the host triplet. If you think this
15763configuration is useful to you, please write to autoconf@gnu.org." >&2;}
15764ac_tool_warned=yes ;;
15765esac
15766 PKG_CONFIG=$ac_pt_PKG_CONFIG
15767 fi
15768else
15769 PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
15770fi
15771
Benjamin Petersone9e07bf2010-03-09 21:46:54 +000015772
15773# Check for use of the system expat library
15774{ echo "$as_me:$LINENO: checking for --with-system-expat" >&5
15775echo $ECHO_N "checking for --with-system-expat... $ECHO_C" >&6; }
15776
15777# Check whether --with-system_expat was given.
15778if test "${with_system_expat+set}" = set; then
15779 withval=$with_system_expat;
15780fi
15781
15782
15783{ echo "$as_me:$LINENO: result: $with_system_expat" >&5
15784echo "${ECHO_T}$with_system_expat" >&6; }
15785
15786# Check for use of the system libffi library
15787{ echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15788echo $ECHO_N "checking for --with-system-ffi... $ECHO_C" >&6; }
15789
15790# Check whether --with-system_ffi was given.
15791if test "${with_system_ffi+set}" = set; then
15792 withval=$with_system_ffi;
15793fi
15794
15795
15796if test "$with_system_ffi" = "yes" && test -n "$PKG_CONFIG"; then
Benjamin Peterson1c335e62010-01-01 15:16:29 +000015797 LIBFFI_INCLUDEDIR="`"$PKG_CONFIG" libffi --cflags-only-I 2>/dev/null | sed -e 's/^-I//;s/ *$//'`"
15798else
15799 LIBFFI_INCLUDEDIR=""
15800fi
15801
15802
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015803{ echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15804echo "${ECHO_T}$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000015805
Benjamin Peterson867475c2009-04-29 20:36:25 +000015806# Check for --with-dbmliborder
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015807{ echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15808echo $ECHO_N "checking for --with-dbmliborder... $ECHO_C" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015809
15810# Check whether --with-dbmliborder was given.
15811if test "${with_dbmliborder+set}" = set; then
15812 withval=$with_dbmliborder;
15813if test x$with_dbmliborder = xyes
15814then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015815{ { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15816echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015817 { (exit 1); exit 1; }; }
15818else
15819 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15820 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15821 then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015822 { { echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15823echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Benjamin Peterson867475c2009-04-29 20:36:25 +000015824 { (exit 1); exit 1; }; }
15825 fi
15826 done
15827fi
15828fi
15829
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015830{ echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15831echo "${ECHO_T}$with_dbmliborder" >&6; }
Benjamin Peterson867475c2009-04-29 20:36:25 +000015832
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015833# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015834
15835
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015836{ echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15837echo $ECHO_N "checking for --with-signal-module... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015838
Martin v. Löwiseba40652007-08-30 20:10:57 +000015839# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015840if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015841 withval=$with_signal_module;
15842fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015843
15844
15845if test -z "$with_signal_module"
15846then with_signal_module="yes"
15847fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015848{ echo "$as_me:$LINENO: result: $with_signal_module" >&5
15849echo "${ECHO_T}$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015850
15851if test "${with_signal_module}" = "yes"; then
15852 USE_SIGNAL_MODULE=""
15853 SIGNAL_OBJS=""
15854else
15855 USE_SIGNAL_MODULE="#"
15856 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15857fi
15858
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015859# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015860
Barry Warsawc0d24d82000-06-29 16:12:00 +000015861USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015862
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015863{ echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15864echo $ECHO_N "checking for --with-dec-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015865
Guido van Rossumec2f0731997-01-22 20:54:01 +000015866
Martin v. Löwiseba40652007-08-30 20:10:57 +000015867# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015868if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015869 withval=$with_dec_threads;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015870{ echo "$as_me:$LINENO: result: $withval" >&5
15871echo "${ECHO_T}$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015872LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015873if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015874 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015875fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015876else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015877 { echo "$as_me:$LINENO: result: no" >&5
15878echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015879fi
15880
Martin v. Löwis11437992002-04-12 09:54:03 +000015881
15882# Templates for things AC_DEFINEd more than once.
15883# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015884
15885
Martin v. Löwis11437992002-04-12 09:54:03 +000015886
15887
15888
15889
15890
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015891{ echo "$as_me:$LINENO: checking for --with-threads" >&5
15892echo $ECHO_N "checking for --with-threads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015893
Martin v. Löwiseba40652007-08-30 20:10:57 +000015894# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015895if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015896 withval=$with_threads;
15897fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015898
15899
Barry Warsawc0d24d82000-06-29 16:12:00 +000015900# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015901
Martin v. Löwiseba40652007-08-30 20:10:57 +000015902# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015903if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000015904 withval=$with_thread; with_threads=$with_thread
15905fi
15906
Barry Warsawc0d24d82000-06-29 16:12:00 +000015907
15908if test -z "$with_threads"
15909then with_threads="yes"
15910fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015911{ echo "$as_me:$LINENO: result: $with_threads" >&5
15912echo "${ECHO_T}$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000015913
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015914
Barry Warsawc0d24d82000-06-29 16:12:00 +000015915if test "$with_threads" = "no"
15916then
15917 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015918elif test "$ac_cv_pthread_is_default" = yes
15919then
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 WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015922_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015923
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015924 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015925 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015926#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015927_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015928
15929 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015930 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015931elif test "$ac_cv_kpthread" = "yes"
15932then
15933 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015934 if test "$ac_cv_cxx_thread" = "yes"; then
15935 CXX="$CXX -Kpthread"
15936 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015937 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015938#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015939_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015940
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015941 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015942 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015943elif test "$ac_cv_kthread" = "yes"
15944then
15945 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015946 if test "$ac_cv_cxx_thread" = "yes"; then
15947 CXX="$CXX -Kthread"
15948 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015949 cat >>confdefs.h <<\_ACEOF
15950#define WITH_THREAD 1
15951_ACEOF
15952
15953 posix_threads=yes
15954 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015955elif test "$ac_cv_pthread" = "yes"
15956then
15957 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015958 if test "$ac_cv_cxx_thread" = "yes"; then
15959 CXX="$CXX -pthread"
15960 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015961 cat >>confdefs.h <<\_ACEOF
15962#define WITH_THREAD 1
15963_ACEOF
15964
15965 posix_threads=yes
15966 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015967else
15968 if test ! -z "$with_threads" -a -d "$with_threads"
15969 then LDFLAGS="$LDFLAGS -L$with_threads"
15970 fi
15971 if test ! -z "$withval" -a -d "$withval"
15972 then LDFLAGS="$LDFLAGS -L$withval"
15973 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015974
15975 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015976 # define _POSIX_THREADS in unistd.h. Some apparently don't
15977 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000015978 { echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15979echo $ECHO_N "checking for _POSIX_THREADS in unistd.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015981/* confdefs.h. */
15982_ACEOF
15983cat confdefs.h >>conftest.$ac_ext
15984cat >>conftest.$ac_ext <<_ACEOF
15985/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015986
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015987#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015988#ifdef _POSIX_THREADS
15989yes
15990#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015991
15992_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015993if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015994 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015995 unistd_defines_pthreads=yes
15996else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015997 unistd_defines_pthreads=no
15998fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000015999rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016000
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016001 { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
16002echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016003
Martin v. Löwis11437992002-04-12 09:54:03 +000016004 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000016005#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016006_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000016007
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016009 { echo "$as_me:$LINENO: checking for cthreads.h" >&5
16010echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016011if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016012 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016013fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016014{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16015echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016016else
Martin v. Löwis11437992002-04-12 09:54:03 +000016017 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016018{ echo "$as_me:$LINENO: checking cthreads.h usability" >&5
16019echo $ECHO_N "checking cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016021/* confdefs.h. */
16022_ACEOF
16023cat confdefs.h >>conftest.$ac_ext
16024cat >>conftest.$ac_ext <<_ACEOF
16025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016026$ac_includes_default
16027#include <cthreads.h>
16028_ACEOF
16029rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016030if { (ac_try="$ac_compile"
16031case "(($ac_try" in
16032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16033 *) ac_try_echo=$ac_try;;
16034esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016036 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016038 grep -v '^ *+' conftest.er1 >conftest.err
16039 rm -f conftest.er1
16040 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016041 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016042 (exit $ac_status); } && {
16043 test -z "$ac_c_werror_flag" ||
16044 test ! -s conftest.err
16045 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016046 ac_header_compiler=yes
16047else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016048 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016049sed 's/^/| /' conftest.$ac_ext >&5
16050
Martin v. Löwiseba40652007-08-30 20:10:57 +000016051 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016052fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016053
16054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016055{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16056echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016057
16058# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016059{ echo "$as_me:$LINENO: checking cthreads.h presence" >&5
16060echo $ECHO_N "checking cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016061cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016062/* confdefs.h. */
16063_ACEOF
16064cat confdefs.h >>conftest.$ac_ext
16065cat >>conftest.$ac_ext <<_ACEOF
16066/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016067#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016068_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016069if { (ac_try="$ac_cpp conftest.$ac_ext"
16070case "(($ac_try" in
16071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16072 *) ac_try_echo=$ac_try;;
16073esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016075 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016076 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016077 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016078 rm -f conftest.er1
16079 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016081 (exit $ac_status); } >/dev/null && {
16082 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16083 test ! -s conftest.err
16084 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016085 ac_header_preproc=yes
16086else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016087 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016088sed 's/^/| /' conftest.$ac_ext >&5
16089
Martin v. Löwis11437992002-04-12 09:54:03 +000016090 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016092
Martin v. Löwis11437992002-04-12 09:54:03 +000016093rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016094{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16095echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016096
16097# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016098case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16099 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016100 { echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16101echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16102 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
16103echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016104 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016105 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016106 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016107 { echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
16108echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
16109 { echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
16110echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
16111 { echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
16112echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
16113 { echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16114echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16115 { echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
16116echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
16117 { echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
16118echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016119 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016120## -------------------------------------- ##
16121## Report this to http://bugs.python.org/ ##
16122## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016123_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016124 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016125 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016126esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016127{ echo "$as_me:$LINENO: checking for cthreads.h" >&5
16128echo $ECHO_N "checking for cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016129if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016130 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016131else
16132 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016133fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016134{ echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
16135echo "${ECHO_T}$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016136
16137fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016138if test $ac_cv_header_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016139 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016140#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016141_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016142
Martin v. Löwis11437992002-04-12 09:54:03 +000016143 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016144#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016145_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016146
Martin v. Löwis11437992002-04-12 09:54:03 +000016147
16148cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016149#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016150_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016151
16152 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016153 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016154else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016155
Martin v. Löwis11437992002-04-12 09:54:03 +000016156 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016157 { echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16158echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016159if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016160 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016161fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016162{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16163echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016164else
Martin v. Löwis11437992002-04-12 09:54:03 +000016165 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016166{ echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
16167echo $ECHO_N "checking mach/cthreads.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016168cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016169/* confdefs.h. */
16170_ACEOF
16171cat confdefs.h >>conftest.$ac_ext
16172cat >>conftest.$ac_ext <<_ACEOF
16173/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016174$ac_includes_default
16175#include <mach/cthreads.h>
16176_ACEOF
16177rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016178if { (ac_try="$ac_compile"
16179case "(($ac_try" in
16180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16181 *) ac_try_echo=$ac_try;;
16182esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016186 grep -v '^ *+' conftest.er1 >conftest.err
16187 rm -f conftest.er1
16188 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016190 (exit $ac_status); } && {
16191 test -z "$ac_c_werror_flag" ||
16192 test ! -s conftest.err
16193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016194 ac_header_compiler=yes
16195else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016197sed 's/^/| /' conftest.$ac_ext >&5
16198
Martin v. Löwiseba40652007-08-30 20:10:57 +000016199 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016201
16202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016203{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16204echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016205
16206# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016207{ echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
16208echo $ECHO_N "checking mach/cthreads.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016209cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016210/* confdefs.h. */
16211_ACEOF
16212cat confdefs.h >>conftest.$ac_ext
16213cat >>conftest.$ac_ext <<_ACEOF
16214/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016215#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016216_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016217if { (ac_try="$ac_cpp conftest.$ac_ext"
16218case "(($ac_try" in
16219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16220 *) ac_try_echo=$ac_try;;
16221esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016222eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016223 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016224 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016225 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 rm -f conftest.er1
16227 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016228 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016229 (exit $ac_status); } >/dev/null && {
16230 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16231 test ! -s conftest.err
16232 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016233 ac_header_preproc=yes
16234else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016235 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016236sed 's/^/| /' conftest.$ac_ext >&5
16237
Martin v. Löwis11437992002-04-12 09:54:03 +000016238 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016239fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016240
Martin v. Löwis11437992002-04-12 09:54:03 +000016241rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016242{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16243echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016244
16245# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016246case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16247 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016248 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16249echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16250 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
16251echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016252 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016253 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016254 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016255 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
16256echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
16257 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
16258echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
16259 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
16260echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
16261 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
16262echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16263 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
16264echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
16265 { echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
16266echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016267 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016268## -------------------------------------- ##
16269## Report this to http://bugs.python.org/ ##
16270## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016271_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016272 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016273 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016274esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016275{ echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
16276echo $ECHO_N "checking for mach/cthreads.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016277if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016278 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016279else
16280 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016281fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016282{ echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
16283echo "${ECHO_T}$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016284
16285fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016286if test $ac_cv_header_mach_cthreads_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016287 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016288#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016289_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016290
Martin v. Löwis11437992002-04-12 09:54:03 +000016291 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016292#define 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öwis11437992002-04-12 09:54:03 +000016295
16296cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016297#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016298_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016299
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016300 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016301else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016302
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016303 { echo "$as_me:$LINENO: checking for --with-pth" >&5
16304echo $ECHO_N "checking for --with-pth... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016305
Martin v. Löwiseba40652007-08-30 20:10:57 +000016306# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016307if test "${with_pth+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016308 withval=$with_pth; { echo "$as_me:$LINENO: result: $withval" >&5
16309echo "${ECHO_T}$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016310 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000016311#define WITH_THREAD 1
16312_ACEOF
16313
16314
16315cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016316#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016317_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016318
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000016319 LIBS="-lpth $LIBS"
16320 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000016321else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016322 { echo "$as_me:$LINENO: result: no" >&5
16323echo "${ECHO_T}no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016324
16325 # Just looking for pthread_create in libpthread is not enough:
16326 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16327 # So we really have to include pthread.h, and then link.
16328 _libs=$LIBS
16329 LIBS="$LIBS -lpthread"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016330 { echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16331echo $ECHO_N "checking for pthread_create in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016332 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016333/* confdefs.h. */
16334_ACEOF
16335cat confdefs.h >>conftest.$ac_ext
16336cat >>conftest.$ac_ext <<_ACEOF
16337/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016338#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016339
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016340void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016341int
16342main ()
16343{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016344
16345pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016346 ;
16347 return 0;
16348}
16349_ACEOF
16350rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016351if { (ac_try="$ac_link"
16352case "(($ac_try" in
16353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16354 *) ac_try_echo=$ac_try;;
16355esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016356eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016357 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016359 grep -v '^ *+' conftest.er1 >conftest.err
16360 rm -f conftest.er1
16361 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016362 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016363 (exit $ac_status); } && {
16364 test -z "$ac_c_werror_flag" ||
16365 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016366 } && test -s conftest$ac_exeext &&
16367 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016368
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016369 { echo "$as_me:$LINENO: result: yes" >&5
16370echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016371 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016372#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016373_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016374
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016375 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016376 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016377else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016378 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016379sed 's/^/| /' conftest.$ac_ext >&5
16380
Martin v. Löwis11437992002-04-12 09:54:03 +000016381
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016382 LIBS=$_libs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016383 { echo "$as_me:$LINENO: checking for pthread_detach" >&5
16384echo $ECHO_N "checking for pthread_detach... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016385if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016386 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016387else
Martin v. Löwis11437992002-04-12 09:54:03 +000016388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016389/* confdefs.h. */
16390_ACEOF
16391cat confdefs.h >>conftest.$ac_ext
16392cat >>conftest.$ac_ext <<_ACEOF
16393/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016394/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16395 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16396#define pthread_detach innocuous_pthread_detach
16397
Guido van Rossumad678af1998-10-02 14:42:15 +000016398/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016399 which can conflict with char pthread_detach (); below.
16400 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016401 <limits.h> exists even on freestanding compilers. */
16402
16403#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016404# include <limits.h>
16405#else
16406# include <assert.h>
16407#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016408
16409#undef pthread_detach
16410
Martin v. Löwiseba40652007-08-30 20:10:57 +000016411/* Override any GCC internal prototype to avoid an error.
16412 Use char because int might match the return type of a GCC
16413 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016414#ifdef __cplusplus
16415extern "C"
16416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016417char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016418/* The GNU C library defines this for functions which it implements
16419 to always fail with ENOSYS. Some functions are actually named
16420 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016421#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016422choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016423#endif
16424
Skip Montanaro6dead952003-09-25 14:50:04 +000016425int
16426main ()
16427{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016428return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016429 ;
16430 return 0;
16431}
16432_ACEOF
16433rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016434if { (ac_try="$ac_link"
16435case "(($ac_try" in
16436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16437 *) ac_try_echo=$ac_try;;
16438esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016439eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016440 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016442 grep -v '^ *+' conftest.er1 >conftest.err
16443 rm -f conftest.er1
16444 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016445 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016446 (exit $ac_status); } && {
16447 test -z "$ac_c_werror_flag" ||
16448 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016449 } && test -s conftest$ac_exeext &&
16450 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016451 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016452else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016453 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016454sed 's/^/| /' conftest.$ac_ext >&5
16455
Martin v. Löwiseba40652007-08-30 20:10:57 +000016456 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016458
16459rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016460 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016461fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016462{ echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16463echo "${ECHO_T}$ac_cv_func_pthread_detach" >&6; }
16464if test $ac_cv_func_pthread_detach = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016465 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016466#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016467_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016468
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016469 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016470 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016471else
Guido van Rossumad678af1998-10-02 14:42:15 +000016472
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016473 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016474 { echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16475echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016476if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016477 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016478fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016479{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16480echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016481else
16482 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016483{ echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16484echo $ECHO_N "checking atheos/threads.h usability... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016486/* confdefs.h. */
16487_ACEOF
16488cat confdefs.h >>conftest.$ac_ext
16489cat >>conftest.$ac_ext <<_ACEOF
16490/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016491$ac_includes_default
16492#include <atheos/threads.h>
16493_ACEOF
16494rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016495if { (ac_try="$ac_compile"
16496case "(($ac_try" in
16497 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16498 *) ac_try_echo=$ac_try;;
16499esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016500eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016503 grep -v '^ *+' conftest.er1 >conftest.err
16504 rm -f conftest.er1
16505 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016506 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016507 (exit $ac_status); } && {
16508 test -z "$ac_c_werror_flag" ||
16509 test ! -s conftest.err
16510 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016511 ac_header_compiler=yes
16512else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016513 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016514sed 's/^/| /' conftest.$ac_ext >&5
16515
Martin v. Löwiseba40652007-08-30 20:10:57 +000016516 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016518
16519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016520{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16521echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016522
16523# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016524{ echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16525echo $ECHO_N "checking atheos/threads.h presence... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016527/* confdefs.h. */
16528_ACEOF
16529cat confdefs.h >>conftest.$ac_ext
16530cat >>conftest.$ac_ext <<_ACEOF
16531/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016532#include <atheos/threads.h>
16533_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016534if { (ac_try="$ac_cpp conftest.$ac_ext"
16535case "(($ac_try" in
16536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16537 *) ac_try_echo=$ac_try;;
16538esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016540 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016541 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016542 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016543 rm -f conftest.er1
16544 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016546 (exit $ac_status); } >/dev/null && {
16547 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16548 test ! -s conftest.err
16549 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016550 ac_header_preproc=yes
16551else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016552 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016553sed 's/^/| /' conftest.$ac_ext >&5
16554
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016555 ac_header_preproc=no
16556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016557
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016558rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016559{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16560echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016561
16562# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016563case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16564 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016565 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16566echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16567 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16568echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016569 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016570 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016571 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016572 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16573echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16574 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16575echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16576 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16577echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16578 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16579echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16580 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16581echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16582 { echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16583echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016584 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016585## -------------------------------------- ##
16586## Report this to http://bugs.python.org/ ##
16587## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016588_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016589 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016590 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016591esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016592{ echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16593echo $ECHO_N "checking for atheos/threads.h... $ECHO_C" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016594if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016595 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016596else
16597 ac_cv_header_atheos_threads_h=$ac_header_preproc
16598fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016599{ echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16600echo "${ECHO_T}$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016601
16602fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016603if test $ac_cv_header_atheos_threads_h = yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016604 cat >>confdefs.h <<\_ACEOF
16605#define WITH_THREAD 1
16606_ACEOF
16607
16608
16609cat >>confdefs.h <<\_ACEOF
16610#define ATHEOS_THREADS 1
16611_ACEOF
16612
16613 THREADOBJ="Python/thread.o"
16614else
16615
Martin v. Löwis11437992002-04-12 09:54:03 +000016616 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016617 { echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16618echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016619if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016620 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016621fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016622{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16623echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016624else
Martin v. Löwis11437992002-04-12 09:54:03 +000016625 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016626{ echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
16627echo $ECHO_N "checking kernel/OS.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016628cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016629/* confdefs.h. */
16630_ACEOF
16631cat confdefs.h >>conftest.$ac_ext
16632cat >>conftest.$ac_ext <<_ACEOF
16633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016634$ac_includes_default
16635#include <kernel/OS.h>
16636_ACEOF
16637rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016638if { (ac_try="$ac_compile"
16639case "(($ac_try" in
16640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16641 *) ac_try_echo=$ac_try;;
16642esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016643eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016646 grep -v '^ *+' conftest.er1 >conftest.err
16647 rm -f conftest.er1
16648 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016649 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016650 (exit $ac_status); } && {
16651 test -z "$ac_c_werror_flag" ||
16652 test ! -s conftest.err
16653 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016654 ac_header_compiler=yes
16655else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016656 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016657sed 's/^/| /' conftest.$ac_ext >&5
16658
Martin v. Löwiseba40652007-08-30 20:10:57 +000016659 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000016660fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016661
16662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016663{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16664echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016665
16666# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016667{ echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
16668echo $ECHO_N "checking kernel/OS.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016669cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016670/* confdefs.h. */
16671_ACEOF
16672cat confdefs.h >>conftest.$ac_ext
16673cat >>conftest.$ac_ext <<_ACEOF
16674/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016675#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016676_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000016677if { (ac_try="$ac_cpp conftest.$ac_ext"
16678case "(($ac_try" in
16679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16680 *) ac_try_echo=$ac_try;;
16681esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016682eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016683 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016684 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016685 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000016686 rm -f conftest.er1
16687 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016688 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016689 (exit $ac_status); } >/dev/null && {
16690 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16691 test ! -s conftest.err
16692 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016693 ac_header_preproc=yes
16694else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016695 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016696sed 's/^/| /' conftest.$ac_ext >&5
16697
Martin v. Löwis11437992002-04-12 09:54:03 +000016698 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016699fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016700
Martin v. Löwis11437992002-04-12 09:54:03 +000016701rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016702{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16703echo "${ECHO_T}$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016704
Martin v. Löwis11437992002-04-12 09:54:03 +000016705# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016706case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16707 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016708 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
16709echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16710 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
16711echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016712 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016713 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016714 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016715 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
16716echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
16717 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
16718echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
16719 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
16720echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
16721 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
16722echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
16723 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
16724echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
16725 { echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
16726echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000016727 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000016728## -------------------------------------- ##
16729## Report this to http://bugs.python.org/ ##
16730## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016731_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000016732 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016733 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016734esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016735{ echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
16736echo $ECHO_N "checking for kernel/OS.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016737if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016738 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000016739else
16740 ac_cv_header_kernel_OS_h=$ac_header_preproc
16741fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016742{ echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
16743echo "${ECHO_T}$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016744
16745fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016746if test $ac_cv_header_kernel_OS_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016747 cat >>confdefs.h <<\_ACEOF
16748#define WITH_THREAD 1
16749_ACEOF
16750
16751
16752cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016753#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016754_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016755
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016756 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016757else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000016758
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016759 { echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16760echo $ECHO_N "checking for pthread_create in -lpthreads... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016761if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016762 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016763else
Martin v. Löwis11437992002-04-12 09:54:03 +000016764 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016765LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016766cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016767/* confdefs.h. */
16768_ACEOF
16769cat confdefs.h >>conftest.$ac_ext
16770cat >>conftest.$ac_ext <<_ACEOF
16771/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016772
Martin v. Löwiseba40652007-08-30 20:10:57 +000016773/* Override any GCC internal prototype to avoid an error.
16774 Use char because int might match the return type of a GCC
16775 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016776#ifdef __cplusplus
16777extern "C"
16778#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016779char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016780int
16781main ()
16782{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016783return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016784 ;
16785 return 0;
16786}
16787_ACEOF
16788rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016789if { (ac_try="$ac_link"
16790case "(($ac_try" in
16791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16792 *) ac_try_echo=$ac_try;;
16793esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016795 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016797 grep -v '^ *+' conftest.er1 >conftest.err
16798 rm -f conftest.er1
16799 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016800 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016801 (exit $ac_status); } && {
16802 test -z "$ac_c_werror_flag" ||
16803 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016804 } && test -s conftest$ac_exeext &&
16805 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016806 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016807else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016808 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016809sed 's/^/| /' conftest.$ac_ext >&5
16810
Martin v. Löwiseba40652007-08-30 20:10:57 +000016811 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016812fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016813
16814rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016815 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016816LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016817fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016818{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16819echo "${ECHO_T}$ac_cv_lib_pthreads_pthread_create" >&6; }
16820if test $ac_cv_lib_pthreads_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016821 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016822#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016823_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016824
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016825 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016826 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016827 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016828else
Greg Steinadf63d62000-07-05 10:38:09 +000016829
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016830 { echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16831echo $ECHO_N "checking for pthread_create in -lc_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016832if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016833 echo $ECHO_N "(cached) $ECHO_C" >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016834else
Martin v. Löwis11437992002-04-12 09:54:03 +000016835 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016836LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016837cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016838/* confdefs.h. */
16839_ACEOF
16840cat confdefs.h >>conftest.$ac_ext
16841cat >>conftest.$ac_ext <<_ACEOF
16842/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016843
Martin v. Löwiseba40652007-08-30 20:10:57 +000016844/* Override any GCC internal prototype to avoid an error.
16845 Use char because int might match the return type of a GCC
16846 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016847#ifdef __cplusplus
16848extern "C"
16849#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016850char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016851int
16852main ()
16853{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016854return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016855 ;
16856 return 0;
16857}
16858_ACEOF
16859rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016860if { (ac_try="$ac_link"
16861case "(($ac_try" in
16862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16863 *) ac_try_echo=$ac_try;;
16864esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016865eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016866 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016868 grep -v '^ *+' conftest.er1 >conftest.err
16869 rm -f conftest.er1
16870 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016871 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016872 (exit $ac_status); } && {
16873 test -z "$ac_c_werror_flag" ||
16874 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016875 } && test -s conftest$ac_exeext &&
16876 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016877 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016878else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016879 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016880sed 's/^/| /' conftest.$ac_ext >&5
16881
Martin v. Löwiseba40652007-08-30 20:10:57 +000016882 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016883fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016884
16885rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016886 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016887LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016888fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016889{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16890echo "${ECHO_T}$ac_cv_lib_c_r_pthread_create" >&6; }
16891if test $ac_cv_lib_c_r_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016892 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016893#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016894_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016895
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016896 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016897 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016898 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016899else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016900
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016901 { echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16902echo $ECHO_N "checking for __pthread_create_system in -lpthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016903if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016904 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016905else
Martin v. Löwis11437992002-04-12 09:54:03 +000016906 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016907LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016908cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016909/* confdefs.h. */
16910_ACEOF
16911cat confdefs.h >>conftest.$ac_ext
16912cat >>conftest.$ac_ext <<_ACEOF
16913/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016914
Martin v. Löwiseba40652007-08-30 20:10:57 +000016915/* Override any GCC internal prototype to avoid an error.
16916 Use char because int might match the return type of a GCC
16917 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016918#ifdef __cplusplus
16919extern "C"
16920#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016921char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016922int
16923main ()
16924{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016925return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016926 ;
16927 return 0;
16928}
16929_ACEOF
16930rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016931if { (ac_try="$ac_link"
16932case "(($ac_try" in
16933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16934 *) ac_try_echo=$ac_try;;
16935esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016936eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016937 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016939 grep -v '^ *+' conftest.er1 >conftest.err
16940 rm -f conftest.er1
16941 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016942 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016943 (exit $ac_status); } && {
16944 test -z "$ac_c_werror_flag" ||
16945 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016946 } && test -s conftest$ac_exeext &&
16947 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016948 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016949else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016950 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016951sed 's/^/| /' conftest.$ac_ext >&5
16952
Martin v. Löwiseba40652007-08-30 20:10:57 +000016953 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016954fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016955
16956rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016957 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016958LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016959fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016960{ echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16961echo "${ECHO_T}$ac_cv_lib_pthread___pthread_create_system" >&6; }
16962if test $ac_cv_lib_pthread___pthread_create_system = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016963 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016964#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016965_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016966
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016967 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016968 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016969 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016970else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016971
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016972 { echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16973echo $ECHO_N "checking for pthread_create in -lcma... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016974if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000016975 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016976else
Martin v. Löwis11437992002-04-12 09:54:03 +000016977 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016978LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016979cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016980/* confdefs.h. */
16981_ACEOF
16982cat confdefs.h >>conftest.$ac_ext
16983cat >>conftest.$ac_ext <<_ACEOF
16984/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016985
Martin v. Löwiseba40652007-08-30 20:10:57 +000016986/* Override any GCC internal prototype to avoid an error.
16987 Use char because int might match the return type of a GCC
16988 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016989#ifdef __cplusplus
16990extern "C"
16991#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016992char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016993int
16994main ()
16995{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016996return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016997 ;
16998 return 0;
16999}
17000_ACEOF
17001rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017002if { (ac_try="$ac_link"
17003case "(($ac_try" in
17004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17005 *) ac_try_echo=$ac_try;;
17006esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017007eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017008 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017010 grep -v '^ *+' conftest.er1 >conftest.err
17011 rm -f conftest.er1
17012 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017013 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017014 (exit $ac_status); } && {
17015 test -z "$ac_c_werror_flag" ||
17016 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017017 } && test -s conftest$ac_exeext &&
17018 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017019 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000017020else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017021 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017022sed 's/^/| /' conftest.$ac_ext >&5
17023
Martin v. Löwiseba40652007-08-30 20:10:57 +000017024 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000017025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017026
17027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017028 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017029LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000017030fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017031{ echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
17032echo "${ECHO_T}$ac_cv_lib_cma_pthread_create" >&6; }
17033if test $ac_cv_lib_cma_pthread_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017034 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000017035#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017036_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000017037
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017038 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000017039 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017040 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000017041else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000017042
Martin v. Löwis130fb172001-07-19 11:00:41 +000017043 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000017044fi
17045
Guido van Rossum627b2d71993-12-24 10:39:16 +000017046
Guido van Rossum7b3853f1996-07-30 18:09:35 +000017047fi
17048
Guido van Rossum0be3e491997-05-22 20:33:33 +000017049fi
17050
Guido van Rossum49545951997-12-02 19:28:29 +000017051fi
17052
Guido van Rossumb93a8621998-05-07 13:27:32 +000017053fi
17054
Guido van Rossum07bd90e2000-05-08 13:41:38 +000017055
Michael W. Hudson54241132001-12-07 15:38:26 +000017056fi
17057
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017058
17059fi
17060
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017061fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017062
17063rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017064 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017065fi
17066
Martin v. Löwis11437992002-04-12 09:54:03 +000017067fi
17068
17069
17070fi
17071
Martin v. Löwisa6e97582002-01-01 18:41:33 +000017072
Michael W. Hudson54241132001-12-07 15:38:26 +000017073
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017074 { echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
17075echo $ECHO_N "checking for usconfig in -lmpc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017076if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017077 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017078else
Martin v. Löwis11437992002-04-12 09:54:03 +000017079 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017080LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017081cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017082/* confdefs.h. */
17083_ACEOF
17084cat confdefs.h >>conftest.$ac_ext
17085cat >>conftest.$ac_ext <<_ACEOF
17086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017087
Martin v. Löwiseba40652007-08-30 20:10:57 +000017088/* Override any GCC internal prototype to avoid an error.
17089 Use char because int might match the return type of a GCC
17090 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017091#ifdef __cplusplus
17092extern "C"
17093#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017094char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017095int
17096main ()
17097{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017098return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017099 ;
17100 return 0;
17101}
17102_ACEOF
17103rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017104if { (ac_try="$ac_link"
17105case "(($ac_try" in
17106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17107 *) ac_try_echo=$ac_try;;
17108esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017109eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017110 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017112 grep -v '^ *+' conftest.er1 >conftest.err
17113 rm -f conftest.er1
17114 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017115 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017116 (exit $ac_status); } && {
17117 test -z "$ac_c_werror_flag" ||
17118 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017119 } && test -s conftest$ac_exeext &&
17120 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017121 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017122else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017123 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017124sed 's/^/| /' conftest.$ac_ext >&5
17125
Martin v. Löwiseba40652007-08-30 20:10:57 +000017126 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017127fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017128
17129rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017130 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017131LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017132fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017133{ echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
17134echo "${ECHO_T}$ac_cv_lib_mpc_usconfig" >&6; }
17135if test $ac_cv_lib_mpc_usconfig = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017136 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017137#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017138_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017139
Martin v. Löwis130fb172001-07-19 11:00:41 +000017140 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017141 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000017142 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017143fi
17144
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017145
Neal Norwitza978ab02002-11-02 16:58:05 +000017146 if test "$posix_threads" != "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017147 { echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
17148echo $ECHO_N "checking for thr_create in -lthread... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017149if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017150 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017151else
Martin v. Löwis11437992002-04-12 09:54:03 +000017152 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017153LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017155/* confdefs.h. */
17156_ACEOF
17157cat confdefs.h >>conftest.$ac_ext
17158cat >>conftest.$ac_ext <<_ACEOF
17159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017160
Martin v. Löwiseba40652007-08-30 20:10:57 +000017161/* Override any GCC internal prototype to avoid an error.
17162 Use char because int might match the return type of a GCC
17163 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017164#ifdef __cplusplus
17165extern "C"
17166#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017167char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017168int
17169main ()
17170{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017171return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017172 ;
17173 return 0;
17174}
17175_ACEOF
17176rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017177if { (ac_try="$ac_link"
17178case "(($ac_try" in
17179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17180 *) ac_try_echo=$ac_try;;
17181esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017183 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017184 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017185 grep -v '^ *+' conftest.er1 >conftest.err
17186 rm -f conftest.er1
17187 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017189 (exit $ac_status); } && {
17190 test -z "$ac_c_werror_flag" ||
17191 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017192 } && test -s conftest$ac_exeext &&
17193 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017194 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017195else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017196 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017197sed 's/^/| /' conftest.$ac_ext >&5
17198
Martin v. Löwiseba40652007-08-30 20:10:57 +000017199 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000017200fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017201
17202rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017203 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017204LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017205fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017206{ echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
17207echo "${ECHO_T}$ac_cv_lib_thread_thr_create" >&6; }
17208if test $ac_cv_lib_thread_thr_create = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017209 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017210#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017211_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000017212
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017213 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000017214 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017215 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000017216fi
17217
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000017218 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017219
Martin v. Löwis130fb172001-07-19 11:00:41 +000017220 if test "$USE_THREAD_MODULE" != "#"
17221 then
17222 # If the above checks didn't disable threads, (at least) OSF1
17223 # needs this '-threads' argument during linking.
17224 case $ac_sys_system in
17225 OSF1) LDLAST=-threads;;
17226 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000017227 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017228fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017229
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017230if test "$posix_threads" = "yes"; then
17231 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017232
17233cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017234#define _POSIX_THREADS 1
17235_ACEOF
17236
17237 fi
17238
17239 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
17240 case $ac_sys_system/$ac_sys_release in
17241 SunOS/5.6)
17242cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017243#define HAVE_PTHREAD_DESTRUCTOR 1
17244_ACEOF
17245
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017246 ;;
17247 SunOS/5.8)
17248cat >>confdefs.h <<\_ACEOF
17249#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17250_ACEOF
17251
17252 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000017253 AIX/5)
17254cat >>confdefs.h <<\_ACEOF
17255#define HAVE_BROKEN_POSIX_SEMAPHORES 1
17256_ACEOF
17257
17258 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017259 esac
17260
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017261 { echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
17262echo $ECHO_N "checking if PTHREAD_SCOPE_SYSTEM is supported... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017263 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017264 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017265else
17266 if test "$cross_compiling" = yes; then
17267 ac_cv_pthread_system_supported=no
17268else
17269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017270/* confdefs.h. */
17271_ACEOF
17272cat confdefs.h >>conftest.$ac_ext
17273cat >>conftest.$ac_ext <<_ACEOF
17274/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017275#include <pthread.h>
17276 void *foo(void *parm) {
17277 return NULL;
17278 }
17279 main() {
17280 pthread_attr_t attr;
17281 pthread_t id;
17282 if (pthread_attr_init(&attr)) exit(-1);
17283 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
17284 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
17285 exit(0);
17286 }
17287_ACEOF
17288rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017289if { (ac_try="$ac_link"
17290case "(($ac_try" in
17291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17292 *) ac_try_echo=$ac_try;;
17293esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017294eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017295 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017296 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017297 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017298 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017299 { (case "(($ac_try" in
17300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17301 *) ac_try_echo=$ac_try;;
17302esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017303eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017304 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017305 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017307 (exit $ac_status); }; }; then
17308 ac_cv_pthread_system_supported=yes
17309else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017310 echo "$as_me: program exited with status $ac_status" >&5
17311echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017312sed 's/^/| /' conftest.$ac_ext >&5
17313
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017314( exit $ac_status )
17315ac_cv_pthread_system_supported=no
17316fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017317rm -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 +000017318fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000017319
Martin v. Löwiseba40652007-08-30 20:10:57 +000017320
17321
Guido van Rossum627b2d71993-12-24 10:39:16 +000017322fi
17323
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017324 { echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
17325echo "${ECHO_T}$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017326 if test "$ac_cv_pthread_system_supported" = "yes"; then
17327
17328cat >>confdefs.h <<\_ACEOF
17329#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
17330_ACEOF
17331
17332 fi
17333
17334for ac_func in pthread_sigmask
17335do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017336as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17337{ echo "$as_me:$LINENO: checking for $ac_func" >&5
17338echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017339if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017340 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017341else
17342 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017343/* confdefs.h. */
17344_ACEOF
17345cat confdefs.h >>conftest.$ac_ext
17346cat >>conftest.$ac_ext <<_ACEOF
17347/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017348/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17349 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17350#define $ac_func innocuous_$ac_func
17351
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017352/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017353 which can conflict with char $ac_func (); below.
17354 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017355 <limits.h> exists even on freestanding compilers. */
17356
17357#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017358# include <limits.h>
17359#else
17360# include <assert.h>
17361#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017362
17363#undef $ac_func
17364
Martin v. Löwiseba40652007-08-30 20:10:57 +000017365/* Override any GCC internal prototype to avoid an error.
17366 Use char because int might match the return type of a GCC
17367 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017368#ifdef __cplusplus
17369extern "C"
17370#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017371char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017372/* The GNU C library defines this for functions which it implements
17373 to always fail with ENOSYS. Some functions are actually named
17374 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000017375#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017376choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017377#endif
17378
Skip Montanaro6dead952003-09-25 14:50:04 +000017379int
17380main ()
17381{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017382return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017383 ;
17384 return 0;
17385}
17386_ACEOF
17387rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017388if { (ac_try="$ac_link"
17389case "(($ac_try" in
17390 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17391 *) ac_try_echo=$ac_try;;
17392esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017393eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017394 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017396 grep -v '^ *+' conftest.er1 >conftest.err
17397 rm -f conftest.er1
17398 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017400 (exit $ac_status); } && {
17401 test -z "$ac_c_werror_flag" ||
17402 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017403 } && test -s conftest$ac_exeext &&
17404 $as_test_x conftest$ac_exeext; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017405 eval "$as_ac_var=yes"
17406else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017407 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017408sed 's/^/| /' conftest.$ac_ext >&5
17409
Martin v. Löwiseba40652007-08-30 20:10:57 +000017410 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017411fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017412
17413rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017414 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017415fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017416ac_res=`eval echo '${'$as_ac_var'}'`
17417 { echo "$as_me:$LINENO: result: $ac_res" >&5
17418echo "${ECHO_T}$ac_res" >&6; }
17419if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017420 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017421#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017422_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000017423 case $ac_sys_system in
17424 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017425
Jason Tishlerfac083d2003-07-22 15:20:49 +000017426cat >>confdefs.h <<\_ACEOF
17427#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17428_ACEOF
17429
17430 ;;
17431 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017432fi
17433done
17434
17435fi
17436
17437
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017438# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017439
17440
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017441{ echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17442echo $ECHO_N "checking if --enable-ipv6 is specified... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017443# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017444if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017445 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017446 no)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017447 { echo "$as_me:$LINENO: result: no" >&5
17448echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017449 ipv6=no
17450 ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017451 *) { echo "$as_me:$LINENO: result: yes" >&5
17452echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017453 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017454#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017455_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017456
17457 ipv6=yes
17458 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017459 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017460else
Martin v. Löwis11437992002-04-12 09:54:03 +000017461
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017462 if test "$cross_compiling" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017463 { echo "$as_me:$LINENO: result: no" >&5
17464echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017465 ipv6=no
17466
17467else
Martin v. Löwis11437992002-04-12 09:54:03 +000017468 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017469/* confdefs.h. */
17470_ACEOF
17471cat confdefs.h >>conftest.$ac_ext
17472cat >>conftest.$ac_ext <<_ACEOF
17473/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017474 /* AF_INET6 available check */
17475#include <sys/types.h>
17476#include <sys/socket.h>
17477main()
17478{
17479 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17480 exit(1);
17481 else
17482 exit(0);
17483}
17484
Martin v. Löwis11437992002-04-12 09:54:03 +000017485_ACEOF
17486rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017487if { (ac_try="$ac_link"
17488case "(($ac_try" in
17489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17490 *) ac_try_echo=$ac_try;;
17491esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017492eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017493 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017494 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017496 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000017497 { (case "(($ac_try" in
17498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17499 *) ac_try_echo=$ac_try;;
17500esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017502 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017503 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017504 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017505 (exit $ac_status); }; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017506 { echo "$as_me:$LINENO: result: yes" >&5
17507echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017508 ipv6=yes
17509else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017510 echo "$as_me: program exited with status $ac_status" >&5
17511echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017512sed 's/^/| /' conftest.$ac_ext >&5
17513
Martin v. Löwis11437992002-04-12 09:54:03 +000017514( exit $ac_status )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017515{ echo "$as_me:$LINENO: result: no" >&5
17516echo "${ECHO_T}no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017517 ipv6=no
17518fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017519rm -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 +000017520fi
17521
Martin v. Löwiseba40652007-08-30 20:10:57 +000017522
17523
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017524if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017525 { echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17526echo $ECHO_N "checking if RFC2553 API is available... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017528/* confdefs.h. */
17529_ACEOF
17530cat confdefs.h >>conftest.$ac_ext
17531cat >>conftest.$ac_ext <<_ACEOF
17532/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017533#include <sys/types.h>
17534#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017535int
17536main ()
17537{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017538struct sockaddr_in6 x;
17539x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017540 ;
17541 return 0;
17542}
17543_ACEOF
17544rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017545if { (ac_try="$ac_compile"
17546case "(($ac_try" in
17547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17548 *) ac_try_echo=$ac_try;;
17549esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017551 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017553 grep -v '^ *+' conftest.er1 >conftest.err
17554 rm -f conftest.er1
17555 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017556 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017557 (exit $ac_status); } && {
17558 test -z "$ac_c_werror_flag" ||
17559 test ! -s conftest.err
17560 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017561 { echo "$as_me:$LINENO: result: yes" >&5
17562echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017563 ipv6=yes
17564else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017566sed 's/^/| /' conftest.$ac_ext >&5
17567
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017568 { echo "$as_me:$LINENO: result: no" >&5
17569echo "${ECHO_T}no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017570 ipv6=no
17571fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017572
17573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017574fi
17575
17576if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017577 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017578#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017579_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017580
17581fi
17582
Martin v. Löwiseba40652007-08-30 20:10:57 +000017583fi
17584
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017585
17586ipv6type=unknown
17587ipv6lib=none
17588ipv6trylibc=no
17589
17590if test "$ipv6" = "yes"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017591 { echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17592echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017593 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17594 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017595 case $i in
17596 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017598/* confdefs.h. */
17599_ACEOF
17600cat confdefs.h >>conftest.$ac_ext
17601cat >>conftest.$ac_ext <<_ACEOF
17602/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017603
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017604#include <netinet/in.h>
17605#ifdef IPV6_INRIA_VERSION
17606yes
17607#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017608_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017610 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017611 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017612fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000017613rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017614
17615 ;;
17616 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017617 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017618/* confdefs.h. */
17619_ACEOF
17620cat confdefs.h >>conftest.$ac_ext
17621cat >>conftest.$ac_ext <<_ACEOF
17622/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017623
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017624#include <netinet/in.h>
17625#ifdef __KAME__
17626yes
17627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017628_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017630 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017631 ipv6type=$i;
17632 ipv6lib=inet6
17633 ipv6libdir=/usr/local/v6/lib
17634 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017635fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000017636rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017637
17638 ;;
17639 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017640 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017641/* confdefs.h. */
17642_ACEOF
17643cat confdefs.h >>conftest.$ac_ext
17644cat >>conftest.$ac_ext <<_ACEOF
17645/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017646
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017647#include <features.h>
17648#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17649yes
17650#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017651_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017652if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017653 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017654 ipv6type=$i;
17655 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017656fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000017657rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017658
17659 ;;
17660 linux-inet6)
17661 if test -d /usr/inet6; then
17662 ipv6type=$i
17663 ipv6lib=inet6
17664 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017665 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017666 fi
17667 ;;
17668 solaris)
17669 if test -f /etc/netconfig; then
17670 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17671 ipv6type=$i
17672 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017673 fi
17674 fi
17675 ;;
17676 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017677 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017678/* confdefs.h. */
17679_ACEOF
17680cat confdefs.h >>conftest.$ac_ext
17681cat >>conftest.$ac_ext <<_ACEOF
17682/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017683
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017684#include <sys/param.h>
17685#ifdef _TOSHIBA_INET6
17686yes
17687#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017688_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017690 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017691 ipv6type=$i;
17692 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017693 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017694fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000017695rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017696
17697 ;;
17698 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017700/* confdefs.h. */
17701_ACEOF
17702cat confdefs.h >>conftest.$ac_ext
17703cat >>conftest.$ac_ext <<_ACEOF
17704/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017705
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017706#include </usr/local/v6/include/sys/v6config.h>
17707#ifdef __V6D__
17708yes
17709#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017710_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017711if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017712 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017713 ipv6type=$i;
17714 ipv6lib=v6;
17715 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017716 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017717fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000017718rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017719
17720 ;;
17721 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017723/* confdefs.h. */
17724_ACEOF
17725cat confdefs.h >>conftest.$ac_ext
17726cat >>conftest.$ac_ext <<_ACEOF
17727/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017728
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017729#include <sys/param.h>
17730#ifdef _ZETA_MINAMI_INET6
17731yes
17732#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017733_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017734if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017735 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017736 ipv6type=$i;
17737 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017738 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017739fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000017740rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017741
17742 ;;
17743 esac
17744 if test "$ipv6type" != "unknown"; then
17745 break
17746 fi
17747 done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017748 { echo "$as_me:$LINENO: result: $ipv6type" >&5
17749echo "${ECHO_T}$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017750fi
17751
17752if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17753 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17754 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17755 echo "using lib$ipv6lib"
17756 else
17757 if test $ipv6trylibc = "yes"; then
17758 echo "using libc"
17759 else
17760 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17761 echo "You need to fetch lib$ipv6lib.a from appropriate"
17762 echo 'ipv6 kit and compile beforehand.'
17763 exit 1
17764 fi
17765 fi
17766fi
17767
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017768{ echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17769echo $ECHO_N "checking for OSX 10.5 SDK or later... $ECHO_C" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017770cat >conftest.$ac_ext <<_ACEOF
17771/* confdefs.h. */
17772_ACEOF
17773cat confdefs.h >>conftest.$ac_ext
17774cat >>conftest.$ac_ext <<_ACEOF
17775/* end confdefs.h. */
17776#include <Carbon/Carbon.h>
17777int
17778main ()
17779{
17780FSIORefNum fRef = 0
17781 ;
17782 return 0;
17783}
17784_ACEOF
17785rm -f conftest.$ac_objext
17786if { (ac_try="$ac_compile"
17787case "(($ac_try" in
17788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17789 *) ac_try_echo=$ac_try;;
17790esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017792 (eval "$ac_compile") 2>conftest.er1
17793 ac_status=$?
17794 grep -v '^ *+' conftest.er1 >conftest.err
17795 rm -f conftest.er1
17796 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017798 (exit $ac_status); } && {
17799 test -z "$ac_c_werror_flag" ||
17800 test ! -s conftest.err
17801 } && test -s conftest.$ac_objext; then
17802
17803cat >>confdefs.h <<\_ACEOF
17804#define HAVE_OSX105_SDK 1
17805_ACEOF
17806
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017807 { echo "$as_me:$LINENO: result: yes" >&5
17808echo "${ECHO_T}yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017809else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017810 echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017811sed 's/^/| /' conftest.$ac_ext >&5
17812
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017813 { echo "$as_me:$LINENO: result: no" >&5
17814echo "${ECHO_T}no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000017815
17816fi
17817
17818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17819
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017820# Check for --with-doc-strings
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017821{ echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17822echo $ECHO_N "checking for --with-doc-strings... $ECHO_C" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017823
Martin v. Löwiseba40652007-08-30 20:10:57 +000017824# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017825if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017826 withval=$with_doc_strings;
17827fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017828
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017829
17830if test -z "$with_doc_strings"
17831then with_doc_strings="yes"
17832fi
17833if test "$with_doc_strings" != "no"
17834then
17835
17836cat >>confdefs.h <<\_ACEOF
17837#define WITH_DOC_STRINGS 1
17838_ACEOF
17839
17840fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017841{ echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17842echo "${ECHO_T}$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017843
Neil Schemenauera35c6882001-02-27 04:45:05 +000017844# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017845{ echo "$as_me:$LINENO: checking for --with-tsc" >&5
17846echo $ECHO_N "checking for --with-tsc... $ECHO_C" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017847
Martin v. Löwiseba40652007-08-30 20:10:57 +000017848# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017849if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017850 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017851if test "$withval" != no
17852then
17853
17854cat >>confdefs.h <<\_ACEOF
17855#define WITH_TSC 1
17856_ACEOF
17857
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017858 { echo "$as_me:$LINENO: result: yes" >&5
17859echo "${ECHO_T}yes" >&6; }
17860else { echo "$as_me:$LINENO: result: no" >&5
17861echo "${ECHO_T}no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017862fi
17863else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017864 { echo "$as_me:$LINENO: result: no" >&5
17865echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000017866fi
17867
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017868
17869# Check for Python-specific malloc support
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017870{ echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17871echo $ECHO_N "checking for --with-pymalloc... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017872
Martin v. Löwiseba40652007-08-30 20:10:57 +000017873# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017874if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000017875 withval=$with_pymalloc;
17876fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017877
Neil Schemenauera35c6882001-02-27 04:45:05 +000017878
Neil Schemenauer16c22972002-03-22 15:34:49 +000017879if test -z "$with_pymalloc"
17880then with_pymalloc="yes"
17881fi
17882if test "$with_pymalloc" != "no"
17883then
Martin v. Löwis11437992002-04-12 09:54:03 +000017884
17885cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017886#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017887_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017888
17889fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000017890{ echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17891echo "${ECHO_T}$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017892
Benjamin Peterson91c12eb2009-12-03 02:52:39 +000017893# Check for Valgrind support
17894{ echo "$as_me:$LINENO: checking for --with-valgrind" >&5
17895echo $ECHO_N "checking for --with-valgrind... $ECHO_C" >&6; }
17896
17897# Check whether --with-valgrind was given.
17898if test "${with_valgrind+set}" = set; then
17899 withval=$with_valgrind;
17900else
17901 with_valgrind=no
17902fi
17903
17904{ echo "$as_me:$LINENO: result: $with_valgrind" >&5
17905echo "${ECHO_T}$with_valgrind" >&6; }
17906if test "$with_valgrind" != no; then
17907 if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17908 { echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
17909echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
17910if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
17911 echo $ECHO_N "(cached) $ECHO_C" >&6
17912fi
17913{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
17914echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
17915else
17916 # Is the header compilable?
17917{ echo "$as_me:$LINENO: checking valgrind/valgrind.h usability" >&5
17918echo $ECHO_N "checking valgrind/valgrind.h usability... $ECHO_C" >&6; }
17919cat >conftest.$ac_ext <<_ACEOF
17920/* confdefs.h. */
17921_ACEOF
17922cat confdefs.h >>conftest.$ac_ext
17923cat >>conftest.$ac_ext <<_ACEOF
17924/* end confdefs.h. */
17925$ac_includes_default
17926#include <valgrind/valgrind.h>
17927_ACEOF
17928rm -f conftest.$ac_objext
17929if { (ac_try="$ac_compile"
17930case "(($ac_try" in
17931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17932 *) ac_try_echo=$ac_try;;
17933esac
17934eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17935 (eval "$ac_compile") 2>conftest.er1
17936 ac_status=$?
17937 grep -v '^ *+' conftest.er1 >conftest.err
17938 rm -f conftest.er1
17939 cat conftest.err >&5
17940 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17941 (exit $ac_status); } && {
17942 test -z "$ac_c_werror_flag" ||
17943 test ! -s conftest.err
17944 } && test -s conftest.$ac_objext; then
17945 ac_header_compiler=yes
17946else
17947 echo "$as_me: failed program was:" >&5
17948sed 's/^/| /' conftest.$ac_ext >&5
17949
17950 ac_header_compiler=no
17951fi
17952
17953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17954{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17955echo "${ECHO_T}$ac_header_compiler" >&6; }
17956
17957# Is the header present?
17958{ echo "$as_me:$LINENO: checking valgrind/valgrind.h presence" >&5
17959echo $ECHO_N "checking valgrind/valgrind.h presence... $ECHO_C" >&6; }
17960cat >conftest.$ac_ext <<_ACEOF
17961/* confdefs.h. */
17962_ACEOF
17963cat confdefs.h >>conftest.$ac_ext
17964cat >>conftest.$ac_ext <<_ACEOF
17965/* end confdefs.h. */
17966#include <valgrind/valgrind.h>
17967_ACEOF
17968if { (ac_try="$ac_cpp conftest.$ac_ext"
17969case "(($ac_try" in
17970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17971 *) ac_try_echo=$ac_try;;
17972esac
17973eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17974 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17975 ac_status=$?
17976 grep -v '^ *+' conftest.er1 >conftest.err
17977 rm -f conftest.er1
17978 cat conftest.err >&5
17979 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17980 (exit $ac_status); } >/dev/null && {
17981 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17982 test ! -s conftest.err
17983 }; then
17984 ac_header_preproc=yes
17985else
17986 echo "$as_me: failed program was:" >&5
17987sed 's/^/| /' conftest.$ac_ext >&5
17988
17989 ac_header_preproc=no
17990fi
17991
17992rm -f conftest.err conftest.$ac_ext
17993{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17994echo "${ECHO_T}$ac_header_preproc" >&6; }
17995
17996# So? What about this header?
17997case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17998 yes:no: )
17999 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&5
18000echo "$as_me: WARNING: valgrind/valgrind.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
18001 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&5
18002echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the compiler's result" >&2;}
18003 ac_header_preproc=yes
18004 ;;
18005 no:yes:* )
18006 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&5
18007echo "$as_me: WARNING: valgrind/valgrind.h: present but cannot be compiled" >&2;}
18008 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&5
18009echo "$as_me: WARNING: valgrind/valgrind.h: check for missing prerequisite headers?" >&2;}
18010 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&5
18011echo "$as_me: WARNING: valgrind/valgrind.h: see the Autoconf documentation" >&2;}
18012 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&5
18013echo "$as_me: WARNING: valgrind/valgrind.h: section \"Present But Cannot Be Compiled\"" >&2;}
18014 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&5
18015echo "$as_me: WARNING: valgrind/valgrind.h: proceeding with the preprocessor's result" >&2;}
18016 { echo "$as_me:$LINENO: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&5
18017echo "$as_me: WARNING: valgrind/valgrind.h: in the future, the compiler will take precedence" >&2;}
18018 ( cat <<\_ASBOX
18019## -------------------------------------- ##
18020## Report this to http://bugs.python.org/ ##
18021## -------------------------------------- ##
18022_ASBOX
18023 ) | sed "s/^/$as_me: WARNING: /" >&2
18024 ;;
18025esac
18026{ echo "$as_me:$LINENO: checking for valgrind/valgrind.h" >&5
18027echo $ECHO_N "checking for valgrind/valgrind.h... $ECHO_C" >&6; }
18028if test "${ac_cv_header_valgrind_valgrind_h+set}" = set; then
18029 echo $ECHO_N "(cached) $ECHO_C" >&6
18030else
18031 ac_cv_header_valgrind_valgrind_h=$ac_header_preproc
18032fi
18033{ echo "$as_me:$LINENO: result: $ac_cv_header_valgrind_valgrind_h" >&5
18034echo "${ECHO_T}$ac_cv_header_valgrind_valgrind_h" >&6; }
18035
18036fi
18037if test $ac_cv_header_valgrind_valgrind_h = yes; then
18038
18039cat >>confdefs.h <<\_ACEOF
18040#define WITH_VALGRIND 1
18041_ACEOF
18042
18043else
18044 { { echo "$as_me:$LINENO: error: Valgrind support requested but headers not available" >&5
18045echo "$as_me: error: Valgrind support requested but headers not available" >&2;}
18046 { (exit 1); exit 1; }; }
18047
18048fi
18049
18050
18051fi
18052
Barry Warsawef82cd72000-06-30 16:21:01 +000018053# Check for --with-wctype-functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018054{ echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
18055echo $ECHO_N "checking for --with-wctype-functions... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018056
Martin v. Löwiseba40652007-08-30 20:10:57 +000018057# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000018058if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000018059 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000018060if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000018061then
18062
18063cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000018064#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018065_ACEOF
18066
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018067 { echo "$as_me:$LINENO: result: yes" >&5
18068echo "${ECHO_T}yes" >&6; }
18069else { echo "$as_me:$LINENO: result: no" >&5
18070echo "${ECHO_T}no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000018071fi
18072else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018073 { echo "$as_me:$LINENO: result: no" >&5
18074echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018075fi
18076
Barry Warsawef82cd72000-06-30 16:21:01 +000018077
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000018078# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000018079
Guido van Rossum98935bf2001-09-05 19:13:16 +000018080DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000018081
Guido van Rossume97ee181999-12-20 21:27:22 +000018082# the dlopen() function means we might want to use dynload_shlib.o. some
18083# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000018084
Thomas Wouters3a584202000-08-05 23:28:51 +000018085for ac_func in dlopen
18086do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018087as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18088{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18089echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018090if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018091 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000018092else
Martin v. Löwis11437992002-04-12 09:54:03 +000018093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018094/* confdefs.h. */
18095_ACEOF
18096cat confdefs.h >>conftest.$ac_ext
18097cat >>conftest.$ac_ext <<_ACEOF
18098/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018099/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18100 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18101#define $ac_func innocuous_$ac_func
18102
Guido van Rossume97ee181999-12-20 21:27:22 +000018103/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018104 which can conflict with char $ac_func (); below.
18105 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018106 <limits.h> exists even on freestanding compilers. */
18107
18108#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018109# include <limits.h>
18110#else
18111# include <assert.h>
18112#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018113
18114#undef $ac_func
18115
Martin v. Löwiseba40652007-08-30 20:10:57 +000018116/* Override any GCC internal prototype to avoid an error.
18117 Use char because int might match the return type of a GCC
18118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018119#ifdef __cplusplus
18120extern "C"
18121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018122char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000018123/* The GNU C library defines this for functions which it implements
18124 to always fail with ENOSYS. Some functions are actually named
18125 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018126#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000018127choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000018128#endif
18129
Skip Montanaro6dead952003-09-25 14:50:04 +000018130int
18131main ()
18132{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018133return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018134 ;
18135 return 0;
18136}
18137_ACEOF
18138rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018139if { (ac_try="$ac_link"
18140case "(($ac_try" in
18141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18142 *) ac_try_echo=$ac_try;;
18143esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018145 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018147 grep -v '^ *+' conftest.er1 >conftest.err
18148 rm -f conftest.er1
18149 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018151 (exit $ac_status); } && {
18152 test -z "$ac_c_werror_flag" ||
18153 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018154 } && test -s conftest$ac_exeext &&
18155 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018156 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018157else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018159sed 's/^/| /' conftest.$ac_ext >&5
18160
Martin v. Löwiseba40652007-08-30 20:10:57 +000018161 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018163
18164rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018165 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018166fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018167ac_res=`eval echo '${'$as_ac_var'}'`
18168 { echo "$as_me:$LINENO: result: $ac_res" >&5
18169echo "${ECHO_T}$ac_res" >&6; }
18170if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018171 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018172#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018173_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018174
Guido van Rossume97ee181999-12-20 21:27:22 +000018175fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018176done
Guido van Rossume97ee181999-12-20 21:27:22 +000018177
Michael W. Hudson54241132001-12-07 15:38:26 +000018178
Guido van Rossume97ee181999-12-20 21:27:22 +000018179# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
18180# loading of modules.
18181
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018182{ echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
18183echo $ECHO_N "checking DYNLOADFILE... $ECHO_C" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018184if test -z "$DYNLOADFILE"
18185then
18186 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000018187 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
18188 if test "$ac_cv_func_dlopen" = yes
18189 then DYNLOADFILE="dynload_shlib.o"
18190 else DYNLOADFILE="dynload_aix.o"
18191 fi
18192 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000018193 BeOS*) DYNLOADFILE="dynload_beos.o";;
18194 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000018195 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
18196 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000018197 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000018198 *)
18199 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
18200 # out any dynamic loading
18201 if test "$ac_cv_func_dlopen" = yes
18202 then DYNLOADFILE="dynload_shlib.o"
18203 else DYNLOADFILE="dynload_stub.o"
18204 fi
18205 ;;
18206 esac
18207fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018208{ echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
18209echo "${ECHO_T}$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000018210if test "$DYNLOADFILE" != "dynload_stub.o"
18211then
Martin v. Löwis11437992002-04-12 09:54:03 +000018212
18213cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018214#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018215_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000018216
18217fi
18218
Neil Schemenauer4e425612001-06-19 15:44:15 +000018219# MACHDEP_OBJS can be set to platform-specific object files needed by Python
18220
Michael W. Hudson54241132001-12-07 15:38:26 +000018221
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018222{ echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
18223echo $ECHO_N "checking MACHDEP_OBJS... $ECHO_C" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018224if test -z "$MACHDEP_OBJS"
18225then
Jack Jansene578a632001-08-15 01:27:14 +000018226 MACHDEP_OBJS=$extra_machdep_objs
18227else
18228 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000018229fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018230{ echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
18231echo "${ECHO_T}MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000018232
Guido van Rossum627b2d71993-12-24 10:39:16 +000018233# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018234
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
18300
18301
18302
18303
18304
Martin v. Löwisd6320502004-08-12 13:45:08 +000018305
Martin v. Löwisc3001752005-01-23 09:27:24 +000018306
18307
Neal Norwitz05a45592006-03-20 06:30:08 +000018308
18309
Martin v. Löwis382abef2007-02-19 10:55:19 +000018310
18311
Christian Heimes36281872007-11-30 21:11:28 +000018312
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018313
18314
Jesse Noller355b1262009-04-02 00:03:28 +000018315
18316
18317
18318
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018319
18320
18321
18322
18323
18324
18325
18326
18327
18328
18329
18330
18331
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018332
Martin v. Löwisaef18b12008-03-24 13:31:16 +000018333for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
18334 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000018335 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018336 getpriority getresuid getresgid getpwent getspnam getspent getsid getwd \
Antoine Pitrou30b3b352009-12-02 20:37:54 +000018337 initgroups kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000018338 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000018339 putenv readlink realpath \
Jesse Noller355b1262009-04-02 00:03:28 +000018340 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
18341 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000018342 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Martin v. Löwis50ea4562009-11-27 13:56:01 +000018343 setlocale setregid setreuid setresuid setresgid \
18344 setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000018345 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000018346 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000018347 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000018348do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018349as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18350{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18351echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018352if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018353 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018354else
Martin v. Löwis11437992002-04-12 09:54:03 +000018355 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018356/* confdefs.h. */
18357_ACEOF
18358cat confdefs.h >>conftest.$ac_ext
18359cat >>conftest.$ac_ext <<_ACEOF
18360/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018361/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18362 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18363#define $ac_func innocuous_$ac_func
18364
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018365/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018366 which can conflict with char $ac_func (); below.
18367 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018368 <limits.h> exists even on freestanding compilers. */
18369
18370#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018371# include <limits.h>
18372#else
18373# include <assert.h>
18374#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018375
18376#undef $ac_func
18377
Martin v. Löwiseba40652007-08-30 20:10:57 +000018378/* Override any GCC internal prototype to avoid an error.
18379 Use char because int might match the return type of a GCC
18380 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018381#ifdef __cplusplus
18382extern "C"
18383#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018384char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018385/* The GNU C library defines this for functions which it implements
18386 to always fail with ENOSYS. Some functions are actually named
18387 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018388#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018389choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018390#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018391
Skip Montanaro6dead952003-09-25 14:50:04 +000018392int
18393main ()
18394{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018395return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018396 ;
18397 return 0;
18398}
18399_ACEOF
18400rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018401if { (ac_try="$ac_link"
18402case "(($ac_try" in
18403 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18404 *) ac_try_echo=$ac_try;;
18405esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018406eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018407 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018409 grep -v '^ *+' conftest.er1 >conftest.err
18410 rm -f conftest.er1
18411 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018413 (exit $ac_status); } && {
18414 test -z "$ac_c_werror_flag" ||
18415 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018416 } && test -s conftest$ac_exeext &&
18417 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018418 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018419else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018420 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018421sed 's/^/| /' conftest.$ac_ext >&5
18422
Martin v. Löwiseba40652007-08-30 20:10:57 +000018423 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018424fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018425
18426rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018427 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018428fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018429ac_res=`eval echo '${'$as_ac_var'}'`
18430 { echo "$as_me:$LINENO: result: $ac_res" >&5
18431echo "${ECHO_T}$ac_res" >&6; }
18432if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018433 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018434#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018435_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018436
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018437fi
18438done
18439
Michael W. Hudson54241132001-12-07 15:38:26 +000018440
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018441# For some functions, having a definition is not sufficient, since
18442# we want to take their address.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018443{ echo "$as_me:$LINENO: checking for chroot" >&5
18444echo $ECHO_N "checking for chroot... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018445cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018446/* confdefs.h. */
18447_ACEOF
18448cat confdefs.h >>conftest.$ac_ext
18449cat >>conftest.$ac_ext <<_ACEOF
18450/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018451#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018452int
18453main ()
18454{
18455void *x=chroot
18456 ;
18457 return 0;
18458}
18459_ACEOF
18460rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018461if { (ac_try="$ac_compile"
18462case "(($ac_try" in
18463 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18464 *) ac_try_echo=$ac_try;;
18465esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018466eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018469 grep -v '^ *+' conftest.er1 >conftest.err
18470 rm -f conftest.er1
18471 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018472 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018473 (exit $ac_status); } && {
18474 test -z "$ac_c_werror_flag" ||
18475 test ! -s conftest.err
18476 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018477
18478cat >>confdefs.h <<\_ACEOF
18479#define HAVE_CHROOT 1
18480_ACEOF
18481
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018482 { echo "$as_me:$LINENO: result: yes" >&5
18483echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018484else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018485 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018486sed 's/^/| /' conftest.$ac_ext >&5
18487
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018488 { echo "$as_me:$LINENO: result: no" >&5
18489echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018490
18491fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018492
18493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018494{ echo "$as_me:$LINENO: checking for link" >&5
18495echo $ECHO_N "checking for link... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018496cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018497/* confdefs.h. */
18498_ACEOF
18499cat confdefs.h >>conftest.$ac_ext
18500cat >>conftest.$ac_ext <<_ACEOF
18501/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018502#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018503int
18504main ()
18505{
18506void *x=link
18507 ;
18508 return 0;
18509}
18510_ACEOF
18511rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018512if { (ac_try="$ac_compile"
18513case "(($ac_try" in
18514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18515 *) ac_try_echo=$ac_try;;
18516esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018520 grep -v '^ *+' conftest.er1 >conftest.err
18521 rm -f conftest.er1
18522 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018524 (exit $ac_status); } && {
18525 test -z "$ac_c_werror_flag" ||
18526 test ! -s conftest.err
18527 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018528
18529cat >>confdefs.h <<\_ACEOF
18530#define HAVE_LINK 1
18531_ACEOF
18532
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018533 { echo "$as_me:$LINENO: result: yes" >&5
18534echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018535else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018536 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018537sed 's/^/| /' conftest.$ac_ext >&5
18538
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018539 { echo "$as_me:$LINENO: result: no" >&5
18540echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018541
18542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018543
18544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018545{ echo "$as_me:$LINENO: checking for symlink" >&5
18546echo $ECHO_N "checking for symlink... $ECHO_C" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018547cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018548/* confdefs.h. */
18549_ACEOF
18550cat confdefs.h >>conftest.$ac_ext
18551cat >>conftest.$ac_ext <<_ACEOF
18552/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018553#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018554int
18555main ()
18556{
18557void *x=symlink
18558 ;
18559 return 0;
18560}
18561_ACEOF
18562rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018563if { (ac_try="$ac_compile"
18564case "(($ac_try" in
18565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18566 *) ac_try_echo=$ac_try;;
18567esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018571 grep -v '^ *+' conftest.er1 >conftest.err
18572 rm -f conftest.er1
18573 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018575 (exit $ac_status); } && {
18576 test -z "$ac_c_werror_flag" ||
18577 test ! -s conftest.err
18578 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018579
18580cat >>confdefs.h <<\_ACEOF
18581#define HAVE_SYMLINK 1
18582_ACEOF
18583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018584 { echo "$as_me:$LINENO: result: yes" >&5
18585echo "${ECHO_T}yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018586else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018587 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018588sed 's/^/| /' conftest.$ac_ext >&5
18589
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018590 { echo "$as_me:$LINENO: result: no" >&5
18591echo "${ECHO_T}no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018592
18593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018594
18595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018596{ echo "$as_me:$LINENO: checking for fchdir" >&5
18597echo $ECHO_N "checking for fchdir... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018598cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018599/* confdefs.h. */
18600_ACEOF
18601cat confdefs.h >>conftest.$ac_ext
18602cat >>conftest.$ac_ext <<_ACEOF
18603/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018604#include <unistd.h>
18605int
18606main ()
18607{
18608void *x=fchdir
18609 ;
18610 return 0;
18611}
18612_ACEOF
18613rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018614if { (ac_try="$ac_compile"
18615case "(($ac_try" in
18616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18617 *) ac_try_echo=$ac_try;;
18618esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018620 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018622 grep -v '^ *+' conftest.er1 >conftest.err
18623 rm -f conftest.er1
18624 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018626 (exit $ac_status); } && {
18627 test -z "$ac_c_werror_flag" ||
18628 test ! -s conftest.err
18629 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018630
18631cat >>confdefs.h <<\_ACEOF
18632#define HAVE_FCHDIR 1
18633_ACEOF
18634
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018635 { echo "$as_me:$LINENO: result: yes" >&5
18636echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018637else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018638 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018639sed 's/^/| /' conftest.$ac_ext >&5
18640
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018641 { echo "$as_me:$LINENO: result: no" >&5
18642echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018643
18644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018645
18646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018647{ echo "$as_me:$LINENO: checking for fsync" >&5
18648echo $ECHO_N "checking for fsync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018649cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018650/* confdefs.h. */
18651_ACEOF
18652cat confdefs.h >>conftest.$ac_ext
18653cat >>conftest.$ac_ext <<_ACEOF
18654/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018655#include <unistd.h>
18656int
18657main ()
18658{
18659void *x=fsync
18660 ;
18661 return 0;
18662}
18663_ACEOF
18664rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018665if { (ac_try="$ac_compile"
18666case "(($ac_try" in
18667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18668 *) ac_try_echo=$ac_try;;
18669esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018670eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018671 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018672 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018673 grep -v '^ *+' conftest.er1 >conftest.err
18674 rm -f conftest.er1
18675 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018676 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018677 (exit $ac_status); } && {
18678 test -z "$ac_c_werror_flag" ||
18679 test ! -s conftest.err
18680 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018681
18682cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018683#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018684_ACEOF
18685
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018686 { echo "$as_me:$LINENO: result: yes" >&5
18687echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018688else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018689 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018690sed 's/^/| /' conftest.$ac_ext >&5
18691
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018692 { echo "$as_me:$LINENO: result: no" >&5
18693echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018694
18695fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018696
18697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018698{ echo "$as_me:$LINENO: checking for fdatasync" >&5
18699echo $ECHO_N "checking for fdatasync... $ECHO_C" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018701/* confdefs.h. */
18702_ACEOF
18703cat confdefs.h >>conftest.$ac_ext
18704cat >>conftest.$ac_ext <<_ACEOF
18705/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018706#include <unistd.h>
18707int
18708main ()
18709{
18710void *x=fdatasync
18711 ;
18712 return 0;
18713}
18714_ACEOF
18715rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018716if { (ac_try="$ac_compile"
18717case "(($ac_try" in
18718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18719 *) ac_try_echo=$ac_try;;
18720esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018722 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018723 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018724 grep -v '^ *+' conftest.er1 >conftest.err
18725 rm -f conftest.er1
18726 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018727 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018728 (exit $ac_status); } && {
18729 test -z "$ac_c_werror_flag" ||
18730 test ! -s conftest.err
18731 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018732
18733cat >>confdefs.h <<\_ACEOF
18734#define HAVE_FDATASYNC 1
18735_ACEOF
18736
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018737 { echo "$as_me:$LINENO: result: yes" >&5
18738echo "${ECHO_T}yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018739else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018740 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018741sed 's/^/| /' conftest.$ac_ext >&5
18742
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018743 { echo "$as_me:$LINENO: result: no" >&5
18744echo "${ECHO_T}no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018745
18746fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018747
18748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018749{ echo "$as_me:$LINENO: checking for epoll" >&5
18750echo $ECHO_N "checking for epoll... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018751cat >conftest.$ac_ext <<_ACEOF
18752/* confdefs.h. */
18753_ACEOF
18754cat confdefs.h >>conftest.$ac_ext
18755cat >>conftest.$ac_ext <<_ACEOF
18756/* end confdefs.h. */
18757#include <sys/epoll.h>
18758int
18759main ()
18760{
18761void *x=epoll_create
18762 ;
18763 return 0;
18764}
18765_ACEOF
18766rm -f conftest.$ac_objext
18767if { (ac_try="$ac_compile"
18768case "(($ac_try" in
18769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18770 *) ac_try_echo=$ac_try;;
18771esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018773 (eval "$ac_compile") 2>conftest.er1
18774 ac_status=$?
18775 grep -v '^ *+' conftest.er1 >conftest.err
18776 rm -f conftest.er1
18777 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018779 (exit $ac_status); } && {
18780 test -z "$ac_c_werror_flag" ||
18781 test ! -s conftest.err
18782 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018783
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018784cat >>confdefs.h <<\_ACEOF
18785#define HAVE_EPOLL 1
18786_ACEOF
18787
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018788 { echo "$as_me:$LINENO: result: yes" >&5
18789echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018790else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018791 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018792sed 's/^/| /' conftest.$ac_ext >&5
18793
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018794 { echo "$as_me:$LINENO: result: no" >&5
18795echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018796
18797fi
18798
18799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018800{ echo "$as_me:$LINENO: checking for kqueue" >&5
18801echo $ECHO_N "checking for kqueue... $ECHO_C" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018802cat >conftest.$ac_ext <<_ACEOF
18803/* confdefs.h. */
18804_ACEOF
18805cat confdefs.h >>conftest.$ac_ext
18806cat >>conftest.$ac_ext <<_ACEOF
18807/* end confdefs.h. */
18808
18809#include <sys/types.h>
18810#include <sys/event.h>
18811
18812int
18813main ()
18814{
18815int x=kqueue()
18816 ;
18817 return 0;
18818}
18819_ACEOF
18820rm -f conftest.$ac_objext
18821if { (ac_try="$ac_compile"
18822case "(($ac_try" in
18823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18824 *) ac_try_echo=$ac_try;;
18825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018827 (eval "$ac_compile") 2>conftest.er1
18828 ac_status=$?
18829 grep -v '^ *+' conftest.er1 >conftest.err
18830 rm -f conftest.er1
18831 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018833 (exit $ac_status); } && {
18834 test -z "$ac_c_werror_flag" ||
18835 test ! -s conftest.err
18836 } && test -s conftest.$ac_objext; then
18837
18838cat >>confdefs.h <<\_ACEOF
18839#define HAVE_KQUEUE 1
18840_ACEOF
18841
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018842 { echo "$as_me:$LINENO: result: yes" >&5
18843echo "${ECHO_T}yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018844else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018845 echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018846sed 's/^/| /' conftest.$ac_ext >&5
18847
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018848 { echo "$as_me:$LINENO: result: no" >&5
18849echo "${ECHO_T}no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000018850
18851fi
18852
18853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018854# On some systems (eg. FreeBSD 5), we would find a definition of the
18855# functions ctermid_r, setgroups in the library, but no prototype
18856# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18857# address to avoid compiler warnings and potential miscompilations
18858# because of the missing prototypes.
18859
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018860{ echo "$as_me:$LINENO: checking for ctermid_r" >&5
18861echo $ECHO_N "checking for ctermid_r... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018862cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018863/* confdefs.h. */
18864_ACEOF
18865cat confdefs.h >>conftest.$ac_ext
18866cat >>conftest.$ac_ext <<_ACEOF
18867/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018868
18869#include "confdefs.h"
18870#include <stdio.h>
18871
Martin v. Löwisd5843682002-11-21 20:41:28 +000018872int
18873main ()
18874{
18875void* p = ctermid_r
18876 ;
18877 return 0;
18878}
18879_ACEOF
18880rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018881if { (ac_try="$ac_compile"
18882case "(($ac_try" in
18883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18884 *) ac_try_echo=$ac_try;;
18885esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018886eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018887 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018888 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018889 grep -v '^ *+' conftest.er1 >conftest.err
18890 rm -f conftest.er1
18891 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018892 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018893 (exit $ac_status); } && {
18894 test -z "$ac_c_werror_flag" ||
18895 test ! -s conftest.err
18896 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018897
18898cat >>confdefs.h <<\_ACEOF
18899#define HAVE_CTERMID_R 1
18900_ACEOF
18901
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018902 { echo "$as_me:$LINENO: result: yes" >&5
18903echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018904else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018905 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018906sed 's/^/| /' conftest.$ac_ext >&5
18907
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018908 { echo "$as_me:$LINENO: result: no" >&5
18909echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018910
18911fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000018912
Martin v. Löwiseba40652007-08-30 20:10:57 +000018913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18914
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018915{ echo "$as_me:$LINENO: checking for flock" >&5
18916echo $ECHO_N "checking for flock... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018918/* confdefs.h. */
18919_ACEOF
18920cat confdefs.h >>conftest.$ac_ext
18921cat >>conftest.$ac_ext <<_ACEOF
18922/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018923
18924#include "confdefs.h"
18925#include <sys/file.h>
18926
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018927int
18928main ()
18929{
18930void* p = flock
18931 ;
18932 return 0;
18933}
18934_ACEOF
18935rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018936if { (ac_try="$ac_compile"
18937case "(($ac_try" in
18938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18939 *) ac_try_echo=$ac_try;;
18940esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018944 grep -v '^ *+' conftest.er1 >conftest.err
18945 rm -f conftest.er1
18946 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018948 (exit $ac_status); } && {
18949 test -z "$ac_c_werror_flag" ||
18950 test ! -s conftest.err
18951 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018952
18953cat >>confdefs.h <<\_ACEOF
18954#define HAVE_FLOCK 1
18955_ACEOF
18956
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018957 { echo "$as_me:$LINENO: result: yes" >&5
18958echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018959else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018961sed 's/^/| /' conftest.$ac_ext >&5
18962
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018963 { echo "$as_me:$LINENO: result: no" >&5
18964echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018965
18966fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018967
Martin v. Löwiseba40652007-08-30 20:10:57 +000018968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18969
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018970{ echo "$as_me:$LINENO: checking for getpagesize" >&5
18971echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018972cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018973/* confdefs.h. */
18974_ACEOF
18975cat confdefs.h >>conftest.$ac_ext
18976cat >>conftest.$ac_ext <<_ACEOF
18977/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018978
18979#include "confdefs.h"
18980#include <unistd.h>
18981
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018982int
18983main ()
18984{
18985void* p = getpagesize
18986 ;
18987 return 0;
18988}
18989_ACEOF
18990rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018991if { (ac_try="$ac_compile"
18992case "(($ac_try" in
18993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18994 *) ac_try_echo=$ac_try;;
18995esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000018996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018997 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018999 grep -v '^ *+' conftest.er1 >conftest.err
19000 rm -f conftest.er1
19001 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019002 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019003 (exit $ac_status); } && {
19004 test -z "$ac_c_werror_flag" ||
19005 test ! -s conftest.err
19006 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000019007
19008cat >>confdefs.h <<\_ACEOF
19009#define HAVE_GETPAGESIZE 1
19010_ACEOF
19011
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019012 { echo "$as_me:$LINENO: result: yes" >&5
19013echo "${ECHO_T}yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000019014else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019015 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019016sed 's/^/| /' conftest.$ac_ext >&5
19017
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019018 { echo "$as_me:$LINENO: result: no" >&5
19019echo "${ECHO_T}no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000019020
19021fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019022
19023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000019024
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019025for ac_prog in true
19026do
19027 # Extract the first word of "$ac_prog", so it can be a program name with args.
19028set dummy $ac_prog; ac_word=$2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019029{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19030echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019031if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019032 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019033else
19034 if test -n "$TRUE"; then
19035 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
19036else
19037as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19038for as_dir in $PATH
19039do
19040 IFS=$as_save_IFS
19041 test -z "$as_dir" && as_dir=.
19042 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000019043 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 +000019044 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019045 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019046 break 2
19047 fi
19048done
19049done
Martin v. Löwiseba40652007-08-30 20:10:57 +000019050IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019051
19052fi
19053fi
19054TRUE=$ac_cv_prog_TRUE
19055if test -n "$TRUE"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019056 { echo "$as_me:$LINENO: result: $TRUE" >&5
19057echo "${ECHO_T}$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019058else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019059 { echo "$as_me:$LINENO: result: no" >&5
19060echo "${ECHO_T}no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019061fi
19062
Martin v. Löwiseba40652007-08-30 20:10:57 +000019063
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019064 test -n "$TRUE" && break
19065done
19066test -n "$TRUE" || TRUE="/bin/true"
19067
19068
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019069{ echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
19070echo $ECHO_N "checking for inet_aton in -lc... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019071if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019072 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019073else
19074 ac_check_lib_save_LIBS=$LIBS
19075LIBS="-lc $LIBS"
19076cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019077/* confdefs.h. */
19078_ACEOF
19079cat confdefs.h >>conftest.$ac_ext
19080cat >>conftest.$ac_ext <<_ACEOF
19081/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019082
Martin v. Löwiseba40652007-08-30 20:10:57 +000019083/* Override any GCC internal prototype to avoid an error.
19084 Use char because int might match the return type of a GCC
19085 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019086#ifdef __cplusplus
19087extern "C"
19088#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019089char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019090int
19091main ()
19092{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019093return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019094 ;
19095 return 0;
19096}
19097_ACEOF
19098rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019099if { (ac_try="$ac_link"
19100case "(($ac_try" in
19101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19102 *) ac_try_echo=$ac_try;;
19103esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019104eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019105 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019107 grep -v '^ *+' conftest.er1 >conftest.err
19108 rm -f conftest.er1
19109 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019110 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019111 (exit $ac_status); } && {
19112 test -z "$ac_c_werror_flag" ||
19113 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019114 } && test -s conftest$ac_exeext &&
19115 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019116 ac_cv_lib_c_inet_aton=yes
19117else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019118 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019119sed 's/^/| /' conftest.$ac_ext >&5
19120
Martin v. Löwiseba40652007-08-30 20:10:57 +000019121 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019122fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019123
19124rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019125 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019126LIBS=$ac_check_lib_save_LIBS
19127fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019128{ echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
19129echo "${ECHO_T}$ac_cv_lib_c_inet_aton" >&6; }
19130if test $ac_cv_lib_c_inet_aton = yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000019131 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019132else
19133
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019134{ echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
19135echo $ECHO_N "checking for inet_aton in -lresolv... $ECHO_C" >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019136if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019137 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019138else
19139 ac_check_lib_save_LIBS=$LIBS
19140LIBS="-lresolv $LIBS"
19141cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019142/* confdefs.h. */
19143_ACEOF
19144cat confdefs.h >>conftest.$ac_ext
19145cat >>conftest.$ac_ext <<_ACEOF
19146/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019147
Martin v. Löwiseba40652007-08-30 20:10:57 +000019148/* Override any GCC internal prototype to avoid an error.
19149 Use char because int might match the return type of a GCC
19150 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019151#ifdef __cplusplus
19152extern "C"
19153#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019154char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019155int
19156main ()
19157{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019158return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019159 ;
19160 return 0;
19161}
19162_ACEOF
19163rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019164if { (ac_try="$ac_link"
19165case "(($ac_try" in
19166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19167 *) ac_try_echo=$ac_try;;
19168esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019170 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019171 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019172 grep -v '^ *+' conftest.er1 >conftest.err
19173 rm -f conftest.er1
19174 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019176 (exit $ac_status); } && {
19177 test -z "$ac_c_werror_flag" ||
19178 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019179 } && test -s conftest$ac_exeext &&
19180 $as_test_x conftest$ac_exeext; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019181 ac_cv_lib_resolv_inet_aton=yes
19182else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019183 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019184sed 's/^/| /' conftest.$ac_ext >&5
19185
Martin v. Löwiseba40652007-08-30 20:10:57 +000019186 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019188
19189rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019190 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019191LIBS=$ac_check_lib_save_LIBS
19192fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019193{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
19194echo "${ECHO_T}$ac_cv_lib_resolv_inet_aton" >&6; }
19195if test $ac_cv_lib_resolv_inet_aton = yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019196 cat >>confdefs.h <<_ACEOF
19197#define HAVE_LIBRESOLV 1
19198_ACEOF
19199
19200 LIBS="-lresolv $LIBS"
19201
19202fi
19203
19204
19205fi
19206
19207
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019208# On Tru64, chflags seems to be present, but calling it will
19209# exit Python
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019210{ echo "$as_me:$LINENO: checking for chflags" >&5
19211echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019212if test "${ac_cv_have_chflags+set}" = set; then
19213 echo $ECHO_N "(cached) $ECHO_C" >&6
19214else
19215 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019216 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019217else
19218 cat >conftest.$ac_ext <<_ACEOF
19219/* confdefs.h. */
19220_ACEOF
19221cat confdefs.h >>conftest.$ac_ext
19222cat >>conftest.$ac_ext <<_ACEOF
19223/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019224[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019225#include <sys/stat.h>
19226#include <unistd.h>
19227int main(int argc, char*argv[])
19228{
19229 if(chflags(argv[0], 0) != 0)
19230 return 1;
19231 return 0;
19232}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019233]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019234_ACEOF
19235rm -f conftest$ac_exeext
19236if { (ac_try="$ac_link"
19237case "(($ac_try" in
19238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19239 *) ac_try_echo=$ac_try;;
19240esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019241eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019242 (eval "$ac_link") 2>&5
19243 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019244 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019245 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19246 { (case "(($ac_try" in
19247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19248 *) ac_try_echo=$ac_try;;
19249esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019251 (eval "$ac_try") 2>&5
19252 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019254 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019255 ac_cv_have_chflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019256else
19257 echo "$as_me: program exited with status $ac_status" >&5
19258echo "$as_me: failed program was:" >&5
19259sed 's/^/| /' conftest.$ac_ext >&5
19260
19261( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019262ac_cv_have_chflags=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019263fi
19264rm -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 +000019265fi
19266
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019267
19268
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019269fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019270{ echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
19271echo "${ECHO_T}$ac_cv_have_chflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019272if test "$ac_cv_have_chflags" = cross ; then
19273 { echo "$as_me:$LINENO: checking for chflags" >&5
19274echo $ECHO_N "checking for chflags... $ECHO_C" >&6; }
19275if test "${ac_cv_func_chflags+set}" = set; then
19276 echo $ECHO_N "(cached) $ECHO_C" >&6
19277else
19278 cat >conftest.$ac_ext <<_ACEOF
19279/* confdefs.h. */
19280_ACEOF
19281cat confdefs.h >>conftest.$ac_ext
19282cat >>conftest.$ac_ext <<_ACEOF
19283/* end confdefs.h. */
19284/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
19285 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19286#define chflags innocuous_chflags
19287
19288/* System header to define __stub macros and hopefully few prototypes,
19289 which can conflict with char chflags (); below.
19290 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19291 <limits.h> exists even on freestanding compilers. */
19292
19293#ifdef __STDC__
19294# include <limits.h>
19295#else
19296# include <assert.h>
19297#endif
19298
19299#undef chflags
19300
19301/* Override any GCC internal prototype to avoid an error.
19302 Use char because int might match the return type of a GCC
19303 builtin and then its argument prototype would still apply. */
19304#ifdef __cplusplus
19305extern "C"
19306#endif
19307char chflags ();
19308/* The GNU C library defines this for functions which it implements
19309 to always fail with ENOSYS. Some functions are actually named
19310 something starting with __ and the normal name is an alias. */
19311#if defined __stub_chflags || defined __stub___chflags
19312choke me
19313#endif
19314
19315int
19316main ()
19317{
19318return chflags ();
19319 ;
19320 return 0;
19321}
19322_ACEOF
19323rm -f conftest.$ac_objext conftest$ac_exeext
19324if { (ac_try="$ac_link"
19325case "(($ac_try" in
19326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19327 *) ac_try_echo=$ac_try;;
19328esac
19329eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19330 (eval "$ac_link") 2>conftest.er1
19331 ac_status=$?
19332 grep -v '^ *+' conftest.er1 >conftest.err
19333 rm -f conftest.er1
19334 cat conftest.err >&5
19335 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19336 (exit $ac_status); } && {
19337 test -z "$ac_c_werror_flag" ||
19338 test ! -s conftest.err
19339 } && test -s conftest$ac_exeext &&
19340 $as_test_x conftest$ac_exeext; then
19341 ac_cv_func_chflags=yes
19342else
19343 echo "$as_me: failed program was:" >&5
19344sed 's/^/| /' conftest.$ac_ext >&5
19345
19346 ac_cv_func_chflags=no
19347fi
19348
19349rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19350 conftest$ac_exeext conftest.$ac_ext
19351fi
19352{ echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
19353echo "${ECHO_T}$ac_cv_func_chflags" >&6; }
19354if test $ac_cv_func_chflags = yes; then
19355 ac_cv_have_chflags="yes"
19356else
19357 ac_cv_have_chflags="no"
19358fi
19359
19360fi
19361if test "$ac_cv_have_chflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019362
19363cat >>confdefs.h <<\_ACEOF
19364#define HAVE_CHFLAGS 1
19365_ACEOF
19366
19367fi
19368
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019369{ echo "$as_me:$LINENO: checking for lchflags" >&5
19370echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019371if test "${ac_cv_have_lchflags+set}" = set; then
19372 echo $ECHO_N "(cached) $ECHO_C" >&6
19373else
19374 if test "$cross_compiling" = yes; then
Gregory P. Smith49437c22009-11-02 01:38:35 +000019375 ac_cv_have_lchflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019376else
19377 cat >conftest.$ac_ext <<_ACEOF
19378/* confdefs.h. */
19379_ACEOF
19380cat confdefs.h >>conftest.$ac_ext
19381cat >>conftest.$ac_ext <<_ACEOF
19382/* end confdefs.h. */
Gregory P. Smith49437c22009-11-02 01:38:35 +000019383[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019384#include <sys/stat.h>
19385#include <unistd.h>
19386int main(int argc, char*argv[])
19387{
19388 if(lchflags(argv[0], 0) != 0)
19389 return 1;
19390 return 0;
19391}
Gregory P. Smith49437c22009-11-02 01:38:35 +000019392]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019393_ACEOF
19394rm -f conftest$ac_exeext
19395if { (ac_try="$ac_link"
19396case "(($ac_try" in
19397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19398 *) ac_try_echo=$ac_try;;
19399esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019400eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019401 (eval "$ac_link") 2>&5
19402 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019403 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019404 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
19405 { (case "(($ac_try" in
19406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19407 *) ac_try_echo=$ac_try;;
19408esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019409eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019410 (eval "$ac_try") 2>&5
19411 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019412 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019413 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019414 ac_cv_have_lchflags=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019415else
19416 echo "$as_me: program exited with status $ac_status" >&5
19417echo "$as_me: failed program was:" >&5
19418sed 's/^/| /' conftest.$ac_ext >&5
19419
19420( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019421ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019422fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019423rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
19424fi
19425
19426
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000019427
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019428fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019429{ echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
19430echo "${ECHO_T}$ac_cv_have_lchflags" >&6; }
Gregory P. Smith49437c22009-11-02 01:38:35 +000019431if test "$ac_cv_have_lchflags" = cross ; then
19432 { echo "$as_me:$LINENO: checking for lchflags" >&5
19433echo $ECHO_N "checking for lchflags... $ECHO_C" >&6; }
19434if test "${ac_cv_func_lchflags+set}" = set; then
19435 echo $ECHO_N "(cached) $ECHO_C" >&6
19436else
19437 cat >conftest.$ac_ext <<_ACEOF
19438/* confdefs.h. */
19439_ACEOF
19440cat confdefs.h >>conftest.$ac_ext
19441cat >>conftest.$ac_ext <<_ACEOF
19442/* end confdefs.h. */
19443/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
19444 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19445#define lchflags innocuous_lchflags
19446
19447/* System header to define __stub macros and hopefully few prototypes,
19448 which can conflict with char lchflags (); below.
19449 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19450 <limits.h> exists even on freestanding compilers. */
19451
19452#ifdef __STDC__
19453# include <limits.h>
19454#else
19455# include <assert.h>
19456#endif
19457
19458#undef lchflags
19459
19460/* Override any GCC internal prototype to avoid an error.
19461 Use char because int might match the return type of a GCC
19462 builtin and then its argument prototype would still apply. */
19463#ifdef __cplusplus
19464extern "C"
19465#endif
19466char lchflags ();
19467/* The GNU C library defines this for functions which it implements
19468 to always fail with ENOSYS. Some functions are actually named
19469 something starting with __ and the normal name is an alias. */
19470#if defined __stub_lchflags || defined __stub___lchflags
19471choke me
19472#endif
19473
19474int
19475main ()
19476{
19477return lchflags ();
19478 ;
19479 return 0;
19480}
19481_ACEOF
19482rm -f conftest.$ac_objext conftest$ac_exeext
19483if { (ac_try="$ac_link"
19484case "(($ac_try" in
19485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19486 *) ac_try_echo=$ac_try;;
19487esac
19488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19489 (eval "$ac_link") 2>conftest.er1
19490 ac_status=$?
19491 grep -v '^ *+' conftest.er1 >conftest.err
19492 rm -f conftest.er1
19493 cat conftest.err >&5
19494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19495 (exit $ac_status); } && {
19496 test -z "$ac_c_werror_flag" ||
19497 test ! -s conftest.err
19498 } && test -s conftest$ac_exeext &&
19499 $as_test_x conftest$ac_exeext; then
19500 ac_cv_func_lchflags=yes
19501else
19502 echo "$as_me: failed program was:" >&5
19503sed 's/^/| /' conftest.$ac_ext >&5
19504
19505 ac_cv_func_lchflags=no
19506fi
19507
19508rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19509 conftest$ac_exeext conftest.$ac_ext
19510fi
19511{ echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
19512echo "${ECHO_T}$ac_cv_func_lchflags" >&6; }
19513if test $ac_cv_func_lchflags = yes; then
19514 ac_cv_have_lchflags="yes"
19515else
19516 ac_cv_have_lchflags="no"
19517fi
19518
19519fi
19520if test "$ac_cv_have_lchflags" = yes ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000019521
19522cat >>confdefs.h <<\_ACEOF
19523#define HAVE_LCHFLAGS 1
19524_ACEOF
19525
19526fi
19527
Ronald Oussorenf8752642006-07-06 10:13:35 +000019528case $ac_sys_system/$ac_sys_release in
19529Darwin/*)
19530 _CUR_CFLAGS="${CFLAGS}"
19531 _CUR_LDFLAGS="${LDFLAGS}"
19532 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
19533 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
19534 ;;
19535esac
19536
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019537{ echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
19538echo $ECHO_N "checking for inflateCopy in -lz... $ECHO_C" >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019539if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019540 echo $ECHO_N "(cached) $ECHO_C" >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019541else
19542 ac_check_lib_save_LIBS=$LIBS
19543LIBS="-lz $LIBS"
19544cat >conftest.$ac_ext <<_ACEOF
19545/* confdefs.h. */
19546_ACEOF
19547cat confdefs.h >>conftest.$ac_ext
19548cat >>conftest.$ac_ext <<_ACEOF
19549/* end confdefs.h. */
19550
Martin v. Löwiseba40652007-08-30 20:10:57 +000019551/* Override any GCC internal prototype to avoid an error.
19552 Use char because int might match the return type of a GCC
19553 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019554#ifdef __cplusplus
19555extern "C"
19556#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019557char inflateCopy ();
19558int
19559main ()
19560{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019561return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019562 ;
19563 return 0;
19564}
19565_ACEOF
19566rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019567if { (ac_try="$ac_link"
19568case "(($ac_try" in
19569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19570 *) ac_try_echo=$ac_try;;
19571esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019573 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019574 ac_status=$?
19575 grep -v '^ *+' conftest.er1 >conftest.err
19576 rm -f conftest.er1
19577 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019579 (exit $ac_status); } && {
19580 test -z "$ac_c_werror_flag" ||
19581 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019582 } && test -s conftest$ac_exeext &&
19583 $as_test_x conftest$ac_exeext; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019584 ac_cv_lib_z_inflateCopy=yes
19585else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019586 echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019587sed 's/^/| /' conftest.$ac_ext >&5
19588
Martin v. Löwiseba40652007-08-30 20:10:57 +000019589 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019590fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019591
19592rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019593 conftest$ac_exeext conftest.$ac_ext
19594LIBS=$ac_check_lib_save_LIBS
19595fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019596{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
19597echo "${ECHO_T}$ac_cv_lib_z_inflateCopy" >&6; }
19598if test $ac_cv_lib_z_inflateCopy = yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000019599
19600cat >>confdefs.h <<\_ACEOF
19601#define HAVE_ZLIB_COPY 1
19602_ACEOF
19603
19604fi
19605
19606
Ronald Oussorenf8752642006-07-06 10:13:35 +000019607case $ac_sys_system/$ac_sys_release in
19608Darwin/*)
19609 CFLAGS="${_CUR_CFLAGS}"
19610 LDFLAGS="${_CUR_LDFLAGS}"
19611 ;;
19612esac
19613
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019614{ echo "$as_me:$LINENO: checking for hstrerror" >&5
19615echo $ECHO_N "checking for hstrerror... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019616cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019617/* confdefs.h. */
19618_ACEOF
19619cat confdefs.h >>conftest.$ac_ext
19620cat >>conftest.$ac_ext <<_ACEOF
19621/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019622
19623#include "confdefs.h"
19624#include <netdb.h>
19625
Martin v. Löwise9416172003-05-03 10:12:45 +000019626int
19627main ()
19628{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019629void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019630 ;
19631 return 0;
19632}
19633_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019634rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019635if { (ac_try="$ac_link"
19636case "(($ac_try" in
19637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19638 *) ac_try_echo=$ac_try;;
19639esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019640eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019641 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019642 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019643 grep -v '^ *+' conftest.er1 >conftest.err
19644 rm -f conftest.er1
19645 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019646 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019647 (exit $ac_status); } && {
19648 test -z "$ac_c_werror_flag" ||
19649 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019650 } && test -s conftest$ac_exeext &&
19651 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019652
19653cat >>confdefs.h <<\_ACEOF
19654#define HAVE_HSTRERROR 1
19655_ACEOF
19656
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019657 { echo "$as_me:$LINENO: result: yes" >&5
19658echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019659else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019660 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019661sed 's/^/| /' conftest.$ac_ext >&5
19662
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019663 { echo "$as_me:$LINENO: result: no" >&5
19664echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019665
19666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019667
19668rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019669 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019670
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019671{ echo "$as_me:$LINENO: checking for inet_aton" >&5
19672echo $ECHO_N "checking for inet_aton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019673cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019674/* confdefs.h. */
19675_ACEOF
19676cat confdefs.h >>conftest.$ac_ext
19677cat >>conftest.$ac_ext <<_ACEOF
19678/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019679
19680#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000019681#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019682#include <sys/socket.h>
19683#include <netinet/in.h>
19684#include <arpa/inet.h>
19685
Martin v. Löwise9416172003-05-03 10:12:45 +000019686int
19687main ()
19688{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019689void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000019690 ;
19691 return 0;
19692}
19693_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000019694rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019695if { (ac_try="$ac_link"
19696case "(($ac_try" in
19697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19698 *) ac_try_echo=$ac_try;;
19699esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019700eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019701 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019703 grep -v '^ *+' conftest.er1 >conftest.err
19704 rm -f conftest.er1
19705 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019706 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019707 (exit $ac_status); } && {
19708 test -z "$ac_c_werror_flag" ||
19709 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019710 } && test -s conftest$ac_exeext &&
19711 $as_test_x conftest$ac_exeext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019712
19713cat >>confdefs.h <<\_ACEOF
19714#define HAVE_INET_ATON 1
19715_ACEOF
19716
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019717 { echo "$as_me:$LINENO: result: yes" >&5
19718echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019719else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019720 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019721sed 's/^/| /' conftest.$ac_ext >&5
19722
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019723 { echo "$as_me:$LINENO: result: no" >&5
19724echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019725
19726fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019727
19728rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019729 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019730
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019731{ echo "$as_me:$LINENO: checking for inet_pton" >&5
19732echo $ECHO_N "checking for inet_pton... $ECHO_C" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019734/* confdefs.h. */
19735_ACEOF
19736cat confdefs.h >>conftest.$ac_ext
19737cat >>conftest.$ac_ext <<_ACEOF
19738/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019739
19740#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019741#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019742#include <sys/socket.h>
19743#include <netinet/in.h>
19744#include <arpa/inet.h>
19745
Martin v. Löwise9416172003-05-03 10:12:45 +000019746int
19747main ()
19748{
19749void* p = inet_pton
19750 ;
19751 return 0;
19752}
19753_ACEOF
19754rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019755if { (ac_try="$ac_compile"
19756case "(($ac_try" in
19757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19758 *) ac_try_echo=$ac_try;;
19759esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019760eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019763 grep -v '^ *+' conftest.er1 >conftest.err
19764 rm -f conftest.er1
19765 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019766 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019767 (exit $ac_status); } && {
19768 test -z "$ac_c_werror_flag" ||
19769 test ! -s conftest.err
19770 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019771
19772cat >>confdefs.h <<\_ACEOF
19773#define HAVE_INET_PTON 1
19774_ACEOF
19775
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019776 { echo "$as_me:$LINENO: result: yes" >&5
19777echo "${ECHO_T}yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019778else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019779 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019780sed 's/^/| /' conftest.$ac_ext >&5
19781
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019782 { echo "$as_me:$LINENO: result: no" >&5
19783echo "${ECHO_T}no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019784
19785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019786
19787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019788
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019789# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019790{ echo "$as_me:$LINENO: checking for setgroups" >&5
19791echo $ECHO_N "checking for setgroups... $ECHO_C" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019792cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019793/* confdefs.h. */
19794_ACEOF
19795cat confdefs.h >>conftest.$ac_ext
19796cat >>conftest.$ac_ext <<_ACEOF
19797/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019798
19799#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019800#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019801#ifdef HAVE_GRP_H
19802#include <grp.h>
19803#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019804
Martin v. Löwisd5843682002-11-21 20:41:28 +000019805int
19806main ()
19807{
19808void* p = setgroups
19809 ;
19810 return 0;
19811}
19812_ACEOF
19813rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019814if { (ac_try="$ac_compile"
19815case "(($ac_try" in
19816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19817 *) ac_try_echo=$ac_try;;
19818esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019820 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019821 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019822 grep -v '^ *+' conftest.er1 >conftest.err
19823 rm -f conftest.er1
19824 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019825 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019826 (exit $ac_status); } && {
19827 test -z "$ac_c_werror_flag" ||
19828 test ! -s conftest.err
19829 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019830
19831cat >>confdefs.h <<\_ACEOF
19832#define HAVE_SETGROUPS 1
19833_ACEOF
19834
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019835 { echo "$as_me:$LINENO: result: yes" >&5
19836echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019837else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019838 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019839sed 's/^/| /' conftest.$ac_ext >&5
19840
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019841 { echo "$as_me:$LINENO: result: no" >&5
19842echo "${ECHO_T}no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019843
19844fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019845
19846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019847
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019848# check for openpty and forkpty
19849
Martin v. Löwis11437992002-04-12 09:54:03 +000019850
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019851for ac_func in openpty
19852do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019853as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19854{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19855echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019856if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019857 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019858else
Martin v. Löwis11437992002-04-12 09:54:03 +000019859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019860/* confdefs.h. */
19861_ACEOF
19862cat confdefs.h >>conftest.$ac_ext
19863cat >>conftest.$ac_ext <<_ACEOF
19864/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019865/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19866 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19867#define $ac_func innocuous_$ac_func
19868
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019869/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019870 which can conflict with char $ac_func (); below.
19871 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019872 <limits.h> exists even on freestanding compilers. */
19873
19874#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019875# include <limits.h>
19876#else
19877# include <assert.h>
19878#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019879
19880#undef $ac_func
19881
Martin v. Löwiseba40652007-08-30 20:10:57 +000019882/* Override any GCC internal prototype to avoid an error.
19883 Use char because int might match the return type of a GCC
19884 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019885#ifdef __cplusplus
19886extern "C"
19887#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019888char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019889/* The GNU C library defines this for functions which it implements
19890 to always fail with ENOSYS. Some functions are actually named
19891 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019892#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019893choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019894#endif
19895
Skip Montanaro6dead952003-09-25 14:50:04 +000019896int
19897main ()
19898{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019899return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019900 ;
19901 return 0;
19902}
19903_ACEOF
19904rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019905if { (ac_try="$ac_link"
19906case "(($ac_try" in
19907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19908 *) ac_try_echo=$ac_try;;
19909esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019910eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019911 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019912 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019913 grep -v '^ *+' conftest.er1 >conftest.err
19914 rm -f conftest.er1
19915 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019916 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019917 (exit $ac_status); } && {
19918 test -z "$ac_c_werror_flag" ||
19919 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019920 } && test -s conftest$ac_exeext &&
19921 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019922 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019923else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019924 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019925sed 's/^/| /' conftest.$ac_ext >&5
19926
Martin v. Löwiseba40652007-08-30 20:10:57 +000019927 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019929
19930rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019931 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019932fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019933ac_res=`eval echo '${'$as_ac_var'}'`
19934 { echo "$as_me:$LINENO: result: $ac_res" >&5
19935echo "${ECHO_T}$ac_res" >&6; }
19936if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019937 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019938#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019939_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019940
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019941else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019942 { echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19943echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019944if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019945 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019946else
Martin v. Löwis11437992002-04-12 09:54:03 +000019947 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019948LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019949cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019950/* confdefs.h. */
19951_ACEOF
19952cat confdefs.h >>conftest.$ac_ext
19953cat >>conftest.$ac_ext <<_ACEOF
19954/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019955
Martin v. Löwiseba40652007-08-30 20:10:57 +000019956/* Override any GCC internal prototype to avoid an error.
19957 Use char because int might match the return type of a GCC
19958 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019959#ifdef __cplusplus
19960extern "C"
19961#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019962char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019963int
19964main ()
19965{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019966return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019967 ;
19968 return 0;
19969}
19970_ACEOF
19971rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019972if { (ac_try="$ac_link"
19973case "(($ac_try" in
19974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19975 *) ac_try_echo=$ac_try;;
19976esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019978 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019980 grep -v '^ *+' conftest.er1 >conftest.err
19981 rm -f conftest.er1
19982 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019983 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019984 (exit $ac_status); } && {
19985 test -z "$ac_c_werror_flag" ||
19986 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019987 } && test -s conftest$ac_exeext &&
19988 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019989 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019990else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000019991 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019992sed 's/^/| /' conftest.$ac_ext >&5
19993
Martin v. Löwiseba40652007-08-30 20:10:57 +000019994 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019995fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019996
19997rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019998 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019999LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020000fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020001{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
20002echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6; }
20003if test $ac_cv_lib_util_openpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020004 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020005#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020006_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020007 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020008else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020009 { echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
20010echo $ECHO_N "checking for openpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020011if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020012 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020013else
20014 ac_check_lib_save_LIBS=$LIBS
20015LIBS="-lbsd $LIBS"
20016cat >conftest.$ac_ext <<_ACEOF
20017/* confdefs.h. */
20018_ACEOF
20019cat confdefs.h >>conftest.$ac_ext
20020cat >>conftest.$ac_ext <<_ACEOF
20021/* end confdefs.h. */
20022
Martin v. Löwiseba40652007-08-30 20:10:57 +000020023/* Override any GCC internal prototype to avoid an error.
20024 Use char because int might match the return type of a GCC
20025 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020026#ifdef __cplusplus
20027extern "C"
20028#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020029char openpty ();
20030int
20031main ()
20032{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020033return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020034 ;
20035 return 0;
20036}
20037_ACEOF
20038rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020039if { (ac_try="$ac_link"
20040case "(($ac_try" in
20041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20042 *) ac_try_echo=$ac_try;;
20043esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020045 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020046 ac_status=$?
20047 grep -v '^ *+' conftest.er1 >conftest.err
20048 rm -f conftest.er1
20049 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020050 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020051 (exit $ac_status); } && {
20052 test -z "$ac_c_werror_flag" ||
20053 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020054 } && test -s conftest$ac_exeext &&
20055 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020056 ac_cv_lib_bsd_openpty=yes
20057else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020058 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020059sed 's/^/| /' conftest.$ac_ext >&5
20060
Martin v. Löwiseba40652007-08-30 20:10:57 +000020061 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020062fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020063
20064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020065 conftest$ac_exeext conftest.$ac_ext
20066LIBS=$ac_check_lib_save_LIBS
20067fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020068{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
20069echo "${ECHO_T}$ac_cv_lib_bsd_openpty" >&6; }
20070if test $ac_cv_lib_bsd_openpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020071 cat >>confdefs.h <<\_ACEOF
20072#define HAVE_OPENPTY 1
20073_ACEOF
20074 LIBS="$LIBS -lbsd"
20075fi
20076
20077
20078fi
20079
Fred Drake8cef4cf2000-06-28 16:40:38 +000020080
20081fi
20082done
20083
Martin v. Löwis11437992002-04-12 09:54:03 +000020084
Fred Drake8cef4cf2000-06-28 16:40:38 +000020085for ac_func in forkpty
20086do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020087as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20088{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20089echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020090if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020091 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020092else
Martin v. Löwis11437992002-04-12 09:54:03 +000020093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020094/* confdefs.h. */
20095_ACEOF
20096cat confdefs.h >>conftest.$ac_ext
20097cat >>conftest.$ac_ext <<_ACEOF
20098/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020099/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20100 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20101#define $ac_func innocuous_$ac_func
20102
Fred Drake8cef4cf2000-06-28 16:40:38 +000020103/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020104 which can conflict with char $ac_func (); below.
20105 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020106 <limits.h> exists even on freestanding compilers. */
20107
20108#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020109# include <limits.h>
20110#else
20111# include <assert.h>
20112#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020113
20114#undef $ac_func
20115
Martin v. Löwiseba40652007-08-30 20:10:57 +000020116/* Override any GCC internal prototype to avoid an error.
20117 Use char because int might match the return type of a GCC
20118 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020119#ifdef __cplusplus
20120extern "C"
20121#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020122char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000020123/* The GNU C library defines this for functions which it implements
20124 to always fail with ENOSYS. Some functions are actually named
20125 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020126#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000020127choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000020128#endif
20129
Skip Montanaro6dead952003-09-25 14:50:04 +000020130int
20131main ()
20132{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020133return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020134 ;
20135 return 0;
20136}
20137_ACEOF
20138rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020139if { (ac_try="$ac_link"
20140case "(($ac_try" in
20141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20142 *) ac_try_echo=$ac_try;;
20143esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020144eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020145 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020147 grep -v '^ *+' conftest.er1 >conftest.err
20148 rm -f conftest.er1
20149 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020150 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020151 (exit $ac_status); } && {
20152 test -z "$ac_c_werror_flag" ||
20153 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020154 } && test -s conftest$ac_exeext &&
20155 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020156 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020157else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020158 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020159sed 's/^/| /' conftest.$ac_ext >&5
20160
Martin v. Löwiseba40652007-08-30 20:10:57 +000020161 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020162fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020163
20164rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020165 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020166fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020167ac_res=`eval echo '${'$as_ac_var'}'`
20168 { echo "$as_me:$LINENO: result: $ac_res" >&5
20169echo "${ECHO_T}$ac_res" >&6; }
20170if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020171 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020172#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020173_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020174
Fred Drake8cef4cf2000-06-28 16:40:38 +000020175else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020176 { echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
20177echo $ECHO_N "checking for forkpty in -lutil... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020178if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020179 echo $ECHO_N "(cached) $ECHO_C" >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000020180else
Martin v. Löwis11437992002-04-12 09:54:03 +000020181 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020182LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000020183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020184/* confdefs.h. */
20185_ACEOF
20186cat confdefs.h >>conftest.$ac_ext
20187cat >>conftest.$ac_ext <<_ACEOF
20188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020189
Martin v. Löwiseba40652007-08-30 20:10:57 +000020190/* Override any GCC internal prototype to avoid an error.
20191 Use char because int might match the return type of a GCC
20192 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020193#ifdef __cplusplus
20194extern "C"
20195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020196char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020197int
20198main ()
20199{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020200return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020201 ;
20202 return 0;
20203}
20204_ACEOF
20205rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020206if { (ac_try="$ac_link"
20207case "(($ac_try" in
20208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20209 *) ac_try_echo=$ac_try;;
20210esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020211eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020212 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020214 grep -v '^ *+' conftest.er1 >conftest.err
20215 rm -f conftest.er1
20216 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020217 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020218 (exit $ac_status); } && {
20219 test -z "$ac_c_werror_flag" ||
20220 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020221 } && test -s conftest$ac_exeext &&
20222 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020223 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000020224else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020225 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020226sed 's/^/| /' conftest.$ac_ext >&5
20227
Martin v. Löwiseba40652007-08-30 20:10:57 +000020228 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020229fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020230
20231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020233LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000020234fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020235{ echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
20236echo "${ECHO_T}$ac_cv_lib_util_forkpty" >&6; }
20237if test $ac_cv_lib_util_forkpty = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020238 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020239#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020240_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000020241 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020242else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020243 { echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
20244echo $ECHO_N "checking for forkpty in -lbsd... $ECHO_C" >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020245if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020246 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020247else
20248 ac_check_lib_save_LIBS=$LIBS
20249LIBS="-lbsd $LIBS"
20250cat >conftest.$ac_ext <<_ACEOF
20251/* confdefs.h. */
20252_ACEOF
20253cat confdefs.h >>conftest.$ac_ext
20254cat >>conftest.$ac_ext <<_ACEOF
20255/* end confdefs.h. */
20256
Martin v. Löwiseba40652007-08-30 20:10:57 +000020257/* Override any GCC internal prototype to avoid an error.
20258 Use char because int might match the return type of a GCC
20259 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020260#ifdef __cplusplus
20261extern "C"
20262#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020263char forkpty ();
20264int
20265main ()
20266{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020267return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020268 ;
20269 return 0;
20270}
20271_ACEOF
20272rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020273if { (ac_try="$ac_link"
20274case "(($ac_try" in
20275 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20276 *) ac_try_echo=$ac_try;;
20277esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020278eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020279 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020280 ac_status=$?
20281 grep -v '^ *+' conftest.er1 >conftest.err
20282 rm -f conftest.er1
20283 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020285 (exit $ac_status); } && {
20286 test -z "$ac_c_werror_flag" ||
20287 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020288 } && test -s conftest$ac_exeext &&
20289 $as_test_x conftest$ac_exeext; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020290 ac_cv_lib_bsd_forkpty=yes
20291else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020292 echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020293sed 's/^/| /' conftest.$ac_ext >&5
20294
Martin v. Löwiseba40652007-08-30 20:10:57 +000020295 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000020296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020297
20298rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020299 conftest$ac_exeext conftest.$ac_ext
20300LIBS=$ac_check_lib_save_LIBS
20301fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020302{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
20303echo "${ECHO_T}$ac_cv_lib_bsd_forkpty" >&6; }
20304if test $ac_cv_lib_bsd_forkpty = yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000020305 cat >>confdefs.h <<\_ACEOF
20306#define HAVE_FORKPTY 1
20307_ACEOF
20308 LIBS="$LIBS -lbsd"
20309fi
20310
20311
20312fi
20313
Fred Drake8cef4cf2000-06-28 16:40:38 +000020314
20315fi
20316done
20317
Jack Jansendd19cf82001-12-06 22:36:17 +000020318
Brett Cannonaa5778d2008-03-18 04:09:00 +000020319# Stuff for expat.
20320
20321for ac_func in memmove
20322do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020323as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20324{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20325echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000020326if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020327 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000020328else
20329 cat >conftest.$ac_ext <<_ACEOF
20330/* confdefs.h. */
20331_ACEOF
20332cat confdefs.h >>conftest.$ac_ext
20333cat >>conftest.$ac_ext <<_ACEOF
20334/* end confdefs.h. */
20335/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20336 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20337#define $ac_func innocuous_$ac_func
20338
20339/* System header to define __stub macros and hopefully few prototypes,
20340 which can conflict with char $ac_func (); below.
20341 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
20342 <limits.h> exists even on freestanding compilers. */
20343
20344#ifdef __STDC__
20345# include <limits.h>
20346#else
20347# include <assert.h>
20348#endif
20349
20350#undef $ac_func
20351
20352/* Override any GCC internal prototype to avoid an error.
20353 Use char because int might match the return type of a GCC
20354 builtin and then its argument prototype would still apply. */
20355#ifdef __cplusplus
20356extern "C"
20357#endif
20358char $ac_func ();
20359/* The GNU C library defines this for functions which it implements
20360 to always fail with ENOSYS. Some functions are actually named
20361 something starting with __ and the normal name is an alias. */
20362#if defined __stub_$ac_func || defined __stub___$ac_func
20363choke me
20364#endif
20365
20366int
20367main ()
20368{
20369return $ac_func ();
20370 ;
20371 return 0;
20372}
20373_ACEOF
20374rm -f conftest.$ac_objext conftest$ac_exeext
20375if { (ac_try="$ac_link"
20376case "(($ac_try" in
20377 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20378 *) ac_try_echo=$ac_try;;
20379esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020380eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020381 (eval "$ac_link") 2>conftest.er1
20382 ac_status=$?
20383 grep -v '^ *+' conftest.er1 >conftest.err
20384 rm -f conftest.er1
20385 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020386 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020387 (exit $ac_status); } && {
20388 test -z "$ac_c_werror_flag" ||
20389 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020390 } && test -s conftest$ac_exeext &&
20391 $as_test_x conftest$ac_exeext; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020392 eval "$as_ac_var=yes"
20393else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020394 echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000020395sed 's/^/| /' conftest.$ac_ext >&5
20396
20397 eval "$as_ac_var=no"
20398fi
20399
20400rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20401 conftest$ac_exeext conftest.$ac_ext
20402fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020403ac_res=`eval echo '${'$as_ac_var'}'`
20404 { echo "$as_me:$LINENO: result: $ac_res" >&5
20405echo "${ECHO_T}$ac_res" >&6; }
20406if test `eval echo '${'$as_ac_var'}'` = yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000020407 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020408#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000020409_ACEOF
20410
20411fi
20412done
20413
20414
Michael W. Hudson54241132001-12-07 15:38:26 +000020415# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000020416
20417
20418
20419
20420
20421
Fred Drake8cef4cf2000-06-28 16:40:38 +000020422for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
20423do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020424as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20425{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20426echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020427if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020428 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020429else
Martin v. Löwis11437992002-04-12 09:54:03 +000020430 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020431/* confdefs.h. */
20432_ACEOF
20433cat confdefs.h >>conftest.$ac_ext
20434cat >>conftest.$ac_ext <<_ACEOF
20435/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020436/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20437 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20438#define $ac_func innocuous_$ac_func
20439
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020440/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020441 which can conflict with char $ac_func (); below.
20442 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020443 <limits.h> exists even on freestanding compilers. */
20444
20445#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020446# include <limits.h>
20447#else
20448# include <assert.h>
20449#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020450
20451#undef $ac_func
20452
Martin v. Löwiseba40652007-08-30 20:10:57 +000020453/* Override any GCC internal prototype to avoid an error.
20454 Use char because int might match the return type of a GCC
20455 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020456#ifdef __cplusplus
20457extern "C"
20458#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020459char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020460/* The GNU C library defines this for functions which it implements
20461 to always fail with ENOSYS. Some functions are actually named
20462 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020463#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020464choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000020465#endif
20466
Skip Montanaro6dead952003-09-25 14:50:04 +000020467int
20468main ()
20469{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020470return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020471 ;
20472 return 0;
20473}
20474_ACEOF
20475rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020476if { (ac_try="$ac_link"
20477case "(($ac_try" in
20478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20479 *) ac_try_echo=$ac_try;;
20480esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020481eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020482 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020484 grep -v '^ *+' conftest.er1 >conftest.err
20485 rm -f conftest.er1
20486 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020488 (exit $ac_status); } && {
20489 test -z "$ac_c_werror_flag" ||
20490 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020491 } && test -s conftest$ac_exeext &&
20492 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020493 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020494else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020495 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020496sed 's/^/| /' conftest.$ac_ext >&5
20497
Martin v. Löwiseba40652007-08-30 20:10:57 +000020498 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020499fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020500
20501rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020502 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020503fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020504ac_res=`eval echo '${'$as_ac_var'}'`
20505 { echo "$as_me:$LINENO: result: $ac_res" >&5
20506echo "${ECHO_T}$ac_res" >&6; }
20507if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020508 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020509#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020510_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000020511
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020512fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000020513done
20514
Michael W. Hudson54241132001-12-07 15:38:26 +000020515
Martin v. Löwis11437992002-04-12 09:54:03 +000020516
20517
20518
Brett Cannonaa5778d2008-03-18 04:09:00 +000020519for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000020520do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020521as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20522{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20523echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020524if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020525 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020526else
Martin v. Löwis11437992002-04-12 09:54:03 +000020527 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020528/* confdefs.h. */
20529_ACEOF
20530cat confdefs.h >>conftest.$ac_ext
20531cat >>conftest.$ac_ext <<_ACEOF
20532/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020533/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20534 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20535#define $ac_func innocuous_$ac_func
20536
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020537/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020538 which can conflict with char $ac_func (); below.
20539 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020540 <limits.h> exists even on freestanding compilers. */
20541
20542#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020543# include <limits.h>
20544#else
20545# include <assert.h>
20546#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020547
20548#undef $ac_func
20549
Martin v. Löwiseba40652007-08-30 20:10:57 +000020550/* Override any GCC internal prototype to avoid an error.
20551 Use char because int might match the return type of a GCC
20552 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020553#ifdef __cplusplus
20554extern "C"
20555#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020556char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000020557/* The GNU C library defines this for functions which it implements
20558 to always fail with ENOSYS. Some functions are actually named
20559 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020560#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000020561choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000020562#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020563
Skip Montanaro6dead952003-09-25 14:50:04 +000020564int
20565main ()
20566{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020567return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020568 ;
20569 return 0;
20570}
20571_ACEOF
20572rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020573if { (ac_try="$ac_link"
20574case "(($ac_try" in
20575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20576 *) ac_try_echo=$ac_try;;
20577esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020579 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020581 grep -v '^ *+' conftest.er1 >conftest.err
20582 rm -f conftest.er1
20583 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020585 (exit $ac_status); } && {
20586 test -z "$ac_c_werror_flag" ||
20587 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020588 } && test -s conftest$ac_exeext &&
20589 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020590 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020591else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020592 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020593sed 's/^/| /' conftest.$ac_ext >&5
20594
Martin v. Löwiseba40652007-08-30 20:10:57 +000020595 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000020596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020597
20598rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020599 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000020600fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020601ac_res=`eval echo '${'$as_ac_var'}'`
20602 { echo "$as_me:$LINENO: result: $ac_res" >&5
20603echo "${ECHO_T}$ac_res" >&6; }
20604if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020605 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020606#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020607_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000020608
Martin v. Löwis1142de32002-03-29 16:28:31 +000020609else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020610 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020611 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020612 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20613 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020614esac
20615
Martin v. Löwis1142de32002-03-29 16:28:31 +000020616fi
20617done
20618
20619
Martin v. Löwis11437992002-04-12 09:54:03 +000020620
Martin v. Löwis1142de32002-03-29 16:28:31 +000020621for ac_func in getpgrp
20622do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020623as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20624{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20625echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020626if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020627 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000020628else
Martin v. Löwis11437992002-04-12 09:54:03 +000020629 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020630/* confdefs.h. */
20631_ACEOF
20632cat confdefs.h >>conftest.$ac_ext
20633cat >>conftest.$ac_ext <<_ACEOF
20634/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020635/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20636 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20637#define $ac_func innocuous_$ac_func
20638
Martin v. Löwis1142de32002-03-29 16:28:31 +000020639/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020640 which can conflict with char $ac_func (); below.
20641 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020642 <limits.h> exists even on freestanding compilers. */
20643
20644#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020645# include <limits.h>
20646#else
20647# include <assert.h>
20648#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020649
20650#undef $ac_func
20651
Martin v. Löwiseba40652007-08-30 20:10:57 +000020652/* Override any GCC internal prototype to avoid an error.
20653 Use char because int might match the return type of a GCC
20654 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020655#ifdef __cplusplus
20656extern "C"
20657#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020658char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000020659/* The GNU C library defines this for functions which it implements
20660 to always fail with ENOSYS. Some functions are actually named
20661 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020662#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000020663choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020664#endif
20665
Skip Montanaro6dead952003-09-25 14:50:04 +000020666int
20667main ()
20668{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020669return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020670 ;
20671 return 0;
20672}
20673_ACEOF
20674rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020675if { (ac_try="$ac_link"
20676case "(($ac_try" in
20677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20678 *) ac_try_echo=$ac_try;;
20679esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020680eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020681 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020683 grep -v '^ *+' conftest.er1 >conftest.err
20684 rm -f conftest.er1
20685 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020686 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020687 (exit $ac_status); } && {
20688 test -z "$ac_c_werror_flag" ||
20689 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020690 } && test -s conftest$ac_exeext &&
20691 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020692 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020693else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020694 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020695sed 's/^/| /' conftest.$ac_ext >&5
20696
Martin v. Löwiseba40652007-08-30 20:10:57 +000020697 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020699
20700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020701 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020702fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020703ac_res=`eval echo '${'$as_ac_var'}'`
20704 { echo "$as_me:$LINENO: result: $ac_res" >&5
20705echo "${ECHO_T}$ac_res" >&6; }
20706if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020707 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020708#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020709_ACEOF
20710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020711/* confdefs.h. */
20712_ACEOF
20713cat confdefs.h >>conftest.$ac_ext
20714cat >>conftest.$ac_ext <<_ACEOF
20715/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020716#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020717int
20718main ()
20719{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020720getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020721 ;
20722 return 0;
20723}
20724_ACEOF
20725rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020726if { (ac_try="$ac_compile"
20727case "(($ac_try" in
20728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20729 *) ac_try_echo=$ac_try;;
20730esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020732 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020733 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020734 grep -v '^ *+' conftest.er1 >conftest.err
20735 rm -f conftest.er1
20736 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020738 (exit $ac_status); } && {
20739 test -z "$ac_c_werror_flag" ||
20740 test ! -s conftest.err
20741 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020742
20743cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020744#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020745_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020746
Martin v. Löwis11437992002-04-12 09:54:03 +000020747
Guido van Rossumf78abae1997-01-21 22:02:36 +000020748else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020749 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020750sed 's/^/| /' conftest.$ac_ext >&5
20751
Martin v. Löwiseba40652007-08-30 20:10:57 +000020752
Guido van Rossum627b2d71993-12-24 10:39:16 +000020753fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020754
20755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020756
Guido van Rossum627b2d71993-12-24 10:39:16 +000020757fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020758done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020759
Jack Jansen150753c2003-03-29 22:07:47 +000020760
20761for ac_func in setpgrp
20762do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020763as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20764{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20765echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020766if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020767 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020768else
Martin v. Löwis11437992002-04-12 09:54:03 +000020769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020770/* confdefs.h. */
20771_ACEOF
20772cat confdefs.h >>conftest.$ac_ext
20773cat >>conftest.$ac_ext <<_ACEOF
20774/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020775/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20776 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20777#define $ac_func innocuous_$ac_func
20778
Jack Jansen150753c2003-03-29 22:07:47 +000020779/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020780 which can conflict with char $ac_func (); below.
20781 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020782 <limits.h> exists even on freestanding compilers. */
20783
20784#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020785# include <limits.h>
20786#else
20787# include <assert.h>
20788#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020789
20790#undef $ac_func
20791
Martin v. Löwiseba40652007-08-30 20:10:57 +000020792/* Override any GCC internal prototype to avoid an error.
20793 Use char because int might match the return type of a GCC
20794 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020795#ifdef __cplusplus
20796extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020797#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020798char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020799/* The GNU C library defines this for functions which it implements
20800 to always fail with ENOSYS. Some functions are actually named
20801 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020802#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020803choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020804#endif
20805
Skip Montanaro6dead952003-09-25 14:50:04 +000020806int
20807main ()
20808{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020809return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020810 ;
20811 return 0;
20812}
20813_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020814rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020815if { (ac_try="$ac_link"
20816case "(($ac_try" in
20817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20818 *) ac_try_echo=$ac_try;;
20819esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020821 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020823 grep -v '^ *+' conftest.er1 >conftest.err
20824 rm -f conftest.er1
20825 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020827 (exit $ac_status); } && {
20828 test -z "$ac_c_werror_flag" ||
20829 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020830 } && test -s conftest$ac_exeext &&
20831 $as_test_x conftest$ac_exeext; then
Jack Jansen150753c2003-03-29 22:07:47 +000020832 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020833else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020834 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020835sed 's/^/| /' conftest.$ac_ext >&5
20836
Martin v. Löwiseba40652007-08-30 20:10:57 +000020837 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020838fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020839
20840rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020841 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020842fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020843ac_res=`eval echo '${'$as_ac_var'}'`
20844 { echo "$as_me:$LINENO: result: $ac_res" >&5
20845echo "${ECHO_T}$ac_res" >&6; }
20846if test `eval echo '${'$as_ac_var'}'` = yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020847 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020848#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020849_ACEOF
20850 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020851/* confdefs.h. */
20852_ACEOF
20853cat confdefs.h >>conftest.$ac_ext
20854cat >>conftest.$ac_ext <<_ACEOF
20855/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020856#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020857int
20858main ()
20859{
20860setpgrp(0,0);
20861 ;
20862 return 0;
20863}
20864_ACEOF
20865rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020866if { (ac_try="$ac_compile"
20867case "(($ac_try" in
20868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20869 *) ac_try_echo=$ac_try;;
20870esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020872 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020874 grep -v '^ *+' conftest.er1 >conftest.err
20875 rm -f conftest.er1
20876 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020878 (exit $ac_status); } && {
20879 test -z "$ac_c_werror_flag" ||
20880 test ! -s conftest.err
20881 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020882
20883cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020884#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020885_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020886
Jack Jansen150753c2003-03-29 22:07:47 +000020887
20888else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020889 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020890sed 's/^/| /' conftest.$ac_ext >&5
20891
Martin v. Löwiseba40652007-08-30 20:10:57 +000020892
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020893fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020894
20895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020896
20897fi
20898done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020899
Martin v. Löwis11437992002-04-12 09:54:03 +000020900
Thomas Wouters3a584202000-08-05 23:28:51 +000020901for ac_func in gettimeofday
20902do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020903as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20904{ echo "$as_me:$LINENO: checking for $ac_func" >&5
20905echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020906if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020907 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020908else
Martin v. Löwis11437992002-04-12 09:54:03 +000020909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020910/* confdefs.h. */
20911_ACEOF
20912cat confdefs.h >>conftest.$ac_ext
20913cat >>conftest.$ac_ext <<_ACEOF
20914/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020915/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20916 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20917#define $ac_func innocuous_$ac_func
20918
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020919/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020920 which can conflict with char $ac_func (); below.
20921 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020922 <limits.h> exists even on freestanding compilers. */
20923
20924#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020925# include <limits.h>
20926#else
20927# include <assert.h>
20928#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020929
20930#undef $ac_func
20931
Martin v. Löwiseba40652007-08-30 20:10:57 +000020932/* Override any GCC internal prototype to avoid an error.
20933 Use char because int might match the return type of a GCC
20934 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020935#ifdef __cplusplus
20936extern "C"
20937#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020938char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020939/* The GNU C library defines this for functions which it implements
20940 to always fail with ENOSYS. Some functions are actually named
20941 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000020942#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020943choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020944#endif
20945
Skip Montanaro6dead952003-09-25 14:50:04 +000020946int
20947main ()
20948{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020949return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020950 ;
20951 return 0;
20952}
20953_ACEOF
20954rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020955if { (ac_try="$ac_link"
20956case "(($ac_try" in
20957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20958 *) ac_try_echo=$ac_try;;
20959esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020960eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020961 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020963 grep -v '^ *+' conftest.er1 >conftest.err
20964 rm -f conftest.er1
20965 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020966 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020967 (exit $ac_status); } && {
20968 test -z "$ac_c_werror_flag" ||
20969 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020970 } && test -s conftest$ac_exeext &&
20971 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020972 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020973else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020974 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020975sed 's/^/| /' conftest.$ac_ext >&5
20976
Martin v. Löwiseba40652007-08-30 20:10:57 +000020977 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020979
20980rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020981 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020982fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020983ac_res=`eval echo '${'$as_ac_var'}'`
20984 { echo "$as_me:$LINENO: result: $ac_res" >&5
20985echo "${ECHO_T}$ac_res" >&6; }
20986if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020987 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000020988#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020989_ACEOF
20990 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020991/* confdefs.h. */
20992_ACEOF
20993cat confdefs.h >>conftest.$ac_ext
20994cat >>conftest.$ac_ext <<_ACEOF
20995/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020996#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020997int
20998main ()
20999{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021000gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021001 ;
21002 return 0;
21003}
21004_ACEOF
21005rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021006if { (ac_try="$ac_compile"
21007case "(($ac_try" in
21008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21009 *) ac_try_echo=$ac_try;;
21010esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021011eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021014 grep -v '^ *+' conftest.er1 >conftest.err
21015 rm -f conftest.er1
21016 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021017 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021018 (exit $ac_status); } && {
21019 test -z "$ac_c_werror_flag" ||
21020 test ! -s conftest.err
21021 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000021022 :
21023else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021025sed 's/^/| /' conftest.$ac_ext >&5
21026
Martin v. Löwis11437992002-04-12 09:54:03 +000021027
21028cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021029#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021030_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021031
Martin v. Löwis11437992002-04-12 09:54:03 +000021032
Guido van Rossum627b2d71993-12-24 10:39:16 +000021033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021034
21035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021036
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021037fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021038done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021039
Michael W. Hudson54241132001-12-07 15:38:26 +000021040
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021041{ echo "$as_me:$LINENO: checking for major" >&5
21042echo $ECHO_N "checking for major... $ECHO_C" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021043cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021044/* confdefs.h. */
21045_ACEOF
21046cat confdefs.h >>conftest.$ac_ext
21047cat >>conftest.$ac_ext <<_ACEOF
21048/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021049
Neal Norwitz6eb37f02003-02-23 23:28:15 +000021050#if defined(MAJOR_IN_MKDEV)
21051#include <sys/mkdev.h>
21052#elif defined(MAJOR_IN_SYSMACROS)
21053#include <sys/sysmacros.h>
21054#else
21055#include <sys/types.h>
21056#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021057
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021058int
21059main ()
21060{
21061
21062 makedev(major(0),minor(0));
21063
21064 ;
21065 return 0;
21066}
21067_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000021068rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021069if { (ac_try="$ac_link"
21070case "(($ac_try" in
21071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21072 *) ac_try_echo=$ac_try;;
21073esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021075 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021076 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021077 grep -v '^ *+' conftest.er1 >conftest.err
21078 rm -f conftest.er1
21079 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021081 (exit $ac_status); } && {
21082 test -z "$ac_c_werror_flag" ||
21083 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021084 } && test -s conftest$ac_exeext &&
21085 $as_test_x conftest$ac_exeext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021086
21087
21088cat >>confdefs.h <<\_ACEOF
21089#define HAVE_DEVICE_MACROS 1
21090_ACEOF
21091
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021092 { echo "$as_me:$LINENO: result: yes" >&5
21093echo "${ECHO_T}yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021094
21095else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021096 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021097sed 's/^/| /' conftest.$ac_ext >&5
21098
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021099
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021100 { echo "$as_me:$LINENO: result: no" >&5
21101echo "${ECHO_T}no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000021102
21103fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021104
21105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021106 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021107
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021108# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000021109# for [no]getaddrinfo in netdb.h.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021110{ echo "$as_me:$LINENO: checking for getaddrinfo" >&5
21111echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021112cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021113/* confdefs.h. */
21114_ACEOF
21115cat confdefs.h >>conftest.$ac_ext
21116cat >>conftest.$ac_ext <<_ACEOF
21117/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021118
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021119#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021120#include <sys/socket.h>
21121#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000021122#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021123
Martin v. Löwis11437992002-04-12 09:54:03 +000021124int
21125main ()
21126{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021127getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000021128 ;
21129 return 0;
21130}
21131_ACEOF
21132rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021133if { (ac_try="$ac_link"
21134case "(($ac_try" in
21135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21136 *) ac_try_echo=$ac_try;;
21137esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021138eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021139 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021141 grep -v '^ *+' conftest.er1 >conftest.err
21142 rm -f conftest.er1
21143 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021144 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021145 (exit $ac_status); } && {
21146 test -z "$ac_c_werror_flag" ||
21147 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021148 } && test -s conftest$ac_exeext &&
21149 $as_test_x conftest$ac_exeext; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021150 have_getaddrinfo=yes
21151else
21152 echo "$as_me: failed program was:" >&5
21153sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021154
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021155 have_getaddrinfo=no
21156fi
21157
21158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
21159 conftest$ac_exeext conftest.$ac_ext
21160{ echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
21161echo "${ECHO_T}$have_getaddrinfo" >&6; }
21162if test $have_getaddrinfo = yes
21163then
21164 { echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021165echo $ECHO_N "checking getaddrinfo bug... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021166 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
21167 echo $ECHO_N "(cached) $ECHO_C" >&6
21168else
21169 if test "$cross_compiling" = yes; then
21170 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021171else
Martin v. Löwis11437992002-04-12 09:54:03 +000021172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021173/* confdefs.h. */
21174_ACEOF
21175cat confdefs.h >>conftest.$ac_ext
21176cat >>conftest.$ac_ext <<_ACEOF
21177/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021178
21179#include <sys/types.h>
21180#include <netdb.h>
21181#include <string.h>
21182#include <sys/socket.h>
21183#include <netinet/in.h>
21184
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021185int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021186{
21187 int passive, gaierr, inet4 = 0, inet6 = 0;
21188 struct addrinfo hints, *ai, *aitop;
21189 char straddr[INET6_ADDRSTRLEN], strport[16];
21190
21191 for (passive = 0; passive <= 1; passive++) {
21192 memset(&hints, 0, sizeof(hints));
21193 hints.ai_family = AF_UNSPEC;
21194 hints.ai_flags = passive ? AI_PASSIVE : 0;
21195 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000021196 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021197 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21198 (void)gai_strerror(gaierr);
21199 goto bad;
21200 }
21201 for (ai = aitop; ai; ai = ai->ai_next) {
21202 if (ai->ai_addr == NULL ||
21203 ai->ai_addrlen == 0 ||
21204 getnameinfo(ai->ai_addr, ai->ai_addrlen,
21205 straddr, sizeof(straddr), strport, sizeof(strport),
21206 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21207 goto bad;
21208 }
21209 switch (ai->ai_family) {
21210 case AF_INET:
21211 if (strcmp(strport, "54321") != 0) {
21212 goto bad;
21213 }
21214 if (passive) {
21215 if (strcmp(straddr, "0.0.0.0") != 0) {
21216 goto bad;
21217 }
21218 } else {
21219 if (strcmp(straddr, "127.0.0.1") != 0) {
21220 goto bad;
21221 }
21222 }
21223 inet4++;
21224 break;
21225 case AF_INET6:
21226 if (strcmp(strport, "54321") != 0) {
21227 goto bad;
21228 }
21229 if (passive) {
21230 if (strcmp(straddr, "::") != 0) {
21231 goto bad;
21232 }
21233 } else {
21234 if (strcmp(straddr, "::1") != 0) {
21235 goto bad;
21236 }
21237 }
21238 inet6++;
21239 break;
21240 case AF_UNSPEC:
21241 goto bad;
21242 break;
21243 default:
21244 /* another family support? */
21245 break;
21246 }
21247 }
21248 }
21249
21250 if (!(inet4 == 0 || inet4 == 2))
21251 goto bad;
21252 if (!(inet6 == 0 || inet6 == 2))
21253 goto bad;
21254
21255 if (aitop)
21256 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021257 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021258
21259 bad:
21260 if (aitop)
21261 freeaddrinfo(aitop);
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021262 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021263}
21264
Martin v. Löwis11437992002-04-12 09:54:03 +000021265_ACEOF
21266rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021267if { (ac_try="$ac_link"
21268case "(($ac_try" in
21269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21270 *) ac_try_echo=$ac_try;;
21271esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021272eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021273 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021274 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021275 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021276 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000021277 { (case "(($ac_try" in
21278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21279 *) ac_try_echo=$ac_try;;
21280esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021281eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021282 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021283 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021284 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000021285 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021286 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021287else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021288 echo "$as_me: program exited with status $ac_status" >&5
21289echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021290sed 's/^/| /' conftest.$ac_ext >&5
21291
Martin v. Löwis11437992002-04-12 09:54:03 +000021292( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021293ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021294fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021295rm -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 +000021296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021297
21298
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021299fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021300
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021301fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021302
Mark Dickinson0ef0b912009-12-31 21:11:48 +000021303if test $have_getaddrinfo = no -o "$ac_cv_buggy_getaddrinfo" = yes
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000021304then
21305 if test $ipv6 = yes
21306 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021307 echo 'Fatal: You must get working getaddrinfo() function.'
21308 echo ' or you can specify "--disable-ipv6"'.
21309 exit 1
21310 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021311else
Martin v. Löwis11437992002-04-12 09:54:03 +000021312
21313cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021314#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021315_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000021316
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021317fi
Martin v. Löwis11437992002-04-12 09:54:03 +000021318
Jack Jansen9a66b6d2001-08-08 13:56:14 +000021319for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021320do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021321as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
21322{ echo "$as_me:$LINENO: checking for $ac_func" >&5
21323echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021324if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021325 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021326else
Martin v. Löwis11437992002-04-12 09:54:03 +000021327 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021328/* confdefs.h. */
21329_ACEOF
21330cat confdefs.h >>conftest.$ac_ext
21331cat >>conftest.$ac_ext <<_ACEOF
21332/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021333/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21334 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21335#define $ac_func innocuous_$ac_func
21336
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021337/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021338 which can conflict with char $ac_func (); below.
21339 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021340 <limits.h> exists even on freestanding compilers. */
21341
21342#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021343# include <limits.h>
21344#else
21345# include <assert.h>
21346#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021347
21348#undef $ac_func
21349
Martin v. Löwiseba40652007-08-30 20:10:57 +000021350/* Override any GCC internal prototype to avoid an error.
21351 Use char because int might match the return type of a GCC
21352 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021353#ifdef __cplusplus
21354extern "C"
21355#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021356char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021357/* The GNU C library defines this for functions which it implements
21358 to always fail with ENOSYS. Some functions are actually named
21359 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021360#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021361choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021362#endif
21363
Skip Montanaro6dead952003-09-25 14:50:04 +000021364int
21365main ()
21366{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021367return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021368 ;
21369 return 0;
21370}
21371_ACEOF
21372rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021373if { (ac_try="$ac_link"
21374case "(($ac_try" in
21375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21376 *) ac_try_echo=$ac_try;;
21377esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021378eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021379 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021380 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021381 grep -v '^ *+' conftest.er1 >conftest.err
21382 rm -f conftest.er1
21383 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021384 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021385 (exit $ac_status); } && {
21386 test -z "$ac_c_werror_flag" ||
21387 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021388 } && test -s conftest$ac_exeext &&
21389 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021390 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021391else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021392 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021393sed 's/^/| /' conftest.$ac_ext >&5
21394
Martin v. Löwiseba40652007-08-30 20:10:57 +000021395 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021397
21398rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021399 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021400fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021401ac_res=`eval echo '${'$as_ac_var'}'`
21402 { echo "$as_me:$LINENO: result: $ac_res" >&5
21403echo "${ECHO_T}$ac_res" >&6; }
21404if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021405 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021406#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021407_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021408
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021409fi
21410done
21411
Michael W. Hudson54241132001-12-07 15:38:26 +000021412
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021413# checks for structures
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021414{ echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
21415echo $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 +000021416if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021417 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021418else
Martin v. Löwis11437992002-04-12 09:54:03 +000021419 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021420/* confdefs.h. */
21421_ACEOF
21422cat confdefs.h >>conftest.$ac_ext
21423cat >>conftest.$ac_ext <<_ACEOF
21424/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021425#include <sys/types.h>
21426#include <sys/time.h>
21427#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021428
Martin v. Löwis11437992002-04-12 09:54:03 +000021429int
21430main ()
21431{
21432if ((struct tm *) 0)
21433return 0;
21434 ;
21435 return 0;
21436}
21437_ACEOF
21438rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021439if { (ac_try="$ac_compile"
21440case "(($ac_try" in
21441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21442 *) ac_try_echo=$ac_try;;
21443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021445 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021447 grep -v '^ *+' conftest.er1 >conftest.err
21448 rm -f conftest.er1
21449 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021450 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021451 (exit $ac_status); } && {
21452 test -z "$ac_c_werror_flag" ||
21453 test ! -s conftest.err
21454 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021455 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021456else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021457 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021458sed 's/^/| /' conftest.$ac_ext >&5
21459
Martin v. Löwiseba40652007-08-30 20:10:57 +000021460 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021461fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021462
21463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021464fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021465{ echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
21466echo "${ECHO_T}$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021467if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021468
21469cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021470#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021471_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021472
21473fi
21474
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021475{ echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
21476echo $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 +000021477if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021478 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021479else
Martin v. Löwis11437992002-04-12 09:54:03 +000021480 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021481/* confdefs.h. */
21482_ACEOF
21483cat confdefs.h >>conftest.$ac_ext
21484cat >>conftest.$ac_ext <<_ACEOF
21485/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021486#include <sys/types.h>
21487#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021488
Martin v. Löwis11437992002-04-12 09:54:03 +000021489int
21490main ()
21491{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021492struct tm tm;
21493 int *p = &tm.tm_sec;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021494 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000021495 ;
21496 return 0;
21497}
21498_ACEOF
21499rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021500if { (ac_try="$ac_compile"
21501case "(($ac_try" in
21502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21503 *) ac_try_echo=$ac_try;;
21504esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021508 grep -v '^ *+' conftest.er1 >conftest.err
21509 rm -f conftest.er1
21510 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021512 (exit $ac_status); } && {
21513 test -z "$ac_c_werror_flag" ||
21514 test ! -s conftest.err
21515 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021516 ac_cv_struct_tm=time.h
21517else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021518 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021519sed 's/^/| /' conftest.$ac_ext >&5
21520
Martin v. Löwiseba40652007-08-30 20:10:57 +000021521 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021522fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021523
21524rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021525fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021526{ echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
21527echo "${ECHO_T}$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021528if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021529
21530cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021531#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021532_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021533
21534fi
21535
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021536{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
21537echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021538if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021539 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021540else
Martin v. Löwis11437992002-04-12 09:54:03 +000021541 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021542/* confdefs.h. */
21543_ACEOF
21544cat confdefs.h >>conftest.$ac_ext
21545cat >>conftest.$ac_ext <<_ACEOF
21546/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021547#include <sys/types.h>
21548#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000021549
21550
Martin v. Löwis11437992002-04-12 09:54:03 +000021551int
21552main ()
21553{
21554static struct tm ac_aggr;
21555if (ac_aggr.tm_zone)
21556return 0;
21557 ;
21558 return 0;
21559}
21560_ACEOF
21561rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021562if { (ac_try="$ac_compile"
21563case "(($ac_try" in
21564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21565 *) ac_try_echo=$ac_try;;
21566esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021567eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021570 grep -v '^ *+' conftest.er1 >conftest.err
21571 rm -f conftest.er1
21572 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021573 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021574 (exit $ac_status); } && {
21575 test -z "$ac_c_werror_flag" ||
21576 test ! -s conftest.err
21577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021578 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021579else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021580 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021581sed 's/^/| /' conftest.$ac_ext >&5
21582
Martin v. Löwiseba40652007-08-30 20:10:57 +000021583 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021584/* confdefs.h. */
21585_ACEOF
21586cat confdefs.h >>conftest.$ac_ext
21587cat >>conftest.$ac_ext <<_ACEOF
21588/* end confdefs.h. */
21589#include <sys/types.h>
21590#include <$ac_cv_struct_tm>
21591
21592
21593int
21594main ()
21595{
21596static struct tm ac_aggr;
21597if (sizeof ac_aggr.tm_zone)
21598return 0;
21599 ;
21600 return 0;
21601}
21602_ACEOF
21603rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021604if { (ac_try="$ac_compile"
21605case "(($ac_try" in
21606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21607 *) ac_try_echo=$ac_try;;
21608esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021609eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021610 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021612 grep -v '^ *+' conftest.er1 >conftest.err
21613 rm -f conftest.er1
21614 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021615 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021616 (exit $ac_status); } && {
21617 test -z "$ac_c_werror_flag" ||
21618 test ! -s conftest.err
21619 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021620 ac_cv_member_struct_tm_tm_zone=yes
21621else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021622 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021623sed 's/^/| /' conftest.$ac_ext >&5
21624
Martin v. Löwiseba40652007-08-30 20:10:57 +000021625 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021626fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021627
21628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021629fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021630
21631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021632fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021633{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21634echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
21635if test $ac_cv_member_struct_tm_tm_zone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021636
21637cat >>confdefs.h <<_ACEOF
21638#define HAVE_STRUCT_TM_TM_ZONE 1
21639_ACEOF
21640
21641
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021642fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021643
Martin v. Löwis11437992002-04-12 09:54:03 +000021644if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21645
21646cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021647#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021648_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021649
21650else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021651 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21652echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021653if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021654 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000021655else
21656 cat >conftest.$ac_ext <<_ACEOF
21657/* confdefs.h. */
21658_ACEOF
21659cat confdefs.h >>conftest.$ac_ext
21660cat >>conftest.$ac_ext <<_ACEOF
21661/* end confdefs.h. */
21662#include <time.h>
21663
21664int
21665main ()
21666{
21667#ifndef tzname
21668 (void) tzname;
21669#endif
21670
21671 ;
21672 return 0;
21673}
21674_ACEOF
21675rm -f conftest.$ac_objext
21676if { (ac_try="$ac_compile"
21677case "(($ac_try" in
21678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21679 *) ac_try_echo=$ac_try;;
21680esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021682 (eval "$ac_compile") 2>conftest.er1
21683 ac_status=$?
21684 grep -v '^ *+' conftest.er1 >conftest.err
21685 rm -f conftest.er1
21686 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021687 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021688 (exit $ac_status); } && {
21689 test -z "$ac_c_werror_flag" ||
21690 test ! -s conftest.err
21691 } && test -s conftest.$ac_objext; then
21692 ac_cv_have_decl_tzname=yes
21693else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021694 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021695sed 's/^/| /' conftest.$ac_ext >&5
21696
21697 ac_cv_have_decl_tzname=no
21698fi
21699
21700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21701fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021702{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21703echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
21704if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000021705
21706cat >>confdefs.h <<_ACEOF
21707#define HAVE_DECL_TZNAME 1
21708_ACEOF
21709
21710
21711else
21712 cat >>confdefs.h <<_ACEOF
21713#define HAVE_DECL_TZNAME 0
21714_ACEOF
21715
21716
21717fi
21718
21719
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021720 { echo "$as_me:$LINENO: checking for tzname" >&5
21721echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021722if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021723 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021724else
Martin v. Löwis11437992002-04-12 09:54:03 +000021725 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021726/* confdefs.h. */
21727_ACEOF
21728cat confdefs.h >>conftest.$ac_ext
21729cat >>conftest.$ac_ext <<_ACEOF
21730/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021731#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000021732#if !HAVE_DECL_TZNAME
21733extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021735
Martin v. Löwis11437992002-04-12 09:54:03 +000021736int
21737main ()
21738{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021739return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021740 ;
21741 return 0;
21742}
21743_ACEOF
21744rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021745if { (ac_try="$ac_link"
21746case "(($ac_try" in
21747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21748 *) ac_try_echo=$ac_try;;
21749esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021750eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021751 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021753 grep -v '^ *+' conftest.er1 >conftest.err
21754 rm -f conftest.er1
21755 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021756 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021757 (exit $ac_status); } && {
21758 test -z "$ac_c_werror_flag" ||
21759 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021760 } && test -s conftest$ac_exeext &&
21761 $as_test_x conftest$ac_exeext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021762 ac_cv_var_tzname=yes
21763else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021764 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021765sed 's/^/| /' conftest.$ac_ext >&5
21766
Martin v. Löwiseba40652007-08-30 20:10:57 +000021767 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021768fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021769
21770rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021771 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021772fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021773{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21774echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021775 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021776
21777cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021778#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021779_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021780
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021781 fi
21782fi
21783
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021784{ echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21785echo $ECHO_N "checking for struct stat.st_rdev... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021786if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021787 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021788else
21789 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021790/* confdefs.h. */
21791_ACEOF
21792cat confdefs.h >>conftest.$ac_ext
21793cat >>conftest.$ac_ext <<_ACEOF
21794/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021795$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021796int
21797main ()
21798{
21799static struct stat ac_aggr;
21800if (ac_aggr.st_rdev)
21801return 0;
21802 ;
21803 return 0;
21804}
21805_ACEOF
21806rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021807if { (ac_try="$ac_compile"
21808case "(($ac_try" in
21809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21810 *) ac_try_echo=$ac_try;;
21811esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021812eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021813 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021815 grep -v '^ *+' conftest.er1 >conftest.err
21816 rm -f conftest.er1
21817 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021818 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021819 (exit $ac_status); } && {
21820 test -z "$ac_c_werror_flag" ||
21821 test ! -s conftest.err
21822 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021823 ac_cv_member_struct_stat_st_rdev=yes
21824else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021825 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021826sed 's/^/| /' conftest.$ac_ext >&5
21827
Martin v. Löwiseba40652007-08-30 20:10:57 +000021828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021829/* confdefs.h. */
21830_ACEOF
21831cat confdefs.h >>conftest.$ac_ext
21832cat >>conftest.$ac_ext <<_ACEOF
21833/* end confdefs.h. */
21834$ac_includes_default
21835int
21836main ()
21837{
21838static struct stat ac_aggr;
21839if (sizeof ac_aggr.st_rdev)
21840return 0;
21841 ;
21842 return 0;
21843}
21844_ACEOF
21845rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021846if { (ac_try="$ac_compile"
21847case "(($ac_try" in
21848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21849 *) ac_try_echo=$ac_try;;
21850esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021851eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021852 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021853 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021854 grep -v '^ *+' conftest.er1 >conftest.err
21855 rm -f conftest.er1
21856 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021857 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021858 (exit $ac_status); } && {
21859 test -z "$ac_c_werror_flag" ||
21860 test ! -s conftest.err
21861 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021862 ac_cv_member_struct_stat_st_rdev=yes
21863else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021864 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021865sed 's/^/| /' conftest.$ac_ext >&5
21866
Martin v. Löwiseba40652007-08-30 20:10:57 +000021867 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021868fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021869
21870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021871fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021872
21873rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021874fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021875{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21876echo "${ECHO_T}$ac_cv_member_struct_stat_st_rdev" >&6; }
21877if test $ac_cv_member_struct_stat_st_rdev = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021878
21879cat >>confdefs.h <<_ACEOF
21880#define HAVE_STRUCT_STAT_ST_RDEV 1
21881_ACEOF
21882
21883
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021884fi
21885
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021886{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21887echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021888if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021889 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021890else
Martin v. Löwis11437992002-04-12 09:54:03 +000021891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021892/* confdefs.h. */
21893_ACEOF
21894cat confdefs.h >>conftest.$ac_ext
21895cat >>conftest.$ac_ext <<_ACEOF
21896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021897$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021898int
21899main ()
21900{
21901static struct stat ac_aggr;
21902if (ac_aggr.st_blksize)
21903return 0;
21904 ;
21905 return 0;
21906}
21907_ACEOF
21908rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021909if { (ac_try="$ac_compile"
21910case "(($ac_try" in
21911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21912 *) ac_try_echo=$ac_try;;
21913esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021914eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021915 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021916 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021917 grep -v '^ *+' conftest.er1 >conftest.err
21918 rm -f conftest.er1
21919 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021920 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021921 (exit $ac_status); } && {
21922 test -z "$ac_c_werror_flag" ||
21923 test ! -s conftest.err
21924 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021925 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021926else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021927 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021928sed 's/^/| /' conftest.$ac_ext >&5
21929
Martin v. Löwiseba40652007-08-30 20:10:57 +000021930 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021931/* confdefs.h. */
21932_ACEOF
21933cat confdefs.h >>conftest.$ac_ext
21934cat >>conftest.$ac_ext <<_ACEOF
21935/* end confdefs.h. */
21936$ac_includes_default
21937int
21938main ()
21939{
21940static struct stat ac_aggr;
21941if (sizeof ac_aggr.st_blksize)
21942return 0;
21943 ;
21944 return 0;
21945}
21946_ACEOF
21947rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021948if { (ac_try="$ac_compile"
21949case "(($ac_try" in
21950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21951 *) ac_try_echo=$ac_try;;
21952esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021953eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021954 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021955 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021956 grep -v '^ *+' conftest.er1 >conftest.err
21957 rm -f conftest.er1
21958 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021959 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021960 (exit $ac_status); } && {
21961 test -z "$ac_c_werror_flag" ||
21962 test ! -s conftest.err
21963 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021964 ac_cv_member_struct_stat_st_blksize=yes
21965else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021966 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021967sed 's/^/| /' conftest.$ac_ext >&5
21968
Martin v. Löwiseba40652007-08-30 20:10:57 +000021969 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021970fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021971
21972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021973fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021974
21975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021976fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021977{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21978echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
21979if test $ac_cv_member_struct_stat_st_blksize = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021980
Martin v. Löwis11437992002-04-12 09:54:03 +000021981cat >>confdefs.h <<_ACEOF
21982#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21983_ACEOF
21984
21985
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021986fi
21987
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021988{ echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21989echo $ECHO_N "checking for struct stat.st_flags... $ECHO_C" >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021990if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000021991 echo $ECHO_N "(cached) $ECHO_C" >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021992else
21993 cat >conftest.$ac_ext <<_ACEOF
21994/* confdefs.h. */
21995_ACEOF
21996cat confdefs.h >>conftest.$ac_ext
21997cat >>conftest.$ac_ext <<_ACEOF
21998/* end confdefs.h. */
21999$ac_includes_default
22000int
22001main ()
22002{
22003static struct stat ac_aggr;
22004if (ac_aggr.st_flags)
22005return 0;
22006 ;
22007 return 0;
22008}
22009_ACEOF
22010rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022011if { (ac_try="$ac_compile"
22012case "(($ac_try" in
22013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22014 *) ac_try_echo=$ac_try;;
22015esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022016eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022017 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022018 ac_status=$?
22019 grep -v '^ *+' conftest.er1 >conftest.err
22020 rm -f conftest.er1
22021 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022022 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022023 (exit $ac_status); } && {
22024 test -z "$ac_c_werror_flag" ||
22025 test ! -s conftest.err
22026 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022027 ac_cv_member_struct_stat_st_flags=yes
22028else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022029 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022030sed 's/^/| /' conftest.$ac_ext >&5
22031
Martin v. Löwiseba40652007-08-30 20:10:57 +000022032 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022033/* confdefs.h. */
22034_ACEOF
22035cat confdefs.h >>conftest.$ac_ext
22036cat >>conftest.$ac_ext <<_ACEOF
22037/* end confdefs.h. */
22038$ac_includes_default
22039int
22040main ()
22041{
22042static struct stat ac_aggr;
22043if (sizeof ac_aggr.st_flags)
22044return 0;
22045 ;
22046 return 0;
22047}
22048_ACEOF
22049rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022050if { (ac_try="$ac_compile"
22051case "(($ac_try" in
22052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22053 *) ac_try_echo=$ac_try;;
22054esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022055eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022056 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022057 ac_status=$?
22058 grep -v '^ *+' conftest.er1 >conftest.err
22059 rm -f conftest.er1
22060 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022061 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022062 (exit $ac_status); } && {
22063 test -z "$ac_c_werror_flag" ||
22064 test ! -s conftest.err
22065 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022066 ac_cv_member_struct_stat_st_flags=yes
22067else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022068 echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022069sed 's/^/| /' conftest.$ac_ext >&5
22070
Martin v. Löwiseba40652007-08-30 20:10:57 +000022071 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022072fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022073
22074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022075fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022076
22077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022078fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022079{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
22080echo "${ECHO_T}$ac_cv_member_struct_stat_st_flags" >&6; }
22081if test $ac_cv_member_struct_stat_st_flags = yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000022082
22083cat >>confdefs.h <<_ACEOF
22084#define HAVE_STRUCT_STAT_ST_FLAGS 1
22085_ACEOF
22086
22087
22088fi
22089
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022090{ echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
22091echo $ECHO_N "checking for struct stat.st_gen... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022092if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022093 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022094else
22095 cat >conftest.$ac_ext <<_ACEOF
22096/* confdefs.h. */
22097_ACEOF
22098cat confdefs.h >>conftest.$ac_ext
22099cat >>conftest.$ac_ext <<_ACEOF
22100/* end confdefs.h. */
22101$ac_includes_default
22102int
22103main ()
22104{
22105static struct stat ac_aggr;
22106if (ac_aggr.st_gen)
22107return 0;
22108 ;
22109 return 0;
22110}
22111_ACEOF
22112rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022113if { (ac_try="$ac_compile"
22114case "(($ac_try" in
22115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22116 *) ac_try_echo=$ac_try;;
22117esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022119 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022120 ac_status=$?
22121 grep -v '^ *+' conftest.er1 >conftest.err
22122 rm -f conftest.er1
22123 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022125 (exit $ac_status); } && {
22126 test -z "$ac_c_werror_flag" ||
22127 test ! -s conftest.err
22128 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022129 ac_cv_member_struct_stat_st_gen=yes
22130else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022131 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022132sed 's/^/| /' conftest.$ac_ext >&5
22133
Martin v. Löwiseba40652007-08-30 20:10:57 +000022134 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022135/* confdefs.h. */
22136_ACEOF
22137cat confdefs.h >>conftest.$ac_ext
22138cat >>conftest.$ac_ext <<_ACEOF
22139/* end confdefs.h. */
22140$ac_includes_default
22141int
22142main ()
22143{
22144static struct stat ac_aggr;
22145if (sizeof ac_aggr.st_gen)
22146return 0;
22147 ;
22148 return 0;
22149}
22150_ACEOF
22151rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022152if { (ac_try="$ac_compile"
22153case "(($ac_try" in
22154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22155 *) ac_try_echo=$ac_try;;
22156esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022157eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022158 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022159 ac_status=$?
22160 grep -v '^ *+' conftest.er1 >conftest.err
22161 rm -f conftest.er1
22162 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022163 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022164 (exit $ac_status); } && {
22165 test -z "$ac_c_werror_flag" ||
22166 test ! -s conftest.err
22167 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022168 ac_cv_member_struct_stat_st_gen=yes
22169else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022170 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022171sed 's/^/| /' conftest.$ac_ext >&5
22172
Martin v. Löwiseba40652007-08-30 20:10:57 +000022173 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022174fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022175
22176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022177fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022178
22179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022180fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022181{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
22182echo "${ECHO_T}$ac_cv_member_struct_stat_st_gen" >&6; }
22183if test $ac_cv_member_struct_stat_st_gen = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022184
22185cat >>confdefs.h <<_ACEOF
22186#define HAVE_STRUCT_STAT_ST_GEN 1
22187_ACEOF
22188
22189
22190fi
22191
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022192{ echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
22193echo $ECHO_N "checking for struct stat.st_birthtime... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022194if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022195 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022196else
22197 cat >conftest.$ac_ext <<_ACEOF
22198/* confdefs.h. */
22199_ACEOF
22200cat confdefs.h >>conftest.$ac_ext
22201cat >>conftest.$ac_ext <<_ACEOF
22202/* end confdefs.h. */
22203$ac_includes_default
22204int
22205main ()
22206{
22207static struct stat ac_aggr;
22208if (ac_aggr.st_birthtime)
22209return 0;
22210 ;
22211 return 0;
22212}
22213_ACEOF
22214rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022215if { (ac_try="$ac_compile"
22216case "(($ac_try" in
22217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22218 *) ac_try_echo=$ac_try;;
22219esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022220eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022222 ac_status=$?
22223 grep -v '^ *+' conftest.er1 >conftest.err
22224 rm -f conftest.er1
22225 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022226 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022227 (exit $ac_status); } && {
22228 test -z "$ac_c_werror_flag" ||
22229 test ! -s conftest.err
22230 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022231 ac_cv_member_struct_stat_st_birthtime=yes
22232else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022233 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022234sed 's/^/| /' conftest.$ac_ext >&5
22235
Martin v. Löwiseba40652007-08-30 20:10:57 +000022236 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022237/* confdefs.h. */
22238_ACEOF
22239cat confdefs.h >>conftest.$ac_ext
22240cat >>conftest.$ac_ext <<_ACEOF
22241/* end confdefs.h. */
22242$ac_includes_default
22243int
22244main ()
22245{
22246static struct stat ac_aggr;
22247if (sizeof ac_aggr.st_birthtime)
22248return 0;
22249 ;
22250 return 0;
22251}
22252_ACEOF
22253rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022254if { (ac_try="$ac_compile"
22255case "(($ac_try" in
22256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22257 *) ac_try_echo=$ac_try;;
22258esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022259eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022260 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022261 ac_status=$?
22262 grep -v '^ *+' conftest.er1 >conftest.err
22263 rm -f conftest.er1
22264 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022265 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022266 (exit $ac_status); } && {
22267 test -z "$ac_c_werror_flag" ||
22268 test ! -s conftest.err
22269 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022270 ac_cv_member_struct_stat_st_birthtime=yes
22271else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022272 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022273sed 's/^/| /' conftest.$ac_ext >&5
22274
Martin v. Löwiseba40652007-08-30 20:10:57 +000022275 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022277
22278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022279fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022280
22281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022282fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022283{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
22284echo "${ECHO_T}$ac_cv_member_struct_stat_st_birthtime" >&6; }
22285if test $ac_cv_member_struct_stat_st_birthtime = yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000022286
22287cat >>confdefs.h <<_ACEOF
22288#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
22289_ACEOF
22290
22291
22292fi
22293
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022294{ echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
22295echo $ECHO_N "checking for struct stat.st_blocks... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022296if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022297 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022298else
Martin v. Löwis11437992002-04-12 09:54:03 +000022299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022300/* confdefs.h. */
22301_ACEOF
22302cat confdefs.h >>conftest.$ac_ext
22303cat >>conftest.$ac_ext <<_ACEOF
22304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022305$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022306int
22307main ()
22308{
22309static struct stat ac_aggr;
22310if (ac_aggr.st_blocks)
22311return 0;
22312 ;
22313 return 0;
22314}
22315_ACEOF
22316rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022317if { (ac_try="$ac_compile"
22318case "(($ac_try" in
22319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22320 *) ac_try_echo=$ac_try;;
22321esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022323 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022324 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022325 grep -v '^ *+' conftest.er1 >conftest.err
22326 rm -f conftest.er1
22327 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022329 (exit $ac_status); } && {
22330 test -z "$ac_c_werror_flag" ||
22331 test ! -s conftest.err
22332 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022333 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000022334else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022335 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022336sed 's/^/| /' conftest.$ac_ext >&5
22337
Martin v. Löwiseba40652007-08-30 20:10:57 +000022338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022339/* confdefs.h. */
22340_ACEOF
22341cat confdefs.h >>conftest.$ac_ext
22342cat >>conftest.$ac_ext <<_ACEOF
22343/* end confdefs.h. */
22344$ac_includes_default
22345int
22346main ()
22347{
22348static struct stat ac_aggr;
22349if (sizeof ac_aggr.st_blocks)
22350return 0;
22351 ;
22352 return 0;
22353}
22354_ACEOF
22355rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022356if { (ac_try="$ac_compile"
22357case "(($ac_try" in
22358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22359 *) ac_try_echo=$ac_try;;
22360esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022361eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022362 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000022363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022364 grep -v '^ *+' conftest.er1 >conftest.err
22365 rm -f conftest.er1
22366 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022367 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022368 (exit $ac_status); } && {
22369 test -z "$ac_c_werror_flag" ||
22370 test ! -s conftest.err
22371 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000022372 ac_cv_member_struct_stat_st_blocks=yes
22373else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022374 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022375sed 's/^/| /' conftest.$ac_ext >&5
22376
Martin v. Löwiseba40652007-08-30 20:10:57 +000022377 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000022378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022379
22380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022381fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022382
22383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000022384fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022385{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
22386echo "${ECHO_T}$ac_cv_member_struct_stat_st_blocks" >&6; }
22387if test $ac_cv_member_struct_stat_st_blocks = yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000022388
Martin v. Löwis11437992002-04-12 09:54:03 +000022389cat >>confdefs.h <<_ACEOF
22390#define HAVE_STRUCT_STAT_ST_BLOCKS 1
22391_ACEOF
22392
22393
22394cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022395#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022396_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022397
22398else
Martin v. Löwiseba40652007-08-30 20:10:57 +000022399 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000022400 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022401 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
22402 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022403esac
22404
Guido van Rossum98bf58f2001-10-18 20:34:25 +000022405fi
22406
Michael W. Hudson54241132001-12-07 15:38:26 +000022407
Martin v. Löwis11437992002-04-12 09:54:03 +000022408
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022409{ echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
22410echo $ECHO_N "checking for time.h that defines altzone... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022411if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022412 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022413else
Martin v. Löwis11437992002-04-12 09:54:03 +000022414 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022415/* confdefs.h. */
22416_ACEOF
22417cat confdefs.h >>conftest.$ac_ext
22418cat >>conftest.$ac_ext <<_ACEOF
22419/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022420#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022421int
22422main ()
22423{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022424return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000022425 ;
22426 return 0;
22427}
22428_ACEOF
22429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022430if { (ac_try="$ac_compile"
22431case "(($ac_try" in
22432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22433 *) ac_try_echo=$ac_try;;
22434esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022436 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022438 grep -v '^ *+' conftest.er1 >conftest.err
22439 rm -f conftest.er1
22440 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022442 (exit $ac_status); } && {
22443 test -z "$ac_c_werror_flag" ||
22444 test ! -s conftest.err
22445 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022446 ac_cv_header_time_altzone=yes
22447else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022448 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022449sed 's/^/| /' conftest.$ac_ext >&5
22450
Martin v. Löwiseba40652007-08-30 20:10:57 +000022451 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022452fi
22453
Martin v. Löwiseba40652007-08-30 20:10:57 +000022454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22455fi
22456
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022457{ echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
22458echo "${ECHO_T}$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022459if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022460
22461cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022462#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022463_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022464
22465fi
22466
Guido van Rossumda88dad1995-01-26 00:46:29 +000022467was_it_defined=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022468{ echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
22469echo $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 +000022470cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022471/* confdefs.h. */
22472_ACEOF
22473cat confdefs.h >>conftest.$ac_ext
22474cat >>conftest.$ac_ext <<_ACEOF
22475/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022476
22477#include <sys/types.h>
22478#include <sys/select.h>
22479#include <sys/time.h>
22480
Martin v. Löwis11437992002-04-12 09:54:03 +000022481int
22482main ()
22483{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022484;
Martin v. Löwis11437992002-04-12 09:54:03 +000022485 ;
22486 return 0;
22487}
22488_ACEOF
22489rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022490if { (ac_try="$ac_compile"
22491case "(($ac_try" in
22492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22493 *) ac_try_echo=$ac_try;;
22494esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022495eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022496 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022497 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022498 grep -v '^ *+' conftest.er1 >conftest.err
22499 rm -f conftest.er1
22500 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022501 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022502 (exit $ac_status); } && {
22503 test -z "$ac_c_werror_flag" ||
22504 test ! -s conftest.err
22505 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022506
22507
22508cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022509#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022510_ACEOF
22511
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022512 was_it_defined=yes
22513
Guido van Rossumf78abae1997-01-21 22:02:36 +000022514else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022515 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022516sed 's/^/| /' conftest.$ac_ext >&5
22517
Brett Cannon19fab762007-06-02 03:02:29 +000022518
Martin v. Löwiseba40652007-08-30 20:10:57 +000022519fi
22520
22521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022522{ echo "$as_me:$LINENO: result: $was_it_defined" >&5
22523echo "${ECHO_T}$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022524
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022525{ echo "$as_me:$LINENO: checking for addrinfo" >&5
22526echo $ECHO_N "checking for addrinfo... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022527if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022528 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022529else
Martin v. Löwis11437992002-04-12 09:54:03 +000022530 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022531/* confdefs.h. */
22532_ACEOF
22533cat confdefs.h >>conftest.$ac_ext
22534cat >>conftest.$ac_ext <<_ACEOF
22535/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022536
22537# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022538int
22539main ()
22540{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022541struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000022542 ;
22543 return 0;
22544}
22545_ACEOF
22546rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022547if { (ac_try="$ac_compile"
22548case "(($ac_try" in
22549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22550 *) ac_try_echo=$ac_try;;
22551esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022554 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022555 grep -v '^ *+' conftest.er1 >conftest.err
22556 rm -f conftest.er1
22557 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022559 (exit $ac_status); } && {
22560 test -z "$ac_c_werror_flag" ||
22561 test ! -s conftest.err
22562 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022563 ac_cv_struct_addrinfo=yes
22564else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022565 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022566sed 's/^/| /' conftest.$ac_ext >&5
22567
Martin v. Löwiseba40652007-08-30 20:10:57 +000022568 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022569fi
22570
Martin v. Löwiseba40652007-08-30 20:10:57 +000022571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22572fi
22573
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022574{ echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
22575echo "${ECHO_T}$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022576if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022577
22578cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022579#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022580_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022581
22582fi
22583
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022584{ echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
22585echo $ECHO_N "checking for sockaddr_storage... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022586if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022587 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022588else
Martin v. Löwis11437992002-04-12 09:54:03 +000022589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022590/* confdefs.h. */
22591_ACEOF
22592cat confdefs.h >>conftest.$ac_ext
22593cat >>conftest.$ac_ext <<_ACEOF
22594/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022595
22596# include <sys/types.h>
22597# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022598int
22599main ()
22600{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022601struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022602 ;
22603 return 0;
22604}
22605_ACEOF
22606rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022607if { (ac_try="$ac_compile"
22608case "(($ac_try" in
22609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22610 *) ac_try_echo=$ac_try;;
22611esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022612eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022615 grep -v '^ *+' conftest.er1 >conftest.err
22616 rm -f conftest.er1
22617 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022618 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022619 (exit $ac_status); } && {
22620 test -z "$ac_c_werror_flag" ||
22621 test ! -s conftest.err
22622 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022623 ac_cv_struct_sockaddr_storage=yes
22624else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022625 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022626sed 's/^/| /' conftest.$ac_ext >&5
22627
Martin v. Löwiseba40652007-08-30 20:10:57 +000022628 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022629fi
22630
Martin v. Löwiseba40652007-08-30 20:10:57 +000022631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22632fi
22633
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022634{ echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22635echo "${ECHO_T}$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022636if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022637
22638cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022639#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022640_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022641
22642fi
22643
Guido van Rossum627b2d71993-12-24 10:39:16 +000022644# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022645
Michael W. Hudson54241132001-12-07 15:38:26 +000022646
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022647{ echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22648echo $ECHO_N "checking whether char is unsigned... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022649if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022650 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022651else
Martin v. Löwis11437992002-04-12 09:54:03 +000022652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022653/* confdefs.h. */
22654_ACEOF
22655cat confdefs.h >>conftest.$ac_ext
22656cat >>conftest.$ac_ext <<_ACEOF
22657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022658$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022659int
22660main ()
22661{
22662static int test_array [1 - 2 * !(((char) -1) < 0)];
22663test_array [0] = 0
22664
22665 ;
22666 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022667}
Martin v. Löwis11437992002-04-12 09:54:03 +000022668_ACEOF
22669rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022670if { (ac_try="$ac_compile"
22671case "(($ac_try" in
22672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22673 *) ac_try_echo=$ac_try;;
22674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022676 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022677 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022678 grep -v '^ *+' conftest.er1 >conftest.err
22679 rm -f conftest.er1
22680 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022682 (exit $ac_status); } && {
22683 test -z "$ac_c_werror_flag" ||
22684 test ! -s conftest.err
22685 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022686 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022687else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022688 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022689sed 's/^/| /' conftest.$ac_ext >&5
22690
Martin v. Löwiseba40652007-08-30 20:10:57 +000022691 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022692fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022693
22694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022695fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022696{ echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22697echo "${ECHO_T}$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022698if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022699 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022700#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022701_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022702
22703fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022704
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022705{ echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22706echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022707if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022708 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022709else
22710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022711/* confdefs.h. */
22712_ACEOF
22713cat confdefs.h >>conftest.$ac_ext
22714cat >>conftest.$ac_ext <<_ACEOF
22715/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022716
Martin v. Löwis11437992002-04-12 09:54:03 +000022717int
22718main ()
22719{
22720/* FIXME: Include the comments suggested by Paul. */
22721#ifndef __cplusplus
22722 /* Ultrix mips cc rejects this. */
22723 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000022724 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022725 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022726 char const *const *pcpcc;
22727 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022728 /* NEC SVR4.0.2 mips cc rejects this. */
22729 struct point {int x, y;};
22730 static struct point const zero = {0,0};
22731 /* AIX XL C 1.02.0.0 rejects this.
22732 It does not let you subtract one const X* pointer from another in
22733 an arm of an if-expression whose if-part is not a constant
22734 expression */
22735 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000022736 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022737 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022738 ++pcpcc;
22739 ppc = (char**) pcpcc;
22740 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022741 { /* SCO 3.2v4 cc rejects this. */
22742 char *t;
22743 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022744
Martin v. Löwis11437992002-04-12 09:54:03 +000022745 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022746 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022747 }
22748 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22749 int x[] = {25, 17};
22750 const int *foo = &x[0];
22751 ++foo;
22752 }
22753 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22754 typedef const int *iptr;
22755 iptr p = 0;
22756 ++p;
22757 }
22758 { /* AIX XL C 1.02.0.0 rejects this saying
22759 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22760 struct s { int j; const int *ap[3]; };
22761 struct s *b; b->j = 5;
22762 }
22763 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22764 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000022765 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022766 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022767 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022768#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022769
Martin v. Löwis11437992002-04-12 09:54:03 +000022770 ;
22771 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022772}
Martin v. Löwis11437992002-04-12 09:54:03 +000022773_ACEOF
22774rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022775if { (ac_try="$ac_compile"
22776case "(($ac_try" in
22777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22778 *) ac_try_echo=$ac_try;;
22779esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022783 grep -v '^ *+' conftest.er1 >conftest.err
22784 rm -f conftest.er1
22785 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022787 (exit $ac_status); } && {
22788 test -z "$ac_c_werror_flag" ||
22789 test ! -s conftest.err
22790 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022791 ac_cv_c_const=yes
22792else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022794sed 's/^/| /' conftest.$ac_ext >&5
22795
Martin v. Löwiseba40652007-08-30 20:10:57 +000022796 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022797fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022798
22799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022800fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022801{ echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22802echo "${ECHO_T}$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022803if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022804
22805cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022806#define const
Martin v. Löwis11437992002-04-12 09:54:03 +000022807_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022808
22809fi
22810
Michael W. Hudson54241132001-12-07 15:38:26 +000022811
Guido van Rossumda88dad1995-01-26 00:46:29 +000022812works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022813{ echo "$as_me:$LINENO: checking for working volatile" >&5
22814echo $ECHO_N "checking for working volatile... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022815cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022816/* confdefs.h. */
22817_ACEOF
22818cat confdefs.h >>conftest.$ac_ext
22819cat >>conftest.$ac_ext <<_ACEOF
22820/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022821
Martin v. Löwis11437992002-04-12 09:54:03 +000022822int
22823main ()
22824{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022825volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022826 ;
22827 return 0;
22828}
22829_ACEOF
22830rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022831if { (ac_try="$ac_compile"
22832case "(($ac_try" in
22833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22834 *) ac_try_echo=$ac_try;;
22835esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022836eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022837 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022838 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022839 grep -v '^ *+' conftest.er1 >conftest.err
22840 rm -f conftest.er1
22841 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022842 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022843 (exit $ac_status); } && {
22844 test -z "$ac_c_werror_flag" ||
22845 test ! -s conftest.err
22846 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022847 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022850sed 's/^/| /' conftest.$ac_ext >&5
22851
Martin v. Löwis11437992002-04-12 09:54:03 +000022852
22853cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022854#define volatile
Martin v. Löwis11437992002-04-12 09:54:03 +000022855_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022856
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022857
Guido van Rossum627b2d71993-12-24 10:39:16 +000022858fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022859
22860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022861{ echo "$as_me:$LINENO: result: $works" >&5
22862echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022863
Guido van Rossumda88dad1995-01-26 00:46:29 +000022864works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022865{ echo "$as_me:$LINENO: checking for working signed char" >&5
22866echo $ECHO_N "checking for working signed char... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022867cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022868/* confdefs.h. */
22869_ACEOF
22870cat confdefs.h >>conftest.$ac_ext
22871cat >>conftest.$ac_ext <<_ACEOF
22872/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022873
Martin v. Löwis11437992002-04-12 09:54:03 +000022874int
22875main ()
22876{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022877signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022878 ;
22879 return 0;
22880}
22881_ACEOF
22882rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022883if { (ac_try="$ac_compile"
22884case "(($ac_try" in
22885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22886 *) ac_try_echo=$ac_try;;
22887esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022888eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022890 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022891 grep -v '^ *+' conftest.er1 >conftest.err
22892 rm -f conftest.er1
22893 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022894 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022895 (exit $ac_status); } && {
22896 test -z "$ac_c_werror_flag" ||
22897 test ! -s conftest.err
22898 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022899 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022900else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022901 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022902sed 's/^/| /' conftest.$ac_ext >&5
22903
Martin v. Löwis11437992002-04-12 09:54:03 +000022904
22905cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022906#define signed
Martin v. Löwis11437992002-04-12 09:54:03 +000022907_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022908
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022909
Guido van Rossum7f43da71994-08-01 12:15:30 +000022910fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022911
22912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022913{ echo "$as_me:$LINENO: result: $works" >&5
22914echo "${ECHO_T}$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022915
Guido van Rossumda88dad1995-01-26 00:46:29 +000022916have_prototypes=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022917{ echo "$as_me:$LINENO: checking for prototypes" >&5
22918echo $ECHO_N "checking for prototypes... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022919cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022920/* confdefs.h. */
22921_ACEOF
22922cat confdefs.h >>conftest.$ac_ext
22923cat >>conftest.$ac_ext <<_ACEOF
22924/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022925int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022926int
22927main ()
22928{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022929return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022930 ;
22931 return 0;
22932}
22933_ACEOF
22934rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022935if { (ac_try="$ac_compile"
22936case "(($ac_try" in
22937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22938 *) ac_try_echo=$ac_try;;
22939esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022941 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022943 grep -v '^ *+' conftest.er1 >conftest.err
22944 rm -f conftest.er1
22945 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022947 (exit $ac_status); } && {
22948 test -z "$ac_c_werror_flag" ||
22949 test ! -s conftest.err
22950 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022951
22952
22953cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022954#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022955_ACEOF
22956
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022957 have_prototypes=yes
22958
Guido van Rossumf78abae1997-01-21 22:02:36 +000022959else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022960 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022961sed 's/^/| /' conftest.$ac_ext >&5
22962
Martin v. Löwiseba40652007-08-30 20:10:57 +000022963
Guido van Rossum7f43da71994-08-01 12:15:30 +000022964fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022965
22966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022967{ echo "$as_me:$LINENO: result: $have_prototypes" >&5
22968echo "${ECHO_T}$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022969
Guido van Rossumda88dad1995-01-26 00:46:29 +000022970works=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000022971{ echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22972echo $ECHO_N "checking for variable length prototypes and stdarg.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022973cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022974/* confdefs.h. */
22975_ACEOF
22976cat confdefs.h >>conftest.$ac_ext
22977cat >>conftest.$ac_ext <<_ACEOF
22978/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022979
22980#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022981int foo(int x, ...) {
22982 va_list va;
22983 va_start(va, x);
22984 va_arg(va, int);
22985 va_arg(va, char *);
22986 va_arg(va, double);
22987 return 0;
22988}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022989
Martin v. Löwis11437992002-04-12 09:54:03 +000022990int
22991main ()
22992{
Guido van Rossum90eea071996-08-30 20:58:57 +000022993return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022994 ;
22995 return 0;
22996}
22997_ACEOF
22998rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022999if { (ac_try="$ac_compile"
23000case "(($ac_try" in
23001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23002 *) ac_try_echo=$ac_try;;
23003esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023007 grep -v '^ *+' conftest.er1 >conftest.err
23008 rm -f conftest.er1
23009 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023011 (exit $ac_status); } && {
23012 test -z "$ac_c_werror_flag" ||
23013 test ! -s conftest.err
23014 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023015
23016
23017cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023018#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023019_ACEOF
23020
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023021 works=yes
23022
Guido van Rossumf78abae1997-01-21 22:02:36 +000023023else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023024 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023025sed 's/^/| /' conftest.$ac_ext >&5
23026
Martin v. Löwiseba40652007-08-30 20:10:57 +000023027
Guido van Rossum627b2d71993-12-24 10:39:16 +000023028fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023029
23030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023031{ echo "$as_me:$LINENO: result: $works" >&5
23032echo "${ECHO_T}$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023033
Martin v. Löwisd6320502004-08-12 13:45:08 +000023034# check for socketpair
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023035{ echo "$as_me:$LINENO: checking for socketpair" >&5
23036echo $ECHO_N "checking for socketpair... $ECHO_C" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023037cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000023038/* confdefs.h. */
23039_ACEOF
23040cat confdefs.h >>conftest.$ac_ext
23041cat >>conftest.$ac_ext <<_ACEOF
23042/* end confdefs.h. */
23043
23044#include <sys/types.h>
23045#include <sys/socket.h>
23046
23047int
23048main ()
23049{
23050void *x=socketpair
23051 ;
23052 return 0;
23053}
23054_ACEOF
23055rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023056if { (ac_try="$ac_compile"
23057case "(($ac_try" in
23058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23059 *) ac_try_echo=$ac_try;;
23060esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023061eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000023063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023064 grep -v '^ *+' conftest.er1 >conftest.err
23065 rm -f conftest.er1
23066 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023067 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023068 (exit $ac_status); } && {
23069 test -z "$ac_c_werror_flag" ||
23070 test ! -s conftest.err
23071 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000023072
23073cat >>confdefs.h <<\_ACEOF
23074#define HAVE_SOCKETPAIR 1
23075_ACEOF
23076
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023077 { echo "$as_me:$LINENO: result: yes" >&5
23078echo "${ECHO_T}yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023079else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023080 echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000023081sed 's/^/| /' conftest.$ac_ext >&5
23082
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023083 { echo "$as_me:$LINENO: result: no" >&5
23084echo "${ECHO_T}no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000023085
23086fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023087
23088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000023089
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023090# check if sockaddr has sa_len member
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023091{ echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
23092echo $ECHO_N "checking if sockaddr has sa_len member... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023093cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023094/* confdefs.h. */
23095_ACEOF
23096cat confdefs.h >>conftest.$ac_ext
23097cat >>conftest.$ac_ext <<_ACEOF
23098/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023099#include <sys/types.h>
23100#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023101int
23102main ()
23103{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023104struct sockaddr x;
23105x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023106 ;
23107 return 0;
23108}
23109_ACEOF
23110rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023111if { (ac_try="$ac_compile"
23112case "(($ac_try" in
23113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23114 *) ac_try_echo=$ac_try;;
23115esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023119 grep -v '^ *+' conftest.er1 >conftest.err
23120 rm -f conftest.er1
23121 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023123 (exit $ac_status); } && {
23124 test -z "$ac_c_werror_flag" ||
23125 test ! -s conftest.err
23126 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023127 { echo "$as_me:$LINENO: result: yes" >&5
23128echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023129
23130cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023131#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023132_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023133
23134else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023135 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023136sed 's/^/| /' conftest.$ac_ext >&5
23137
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023138 { echo "$as_me:$LINENO: result: no" >&5
23139echo "${ECHO_T}no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023140fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023141
23142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000023143
Guido van Rossumda88dad1995-01-26 00:46:29 +000023144va_list_is_array=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023145{ echo "$as_me:$LINENO: checking whether va_list is an array" >&5
23146echo $ECHO_N "checking whether va_list is an array... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023147cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023148/* confdefs.h. */
23149_ACEOF
23150cat confdefs.h >>conftest.$ac_ext
23151cat >>conftest.$ac_ext <<_ACEOF
23152/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023153
23154#ifdef HAVE_STDARG_PROTOTYPES
23155#include <stdarg.h>
23156#else
23157#include <varargs.h>
23158#endif
23159
Martin v. Löwis11437992002-04-12 09:54:03 +000023160int
23161main ()
23162{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023163va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000023164 ;
23165 return 0;
23166}
23167_ACEOF
23168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023169if { (ac_try="$ac_compile"
23170case "(($ac_try" in
23171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23172 *) ac_try_echo=$ac_try;;
23173esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023174eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023177 grep -v '^ *+' conftest.er1 >conftest.err
23178 rm -f conftest.er1
23179 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023180 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023181 (exit $ac_status); } && {
23182 test -z "$ac_c_werror_flag" ||
23183 test ! -s conftest.err
23184 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023185 :
23186else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023187 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023188sed 's/^/| /' conftest.$ac_ext >&5
23189
Martin v. Löwis11437992002-04-12 09:54:03 +000023190
23191
23192cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023193#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023194_ACEOF
23195
Guido van Rossumda88dad1995-01-26 00:46:29 +000023196 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023197
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023199
23200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023201{ echo "$as_me:$LINENO: result: $va_list_is_array" >&5
23202echo "${ECHO_T}$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023203
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023204# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000023205
23206
23207
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023208{ echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
23209echo $ECHO_N "checking for gethostbyname_r... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023210if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023211 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023212else
Martin v. Löwis11437992002-04-12 09:54:03 +000023213 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023214/* confdefs.h. */
23215_ACEOF
23216cat confdefs.h >>conftest.$ac_ext
23217cat >>conftest.$ac_ext <<_ACEOF
23218/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023219/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
23220 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23221#define gethostbyname_r innocuous_gethostbyname_r
23222
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023223/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023224 which can conflict with char gethostbyname_r (); below.
23225 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023226 <limits.h> exists even on freestanding compilers. */
23227
23228#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023229# include <limits.h>
23230#else
23231# include <assert.h>
23232#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023233
23234#undef gethostbyname_r
23235
Martin v. Löwiseba40652007-08-30 20:10:57 +000023236/* Override any GCC internal prototype to avoid an error.
23237 Use char because int might match the return type of a GCC
23238 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023239#ifdef __cplusplus
23240extern "C"
23241#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023242char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023243/* The GNU C library defines this for functions which it implements
23244 to always fail with ENOSYS. Some functions are actually named
23245 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023246#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023247choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023248#endif
23249
Skip Montanaro6dead952003-09-25 14:50:04 +000023250int
23251main ()
23252{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023253return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023254 ;
23255 return 0;
23256}
23257_ACEOF
23258rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023259if { (ac_try="$ac_link"
23260case "(($ac_try" in
23261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23262 *) ac_try_echo=$ac_try;;
23263esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023265 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023267 grep -v '^ *+' conftest.er1 >conftest.err
23268 rm -f conftest.er1
23269 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023271 (exit $ac_status); } && {
23272 test -z "$ac_c_werror_flag" ||
23273 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023274 } && test -s conftest$ac_exeext &&
23275 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023276 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023277else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023278 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023279sed 's/^/| /' conftest.$ac_ext >&5
23280
Martin v. Löwiseba40652007-08-30 20:10:57 +000023281 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023282fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023283
23284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023285 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023286fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023287{ echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
23288echo "${ECHO_T}$ac_cv_func_gethostbyname_r" >&6; }
23289if test $ac_cv_func_gethostbyname_r = yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023290
Martin v. Löwis11437992002-04-12 09:54:03 +000023291 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023292#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023293_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023294
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023295 { echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
23296echo $ECHO_N "checking gethostbyname_r with 6 args... $ECHO_C" >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023297 OLD_CFLAGS=$CFLAGS
23298 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023300/* confdefs.h. */
23301_ACEOF
23302cat confdefs.h >>conftest.$ac_ext
23303cat >>conftest.$ac_ext <<_ACEOF
23304/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023305
23306# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023307
Martin v. Löwis11437992002-04-12 09:54:03 +000023308int
23309main ()
23310{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023311
23312 char *name;
23313 struct hostent *he, *res;
23314 char buffer[2048];
23315 int buflen = 2048;
23316 int h_errnop;
23317
23318 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023319
23320 ;
23321 return 0;
23322}
23323_ACEOF
23324rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023325if { (ac_try="$ac_compile"
23326case "(($ac_try" in
23327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23328 *) ac_try_echo=$ac_try;;
23329esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023330eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023331 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023332 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023333 grep -v '^ *+' conftest.er1 >conftest.err
23334 rm -f conftest.er1
23335 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023336 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023337 (exit $ac_status); } && {
23338 test -z "$ac_c_werror_flag" ||
23339 test ! -s conftest.err
23340 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023341
23342 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023343#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023344_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023345
Martin v. Löwis11437992002-04-12 09:54:03 +000023346
23347cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023348#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023349_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023350
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023351 { echo "$as_me:$LINENO: result: yes" >&5
23352echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023353
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023354else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023355 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023356sed 's/^/| /' conftest.$ac_ext >&5
23357
Martin v. Löwis11437992002-04-12 09:54:03 +000023358
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023359 { echo "$as_me:$LINENO: result: no" >&5
23360echo "${ECHO_T}no" >&6; }
23361 { echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
23362echo $ECHO_N "checking gethostbyname_r with 5 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023363 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023364/* confdefs.h. */
23365_ACEOF
23366cat confdefs.h >>conftest.$ac_ext
23367cat >>conftest.$ac_ext <<_ACEOF
23368/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023369
23370# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023371
Martin v. Löwis11437992002-04-12 09:54:03 +000023372int
23373main ()
23374{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023375
23376 char *name;
23377 struct hostent *he;
23378 char buffer[2048];
23379 int buflen = 2048;
23380 int h_errnop;
23381
23382 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000023383
23384 ;
23385 return 0;
23386}
23387_ACEOF
23388rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023389if { (ac_try="$ac_compile"
23390case "(($ac_try" in
23391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23392 *) ac_try_echo=$ac_try;;
23393esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023394eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023395 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023396 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023397 grep -v '^ *+' conftest.er1 >conftest.err
23398 rm -f conftest.er1
23399 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023400 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023401 (exit $ac_status); } && {
23402 test -z "$ac_c_werror_flag" ||
23403 test ! -s conftest.err
23404 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023405
23406 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023407#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023408_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023409
Martin v. Löwis11437992002-04-12 09:54:03 +000023410
23411cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023412#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023413_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023414
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023415 { echo "$as_me:$LINENO: result: yes" >&5
23416echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023417
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023418else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023419 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023420sed 's/^/| /' conftest.$ac_ext >&5
23421
Martin v. Löwis11437992002-04-12 09:54:03 +000023422
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023423 { echo "$as_me:$LINENO: result: no" >&5
23424echo "${ECHO_T}no" >&6; }
23425 { echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
23426echo $ECHO_N "checking gethostbyname_r with 3 args... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023428/* confdefs.h. */
23429_ACEOF
23430cat confdefs.h >>conftest.$ac_ext
23431cat >>conftest.$ac_ext <<_ACEOF
23432/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023433
23434# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023435
Martin v. Löwis11437992002-04-12 09:54:03 +000023436int
23437main ()
23438{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023439
23440 char *name;
23441 struct hostent *he;
23442 struct hostent_data data;
23443
23444 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000023445
23446 ;
23447 return 0;
23448}
23449_ACEOF
23450rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023451if { (ac_try="$ac_compile"
23452case "(($ac_try" in
23453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23454 *) ac_try_echo=$ac_try;;
23455esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023456eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023459 grep -v '^ *+' conftest.er1 >conftest.err
23460 rm -f conftest.er1
23461 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023462 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023463 (exit $ac_status); } && {
23464 test -z "$ac_c_werror_flag" ||
23465 test ! -s conftest.err
23466 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023467
23468 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023469#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023470_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000023471
Martin v. Löwis11437992002-04-12 09:54:03 +000023472
23473cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023474#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023475_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023476
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023477 { echo "$as_me:$LINENO: result: yes" >&5
23478echo "${ECHO_T}yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023480else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023481 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023482sed 's/^/| /' conftest.$ac_ext >&5
23483
Martin v. Löwis11437992002-04-12 09:54:03 +000023484
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023485 { echo "$as_me:$LINENO: result: no" >&5
23486echo "${ECHO_T}no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023487
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023488fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023489
23490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023491
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023492fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023493
23494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023495
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023496fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023497
23498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023499 CFLAGS=$OLD_CFLAGS
23500
23501else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023502
Martin v. Löwis11437992002-04-12 09:54:03 +000023503
23504for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000023505do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023506as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23507{ echo "$as_me:$LINENO: checking for $ac_func" >&5
23508echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023509if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023510 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023511else
Martin v. Löwis11437992002-04-12 09:54:03 +000023512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023513/* confdefs.h. */
23514_ACEOF
23515cat confdefs.h >>conftest.$ac_ext
23516cat >>conftest.$ac_ext <<_ACEOF
23517/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023518/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23519 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23520#define $ac_func innocuous_$ac_func
23521
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023522/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023523 which can conflict with char $ac_func (); below.
23524 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023525 <limits.h> exists even on freestanding compilers. */
23526
23527#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023528# include <limits.h>
23529#else
23530# include <assert.h>
23531#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023532
23533#undef $ac_func
23534
Martin v. Löwiseba40652007-08-30 20:10:57 +000023535/* Override any GCC internal prototype to avoid an error.
23536 Use char because int might match the return type of a GCC
23537 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023538#ifdef __cplusplus
23539extern "C"
23540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023541char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023542/* The GNU C library defines this for functions which it implements
23543 to always fail with ENOSYS. Some functions are actually named
23544 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023545#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023546choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023547#endif
23548
Skip Montanaro6dead952003-09-25 14:50:04 +000023549int
23550main ()
23551{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023552return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023553 ;
23554 return 0;
23555}
23556_ACEOF
23557rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023558if { (ac_try="$ac_link"
23559case "(($ac_try" in
23560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23561 *) ac_try_echo=$ac_try;;
23562esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023563eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023564 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023566 grep -v '^ *+' conftest.er1 >conftest.err
23567 rm -f conftest.er1
23568 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023569 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023570 (exit $ac_status); } && {
23571 test -z "$ac_c_werror_flag" ||
23572 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023573 } && test -s conftest$ac_exeext &&
23574 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023575 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000023576else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023577 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023578sed 's/^/| /' conftest.$ac_ext >&5
23579
Martin v. Löwiseba40652007-08-30 20:10:57 +000023580 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023581fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023582
23583rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023584 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023585fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023586ac_res=`eval echo '${'$as_ac_var'}'`
23587 { echo "$as_me:$LINENO: result: $ac_res" >&5
23588echo "${ECHO_T}$ac_res" >&6; }
23589if test `eval echo '${'$as_ac_var'}'` = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023590 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023591#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023592_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023593
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023594fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023595done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023596
Michael W. Hudson54241132001-12-07 15:38:26 +000023597
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023598fi
23599
Michael W. Hudson54241132001-12-07 15:38:26 +000023600
23601
23602
23603
23604
23605
Guido van Rossum627b2d71993-12-24 10:39:16 +000023606# checks for system services
23607# (none yet)
23608
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023609# Linux requires this for correct f.p. operations
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023610{ echo "$as_me:$LINENO: checking for __fpu_control" >&5
23611echo $ECHO_N "checking for __fpu_control... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023612if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023613 echo $ECHO_N "(cached) $ECHO_C" >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023614else
Martin v. Löwis11437992002-04-12 09:54:03 +000023615 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023616/* confdefs.h. */
23617_ACEOF
23618cat confdefs.h >>conftest.$ac_ext
23619cat >>conftest.$ac_ext <<_ACEOF
23620/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023621/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23622 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23623#define __fpu_control innocuous___fpu_control
23624
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023625/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023626 which can conflict with char __fpu_control (); below.
23627 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023628 <limits.h> exists even on freestanding compilers. */
23629
23630#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023631# include <limits.h>
23632#else
23633# include <assert.h>
23634#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023635
23636#undef __fpu_control
23637
Martin v. Löwiseba40652007-08-30 20:10:57 +000023638/* Override any GCC internal prototype to avoid an error.
23639 Use char because int might match the return type of a GCC
23640 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023641#ifdef __cplusplus
23642extern "C"
23643#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023644char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023645/* The GNU C library defines this for functions which it implements
23646 to always fail with ENOSYS. Some functions are actually named
23647 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023648#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023649choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023650#endif
23651
Skip Montanaro6dead952003-09-25 14:50:04 +000023652int
23653main ()
23654{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023655return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023656 ;
23657 return 0;
23658}
23659_ACEOF
23660rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023661if { (ac_try="$ac_link"
23662case "(($ac_try" in
23663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23664 *) ac_try_echo=$ac_try;;
23665esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023666eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023667 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023669 grep -v '^ *+' conftest.er1 >conftest.err
23670 rm -f conftest.er1
23671 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023672 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023673 (exit $ac_status); } && {
23674 test -z "$ac_c_werror_flag" ||
23675 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023676 } && test -s conftest$ac_exeext &&
23677 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023678 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023679else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023680 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023681sed 's/^/| /' conftest.$ac_ext >&5
23682
Martin v. Löwiseba40652007-08-30 20:10:57 +000023683 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023685
23686rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023687 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023688fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023689{ echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23690echo "${ECHO_T}$ac_cv_func___fpu_control" >&6; }
23691if test $ac_cv_func___fpu_control = yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023692 :
23693else
Martin v. Löwis11437992002-04-12 09:54:03 +000023694
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023695{ echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23696echo $ECHO_N "checking for __fpu_control in -lieee... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023697if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023698 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023699else
Martin v. Löwis11437992002-04-12 09:54:03 +000023700 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023701LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023702cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023703/* confdefs.h. */
23704_ACEOF
23705cat confdefs.h >>conftest.$ac_ext
23706cat >>conftest.$ac_ext <<_ACEOF
23707/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023708
Martin v. Löwiseba40652007-08-30 20:10:57 +000023709/* Override any GCC internal prototype to avoid an error.
23710 Use char because int might match the return type of a GCC
23711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023712#ifdef __cplusplus
23713extern "C"
23714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023715char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023716int
23717main ()
23718{
Martin v. Löwiseba40652007-08-30 20:10:57 +000023719return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023720 ;
23721 return 0;
23722}
23723_ACEOF
23724rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023725if { (ac_try="$ac_link"
23726case "(($ac_try" in
23727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23728 *) ac_try_echo=$ac_try;;
23729esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023731 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023733 grep -v '^ *+' conftest.er1 >conftest.err
23734 rm -f conftest.er1
23735 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023736 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023737 (exit $ac_status); } && {
23738 test -z "$ac_c_werror_flag" ||
23739 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023740 } && test -s conftest$ac_exeext &&
23741 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023742 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023743else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023744 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023745sed 's/^/| /' conftest.$ac_ext >&5
23746
Martin v. Löwiseba40652007-08-30 20:10:57 +000023747 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023749
23750rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023751 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023752LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023753fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023754{ echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23755echo "${ECHO_T}$ac_cv_lib_ieee___fpu_control" >&6; }
23756if test $ac_cv_lib_ieee___fpu_control = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023757 cat >>confdefs.h <<_ACEOF
23758#define HAVE_LIBIEEE 1
23759_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023760
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023761 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023762
Guido van Rossum627b2d71993-12-24 10:39:16 +000023763fi
23764
Michael W. Hudson54241132001-12-07 15:38:26 +000023765
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023766fi
23767
Michael W. Hudson54241132001-12-07 15:38:26 +000023768
Guido van Rossum7f253911997-05-09 02:42:48 +000023769# Check for --with-fpectl
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023770{ echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23771echo $ECHO_N "checking for --with-fpectl... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023772
Martin v. Löwiseba40652007-08-30 20:10:57 +000023773# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023774if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023775 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023776if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023777then
23778
23779cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023780#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023781_ACEOF
23782
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023783 { echo "$as_me:$LINENO: result: yes" >&5
23784echo "${ECHO_T}yes" >&6; }
23785else { echo "$as_me:$LINENO: result: no" >&5
23786echo "${ECHO_T}no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023787fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023788else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023789 { echo "$as_me:$LINENO: result: no" >&5
23790echo "${ECHO_T}no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023791fi
23792
Guido van Rossum7f253911997-05-09 02:42:48 +000023793
Guido van Rossum7f43da71994-08-01 12:15:30 +000023794# check for --with-libm=...
23795
Guido van Rossum563e7081996-09-10 18:20:48 +000023796case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023797Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000023798BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023799*) LIBM=-lm
23800esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023801{ echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23802echo $ECHO_N "checking for --with-libm=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023803
Martin v. Löwiseba40652007-08-30 20:10:57 +000023804# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023805if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023806 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023807if test "$withval" = no
23808then LIBM=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023809 { echo "$as_me:$LINENO: result: force LIBM empty" >&5
23810echo "${ECHO_T}force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023811elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023812then LIBM=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023813 { echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23814echo "${ECHO_T}set LIBM=\"$withval\"" >&6; }
23815else { { echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23816echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023817 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023818fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023819else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023820 { echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23821echo "${ECHO_T}default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023822fi
23823
Guido van Rossum7f43da71994-08-01 12:15:30 +000023824
23825# check for --with-libc=...
23826
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023827{ echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23828echo $ECHO_N "checking for --with-libc=STRING... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023829
Martin v. Löwiseba40652007-08-30 20:10:57 +000023830# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023831if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023832 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023833if test "$withval" = no
23834then LIBC=
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023835 { echo "$as_me:$LINENO: result: force LIBC empty" >&5
23836echo "${ECHO_T}force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023837elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023838then LIBC=$withval
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023839 { echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23840echo "${ECHO_T}set LIBC=\"$withval\"" >&6; }
23841else { { echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23842echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023843 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023844fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023845else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000023846 { echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23847echo "${ECHO_T}default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023848fi
23849
Guido van Rossum7f43da71994-08-01 12:15:30 +000023850
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023851# **************************************************
23852# * Check for various properties of floating point *
23853# **************************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000023854
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000023855{ echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23856echo $ECHO_N "checking whether C doubles are little-endian IEEE 754 binary64... $ECHO_C" >&6; }
23857if test "${ac_cv_little_endian_double+set}" = set; then
23858 echo $ECHO_N "(cached) $ECHO_C" >&6
23859else
23860
23861if test "$cross_compiling" = yes; then
23862 ac_cv_little_endian_double=no
23863else
23864 cat >conftest.$ac_ext <<_ACEOF
23865/* confdefs.h. */
23866_ACEOF
23867cat confdefs.h >>conftest.$ac_ext
23868cat >>conftest.$ac_ext <<_ACEOF
23869/* end confdefs.h. */
23870
23871#include <string.h>
23872int main() {
23873 double x = 9006104071832581.0;
23874 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23875 return 0;
23876 else
23877 return 1;
23878}
23879
23880_ACEOF
23881rm -f conftest$ac_exeext
23882if { (ac_try="$ac_link"
23883case "(($ac_try" in
23884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23885 *) ac_try_echo=$ac_try;;
23886esac
23887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23888 (eval "$ac_link") 2>&5
23889 ac_status=$?
23890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23892 { (case "(($ac_try" in
23893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23894 *) ac_try_echo=$ac_try;;
23895esac
23896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23897 (eval "$ac_try") 2>&5
23898 ac_status=$?
23899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23900 (exit $ac_status); }; }; then
23901 ac_cv_little_endian_double=yes
23902else
23903 echo "$as_me: program exited with status $ac_status" >&5
23904echo "$as_me: failed program was:" >&5
23905sed 's/^/| /' conftest.$ac_ext >&5
23906
23907( exit $ac_status )
23908ac_cv_little_endian_double=no
23909fi
23910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23911fi
23912
23913
23914fi
23915
23916{ echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23917echo "${ECHO_T}$ac_cv_little_endian_double" >&6; }
23918if test "$ac_cv_little_endian_double" = yes
23919then
23920
23921cat >>confdefs.h <<\_ACEOF
23922#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23923_ACEOF
23924
23925fi
23926
23927{ echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23928echo $ECHO_N "checking whether C doubles are big-endian IEEE 754 binary64... $ECHO_C" >&6; }
23929if test "${ac_cv_big_endian_double+set}" = set; then
23930 echo $ECHO_N "(cached) $ECHO_C" >&6
23931else
23932
23933if test "$cross_compiling" = yes; then
23934 ac_cv_big_endian_double=no
23935else
23936 cat >conftest.$ac_ext <<_ACEOF
23937/* confdefs.h. */
23938_ACEOF
23939cat confdefs.h >>conftest.$ac_ext
23940cat >>conftest.$ac_ext <<_ACEOF
23941/* end confdefs.h. */
23942
23943#include <string.h>
23944int main() {
23945 double x = 9006104071832581.0;
23946 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23947 return 0;
23948 else
23949 return 1;
23950}
23951
23952_ACEOF
23953rm -f conftest$ac_exeext
23954if { (ac_try="$ac_link"
23955case "(($ac_try" in
23956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23957 *) ac_try_echo=$ac_try;;
23958esac
23959eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23960 (eval "$ac_link") 2>&5
23961 ac_status=$?
23962 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23963 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23964 { (case "(($ac_try" in
23965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23966 *) ac_try_echo=$ac_try;;
23967esac
23968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23969 (eval "$ac_try") 2>&5
23970 ac_status=$?
23971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23972 (exit $ac_status); }; }; then
23973 ac_cv_big_endian_double=yes
23974else
23975 echo "$as_me: program exited with status $ac_status" >&5
23976echo "$as_me: failed program was:" >&5
23977sed 's/^/| /' conftest.$ac_ext >&5
23978
23979( exit $ac_status )
23980ac_cv_big_endian_double=no
23981fi
23982rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23983fi
23984
23985
23986fi
23987
23988{ echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23989echo "${ECHO_T}$ac_cv_big_endian_double" >&6; }
23990if test "$ac_cv_big_endian_double" = yes
23991then
23992
23993cat >>confdefs.h <<\_ACEOF
23994#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23995_ACEOF
23996
23997fi
23998
23999# Some ARM platforms use a mixed-endian representation for doubles.
24000# While Python doesn't currently have full support for these platforms
24001# (see e.g., issue 1762561), we can at least make sure that float <-> string
24002# conversions work.
24003{ echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
24004echo $ECHO_N "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... $ECHO_C" >&6; }
24005if test "${ac_cv_mixed_endian_double+set}" = set; then
24006 echo $ECHO_N "(cached) $ECHO_C" >&6
24007else
24008
24009if test "$cross_compiling" = yes; then
24010 ac_cv_mixed_endian_double=no
24011else
24012 cat >conftest.$ac_ext <<_ACEOF
24013/* confdefs.h. */
24014_ACEOF
24015cat confdefs.h >>conftest.$ac_ext
24016cat >>conftest.$ac_ext <<_ACEOF
24017/* end confdefs.h. */
24018
24019#include <string.h>
24020int main() {
24021 double x = 9006104071832581.0;
24022 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
24023 return 0;
24024 else
24025 return 1;
24026}
24027
24028_ACEOF
24029rm -f conftest$ac_exeext
24030if { (ac_try="$ac_link"
24031case "(($ac_try" in
24032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24033 *) ac_try_echo=$ac_try;;
24034esac
24035eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24036 (eval "$ac_link") 2>&5
24037 ac_status=$?
24038 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24039 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24040 { (case "(($ac_try" in
24041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24042 *) ac_try_echo=$ac_try;;
24043esac
24044eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24045 (eval "$ac_try") 2>&5
24046 ac_status=$?
24047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24048 (exit $ac_status); }; }; then
24049 ac_cv_mixed_endian_double=yes
24050else
24051 echo "$as_me: program exited with status $ac_status" >&5
24052echo "$as_me: failed program was:" >&5
24053sed 's/^/| /' conftest.$ac_ext >&5
24054
24055( exit $ac_status )
24056ac_cv_mixed_endian_double=no
24057fi
24058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24059fi
24060
24061
24062fi
24063
24064{ echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
24065echo "${ECHO_T}$ac_cv_mixed_endian_double" >&6; }
24066if test "$ac_cv_mixed_endian_double" = yes
24067then
24068
24069cat >>confdefs.h <<\_ACEOF
24070#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
24071_ACEOF
24072
24073fi
24074
24075# The short float repr introduced in Python 3.1 requires the
24076# correctly-rounded string <-> double conversion functions from
24077# Python/dtoa.c, which in turn require that the FPU uses 53-bit
24078# rounding; this is a problem on x86, where the x87 FPU has a default
Mark Dickinsona548dee2009-11-15 13:12:43 +000024079# rounding precision of 64 bits. For gcc/x86, we can fix this by
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024080# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsona548dee2009-11-15 13:12:43 +000024081
24082# This inline assembler syntax may also work for suncc and icc,
24083# so we try it on all platforms.
24084
24085{ 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 +000024086echo $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 +000024087cat >conftest.$ac_ext <<_ACEOF
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024088/* confdefs.h. */
24089_ACEOF
24090cat confdefs.h >>conftest.$ac_ext
24091cat >>conftest.$ac_ext <<_ACEOF
24092/* end confdefs.h. */
24093
24094int
24095main ()
24096{
24097
Mark Dickinsona548dee2009-11-15 13:12:43 +000024098 unsigned short cw;
24099 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
24100 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024101
24102 ;
24103 return 0;
24104}
24105_ACEOF
24106rm -f conftest.$ac_objext
24107if { (ac_try="$ac_compile"
24108case "(($ac_try" in
24109 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24110 *) ac_try_echo=$ac_try;;
24111esac
24112eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24113 (eval "$ac_compile") 2>conftest.er1
24114 ac_status=$?
24115 grep -v '^ *+' conftest.er1 >conftest.err
24116 rm -f conftest.er1
24117 cat conftest.err >&5
24118 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24119 (exit $ac_status); } && {
24120 test -z "$ac_c_werror_flag" ||
24121 test ! -s conftest.err
24122 } && test -s conftest.$ac_objext; then
24123 have_gcc_asm_for_x87=yes
24124else
24125 echo "$as_me: failed program was:" >&5
24126sed 's/^/| /' conftest.$ac_ext >&5
24127
24128 have_gcc_asm_for_x87=no
24129fi
24130
24131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Mark Dickinsona548dee2009-11-15 13:12:43 +000024132{ echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024133echo "${ECHO_T}$have_gcc_asm_for_x87" >&6; }
Mark Dickinsona548dee2009-11-15 13:12:43 +000024134if test "$have_gcc_asm_for_x87" = yes
24135then
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024136
24137cat >>confdefs.h <<\_ACEOF
24138#define HAVE_GCC_ASM_FOR_X87 1
24139_ACEOF
24140
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024141fi
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024142
Mark Dickinson04b27232009-01-04 12:29:36 +000024143# Detect whether system arithmetic is subject to x87-style double
24144# rounding issues. The result of this test has little meaning on non
24145# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
24146# mode is round-to-nearest and double rounding issues are present, and
24147# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024148{ echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
24149echo $ECHO_N "checking for x87-style double rounding... $ECHO_C" >&6; }
Mark Dickinson99abd142009-10-24 13:44:16 +000024150# $BASECFLAGS may affect the result
24151ac_save_cc="$CC"
24152CC="$CC $BASECFLAGS"
Mark Dickinson04b27232009-01-04 12:29:36 +000024153if test "$cross_compiling" = yes; then
24154 ac_cv_x87_double_rounding=no
24155else
24156 cat >conftest.$ac_ext <<_ACEOF
24157/* confdefs.h. */
24158_ACEOF
24159cat confdefs.h >>conftest.$ac_ext
24160cat >>conftest.$ac_ext <<_ACEOF
24161/* end confdefs.h. */
24162
24163#include <stdlib.h>
24164#include <math.h>
24165int main() {
24166 volatile double x, y, z;
24167 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
24168 x = 0.99999999999999989; /* 1-2**-53 */
24169 y = 1./x;
24170 if (y != 1.)
24171 exit(0);
24172 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
24173 x = 1e16;
24174 y = 2.99999;
24175 z = x + y;
24176 if (z != 1e16+4.)
24177 exit(0);
24178 /* both tests show evidence of double rounding */
24179 exit(1);
24180}
24181
24182_ACEOF
24183rm -f conftest$ac_exeext
24184if { (ac_try="$ac_link"
24185case "(($ac_try" in
24186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24187 *) ac_try_echo=$ac_try;;
24188esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024190 (eval "$ac_link") 2>&5
24191 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024192 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024193 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24194 { (case "(($ac_try" in
24195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24196 *) ac_try_echo=$ac_try;;
24197esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024199 (eval "$ac_try") 2>&5
24200 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024202 (exit $ac_status); }; }; then
24203 ac_cv_x87_double_rounding=no
24204else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024205 echo "$as_me: program exited with status $ac_status" >&5
24206echo "$as_me: failed program was:" >&5
Mark Dickinson04b27232009-01-04 12:29:36 +000024207sed 's/^/| /' conftest.$ac_ext >&5
24208
24209( exit $ac_status )
24210ac_cv_x87_double_rounding=yes
24211fi
24212rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24213fi
24214
24215
Mark Dickinson99abd142009-10-24 13:44:16 +000024216CC="$ac_save_cc"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024217{ echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
24218echo "${ECHO_T}$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson04b27232009-01-04 12:29:36 +000024219if test "$ac_cv_x87_double_rounding" = yes
24220then
24221
24222cat >>confdefs.h <<\_ACEOF
24223#define X87_DOUBLE_ROUNDING 1
24224_ACEOF
24225
24226fi
24227
Mark Dickinson1d6e2e12009-10-24 13:28:38 +000024228# ************************************
24229# * Check for mathematical functions *
24230# ************************************
24231
24232LIBS_SAVE=$LIBS
24233LIBS="$LIBS $LIBM"
24234
Mark Dickinson265d7382008-04-21 22:32:24 +000024235# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
24236# -0. on some architectures.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024237{ echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
24238echo $ECHO_N "checking whether tanh preserves the sign of zero... $ECHO_C" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024239if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024240 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000024241else
24242
24243if test "$cross_compiling" = yes; then
24244 ac_cv_tanh_preserves_zero_sign=no
24245else
24246 cat >conftest.$ac_ext <<_ACEOF
24247/* confdefs.h. */
24248_ACEOF
24249cat confdefs.h >>conftest.$ac_ext
24250cat >>conftest.$ac_ext <<_ACEOF
24251/* end confdefs.h. */
24252
24253#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000024254#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000024255int main() {
24256 /* return 0 if either negative zeros don't exist
24257 on this platform or if negative zeros exist
24258 and tanh(-0.) == -0. */
24259 if (atan2(0., -1.) == atan2(-0., -1.) ||
24260 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
24261 else exit(1);
24262}
24263
24264_ACEOF
24265rm -f conftest$ac_exeext
24266if { (ac_try="$ac_link"
24267case "(($ac_try" in
24268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24269 *) ac_try_echo=$ac_try;;
24270esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024271eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024272 (eval "$ac_link") 2>&5
24273 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024275 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24276 { (case "(($ac_try" in
24277 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24278 *) ac_try_echo=$ac_try;;
24279esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024280eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024281 (eval "$ac_try") 2>&5
24282 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024283 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024284 (exit $ac_status); }; }; then
24285 ac_cv_tanh_preserves_zero_sign=yes
24286else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024287 echo "$as_me: program exited with status $ac_status" >&5
24288echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000024289sed 's/^/| /' conftest.$ac_ext >&5
24290
24291( exit $ac_status )
24292ac_cv_tanh_preserves_zero_sign=no
24293fi
24294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24295fi
24296
24297
24298fi
24299
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024300{ echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
24301echo "${ECHO_T}$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000024302if test "$ac_cv_tanh_preserves_zero_sign" = yes
24303then
24304
24305cat >>confdefs.h <<\_ACEOF
24306#define TANH_PRESERVES_ZERO_SIGN 1
24307_ACEOF
24308
24309fi
24310
Martin v. Löwis11437992002-04-12 09:54:03 +000024311
Guido van Rossum2b3ac691996-08-30 15:18:41 +000024312
Michael W. Hudson54241132001-12-07 15:38:26 +000024313
Christian Heimes0a8143f2007-12-18 23:22:54 +000024314
24315
24316
24317
24318
Mark Dickinson8e5446f2009-04-18 14:41:37 +000024319
Mark Dickinson65898e02009-09-05 10:27:00 +000024320for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
24321do
24322as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24323{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24324echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
24325if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
24326 echo $ECHO_N "(cached) $ECHO_C" >&6
24327else
24328 cat >conftest.$ac_ext <<_ACEOF
24329/* confdefs.h. */
24330_ACEOF
24331cat confdefs.h >>conftest.$ac_ext
24332cat >>conftest.$ac_ext <<_ACEOF
24333/* end confdefs.h. */
24334/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24335 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24336#define $ac_func innocuous_$ac_func
24337
24338/* System header to define __stub macros and hopefully few prototypes,
24339 which can conflict with char $ac_func (); below.
24340 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24341 <limits.h> exists even on freestanding compilers. */
24342
24343#ifdef __STDC__
24344# include <limits.h>
24345#else
24346# include <assert.h>
24347#endif
24348
24349#undef $ac_func
24350
24351/* Override any GCC internal prototype to avoid an error.
24352 Use char because int might match the return type of a GCC
24353 builtin and then its argument prototype would still apply. */
24354#ifdef __cplusplus
24355extern "C"
24356#endif
24357char $ac_func ();
24358/* The GNU C library defines this for functions which it implements
24359 to always fail with ENOSYS. Some functions are actually named
24360 something starting with __ and the normal name is an alias. */
24361#if defined __stub_$ac_func || defined __stub___$ac_func
24362choke me
24363#endif
24364
24365int
24366main ()
24367{
24368return $ac_func ();
24369 ;
24370 return 0;
24371}
24372_ACEOF
24373rm -f conftest.$ac_objext conftest$ac_exeext
24374if { (ac_try="$ac_link"
24375case "(($ac_try" in
24376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24377 *) ac_try_echo=$ac_try;;
24378esac
24379eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24380 (eval "$ac_link") 2>conftest.er1
24381 ac_status=$?
24382 grep -v '^ *+' conftest.er1 >conftest.err
24383 rm -f conftest.er1
24384 cat conftest.err >&5
24385 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24386 (exit $ac_status); } && {
24387 test -z "$ac_c_werror_flag" ||
24388 test ! -s conftest.err
24389 } && test -s conftest$ac_exeext &&
24390 $as_test_x conftest$ac_exeext; then
24391 eval "$as_ac_var=yes"
24392else
24393 echo "$as_me: failed program was:" >&5
24394sed 's/^/| /' conftest.$ac_ext >&5
24395
24396 eval "$as_ac_var=no"
24397fi
24398
24399rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24400 conftest$ac_exeext conftest.$ac_ext
24401fi
24402ac_res=`eval echo '${'$as_ac_var'}'`
24403 { echo "$as_me:$LINENO: result: $ac_res" >&5
24404echo "${ECHO_T}$ac_res" >&6; }
24405if test `eval echo '${'$as_ac_var'}'` = yes; then
24406 cat >>confdefs.h <<_ACEOF
24407#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24408_ACEOF
24409
24410fi
24411done
24412
24413
24414
24415
24416
24417
24418for ac_func in hypot lgamma log1p round tgamma
Christian Heimes0a8143f2007-12-18 23:22:54 +000024419do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024420as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24421{ echo "$as_me:$LINENO: checking for $ac_func" >&5
24422echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000024423if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024424 echo $ECHO_N "(cached) $ECHO_C" >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000024425else
24426 cat >conftest.$ac_ext <<_ACEOF
24427/* confdefs.h. */
24428_ACEOF
24429cat confdefs.h >>conftest.$ac_ext
24430cat >>conftest.$ac_ext <<_ACEOF
24431/* end confdefs.h. */
24432/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
24433 For example, HP-UX 11i <limits.h> declares gettimeofday. */
24434#define $ac_func innocuous_$ac_func
24435
24436/* System header to define __stub macros and hopefully few prototypes,
24437 which can conflict with char $ac_func (); below.
24438 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
24439 <limits.h> exists even on freestanding compilers. */
24440
24441#ifdef __STDC__
24442# include <limits.h>
24443#else
24444# include <assert.h>
24445#endif
24446
24447#undef $ac_func
24448
24449/* Override any GCC internal prototype to avoid an error.
24450 Use char because int might match the return type of a GCC
24451 builtin and then its argument prototype would still apply. */
24452#ifdef __cplusplus
24453extern "C"
24454#endif
24455char $ac_func ();
24456/* The GNU C library defines this for functions which it implements
24457 to always fail with ENOSYS. Some functions are actually named
24458 something starting with __ and the normal name is an alias. */
24459#if defined __stub_$ac_func || defined __stub___$ac_func
24460choke me
24461#endif
24462
24463int
24464main ()
24465{
24466return $ac_func ();
24467 ;
24468 return 0;
24469}
24470_ACEOF
24471rm -f conftest.$ac_objext conftest$ac_exeext
24472if { (ac_try="$ac_link"
24473case "(($ac_try" in
24474 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24475 *) ac_try_echo=$ac_try;;
24476esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024477eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024478 (eval "$ac_link") 2>conftest.er1
24479 ac_status=$?
24480 grep -v '^ *+' conftest.er1 >conftest.err
24481 rm -f conftest.er1
24482 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024483 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024484 (exit $ac_status); } && {
24485 test -z "$ac_c_werror_flag" ||
24486 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024487 } && test -s conftest$ac_exeext &&
24488 $as_test_x conftest$ac_exeext; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024489 eval "$as_ac_var=yes"
24490else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024491 echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000024492sed 's/^/| /' conftest.$ac_ext >&5
24493
24494 eval "$as_ac_var=no"
24495fi
24496
24497rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24498 conftest$ac_exeext conftest.$ac_ext
24499fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024500ac_res=`eval echo '${'$as_ac_var'}'`
24501 { echo "$as_me:$LINENO: result: $ac_res" >&5
24502echo "${ECHO_T}$ac_res" >&6; }
24503if test `eval echo '${'$as_ac_var'}'` = yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000024504 cat >>confdefs.h <<_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024505#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000024506_ACEOF
24507
24508fi
24509done
24510
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024511{ echo "$as_me:$LINENO: checking whether isinf is declared" >&5
24512echo $ECHO_N "checking whether isinf is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024513if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024514 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024515else
24516 cat >conftest.$ac_ext <<_ACEOF
24517/* confdefs.h. */
24518_ACEOF
24519cat confdefs.h >>conftest.$ac_ext
24520cat >>conftest.$ac_ext <<_ACEOF
24521/* end confdefs.h. */
24522#include <math.h>
24523
24524int
24525main ()
24526{
24527#ifndef isinf
24528 (void) isinf;
24529#endif
24530
24531 ;
24532 return 0;
24533}
24534_ACEOF
24535rm -f conftest.$ac_objext
24536if { (ac_try="$ac_compile"
24537case "(($ac_try" in
24538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24539 *) ac_try_echo=$ac_try;;
24540esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024542 (eval "$ac_compile") 2>conftest.er1
24543 ac_status=$?
24544 grep -v '^ *+' conftest.er1 >conftest.err
24545 rm -f conftest.er1
24546 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024547 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024548 (exit $ac_status); } && {
24549 test -z "$ac_c_werror_flag" ||
24550 test ! -s conftest.err
24551 } && test -s conftest.$ac_objext; then
24552 ac_cv_have_decl_isinf=yes
24553else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024554 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024555sed 's/^/| /' conftest.$ac_ext >&5
24556
24557 ac_cv_have_decl_isinf=no
24558fi
24559
24560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24561fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024562{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24563echo "${ECHO_T}$ac_cv_have_decl_isinf" >&6; }
24564if test $ac_cv_have_decl_isinf = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024565
24566cat >>confdefs.h <<_ACEOF
24567#define HAVE_DECL_ISINF 1
24568_ACEOF
24569
24570
24571else
24572 cat >>confdefs.h <<_ACEOF
24573#define HAVE_DECL_ISINF 0
24574_ACEOF
24575
24576
24577fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024578{ echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24579echo $ECHO_N "checking whether isnan is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024580if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024581 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024582else
24583 cat >conftest.$ac_ext <<_ACEOF
24584/* confdefs.h. */
24585_ACEOF
24586cat confdefs.h >>conftest.$ac_ext
24587cat >>conftest.$ac_ext <<_ACEOF
24588/* end confdefs.h. */
24589#include <math.h>
24590
24591int
24592main ()
24593{
24594#ifndef isnan
24595 (void) isnan;
24596#endif
24597
24598 ;
24599 return 0;
24600}
24601_ACEOF
24602rm -f conftest.$ac_objext
24603if { (ac_try="$ac_compile"
24604case "(($ac_try" in
24605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24606 *) ac_try_echo=$ac_try;;
24607esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024608eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024609 (eval "$ac_compile") 2>conftest.er1
24610 ac_status=$?
24611 grep -v '^ *+' conftest.er1 >conftest.err
24612 rm -f conftest.er1
24613 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024614 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024615 (exit $ac_status); } && {
24616 test -z "$ac_c_werror_flag" ||
24617 test ! -s conftest.err
24618 } && test -s conftest.$ac_objext; then
24619 ac_cv_have_decl_isnan=yes
24620else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024621 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024622sed 's/^/| /' conftest.$ac_ext >&5
24623
24624 ac_cv_have_decl_isnan=no
24625fi
24626
24627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24628fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024629{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24630echo "${ECHO_T}$ac_cv_have_decl_isnan" >&6; }
24631if test $ac_cv_have_decl_isnan = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024632
24633cat >>confdefs.h <<_ACEOF
24634#define HAVE_DECL_ISNAN 1
24635_ACEOF
24636
24637
24638else
24639 cat >>confdefs.h <<_ACEOF
24640#define HAVE_DECL_ISNAN 0
24641_ACEOF
24642
24643
24644fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024645{ echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24646echo $ECHO_N "checking whether isfinite is declared... $ECHO_C" >&6; }
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024647if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024648 echo $ECHO_N "(cached) $ECHO_C" >&6
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024649else
24650 cat >conftest.$ac_ext <<_ACEOF
24651/* confdefs.h. */
24652_ACEOF
24653cat confdefs.h >>conftest.$ac_ext
24654cat >>conftest.$ac_ext <<_ACEOF
24655/* end confdefs.h. */
24656#include <math.h>
24657
24658int
24659main ()
24660{
24661#ifndef isfinite
24662 (void) isfinite;
24663#endif
24664
24665 ;
24666 return 0;
24667}
24668_ACEOF
24669rm -f conftest.$ac_objext
24670if { (ac_try="$ac_compile"
24671case "(($ac_try" in
24672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24673 *) ac_try_echo=$ac_try;;
24674esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024676 (eval "$ac_compile") 2>conftest.er1
24677 ac_status=$?
24678 grep -v '^ *+' conftest.er1 >conftest.err
24679 rm -f conftest.er1
24680 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024682 (exit $ac_status); } && {
24683 test -z "$ac_c_werror_flag" ||
24684 test ! -s conftest.err
24685 } && test -s conftest.$ac_objext; then
24686 ac_cv_have_decl_isfinite=yes
24687else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024688 echo "$as_me: failed program was:" >&5
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024689sed 's/^/| /' conftest.$ac_ext >&5
24690
24691 ac_cv_have_decl_isfinite=no
24692fi
24693
24694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24695fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024696{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24697echo "${ECHO_T}$ac_cv_have_decl_isfinite" >&6; }
24698if test $ac_cv_have_decl_isfinite = yes; then
Mark Dickinsond181e3a2009-01-04 13:57:26 +000024699
24700cat >>confdefs.h <<_ACEOF
24701#define HAVE_DECL_ISFINITE 1
24702_ACEOF
24703
24704
24705else
24706 cat >>confdefs.h <<_ACEOF
24707#define HAVE_DECL_ISFINITE 0
24708_ACEOF
24709
24710
24711fi
24712
24713
Christian Heimes0a8143f2007-12-18 23:22:54 +000024714
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024715LIBS=$LIBS_SAVE
24716
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024717# For multiprocessing module, check that sem_open
24718# actually works. For FreeBSD versions <= 7.2,
24719# the kernel module that provides POSIX semaphores
24720# isn't loaded by default, so an attempt to call
24721# sem_open results in a 'Signal 12' error.
24722{ echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
24723echo $ECHO_N "checking whether POSIX semaphores are enabled... $ECHO_C" >&6; }
24724if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
24725 echo $ECHO_N "(cached) $ECHO_C" >&6
24726else
24727 if test "$cross_compiling" = yes; then
24728 ac_cv_posix_semaphores_enabled=yes
24729else
24730 cat >conftest.$ac_ext <<_ACEOF
24731/* confdefs.h. */
24732_ACEOF
24733cat confdefs.h >>conftest.$ac_ext
24734cat >>conftest.$ac_ext <<_ACEOF
24735/* end confdefs.h. */
24736
24737#include <unistd.h>
24738#include <fcntl.h>
24739#include <stdio.h>
24740#include <semaphore.h>
24741#include <sys/stat.h>
24742
24743int main(void) {
24744 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24745 if (a == SEM_FAILED) {
24746 perror("sem_open");
24747 return 1;
24748 }
24749 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024750 sem_unlink("/autoconf");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024751 return 0;
24752}
24753
24754_ACEOF
24755rm -f conftest$ac_exeext
24756if { (ac_try="$ac_link"
24757case "(($ac_try" in
24758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24759 *) ac_try_echo=$ac_try;;
24760esac
24761eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24762 (eval "$ac_link") 2>&5
24763 ac_status=$?
24764 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24765 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24766 { (case "(($ac_try" in
24767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24768 *) ac_try_echo=$ac_try;;
24769esac
24770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24771 (eval "$ac_try") 2>&5
24772 ac_status=$?
24773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24774 (exit $ac_status); }; }; then
24775 ac_cv_posix_semaphores_enabled=yes
24776else
24777 echo "$as_me: program exited with status $ac_status" >&5
24778echo "$as_me: failed program was:" >&5
24779sed 's/^/| /' conftest.$ac_ext >&5
24780
24781( exit $ac_status )
24782ac_cv_posix_semaphores_enabled=no
24783fi
24784rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24785fi
24786
24787
24788
24789fi
24790
24791{ echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
24792echo "${ECHO_T}$ac_cv_posix_semaphores_enabled" >&6; }
24793if test $ac_cv_posix_semaphores_enabled = no
24794then
24795
24796cat >>confdefs.h <<\_ACEOF
24797#define POSIX_SEMAPHORES_NOT_ENABLED 1
24798_ACEOF
24799
24800fi
24801
24802# Multiprocessing check for broken sem_getvalue
24803{ echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24804echo $ECHO_N "checking for broken sem_getvalue... $ECHO_C" >&6; }
24805if test "${ac_cv_broken_sem_getvalue+set}" = set; then
24806 echo $ECHO_N "(cached) $ECHO_C" >&6
24807else
24808 if test "$cross_compiling" = yes; then
24809 ac_cv_broken_sem_getvalue=yes
24810else
24811 cat >conftest.$ac_ext <<_ACEOF
24812/* confdefs.h. */
24813_ACEOF
24814cat confdefs.h >>conftest.$ac_ext
24815cat >>conftest.$ac_ext <<_ACEOF
24816/* end confdefs.h. */
24817
24818#include <unistd.h>
24819#include <fcntl.h>
24820#include <stdio.h>
24821#include <semaphore.h>
24822#include <sys/stat.h>
24823
24824int main(void){
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024825 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024826 int count;
24827 int res;
24828 if(a==SEM_FAILED){
24829 perror("sem_open");
24830 return 1;
24831
24832 }
24833 res = sem_getvalue(a, &count);
24834 sem_close(a);
Mark Dickinson59dc89e2009-12-13 21:06:06 +000024835 sem_unlink("/autocftw");
Mark Dickinsonc63392c2009-11-28 13:13:13 +000024836 return res==-1 ? 1 : 0;
24837}
24838
24839_ACEOF
24840rm -f conftest$ac_exeext
24841if { (ac_try="$ac_link"
24842case "(($ac_try" in
24843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24844 *) ac_try_echo=$ac_try;;
24845esac
24846eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24847 (eval "$ac_link") 2>&5
24848 ac_status=$?
24849 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24850 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24851 { (case "(($ac_try" in
24852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24853 *) ac_try_echo=$ac_try;;
24854esac
24855eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24856 (eval "$ac_try") 2>&5
24857 ac_status=$?
24858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24859 (exit $ac_status); }; }; then
24860 ac_cv_broken_sem_getvalue=no
24861else
24862 echo "$as_me: program exited with status $ac_status" >&5
24863echo "$as_me: failed program was:" >&5
24864sed 's/^/| /' conftest.$ac_ext >&5
24865
24866( exit $ac_status )
24867ac_cv_broken_sem_getvalue=yes
24868fi
24869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24870fi
24871
24872
24873
24874fi
24875
24876{ echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24877echo "${ECHO_T}$ac_cv_broken_sem_getvalue" >&6; }
24878if test $ac_cv_broken_sem_getvalue = yes
24879then
24880
24881cat >>confdefs.h <<\_ACEOF
24882#define HAVE_BROKEN_SEM_GETVALUE 1
24883_ACEOF
24884
24885fi
24886
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024887# determine what size digit to use for Python's longs
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024888{ echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24889echo $ECHO_N "checking digit size for Python's longs... $ECHO_C" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024890# Check whether --enable-big-digits was given.
24891if test "${enable_big_digits+set}" = set; then
24892 enableval=$enable_big_digits; case $enable_big_digits in
24893yes)
24894 enable_big_digits=30 ;;
24895no)
24896 enable_big_digits=15 ;;
2489715|30)
24898 ;;
24899*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024900 { { echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24901echo "$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 +000024902 { (exit 1); exit 1; }; } ;;
24903esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024904{ echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24905echo "${ECHO_T}$enable_big_digits" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024906
24907cat >>confdefs.h <<_ACEOF
24908#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24909_ACEOF
24910
24911
24912else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024913 { echo "$as_me:$LINENO: result: no value specified" >&5
24914echo "${ECHO_T}no value specified" >&6; }
Mark Dickinsonefc82f72009-03-20 15:51:55 +000024915fi
24916
24917
Guido van Rossumef2255b2000-03-10 22:30:29 +000024918# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024919if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024920 { echo "$as_me:$LINENO: checking for wchar.h" >&5
24921echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024922if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024923 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024924fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024925{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24926echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024927else
Martin v. Löwis11437992002-04-12 09:54:03 +000024928 # Is the header compilable?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024929{ echo "$as_me:$LINENO: checking wchar.h usability" >&5
24930echo $ECHO_N "checking wchar.h usability... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024931cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024932/* confdefs.h. */
24933_ACEOF
24934cat confdefs.h >>conftest.$ac_ext
24935cat >>conftest.$ac_ext <<_ACEOF
24936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024937$ac_includes_default
24938#include <wchar.h>
24939_ACEOF
24940rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024941if { (ac_try="$ac_compile"
24942case "(($ac_try" in
24943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24944 *) ac_try_echo=$ac_try;;
24945esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024947 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024948 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024949 grep -v '^ *+' conftest.er1 >conftest.err
24950 rm -f conftest.er1
24951 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024953 (exit $ac_status); } && {
24954 test -z "$ac_c_werror_flag" ||
24955 test ! -s conftest.err
24956 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024957 ac_header_compiler=yes
24958else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024959 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024960sed 's/^/| /' conftest.$ac_ext >&5
24961
Martin v. Löwiseba40652007-08-30 20:10:57 +000024962 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024963fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024964
24965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024966{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24967echo "${ECHO_T}$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024968
24969# Is the header present?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024970{ echo "$as_me:$LINENO: checking wchar.h presence" >&5
24971echo $ECHO_N "checking wchar.h presence... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024972cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024973/* confdefs.h. */
24974_ACEOF
24975cat confdefs.h >>conftest.$ac_ext
24976cat >>conftest.$ac_ext <<_ACEOF
24977/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024978#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024979_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024980if { (ac_try="$ac_cpp conftest.$ac_ext"
24981case "(($ac_try" in
24982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24983 *) ac_try_echo=$ac_try;;
24984esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024985eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024986 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024987 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024988 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024989 rm -f conftest.er1
24990 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024991 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024992 (exit $ac_status); } >/dev/null && {
24993 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24994 test ! -s conftest.err
24995 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024996 ac_header_preproc=yes
24997else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000024998 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024999sed 's/^/| /' conftest.$ac_ext >&5
25000
Martin v. Löwis11437992002-04-12 09:54:03 +000025001 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025002fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025003
Martin v. Löwis11437992002-04-12 09:54:03 +000025004rm -f conftest.err conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025005{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
25006echo "${ECHO_T}$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025007
25008# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025009case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
25010 yes:no: )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025011 { echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
25012echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
25013 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
25014echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000025015 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025016 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000025017 no:yes:* )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025018 { echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
25019echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
25020 { echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
25021echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
25022 { echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
25023echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
25024 { echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
25025echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
25026 { echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
25027echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
25028 { echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
25029echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000025030 ( cat <<\_ASBOX
Georg Brandl464432d2009-05-20 18:24:08 +000025031## -------------------------------------- ##
25032## Report this to http://bugs.python.org/ ##
25033## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000025034_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000025035 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000025036 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025037esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025038{ echo "$as_me:$LINENO: checking for wchar.h" >&5
25039echo $ECHO_N "checking for wchar.h... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025040if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025041 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025042else
25043 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000025044fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025045{ echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
25046echo "${ECHO_T}$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025047
25048fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025049if test $ac_cv_header_wchar_h = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025050
25051
25052cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000025053#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025054_ACEOF
25055
Martin v. Löwisc45929e2002-04-06 10:10:49 +000025056 wchar_h="yes"
25057
Guido van Rossumef2255b2000-03-10 22:30:29 +000025058else
Martin v. Löwis11437992002-04-12 09:54:03 +000025059 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000025060
25061fi
25062
Michael W. Hudson54241132001-12-07 15:38:26 +000025063
Martin v. Löwis11437992002-04-12 09:54:03 +000025064
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025065# determine wchar_t size
25066if test "$wchar_h" = yes
25067then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025068 { echo "$as_me:$LINENO: checking for wchar_t" >&5
25069echo $ECHO_N "checking for wchar_t... $ECHO_C" >&6; }
25070if test "${ac_cv_type_wchar_t+set}" = set; then
25071 echo $ECHO_N "(cached) $ECHO_C" >&6
25072else
25073 cat >conftest.$ac_ext <<_ACEOF
25074/* confdefs.h. */
25075_ACEOF
25076cat confdefs.h >>conftest.$ac_ext
25077cat >>conftest.$ac_ext <<_ACEOF
25078/* end confdefs.h. */
25079#include <wchar.h>
25080
25081typedef wchar_t ac__type_new_;
25082int
25083main ()
25084{
25085if ((ac__type_new_ *) 0)
25086 return 0;
25087if (sizeof (ac__type_new_))
25088 return 0;
25089 ;
25090 return 0;
25091}
25092_ACEOF
25093rm -f conftest.$ac_objext
25094if { (ac_try="$ac_compile"
25095case "(($ac_try" in
25096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25097 *) ac_try_echo=$ac_try;;
25098esac
25099eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25100 (eval "$ac_compile") 2>conftest.er1
25101 ac_status=$?
25102 grep -v '^ *+' conftest.er1 >conftest.err
25103 rm -f conftest.er1
25104 cat conftest.err >&5
25105 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25106 (exit $ac_status); } && {
25107 test -z "$ac_c_werror_flag" ||
25108 test ! -s conftest.err
25109 } && test -s conftest.$ac_objext; then
25110 ac_cv_type_wchar_t=yes
25111else
25112 echo "$as_me: failed program was:" >&5
25113sed 's/^/| /' conftest.$ac_ext >&5
25114
25115 ac_cv_type_wchar_t=no
25116fi
25117
25118rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25119fi
25120{ echo "$as_me:$LINENO: result: $ac_cv_type_wchar_t" >&5
25121echo "${ECHO_T}$ac_cv_type_wchar_t" >&6; }
25122
25123# The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000025124# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
25125# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
25126# This bug is HP SR number 8606223364.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025127{ echo "$as_me:$LINENO: checking size of wchar_t" >&5
25128echo $ECHO_N "checking size of wchar_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025129if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025130 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000025131else
Martin v. Löwis11437992002-04-12 09:54:03 +000025132 if test "$cross_compiling" = yes; then
25133 # Depending upon the size, compute the lo and hi bounds.
25134cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025135/* confdefs.h. */
25136_ACEOF
25137cat confdefs.h >>conftest.$ac_ext
25138cat >>conftest.$ac_ext <<_ACEOF
25139/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025140#include <wchar.h>
25141
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025142 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025143int
25144main ()
25145{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025146static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025147test_array [0] = 0
25148
25149 ;
25150 return 0;
25151}
25152_ACEOF
25153rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025154if { (ac_try="$ac_compile"
25155case "(($ac_try" in
25156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25157 *) ac_try_echo=$ac_try;;
25158esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025159eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025160 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025162 grep -v '^ *+' conftest.er1 >conftest.err
25163 rm -f conftest.er1
25164 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025165 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025166 (exit $ac_status); } && {
25167 test -z "$ac_c_werror_flag" ||
25168 test ! -s conftest.err
25169 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025170 ac_lo=0 ac_mid=0
25171 while :; do
25172 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025173/* confdefs.h. */
25174_ACEOF
25175cat confdefs.h >>conftest.$ac_ext
25176cat >>conftest.$ac_ext <<_ACEOF
25177/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025178#include <wchar.h>
25179
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025180 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025181int
25182main ()
25183{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025184static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025185test_array [0] = 0
25186
25187 ;
25188 return 0;
25189}
25190_ACEOF
25191rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025192if { (ac_try="$ac_compile"
25193case "(($ac_try" in
25194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25195 *) ac_try_echo=$ac_try;;
25196esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025197eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025200 grep -v '^ *+' conftest.er1 >conftest.err
25201 rm -f conftest.er1
25202 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025203 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025204 (exit $ac_status); } && {
25205 test -z "$ac_c_werror_flag" ||
25206 test ! -s conftest.err
25207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025208 ac_hi=$ac_mid; break
25209else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025210 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025211sed 's/^/| /' conftest.$ac_ext >&5
25212
Martin v. Löwiseba40652007-08-30 20:10:57 +000025213 ac_lo=`expr $ac_mid + 1`
25214 if test $ac_lo -le $ac_mid; then
25215 ac_lo= ac_hi=
25216 break
25217 fi
25218 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025219fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025220
25221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025222 done
25223else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025224 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025225sed 's/^/| /' conftest.$ac_ext >&5
25226
Martin v. Löwiseba40652007-08-30 20:10:57 +000025227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025228/* confdefs.h. */
25229_ACEOF
25230cat confdefs.h >>conftest.$ac_ext
25231cat >>conftest.$ac_ext <<_ACEOF
25232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025233#include <wchar.h>
25234
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025235 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025236int
25237main ()
25238{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025239static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025240test_array [0] = 0
25241
25242 ;
25243 return 0;
25244}
25245_ACEOF
25246rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025247if { (ac_try="$ac_compile"
25248case "(($ac_try" in
25249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25250 *) ac_try_echo=$ac_try;;
25251esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025253 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025254 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025255 grep -v '^ *+' conftest.er1 >conftest.err
25256 rm -f conftest.er1
25257 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025259 (exit $ac_status); } && {
25260 test -z "$ac_c_werror_flag" ||
25261 test ! -s conftest.err
25262 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025263 ac_hi=-1 ac_mid=-1
25264 while :; do
25265 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025266/* confdefs.h. */
25267_ACEOF
25268cat confdefs.h >>conftest.$ac_ext
25269cat >>conftest.$ac_ext <<_ACEOF
25270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025271#include <wchar.h>
25272
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025273 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025274int
25275main ()
25276{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025277static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025278test_array [0] = 0
25279
25280 ;
25281 return 0;
25282}
25283_ACEOF
25284rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025285if { (ac_try="$ac_compile"
25286case "(($ac_try" in
25287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25288 *) ac_try_echo=$ac_try;;
25289esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025293 grep -v '^ *+' conftest.er1 >conftest.err
25294 rm -f conftest.er1
25295 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025297 (exit $ac_status); } && {
25298 test -z "$ac_c_werror_flag" ||
25299 test ! -s conftest.err
25300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025301 ac_lo=$ac_mid; break
25302else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025303 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025304sed 's/^/| /' conftest.$ac_ext >&5
25305
Martin v. Löwiseba40652007-08-30 20:10:57 +000025306 ac_hi=`expr '(' $ac_mid ')' - 1`
25307 if test $ac_mid -le $ac_hi; then
25308 ac_lo= ac_hi=
25309 break
25310 fi
25311 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000025312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025313
25314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025315 done
25316else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025317 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025318sed 's/^/| /' conftest.$ac_ext >&5
25319
Martin v. Löwiseba40652007-08-30 20:10:57 +000025320 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000025321fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025322
25323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025325
25326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025327# Binary search between lo and hi bounds.
25328while test "x$ac_lo" != "x$ac_hi"; do
25329 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
25330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025331/* confdefs.h. */
25332_ACEOF
25333cat confdefs.h >>conftest.$ac_ext
25334cat >>conftest.$ac_ext <<_ACEOF
25335/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025336#include <wchar.h>
25337
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025338 typedef wchar_t ac__type_sizeof_;
Martin v. Löwis11437992002-04-12 09:54:03 +000025339int
25340main ()
25341{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025342static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000025343test_array [0] = 0
25344
25345 ;
25346 return 0;
25347}
25348_ACEOF
25349rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025350if { (ac_try="$ac_compile"
25351case "(($ac_try" in
25352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25353 *) ac_try_echo=$ac_try;;
25354esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025355eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025358 grep -v '^ *+' conftest.er1 >conftest.err
25359 rm -f conftest.er1
25360 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025361 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025362 (exit $ac_status); } && {
25363 test -z "$ac_c_werror_flag" ||
25364 test ! -s conftest.err
25365 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025366 ac_hi=$ac_mid
25367else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025368 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025369sed 's/^/| /' conftest.$ac_ext >&5
25370
Martin v. Löwiseba40652007-08-30 20:10:57 +000025371 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000025372fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025373
25374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025375done
25376case $ac_lo in
25377?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025378'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025379 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025380See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025381echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025382See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025383 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025384 else
25385 ac_cv_sizeof_wchar_t=0
25386 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025387esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025388else
Martin v. Löwis11437992002-04-12 09:54:03 +000025389 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025390/* confdefs.h. */
25391_ACEOF
25392cat confdefs.h >>conftest.$ac_ext
25393cat >>conftest.$ac_ext <<_ACEOF
25394/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025395#include <wchar.h>
25396
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025397 typedef wchar_t ac__type_sizeof_;
25398static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
25399static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000025400#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025401#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025402int
25403main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025404{
Martin v. Löwis11437992002-04-12 09:54:03 +000025405
25406 FILE *f = fopen ("conftest.val", "w");
25407 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000025408 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025409 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000025410 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025411 long int i = longval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025412 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025413 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025414 fprintf (f, "%ld\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025415 }
25416 else
25417 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000025418 unsigned long int i = ulongval ();
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025419 if (i != ((long int) (sizeof (ac__type_sizeof_))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000025420 return 1;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025421 fprintf (f, "%lu\n", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000025422 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025423 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025424
25425 ;
25426 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025427}
Martin v. Löwis11437992002-04-12 09:54:03 +000025428_ACEOF
25429rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025430if { (ac_try="$ac_link"
25431case "(($ac_try" in
25432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25433 *) ac_try_echo=$ac_try;;
25434esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025436 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025437 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025438 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025440 { (case "(($ac_try" in
25441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25442 *) ac_try_echo=$ac_try;;
25443esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025444eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025445 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025446 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025448 (exit $ac_status); }; }; then
25449 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000025450else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025451 echo "$as_me: program exited with status $ac_status" >&5
25452echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025453sed 's/^/| /' conftest.$ac_ext >&5
25454
Martin v. Löwis11437992002-04-12 09:54:03 +000025455( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000025456if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025457 { { echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025458See \`config.log' for more details." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025459echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000025460See \`config.log' for more details." >&2;}
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025461 { (exit 77); exit 77; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025462 else
25463 ac_cv_sizeof_wchar_t=0
25464 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025465fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025466rm -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 +000025467fi
25468rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000025469fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025470{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
25471echo "${ECHO_T}$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025472
25473
25474
Martin v. Löwis11437992002-04-12 09:54:03 +000025475cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025476#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025477_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025478
Michael W. Hudson54241132001-12-07 15:38:26 +000025479
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025480fi
25481
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025482{ echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
25483echo $ECHO_N "checking for UCS-4 tcl... $ECHO_C" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025484have_ucs4_tcl=no
25485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025486/* confdefs.h. */
25487_ACEOF
25488cat confdefs.h >>conftest.$ac_ext
25489cat >>conftest.$ac_ext <<_ACEOF
25490/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025491
25492#include <tcl.h>
25493#if TCL_UTF_MAX != 6
25494# error "NOT UCS4_TCL"
25495#endif
25496int
25497main ()
25498{
25499
25500 ;
25501 return 0;
25502}
25503_ACEOF
25504rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025505if { (ac_try="$ac_compile"
25506case "(($ac_try" in
25507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25508 *) ac_try_echo=$ac_try;;
25509esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025510eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025511 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025512 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025513 grep -v '^ *+' conftest.er1 >conftest.err
25514 rm -f conftest.er1
25515 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025516 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025517 (exit $ac_status); } && {
25518 test -z "$ac_c_werror_flag" ||
25519 test ! -s conftest.err
25520 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025521
25522
25523cat >>confdefs.h <<\_ACEOF
25524#define HAVE_UCS4_TCL 1
25525_ACEOF
25526
25527 have_ucs4_tcl=yes
25528
25529else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025530 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025531sed 's/^/| /' conftest.$ac_ext >&5
25532
Martin v. Löwiseba40652007-08-30 20:10:57 +000025533
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025535
25536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025537{ echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
25538echo "${ECHO_T}$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025539
Skip Montanaro6dead952003-09-25 14:50:04 +000025540# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025541if test "$wchar_h" = yes
25542then
25543 # check whether wchar_t is signed or not
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025544 { echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
25545echo $ECHO_N "checking whether wchar_t is signed... $ECHO_C" >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025546 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025547 echo $ECHO_N "(cached) $ECHO_C" >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025548else
25549
25550 if test "$cross_compiling" = yes; then
25551 ac_cv_wchar_t_signed=yes
25552else
25553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025554/* confdefs.h. */
25555_ACEOF
25556cat confdefs.h >>conftest.$ac_ext
25557cat >>conftest.$ac_ext <<_ACEOF
25558/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025559
25560 #include <wchar.h>
25561 int main()
25562 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000025563 /* Success: exit code 0 */
25564 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025565 }
25566
25567_ACEOF
25568rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025569if { (ac_try="$ac_link"
25570case "(($ac_try" in
25571 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25572 *) ac_try_echo=$ac_try;;
25573esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025574eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025575 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025576 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025577 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025578 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025579 { (case "(($ac_try" in
25580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25581 *) ac_try_echo=$ac_try;;
25582esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025583eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025584 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025585 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025586 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025587 (exit $ac_status); }; }; then
25588 ac_cv_wchar_t_signed=yes
25589else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025590 echo "$as_me: program exited with status $ac_status" >&5
25591echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025592sed 's/^/| /' conftest.$ac_ext >&5
25593
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025594( exit $ac_status )
25595ac_cv_wchar_t_signed=no
25596fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025597rm -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 +000025598fi
25599
Martin v. Löwiseba40652007-08-30 20:10:57 +000025600
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025601fi
25602
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025603 { echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
25604echo "${ECHO_T}$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025605fi
25606
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025607{ echo "$as_me:$LINENO: checking what type to use for unicode" >&5
25608echo $ECHO_N "checking what type to use for unicode... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025609# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025610if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025611 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025612else
25613 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000025614fi
25615
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025616
25617if test $enable_unicode = yes
25618then
Martin v. Löwisfd917792001-06-27 20:22:04 +000025619 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000025620 case "$have_ucs4_tcl" in
25621 yes) enable_unicode="ucs4"
25622 ;;
25623 *) enable_unicode="ucs2"
25624 ;;
25625 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025626fi
25627
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025628
25629
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025630case "$enable_unicode" in
25631ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000025632 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025633#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000025634_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025635
25636 ;;
25637ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000025638 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025639#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000025640_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025641
25642 ;;
Benjamin Peterson8b650542010-02-27 00:11:42 +000025643*) { { echo "$as_me:$LINENO: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&5
25644echo "$as_me: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&2;}
25645 { (exit 1); exit 1; }; } ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025646esac
25647
Michael W. Hudson54241132001-12-07 15:38:26 +000025648
Martin v. Löwis11437992002-04-12 09:54:03 +000025649
25650
Martin v. Löwis0036cba2002-04-12 09:58:45 +000025651
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025652if test "$enable_unicode" = "no"
25653then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025654 UNICODE_OBJS=""
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025655 { echo "$as_me:$LINENO: result: not used" >&5
25656echo "${ECHO_T}not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025657else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000025658 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000025659
25660cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025661#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025662_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025663
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000025664
25665 # wchar_t is only usable if it maps to an unsigned type
25666 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000025667 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025668 then
25669 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025670
Martin v. Löwis11437992002-04-12 09:54:03 +000025671cat >>confdefs.h <<\_ACEOF
25672#define HAVE_USABLE_WCHAR_T 1
25673_ACEOF
25674
25675 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025676#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000025677_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025678
25679 elif test "$ac_cv_sizeof_short" = "$unicode_size"
25680 then
25681 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000025682 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025683#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025684_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025685
25686 elif test "$ac_cv_sizeof_long" = "$unicode_size"
25687 then
25688 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000025689 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025690#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025691_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025692
25693 else
25694 PY_UNICODE_TYPE="no type found"
25695 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025696 { echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25697echo "${ECHO_T}$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025698fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000025699
25700# check for endianness
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025701{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25702echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025703if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025704 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025705else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025706 # See if sys/param.h defines the BYTE_ORDER macro.
25707cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025708/* confdefs.h. */
25709_ACEOF
25710cat confdefs.h >>conftest.$ac_ext
25711cat >>conftest.$ac_ext <<_ACEOF
25712/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025713#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025714#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025715
Martin v. Löwis11437992002-04-12 09:54:03 +000025716int
25717main ()
25718{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025719#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \
25720 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN)
25721 bogus endian macros
25722#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025723
25724 ;
25725 return 0;
25726}
25727_ACEOF
25728rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025729if { (ac_try="$ac_compile"
25730case "(($ac_try" in
25731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25732 *) ac_try_echo=$ac_try;;
25733esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025734eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025737 grep -v '^ *+' conftest.er1 >conftest.err
25738 rm -f conftest.er1
25739 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025740 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025741 (exit $ac_status); } && {
25742 test -z "$ac_c_werror_flag" ||
25743 test ! -s conftest.err
25744 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025745 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025746cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025747/* confdefs.h. */
25748_ACEOF
25749cat confdefs.h >>conftest.$ac_ext
25750cat >>conftest.$ac_ext <<_ACEOF
25751/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025752#include <sys/types.h>
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025753#include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025754
Martin v. Löwis11437992002-04-12 09:54:03 +000025755int
25756main ()
25757{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025758#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025759 not big endian
25760#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025761
25762 ;
25763 return 0;
25764}
25765_ACEOF
25766rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025767if { (ac_try="$ac_compile"
25768case "(($ac_try" in
25769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25770 *) ac_try_echo=$ac_try;;
25771esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025773 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025774 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025775 grep -v '^ *+' conftest.er1 >conftest.err
25776 rm -f conftest.er1
25777 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025779 (exit $ac_status); } && {
25780 test -z "$ac_c_werror_flag" ||
25781 test ! -s conftest.err
25782 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025783 ac_cv_c_bigendian=yes
25784else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025785 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025786sed 's/^/| /' conftest.$ac_ext >&5
25787
Martin v. Löwiseba40652007-08-30 20:10:57 +000025788 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025789fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025790
25791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025792else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025793 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025794sed 's/^/| /' conftest.$ac_ext >&5
25795
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025796 # It does not; compile a test program.
25797if test "$cross_compiling" = yes; then
25798 # try to guess the endianness by grepping values into an object file
25799 ac_cv_c_bigendian=unknown
25800 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025801/* confdefs.h. */
25802_ACEOF
25803cat confdefs.h >>conftest.$ac_ext
25804cat >>conftest.$ac_ext <<_ACEOF
25805/* end confdefs.h. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025806short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25807short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25808void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
25809short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25810short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25811void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025812int
25813main ()
25814{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025815 _ascii (); _ebcdic ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025816 ;
25817 return 0;
25818}
25819_ACEOF
25820rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025821if { (ac_try="$ac_compile"
25822case "(($ac_try" in
25823 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25824 *) ac_try_echo=$ac_try;;
25825esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025826eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025827 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025828 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025829 grep -v '^ *+' conftest.er1 >conftest.err
25830 rm -f conftest.er1
25831 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025832 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025833 (exit $ac_status); } && {
25834 test -z "$ac_c_werror_flag" ||
25835 test ! -s conftest.err
25836 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025837 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025838 ac_cv_c_bigendian=yes
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025839fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025840if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25841 if test "$ac_cv_c_bigendian" = unknown; then
25842 ac_cv_c_bigendian=no
25843 else
25844 # finding both strings is unlikely to happen, but who knows?
25845 ac_cv_c_bigendian=unknown
25846 fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025847fi
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025848else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025849 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025850sed 's/^/| /' conftest.$ac_ext >&5
25851
Martin v. Löwiseba40652007-08-30 20:10:57 +000025852
Martin v. Löwis11437992002-04-12 09:54:03 +000025853fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025854
25855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025856else
25857 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025858/* confdefs.h. */
25859_ACEOF
25860cat confdefs.h >>conftest.$ac_ext
25861cat >>conftest.$ac_ext <<_ACEOF
25862/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000025863$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025864int
25865main ()
25866{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025867
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025868 /* Are we little or big endian? From Harbison&Steele. */
25869 union
25870 {
25871 long int l;
25872 char c[sizeof (long int)];
25873 } u;
25874 u.l = 1;
25875 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000025876
25877 ;
25878 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025879}
Martin v. Löwis11437992002-04-12 09:54:03 +000025880_ACEOF
25881rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025882if { (ac_try="$ac_link"
25883case "(($ac_try" in
25884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25885 *) ac_try_echo=$ac_try;;
25886esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025888 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025889 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025890 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025891 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025892 { (case "(($ac_try" in
25893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25894 *) ac_try_echo=$ac_try;;
25895esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025896eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025897 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025898 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025899 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025900 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025901 ac_cv_c_bigendian=no
25902else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025903 echo "$as_me: program exited with status $ac_status" >&5
25904echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025905sed 's/^/| /' conftest.$ac_ext >&5
25906
Martin v. Löwis11437992002-04-12 09:54:03 +000025907( exit $ac_status )
25908ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025909fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025910rm -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 +000025911fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025912
25913
Martin v. Löwis11437992002-04-12 09:54:03 +000025914fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025915
25916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25917fi
25918{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25919echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
25920case $ac_cv_c_bigendian in
25921 yes)
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025922
25923cat >>confdefs.h <<\_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025924#define WORDS_BIGENDIAN 1
Alexandre Vassalottia2db6872009-07-17 07:46:46 +000025925_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025926 ;;
25927 no)
25928 ;;
25929 *)
25930 { { echo "$as_me:$LINENO: error: unknown endianness
25931presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25932echo "$as_me: error: unknown endianness
25933presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025934 { (exit 1); exit 1; }; } ;;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025935esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025936
Michael W. Hudson54241132001-12-07 15:38:26 +000025937
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025938# Check whether right shifting a negative integer extends the sign bit
25939# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025940{ echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25941echo $ECHO_N "checking whether right shift extends the sign bit... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025942if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025943 echo $ECHO_N "(cached) $ECHO_C" >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025944else
Martin v. Löwis11437992002-04-12 09:54:03 +000025945
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025946if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025947 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025948else
Martin v. Löwis11437992002-04-12 09:54:03 +000025949 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025950/* confdefs.h. */
25951_ACEOF
25952cat confdefs.h >>conftest.$ac_ext
25953cat >>conftest.$ac_ext <<_ACEOF
25954/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025955
25956int main()
25957{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025958 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025959}
25960
Martin v. Löwis11437992002-04-12 09:54:03 +000025961_ACEOF
25962rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025963if { (ac_try="$ac_link"
25964case "(($ac_try" in
25965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25966 *) ac_try_echo=$ac_try;;
25967esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025969 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025970 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025971 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025972 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025973 { (case "(($ac_try" in
25974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25975 *) ac_try_echo=$ac_try;;
25976esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025977eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025978 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025979 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025980 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025981 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025982 ac_cv_rshift_extends_sign=yes
25983else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025984 echo "$as_me: program exited with status $ac_status" >&5
25985echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025986sed 's/^/| /' conftest.$ac_ext >&5
25987
Martin v. Löwis11437992002-04-12 09:54:03 +000025988( exit $ac_status )
25989ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025990fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025991rm -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 +000025992fi
25993
Martin v. Löwiseba40652007-08-30 20:10:57 +000025994
25995fi
25996
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000025997{ echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25998echo "${ECHO_T}$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025999if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026000then
Martin v. Löwis11437992002-04-12 09:54:03 +000026001
26002cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026003#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026004_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026005
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026006fi
26007
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026008# check for getc_unlocked and related locking functions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026009{ echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
26010echo $ECHO_N "checking for getc_unlocked() and friends... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026011if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026012 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026013else
Martin v. Löwis11437992002-04-12 09:54:03 +000026014
26015cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026016/* confdefs.h. */
26017_ACEOF
26018cat confdefs.h >>conftest.$ac_ext
26019cat >>conftest.$ac_ext <<_ACEOF
26020/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026021#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026022int
26023main ()
26024{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026025
26026 FILE *f = fopen("/dev/null", "r");
26027 flockfile(f);
26028 getc_unlocked(f);
26029 funlockfile(f);
26030
Martin v. Löwis11437992002-04-12 09:54:03 +000026031 ;
26032 return 0;
26033}
26034_ACEOF
26035rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026036if { (ac_try="$ac_link"
26037case "(($ac_try" in
26038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26039 *) ac_try_echo=$ac_try;;
26040esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026041eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026042 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026043 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026044 grep -v '^ *+' conftest.er1 >conftest.err
26045 rm -f conftest.er1
26046 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026047 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026048 (exit $ac_status); } && {
26049 test -z "$ac_c_werror_flag" ||
26050 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026051 } && test -s conftest$ac_exeext &&
26052 $as_test_x conftest$ac_exeext; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026053 ac_cv_have_getc_unlocked=yes
26054else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026055 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026056sed 's/^/| /' conftest.$ac_ext >&5
26057
Martin v. Löwiseba40652007-08-30 20:10:57 +000026058 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026059fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026060
26061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026062 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026063fi
26064
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026065{ echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
26066echo "${ECHO_T}$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026067if test "$ac_cv_have_getc_unlocked" = yes
26068then
Martin v. Löwis11437992002-04-12 09:54:03 +000026069
26070cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026071#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026072_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000026073
26074fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000026075
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026076# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000026077# save the value of LIBS so we don't actually link Python with readline
26078LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026079
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026080# On some systems we need to link readline to a termcap compatible
26081# library. NOTE: Keep the precedence of listed libraries synchronised
26082# with setup.py.
26083py_cv_lib_readline=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026084{ echo "$as_me:$LINENO: checking how to link readline libs" >&5
26085echo $ECHO_N "checking how to link readline libs... $ECHO_C" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026086for py_libtermcap in "" ncursesw ncurses curses termcap; do
26087 if test -z "$py_libtermcap"; then
26088 READLINE_LIBS="-lreadline"
26089 else
26090 READLINE_LIBS="-lreadline -l$py_libtermcap"
26091 fi
26092 LIBS="$READLINE_LIBS $LIBS_no_readline"
26093 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026094/* confdefs.h. */
26095_ACEOF
26096cat confdefs.h >>conftest.$ac_ext
26097cat >>conftest.$ac_ext <<_ACEOF
26098/* end confdefs.h. */
26099
Martin v. Löwiseba40652007-08-30 20:10:57 +000026100/* Override any GCC internal prototype to avoid an error.
26101 Use char because int might match the return type of a GCC
26102 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026103#ifdef __cplusplus
26104extern "C"
26105#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026106char readline ();
26107int
26108main ()
26109{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026110return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026111 ;
26112 return 0;
26113}
26114_ACEOF
26115rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026116if { (ac_try="$ac_link"
26117case "(($ac_try" in
26118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26119 *) ac_try_echo=$ac_try;;
26120esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026122 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026123 ac_status=$?
26124 grep -v '^ *+' conftest.er1 >conftest.err
26125 rm -f conftest.er1
26126 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026127 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026128 (exit $ac_status); } && {
26129 test -z "$ac_c_werror_flag" ||
26130 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026131 } && test -s conftest$ac_exeext &&
26132 $as_test_x conftest$ac_exeext; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026133 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026134else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026135 echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026136sed 's/^/| /' conftest.$ac_ext >&5
26137
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026138
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026139fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026140
26141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026142 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026143 if test $py_cv_lib_readline = yes; then
26144 break
26145 fi
26146done
26147# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
26148#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000026149if test $py_cv_lib_readline = no; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026150 { echo "$as_me:$LINENO: result: none" >&5
26151echo "${ECHO_T}none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026152else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026153 { echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
26154echo "${ECHO_T}$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000026155
26156cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026157#define HAVE_LIBREADLINE 1
26158_ACEOF
26159
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000026160fi
26161
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026162# check for readline 2.1
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026163{ echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
26164echo $ECHO_N "checking for rl_callback_handler_install in -lreadline... $ECHO_C" >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026165if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026166 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026167else
26168 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026169LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026170cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026171/* confdefs.h. */
26172_ACEOF
26173cat confdefs.h >>conftest.$ac_ext
26174cat >>conftest.$ac_ext <<_ACEOF
26175/* end confdefs.h. */
26176
Martin v. Löwiseba40652007-08-30 20:10:57 +000026177/* Override any GCC internal prototype to avoid an error.
26178 Use char because int might match the return type of a GCC
26179 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026180#ifdef __cplusplus
26181extern "C"
26182#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026183char rl_callback_handler_install ();
26184int
26185main ()
26186{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026187return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026188 ;
26189 return 0;
26190}
26191_ACEOF
26192rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026193if { (ac_try="$ac_link"
26194case "(($ac_try" in
26195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26196 *) ac_try_echo=$ac_try;;
26197esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026199 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026201 grep -v '^ *+' conftest.er1 >conftest.err
26202 rm -f conftest.er1
26203 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026205 (exit $ac_status); } && {
26206 test -z "$ac_c_werror_flag" ||
26207 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026208 } && test -s conftest$ac_exeext &&
26209 $as_test_x conftest$ac_exeext; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026210 ac_cv_lib_readline_rl_callback_handler_install=yes
26211else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026212 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026213sed 's/^/| /' conftest.$ac_ext >&5
26214
Martin v. Löwiseba40652007-08-30 20:10:57 +000026215 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026216fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026217
26218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026219 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026220LIBS=$ac_check_lib_save_LIBS
26221fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026222{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
26223echo "${ECHO_T}$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
26224if test $ac_cv_lib_readline_rl_callback_handler_install = yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026225
26226cat >>confdefs.h <<\_ACEOF
26227#define HAVE_RL_CALLBACK 1
26228_ACEOF
26229
26230fi
26231
26232
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026233# check for readline 2.2
26234cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026235/* confdefs.h. */
26236_ACEOF
26237cat confdefs.h >>conftest.$ac_ext
26238cat >>conftest.$ac_ext <<_ACEOF
26239/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026240#include <readline/readline.h>
26241_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026242if { (ac_try="$ac_cpp conftest.$ac_ext"
26243case "(($ac_try" in
26244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26245 *) ac_try_echo=$ac_try;;
26246esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026247eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026248 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026249 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000026250 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026251 rm -f conftest.er1
26252 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026253 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026254 (exit $ac_status); } >/dev/null && {
26255 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26256 test ! -s conftest.err
26257 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026258 have_readline=yes
26259else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026260 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026261sed 's/^/| /' conftest.$ac_ext >&5
26262
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026263 have_readline=no
26264fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026265
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026266rm -f conftest.err conftest.$ac_ext
26267if test $have_readline = yes
26268then
26269 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026270/* confdefs.h. */
26271_ACEOF
26272cat confdefs.h >>conftest.$ac_ext
26273cat >>conftest.$ac_ext <<_ACEOF
26274/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026275#include <readline/readline.h>
26276
26277_ACEOF
26278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000026279 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026280
26281cat >>confdefs.h <<\_ACEOF
26282#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
26283_ACEOF
26284
26285fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000026286rm -f conftest*
Antoine Pitroud9ff74e2009-10-26 19:16:46 +000026287
26288 cat >conftest.$ac_ext <<_ACEOF
26289/* confdefs.h. */
26290_ACEOF
26291cat confdefs.h >>conftest.$ac_ext
26292cat >>conftest.$ac_ext <<_ACEOF
26293/* end confdefs.h. */
26294#include <readline/readline.h>
26295
26296_ACEOF
26297if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26298 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
26299
26300cat >>confdefs.h <<\_ACEOF
26301#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
26302_ACEOF
26303
26304fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000026305rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000026306
26307fi
26308
Martin v. Löwis0daad592001-09-30 21:09:59 +000026309# check for readline 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026310{ echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
26311echo $ECHO_N "checking for rl_pre_input_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026312if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026313 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000026314else
Martin v. Löwis11437992002-04-12 09:54:03 +000026315 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026316LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026318/* confdefs.h. */
26319_ACEOF
26320cat confdefs.h >>conftest.$ac_ext
26321cat >>conftest.$ac_ext <<_ACEOF
26322/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026323
Martin v. Löwiseba40652007-08-30 20:10:57 +000026324/* Override any GCC internal prototype to avoid an error.
26325 Use char because int might match the return type of a GCC
26326 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026327#ifdef __cplusplus
26328extern "C"
26329#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026330char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026331int
26332main ()
26333{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026334return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026335 ;
26336 return 0;
26337}
26338_ACEOF
26339rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026340if { (ac_try="$ac_link"
26341case "(($ac_try" in
26342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26343 *) ac_try_echo=$ac_try;;
26344esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026346 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026348 grep -v '^ *+' conftest.er1 >conftest.err
26349 rm -f conftest.er1
26350 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026351 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026352 (exit $ac_status); } && {
26353 test -z "$ac_c_werror_flag" ||
26354 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026355 } && test -s conftest$ac_exeext &&
26356 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026357 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000026358else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026359 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026360sed 's/^/| /' conftest.$ac_ext >&5
26361
Martin v. Löwiseba40652007-08-30 20:10:57 +000026362 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000026363fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026364
26365rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026366 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026367LIBS=$ac_check_lib_save_LIBS
26368fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026369{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
26370echo "${ECHO_T}$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
26371if test $ac_cv_lib_readline_rl_pre_input_hook = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026372
Martin v. Löwis11437992002-04-12 09:54:03 +000026373cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026374#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026375_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000026376
Martin v. Löwis0daad592001-09-30 21:09:59 +000026377fi
26378
Michael W. Hudson54241132001-12-07 15:38:26 +000026379
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026380# also in 4.0
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026381{ echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
26382echo $ECHO_N "checking for rl_completion_display_matches_hook in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026383if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026384 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026385else
26386 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026387LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026388cat >conftest.$ac_ext <<_ACEOF
26389/* confdefs.h. */
26390_ACEOF
26391cat confdefs.h >>conftest.$ac_ext
26392cat >>conftest.$ac_ext <<_ACEOF
26393/* end confdefs.h. */
26394
26395/* Override any GCC internal prototype to avoid an error.
26396 Use char because int might match the return type of a GCC
26397 builtin and then its argument prototype would still apply. */
26398#ifdef __cplusplus
26399extern "C"
26400#endif
26401char rl_completion_display_matches_hook ();
26402int
26403main ()
26404{
26405return rl_completion_display_matches_hook ();
26406 ;
26407 return 0;
26408}
26409_ACEOF
26410rm -f conftest.$ac_objext conftest$ac_exeext
26411if { (ac_try="$ac_link"
26412case "(($ac_try" in
26413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26414 *) ac_try_echo=$ac_try;;
26415esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026416eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026417 (eval "$ac_link") 2>conftest.er1
26418 ac_status=$?
26419 grep -v '^ *+' conftest.er1 >conftest.err
26420 rm -f conftest.er1
26421 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026422 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026423 (exit $ac_status); } && {
26424 test -z "$ac_c_werror_flag" ||
26425 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026426 } && test -s conftest$ac_exeext &&
26427 $as_test_x conftest$ac_exeext; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026428 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
26429else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026430 echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026431sed 's/^/| /' conftest.$ac_ext >&5
26432
26433 ac_cv_lib_readline_rl_completion_display_matches_hook=no
26434fi
26435
26436rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
26437 conftest$ac_exeext conftest.$ac_ext
26438LIBS=$ac_check_lib_save_LIBS
26439fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026440{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
26441echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
26442if test $ac_cv_lib_readline_rl_completion_display_matches_hook = yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000026443
26444cat >>confdefs.h <<\_ACEOF
26445#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
26446_ACEOF
26447
26448fi
26449
26450
Martin v. Löwis0daad592001-09-30 21:09:59 +000026451# check for readline 4.2
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026452{ echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
26453echo $ECHO_N "checking for rl_completion_matches in -lreadline... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026454if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026455 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000026456else
Martin v. Löwis11437992002-04-12 09:54:03 +000026457 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000026458LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000026459cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026460/* confdefs.h. */
26461_ACEOF
26462cat confdefs.h >>conftest.$ac_ext
26463cat >>conftest.$ac_ext <<_ACEOF
26464/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026465
Martin v. Löwiseba40652007-08-30 20:10:57 +000026466/* Override any GCC internal prototype to avoid an error.
26467 Use char because int might match the return type of a GCC
26468 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000026469#ifdef __cplusplus
26470extern "C"
26471#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000026472char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026473int
26474main ()
26475{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026476return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000026477 ;
26478 return 0;
26479}
26480_ACEOF
26481rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026482if { (ac_try="$ac_link"
26483case "(($ac_try" in
26484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26485 *) ac_try_echo=$ac_try;;
26486esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026487eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026488 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026490 grep -v '^ *+' conftest.er1 >conftest.err
26491 rm -f conftest.er1
26492 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026493 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026494 (exit $ac_status); } && {
26495 test -z "$ac_c_werror_flag" ||
26496 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026497 } && test -s conftest$ac_exeext &&
26498 $as_test_x conftest$ac_exeext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026499 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000026500else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026501 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026502sed 's/^/| /' conftest.$ac_ext >&5
26503
Martin v. Löwiseba40652007-08-30 20:10:57 +000026504 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026505fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026506
26507rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026509LIBS=$ac_check_lib_save_LIBS
26510fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026511{ echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26512echo "${ECHO_T}$ac_cv_lib_readline_rl_completion_matches" >&6; }
26513if test $ac_cv_lib_readline_rl_completion_matches = yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026514
Martin v. Löwis11437992002-04-12 09:54:03 +000026515cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026516#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026517_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026518
Guido van Rossum353ae582001-07-10 16:45:32 +000026519fi
26520
Jack Jansendd19cf82001-12-06 22:36:17 +000026521
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026522# also in readline 4.2
26523cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026524/* confdefs.h. */
26525_ACEOF
26526cat confdefs.h >>conftest.$ac_ext
26527cat >>conftest.$ac_ext <<_ACEOF
26528/* end confdefs.h. */
26529#include <readline/readline.h>
26530_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026531if { (ac_try="$ac_cpp conftest.$ac_ext"
26532case "(($ac_try" in
26533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26534 *) ac_try_echo=$ac_try;;
26535esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026537 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026538 ac_status=$?
26539 grep -v '^ *+' conftest.er1 >conftest.err
26540 rm -f conftest.er1
26541 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026543 (exit $ac_status); } >/dev/null && {
26544 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26545 test ! -s conftest.err
26546 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026547 have_readline=yes
26548else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026549 echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026550sed 's/^/| /' conftest.$ac_ext >&5
26551
26552 have_readline=no
26553fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026554
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026555rm -f conftest.err conftest.$ac_ext
26556if test $have_readline = yes
26557then
26558 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026559/* confdefs.h. */
26560_ACEOF
26561cat confdefs.h >>conftest.$ac_ext
26562cat >>conftest.$ac_ext <<_ACEOF
26563/* end confdefs.h. */
26564#include <readline/readline.h>
26565
26566_ACEOF
26567if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26568 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26569
26570cat >>confdefs.h <<\_ACEOF
26571#define HAVE_RL_CATCH_SIGNAL 1
26572_ACEOF
26573
26574fi
Marc-André Lemburg6d5e5792010-04-30 17:20:14 +000026575rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026576
26577fi
26578
Martin v. Löwis82bca632006-02-10 20:49:30 +000026579# End of readline checks: restore LIBS
26580LIBS=$LIBS_no_readline
26581
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026582{ echo "$as_me:$LINENO: checking for broken nice()" >&5
26583echo $ECHO_N "checking for broken nice()... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026584if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026585 echo $ECHO_N "(cached) $ECHO_C" >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026586else
Martin v. Löwis11437992002-04-12 09:54:03 +000026587
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026588if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026589 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026590else
Martin v. Löwis11437992002-04-12 09:54:03 +000026591 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026592/* confdefs.h. */
26593_ACEOF
26594cat confdefs.h >>conftest.$ac_ext
26595cat >>conftest.$ac_ext <<_ACEOF
26596/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026597
26598int main()
26599{
26600 int val1 = nice(1);
26601 if (val1 != -1 && val1 == nice(2))
26602 exit(0);
26603 exit(1);
26604}
26605
Martin v. Löwis11437992002-04-12 09:54:03 +000026606_ACEOF
26607rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026608if { (ac_try="$ac_link"
26609case "(($ac_try" in
26610 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26611 *) ac_try_echo=$ac_try;;
26612esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026613eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026614 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026615 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026616 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026617 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026618 { (case "(($ac_try" in
26619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26620 *) ac_try_echo=$ac_try;;
26621esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026623 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026624 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026626 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026627 ac_cv_broken_nice=yes
26628else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026629 echo "$as_me: program exited with status $ac_status" >&5
26630echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026631sed 's/^/| /' conftest.$ac_ext >&5
26632
Martin v. Löwis11437992002-04-12 09:54:03 +000026633( exit $ac_status )
26634ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026635fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026636rm -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 +000026637fi
26638
Martin v. Löwiseba40652007-08-30 20:10:57 +000026639
26640fi
26641
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026642{ echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26643echo "${ECHO_T}$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026644if test "$ac_cv_broken_nice" = yes
26645then
Martin v. Löwis11437992002-04-12 09:54:03 +000026646
26647cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026648#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026649_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026650
26651fi
26652
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026653{ echo "$as_me:$LINENO: checking for broken poll()" >&5
26654echo $ECHO_N "checking for broken poll()... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026655if test "${ac_cv_broken_poll+set}" = set; then
26656 echo $ECHO_N "(cached) $ECHO_C" >&6
26657else
26658 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026659 ac_cv_broken_poll=no
26660else
26661 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026662/* confdefs.h. */
26663_ACEOF
26664cat confdefs.h >>conftest.$ac_ext
26665cat >>conftest.$ac_ext <<_ACEOF
26666/* end confdefs.h. */
26667
26668#include <poll.h>
26669
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026670int main()
26671{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026672 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026673 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026674
26675 close (42);
26676
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026677 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026678 if (poll_test < 0)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026679 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026680 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026681 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026682 else
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026683 return 1;
26684}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026685
26686_ACEOF
26687rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026688if { (ac_try="$ac_link"
26689case "(($ac_try" in
26690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26691 *) ac_try_echo=$ac_try;;
26692esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026693eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026694 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026695 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026696 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026697 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026698 { (case "(($ac_try" in
26699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26700 *) ac_try_echo=$ac_try;;
26701esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026702eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026703 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026704 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026705 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026706 (exit $ac_status); }; }; then
26707 ac_cv_broken_poll=yes
26708else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026709 echo "$as_me: program exited with status $ac_status" >&5
26710echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026711sed 's/^/| /' conftest.$ac_ext >&5
26712
26713( exit $ac_status )
26714ac_cv_broken_poll=no
26715fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026716rm -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 +000026717fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026718
26719
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000026720fi
26721
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026722{ echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26723echo "${ECHO_T}$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026724if test "$ac_cv_broken_poll" = yes
26725then
26726
26727cat >>confdefs.h <<\_ACEOF
26728#define HAVE_BROKEN_POLL 1
26729_ACEOF
26730
26731fi
26732
Brett Cannon43802422005-02-10 20:48:03 +000026733# 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 +000026734# (which is not required by ISO C or UNIX spec) and/or if we support
26735# tzname[]
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026736{ echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26737echo $ECHO_N "checking for struct tm.tm_zone... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026738if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026739 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026740else
26741 cat >conftest.$ac_ext <<_ACEOF
26742/* confdefs.h. */
26743_ACEOF
26744cat confdefs.h >>conftest.$ac_ext
26745cat >>conftest.$ac_ext <<_ACEOF
26746/* end confdefs.h. */
26747#include <sys/types.h>
26748#include <$ac_cv_struct_tm>
26749
26750
26751int
26752main ()
26753{
26754static struct tm ac_aggr;
26755if (ac_aggr.tm_zone)
26756return 0;
26757 ;
26758 return 0;
26759}
26760_ACEOF
26761rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026762if { (ac_try="$ac_compile"
26763case "(($ac_try" in
26764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26765 *) ac_try_echo=$ac_try;;
26766esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026767eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026768 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026769 ac_status=$?
26770 grep -v '^ *+' conftest.er1 >conftest.err
26771 rm -f conftest.er1
26772 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026773 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026774 (exit $ac_status); } && {
26775 test -z "$ac_c_werror_flag" ||
26776 test ! -s conftest.err
26777 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026778 ac_cv_member_struct_tm_tm_zone=yes
26779else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026780 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026781sed 's/^/| /' conftest.$ac_ext >&5
26782
Martin v. Löwiseba40652007-08-30 20:10:57 +000026783 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026784/* confdefs.h. */
26785_ACEOF
26786cat confdefs.h >>conftest.$ac_ext
26787cat >>conftest.$ac_ext <<_ACEOF
26788/* end confdefs.h. */
26789#include <sys/types.h>
26790#include <$ac_cv_struct_tm>
26791
26792
26793int
26794main ()
26795{
26796static struct tm ac_aggr;
26797if (sizeof ac_aggr.tm_zone)
26798return 0;
26799 ;
26800 return 0;
26801}
26802_ACEOF
26803rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026804if { (ac_try="$ac_compile"
26805case "(($ac_try" in
26806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26807 *) ac_try_echo=$ac_try;;
26808esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026809eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026810 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026811 ac_status=$?
26812 grep -v '^ *+' conftest.er1 >conftest.err
26813 rm -f conftest.er1
26814 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026815 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026816 (exit $ac_status); } && {
26817 test -z "$ac_c_werror_flag" ||
26818 test ! -s conftest.err
26819 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026820 ac_cv_member_struct_tm_tm_zone=yes
26821else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026822 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026823sed 's/^/| /' conftest.$ac_ext >&5
26824
Martin v. Löwiseba40652007-08-30 20:10:57 +000026825 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026826fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026827
26828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026829fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026830
26831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026832fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026833{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26834echo "${ECHO_T}$ac_cv_member_struct_tm_tm_zone" >&6; }
26835if test $ac_cv_member_struct_tm_tm_zone = yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026836
26837cat >>confdefs.h <<_ACEOF
26838#define HAVE_STRUCT_TM_TM_ZONE 1
26839_ACEOF
26840
26841
26842fi
26843
26844if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26845
26846cat >>confdefs.h <<\_ACEOF
26847#define HAVE_TM_ZONE 1
26848_ACEOF
26849
26850else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026851 { echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26852echo $ECHO_N "checking whether tzname is declared... $ECHO_C" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026853if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026854 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000026855else
26856 cat >conftest.$ac_ext <<_ACEOF
26857/* confdefs.h. */
26858_ACEOF
26859cat confdefs.h >>conftest.$ac_ext
26860cat >>conftest.$ac_ext <<_ACEOF
26861/* end confdefs.h. */
26862#include <time.h>
26863
26864int
26865main ()
26866{
26867#ifndef tzname
26868 (void) tzname;
26869#endif
26870
26871 ;
26872 return 0;
26873}
26874_ACEOF
26875rm -f conftest.$ac_objext
26876if { (ac_try="$ac_compile"
26877case "(($ac_try" in
26878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26879 *) ac_try_echo=$ac_try;;
26880esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026881eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026882 (eval "$ac_compile") 2>conftest.er1
26883 ac_status=$?
26884 grep -v '^ *+' conftest.er1 >conftest.err
26885 rm -f conftest.er1
26886 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026887 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026888 (exit $ac_status); } && {
26889 test -z "$ac_c_werror_flag" ||
26890 test ! -s conftest.err
26891 } && test -s conftest.$ac_objext; then
26892 ac_cv_have_decl_tzname=yes
26893else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026894 echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026895sed 's/^/| /' conftest.$ac_ext >&5
26896
26897 ac_cv_have_decl_tzname=no
26898fi
26899
26900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26901fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026902{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26903echo "${ECHO_T}$ac_cv_have_decl_tzname" >&6; }
26904if test $ac_cv_have_decl_tzname = yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026905
26906cat >>confdefs.h <<_ACEOF
26907#define HAVE_DECL_TZNAME 1
26908_ACEOF
26909
26910
26911else
26912 cat >>confdefs.h <<_ACEOF
26913#define HAVE_DECL_TZNAME 0
26914_ACEOF
26915
26916
26917fi
26918
26919
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026920 { echo "$as_me:$LINENO: checking for tzname" >&5
26921echo $ECHO_N "checking for tzname... $ECHO_C" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026922if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026923 echo $ECHO_N "(cached) $ECHO_C" >&6
Brett Cannon43802422005-02-10 20:48:03 +000026924else
26925 cat >conftest.$ac_ext <<_ACEOF
26926/* confdefs.h. */
26927_ACEOF
26928cat confdefs.h >>conftest.$ac_ext
26929cat >>conftest.$ac_ext <<_ACEOF
26930/* end confdefs.h. */
26931#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000026932#if !HAVE_DECL_TZNAME
26933extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026934#endif
26935
26936int
26937main ()
26938{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026939return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026940 ;
26941 return 0;
26942}
26943_ACEOF
26944rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000026945if { (ac_try="$ac_link"
26946case "(($ac_try" in
26947 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26948 *) ac_try_echo=$ac_try;;
26949esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026950eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026951 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026952 ac_status=$?
26953 grep -v '^ *+' conftest.er1 >conftest.err
26954 rm -f conftest.er1
26955 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026956 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000026957 (exit $ac_status); } && {
26958 test -z "$ac_c_werror_flag" ||
26959 test ! -s conftest.err
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026960 } && test -s conftest$ac_exeext &&
26961 $as_test_x conftest$ac_exeext; then
Brett Cannon43802422005-02-10 20:48:03 +000026962 ac_cv_var_tzname=yes
26963else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026964 echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026965sed 's/^/| /' conftest.$ac_ext >&5
26966
Martin v. Löwiseba40652007-08-30 20:10:57 +000026967 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026968fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026969
26970rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026971 conftest$ac_exeext conftest.$ac_ext
26972fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026973{ echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26974echo "${ECHO_T}$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026975 if test $ac_cv_var_tzname = yes; then
26976
26977cat >>confdefs.h <<\_ACEOF
26978#define HAVE_TZNAME 1
26979_ACEOF
26980
26981 fi
26982fi
26983
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026984
Martin v. Löwis1d459062005-03-14 21:23:33 +000026985# check tzset(3) exists and works like we expect it to
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026986{ echo "$as_me:$LINENO: checking for working tzset()" >&5
26987echo $ECHO_N "checking for working tzset()... $ECHO_C" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026988if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000026989 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026990else
26991
26992if test "$cross_compiling" = yes; then
26993 ac_cv_working_tzset=no
26994else
26995 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026996/* confdefs.h. */
26997_ACEOF
26998cat confdefs.h >>conftest.$ac_ext
26999cat >>conftest.$ac_ext <<_ACEOF
27000/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027001
27002#include <stdlib.h>
27003#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000027004#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000027005
27006#if HAVE_TZNAME
27007extern char *tzname[];
27008#endif
27009
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027010int main()
27011{
Brett Cannon18367812003-09-19 00:59:16 +000027012 /* Note that we need to ensure that not only does tzset(3)
27013 do 'something' with localtime, but it works as documented
27014 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000027015 This includes making sure that tzname is set properly if
27016 tm->tm_zone does not exist since it is the alternative way
27017 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000027018
27019 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000027020 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000027021 */
27022
Martin v. Löwis1d459062005-03-14 21:23:33 +000027023 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000027024 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
27025
Neal Norwitz7f2588c2003-04-11 15:35:53 +000027026 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027027 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000027028 if (localtime(&groundhogday)->tm_hour != 0)
27029 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027030#if HAVE_TZNAME
27031 /* For UTC, tzname[1] is sometimes "", sometimes " " */
27032 if (strcmp(tzname[0], "UTC") ||
27033 (tzname[1][0] != 0 && tzname[1][0] != ' '))
27034 exit(1);
27035#endif
Brett Cannon18367812003-09-19 00:59:16 +000027036
Neal Norwitz7f2588c2003-04-11 15:35:53 +000027037 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027038 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000027039 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027040 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027041#if HAVE_TZNAME
27042 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
27043 exit(1);
27044#endif
Brett Cannon18367812003-09-19 00:59:16 +000027045
27046 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
27047 tzset();
27048 if (localtime(&groundhogday)->tm_hour != 11)
27049 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027050#if HAVE_TZNAME
27051 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
27052 exit(1);
27053#endif
27054
27055#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000027056 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
27057 exit(1);
27058 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
27059 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000027060#endif
Brett Cannon18367812003-09-19 00:59:16 +000027061
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027062 exit(0);
27063}
27064
27065_ACEOF
27066rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027067if { (ac_try="$ac_link"
27068case "(($ac_try" in
27069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27070 *) ac_try_echo=$ac_try;;
27071esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027073 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027074 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027075 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027076 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027077 { (case "(($ac_try" in
27078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27079 *) ac_try_echo=$ac_try;;
27080esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027081eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027082 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027083 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027084 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027085 (exit $ac_status); }; }; then
27086 ac_cv_working_tzset=yes
27087else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027088 echo "$as_me: program exited with status $ac_status" >&5
27089echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027090sed 's/^/| /' conftest.$ac_ext >&5
27091
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027092( exit $ac_status )
27093ac_cv_working_tzset=no
27094fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027095rm -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 +000027096fi
27097
Martin v. Löwiseba40652007-08-30 20:10:57 +000027098
27099fi
27100
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027101{ echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
27102echo "${ECHO_T}$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000027103if test "$ac_cv_working_tzset" = yes
27104then
27105
27106cat >>confdefs.h <<\_ACEOF
27107#define HAVE_WORKING_TZSET 1
27108_ACEOF
27109
27110fi
27111
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027112# Look for subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027113{ echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
27114echo $ECHO_N "checking for tv_nsec in struct stat... $ECHO_C" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027115if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027116 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027117else
27118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027119/* confdefs.h. */
27120_ACEOF
27121cat confdefs.h >>conftest.$ac_ext
27122cat >>conftest.$ac_ext <<_ACEOF
27123/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027124#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027125int
27126main ()
27127{
27128
27129struct stat st;
27130st.st_mtim.tv_nsec = 1;
27131
27132 ;
27133 return 0;
27134}
27135_ACEOF
27136rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027137if { (ac_try="$ac_compile"
27138case "(($ac_try" in
27139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27140 *) ac_try_echo=$ac_try;;
27141esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027145 grep -v '^ *+' conftest.er1 >conftest.err
27146 rm -f conftest.er1
27147 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027149 (exit $ac_status); } && {
27150 test -z "$ac_c_werror_flag" ||
27151 test ! -s conftest.err
27152 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000027153 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027154else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027155 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027156sed 's/^/| /' conftest.$ac_ext >&5
27157
Martin v. Löwiseba40652007-08-30 20:10:57 +000027158 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027159fi
27160
Martin v. Löwiseba40652007-08-30 20:10:57 +000027161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27162fi
27163
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027164{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
27165echo "${ECHO_T}$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000027166if test "$ac_cv_stat_tv_nsec" = yes
27167then
27168
27169cat >>confdefs.h <<\_ACEOF
27170#define HAVE_STAT_TV_NSEC 1
27171_ACEOF
27172
27173fi
27174
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027175# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027176{ echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
27177echo $ECHO_N "checking for tv_nsec2 in struct stat... $ECHO_C" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027178if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027179 echo $ECHO_N "(cached) $ECHO_C" >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027180else
27181 cat >conftest.$ac_ext <<_ACEOF
27182/* confdefs.h. */
27183_ACEOF
27184cat confdefs.h >>conftest.$ac_ext
27185cat >>conftest.$ac_ext <<_ACEOF
27186/* end confdefs.h. */
27187#include <sys/stat.h>
27188int
27189main ()
27190{
27191
27192struct stat st;
27193st.st_mtimespec.tv_nsec = 1;
27194
27195 ;
27196 return 0;
27197}
27198_ACEOF
27199rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027200if { (ac_try="$ac_compile"
27201case "(($ac_try" in
27202 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27203 *) ac_try_echo=$ac_try;;
27204esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027205eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027207 ac_status=$?
27208 grep -v '^ *+' conftest.er1 >conftest.err
27209 rm -f conftest.er1
27210 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027211 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027212 (exit $ac_status); } && {
27213 test -z "$ac_c_werror_flag" ||
27214 test ! -s conftest.err
27215 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027216 ac_cv_stat_tv_nsec2=yes
27217else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027218 echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027219sed 's/^/| /' conftest.$ac_ext >&5
27220
Martin v. Löwiseba40652007-08-30 20:10:57 +000027221 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027222fi
27223
Martin v. Löwiseba40652007-08-30 20:10:57 +000027224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27225fi
27226
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027227{ echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
27228echo "${ECHO_T}$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000027229if test "$ac_cv_stat_tv_nsec2" = yes
27230then
27231
27232cat >>confdefs.h <<\_ACEOF
27233#define HAVE_STAT_TV_NSEC2 1
27234_ACEOF
27235
27236fi
27237
Jack Jansen666b1e72001-10-31 12:11:48 +000027238# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027239{ echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
27240echo $ECHO_N "checking whether mvwdelch is an expression... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027241if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027242 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027243else
Martin v. Löwis11437992002-04-12 09:54:03 +000027244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027245/* confdefs.h. */
27246_ACEOF
27247cat confdefs.h >>conftest.$ac_ext
27248cat >>conftest.$ac_ext <<_ACEOF
27249/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027250#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027251int
27252main ()
27253{
Jack Jansen666b1e72001-10-31 12:11:48 +000027254
27255 int rtn;
27256 rtn = mvwdelch(0,0,0);
27257
Martin v. Löwis11437992002-04-12 09:54:03 +000027258 ;
27259 return 0;
27260}
27261_ACEOF
27262rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027263if { (ac_try="$ac_compile"
27264case "(($ac_try" in
27265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27266 *) ac_try_echo=$ac_try;;
27267esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027268eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027271 grep -v '^ *+' conftest.er1 >conftest.err
27272 rm -f conftest.er1
27273 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027274 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027275 (exit $ac_status); } && {
27276 test -z "$ac_c_werror_flag" ||
27277 test ! -s conftest.err
27278 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027279 ac_cv_mvwdelch_is_expression=yes
27280else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027281 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027282sed 's/^/| /' conftest.$ac_ext >&5
27283
Martin v. Löwiseba40652007-08-30 20:10:57 +000027284 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027285fi
27286
Martin v. Löwiseba40652007-08-30 20:10:57 +000027287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27288fi
27289
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027290{ echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
27291echo "${ECHO_T}$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000027292
27293if test "$ac_cv_mvwdelch_is_expression" = yes
27294then
Martin v. Löwis11437992002-04-12 09:54:03 +000027295
27296cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027297#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027298_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027299
27300fi
27301
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027302{ echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
27303echo $ECHO_N "checking whether WINDOW has _flags... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027304if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027305 echo $ECHO_N "(cached) $ECHO_C" >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000027306else
Martin v. Löwis11437992002-04-12 09:54:03 +000027307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027308/* confdefs.h. */
27309_ACEOF
27310cat confdefs.h >>conftest.$ac_ext
27311cat >>conftest.$ac_ext <<_ACEOF
27312/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000027313#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000027314int
27315main ()
27316{
Jack Jansen666b1e72001-10-31 12:11:48 +000027317
27318 WINDOW *w;
27319 w->_flags = 0;
27320
Martin v. Löwis11437992002-04-12 09:54:03 +000027321 ;
27322 return 0;
27323}
27324_ACEOF
27325rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027326if { (ac_try="$ac_compile"
27327case "(($ac_try" in
27328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27329 *) ac_try_echo=$ac_try;;
27330esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027331eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027334 grep -v '^ *+' conftest.er1 >conftest.err
27335 rm -f conftest.er1
27336 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027337 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027338 (exit $ac_status); } && {
27339 test -z "$ac_c_werror_flag" ||
27340 test ! -s conftest.err
27341 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000027342 ac_cv_window_has_flags=yes
27343else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027344 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027345sed 's/^/| /' conftest.$ac_ext >&5
27346
Martin v. Löwiseba40652007-08-30 20:10:57 +000027347 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000027348fi
27349
Martin v. Löwiseba40652007-08-30 20:10:57 +000027350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27351fi
27352
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027353{ echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
27354echo "${ECHO_T}$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027355
Jack Jansen666b1e72001-10-31 12:11:48 +000027356
27357if test "$ac_cv_window_has_flags" = yes
27358then
Martin v. Löwis11437992002-04-12 09:54:03 +000027359
27360cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027361#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000027362_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000027363
27364fi
27365
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027366{ echo "$as_me:$LINENO: checking for is_term_resized" >&5
27367echo $ECHO_N "checking for is_term_resized... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027368cat >conftest.$ac_ext <<_ACEOF
27369/* confdefs.h. */
27370_ACEOF
27371cat confdefs.h >>conftest.$ac_ext
27372cat >>conftest.$ac_ext <<_ACEOF
27373/* end confdefs.h. */
27374#include <curses.h>
27375int
27376main ()
27377{
27378void *x=is_term_resized
27379 ;
27380 return 0;
27381}
27382_ACEOF
27383rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027384if { (ac_try="$ac_compile"
27385case "(($ac_try" in
27386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27387 *) ac_try_echo=$ac_try;;
27388esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027389eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027390 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027391 ac_status=$?
27392 grep -v '^ *+' conftest.er1 >conftest.err
27393 rm -f conftest.er1
27394 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027395 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027396 (exit $ac_status); } && {
27397 test -z "$ac_c_werror_flag" ||
27398 test ! -s conftest.err
27399 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027400
27401cat >>confdefs.h <<\_ACEOF
27402#define HAVE_CURSES_IS_TERM_RESIZED 1
27403_ACEOF
27404
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027405 { echo "$as_me:$LINENO: result: yes" >&5
27406echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027407else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027408 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027409sed 's/^/| /' conftest.$ac_ext >&5
27410
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027411 { echo "$as_me:$LINENO: result: no" >&5
27412echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027413
27414fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027415
Martin v. Löwiseba40652007-08-30 20:10:57 +000027416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27417
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027418{ echo "$as_me:$LINENO: checking for resize_term" >&5
27419echo $ECHO_N "checking for resize_term... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027420cat >conftest.$ac_ext <<_ACEOF
27421/* confdefs.h. */
27422_ACEOF
27423cat confdefs.h >>conftest.$ac_ext
27424cat >>conftest.$ac_ext <<_ACEOF
27425/* end confdefs.h. */
27426#include <curses.h>
27427int
27428main ()
27429{
27430void *x=resize_term
27431 ;
27432 return 0;
27433}
27434_ACEOF
27435rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027436if { (ac_try="$ac_compile"
27437case "(($ac_try" in
27438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27439 *) ac_try_echo=$ac_try;;
27440esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027441eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027442 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027443 ac_status=$?
27444 grep -v '^ *+' conftest.er1 >conftest.err
27445 rm -f conftest.er1
27446 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027447 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027448 (exit $ac_status); } && {
27449 test -z "$ac_c_werror_flag" ||
27450 test ! -s conftest.err
27451 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027452
27453cat >>confdefs.h <<\_ACEOF
27454#define HAVE_CURSES_RESIZE_TERM 1
27455_ACEOF
27456
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027457 { echo "$as_me:$LINENO: result: yes" >&5
27458echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027459else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027460 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027461sed 's/^/| /' conftest.$ac_ext >&5
27462
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027463 { echo "$as_me:$LINENO: result: no" >&5
27464echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027465
27466fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027467
Martin v. Löwiseba40652007-08-30 20:10:57 +000027468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27469
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027470{ echo "$as_me:$LINENO: checking for resizeterm" >&5
27471echo $ECHO_N "checking for resizeterm... $ECHO_C" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027472cat >conftest.$ac_ext <<_ACEOF
27473/* confdefs.h. */
27474_ACEOF
27475cat confdefs.h >>conftest.$ac_ext
27476cat >>conftest.$ac_ext <<_ACEOF
27477/* end confdefs.h. */
27478#include <curses.h>
27479int
27480main ()
27481{
27482void *x=resizeterm
27483 ;
27484 return 0;
27485}
27486_ACEOF
27487rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027488if { (ac_try="$ac_compile"
27489case "(($ac_try" in
27490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27491 *) ac_try_echo=$ac_try;;
27492esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027494 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000027495 ac_status=$?
27496 grep -v '^ *+' conftest.er1 >conftest.err
27497 rm -f conftest.er1
27498 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027500 (exit $ac_status); } && {
27501 test -z "$ac_c_werror_flag" ||
27502 test ! -s conftest.err
27503 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000027504
27505cat >>confdefs.h <<\_ACEOF
27506#define HAVE_CURSES_RESIZETERM 1
27507_ACEOF
27508
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027509 { echo "$as_me:$LINENO: result: yes" >&5
27510echo "${ECHO_T}yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027511else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027512 echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000027513sed 's/^/| /' conftest.$ac_ext >&5
27514
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027515 { echo "$as_me:$LINENO: result: no" >&5
27516echo "${ECHO_T}no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000027517
27518fi
Walter Dörwald4994d952006-06-19 08:07:50 +000027519
Martin v. Löwiseba40652007-08-30 20:10:57 +000027520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27521
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027522{ echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27523echo $ECHO_N "checking for /dev/ptmx... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027524
27525if test -r /dev/ptmx
27526then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027527 { echo "$as_me:$LINENO: result: yes" >&5
27528echo "${ECHO_T}yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027529
27530cat >>confdefs.h <<\_ACEOF
27531#define HAVE_DEV_PTMX 1
27532_ACEOF
27533
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027534else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027535 { echo "$as_me:$LINENO: result: no" >&5
27536echo "${ECHO_T}no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027537fi
27538
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027539{ echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27540echo $ECHO_N "checking for /dev/ptc... $ECHO_C" >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027541
27542if test -r /dev/ptc
27543then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027544 { echo "$as_me:$LINENO: result: yes" >&5
27545echo "${ECHO_T}yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027546
27547cat >>confdefs.h <<\_ACEOF
27548#define HAVE_DEV_PTC 1
27549_ACEOF
27550
Martin v. Löwisfefbc202006-10-17 18:59:23 +000027551else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027552 { echo "$as_me:$LINENO: result: no" >&5
27553echo "${ECHO_T}no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027554fi
27555
Mark Dickinson82864d12009-11-15 16:18:58 +000027556if test "$have_long_long" = yes
27557then
27558 { echo "$as_me:$LINENO: checking for %lld and %llu printf() format support" >&5
27559echo $ECHO_N "checking for %lld and %llu printf() format support... $ECHO_C" >&6; }
27560 if test "${ac_cv_have_long_long_format+set}" = set; then
27561 echo $ECHO_N "(cached) $ECHO_C" >&6
27562else
27563 if test "$cross_compiling" = yes; then
27564 ac_cv_have_long_long_format=no
27565else
27566 cat >conftest.$ac_ext <<_ACEOF
27567/* confdefs.h. */
27568_ACEOF
27569cat confdefs.h >>conftest.$ac_ext
27570cat >>conftest.$ac_ext <<_ACEOF
27571/* end confdefs.h. */
27572
27573 #include <stdio.h>
27574 #include <stddef.h>
27575 #include <string.h>
27576
27577 #ifdef HAVE_SYS_TYPES_H
27578 #include <sys/types.h>
27579 #endif
27580
27581 int main()
27582 {
27583 char buffer[256];
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, "%lld", (long long)-123) < 0)
27591 return 1;
27592 if (strcmp(buffer, "-123"))
27593 return 1;
27594
27595 if (sprintf(buffer, "%llu", (unsigned long long)123) < 0)
27596 return 1;
27597 if (strcmp(buffer, "123"))
27598 return 1;
27599
27600 return 0;
27601 }
27602
27603_ACEOF
27604rm -f conftest$ac_exeext
27605if { (ac_try="$ac_link"
27606case "(($ac_try" in
27607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27608 *) ac_try_echo=$ac_try;;
27609esac
27610eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27611 (eval "$ac_link") 2>&5
27612 ac_status=$?
27613 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27614 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27615 { (case "(($ac_try" in
27616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27617 *) ac_try_echo=$ac_try;;
27618esac
27619eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27620 (eval "$ac_try") 2>&5
27621 ac_status=$?
27622 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27623 (exit $ac_status); }; }; then
27624 ac_cv_have_long_long_format=yes
27625else
27626 echo "$as_me: program exited with status $ac_status" >&5
27627echo "$as_me: failed program was:" >&5
27628sed 's/^/| /' conftest.$ac_ext >&5
27629
27630( exit $ac_status )
27631ac_cv_have_long_long_format=no
27632fi
27633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27634fi
27635
27636
27637
27638fi
27639
27640 { echo "$as_me:$LINENO: result: $ac_cv_have_long_long_format" >&5
27641echo "${ECHO_T}$ac_cv_have_long_long_format" >&6; }
27642fi
27643
Mark Dickinson5ce84742009-12-31 20:48:04 +000027644if test "$ac_cv_have_long_long_format" = yes
Mark Dickinson82864d12009-11-15 16:18:58 +000027645then
27646
27647cat >>confdefs.h <<\_ACEOF
27648#define PY_FORMAT_LONG_LONG "ll"
27649_ACEOF
27650
27651fi
27652
Ronald Oussoren315cd0c2009-11-19 16:25:21 +000027653if test $ac_sys_system = Darwin
27654then
27655 LIBS="$LIBS -framework CoreFoundation"
27656fi
27657
Mark Dickinson82864d12009-11-15 16:18:58 +000027658
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027659{ echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27660echo $ECHO_N "checking for %zd printf() format support... $ECHO_C" >&6; }
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027661if test "${ac_cv_have_size_t_format+set}" = set; then
27662 echo $ECHO_N "(cached) $ECHO_C" >&6
27663else
27664 if test "$cross_compiling" = yes; then
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027665 ac_cv_have_size_t_format="cross -- assuming yes"
27666
Brett Cannon09d12362006-05-11 05:11:33 +000027667else
27668 cat >conftest.$ac_ext <<_ACEOF
27669/* confdefs.h. */
27670_ACEOF
27671cat confdefs.h >>conftest.$ac_ext
27672cat >>conftest.$ac_ext <<_ACEOF
27673/* end confdefs.h. */
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027674
Brett Cannon09d12362006-05-11 05:11:33 +000027675#include <stdio.h>
27676#include <stddef.h>
27677#include <string.h>
27678
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027679#ifdef HAVE_SYS_TYPES_H
27680#include <sys/types.h>
27681#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027682
27683#ifdef HAVE_SSIZE_T
27684typedef ssize_t Py_ssize_t;
27685#elif SIZEOF_VOID_P == SIZEOF_LONG
27686typedef long Py_ssize_t;
27687#else
27688typedef int Py_ssize_t;
27689#endif
Brett Cannon09d12362006-05-11 05:11:33 +000027690
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000027691int main()
27692{
27693 char buffer[256];
27694
Brett Cannon09d12362006-05-11 05:11:33 +000027695 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27696 return 1;
27697
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000027698 if (strcmp(buffer, "123"))
27699 return 1;
27700
27701 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27702 return 1;
27703
27704 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000027705 return 1;
27706
27707 return 0;
27708}
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027709
Brett Cannon09d12362006-05-11 05:11:33 +000027710_ACEOF
27711rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027712if { (ac_try="$ac_link"
27713case "(($ac_try" in
27714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27715 *) ac_try_echo=$ac_try;;
27716esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027718 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027719 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027721 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027722 { (case "(($ac_try" in
27723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27724 *) ac_try_echo=$ac_try;;
27725esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027726eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027727 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000027728 ac_status=$?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027729 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000027730 (exit $ac_status); }; }; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027731 ac_cv_have_size_t_format=yes
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027732else
27733 echo "$as_me: program exited with status $ac_status" >&5
27734echo "$as_me: failed program was:" >&5
27735sed 's/^/| /' conftest.$ac_ext >&5
27736
27737( exit $ac_status )
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027738ac_cv_have_size_t_format=no
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027739fi
27740rm -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 +000027741fi
27742
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027743
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027744fi
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027745{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27746echo "${ECHO_T}$ac_cv_have_size_t_format" >&6; }
Gregory P. Smithc9ff3a72009-11-02 02:03:16 +000027747if test "$ac_cv_have_size_t_format" != no ; then
Alexandre Vassalotti2ccefe12009-07-17 23:17:48 +000027748
27749cat >>confdefs.h <<\_ACEOF
27750#define PY_FORMAT_SIZE_T "z"
27751_ACEOF
27752
27753fi
27754
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027755{ echo "$as_me:$LINENO: checking for socklen_t" >&5
27756echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027757if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027758 echo $ECHO_N "(cached) $ECHO_C" >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027759else
Martin v. Löwis11437992002-04-12 09:54:03 +000027760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027761/* confdefs.h. */
27762_ACEOF
27763cat confdefs.h >>conftest.$ac_ext
27764cat >>conftest.$ac_ext <<_ACEOF
27765/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027766
27767#ifdef HAVE_SYS_TYPES_H
27768#include <sys/types.h>
27769#endif
27770#ifdef HAVE_SYS_SOCKET_H
27771#include <sys/socket.h>
27772#endif
27773
27774
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027775typedef socklen_t ac__type_new_;
Martin v. Löwis11437992002-04-12 09:54:03 +000027776int
27777main ()
27778{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027779if ((ac__type_new_ *) 0)
27780 return 0;
27781if (sizeof (ac__type_new_))
27782 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027783 ;
27784 return 0;
27785}
27786_ACEOF
27787rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000027788if { (ac_try="$ac_compile"
27789case "(($ac_try" in
27790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27791 *) ac_try_echo=$ac_try;;
27792esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027793eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027794 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027795 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027796 grep -v '^ *+' conftest.er1 >conftest.err
27797 rm -f conftest.er1
27798 cat conftest.err >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027799 echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000027800 (exit $ac_status); } && {
27801 test -z "$ac_c_werror_flag" ||
27802 test ! -s conftest.err
27803 } && test -s conftest.$ac_objext; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027804 ac_cv_type_socklen_t=yes
Guido van Rossum95713eb2000-05-18 20:53:31 +000027805else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027806 echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027807sed 's/^/| /' conftest.$ac_ext >&5
27808
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027809 ac_cv_type_socklen_t=no
Guido van Rossum95713eb2000-05-18 20:53:31 +000027810fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027811
27812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027813fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027814{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27815echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
27816if test $ac_cv_type_socklen_t = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027817 :
27818else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027819
Martin v. Löwis01c04012002-11-11 14:58:44 +000027820cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027821#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027822_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027823
27824fi
27825
Michael W. Hudson54241132001-12-07 15:38:26 +000027826
Michael W. Hudson54241132001-12-07 15:38:26 +000027827
27828
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027829for h in `(cd $srcdir;echo Python/thread_*.h)`
27830do
27831 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27832done
27833
Michael W. Hudson54241132001-12-07 15:38:26 +000027834
Neal Norwitzd24499d2005-12-18 21:36:39 +000027835SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027836{ echo "$as_me:$LINENO: checking for build directories" >&5
27837echo $ECHO_N "checking for build directories... $ECHO_C" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027838for dir in $SRCDIRS; do
27839 if test ! -d $dir; then
27840 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027841 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027842done
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027843{ echo "$as_me:$LINENO: result: done" >&5
27844echo "${ECHO_T}done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027845
Guido van Rossum627b2d71993-12-24 10:39:16 +000027846# generate output files
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000027847ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027848
Martin v. Löwis11437992002-04-12 09:54:03 +000027849cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027850# This file is a shell script that caches the results of configure
27851# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027852# scripts and configure runs, see configure's option --config-cache.
27853# It is not useful on other systems. If it contains results you don't
27854# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027855#
Martin v. Löwis11437992002-04-12 09:54:03 +000027856# config.status only pays attention to the cache file if you give it
27857# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027858#
Skip Montanaro6dead952003-09-25 14:50:04 +000027859# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027860# loading this file, other *unset* `ac_cv_foo' will be assigned the
27861# following values.
27862
27863_ACEOF
27864
Guido van Rossumf78abae1997-01-21 22:02:36 +000027865# The following way of writing the cache mishandles newlines in values,
27866# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027867# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027868# Ultrix sh set writes to stderr and can't be redirected directly,
27869# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027870(
27871 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27872 eval ac_val=\$$ac_var
27873 case $ac_val in #(
27874 *${as_nl}*)
27875 case $ac_var in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027876 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5
27877echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027878 esac
27879 case $ac_var in #(
27880 _ | IFS | as_nl) ;; #(
27881 *) $as_unset $ac_var ;;
27882 esac ;;
27883 esac
27884 done
27885
Martin v. Löwis11437992002-04-12 09:54:03 +000027886 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027887 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27888 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027889 # `set' does not quote correctly, so add quotes (double-quote
27890 # substitution turns \\\\ into \\, and sed turns \\ into \).
27891 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027892 "s/'/'\\\\''/g;
27893 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000027894 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027895 *)
27896 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027897 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027898 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027899 esac |
27900 sort
27901) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027902 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000027903 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027904 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000027905 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027906 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27907 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000027908 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27909 :end' >>confcache
27910if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27911 if test -w "$cache_file"; then
27912 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027913 { echo "$as_me:$LINENO: updating cache $cache_file" >&5
27914echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027915 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027916 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027917 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27918echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027919 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027920fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027921rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027922
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027923test "x$prefix" = xNONE && prefix=$ac_default_prefix
27924# Let make expand exec_prefix.
27925test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027926
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027927DEFS=-DHAVE_CONFIG_H
27928
Skip Montanaro6dead952003-09-25 14:50:04 +000027929ac_libobjs=
27930ac_ltlibobjs=
27931for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27932 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027933 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027934 ac_i=`echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027935 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27936 # will be set to the directory where LIBOBJS objects are built.
27937 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27938 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027939done
27940LIBOBJS=$ac_libobjs
27941
27942LTLIBOBJS=$ac_ltlibobjs
27943
27944
Martin v. Löwis11437992002-04-12 09:54:03 +000027945
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027946: ${CONFIG_STATUS=./config.status}
Martin v. Löwis11437992002-04-12 09:54:03 +000027947ac_clean_files_save=$ac_clean_files
27948ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027949{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27950echo "$as_me: creating $CONFIG_STATUS" >&6;}
27951cat >$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027952#! $SHELL
27953# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027954# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027955# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027956# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027957
Martin v. Löwis11437992002-04-12 09:54:03 +000027958debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027959ac_cs_recheck=false
27960ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027961SHELL=\${CONFIG_SHELL-$SHELL}
27962_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027963
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027964cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027965## --------------------- ##
27966## M4sh Initialization. ##
27967## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027968
Martin v. Löwiseba40652007-08-30 20:10:57 +000027969# Be more Bourne compatible
27970DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027971if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27972 emulate sh
27973 NULLCMD=:
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027974 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027975 # is contrary to our usage. Disable this feature.
27976 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027977 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000027978else
Martin v. Löwiseba40652007-08-30 20:10:57 +000027979 case `(set -o) 2>/dev/null` in
27980 *posix*) set -o posix ;;
27981esac
27982
Martin v. Löwis11437992002-04-12 09:54:03 +000027983fi
Michael W. Hudson54241132001-12-07 15:38:26 +000027984
Skip Montanaro6dead952003-09-25 14:50:04 +000027985
Martin v. Löwis11437992002-04-12 09:54:03 +000027986
27987
Martin v. Löwiseba40652007-08-30 20:10:57 +000027988# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027989# Avoid depending upon Character Ranges.
27990as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27991as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27992as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27993as_cr_digits='0123456789'
27994as_cr_alnum=$as_cr_Letters$as_cr_digits
27995
27996# The user is always right.
27997if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000027998 echo "#! /bin/sh" >conf$$.sh
27999 echo "exit 0" >>conf$$.sh
28000 chmod +x conf$$.sh
28001 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
28002 PATH_SEPARATOR=';'
28003 else
28004 PATH_SEPARATOR=:
28005 fi
28006 rm -f conf$$.sh
Martin v. Löwis11437992002-04-12 09:54:03 +000028007fi
28008
Martin v. Löwiseba40652007-08-30 20:10:57 +000028009# Support unset when possible.
28010if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
28011 as_unset=unset
28012else
28013 as_unset=false
28014fi
Martin v. Löwis11437992002-04-12 09:54:03 +000028015
Martin v. Löwiseba40652007-08-30 20:10:57 +000028016
28017# IFS
28018# We need space, tab and new line, in precisely that order. Quoting is
28019# there to prevent editors from complaining about space-tab.
28020# (If _AS_PATH_WALK were called with IFS unset, it would disable word
28021# splitting by setting IFS to empty value.)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028022as_nl='
28023'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028024IFS=" "" $as_nl"
28025
28026# Find who we are. Look in the path if we contain no directory separator.
28027case $0 in
28028 *[\\/]* ) as_myself=$0 ;;
28029 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000028030for as_dir in $PATH
28031do
28032 IFS=$as_save_IFS
28033 test -z "$as_dir" && as_dir=.
28034 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
28035done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028036IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000028037
Martin v. Löwiseba40652007-08-30 20:10:57 +000028038 ;;
28039esac
28040# We did not find ourselves, most probably we were run as `sh COMMAND'
28041# in which case we are not to be found in the path.
28042if test "x$as_myself" = x; then
28043 as_myself=$0
28044fi
28045if test ! -f "$as_myself"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028046 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000028047 { (exit 1); exit 1; }
28048fi
28049
28050# Work around bugs in pre-3.0 UWIN ksh.
28051for as_var in ENV MAIL MAILPATH
28052do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28053done
28054PS1='$ '
28055PS2='> '
28056PS4='+ '
28057
28058# NLS nuisances.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028059for as_var in \
28060 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
28061 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
28062 LC_TELEPHONE LC_TIME
28063do
28064 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
28065 eval $as_var=C; export $as_var
28066 else
28067 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
28068 fi
28069done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028070
28071# Required to use basename.
28072if expr a : '\(a\)' >/dev/null 2>&1 &&
28073 test "X`expr 00001 : '.*\(...\)'`" = X001; then
28074 as_expr=expr
28075else
28076 as_expr=false
28077fi
28078
28079if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
28080 as_basename=basename
28081else
28082 as_basename=false
28083fi
28084
28085
28086# Name of the executable.
28087as_me=`$as_basename -- "$0" ||
28088$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
28089 X"$0" : 'X\(//\)$' \| \
28090 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028091echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028092 sed '/^.*\/\([^/][^/]*\)\/*$/{
28093 s//\1/
28094 q
28095 }
28096 /^X\/\(\/\/\)$/{
28097 s//\1/
28098 q
28099 }
28100 /^X\/\(\/\).*/{
28101 s//\1/
28102 q
28103 }
28104 s/.*/./; q'`
28105
28106# CDPATH.
28107$as_unset CDPATH
28108
28109
28110
Martin v. Löwis11437992002-04-12 09:54:03 +000028111 as_lineno_1=$LINENO
28112 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000028113 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028114 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000028115
Martin v. Löwis11437992002-04-12 09:54:03 +000028116 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
28117 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000028118 # line-number line after each line using $LINENO; the second 'sed'
28119 # does the real work. The second script uses 'N' to pair each
28120 # line-number line with the line containing $LINENO, and appends
28121 # trailing '-' during substitution so that $LINENO is not a special
28122 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000028123 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028124 # scripts with optimization help from Paolo Bonzini. Blame Lee
28125 # E. McMahon (1931-1989) for sed's syntax. :-)
28126 sed -n '
28127 p
28128 /[$]LINENO/=
28129 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000028130 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000028131 s/[$]LINENO.*/&-/
28132 t lineno
28133 b
28134 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000028135 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000028136 :loop
28137 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000028138 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000028139 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000028140 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000028141 chmod +x "$as_me.lineno" ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028142 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028143 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000028144
Martin v. Löwis11437992002-04-12 09:54:03 +000028145 # Don't try to exec as it changes $[0], causing all sort of problems
28146 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000028147 # original and so on. Autoconf is especially sensitive to this).
28148 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000028149 # Exit status is that of the last command.
28150 exit
28151}
28152
28153
Martin v. Löwiseba40652007-08-30 20:10:57 +000028154if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
28155 as_dirname=dirname
28156else
28157 as_dirname=false
28158fi
28159
28160ECHO_C= ECHO_N= ECHO_T=
28161case `echo -n x` in
28162-n*)
28163 case `echo 'x\c'` in
28164 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
28165 *) ECHO_C='\c';;
28166 esac;;
28167*)
28168 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000028169esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028170
Martin v. Löwiseba40652007-08-30 20:10:57 +000028171if expr a : '\(a\)' >/dev/null 2>&1 &&
28172 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028173 as_expr=expr
28174else
28175 as_expr=false
28176fi
28177
28178rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000028179if test -d conf$$.dir; then
28180 rm -f conf$$.dir/conf$$.file
28181else
28182 rm -f conf$$.dir
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028183 mkdir conf$$.dir
Martin v. Löwiseba40652007-08-30 20:10:57 +000028184fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028185echo >conf$$.file
28186if ln -s conf$$.file conf$$ 2>/dev/null; then
28187 as_ln_s='ln -s'
28188 # ... but there are two gotchas:
28189 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
28190 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
28191 # In both cases, we have to default to `cp -p'.
28192 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028193 as_ln_s='cp -p'
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028194elif ln conf$$.file conf$$ 2>/dev/null; then
28195 as_ln_s=ln
Martin v. Löwis11437992002-04-12 09:54:03 +000028196else
28197 as_ln_s='cp -p'
28198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028199rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
28200rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000028201
Skip Montanaro6dead952003-09-25 14:50:04 +000028202if mkdir -p . 2>/dev/null; then
28203 as_mkdir_p=:
28204else
Skip Montanarof0d5f792004-08-15 14:08:23 +000028205 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000028206 as_mkdir_p=false
28207fi
28208
Martin v. Löwiseba40652007-08-30 20:10:57 +000028209if test -x / >/dev/null 2>&1; then
28210 as_test_x='test -x'
28211else
28212 if ls -dL / >/dev/null 2>&1; then
28213 as_ls_L_option=L
28214 else
28215 as_ls_L_option=
28216 fi
28217 as_test_x='
28218 eval sh -c '\''
28219 if test -d "$1"; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028220 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000028221 else
28222 case $1 in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028223 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028224 esac;
28225 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
28226 ???[sx]*):;;*)false;;esac;fi
28227 '\'' sh
28228 '
28229fi
28230as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000028231
28232# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028233as_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 +000028234
28235# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000028236as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000028237
28238
Martin v. Löwis11437992002-04-12 09:54:03 +000028239exec 6>&1
28240
Martin v. Löwiseba40652007-08-30 20:10:57 +000028241# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000028242# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000028243# values after options handling.
28244ac_log="
Martin v. Löwis174440b2008-10-03 08:59:41 +000028245This file was extended by python $as_me 2.7, which was
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028246generated by GNU Autoconf 2.61. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000028247
28248 CONFIG_FILES = $CONFIG_FILES
28249 CONFIG_HEADERS = $CONFIG_HEADERS
28250 CONFIG_LINKS = $CONFIG_LINKS
28251 CONFIG_COMMANDS = $CONFIG_COMMANDS
28252 $ $0 $@
28253
Martin v. Löwiseba40652007-08-30 20:10:57 +000028254on `(hostname || uname -n) 2>/dev/null | sed 1q`
28255"
28256
Martin v. Löwis11437992002-04-12 09:54:03 +000028257_ACEOF
28258
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028259cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028260# Files that config.status was made for.
Ronald Oussoren450d5612009-06-08 21:12:41 +000028261config_files="$ac_config_files"
28262config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000028263
Martin v. Löwiseba40652007-08-30 20:10:57 +000028264_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028265
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028266cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028267ac_cs_usage="\
28268\`$as_me' instantiates files from templates according to the
28269current configuration.
28270
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028271Usage: $0 [OPTIONS] [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000028272
28273 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000028274 -V, --version print version number and configuration settings, then exit
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028275 -q, --quiet do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000028276 -d, --debug don't remove temporary files
28277 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028278 --file=FILE[:TEMPLATE]
28279 instantiate the configuration file FILE
28280 --header=FILE[:TEMPLATE]
28281 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000028282
28283Configuration files:
28284$config_files
28285
28286Configuration headers:
28287$config_headers
28288
28289Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000028290
Martin v. Löwiseba40652007-08-30 20:10:57 +000028291_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028292cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028293ac_cs_version="\\
Martin v. Löwis174440b2008-10-03 08:59:41 +000028294python config.status 2.7
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028295configured by $0, generated by GNU Autoconf 2.61,
28296 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000028297
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028298Copyright (C) 2006 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000028299This config.status script is free software; the Free Software Foundation
28300gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028301
28302ac_pwd='$ac_pwd'
28303srcdir='$srcdir'
28304INSTALL='$INSTALL'
Martin v. Löwis11437992002-04-12 09:54:03 +000028305_ACEOF
28306
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028307cat >>$CONFIG_STATUS <<\_ACEOF
28308# If no file are specified by the user, then we need to provide default
28309# value. By we need to know if files were specified by the user.
Martin v. Löwis11437992002-04-12 09:54:03 +000028310ac_need_defaults=:
28311while test $# != 0
28312do
28313 case $1 in
28314 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000028315 ac_option=`expr "X$1" : 'X\([^=]*\)='`
28316 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000028317 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000028318 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028319 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000028320 ac_option=$1
28321 ac_optarg=$2
28322 ac_shift=shift
28323 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028324 esac
28325
Skip Montanaro6dead952003-09-25 14:50:04 +000028326 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000028327 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000028328 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
28329 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028330 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028331 echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028332 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000028333 debug=: ;;
28334 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000028335 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028336 CONFIG_FILES="$CONFIG_FILES $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028337 ac_need_defaults=false;;
28338 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000028339 $ac_shift
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028340 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
Martin v. Löwis11437992002-04-12 09:54:03 +000028341 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028342 --he | --h)
28343 # Conflict between --help and --header
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028344 { echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028345Try \`$0 --help' for more information." >&2
28346 { (exit 1); exit 1; }; };;
28347 --help | --hel | -h )
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028348 echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000028349 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
28350 | -silent | --silent | --silen | --sile | --sil | --si | --s)
28351 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028352
28353 # This is an error.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028354 -*) { echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000028355Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028356 { (exit 1); exit 1; }; } ;;
28357
Martin v. Löwiseba40652007-08-30 20:10:57 +000028358 *) ac_config_targets="$ac_config_targets $1"
28359 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028360
28361 esac
28362 shift
28363done
28364
Skip Montanaro6dead952003-09-25 14:50:04 +000028365ac_configure_extra_args=
28366
28367if $ac_cs_silent; then
28368 exec 6>/dev/null
28369 ac_configure_extra_args="$ac_configure_extra_args --silent"
28370fi
28371
28372_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028373cat >>$CONFIG_STATUS <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000028374if \$ac_cs_recheck; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028375 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
28376 CONFIG_SHELL=$SHELL
Martin v. Löwiseba40652007-08-30 20:10:57 +000028377 export CONFIG_SHELL
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028378 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
Skip Montanaro6dead952003-09-25 14:50:04 +000028379fi
28380
Martin v. Löwis11437992002-04-12 09:54:03 +000028381_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028382cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028383exec 5>>config.log
28384{
28385 echo
28386 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28387## Running $as_me. ##
28388_ASBOX
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028389 echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028390} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028391
Martin v. Löwiseba40652007-08-30 20:10:57 +000028392_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028393cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028394_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028395
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028396cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028397
28398# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028399for ac_config_target in $ac_config_targets
28400do
Martin v. Löwiseba40652007-08-30 20:10:57 +000028401 case $ac_config_target in
28402 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28403 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28404 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
28405 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000028406 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28407 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028408 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28409 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrouf2caeed2009-05-24 20:23:57 +000028410 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028411
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028412 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28413echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028414 { (exit 1); exit 1; }; };;
28415 esac
28416done
28417
Martin v. Löwiseba40652007-08-30 20:10:57 +000028418
Martin v. Löwis11437992002-04-12 09:54:03 +000028419# If the user did not use the arguments to specify the items to instantiate,
28420# then the envvar interface is used. Set only those that are not.
28421# We use the long form for the default assignment because of an extremely
28422# bizarre bug on SunOS 4.1.3.
28423if $ac_need_defaults; then
28424 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28425 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28426fi
28427
Skip Montanaro6dead952003-09-25 14:50:04 +000028428# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000028429# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028430# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028431# Hook for its removal unless debugging.
28432# Note that there is a small window in which the directory will not be cleaned:
28433# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028434$debug ||
28435{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028436 tmp=
28437 trap 'exit_status=$?
28438 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28439' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028440 trap '{ (exit 1); exit 1; }' 1 2 13 15
28441}
Martin v. Löwis11437992002-04-12 09:54:03 +000028442# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028443
Martin v. Löwis11437992002-04-12 09:54:03 +000028444{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028445 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028446 test -n "$tmp" && test -d "$tmp"
28447} ||
28448{
Martin v. Löwiseba40652007-08-30 20:10:57 +000028449 tmp=./conf$$-$RANDOM
28450 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028451} ||
28452{
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028453 echo "$me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028454 { (exit 1); exit 1; }
28455}
28456
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028457#
28458# Set up the sed scripts for CONFIG_FILES section.
28459#
28460
28461# No need to generate the scripts if there are no CONFIG_FILES.
28462# This happens for instance when ./config.status config.h
Martin v. Löwiseba40652007-08-30 20:10:57 +000028463if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028464
28465_ACEOF
28466
Martin v. Löwiseba40652007-08-30 20:10:57 +000028467
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028468
Martin v. Löwiseba40652007-08-30 20:10:57 +000028469ac_delim='%!_!# '
28470for ac_last_try in false false false false false :; do
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028471 cat >conf$$subs.sed <<_ACEOF
28472SHELL!$SHELL$ac_delim
28473PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim
28474PACKAGE_NAME!$PACKAGE_NAME$ac_delim
28475PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim
28476PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
28477PACKAGE_STRING!$PACKAGE_STRING$ac_delim
28478PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
28479exec_prefix!$exec_prefix$ac_delim
28480prefix!$prefix$ac_delim
28481program_transform_name!$program_transform_name$ac_delim
28482bindir!$bindir$ac_delim
28483sbindir!$sbindir$ac_delim
28484libexecdir!$libexecdir$ac_delim
28485datarootdir!$datarootdir$ac_delim
28486datadir!$datadir$ac_delim
28487sysconfdir!$sysconfdir$ac_delim
28488sharedstatedir!$sharedstatedir$ac_delim
28489localstatedir!$localstatedir$ac_delim
28490includedir!$includedir$ac_delim
28491oldincludedir!$oldincludedir$ac_delim
28492docdir!$docdir$ac_delim
28493infodir!$infodir$ac_delim
28494htmldir!$htmldir$ac_delim
28495dvidir!$dvidir$ac_delim
28496pdfdir!$pdfdir$ac_delim
28497psdir!$psdir$ac_delim
28498libdir!$libdir$ac_delim
28499localedir!$localedir$ac_delim
28500mandir!$mandir$ac_delim
28501DEFS!$DEFS$ac_delim
28502ECHO_C!$ECHO_C$ac_delim
28503ECHO_N!$ECHO_N$ac_delim
28504ECHO_T!$ECHO_T$ac_delim
28505LIBS!$LIBS$ac_delim
28506build_alias!$build_alias$ac_delim
28507host_alias!$host_alias$ac_delim
28508target_alias!$target_alias$ac_delim
28509VERSION!$VERSION$ac_delim
28510SOVERSION!$SOVERSION$ac_delim
28511CONFIG_ARGS!$CONFIG_ARGS$ac_delim
28512UNIVERSALSDK!$UNIVERSALSDK$ac_delim
28513ARCH_RUN_32BIT!$ARCH_RUN_32BIT$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028514LIPO_32BIT_FLAGS!$LIPO_32BIT_FLAGS$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028515PYTHONFRAMEWORK!$PYTHONFRAMEWORK$ac_delim
28516PYTHONFRAMEWORKIDENTIFIER!$PYTHONFRAMEWORKIDENTIFIER$ac_delim
28517PYTHONFRAMEWORKDIR!$PYTHONFRAMEWORKDIR$ac_delim
28518PYTHONFRAMEWORKPREFIX!$PYTHONFRAMEWORKPREFIX$ac_delim
28519PYTHONFRAMEWORKINSTALLDIR!$PYTHONFRAMEWORKINSTALLDIR$ac_delim
28520FRAMEWORKINSTALLFIRST!$FRAMEWORKINSTALLFIRST$ac_delim
28521FRAMEWORKINSTALLLAST!$FRAMEWORKINSTALLLAST$ac_delim
28522FRAMEWORKALTINSTALLFIRST!$FRAMEWORKALTINSTALLFIRST$ac_delim
28523FRAMEWORKALTINSTALLLAST!$FRAMEWORKALTINSTALLLAST$ac_delim
28524FRAMEWORKUNIXTOOLSPREFIX!$FRAMEWORKUNIXTOOLSPREFIX$ac_delim
Ronald Oussoren01d149f2010-04-30 11:20:14 +000028525FRAMEWORKINSTALLAPPSPREFIX!$FRAMEWORKINSTALLAPPSPREFIX$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028526MACHDEP!$MACHDEP$ac_delim
28527SGI_ABI!$SGI_ABI$ac_delim
28528EXTRAPLATDIR!$EXTRAPLATDIR$ac_delim
28529EXTRAMACHDEPPATH!$EXTRAMACHDEPPATH$ac_delim
28530CONFIGURE_MACOSX_DEPLOYMENT_TARGET!$CONFIGURE_MACOSX_DEPLOYMENT_TARGET$ac_delim
28531EXPORT_MACOSX_DEPLOYMENT_TARGET!$EXPORT_MACOSX_DEPLOYMENT_TARGET$ac_delim
28532CC!$CC$ac_delim
28533CFLAGS!$CFLAGS$ac_delim
28534LDFLAGS!$LDFLAGS$ac_delim
28535CPPFLAGS!$CPPFLAGS$ac_delim
28536ac_ct_CC!$ac_ct_CC$ac_delim
28537EXEEXT!$EXEEXT$ac_delim
28538OBJEXT!$OBJEXT$ac_delim
28539CXX!$CXX$ac_delim
28540MAINCC!$MAINCC$ac_delim
28541CPP!$CPP$ac_delim
28542GREP!$GREP$ac_delim
28543EGREP!$EGREP$ac_delim
28544BUILDEXEEXT!$BUILDEXEEXT$ac_delim
28545LIBRARY!$LIBRARY$ac_delim
28546LDLIBRARY!$LDLIBRARY$ac_delim
28547DLLLIBRARY!$DLLLIBRARY$ac_delim
28548BLDLIBRARY!$BLDLIBRARY$ac_delim
28549LDLIBRARYDIR!$LDLIBRARYDIR$ac_delim
28550INSTSONAME!$INSTSONAME$ac_delim
28551RUNSHARED!$RUNSHARED$ac_delim
28552LINKCC!$LINKCC$ac_delim
28553GNULD!$GNULD$ac_delim
28554RANLIB!$RANLIB$ac_delim
28555AR!$AR$ac_delim
28556ARFLAGS!$ARFLAGS$ac_delim
28557SVNVERSION!$SVNVERSION$ac_delim
28558INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
28559INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
28560INSTALL_DATA!$INSTALL_DATA$ac_delim
28561LN!$LN$ac_delim
28562OPT!$OPT$ac_delim
28563BASECFLAGS!$BASECFLAGS$ac_delim
28564UNIVERSAL_ARCH_FLAGS!$UNIVERSAL_ARCH_FLAGS$ac_delim
28565OTHER_LIBTOOL_OPT!$OTHER_LIBTOOL_OPT$ac_delim
28566LIBTOOL_CRUFT!$LIBTOOL_CRUFT$ac_delim
28567SO!$SO$ac_delim
28568LDSHARED!$LDSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028569_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028570
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028571 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 +000028572 break
28573 elif $ac_last_try; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028574 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28575echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028576 { (exit 1); exit 1; }; }
28577 else
28578 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028579 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000028580done
28581
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028582ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28583if test -n "$ac_eof"; then
28584 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28585 ac_eof=`expr $ac_eof + 1`
28586fi
28587
28588cat >>$CONFIG_STATUS <<_ACEOF
28589cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof
28590/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Martin v. Löwiseba40652007-08-30 20:10:57 +000028591_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028592sed '
28593s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28594s/^/s,@/; s/!/@,|#_!!_#|/
28595:n
28596t n
28597s/'"$ac_delim"'$/,g/; t
28598s/$/\\/; p
28599N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28600' >>$CONFIG_STATUS <conf$$subs.sed
28601rm -f conf$$subs.sed
28602cat >>$CONFIG_STATUS <<_ACEOF
28603CEOF$ac_eof
Martin v. Löwiseba40652007-08-30 20:10:57 +000028604_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028605
28606
28607ac_delim='%!_!# '
28608for ac_last_try in false false false false false :; do
28609 cat >conf$$subs.sed <<_ACEOF
Ronald Oussoren01d149f2010-04-30 11:20:14 +000028610LDCXXSHARED!$LDCXXSHARED$ac_delim
Ronald Oussoren75912852010-04-08 08:13:31 +000028611BLDSHARED!$BLDSHARED$ac_delim
Ronald Oussoren92919a62009-12-24 13:30:58 +000028612CCSHARED!$CCSHARED$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028613LINKFORSHARED!$LINKFORSHARED$ac_delim
28614CFLAGSFORSHARED!$CFLAGSFORSHARED$ac_delim
28615SHLIBS!$SHLIBS$ac_delim
Benjamin Peterson1c335e62010-01-01 15:16:29 +000028616PKG_CONFIG!$PKG_CONFIG$ac_delim
28617LIBFFI_INCLUDEDIR!$LIBFFI_INCLUDEDIR$ac_delim
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028618USE_SIGNAL_MODULE!$USE_SIGNAL_MODULE$ac_delim
28619SIGNAL_OBJS!$SIGNAL_OBJS$ac_delim
28620USE_THREAD_MODULE!$USE_THREAD_MODULE$ac_delim
28621LDLAST!$LDLAST$ac_delim
28622THREADOBJ!$THREADOBJ$ac_delim
28623DLINCLDIR!$DLINCLDIR$ac_delim
28624DYNLOADFILE!$DYNLOADFILE$ac_delim
28625MACHDEP_OBJS!$MACHDEP_OBJS$ac_delim
28626TRUE!$TRUE$ac_delim
28627LIBOBJS!$LIBOBJS$ac_delim
28628HAVE_GETHOSTBYNAME_R_6_ARG!$HAVE_GETHOSTBYNAME_R_6_ARG$ac_delim
28629HAVE_GETHOSTBYNAME_R_5_ARG!$HAVE_GETHOSTBYNAME_R_5_ARG$ac_delim
28630HAVE_GETHOSTBYNAME_R_3_ARG!$HAVE_GETHOSTBYNAME_R_3_ARG$ac_delim
28631HAVE_GETHOSTBYNAME_R!$HAVE_GETHOSTBYNAME_R$ac_delim
28632HAVE_GETHOSTBYNAME!$HAVE_GETHOSTBYNAME$ac_delim
28633LIBM!$LIBM$ac_delim
28634LIBC!$LIBC$ac_delim
28635UNICODE_OBJS!$UNICODE_OBJS$ac_delim
28636THREADHEADERS!$THREADHEADERS$ac_delim
28637SRCDIRS!$SRCDIRS$ac_delim
28638LTLIBOBJS!$LTLIBOBJS$ac_delim
28639_ACEOF
28640
Ronald Oussoren01d149f2010-04-30 11:20:14 +000028641 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 29; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028642 break
28643 elif $ac_last_try; then
28644 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28645echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028646 { (exit 1); exit 1; }; }
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028647 else
28648 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28649 fi
28650done
28651
28652ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed`
28653if test -n "$ac_eof"; then
28654 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q`
28655 ac_eof=`expr $ac_eof + 1`
28656fi
28657
28658cat >>$CONFIG_STATUS <<_ACEOF
28659cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof
28660/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end
Martin v. Löwiseba40652007-08-30 20:10:57 +000028661_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028662sed '
28663s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g
28664s/^/s,@/; s/!/@,|#_!!_#|/
28665:n
28666t n
28667s/'"$ac_delim"'$/,g/; t
28668s/$/\\/; p
28669N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
28670' >>$CONFIG_STATUS <conf$$subs.sed
28671rm -f conf$$subs.sed
28672cat >>$CONFIG_STATUS <<_ACEOF
28673:end
28674s/|#_!!_#|//g
28675CEOF$ac_eof
28676_ACEOF
28677
Martin v. Löwiseba40652007-08-30 20:10:57 +000028678
28679# VPATH may cause trouble with some makes, so we remove $(srcdir),
28680# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28681# trailing colons and then remove the whole line if VPATH becomes empty
28682# (actually we leave an empty line to preserve line numbers).
28683if test "x$srcdir" = x.; then
28684 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28685s/:*\$(srcdir):*/:/
28686s/:*\${srcdir}:*/:/
28687s/:*@srcdir@:*/:/
28688s/^\([^=]*=[ ]*\):*/\1/
28689s/:*$//
28690s/^[^=]*=[ ]*$//
28691}'
28692fi
28693
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028694cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028695fi # test -n "$CONFIG_FILES"
28696
Martin v. Löwiseba40652007-08-30 20:10:57 +000028697
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028698for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
Martin v. Löwiseba40652007-08-30 20:10:57 +000028699do
28700 case $ac_tag in
28701 :[FHLC]) ac_mode=$ac_tag; continue;;
28702 esac
28703 case $ac_mode$ac_tag in
28704 :[FHL]*:*);;
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028705 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5
28706echo "$as_me: error: Invalid tag $ac_tag." >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028707 { (exit 1); exit 1; }; };;
28708 :[FH]-) ac_tag=-:-;;
28709 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28710 esac
28711 ac_save_IFS=$IFS
28712 IFS=:
28713 set x $ac_tag
28714 IFS=$ac_save_IFS
28715 shift
28716 ac_file=$1
28717 shift
28718
28719 case $ac_mode in
28720 :L) ac_source=$1;;
28721 :[FH])
28722 ac_file_inputs=
28723 for ac_f
28724 do
28725 case $ac_f in
28726 -) ac_f="$tmp/stdin";;
28727 *) # Look for the file first in the build tree, then in the source tree
28728 # (if the path is not absolute). The absolute path cannot be DOS-style,
28729 # because $ac_f cannot contain `:'.
28730 test -f "$ac_f" ||
28731 case $ac_f in
28732 [\\/$]*) false;;
28733 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28734 esac ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028735 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28736echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028737 { (exit 1); exit 1; }; };;
28738 esac
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028739 ac_file_inputs="$ac_file_inputs $ac_f"
Martin v. Löwiseba40652007-08-30 20:10:57 +000028740 done
28741
28742 # Let's still pretend it is `configure' which instantiates (i.e., don't
28743 # use $as_me), people would be surprised to read:
28744 # /* config.h. Generated by config.status. */
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028745 configure_input="Generated from "`IFS=:
28746 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure."
Martin v. Löwiseba40652007-08-30 20:10:57 +000028747 if test x"$ac_file" != x-; then
28748 configure_input="$ac_file. $configure_input"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028749 { echo "$as_me:$LINENO: creating $ac_file" >&5
28750echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028751 fi
28752
28753 case $ac_tag in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028754 *:-:* | *:-) cat >"$tmp/stdin";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028755 esac
28756 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028757 esac
28758
Martin v. Löwiseba40652007-08-30 20:10:57 +000028759 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028760$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028761 X"$ac_file" : 'X\(//\)[^/]' \| \
28762 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028763 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028764echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028765 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28766 s//\1/
28767 q
28768 }
28769 /^X\(\/\/\)[^/].*/{
28770 s//\1/
28771 q
28772 }
28773 /^X\(\/\/\)$/{
28774 s//\1/
28775 q
28776 }
28777 /^X\(\/\).*/{
28778 s//\1/
28779 q
28780 }
28781 s/.*/./; q'`
28782 { as_dir="$ac_dir"
28783 case $as_dir in #(
28784 -*) as_dir=./$as_dir;;
28785 esac
28786 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028787 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000028788 while :; do
28789 case $as_dir in #(
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028790 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000028791 *) as_qdir=$as_dir;;
28792 esac
28793 as_dirs="'$as_qdir' $as_dirs"
28794 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028795$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028796 X"$as_dir" : 'X\(//\)[^/]' \| \
28797 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000028798 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028799echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000028800 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28801 s//\1/
28802 q
28803 }
28804 /^X\(\/\/\)[^/].*/{
28805 s//\1/
28806 q
28807 }
28808 /^X\(\/\/\)$/{
28809 s//\1/
28810 q
28811 }
28812 /^X\(\/\).*/{
28813 s//\1/
28814 q
28815 }
28816 s/.*/./; q'`
28817 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028818 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000028819 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028820 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28821echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028822 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028823 ac_builddir=.
28824
Martin v. Löwiseba40652007-08-30 20:10:57 +000028825case "$ac_dir" in
28826.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28827*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028828 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028829 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028830 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000028831 case $ac_top_builddir_sub in
28832 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28833 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28834 esac ;;
28835esac
28836ac_abs_top_builddir=$ac_pwd
28837ac_abs_builddir=$ac_pwd$ac_dir_suffix
28838# for backward compatibility:
28839ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028840
28841case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028842 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028843 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000028844 ac_top_srcdir=$ac_top_builddir_sub
28845 ac_abs_top_srcdir=$ac_pwd ;;
28846 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028847 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028848 ac_top_srcdir=$srcdir
28849 ac_abs_top_srcdir=$srcdir ;;
28850 *) # Relative name.
28851 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28852 ac_top_srcdir=$ac_top_build_prefix$srcdir
28853 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028854esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028855ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028856
Martin v. Löwis11437992002-04-12 09:54:03 +000028857
Martin v. Löwiseba40652007-08-30 20:10:57 +000028858 case $ac_mode in
28859 :F)
28860 #
28861 # CONFIG_FILE
28862 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028863
28864 case $INSTALL in
28865 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000028866 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028867 esac
Brett Cannon19fab762007-06-02 03:02:29 +000028868_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028869
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028870cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028871# If the template does not know about datarootdir, expand it.
28872# FIXME: This hack should be removed a few years after 2.60.
28873ac_datarootdir_hack=; ac_datarootdir_seen=
28874
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028875case `sed -n '/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000028876 p
28877 q
28878}
28879/@datadir@/p
28880/@docdir@/p
28881/@infodir@/p
28882/@localedir@/p
28883/@mandir@/p
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028884' $ac_file_inputs` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000028885*datarootdir*) ac_datarootdir_seen=yes;;
28886*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028887 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28888echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000028889_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028890cat >>$CONFIG_STATUS <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000028891 ac_datarootdir_hack='
28892 s&@datadir@&$datadir&g
28893 s&@docdir@&$docdir&g
28894 s&@infodir@&$infodir&g
28895 s&@localedir@&$localedir&g
28896 s&@mandir@&$mandir&g
28897 s&\\\${datarootdir}&$datarootdir&g' ;;
28898esac
28899_ACEOF
28900
28901# Neutralize VPATH when `$srcdir' = `.'.
28902# Shell code in configure.ac might set extrasub.
28903# FIXME: do we really want to maintain this feature?
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028904cat >>$CONFIG_STATUS <<_ACEOF
28905 sed "$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028906$extrasub
28907_ACEOF
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028908cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028909:t
28910/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028911s&@configure_input@&$configure_input&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000028912s&@top_builddir@&$ac_top_builddir_sub&;t t
28913s&@srcdir@&$ac_srcdir&;t t
28914s&@abs_srcdir@&$ac_abs_srcdir&;t t
28915s&@top_srcdir@&$ac_top_srcdir&;t t
28916s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28917s&@builddir@&$ac_builddir&;t t
28918s&@abs_builddir@&$ac_abs_builddir&;t t
28919s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28920s&@INSTALL@&$ac_INSTALL&;t t
28921$ac_datarootdir_hack
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028922" $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 +000028923
Martin v. Löwiseba40652007-08-30 20:10:57 +000028924test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28925 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28926 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028927 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028928which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028929echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000028930which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028931
Martin v. Löwiseba40652007-08-30 20:10:57 +000028932 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028933 case $ac_file in
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028934 -) cat "$tmp/out"; rm -f "$tmp/out";;
28935 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;;
28936 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000028937 ;;
28938 :H)
28939 #
28940 # CONFIG_HEADER
28941 #
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000028942_ACEOF
28943
28944# Transform confdefs.h into a sed script `conftest.defines', that
28945# substitutes the proper values into config.h.in to produce config.h.
28946rm -f conftest.defines conftest.tail
28947# First, append a space to every undef/define line, to ease matching.
28948echo 's/$/ /' >conftest.defines
28949# Then, protect against being on the right side of a sed subst, or in
28950# an unquoted here document, in config.status. If some macros were
28951# called several times there might be several #defines for the same
28952# symbol, which is useless. But do not sort them, since the last
28953# AC_DEFINE must be honored.
28954ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28955# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
28956# NAME is the cpp macro being defined, VALUE is the value it is being given.
28957# PARAMS is the parameter list in the macro definition--in most cases, it's
28958# just an empty string.
28959ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
28960ac_dB='\\)[ (].*,\\1define\\2'
28961ac_dC=' '
28962ac_dD=' ,'
28963
28964uniq confdefs.h |
28965 sed -n '
28966 t rset
28967 :rset
28968 s/^[ ]*#[ ]*define[ ][ ]*//
28969 t ok
28970 d
28971 :ok
28972 s/[\\&,]/\\&/g
28973 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
28974 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
28975 ' >>conftest.defines
28976
28977# Remove the space that was appended to ease matching.
28978# Then replace #undef with comments. This is necessary, for
28979# example, in the case of _POSIX_SOURCE, which is predefined and required
28980# on some systems where configure will not decide to define it.
28981# (The regexp can be short, since the line contains either #define or #undef.)
28982echo 's/ $//
28983s,^[ #]*u.*,/* & */,' >>conftest.defines
28984
28985# Break up conftest.defines:
28986ac_max_sed_lines=50
28987
28988# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
28989# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
28990# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
28991# et cetera.
28992ac_in='$ac_file_inputs'
28993ac_out='"$tmp/out1"'
28994ac_nxt='"$tmp/out2"'
28995
28996while :
28997do
28998 # Write a here document:
28999 cat >>$CONFIG_STATUS <<_ACEOF
29000 # First, check the format of the line:
29001 cat >"\$tmp/defines.sed" <<\\CEOF
29002/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
29003/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
29004b
29005:def
29006_ACEOF
29007 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
29008 echo 'CEOF
29009 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
29010 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
29011 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
29012 grep . conftest.tail >/dev/null || break
29013 rm -f conftest.defines
29014 mv conftest.tail conftest.defines
29015done
29016rm -f conftest.defines conftest.tail
29017
29018echo "ac_result=$ac_in" >>$CONFIG_STATUS
29019cat >>$CONFIG_STATUS <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000029020 if test x"$ac_file" != x-; then
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029021 echo "/* $configure_input */" >"$tmp/config.h"
29022 cat "$ac_result" >>"$tmp/config.h"
29023 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then
29024 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5
29025echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000029026 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029027 rm -f $ac_file
29028 mv "$tmp/config.h" $ac_file
Martin v. Löwis11437992002-04-12 09:54:03 +000029029 fi
29030 else
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029031 echo "/* $configure_input */"
29032 cat "$ac_result"
Martin v. Löwis11437992002-04-12 09:54:03 +000029033 fi
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029034 rm -f "$tmp/out12"
Martin v. Löwiseba40652007-08-30 20:10:57 +000029035 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000029036
Martin v. Löwiseba40652007-08-30 20:10:57 +000029037
29038 esac
29039
29040done # for ac_tag
29041
Guido van Rossum627b2d71993-12-24 10:39:16 +000029042
Martin v. Löwis11437992002-04-12 09:54:03 +000029043{ (exit 0); exit 0; }
29044_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000029045chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000029046ac_clean_files=$ac_clean_files_save
29047
29048
29049# configure is writing to config.log, and then calls config.status.
29050# config.status does its own redirection, appending to config.log.
29051# Unfortunately, on DOS this fails, as config.log is still kept open
29052# by configure, so config.status won't be able to write to it; its
29053# output is simply discarded. So we exec the FD to /dev/null,
29054# effectively closing config.log, so it can be properly (re)opened and
29055# appended to by config.status. When coming back to configure, we
29056# need to make the FD available again.
29057if test "$no_create" != yes; then
29058 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000029059 ac_config_status_args=
29060 test "$silent" = yes &&
29061 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000029062 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000029063 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000029064 exec 5>>config.log
29065 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
29066 # would make configure fail if this is the last instruction.
29067 $ac_cs_success || { (exit 1); exit 1; }
29068fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000029069
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029070
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029071echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029072if test ! -f Modules/Setup
29073then
29074 cp $srcdir/Modules/Setup.dist Modules/Setup
29075fi
29076
Martin v. Löwisf7afe952006-04-14 15:16:15 +000029077echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000029078if test ! -f Modules/Setup.local
29079then
29080 echo "# Edit this file for local setup changes" >Modules/Setup.local
29081fi
29082
29083echo "creating Makefile"
29084$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
29085 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000029086 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000029087
29088case $ac_sys_system in
29089BeOS)
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029090 { echo "$as_me:$LINENO: 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 " >&5
Alexandre Vassalottibd7569b2009-07-17 23:09:02 +000029095echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000029096
29097 Support for BeOS is deprecated as of Python 2.6.
29098 See PEP 11 for the gory details.
29099 " >&2;}
29100 ;;
29101*) ;;
29102esac
29103
Neil Schemenauerc761fc82001-02-19 04:50:49 +000029104mv config.c Modules