blob: 581195cb669096c0a440a806f7136e0cbdf64466 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitrou20327222009-05-24 20:39:11 +00002# From configure.in Revision: 72874 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Antoine Pitrou20327222009-05-24 20:39:11 +00004# Generated by GNU Autoconf 2.63 for python 3.1.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Antoine Pitrou20327222009-05-24 20:39:11 +00009# 2002, 2003, 2004, 2005, 2006, 2007, 2008 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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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=:
Antoine Pitrou20327222009-05-24 20:39:11 +000021 # Pre-4.2 versions of Zsh do 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+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Antoine Pitrou20327222009-05-24 20:39:11 +000043as_nl='
44'
45export as_nl
46# Printing a long string crashes Solaris 7 /usr/bin/printf.
47as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
50if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
74
Martin v. Löwis11437992002-04-12 09:54:03 +000075# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwis11437992002-04-12 09:54:03 +000082fi
83
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084# Support unset when possible.
85if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
86 as_unset=unset
87else
88 as_unset=false
89fi
Martin v. Löwis11437992002-04-12 09:54:03 +000090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091
92# IFS
93# We need space, tab and new line, in precisely that order. Quoting is
94# there to prevent editors from complaining about space-tab.
95# (If _AS_PATH_WALK were called with IFS unset, it would disable word
96# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000097IFS=" "" $as_nl"
98
99# Find who we are. Look in the path if we contain no directory separator.
100case $0 in
101 *[\\/]* ) as_myself=$0 ;;
102 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +0000103for as_dir in $PATH
104do
105 IFS=$as_save_IFS
106 test -z "$as_dir" && as_dir=.
107 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
108done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000109IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000110
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000111 ;;
112esac
113# We did not find ourselves, most probably we were run as `sh COMMAND'
114# in which case we are not to be found in the path.
115if test "x$as_myself" = x; then
116 as_myself=$0
117fi
118if test ! -f "$as_myself"; then
Antoine Pitrou20327222009-05-24 20:39:11 +0000119 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000120 { (exit 1); exit 1; }
121fi
122
123# Work around bugs in pre-3.0 UWIN ksh.
124for as_var in ENV MAIL MAILPATH
125do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Antoine Pitrou20327222009-05-24 20:39:11 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000136
137# Required to use basename.
138if expr a : '\(a\)' >/dev/null 2>&1 &&
139 test "X`expr 00001 : '.*\(...\)'`" = X001; then
140 as_expr=expr
141else
142 as_expr=false
143fi
144
145if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
146 as_basename=basename
147else
148 as_basename=false
149fi
150
151
152# Name of the executable.
153as_me=`$as_basename -- "$0" ||
154$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
155 X"$0" : 'X\(//\)$' \| \
156 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Antoine Pitrou20327222009-05-24 20:39:11 +0000157$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000158 sed '/^.*\/\([^/][^/]*\)\/*$/{
159 s//\1/
160 q
161 }
162 /^X\/\(\/\/\)$/{
163 s//\1/
164 q
165 }
166 /^X\/\(\/\).*/{
167 s//\1/
168 q
169 }
170 s/.*/./; q'`
171
172# CDPATH.
173$as_unset CDPATH
174
175
176if test "x$CONFIG_SHELL" = x; then
177 if (eval ":") 2>/dev/null; then
178 as_have_required=yes
179else
180 as_have_required=no
181fi
182
Antoine Pitrou20327222009-05-24 20:39:11 +0000183 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000184(as_func_return () {
185 (exit \$1)
186}
187as_func_success () {
188 as_func_return 0
189}
190as_func_failure () {
191 as_func_return 1
192}
193as_func_ret_success () {
194 return 0
195}
196as_func_ret_failure () {
197 return 1
198}
199
200exitcode=0
201if as_func_success; then
202 :
203else
204 exitcode=1
205 echo as_func_success failed.
206fi
207
208if as_func_failure; then
209 exitcode=1
210 echo as_func_failure succeeded.
211fi
212
213if as_func_ret_success; then
214 :
215else
216 exitcode=1
217 echo as_func_ret_success failed.
218fi
219
220if as_func_ret_failure; then
221 exitcode=1
222 echo as_func_ret_failure succeeded.
223fi
224
225if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
226 :
227else
228 exitcode=1
229 echo positional parameters were not saved.
230fi
231
232test \$exitcode = 0) || { (exit 1); exit 1; }
233
234(
235 as_lineno_1=\$LINENO
236 as_lineno_2=\$LINENO
237 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
238 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
239") 2> /dev/null; then
240 :
241else
242 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000244for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000245do
246 IFS=$as_save_IFS
247 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000248 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000249 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000250 for as_base in sh bash ksh sh5; do
251 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
252 done;;
253 esac
254done
255IFS=$as_save_IFS
256
257
258 for as_shell in $as_candidate_shells $SHELL; do
259 # Try only shells that exist, to save several forks.
260 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
261 { ("$as_shell") 2> /dev/null <<\_ASEOF
262if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
263 emulate sh
264 NULLCMD=:
Antoine Pitrou20327222009-05-24 20:39:11 +0000265 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000266 # is contrary to our usage. Disable this feature.
267 alias -g '${1+"$@"}'='"$@"'
268 setopt NO_GLOB_SUBST
269else
270 case `(set -o) 2>/dev/null` in
271 *posix*) set -o posix ;;
272esac
273
274fi
275
276
277:
278_ASEOF
279}; then
280 CONFIG_SHELL=$as_shell
281 as_have_required=yes
282 if { "$as_shell" 2> /dev/null <<\_ASEOF
283if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
284 emulate sh
285 NULLCMD=:
Antoine Pitrou20327222009-05-24 20:39:11 +0000286 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000287 # is contrary to our usage. Disable this feature.
288 alias -g '${1+"$@"}'='"$@"'
289 setopt NO_GLOB_SUBST
290else
291 case `(set -o) 2>/dev/null` in
292 *posix*) set -o posix ;;
293esac
294
295fi
296
297
298:
299(as_func_return () {
300 (exit $1)
301}
302as_func_success () {
303 as_func_return 0
304}
305as_func_failure () {
306 as_func_return 1
307}
308as_func_ret_success () {
309 return 0
310}
311as_func_ret_failure () {
312 return 1
313}
314
315exitcode=0
316if as_func_success; then
317 :
318else
319 exitcode=1
320 echo as_func_success failed.
321fi
322
323if as_func_failure; then
324 exitcode=1
325 echo as_func_failure succeeded.
326fi
327
328if as_func_ret_success; then
329 :
330else
331 exitcode=1
332 echo as_func_ret_success failed.
333fi
334
335if as_func_ret_failure; then
336 exitcode=1
337 echo as_func_ret_failure succeeded.
338fi
339
340if ( set x; as_func_ret_success y && test x = "$1" ); then
341 :
342else
343 exitcode=1
344 echo positional parameters were not saved.
345fi
346
347test $exitcode = 0) || { (exit 1); exit 1; }
348
349(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000350 as_lineno_1=$LINENO
351 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000352 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000353 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
354
355_ASEOF
356}; then
357 break
358fi
359
360fi
361
362 done
363
364 if test "x$CONFIG_SHELL" != x; then
365 for as_var in BASH_ENV ENV
Antoine Pitrou20327222009-05-24 20:39:11 +0000366 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
367 done
368 export CONFIG_SHELL
369 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000370fi
371
372
373 if test $as_have_required = no; then
374 echo This script requires a shell more modern than all the
375 echo shells that I found on your system. Please install a
376 echo modern shell, or manually run the script under such a
377 echo shell if you do have one.
378 { (exit 1); exit 1; }
379fi
380
381
382fi
383
384fi
385
386
387
388(eval "as_func_return () {
389 (exit \$1)
390}
391as_func_success () {
392 as_func_return 0
393}
394as_func_failure () {
395 as_func_return 1
396}
397as_func_ret_success () {
398 return 0
399}
400as_func_ret_failure () {
401 return 1
402}
403
404exitcode=0
405if as_func_success; then
406 :
407else
408 exitcode=1
409 echo as_func_success failed.
410fi
411
412if as_func_failure; then
413 exitcode=1
414 echo as_func_failure succeeded.
415fi
416
417if as_func_ret_success; then
418 :
419else
420 exitcode=1
421 echo as_func_ret_success failed.
422fi
423
424if as_func_ret_failure; then
425 exitcode=1
426 echo as_func_ret_failure succeeded.
427fi
428
429if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
430 :
431else
432 exitcode=1
433 echo positional parameters were not saved.
434fi
435
436test \$exitcode = 0") || {
437 echo No shell found that supports shell functions.
Antoine Pitrou20327222009-05-24 20:39:11 +0000438 echo Please tell bug-autoconf@gnu.org about your system,
439 echo including any error possibly output before this message.
440 echo This can help us improve future autoconf versions.
441 echo Configuration will now proceed without shell functions.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442}
443
444
445
446 as_lineno_1=$LINENO
447 as_lineno_2=$LINENO
448 test "x$as_lineno_1" != "x$as_lineno_2" &&
449 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000450
451 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
452 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000453 # line-number line after each line using $LINENO; the second 'sed'
454 # does the real work. The second script uses 'N' to pair each
455 # line-number line with the line containing $LINENO, and appends
456 # trailing '-' during substitution so that $LINENO is not a special
457 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000459 # scripts with optimization help from Paolo Bonzini. Blame Lee
460 # E. McMahon (1931-1989) for sed's syntax. :-)
461 sed -n '
462 p
463 /[$]LINENO/=
464 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000465 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466 s/[$]LINENO.*/&-/
467 t lineno
468 b
469 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000470 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 :loop
472 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000473 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000474 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000475 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000476 chmod +x "$as_me.lineno" ||
Antoine Pitrou20327222009-05-24 20:39:11 +0000477 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 { (exit 1); exit 1; }; }
479
480 # Don't try to exec as it changes $[0], causing all sort of problems
481 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482 # original and so on. Autoconf is especially sensitive to this).
483 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000484 # Exit status is that of the last command.
485 exit
486}
487
488
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000489if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
490 as_dirname=dirname
491else
492 as_dirname=false
493fi
494
495ECHO_C= ECHO_N= ECHO_T=
496case `echo -n x` in
497-n*)
498 case `echo 'x\c'` in
499 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
500 *) ECHO_C='\c';;
501 esac;;
502*)
503 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000504esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505if expr a : '\(a\)' >/dev/null 2>&1 &&
506 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000507 as_expr=expr
508else
509 as_expr=false
510fi
511
512rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000513if test -d conf$$.dir; then
514 rm -f conf$$.dir/conf$$.file
515else
516 rm -f conf$$.dir
Antoine Pitrou20327222009-05-24 20:39:11 +0000517 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518fi
Antoine Pitrou20327222009-05-24 20:39:11 +0000519if (echo >conf$$.file) 2>/dev/null; then
520 if ln -s conf$$.file conf$$ 2>/dev/null; then
521 as_ln_s='ln -s'
522 # ... but there are two gotchas:
523 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
524 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
525 # In both cases, we have to default to `cp -p'.
526 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
527 as_ln_s='cp -p'
528 elif ln conf$$.file conf$$ 2>/dev/null; then
529 as_ln_s=ln
530 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 as_ln_s='cp -p'
Antoine Pitrou20327222009-05-24 20:39:11 +0000532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000533else
534 as_ln_s='cp -p'
535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
537rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
Skip Montanaro6dead952003-09-25 14:50:04 +0000539if mkdir -p . 2>/dev/null; then
540 as_mkdir_p=:
541else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000542 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000543 as_mkdir_p=false
544fi
545
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000546if test -x / >/dev/null 2>&1; then
547 as_test_x='test -x'
548else
549 if ls -dL / >/dev/null 2>&1; then
550 as_ls_L_option=L
551 else
552 as_ls_L_option=
553 fi
554 as_test_x='
555 eval sh -c '\''
556 if test -d "$1"; then
Antoine Pitrou20327222009-05-24 20:39:11 +0000557 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000558 else
559 case $1 in
Antoine Pitrou20327222009-05-24 20:39:11 +0000560 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000561 esac;
562 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
563 ???[sx]*):;;*)false;;esac;fi
564 '\'' sh
565 '
566fi
567as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000570as_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 +0000571
572# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000573as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000574
575
Martin v. Löwis11437992002-04-12 09:54:03 +0000576
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000577exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000578
579# Name of the host.
580# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
581# so uname gets run too.
582ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
583
Martin v. Löwis11437992002-04-12 09:54:03 +0000584#
585# Initializations.
586#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000589ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000590LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000591cross_compiling=no
592subdirs=
593MFLAGS=
594MAKEFLAGS=
595SHELL=${CONFIG_SHELL-/bin/sh}
596
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000598PACKAGE_NAME='python'
599PACKAGE_TARNAME='python'
Christian Heimes70e5cab2008-12-03 18:18:23 +0000600PACKAGE_VERSION='3.1'
601PACKAGE_STRING='python 3.1'
Georg Brandle2e15612009-05-20 18:25:10 +0000602PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000603
604ac_unique_file="Include/object.h"
605# Factoring default headers for most tests.
606ac_includes_default="\
607#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000608#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <sys/types.h>
610#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000611#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000612# include <sys/stat.h>
613#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000614#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000615# include <stdlib.h>
616# include <stddef.h>
617#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000619# include <stdlib.h>
620# endif
621#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000622#ifdef HAVE_STRING_H
623# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000624# include <memory.h>
625# endif
626# include <string.h>
627#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000628#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000629# include <strings.h>
630#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000631#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000632# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000633#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000634#ifdef HAVE_STDINT_H
635# include <stdint.h>
636#endif
637#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000638# include <unistd.h>
639#endif"
640
Antoine Pitrou20327222009-05-24 20:39:11 +0000641ac_subst_vars='LTLIBOBJS
Martin v. Löwisb70bcf52009-02-19 07:51:52 +0000642SRCDIRS
Antoine Pitrou20327222009-05-24 20:39:11 +0000643THREADHEADERS
644LIBC
645LIBM
646HAVE_GETHOSTBYNAME
647HAVE_GETHOSTBYNAME_R
648HAVE_GETHOSTBYNAME_R_3_ARG
649HAVE_GETHOSTBYNAME_R_5_ARG
650HAVE_GETHOSTBYNAME_R_6_ARG
651LIBOBJS
652TRUE
653MACHDEP_OBJS
654DYNLOADFILE
655DLINCLDIR
656THREADOBJ
657LDLAST
658USE_THREAD_MODULE
659SIGNAL_OBJS
660USE_SIGNAL_MODULE
661SHLIBS
662CFLAGSFORSHARED
663LINKFORSHARED
664CCSHARED
665BLDSHARED
666LDSHARED
667SO
668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
671BASECFLAGS
672OPT
673LN
674INSTALL_DATA
675INSTALL_SCRIPT
676INSTALL_PROGRAM
677SVNVERSION
678ARFLAGS
679AR
680RANLIB
681GNULD
682LINKCC
683RUNSHARED
684INSTSONAME
685LDLIBRARYDIR
686BLDLIBRARY
687DLLLIBRARY
688LDLIBRARY
689LIBRARY
690BUILDEXEEXT
691EGREP
692GREP
693CPP
694MAINCC
695CXX
696OBJEXT
697EXEEXT
698ac_ct_CC
699CPPFLAGS
700LDFLAGS
701CFLAGS
702CC
703EXPORT_MACOSX_DEPLOYMENT_TARGET
704CONFIGURE_MACOSX_DEPLOYMENT_TARGET
705SGI_ABI
706MACHDEP
707FRAMEWORKUNIXTOOLSPREFIX
708FRAMEWORKALTINSTALLLAST
709FRAMEWORKALTINSTALLFIRST
710FRAMEWORKINSTALLLAST
711FRAMEWORKINSTALLFIRST
712PYTHONFRAMEWORKINSTALLDIR
713PYTHONFRAMEWORKPREFIX
714PYTHONFRAMEWORKDIR
715PYTHONFRAMEWORKIDENTIFIER
716PYTHONFRAMEWORK
717ARCH_RUN_32BIT
718UNIVERSALSDK
719CONFIG_ARGS
720SOVERSION
721VERSION
722target_alias
723host_alias
724build_alias
725LIBS
726ECHO_T
727ECHO_N
728ECHO_C
729DEFS
730mandir
731localedir
732libdir
733psdir
734pdfdir
735dvidir
736htmldir
737infodir
738docdir
739oldincludedir
740includedir
741localstatedir
742sharedstatedir
743sysconfdir
744datadir
745datarootdir
746libexecdir
747sbindir
748bindir
749program_transform_name
750prefix
751exec_prefix
752PACKAGE_BUGREPORT
753PACKAGE_STRING
754PACKAGE_VERSION
755PACKAGE_TARNAME
756PACKAGE_NAME
757PATH_SEPARATOR
758SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000759ac_subst_files=''
Antoine Pitrou20327222009-05-24 20:39:11 +0000760ac_user_opts='
761enable_option_checking
762enable_universalsdk
763with_universal_archs
764with_framework_name
765enable_framework
766with_gcc
767with_cxx_main
768with_suffix
769enable_shared
770enable_profiling
771with_pydebug
772with_libs
773with_system_ffi
774with_dbmliborder
775with_signal_module
776with_dec_threads
777with_threads
778with_thread
779with_pth
780enable_ipv6
781with_doc_strings
782with_tsc
783with_pymalloc
784with_wctype_functions
785with_fpectl
786with_libm
787with_libc
788enable_big_digits
789with_wide_unicode
790with_computed_gotos
791'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000792 ac_precious_vars='build_alias
793host_alias
794target_alias
795CC
796CFLAGS
797LDFLAGS
798LIBS
799CPPFLAGS
800CPP'
801
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000804ac_init_help=
805ac_init_version=false
Antoine Pitrou20327222009-05-24 20:39:11 +0000806ac_unrecognized_opts=
807ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808# The variables have the same names as the options, with
809# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000810cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813no_recursion=
814prefix=NONE
815program_prefix=NONE
816program_suffix=NONE
817program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000822x_includes=NONE
823x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000824
825# Installation directory options.
826# These are left unexpanded so users can "make install exec_prefix=/foo"
827# and all the variables that are supposed to be based on exec_prefix
828# by default will actually change.
829# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000831bindir='${exec_prefix}/bin'
832sbindir='${exec_prefix}/sbin'
833libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834datarootdir='${prefix}/share'
835datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836sysconfdir='${prefix}/etc'
837sharedstatedir='${prefix}/com'
838localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839includedir='${prefix}/include'
840oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
842infodir='${datarootdir}/info'
843htmldir='${docdir}'
844dvidir='${docdir}'
845pdfdir='${docdir}'
846psdir='${docdir}'
847libdir='${exec_prefix}/lib'
848localedir='${datarootdir}/locale'
849mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855 # If the previous option needs an argument, assign it.
856 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858 ac_prev=
859 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 case $ac_option in
863 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
864 *) ac_optarg=yes ;;
865 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867 # Accept the important Cygnus configure options, so we can diagnose typos.
868
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869 case $ac_dashdash$ac_option in
870 --)
871 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000873 -bindir | --bindir | --bindi | --bind | --bin | --bi)
874 ac_prev=bindir ;;
875 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877
878 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000881 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883 -cache-file | --cache-file | --cache-fil | --cache-fi \
884 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
885 ac_prev=cache_file ;;
886 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
887 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 cache_file=$ac_optarg ;;
889
890 --config-cache | -C)
891 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
899 | --dataroo | --dataro | --datar)
900 ac_prev=datarootdir ;;
901 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
902 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
903 datarootdir=$ac_optarg ;;
904
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 -disable-* | --disable-*)
Antoine Pitrou20327222009-05-24 20:39:11 +0000906 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907 # Reject names that are not valid shell variable names.
Antoine Pitrou20327222009-05-24 20:39:11 +0000908 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
909 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 { (exit 1); exit 1; }; }
Antoine Pitrou20327222009-05-24 20:39:11 +0000911 ac_useropt_orig=$ac_useropt
912 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
913 case $ac_user_opts in
914 *"
915"enable_$ac_useropt"
916"*) ;;
917 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
918 ac_unrecognized_sep=', ';;
919 esac
920 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921
922 -docdir | --docdir | --docdi | --doc | --do)
923 ac_prev=docdir ;;
924 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
925 docdir=$ac_optarg ;;
926
927 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
928 ac_prev=dvidir ;;
929 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
930 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
932 -enable-* | --enable-*)
Antoine Pitrou20327222009-05-24 20:39:11 +0000933 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Reject names that are not valid shell variable names.
Antoine Pitrou20327222009-05-24 20:39:11 +0000935 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
936 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 { (exit 1); exit 1; }; }
Antoine Pitrou20327222009-05-24 20:39:11 +0000938 ac_useropt_orig=$ac_useropt
939 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
940 case $ac_user_opts in
941 *"
942"enable_$ac_useropt"
943"*) ;;
944 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
945 ac_unrecognized_sep=', ';;
946 esac
947 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
950 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
951 | --exec | --exe | --ex)
952 ac_prev=exec_prefix ;;
953 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
954 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
955 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
958 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 # Obsolete; use --with-gas.
960 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 -help | --help | --hel | --he | -h)
963 ac_init_help=long ;;
964 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
965 ac_init_help=recursive ;;
966 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
967 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968
969 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
975 ac_prev=htmldir ;;
976 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
977 | --ht=*)
978 htmldir=$ac_optarg ;;
979
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980 -includedir | --includedir | --includedi | --included | --include \
981 | --includ | --inclu | --incl | --inc)
982 ac_prev=includedir ;;
983 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
984 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
987 -infodir | --infodir | --infodi | --infod | --info | --inf)
988 ac_prev=infodir ;;
989 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
992 -libdir | --libdir | --libdi | --libd)
993 ac_prev=libdir ;;
994 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996
997 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
998 | --libexe | --libex | --libe)
999 ac_prev=libexecdir ;;
1000 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1001 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001004 -localedir | --localedir | --localedi | --localed | --locale)
1005 ac_prev=localedir ;;
1006 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1007 localedir=$ac_optarg ;;
1008
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001010 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011 ac_prev=localstatedir ;;
1012 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001013 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015
1016 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1017 ac_prev=mandir ;;
1018 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022 # Obsolete; use --without-fp.
1023 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027 no_create=yes ;;
1028
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001029 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1030 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1031 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1034 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1035 | --oldin | --oldi | --old | --ol | --o)
1036 ac_prev=oldincludedir ;;
1037 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1038 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1039 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1043 ac_prev=prefix ;;
1044 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
1047 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1048 | --program-pre | --program-pr | --program-p)
1049 ac_prev=program_prefix ;;
1050 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1051 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
1054 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1055 | --program-suf | --program-su | --program-s)
1056 ac_prev=program_suffix ;;
1057 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1058 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -program-transform-name | --program-transform-name \
1062 | --program-transform-nam | --program-transform-na \
1063 | --program-transform-n | --program-transform- \
1064 | --program-transform | --program-transfor \
1065 | --program-transfo | --program-transf \
1066 | --program-trans | --program-tran \
1067 | --progr-tra | --program-tr | --program-t)
1068 ac_prev=program_transform_name ;;
1069 -program-transform-name=* | --program-transform-name=* \
1070 | --program-transform-nam=* | --program-transform-na=* \
1071 | --program-transform-n=* | --program-transform-=* \
1072 | --program-transform=* | --program-transfor=* \
1073 | --program-transfo=* | --program-transf=* \
1074 | --program-trans=* | --program-tran=* \
1075 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001078 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1079 ac_prev=pdfdir ;;
1080 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1081 pdfdir=$ac_optarg ;;
1082
1083 -psdir | --psdir | --psdi | --psd | --ps)
1084 ac_prev=psdir ;;
1085 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1086 psdir=$ac_optarg ;;
1087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1089 | -silent | --silent | --silen | --sile | --sil)
1090 silent=yes ;;
1091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1093 ac_prev=sbindir ;;
1094 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1095 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
1098 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1099 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1100 | --sharedst | --shareds | --shared | --share | --shar \
1101 | --sha | --sh)
1102 ac_prev=sharedstatedir ;;
1103 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1104 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1105 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1106 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001109 -site | --site | --sit)
1110 ac_prev=site ;;
1111 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001113
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1115 ac_prev=srcdir ;;
1116 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1120 | --syscon | --sysco | --sysc | --sys | --sy)
1121 ac_prev=sysconfdir ;;
1122 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1123 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
1131 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1132 verbose=yes ;;
1133
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 -version | --version | --versio | --versi | --vers | -V)
1135 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
1137 -with-* | --with-*)
Antoine Pitrou20327222009-05-24 20:39:11 +00001138 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139 # Reject names that are not valid shell variable names.
Antoine Pitrou20327222009-05-24 20:39:11 +00001140 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1141 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 { (exit 1); exit 1; }; }
Antoine Pitrou20327222009-05-24 20:39:11 +00001143 ac_useropt_orig=$ac_useropt
1144 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145 case $ac_user_opts in
1146 *"
1147"with_$ac_useropt"
1148"*) ;;
1149 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1150 ac_unrecognized_sep=', ';;
1151 esac
1152 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
1154 -without-* | --without-*)
Antoine Pitrou20327222009-05-24 20:39:11 +00001155 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156 # Reject names that are not valid shell variable names.
Antoine Pitrou20327222009-05-24 20:39:11 +00001157 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1158 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 { (exit 1); exit 1; }; }
Antoine Pitrou20327222009-05-24 20:39:11 +00001160 ac_useropt_orig=$ac_useropt
1161 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162 case $ac_user_opts in
1163 *"
1164"with_$ac_useropt"
1165"*) ;;
1166 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1167 ac_unrecognized_sep=', ';;
1168 esac
1169 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 --x)
1172 # Obsolete; use --with-x.
1173 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
1175 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1176 | --x-incl | --x-inc | --x-in | --x-i)
1177 ac_prev=x_includes ;;
1178 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1179 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
1182 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1183 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1184 ac_prev=x_libraries ;;
1185 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1186 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
Antoine Pitrou20327222009-05-24 20:39:11 +00001189 -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001190Try \`$0 --help' for more information." >&2
1191 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 ;;
1193
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 *=*)
1195 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1196 # Reject names that are not valid shell variable names.
1197 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Antoine Pitrou20327222009-05-24 20:39:11 +00001198 { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001200 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 export $ac_envvar ;;
1202
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001203 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 # FIXME: should be removed in autoconf 3.0.
Antoine Pitrou20327222009-05-24 20:39:11 +00001205 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Antoine Pitrou20327222009-05-24 20:39:11 +00001207 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 ;;
1210
1211 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212done
1213
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Antoine Pitrou20327222009-05-24 20:39:11 +00001216 { $as_echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218fi
1219
Antoine Pitrou20327222009-05-24 20:39:11 +00001220if test -n "$ac_unrecognized_opts"; then
1221 case $enable_option_checking in
1222 no) ;;
1223 fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1224 { (exit 1); exit 1; }; } ;;
1225 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1226 esac
1227fi
1228
1229# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001230for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1231 datadir sysconfdir sharedstatedir localstatedir includedir \
1232 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1233 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235 eval ac_val=\$$ac_var
Antoine Pitrou20327222009-05-24 20:39:11 +00001236 # Remove trailing slashes.
1237 case $ac_val in
1238 */ )
1239 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1240 eval $ac_var=\$ac_val;;
1241 esac
1242 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244 [\\/$]* | ?:[\\/]* ) continue;;
1245 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00001247 { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001249done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251# There might be people who depend on the old broken behavior: `$host'
1252# used to hold the argument of --host etc.
1253# FIXME: To remove some day.
1254build=$build_alias
1255host=$host_alias
1256target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258# FIXME: To remove some day.
1259if test "x$host_alias" != x; then
1260 if test "x$build_alias" = x; then
1261 cross_compiling=maybe
Antoine Pitrou20327222009-05-24 20:39:11 +00001262 $as_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 +00001263 If a cross compiler is detected then cross compile mode will be used." >&2
1264 elif test "x$build_alias" != "x$host_alias"; then
1265 cross_compiling=yes
1266 fi
1267fi
1268
1269ac_tool_prefix=
1270test -n "$host_alias" && ac_tool_prefix=$host_alias-
1271
1272test "$silent" = yes && exec 6>/dev/null
1273
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275ac_pwd=`pwd` && test -n "$ac_pwd" &&
1276ac_ls_di=`ls -di .` &&
1277ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Antoine Pitrou20327222009-05-24 20:39:11 +00001278 { $as_echo "$as_me: error: working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 { (exit 1); exit 1; }; }
1280test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Antoine Pitrou20327222009-05-24 20:39:11 +00001281 { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282 { (exit 1); exit 1; }; }
1283
1284
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285# Find the source files, if location was not specified.
1286if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 # Try the directory containing this script, then the parent directory.
Antoine Pitrou20327222009-05-24 20:39:11 +00001289 ac_confdir=`$as_dirname -- "$as_myself" ||
1290$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1291 X"$as_myself" : 'X\(//\)[^/]' \| \
1292 X"$as_myself" : 'X\(//\)$' \| \
1293 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1294$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\/\)[^/].*/{
1300 s//\1/
1301 q
1302 }
1303 /^X\(\/\/\)$/{
1304 s//\1/
1305 q
1306 }
1307 /^X\(\/\).*/{
1308 s//\1/
1309 q
1310 }
1311 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314 srcdir=..
1315 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316else
1317 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319if test ! -r "$srcdir/$ac_unique_file"; then
1320 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Antoine Pitrou20327222009-05-24 20:39:11 +00001321 { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001322 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1325ac_abs_confdir=`(
Antoine Pitrou20327222009-05-24 20:39:11 +00001326 cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001327 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328 pwd)`
1329# When building in place, set srcdir=.
1330if test "$ac_abs_confdir" = "$ac_pwd"; then
1331 srcdir=.
1332fi
1333# Remove unnecessary trailing slashes from srcdir.
1334# Double slashes in file names in object file debugging info
1335# mess up M-x gdb in Emacs.
1336case $srcdir in
1337*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1338esac
1339for ac_var in $ac_precious_vars; do
1340 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1341 eval ac_env_${ac_var}_value=\$${ac_var}
1342 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1343 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1344done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001345
Martin v. Löwis11437992002-04-12 09:54:03 +00001346#
1347# Report the --help message.
1348#
1349if test "$ac_init_help" = "long"; then
1350 # Omit some internal or obsolete options to make the list less imposing.
1351 # This message is too long to be a string in the A/UX 3.1 sh.
1352 cat <<_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001353\`configure' configures python 3.1 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001354
1355Usage: $0 [OPTION]... [VAR=VALUE]...
1356
1357To assign environment variables (e.g., CC, CFLAGS...), specify them as
1358VAR=VALUE. See below for descriptions of some of the useful variables.
1359
1360Defaults for the options are specified in brackets.
1361
1362Configuration:
1363 -h, --help display this help and exit
1364 --help=short display options specific to this package
1365 --help=recursive display the short help of all the included packages
1366 -V, --version display version information and exit
1367 -q, --quiet, --silent do not print \`checking...' messages
1368 --cache-file=FILE cache test results in FILE [disabled]
1369 -C, --config-cache alias for \`--cache-file=config.cache'
1370 -n, --no-create do not create output files
1371 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1372
Martin v. Löwis11437992002-04-12 09:54:03 +00001373Installation directories:
1374 --prefix=PREFIX install architecture-independent files in PREFIX
Antoine Pitrou20327222009-05-24 20:39:11 +00001375 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Antoine Pitrou20327222009-05-24 20:39:11 +00001377 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001378
1379By default, \`make install' will install all the files in
1380\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1381an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1382for instance \`--prefix=\$HOME'.
1383
1384For better control, use the options below.
1385
1386Fine tuning of the installation directories:
Antoine Pitrou20327222009-05-24 20:39:11 +00001387 --bindir=DIR user executables [EPREFIX/bin]
1388 --sbindir=DIR system admin executables [EPREFIX/sbin]
1389 --libexecdir=DIR program executables [EPREFIX/libexec]
1390 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1391 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1392 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1393 --libdir=DIR object code libraries [EPREFIX/lib]
1394 --includedir=DIR C header files [PREFIX/include]
1395 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1396 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1397 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1398 --infodir=DIR info documentation [DATAROOTDIR/info]
1399 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1400 --mandir=DIR man documentation [DATAROOTDIR/man]
1401 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1402 --htmldir=DIR html documentation [DOCDIR]
1403 --dvidir=DIR dvi documentation [DOCDIR]
1404 --pdfdir=DIR pdf documentation [DOCDIR]
1405 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001406_ACEOF
1407
1408 cat <<\_ACEOF
1409_ACEOF
1410fi
1411
1412if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001413 case $ac_init_help in
Christian Heimes70e5cab2008-12-03 18:18:23 +00001414 short | recursive ) echo "Configuration of python 3.1:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001415 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 cat <<\_ACEOF
1417
1418Optional Features:
Antoine Pitrou20327222009-05-24 20:39:11 +00001419 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1421 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001422 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001423 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --enable-framework[=INSTALLDIR]
1425 Build (MacOSX|Darwin) framework
1426 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001427 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --enable-ipv6 Enable ipv6 (with ipv4) support
1429 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001430 --enable-big-digits[=BITS]
1431 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432
1433Optional Packages:
1434 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1435 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001436 --with-universal-archs=ARCH
1437 select architectures for universal build ("32-bit",
1438 "64-bit" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001439 --with-framework-name=FRAMEWORK
1440 specify an alternate name of the framework built
1441 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001443 --with-cxx-main=<compiler>
1444 compile main() and link python executable with C++
1445 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --with-suffix=.exe set executable suffix
1447 --with-pydebug build with Py_DEBUG defined
1448 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001449 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001450 --with-dbmliborder=db1:db2:...
1451 order to check db backends for dbm. Valid value is a
1452 colon separated string with the backend names
1453 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --with-signal-module disable/enable signal module
1455 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1456 --with(out)-threads[=DIRECTORY]
1457 disable/enable thread support
1458 --with(out)-thread[=DIRECTORY]
1459 deprecated; use --with(out)-threads
1460 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001462 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --with(out)-pymalloc disable/enable specialized mallocs
1464 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001465 --with-fpectl enable SIGFPE catching
1466 --with-libm=STRING math library
1467 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001468 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001469 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1470 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001471
1472Some influential environment variables:
1473 CC C compiler command
1474 CFLAGS C compiler flags
1475 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1476 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 LIBS libraries to pass to the linker, e.g. -l<library>
1478 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1479 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 CPP C preprocessor
1481
1482Use these variables to override the choices made by `configure' or to help
1483it to find libraries and programs with nonstandard names/locations.
1484
Georg Brandle2e15612009-05-20 18:25:10 +00001485Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001488fi
1489
1490if test "$ac_init_help" = "recursive"; then
1491 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Antoine Pitrou20327222009-05-24 20:39:11 +00001493 test -d "$ac_dir" ||
1494 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1495 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 ac_builddir=.
1497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498case "$ac_dir" in
1499.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1500*)
Antoine Pitrou20327222009-05-24 20:39:11 +00001501 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 # A ".." for each directory in $ac_dir_suffix.
Antoine Pitrou20327222009-05-24 20:39:11 +00001503 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 case $ac_top_builddir_sub in
1505 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1506 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1507 esac ;;
1508esac
1509ac_abs_top_builddir=$ac_pwd
1510ac_abs_builddir=$ac_pwd$ac_dir_suffix
1511# for backward compatibility:
1512ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001513
1514case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 ac_top_srcdir=$ac_top_builddir_sub
1518 ac_abs_top_srcdir=$ac_pwd ;;
1519 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 ac_top_srcdir=$srcdir
1522 ac_abs_top_srcdir=$srcdir ;;
1523 *) # Relative name.
1524 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1525 ac_top_srcdir=$ac_top_build_prefix$srcdir
1526 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001527esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 cd "$ac_dir" || { ac_status=$?; continue; }
1531 # Check for guested configure.
1532 if test -f "$ac_srcdir/configure.gnu"; then
1533 echo &&
1534 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1535 elif test -f "$ac_srcdir/configure"; then
1536 echo &&
1537 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 else
Antoine Pitrou20327222009-05-24 20:39:11 +00001539 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540 fi || ac_status=$?
1541 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001542 done
1543fi
1544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001546if $ac_init_version; then
1547 cat <<\_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001548python configure 3.1
Antoine Pitrou20327222009-05-24 20:39:11 +00001549generated by GNU Autoconf 2.63
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Antoine Pitrou20327222009-05-24 20:39:11 +000015522002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001553This configure script is free software; the Free Software Foundation
1554gives unlimited permission to copy, distribute and modify it.
1555_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001559This file contains any messages produced by compilers while
1560running configure, to aid debugging if configure makes a mistake.
1561
Christian Heimes70e5cab2008-12-03 18:18:23 +00001562It was created by python $as_me 3.1, which was
Antoine Pitrou20327222009-05-24 20:39:11 +00001563generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565 $ $0 $@
1566
1567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001569{
1570cat <<_ASUNAME
1571## --------- ##
1572## Platform. ##
1573## --------- ##
1574
1575hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1576uname -m = `(uname -m) 2>/dev/null || echo unknown`
1577uname -r = `(uname -r) 2>/dev/null || echo unknown`
1578uname -s = `(uname -s) 2>/dev/null || echo unknown`
1579uname -v = `(uname -v) 2>/dev/null || echo unknown`
1580
1581/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1582/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1583
1584/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1585/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1586/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001588/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1589/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1590/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1591
1592_ASUNAME
1593
1594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1595for as_dir in $PATH
1596do
1597 IFS=$as_save_IFS
1598 test -z "$as_dir" && as_dir=.
Antoine Pitrou20327222009-05-24 20:39:11 +00001599 $as_echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001600done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001602
1603} >&5
1604
1605cat >&5 <<_ACEOF
1606
1607
1608## ----------- ##
1609## Core tests. ##
1610## ----------- ##
1611
1612_ACEOF
1613
1614
1615# Keep a trace of the command line.
1616# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001617# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001618# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001619# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001620ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001621ac_configure_args0=
1622ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001623ac_must_keep_next=false
1624for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001625do
Skip Montanaro6dead952003-09-25 14:50:04 +00001626 for ac_arg
1627 do
1628 case $ac_arg in
1629 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1630 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1631 | -silent | --silent | --silen | --sile | --sil)
1632 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 *\'*)
Antoine Pitrou20327222009-05-24 20:39:11 +00001634 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001635 esac
1636 case $ac_pass in
1637 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1638 2)
1639 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1640 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001641 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001642 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001643 case $ac_arg in
1644 *=* | --config-cache | -C | -disable-* | --disable-* \
1645 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1646 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1647 | -with-* | --with-* | -without-* | --without-* | --x)
1648 case "$ac_configure_args0 " in
1649 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1650 esac
1651 ;;
1652 -* ) ac_must_keep_next=true ;;
1653 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001654 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001656 ;;
1657 esac
1658 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001659done
Skip Montanaro6dead952003-09-25 14:50:04 +00001660$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1661$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 +00001662
1663# When interrupted or exit'd, cleanup temporary files, and complete
1664# config.log. We remove comments because anyway the quotes in there
1665# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666# WARNING: Use '\'' to represent an apostrophe within the trap.
1667# 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 +00001668trap 'exit_status=$?
1669 # Save into config.log some information that might help in debugging.
1670 {
1671 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001672
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 cat <<\_ASBOX
1674## ---------------- ##
1675## Cache variables. ##
1676## ---------------- ##
1677_ASBOX
1678 echo
1679 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001680(
1681 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1682 eval ac_val=\$$ac_var
1683 case $ac_val in #(
1684 *${as_nl}*)
1685 case $ac_var in #(
Antoine Pitrou20327222009-05-24 20:39:11 +00001686 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1687$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001688 esac
1689 case $ac_var in #(
1690 _ | IFS | as_nl) ;; #(
Antoine Pitrou20327222009-05-24 20:39:11 +00001691 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692 *) $as_unset $ac_var ;;
1693 esac ;;
1694 esac
1695 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001696 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1698 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001700 "s/'\''/'\''\\\\'\'''\''/g;
1701 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1702 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001703 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001704 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001705 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001706 esac |
1707 sort
1708)
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001710
1711 cat <<\_ASBOX
1712## ----------------- ##
1713## Output variables. ##
1714## ----------------- ##
1715_ASBOX
1716 echo
1717 for ac_var in $ac_subst_vars
1718 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001719 eval ac_val=\$$ac_var
1720 case $ac_val in
Antoine Pitrou20327222009-05-24 20:39:11 +00001721 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001722 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00001723 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001724 done | sort
1725 echo
1726
1727 if test -n "$ac_subst_files"; then
1728 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001729## ------------------- ##
1730## File substitutions. ##
1731## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001732_ASBOX
1733 echo
1734 for ac_var in $ac_subst_files
1735 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736 eval ac_val=\$$ac_var
1737 case $ac_val in
Antoine Pitrou20327222009-05-24 20:39:11 +00001738 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00001740 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001741 done | sort
1742 echo
1743 fi
1744
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 if test -s confdefs.h; then
1746 cat <<\_ASBOX
1747## ----------- ##
1748## confdefs.h. ##
1749## ----------- ##
1750_ASBOX
1751 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001752 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001753 echo
1754 fi
1755 test "$ac_signal" != 0 &&
Antoine Pitrou20327222009-05-24 20:39:11 +00001756 $as_echo "$as_me: caught signal $ac_signal"
1757 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001759 rm -f core *.core core.conftest.* &&
1760 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001762' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001763for ac_signal in 1 2 13 15; do
1764 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1765done
1766ac_signal=0
1767
1768# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001769rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001770
1771# Predefined preprocessor variables.
1772
1773cat >>confdefs.h <<_ACEOF
1774#define PACKAGE_NAME "$PACKAGE_NAME"
1775_ACEOF
1776
1777
1778cat >>confdefs.h <<_ACEOF
1779#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1780_ACEOF
1781
1782
1783cat >>confdefs.h <<_ACEOF
1784#define PACKAGE_VERSION "$PACKAGE_VERSION"
1785_ACEOF
1786
1787
1788cat >>confdefs.h <<_ACEOF
1789#define PACKAGE_STRING "$PACKAGE_STRING"
1790_ACEOF
1791
1792
1793cat >>confdefs.h <<_ACEOF
1794#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1795_ACEOF
1796
1797
1798# Let the site file select an alternate cache file if it wants to.
Antoine Pitrou20327222009-05-24 20:39:11 +00001799# Prefer an explicitly selected file to automatically selected ones.
1800ac_site_file1=NONE
1801ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001802if test -n "$CONFIG_SITE"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00001803 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001804elif test "x$prefix" != xNONE; then
Antoine Pitrou20327222009-05-24 20:39:11 +00001805 ac_site_file1=$prefix/share/config.site
1806 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001807else
Antoine Pitrou20327222009-05-24 20:39:11 +00001808 ac_site_file1=$ac_default_prefix/share/config.site
1809 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001810fi
Antoine Pitrou20327222009-05-24 20:39:11 +00001811for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001812do
Antoine Pitrou20327222009-05-24 20:39:11 +00001813 test "x$ac_site_file" = xNONE && continue
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001814 if test -r "$ac_site_file"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00001815 { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1816$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001818 . "$ac_site_file"
1819 fi
1820done
1821
1822if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 # Some versions of bash will fail to source /dev/null (special
1824 # files actually), so we avoid doing that.
1825 if test -f "$cache_file"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00001826 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1827$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001828 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001829 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1830 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001831 esac
1832 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001833else
Antoine Pitrou20327222009-05-24 20:39:11 +00001834 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1835$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001836 >$cache_file
1837fi
1838
1839# Check that the precious variables saved in the cache have kept the same
1840# value.
1841ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001842for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001843 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1844 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001845 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1846 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001847 case $ac_old_set,$ac_new_set in
1848 set,)
Antoine Pitrou20327222009-05-24 20:39:11 +00001849 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1850$as_echo "$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 +00001851 ac_cache_corrupted=: ;;
1852 ,set)
Antoine Pitrou20327222009-05-24 20:39:11 +00001853 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1854$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001855 ac_cache_corrupted=: ;;
1856 ,);;
1857 *)
1858 if test "x$ac_old_val" != "x$ac_new_val"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00001859 # differences in whitespace do not lead to failure.
1860 ac_old_val_w=`echo x $ac_old_val`
1861 ac_new_val_w=`echo x $ac_new_val`
1862 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1863 { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1864$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1865 ac_cache_corrupted=:
1866 else
1867 { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1868$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1869 eval $ac_var=\$ac_old_val
1870 fi
1871 { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1872$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1873 { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1874$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001875 fi;;
1876 esac
1877 # Pass precious variables to config.status.
1878 if test "$ac_new_set" = set; then
1879 case $ac_new_val in
Antoine Pitrou20327222009-05-24 20:39:11 +00001880 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001881 *) ac_arg=$ac_var=$ac_new_val ;;
1882 esac
1883 case " $ac_configure_args " in
1884 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1885 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1886 esac
1887 fi
1888done
1889if $ac_cache_corrupted; then
Antoine Pitrou20327222009-05-24 20:39:11 +00001890 { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1892 { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1893$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1894 { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1895$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001897fi
1898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
Guido van Rossum7f43da71994-08-01 12:15:30 +00001923ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001925ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1926ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1927ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928
Guido van Rossum627b2d71993-12-24 10:39:16 +00001929
Michael W. Hudson54241132001-12-07 15:38:26 +00001930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001931ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001932
1933
Martin v. Löwis11437992002-04-12 09:54:03 +00001934
Benjamin Petersond23f8222009-04-05 19:13:16 +00001935if test "$prefix" != "/"; then
1936 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1937fi
1938
1939
Martin v. Löwis11437992002-04-12 09:54:03 +00001940
1941
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001942
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001943
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001944# We don't use PACKAGE_ variables, and they cause conflicts
1945# with other autoconf-based packages that include Python.h
1946grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1947rm confdefs.h
1948mv confdefs.h.new confdefs.h
1949
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001950
Christian Heimes70e5cab2008-12-03 18:18:23 +00001951VERSION=3.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001952
Martin v. Löwis1142de32002-03-29 16:28:31 +00001953
1954SOVERSION=1.0
1955
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001956# The later defininition of _XOPEN_SOURCE disables certain features
1957# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1958
1959cat >>confdefs.h <<\_ACEOF
1960#define _GNU_SOURCE 1
1961_ACEOF
1962
1963
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001964# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1965# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1966# them.
1967
1968cat >>confdefs.h <<\_ACEOF
1969#define _NETBSD_SOURCE 1
1970_ACEOF
1971
1972
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001973# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1974# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1975# them.
1976
1977cat >>confdefs.h <<\_ACEOF
1978#define __BSD_VISIBLE 1
1979_ACEOF
1980
1981
Martin v. Löwisd6320502004-08-12 13:45:08 +00001982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1983# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1984
1985cat >>confdefs.h <<\_ACEOF
1986#define _BSD_TYPES 1
1987_ACEOF
1988
1989
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1991# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1992# them.
1993
1994cat >>confdefs.h <<\_ACEOF
1995#define _DARWIN_C_SOURCE 1
1996_ACEOF
1997
1998
1999
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002000define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002001
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002002# Arguments passed to configure.
2003
2004CONFIG_ARGS="$ac_configure_args"
2005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002006# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002007if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002008 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002009 case $enableval in
2010 yes)
2011 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2012 ;;
2013 esac
2014 case $enableval in
2015 no)
2016 UNIVERSALSDK=
2017 enable_universalsdk=
2018 ;;
2019 *)
2020 UNIVERSALSDK=$enableval
2021 ;;
2022 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002023
Thomas Wouters477c8d52006-05-27 19:21:47 +00002024else
2025
2026 UNIVERSALSDK=
2027 enable_universalsdk=
2028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002029fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002030
2031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002032
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002033ARCH_RUN_32BIT=
2034
2035
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002036UNIVERSAL_ARCHS="32-bit"
Antoine Pitrou20327222009-05-24 20:39:11 +00002037{ $as_echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
2038$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002039
2040# Check whether --with-universal-archs was given.
2041if test "${with_universal_archs+set}" = set; then
2042 withval=$with_universal_archs;
Antoine Pitrou20327222009-05-24 20:39:11 +00002043 { $as_echo "$as_me:$LINENO: result: $withval" >&5
2044$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002045 UNIVERSAL_ARCHS="$withval"
2046
2047else
2048
Antoine Pitrou20327222009-05-24 20:39:11 +00002049 { $as_echo "$as_me:$LINENO: result: 32-bit" >&5
2050$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002051
2052fi
2053
2054
2055
2056
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002057
2058# Check whether --with-framework-name was given.
2059if test "${with_framework_name+set}" = set; then
2060 withval=$with_framework_name;
2061 PYTHONFRAMEWORK=${withval}
2062 PYTHONFRAMEWORKDIR=${withval}.framework
2063 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2064
2065else
2066
2067 PYTHONFRAMEWORK=Python
2068 PYTHONFRAMEWORKDIR=Python.framework
2069 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2070
2071fi
2072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002073# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002074if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002075 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002076 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002077 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002078 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002079 esac
2080 case $enableval in
2081 no)
2082 PYTHONFRAMEWORK=
2083 PYTHONFRAMEWORKDIR=no-framework
2084 PYTHONFRAMEWORKPREFIX=
2085 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002086 FRAMEWORKINSTALLFIRST=
2087 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002088 FRAMEWORKALTINSTALLFIRST=
2089 FRAMEWORKALTINSTALLLAST=
2090 if test "x${prefix}" = "xNONE"; then
2091 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2092 else
2093 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2094 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002095 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002096 ;;
2097 *)
2098 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002099 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002100 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002101 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
2102 if test "$UNIVERSAL_ARCHS" = "all"
2103 then
2104 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00002105 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002106 else
Ronald Oussorene3918352009-03-30 18:00:28 +00002107 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002108 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2109 fi
2110
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002111 if test "x${prefix}" = "xNONE" ; then
2112 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2113 else
2114 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2115 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002116 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002117
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002118 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002119 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002120 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002122 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002123
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002124 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2125
2126 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2127
Jack Jansene578a632001-08-15 01:27:14 +00002128 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002129
Guido van Rossum563e7081996-09-10 18:20:48 +00002130else
Martin v. Löwis11437992002-04-12 09:54:03 +00002131
Jack Jansene578a632001-08-15 01:27:14 +00002132 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002133 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002134 PYTHONFRAMEWORKPREFIX=
2135 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002136 FRAMEWORKINSTALLFIRST=
2137 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002138 FRAMEWORKALTINSTALLFIRST=
2139 FRAMEWORKALTINSTALLLAST=
2140 if test "x${prefix}" = "xNONE" ; then
2141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2142 else
2143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2144 fi
Jack Jansene578a632001-08-15 01:27:14 +00002145 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002146
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002147 if test "$UNIVERSAL_ARCHS" = "all"
2148 then
2149 FRAMEWORKINSTALLLAST=update4wayuniversal
2150 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2151 fi
2152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002153fi
2154
Thomas Wouters477c8d52006-05-27 19:21:47 +00002155
2156
Michael W. Hudson54241132001-12-07 15:38:26 +00002157
2158
2159
2160
Jack Jansene578a632001-08-15 01:27:14 +00002161
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002162
2163
2164
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002165
Jack Jansene578a632001-08-15 01:27:14 +00002166##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002167## AC_HELP_STRING(--with-dyld,
2168## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002169##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002170# Set name for machine-dependent library files
2171
Antoine Pitrou20327222009-05-24 20:39:11 +00002172{ $as_echo "$as_me:$LINENO: checking MACHDEP" >&5
2173$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002174if test -z "$MACHDEP"
2175then
Guido van Rossum563e7081996-09-10 18:20:48 +00002176 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002177 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2178 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002179 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002180 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002181 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002182 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002183 ac_md_system=`echo $ac_sys_system |
2184 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2185 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002186 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002187 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002188
Guido van Rossum07397971997-04-29 21:49:50 +00002189 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002190 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002191 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002192 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002193 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002194 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002195 esac
2196fi
Guido van Rossum91922671997-10-09 20:24:13 +00002197
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002198# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2199# disable features if it is defined, without any means to access these
2200# features as extensions. For these systems, we skip the definition of
2201# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2202# some feature, make sure there is no alternative way to access this
2203# feature. Also, when using wildcards, make sure you have verified the
2204# need for not defining _XOPEN_SOURCE on all systems matching the
2205# wildcard, and that the wildcard does not include future systems
2206# (which may remove their limitations).
2207case $ac_sys_system/$ac_sys_release in
2208 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2209 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002210 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002211 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002212 define_xopen_source=no
2213 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2214 # also defined. This can be overridden by defining _BSD_SOURCE
2215 # As this has a different meaning on Linux, only define it on OpenBSD
2216
2217cat >>confdefs.h <<\_ACEOF
2218#define _BSD_SOURCE 1
2219_ACEOF
2220
2221 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002222 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2223 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2224 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002225 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002226 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002227 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2228 # of union __?sigval. Reported by Stuart Bishop.
2229 SunOS/5.6)
2230 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002231 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2232 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002233 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002234 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002235 define_xopen_source=no;;
2236 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002237 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002238 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002239 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002240 # On FreeBSD 4, the math functions C89 does not cover are never defined
2241 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2242 FreeBSD/4.*)
2243 define_xopen_source=no;;
2244 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2245 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2246 # identifies itself as Darwin/7.*
2247 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2248 # disables platform specific features beyond repair.
2249 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2250 # has no effect, don't bother defining them
2251 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002252 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002253 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2254 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2255 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002256 AIX/4)
2257 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002258 AIX/5)
2259 if test `uname -r` -eq 1; then
2260 define_xopen_source=no
2261 fi
2262 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002263 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2264 # defining NI_NUMERICHOST.
2265 QNX/6.3.2)
2266 define_xopen_source=no
2267 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002268
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002269esac
2270
2271if test $define_xopen_source = yes
2272then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002273 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2274 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002275 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2276 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002277 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002278 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002279
2280cat >>confdefs.h <<\_ACEOF
2281#define _XOPEN_SOURCE 500
2282_ACEOF
2283
2284 ;;
2285 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002286
2287cat >>confdefs.h <<\_ACEOF
2288#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002289_ACEOF
2290
Skip Montanarof0d5f792004-08-15 14:08:23 +00002291 ;;
2292 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002293
2294 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2295 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2296 # several APIs are not declared. Since this is also needed in some
2297 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002298 # except for Solaris 10, where it must not be defined,
2299 # as it implies XPG4.2
2300 case $ac_sys_system/$ac_sys_release in
2301 SunOS/5.10)
2302 ;;
2303 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002304
2305cat >>confdefs.h <<\_ACEOF
2306#define _XOPEN_SOURCE_EXTENDED 1
2307_ACEOF
2308
Martin v. Löwis7dece662005-11-26 11:38:24 +00002309 ;;
2310 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002311
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002312
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002313cat >>confdefs.h <<\_ACEOF
2314#define _POSIX_C_SOURCE 200112L
2315_ACEOF
2316
2317
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002318fi
2319
Guido van Rossum91922671997-10-09 20:24:13 +00002320#
2321# SGI compilers allow the specification of the both the ABI and the
2322# ISA on the command line. Depending on the values of these switches,
2323# different and often incompatable code will be generated.
2324#
2325# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2326# thus supply support for various ABI/ISA combinations. The MACHDEP
2327# variable is also adjusted.
2328#
2329
2330if test ! -z "$SGI_ABI"
2331then
2332 CC="cc $SGI_ABI"
2333 LDFLAGS="$SGI_ABI $LDFLAGS"
2334 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2335fi
Antoine Pitrou20327222009-05-24 20:39:11 +00002336{ $as_echo "$as_me:$LINENO: result: $MACHDEP" >&5
2337$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002338
Jack Jansen6b08a402004-06-03 12:41:45 +00002339# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2340# it may influence the way we can build extensions, so distutils
2341# needs to check it
2342
Thomas Wouters477c8d52006-05-27 19:21:47 +00002343
Jack Jansen6b08a402004-06-03 12:41:45 +00002344CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002345EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002346
Antoine Pitrou20327222009-05-24 20:39:11 +00002347{ $as_echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2348$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002349ac_sys_machine=`uname -m`
Antoine Pitrou20327222009-05-24 20:39:11 +00002350{ $as_echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2351$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002352
Guido van Rossum627b2d71993-12-24 10:39:16 +00002353# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002354
2355# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2356# for debug/optimization stuff. BASECFLAGS is for flags that are required
2357# just to get things to compile and link. Users are free to override OPT
2358# when running configure or make. The build should not break if they do.
2359# BASECFLAGS should generally not be messed with, however.
2360
2361# XXX shouldn't some/most/all of this code be merged with the stuff later
2362# on that fiddles with OPT and BASECFLAGS?
Antoine Pitrou20327222009-05-24 20:39:11 +00002363{ $as_echo "$as_me:$LINENO: checking for --without-gcc" >&5
2364$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002365
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002366# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002367if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002369 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002370 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002371 without_gcc=yes;;
2372 yes) CC=gcc
2373 without_gcc=no;;
2374 *) CC=$withval
2375 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002376 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002377else
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002379 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002380 AIX*) CC=cc_r
2381 without_gcc=;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002382 Monterey*)
2383 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002384 without_gcc=;;
2385 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002386 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002387fi
2388
Antoine Pitrou20327222009-05-24 20:39:11 +00002389{ $as_echo "$as_me:$LINENO: result: $without_gcc" >&5
2390$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002391
Guido van Rossum8b131c51995-03-09 14:10:13 +00002392# If the user switches compilers, we can't believe the cache
2393if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2394then
Antoine Pitrou20327222009-05-24 20:39:11 +00002395 { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002396(it is also a good idea to do 'make clean' before compiling)" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00002397$as_echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002398(it is also a good idea to do 'make clean' before compiling)" >&2;}
2399 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002400fi
2401
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_ext=c
2403ac_cpp='$CPP $CPPFLAGS'
2404ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2405ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2406ac_compiler_gnu=$ac_cv_c_compiler_gnu
2407if test -n "$ac_tool_prefix"; then
2408 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2409set dummy ${ac_tool_prefix}gcc; ac_word=$2
Antoine Pitrou20327222009-05-24 20:39:11 +00002410{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2411$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002412if test "${ac_cv_prog_CC+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002413 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002414else
2415 if test -n "$CC"; then
2416 ac_cv_prog_CC="$CC" # Let the user override the test.
2417else
Martin v. Löwis11437992002-04-12 09:54:03 +00002418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2419for as_dir in $PATH
2420do
2421 IFS=$as_save_IFS
2422 test -z "$as_dir" && as_dir=.
2423 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 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 +00002425 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Antoine Pitrou20327222009-05-24 20:39:11 +00002426 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002427 break 2
2428 fi
2429done
2430done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002431IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
Jack Jansendd19cf82001-12-06 22:36:17 +00002433fi
2434fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002435CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002436if test -n "$CC"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002437 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2438$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002439else
Antoine Pitrou20327222009-05-24 20:39:11 +00002440 { $as_echo "$as_me:$LINENO: result: no" >&5
2441$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002442fi
2443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444
Martin v. Löwis11437992002-04-12 09:54:03 +00002445fi
2446if test -z "$ac_cv_prog_CC"; then
2447 ac_ct_CC=$CC
2448 # Extract the first word of "gcc", so it can be a program name with args.
2449set dummy gcc; ac_word=$2
Antoine Pitrou20327222009-05-24 20:39:11 +00002450{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2451$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002452if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002453 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002454else
2455 if test -n "$ac_ct_CC"; then
2456 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2457else
2458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2459for as_dir in $PATH
2460do
2461 IFS=$as_save_IFS
2462 test -z "$as_dir" && as_dir=.
2463 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 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 +00002465 ac_cv_prog_ac_ct_CC="gcc"
Antoine Pitrou20327222009-05-24 20:39:11 +00002466 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 break 2
2468 fi
2469done
2470done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002472
2473fi
2474fi
2475ac_ct_CC=$ac_cv_prog_ac_ct_CC
2476if test -n "$ac_ct_CC"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002477 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2478$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002479else
Antoine Pitrou20327222009-05-24 20:39:11 +00002480 { $as_echo "$as_me:$LINENO: result: no" >&5
2481$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002482fi
2483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 if test "x$ac_ct_CC" = x; then
2485 CC=""
2486 else
2487 case $cross_compiling:$ac_tool_warned in
2488yes:)
Antoine Pitrou20327222009-05-24 20:39:11 +00002489{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2490$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491ac_tool_warned=yes ;;
2492esac
2493 CC=$ac_ct_CC
2494 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002495else
2496 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002497fi
2498
Jack Jansendd19cf82001-12-06 22:36:17 +00002499if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 if test -n "$ac_tool_prefix"; then
2501 # 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 +00002502set dummy ${ac_tool_prefix}cc; ac_word=$2
Antoine Pitrou20327222009-05-24 20:39:11 +00002503{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2504$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002505if test "${ac_cv_prog_CC+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002506 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002507else
2508 if test -n "$CC"; then
2509 ac_cv_prog_CC="$CC" # Let the user override the test.
2510else
Martin v. Löwis11437992002-04-12 09:54:03 +00002511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2512for as_dir in $PATH
2513do
2514 IFS=$as_save_IFS
2515 test -z "$as_dir" && as_dir=.
2516 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 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 +00002518 ac_cv_prog_CC="${ac_tool_prefix}cc"
Antoine Pitrou20327222009-05-24 20:39:11 +00002519 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 break 2
2521 fi
2522done
2523done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002525
2526fi
2527fi
2528CC=$ac_cv_prog_CC
2529if test -n "$CC"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002530 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2531$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002532else
Antoine Pitrou20327222009-05-24 20:39:11 +00002533 { $as_echo "$as_me:$LINENO: result: no" >&5
2534$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002535fi
2536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002539fi
2540if test -z "$CC"; then
2541 # Extract the first word of "cc", so it can be a program name with args.
2542set dummy cc; ac_word=$2
Antoine Pitrou20327222009-05-24 20:39:11 +00002543{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2544$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002545if test "${ac_cv_prog_CC+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002546 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002547else
2548 if test -n "$CC"; then
2549 ac_cv_prog_CC="$CC" # Let the user override the test.
2550else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002551 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2553for as_dir in $PATH
2554do
2555 IFS=$as_save_IFS
2556 test -z "$as_dir" && as_dir=.
2557 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 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 +00002559 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2560 ac_prog_rejected=yes
2561 continue
2562 fi
2563 ac_cv_prog_CC="cc"
Antoine Pitrou20327222009-05-24 20:39:11 +00002564 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 break 2
2566 fi
2567done
2568done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002570
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002571if test $ac_prog_rejected = yes; then
2572 # We found a bogon in the path, so make sure we never use it.
2573 set dummy $ac_cv_prog_CC
2574 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002575 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002576 # We chose a different compiler from the bogus one.
2577 # However, it has the same basename, so the bogon will be chosen
2578 # first if we set CC to just the basename; use the full file name.
2579 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002580 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002581 fi
2582fi
2583fi
2584fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002585CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002586if test -n "$CC"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002587 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2588$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002589else
Antoine Pitrou20327222009-05-24 20:39:11 +00002590 { $as_echo "$as_me:$LINENO: result: no" >&5
2591$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002592fi
2593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594
Martin v. Löwis11437992002-04-12 09:54:03 +00002595fi
2596if test -z "$CC"; then
2597 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 do
2600 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2601set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Antoine Pitrou20327222009-05-24 20:39:11 +00002602{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2603$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002604if test "${ac_cv_prog_CC+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002605 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002606else
2607 if test -n "$CC"; then
2608 ac_cv_prog_CC="$CC" # Let the user override the test.
2609else
Martin v. Löwis11437992002-04-12 09:54:03 +00002610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2611for as_dir in $PATH
2612do
2613 IFS=$as_save_IFS
2614 test -z "$as_dir" && as_dir=.
2615 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 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 +00002617 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Antoine Pitrou20327222009-05-24 20:39:11 +00002618 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002620 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002621done
2622done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002624
2625fi
2626fi
2627CC=$ac_cv_prog_CC
2628if test -n "$CC"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002629 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2630$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002631else
Antoine Pitrou20327222009-05-24 20:39:11 +00002632 { $as_echo "$as_me:$LINENO: result: no" >&5
2633$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002634fi
2635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 test -n "$CC" && break
2638 done
2639fi
2640if test -z "$CC"; then
2641 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002643do
2644 # Extract the first word of "$ac_prog", so it can be a program name with args.
2645set dummy $ac_prog; ac_word=$2
Antoine Pitrou20327222009-05-24 20:39:11 +00002646{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2647$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002648if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002649 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002650else
2651 if test -n "$ac_ct_CC"; then
2652 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2653else
2654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2655for as_dir in $PATH
2656do
2657 IFS=$as_save_IFS
2658 test -z "$as_dir" && as_dir=.
2659 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002660 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 +00002661 ac_cv_prog_ac_ct_CC="$ac_prog"
Antoine Pitrou20327222009-05-24 20:39:11 +00002662 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 break 2
2664 fi
2665done
2666done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669fi
2670fi
2671ac_ct_CC=$ac_cv_prog_ac_ct_CC
2672if test -n "$ac_ct_CC"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002673 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2674$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002675else
Antoine Pitrou20327222009-05-24 20:39:11 +00002676 { $as_echo "$as_me:$LINENO: result: no" >&5
2677$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002678fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 test -n "$ac_ct_CC" && break
2682done
Michael W. Hudson54241132001-12-07 15:38:26 +00002683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684 if test "x$ac_ct_CC" = x; then
2685 CC=""
2686 else
2687 case $cross_compiling:$ac_tool_warned in
2688yes:)
Antoine Pitrou20327222009-05-24 20:39:11 +00002689{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2690$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691ac_tool_warned=yes ;;
2692esac
2693 CC=$ac_ct_CC
2694 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002695fi
2696
2697fi
2698
2699
Antoine Pitrou20327222009-05-24 20:39:11 +00002700test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2702{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002703See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00002704$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002705See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00002706 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002707
2708# Provide some information about the compiler.
Antoine Pitrou20327222009-05-24 20:39:11 +00002709$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2710set X $ac_compile
2711ac_compiler=$2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712{ (ac_try="$ac_compiler --version >&5"
2713case "(($ac_try" in
2714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2715 *) ac_try_echo=$ac_try;;
2716esac
Antoine Pitrou20327222009-05-24 20:39:11 +00002717eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2718$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002719 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00002721 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002723{ (ac_try="$ac_compiler -v >&5"
2724case "(($ac_try" in
2725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2726 *) ac_try_echo=$ac_try;;
2727esac
Antoine Pitrou20327222009-05-24 20:39:11 +00002728eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2729$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002730 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00002732 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002734{ (ac_try="$ac_compiler -V >&5"
2735case "(($ac_try" in
2736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2737 *) ac_try_echo=$ac_try;;
2738esac
Antoine Pitrou20327222009-05-24 20:39:11 +00002739eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2740$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002741 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00002743 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 (exit $ac_status); }
2745
2746cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002747/* confdefs.h. */
2748_ACEOF
2749cat confdefs.h >>conftest.$ac_ext
2750cat >>conftest.$ac_ext <<_ACEOF
2751/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002752
Martin v. Löwis11437992002-04-12 09:54:03 +00002753int
2754main ()
2755{
2756
2757 ;
2758 return 0;
2759}
2760_ACEOF
2761ac_clean_files_save=$ac_clean_files
Antoine Pitrou20327222009-05-24 20:39:11 +00002762ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002763# Try to create an executable without -o first, disregard a.out.
2764# It will help us diagnose broken compilers, and finding out an intuition
2765# of exeext.
Antoine Pitrou20327222009-05-24 20:39:11 +00002766{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2767$as_echo_n "checking for C compiler default output file name... " >&6; }
2768ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2769
2770# The possible output files:
2771ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002773ac_rmfiles=
2774for ac_file in $ac_files
2775do
2776 case $ac_file in
Antoine Pitrou20327222009-05-24 20:39:11 +00002777 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002778 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2779 esac
2780done
2781rm -f $ac_rmfiles
2782
2783if { (ac_try="$ac_link_default"
2784case "(($ac_try" in
2785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2786 *) ac_try_echo=$ac_try;;
2787esac
Antoine Pitrou20327222009-05-24 20:39:11 +00002788eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2789$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002790 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00002792 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002794 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2795# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2796# in a Makefile. We should not override ac_cv_exeext if it was cached,
2797# so that the user can short-circuit this test for compilers unknown to
2798# Autoconf.
2799for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002800do
2801 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 case $ac_file in
Antoine Pitrou20327222009-05-24 20:39:11 +00002803 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002804 ;;
2805 [ab].out )
2806 # We found the default executable, but exeext='' is most
2807 # certainly right.
2808 break;;
2809 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002810 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2811 then :; else
2812 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2813 fi
2814 # We set ac_cv_exeext here because the later test for it is not
2815 # safe: cross compilers may not add the suffix if given an `-o'
2816 # argument, so we may need to know it at that point already.
2817 # Even if this section looks crufty: it has the advantage of
2818 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002819 break;;
2820 * )
2821 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002822 esac
2823done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002824test "$ac_cv_exeext" = no && ac_cv_exeext=
2825
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002826else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827 ac_file=''
2828fi
2829
Antoine Pitrou20327222009-05-24 20:39:11 +00002830{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2831$as_echo "$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832if test -z "$ac_file"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002833 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002834sed 's/^/| /' conftest.$ac_ext >&5
2835
Antoine Pitrou20327222009-05-24 20:39:11 +00002836{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2838{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002839See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00002840$as_echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002841See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00002842 { (exit 77); exit 77; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002843fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002844
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002845ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002847# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002848# the compiler is broken, or we cross compile.
Antoine Pitrou20327222009-05-24 20:39:11 +00002849{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2850$as_echo_n "checking whether the C compiler works... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002851# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2852# If not cross compiling, check that we can run a simple program.
2853if test "$cross_compiling" != yes; then
2854 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002855 { (case "(($ac_try" in
2856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2857 *) ac_try_echo=$ac_try;;
2858esac
Antoine Pitrou20327222009-05-24 20:39:11 +00002859eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2860$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002861 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002862 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00002863 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002864 (exit $ac_status); }; }; then
2865 cross_compiling=no
2866 else
2867 if test "$cross_compiling" = maybe; then
2868 cross_compiling=yes
2869 else
Antoine Pitrou20327222009-05-24 20:39:11 +00002870 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2872{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002873If you meant to cross compile, use \`--host'.
2874See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00002875$as_echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002876If you meant to cross compile, use \`--host'.
2877See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00002878 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002879 fi
2880 fi
2881fi
Antoine Pitrou20327222009-05-24 20:39:11 +00002882{ $as_echo "$as_me:$LINENO: result: yes" >&5
2883$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002884
Antoine Pitrou20327222009-05-24 20:39:11 +00002885rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002886ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002888# the compiler is broken, or we cross compile.
Antoine Pitrou20327222009-05-24 20:39:11 +00002889{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2890$as_echo_n "checking whether we are cross compiling... " >&6; }
2891{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
2892$as_echo "$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002893
Antoine Pitrou20327222009-05-24 20:39:11 +00002894{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
2895$as_echo_n "checking for suffix of executables... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002896if { (ac_try="$ac_link"
2897case "(($ac_try" in
2898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2899 *) ac_try_echo=$ac_try;;
2900esac
Antoine Pitrou20327222009-05-24 20:39:11 +00002901eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2902$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002903 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002904 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00002905 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002906 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002907 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2908# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2909# work properly (i.e., refer to `conftest.exe'), while it won't with
2910# `rm'.
2911for ac_file in conftest.exe conftest conftest.*; do
2912 test -f "$ac_file" || continue
2913 case $ac_file in
Antoine Pitrou20327222009-05-24 20:39:11 +00002914 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002915 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2916 break;;
2917 * ) break;;
2918 esac
2919done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002920else
Antoine Pitrou20327222009-05-24 20:39:11 +00002921 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2923{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002924See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00002925$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002926See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00002927 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002928fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002929
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002930rm -f conftest$ac_cv_exeext
Antoine Pitrou20327222009-05-24 20:39:11 +00002931{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2932$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002933
2934rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002935EXEEXT=$ac_cv_exeext
2936ac_exeext=$EXEEXT
Antoine Pitrou20327222009-05-24 20:39:11 +00002937{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
2938$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002939if test "${ac_cv_objext+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002940 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002941else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002942 cat >conftest.$ac_ext <<_ACEOF
2943/* confdefs.h. */
2944_ACEOF
2945cat confdefs.h >>conftest.$ac_ext
2946cat >>conftest.$ac_ext <<_ACEOF
2947/* end confdefs.h. */
2948
2949int
2950main ()
2951{
2952
2953 ;
2954 return 0;
2955}
2956_ACEOF
2957rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002958if { (ac_try="$ac_compile"
2959case "(($ac_try" in
2960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2961 *) ac_try_echo=$ac_try;;
2962esac
Antoine Pitrou20327222009-05-24 20:39:11 +00002963eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2964$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002965 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002966 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00002967 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002968 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002969 for ac_file in conftest.o conftest.obj conftest.*; do
2970 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002971 case $ac_file in
Antoine Pitrou20327222009-05-24 20:39:11 +00002972 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002973 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2974 break;;
2975 esac
2976done
2977else
Antoine Pitrou20327222009-05-24 20:39:11 +00002978 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002979sed 's/^/| /' conftest.$ac_ext >&5
2980
Antoine Pitrou20327222009-05-24 20:39:11 +00002981{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2983{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002984See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00002985$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002986See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00002987 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002988fi
2989
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002990rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002991fi
Antoine Pitrou20327222009-05-24 20:39:11 +00002992{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2993$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002994OBJEXT=$ac_cv_objext
2995ac_objext=$OBJEXT
Antoine Pitrou20327222009-05-24 20:39:11 +00002996{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2997$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002998if test "${ac_cv_c_compiler_gnu+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00002999 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003000else
3001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003002/* confdefs.h. */
3003_ACEOF
3004cat confdefs.h >>conftest.$ac_ext
3005cat >>conftest.$ac_ext <<_ACEOF
3006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003007
Martin v. Löwis11437992002-04-12 09:54:03 +00003008int
3009main ()
3010{
3011#ifndef __GNUC__
3012 choke me
3013#endif
3014
3015 ;
3016 return 0;
3017}
3018_ACEOF
3019rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020if { (ac_try="$ac_compile"
3021case "(($ac_try" in
3022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3023 *) ac_try_echo=$ac_try;;
3024esac
Antoine Pitrou20327222009-05-24 20:39:11 +00003025eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3026$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003027 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003029 grep -v '^ *+' conftest.er1 >conftest.err
3030 rm -f conftest.er1
3031 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003032 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003033 (exit $ac_status); } && {
3034 test -z "$ac_c_werror_flag" ||
3035 test ! -s conftest.err
3036 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003037 ac_compiler_gnu=yes
3038else
Antoine Pitrou20327222009-05-24 20:39:11 +00003039 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003040sed 's/^/| /' conftest.$ac_ext >&5
3041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044
3045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003046ac_cv_c_compiler_gnu=$ac_compiler_gnu
3047
3048fi
Antoine Pitrou20327222009-05-24 20:39:11 +00003049{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3050$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3051if test $ac_compiler_gnu = yes; then
3052 GCC=yes
3053else
3054 GCC=
3055fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003056ac_test_CFLAGS=${CFLAGS+set}
3057ac_save_CFLAGS=$CFLAGS
Antoine Pitrou20327222009-05-24 20:39:11 +00003058{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3059$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003060if test "${ac_cv_prog_cc_g+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003061 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003062else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003063 ac_save_c_werror_flag=$ac_c_werror_flag
3064 ac_c_werror_flag=yes
3065 ac_cv_prog_cc_g=no
3066 CFLAGS="-g"
3067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003068/* confdefs.h. */
3069_ACEOF
3070cat confdefs.h >>conftest.$ac_ext
3071cat >>conftest.$ac_ext <<_ACEOF
3072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003073
Martin v. Löwis11437992002-04-12 09:54:03 +00003074int
3075main ()
3076{
3077
3078 ;
3079 return 0;
3080}
3081_ACEOF
3082rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003083if { (ac_try="$ac_compile"
3084case "(($ac_try" in
3085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3086 *) ac_try_echo=$ac_try;;
3087esac
Antoine Pitrou20327222009-05-24 20:39:11 +00003088eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3089$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Antoine Pitrou20327222009-05-24 20:39:11 +00003095 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Antoine Pitrou20327222009-05-24 20:39:11 +00003102 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003103sed 's/^/| /' conftest.$ac_ext >&5
3104
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Antoine Pitrou20327222009-05-24 20:39:11 +00003127eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3128$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003129 (eval "$ac_compile") 2>conftest.er1
3130 ac_status=$?
3131 grep -v '^ *+' conftest.er1 >conftest.err
3132 rm -f conftest.er1
3133 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003134 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135 (exit $ac_status); } && {
3136 test -z "$ac_c_werror_flag" ||
3137 test ! -s conftest.err
3138 } && test -s conftest.$ac_objext; then
3139 :
3140else
Antoine Pitrou20327222009-05-24 20:39:11 +00003141 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142sed 's/^/| /' conftest.$ac_ext >&5
3143
3144 ac_c_werror_flag=$ac_save_c_werror_flag
3145 CFLAGS="-g"
3146 cat >conftest.$ac_ext <<_ACEOF
3147/* confdefs.h. */
3148_ACEOF
3149cat confdefs.h >>conftest.$ac_ext
3150cat >>conftest.$ac_ext <<_ACEOF
3151/* end confdefs.h. */
3152
3153int
3154main ()
3155{
3156
3157 ;
3158 return 0;
3159}
3160_ACEOF
3161rm -f conftest.$ac_objext
3162if { (ac_try="$ac_compile"
3163case "(($ac_try" in
3164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3165 *) ac_try_echo=$ac_try;;
3166esac
Antoine Pitrou20327222009-05-24 20:39:11 +00003167eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3168$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169 (eval "$ac_compile") 2>conftest.er1
3170 ac_status=$?
3171 grep -v '^ *+' conftest.er1 >conftest.err
3172 rm -f conftest.er1
3173 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003174 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003175 (exit $ac_status); } && {
3176 test -z "$ac_c_werror_flag" ||
3177 test ! -s conftest.err
3178 } && test -s conftest.$ac_objext; then
3179 ac_cv_prog_cc_g=yes
3180else
Antoine Pitrou20327222009-05-24 20:39:11 +00003181 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182sed 's/^/| /' conftest.$ac_ext >&5
3183
3184
Guido van Rossum627b2d71993-12-24 10:39:16 +00003185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186
3187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189
3190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3191fi
3192
3193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3194 ac_c_werror_flag=$ac_save_c_werror_flag
3195fi
Antoine Pitrou20327222009-05-24 20:39:11 +00003196{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3197$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003198if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003199 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003200elif test $ac_cv_prog_cc_g = yes; then
3201 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003202 CFLAGS="-g -O2"
3203 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003204 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003205 fi
3206else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003207 if test "$GCC" = yes; then
3208 CFLAGS="-O2"
3209 else
3210 CFLAGS=
3211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003212fi
Antoine Pitrou20327222009-05-24 20:39:11 +00003213{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3214$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215if test "${ac_cv_prog_cc_c89+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003216 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003217else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003219ac_save_CC=$CC
3220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003221/* confdefs.h. */
3222_ACEOF
3223cat confdefs.h >>conftest.$ac_ext
3224cat >>conftest.$ac_ext <<_ACEOF
3225/* end confdefs.h. */
3226#include <stdarg.h>
3227#include <stdio.h>
3228#include <sys/types.h>
3229#include <sys/stat.h>
3230/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3231struct buf { int x; };
3232FILE * (*rcsopen) (struct buf *, struct stat *, int);
3233static char *e (p, i)
3234 char **p;
3235 int i;
3236{
3237 return p[i];
3238}
3239static char *f (char * (*g) (char **, int), char **p, ...)
3240{
3241 char *s;
3242 va_list v;
3243 va_start (v,p);
3244 s = g (p, va_arg (v,int));
3245 va_end (v);
3246 return s;
3247}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003248
3249/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3250 function prototypes and stuff, but not '\xHH' hex character constants.
3251 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003252 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003253 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3254 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003255 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003256int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3259 inside strings and character constants. */
3260#define FOO(x) 'x'
3261int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3262
Skip Montanaro6dead952003-09-25 14:50:04 +00003263int test (int i, double x);
3264struct s1 {int (*f) (int a);};
3265struct s2 {int (*f) (double a);};
3266int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3267int argc;
3268char **argv;
3269int
3270main ()
3271{
3272return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3273 ;
3274 return 0;
3275}
3276_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003277for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3278 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003279do
3280 CC="$ac_save_CC $ac_arg"
3281 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003282if { (ac_try="$ac_compile"
3283case "(($ac_try" in
3284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3285 *) ac_try_echo=$ac_try;;
3286esac
Antoine Pitrou20327222009-05-24 20:39:11 +00003287eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3288$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003291 grep -v '^ *+' conftest.er1 >conftest.err
3292 rm -f conftest.er1
3293 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003294 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295 (exit $ac_status); } && {
3296 test -z "$ac_c_werror_flag" ||
3297 test ! -s conftest.err
3298 } && test -s conftest.$ac_objext; then
3299 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003300else
Antoine Pitrou20327222009-05-24 20:39:11 +00003301 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003302sed 's/^/| /' conftest.$ac_ext >&5
3303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304
Skip Montanaro6dead952003-09-25 14:50:04 +00003305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306
3307rm -f core conftest.err conftest.$ac_objext
3308 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003309done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003311CC=$ac_save_CC
3312
3313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003314# AC_CACHE_VAL
3315case "x$ac_cv_prog_cc_c89" in
3316 x)
Antoine Pitrou20327222009-05-24 20:39:11 +00003317 { $as_echo "$as_me:$LINENO: result: none needed" >&5
3318$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319 xno)
Antoine Pitrou20327222009-05-24 20:39:11 +00003320 { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3321$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003322 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323 CC="$CC $ac_cv_prog_cc_c89"
Antoine Pitrou20327222009-05-24 20:39:11 +00003324 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3325$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003326esac
3327
Skip Montanaro6dead952003-09-25 14:50:04 +00003328
Martin v. Löwis11437992002-04-12 09:54:03 +00003329ac_ext=c
3330ac_cpp='$CPP $CPPFLAGS'
3331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3333ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003334
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003335
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003336
3337
Antoine Pitrou20327222009-05-24 20:39:11 +00003338{ $as_echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3339$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003340
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003341# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003342if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003344
3345 case $withval in
3346 no) with_cxx_main=no
3347 MAINCC='$(CC)';;
3348 yes) with_cxx_main=yes
3349 MAINCC='$(CXX)';;
3350 *) with_cxx_main=yes
3351 MAINCC=$withval
3352 if test -z "$CXX"
3353 then
3354 CXX=$withval
3355 fi;;
3356 esac
3357else
3358
3359 with_cxx_main=no
3360 MAINCC='$(CC)'
3361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003362fi
3363
Antoine Pitrou20327222009-05-24 20:39:11 +00003364{ $as_echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3365$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003366
3367preset_cxx="$CXX"
3368if test -z "$CXX"
3369then
3370 case "$CC" in
3371 gcc) # Extract the first word of "g++", so it can be a program name with args.
3372set dummy g++; ac_word=$2
Antoine Pitrou20327222009-05-24 20:39:11 +00003373{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3374$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375if test "${ac_cv_path_CXX+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003376 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003377else
3378 case $CXX in
3379 [\\/]* | ?:[\\/]*)
3380 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3381 ;;
3382 *)
3383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3384for as_dir in notfound
3385do
3386 IFS=$as_save_IFS
3387 test -z "$as_dir" && as_dir=.
3388 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003389 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003390 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Antoine Pitrou20327222009-05-24 20:39:11 +00003391 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003392 break 2
3393 fi
3394done
3395done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003396IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003397
3398 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3399 ;;
3400esac
3401fi
3402CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003403if test -n "$CXX"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003404 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3405$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003406else
Antoine Pitrou20327222009-05-24 20:39:11 +00003407 { $as_echo "$as_me:$LINENO: result: no" >&5
3408$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003410
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003411 ;;
3412 cc) # Extract the first word of "c++", so it can be a program name with args.
3413set dummy c++; ac_word=$2
Antoine Pitrou20327222009-05-24 20:39:11 +00003414{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3415$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003416if test "${ac_cv_path_CXX+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003417 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003418else
3419 case $CXX in
3420 [\\/]* | ?:[\\/]*)
3421 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3422 ;;
3423 *)
3424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3425for as_dir in notfound
3426do
3427 IFS=$as_save_IFS
3428 test -z "$as_dir" && as_dir=.
3429 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003431 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Antoine Pitrou20327222009-05-24 20:39:11 +00003432 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003433 break 2
3434 fi
3435done
3436done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003437IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003438
3439 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3440 ;;
3441esac
3442fi
3443CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003444if test -n "$CXX"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003445 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3446$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003447else
Antoine Pitrou20327222009-05-24 20:39:11 +00003448 { $as_echo "$as_me:$LINENO: result: no" >&5
3449$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003452 ;;
3453 esac
3454 if test "$CXX" = "notfound"
3455 then
3456 CXX=""
3457 fi
3458fi
3459if test -z "$CXX"
3460then
3461 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3462do
3463 # Extract the first word of "$ac_prog", so it can be a program name with args.
3464set dummy $ac_prog; ac_word=$2
Antoine Pitrou20327222009-05-24 20:39:11 +00003465{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3466$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003467if test "${ac_cv_prog_CXX+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003468 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003469else
3470 if test -n "$CXX"; then
3471 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3472else
3473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3474for as_dir in $PATH
3475do
3476 IFS=$as_save_IFS
3477 test -z "$as_dir" && as_dir=.
3478 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003480 ac_cv_prog_CXX="$ac_prog"
Antoine Pitrou20327222009-05-24 20:39:11 +00003481 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003482 break 2
3483 fi
3484done
3485done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003486IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003487
3488fi
3489fi
3490CXX=$ac_cv_prog_CXX
3491if test -n "$CXX"; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003492 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3493$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003494else
Antoine Pitrou20327222009-05-24 20:39:11 +00003495 { $as_echo "$as_me:$LINENO: result: no" >&5
3496$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003497fi
3498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003499
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003500 test -n "$CXX" && break
3501done
3502test -n "$CXX" || CXX="notfound"
3503
3504 if test "$CXX" = "notfound"
3505 then
3506 CXX=""
3507 fi
3508fi
3509if test "$preset_cxx" != "$CXX"
3510then
Antoine Pitrou20327222009-05-24 20:39:11 +00003511 { $as_echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003512
3513 By default, distutils will build C++ extension modules with \"$CXX\".
3514 If this is not intended, then set CXX on the configure command line.
3515 " >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003516$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003517
3518 By default, distutils will build C++ extension modules with \"$CXX\".
3519 If this is not intended, then set CXX on the configure command line.
3520 " >&2;}
3521fi
3522
3523
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003524# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003525
3526ac_ext=c
3527ac_cpp='$CPP $CPPFLAGS'
3528ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3529ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3530ac_compiler_gnu=$ac_cv_c_compiler_gnu
Antoine Pitrou20327222009-05-24 20:39:11 +00003531{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3532$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003533# On Suns, sometimes $CPP names a directory.
3534if test -n "$CPP" && test -d "$CPP"; then
3535 CPP=
3536fi
3537if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 if test "${ac_cv_prog_CPP+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003539 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003540else
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 # Double quotes because CPP needs to be expanded
3542 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3543 do
3544 ac_preproc_ok=false
3545for ac_c_preproc_warn_flag in '' yes
3546do
3547 # Use a header file that comes with gcc, so configuring glibc
3548 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003549 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3550 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003551 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 # not just through cpp. "Syntax error" is here to catch this case.
3553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003554/* confdefs.h. */
3555_ACEOF
3556cat confdefs.h >>conftest.$ac_ext
3557cat >>conftest.$ac_ext <<_ACEOF
3558/* end confdefs.h. */
3559#ifdef __STDC__
3560# include <limits.h>
3561#else
3562# include <assert.h>
3563#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003564 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003565_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566if { (ac_try="$ac_cpp conftest.$ac_ext"
3567case "(($ac_try" in
3568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3569 *) ac_try_echo=$ac_try;;
3570esac
Antoine Pitrou20327222009-05-24 20:39:11 +00003571eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3572$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Antoine Pitrou20327222009-05-24 20:39:11 +00003578 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Antoine Pitrou20327222009-05-24 20:39:11 +00003585 $as_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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Antoine Pitrou20327222009-05-24 20:39:11 +00003609eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3610$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003613 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 rm -f conftest.er1
3615 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003616 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617 (exit $ac_status); } >/dev/null && {
3618 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3619 test ! -s conftest.err
3620 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 # Broken: success on invalid input.
3622continue
3623else
Antoine Pitrou20327222009-05-24 20:39:11 +00003624 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003625sed 's/^/| /' conftest.$ac_ext >&5
3626
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 # Passes both tests.
3628ac_preproc_ok=:
3629break
3630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631
Martin v. Löwis11437992002-04-12 09:54:03 +00003632rm -f conftest.err conftest.$ac_ext
3633
3634done
3635# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3636rm -f conftest.err conftest.$ac_ext
3637if $ac_preproc_ok; then
3638 break
3639fi
3640
3641 done
3642 ac_cv_prog_CPP=$CPP
3643
3644fi
3645 CPP=$ac_cv_prog_CPP
3646else
3647 ac_cv_prog_CPP=$CPP
3648fi
Antoine Pitrou20327222009-05-24 20:39:11 +00003649{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
3650$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003651ac_preproc_ok=false
3652for ac_c_preproc_warn_flag in '' yes
3653do
3654 # Use a header file that comes with gcc, so configuring glibc
3655 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003656 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3657 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 # On the NeXT, cc -E runs the code through the compiler's parser,
3659 # not just through cpp. "Syntax error" is here to catch this case.
3660 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003661/* confdefs.h. */
3662_ACEOF
3663cat confdefs.h >>conftest.$ac_ext
3664cat >>conftest.$ac_ext <<_ACEOF
3665/* end confdefs.h. */
3666#ifdef __STDC__
3667# include <limits.h>
3668#else
3669# include <assert.h>
3670#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003671 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003672_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673if { (ac_try="$ac_cpp conftest.$ac_ext"
3674case "(($ac_try" in
3675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3676 *) ac_try_echo=$ac_try;;
3677esac
Antoine Pitrou20327222009-05-24 20:39:11 +00003678eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3679$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003680 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003682 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 rm -f conftest.er1
3684 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003685 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686 (exit $ac_status); } >/dev/null && {
3687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3688 test ! -s conftest.err
3689 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 :
3691else
Antoine Pitrou20327222009-05-24 20:39:11 +00003692 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003693sed 's/^/| /' conftest.$ac_ext >&5
3694
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 # Broken: fails on valid input.
3696continue
3697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698
Martin v. Löwis11437992002-04-12 09:54:03 +00003699rm -f conftest.err conftest.$ac_ext
3700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 # can be detected and how.
3703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003704/* confdefs.h. */
3705_ACEOF
3706cat confdefs.h >>conftest.$ac_ext
3707cat >>conftest.$ac_ext <<_ACEOF
3708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003709#include <ac_nonexistent.h>
3710_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711if { (ac_try="$ac_cpp conftest.$ac_ext"
3712case "(($ac_try" in
3713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3714 *) ac_try_echo=$ac_try;;
3715esac
Antoine Pitrou20327222009-05-24 20:39:11 +00003716eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3717$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003720 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 rm -f conftest.er1
3722 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003723 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724 (exit $ac_status); } >/dev/null && {
3725 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3726 test ! -s conftest.err
3727 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 # Broken: success on invalid input.
3729continue
3730else
Antoine Pitrou20327222009-05-24 20:39:11 +00003731 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003732sed 's/^/| /' conftest.$ac_ext >&5
3733
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 # Passes both tests.
3735ac_preproc_ok=:
3736break
3737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739rm -f conftest.err conftest.$ac_ext
3740
3741done
3742# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3743rm -f conftest.err conftest.$ac_ext
3744if $ac_preproc_ok; then
3745 :
3746else
Antoine Pitrou20327222009-05-24 20:39:11 +00003747 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3749{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003750See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003751$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003752See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00003753 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755
3756ac_ext=c
3757ac_cpp='$CPP $CPPFLAGS'
3758ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3759ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3760ac_compiler_gnu=$ac_cv_c_compiler_gnu
3761
3762
Antoine Pitrou20327222009-05-24 20:39:11 +00003763{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3764$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765if test "${ac_cv_path_GREP+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003766 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003767else
Antoine Pitrou20327222009-05-24 20:39:11 +00003768 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769 ac_path_GREP_found=false
Antoine Pitrou20327222009-05-24 20:39:11 +00003770 # Loop through the user's path and test for each of PROGNAME-LIST
3771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Antoine Pitrou20327222009-05-24 20:39:11 +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.
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Antoine Pitrou20327222009-05-24 20:39:11 +00003787 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788 while :
3789 do
3790 cat "conftest.in" "conftest.in" >"conftest.tmp"
3791 mv "conftest.tmp" "conftest.in"
3792 cp "conftest.in" "conftest.nl"
Antoine Pitrou20327222009-05-24 20:39:11 +00003793 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Thomas Wouters47b49bf2007-08-30 22:15:33 +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
Antoine Pitrou20327222009-05-24 20:39:11 +00003808 $ac_path_GREP_found && break 3
3809 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810 done
3811done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812IFS=$as_save_IFS
Antoine Pitrou20327222009-05-24 20:39:11 +00003813 if test -z "$ac_cv_path_GREP"; then
3814 { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3815$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816 { (exit 1); exit 1; }; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003817 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818else
3819 ac_cv_path_GREP=$GREP
3820fi
3821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822fi
Antoine Pitrou20327222009-05-24 20:39:11 +00003823{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3824$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825 GREP="$ac_cv_path_GREP"
3826
3827
Antoine Pitrou20327222009-05-24 20:39:11 +00003828{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
3829$as_echo_n "checking for egrep... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830if test "${ac_cv_path_EGREP+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003831 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832else
3833 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3834 then ac_cv_path_EGREP="$GREP -E"
3835 else
Antoine Pitrou20327222009-05-24 20:39:11 +00003836 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837 ac_path_EGREP_found=false
Antoine Pitrou20327222009-05-24 20:39:11 +00003838 # Loop through the user's path and test for each of PROGNAME-LIST
3839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3841do
3842 IFS=$as_save_IFS
3843 test -z "$as_dir" && as_dir=.
3844 for ac_prog in egrep; do
Antoine Pitrou20327222009-05-24 20:39:11 +00003845 for ac_exec_ext in '' $ac_executable_extensions; do
3846 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3847 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3848# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849 # Check for GNU $ac_path_EGREP
3850case `"$ac_path_EGREP" --version 2>&1` in
3851*GNU*)
3852 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3853*)
3854 ac_count=0
Antoine Pitrou20327222009-05-24 20:39:11 +00003855 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856 while :
3857 do
3858 cat "conftest.in" "conftest.in" >"conftest.tmp"
3859 mv "conftest.tmp" "conftest.in"
3860 cp "conftest.in" "conftest.nl"
Antoine Pitrou20327222009-05-24 20:39:11 +00003861 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3863 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3864 ac_count=`expr $ac_count + 1`
3865 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3866 # Best one so far, save it but keep looking for a better one
3867 ac_cv_path_EGREP="$ac_path_EGREP"
3868 ac_path_EGREP_max=$ac_count
3869 fi
3870 # 10*(2^10) chars as input seems more than enough
3871 test $ac_count -gt 10 && break
3872 done
3873 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3874esac
3875
Antoine Pitrou20327222009-05-24 20:39:11 +00003876 $ac_path_EGREP_found && break 3
3877 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878 done
3879done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880IFS=$as_save_IFS
Antoine Pitrou20327222009-05-24 20:39:11 +00003881 if test -z "$ac_cv_path_EGREP"; then
3882 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3883$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884 { (exit 1); exit 1; }; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003885 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886else
3887 ac_cv_path_EGREP=$EGREP
3888fi
3889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 fi
3891fi
Antoine Pitrou20327222009-05-24 20:39:11 +00003892{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3893$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003895
3896
Antoine Pitrou20327222009-05-24 20:39:11 +00003897{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3898$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +00003899if test "${ac_cv_header_stdc+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00003900 $as_echo_n "(cached) " >&6
Antoine Pitroub52ec782009-01-25 16:34:23 +00003901else
3902 cat >conftest.$ac_ext <<_ACEOF
3903/* confdefs.h. */
3904_ACEOF
3905cat confdefs.h >>conftest.$ac_ext
3906cat >>conftest.$ac_ext <<_ACEOF
3907/* end confdefs.h. */
3908#include <stdlib.h>
3909#include <stdarg.h>
3910#include <string.h>
3911#include <float.h>
3912
3913int
3914main ()
3915{
3916
3917 ;
3918 return 0;
3919}
3920_ACEOF
3921rm -f conftest.$ac_objext
3922if { (ac_try="$ac_compile"
3923case "(($ac_try" in
3924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3925 *) ac_try_echo=$ac_try;;
3926esac
Antoine Pitrou20327222009-05-24 20:39:11 +00003927eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3928$as_echo "$ac_try_echo") >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003929 (eval "$ac_compile") 2>conftest.er1
3930 ac_status=$?
3931 grep -v '^ *+' conftest.er1 >conftest.err
3932 rm -f conftest.er1
3933 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003934 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003935 (exit $ac_status); } && {
3936 test -z "$ac_c_werror_flag" ||
3937 test ! -s conftest.err
3938 } && test -s conftest.$ac_objext; then
3939 ac_cv_header_stdc=yes
3940else
Antoine Pitrou20327222009-05-24 20:39:11 +00003941 $as_echo "$as_me: failed program was:" >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003942sed 's/^/| /' conftest.$ac_ext >&5
3943
3944 ac_cv_header_stdc=no
3945fi
3946
3947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3948
3949if test $ac_cv_header_stdc = yes; then
3950 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3951 cat >conftest.$ac_ext <<_ACEOF
3952/* confdefs.h. */
3953_ACEOF
3954cat confdefs.h >>conftest.$ac_ext
3955cat >>conftest.$ac_ext <<_ACEOF
3956/* end confdefs.h. */
3957#include <string.h>
3958
3959_ACEOF
3960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3961 $EGREP "memchr" >/dev/null 2>&1; then
3962 :
3963else
3964 ac_cv_header_stdc=no
3965fi
3966rm -f conftest*
3967
3968fi
3969
3970if test $ac_cv_header_stdc = yes; then
3971 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3972 cat >conftest.$ac_ext <<_ACEOF
3973/* confdefs.h. */
3974_ACEOF
3975cat confdefs.h >>conftest.$ac_ext
3976cat >>conftest.$ac_ext <<_ACEOF
3977/* end confdefs.h. */
3978#include <stdlib.h>
3979
3980_ACEOF
3981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3982 $EGREP "free" >/dev/null 2>&1; then
3983 :
3984else
3985 ac_cv_header_stdc=no
3986fi
3987rm -f conftest*
3988
3989fi
3990
3991if test $ac_cv_header_stdc = yes; then
3992 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3993 if test "$cross_compiling" = yes; then
3994 :
3995else
3996 cat >conftest.$ac_ext <<_ACEOF
3997/* confdefs.h. */
3998_ACEOF
3999cat confdefs.h >>conftest.$ac_ext
4000cat >>conftest.$ac_ext <<_ACEOF
4001/* end confdefs.h. */
4002#include <ctype.h>
4003#include <stdlib.h>
4004#if ((' ' & 0x0FF) == 0x020)
4005# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4006# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4007#else
4008# define ISLOWER(c) \
4009 (('a' <= (c) && (c) <= 'i') \
4010 || ('j' <= (c) && (c) <= 'r') \
4011 || ('s' <= (c) && (c) <= 'z'))
4012# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4013#endif
4014
4015#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4016int
4017main ()
4018{
4019 int i;
4020 for (i = 0; i < 256; i++)
4021 if (XOR (islower (i), ISLOWER (i))
4022 || toupper (i) != TOUPPER (i))
4023 return 2;
4024 return 0;
4025}
4026_ACEOF
4027rm -f conftest$ac_exeext
4028if { (ac_try="$ac_link"
4029case "(($ac_try" in
4030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4031 *) ac_try_echo=$ac_try;;
4032esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004033eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4034$as_echo "$ac_try_echo") >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00004035 (eval "$ac_link") 2>&5
4036 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00004037 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00004038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4039 { (case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004043eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4044$as_echo "$ac_try_echo") >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00004045 (eval "$ac_try") 2>&5
4046 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00004047 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00004048 (exit $ac_status); }; }; then
4049 :
4050else
Antoine Pitrou20327222009-05-24 20:39:11 +00004051 $as_echo "$as_me: program exited with status $ac_status" >&5
4052$as_echo "$as_me: failed program was:" >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00004053sed 's/^/| /' conftest.$ac_ext >&5
4054
4055( exit $ac_status )
4056ac_cv_header_stdc=no
4057fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004058rm -rf conftest.dSYM
Antoine Pitroub52ec782009-01-25 16:34:23 +00004059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4060fi
4061
4062
4063fi
4064fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004065{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4066$as_echo "$ac_cv_header_stdc" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +00004067if test $ac_cv_header_stdc = yes; then
4068
4069cat >>confdefs.h <<\_ACEOF
4070#define STDC_HEADERS 1
4071_ACEOF
4072
4073fi
4074
Martin v. Löwisb70bcf52009-02-19 07:51:52 +00004075# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4086 inttypes.h stdint.h unistd.h
4087do
Antoine Pitrou20327222009-05-24 20:39:11 +00004088as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4089{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4090$as_echo_n "checking for $ac_header... " >&6; }
Martin v. Löwisb70bcf52009-02-19 07:51:52 +00004091if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +00004092 $as_echo_n "(cached) " >&6
Martin v. Löwisb70bcf52009-02-19 07:51:52 +00004093else
4094 cat >conftest.$ac_ext <<_ACEOF
4095/* confdefs.h. */
4096_ACEOF
4097cat confdefs.h >>conftest.$ac_ext
4098cat >>conftest.$ac_ext <<_ACEOF
4099/* end confdefs.h. */
4100$ac_includes_default
4101
4102#include <$ac_header>
4103_ACEOF
4104rm -f conftest.$ac_objext
4105if { (ac_try="$ac_compile"
4106case "(($ac_try" in
4107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4108 *) ac_try_echo=$ac_try;;
4109esac
Antoine Pitrou20327222009-05-24 20:39:11 +00004110eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4111$as_echo "$ac_try_echo") >&5
Martin v. Löwisb70bcf52009-02-19 07:51:52 +00004112 (eval "$ac_compile") 2>conftest.er1
4113 ac_status=$?
4114 grep -v '^ *+' conftest.er1 >conftest.err
4115 rm -f conftest.er1
4116 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004117 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisb70bcf52009-02-19 07:51:52 +00004118 (exit $ac_status); } && {
4119 test -z "$ac_c_werror_flag" ||
4120 test ! -s conftest.err
4121 } && test -s conftest.$ac_objext; then
4122 eval "$as_ac_Header=yes"
4123else
Antoine Pitrou20327222009-05-24 20:39:11 +00004124 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisb70bcf52009-02-19 07:51:52 +00004125sed 's/^/| /' conftest.$ac_ext >&5
4126
4127 eval "$as_ac_Header=no"
4128fi
4129
4130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4131fi
Antoine Pitrou20327222009-05-24 20:39:11 +00004132ac_res=`eval 'as_val=${'$as_ac_Header'}
4133 $as_echo "$as_val"'`
4134 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4135$as_echo "$ac_res" >&6; }
4136as_val=`eval 'as_val=${'$as_ac_Header'}
4137 $as_echo "$as_val"'`
4138 if test "x$as_val" = x""yes; then
Martin v. Löwisb70bcf52009-02-19 07:51:52 +00004139 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00004140#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisb70bcf52009-02-19 07:51:52 +00004141_ACEOF
4142
4143fi
4144
4145done
4146
4147
Antoine Pitroub52ec782009-01-25 16:34:23 +00004148
Antoine Pitrou20327222009-05-24 20:39:11 +00004149 if test "${ac_cv_header_minix_config_h+set}" = set; then
4150 { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4151$as_echo_n "checking for minix/config.h... " >&6; }
4152if test "${ac_cv_header_minix_config_h+set}" = set; then
4153 $as_echo_n "(cached) " >&6
4154fi
4155{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4156$as_echo "$ac_cv_header_minix_config_h" >&6; }
4157else
4158 # Is the header compilable?
4159{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4160$as_echo_n "checking minix/config.h usability... " >&6; }
4161cat >conftest.$ac_ext <<_ACEOF
4162/* confdefs.h. */
4163_ACEOF
4164cat confdefs.h >>conftest.$ac_ext
4165cat >>conftest.$ac_ext <<_ACEOF
4166/* end confdefs.h. */
4167$ac_includes_default
4168#include <minix/config.h>
4169_ACEOF
4170rm -f conftest.$ac_objext
4171if { (ac_try="$ac_compile"
4172case "(($ac_try" in
4173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4174 *) ac_try_echo=$ac_try;;
4175esac
4176eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4177$as_echo "$ac_try_echo") >&5
4178 (eval "$ac_compile") 2>conftest.er1
4179 ac_status=$?
4180 grep -v '^ *+' conftest.er1 >conftest.err
4181 rm -f conftest.er1
4182 cat conftest.err >&5
4183 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4184 (exit $ac_status); } && {
4185 test -z "$ac_c_werror_flag" ||
4186 test ! -s conftest.err
4187 } && test -s conftest.$ac_objext; then
4188 ac_header_compiler=yes
4189else
4190 $as_echo "$as_me: failed program was:" >&5
4191sed 's/^/| /' conftest.$ac_ext >&5
4192
4193 ac_header_compiler=no
4194fi
4195
4196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4197{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4198$as_echo "$ac_header_compiler" >&6; }
4199
4200# Is the header present?
4201{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4202$as_echo_n "checking minix/config.h presence... " >&6; }
4203cat >conftest.$ac_ext <<_ACEOF
4204/* confdefs.h. */
4205_ACEOF
4206cat confdefs.h >>conftest.$ac_ext
4207cat >>conftest.$ac_ext <<_ACEOF
4208/* end confdefs.h. */
4209#include <minix/config.h>
4210_ACEOF
4211if { (ac_try="$ac_cpp conftest.$ac_ext"
4212case "(($ac_try" in
4213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4214 *) ac_try_echo=$ac_try;;
4215esac
4216eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4217$as_echo "$ac_try_echo") >&5
4218 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4219 ac_status=$?
4220 grep -v '^ *+' conftest.er1 >conftest.err
4221 rm -f conftest.er1
4222 cat conftest.err >&5
4223 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4224 (exit $ac_status); } >/dev/null && {
4225 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4226 test ! -s conftest.err
4227 }; then
4228 ac_header_preproc=yes
4229else
4230 $as_echo "$as_me: failed program was:" >&5
4231sed 's/^/| /' conftest.$ac_ext >&5
4232
4233 ac_header_preproc=no
4234fi
4235
4236rm -f conftest.err conftest.$ac_ext
4237{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4238$as_echo "$ac_header_preproc" >&6; }
4239
4240# So? What about this header?
4241case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4242 yes:no: )
4243 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4244$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4245 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4246$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4247 ac_header_preproc=yes
4248 ;;
4249 no:yes:* )
4250 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4251$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4252 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4253$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4254 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4255$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4256 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4257$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4258 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4259$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4260 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4261$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4262 ( cat <<\_ASBOX
4263## -------------------------------------- ##
4264## Report this to http://bugs.python.org/ ##
4265## -------------------------------------- ##
4266_ASBOX
4267 ) | sed "s/^/$as_me: WARNING: /" >&2
4268 ;;
4269esac
4270{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4271$as_echo_n "checking for minix/config.h... " >&6; }
4272if test "${ac_cv_header_minix_config_h+set}" = set; then
4273 $as_echo_n "(cached) " >&6
4274else
4275 ac_cv_header_minix_config_h=$ac_header_preproc
4276fi
4277{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4278$as_echo "$ac_cv_header_minix_config_h" >&6; }
4279
4280fi
4281if test "x$ac_cv_header_minix_config_h" = x""yes; then
4282 MINIX=yes
4283else
4284 MINIX=
4285fi
4286
4287
4288 if test "$MINIX" = yes; then
4289
4290cat >>confdefs.h <<\_ACEOF
4291#define _POSIX_SOURCE 1
4292_ACEOF
4293
4294
4295cat >>confdefs.h <<\_ACEOF
4296#define _POSIX_1_SOURCE 2
4297_ACEOF
4298
4299
4300cat >>confdefs.h <<\_ACEOF
4301#define _MINIX 1
4302_ACEOF
4303
4304 fi
4305
4306
4307
4308 { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4309$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4310if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4311 $as_echo_n "(cached) " >&6
4312else
4313 cat >conftest.$ac_ext <<_ACEOF
4314/* confdefs.h. */
4315_ACEOF
4316cat confdefs.h >>conftest.$ac_ext
4317cat >>conftest.$ac_ext <<_ACEOF
4318/* end confdefs.h. */
4319
4320# define __EXTENSIONS__ 1
4321 $ac_includes_default
4322int
4323main ()
4324{
4325
4326 ;
4327 return 0;
4328}
4329_ACEOF
4330rm -f conftest.$ac_objext
4331if { (ac_try="$ac_compile"
4332case "(($ac_try" in
4333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4334 *) ac_try_echo=$ac_try;;
4335esac
4336eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4337$as_echo "$ac_try_echo") >&5
4338 (eval "$ac_compile") 2>conftest.er1
4339 ac_status=$?
4340 grep -v '^ *+' conftest.er1 >conftest.err
4341 rm -f conftest.er1
4342 cat conftest.err >&5
4343 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4344 (exit $ac_status); } && {
4345 test -z "$ac_c_werror_flag" ||
4346 test ! -s conftest.err
4347 } && test -s conftest.$ac_objext; then
4348 ac_cv_safe_to_define___extensions__=yes
4349else
4350 $as_echo "$as_me: failed program was:" >&5
4351sed 's/^/| /' conftest.$ac_ext >&5
4352
4353 ac_cv_safe_to_define___extensions__=no
4354fi
4355
4356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4357fi
4358{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4359$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4360 test $ac_cv_safe_to_define___extensions__ = yes &&
4361 cat >>confdefs.h <<\_ACEOF
4362#define __EXTENSIONS__ 1
4363_ACEOF
4364
4365 cat >>confdefs.h <<\_ACEOF
4366#define _ALL_SOURCE 1
4367_ACEOF
4368
4369 cat >>confdefs.h <<\_ACEOF
4370#define _GNU_SOURCE 1
4371_ACEOF
4372
4373 cat >>confdefs.h <<\_ACEOF
4374#define _POSIX_PTHREAD_SEMANTICS 1
4375_ACEOF
4376
4377 cat >>confdefs.h <<\_ACEOF
4378#define _TANDEM_SOURCE 1
4379_ACEOF
4380
4381
4382
4383# Check for unsupported systems
4384case $ac_sys_system/$ac_sys_release in
4385atheos*|Linux*/1*)
4386 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4387 echo See README for details.
4388 exit 1;;
4389esac
4390
4391
4392{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5
4393$as_echo_n "checking for --with-suffix... " >&6; }
4394
4395# Check whether --with-suffix was given.
4396if test "${with_suffix+set}" = set; then
4397 withval=$with_suffix;
4398 case $withval in
4399 no) EXEEXT=;;
4400 yes) EXEEXT=.exe;;
4401 *) EXEEXT=$withval;;
4402 esac
4403fi
4404
4405{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5
4406$as_echo "$EXEEXT" >&6; }
4407
4408# Test whether we're running on a non-case-sensitive system, in which
4409# case we give a warning if no ext is given
4410
4411{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
4412$as_echo_n "checking for case-insensitive build directory... " >&6; }
4413if test ! -d CaseSensitiveTestDir; then
4414mkdir CaseSensitiveTestDir
4415fi
4416
4417if test -d casesensitivetestdir
4418then
4419 { $as_echo "$as_me:$LINENO: result: yes" >&5
4420$as_echo "yes" >&6; }
4421 BUILDEXEEXT=.exe
4422else
4423 { $as_echo "$as_me:$LINENO: result: no" >&5
4424$as_echo "no" >&6; }
4425 BUILDEXEEXT=$EXEEXT
4426fi
4427rmdir CaseSensitiveTestDir
4428
4429case $MACHDEP in
4430bsdos*)
4431 case $CC in
4432 gcc) CC="$CC -D_HAVE_BSDI";;
4433 esac;;
4434esac
4435
4436case $ac_sys_system in
4437hp*|HP*)
4438 case $CC in
4439 cc|*/cc) CC="$CC -Ae";;
4440 esac;;
4441Monterey*)
4442 case $CC in
4443 cc) CC="$CC -Wl,-Bexport";;
4444 esac;;
4445SunOS*)
4446 # Some functions have a prototype only with that define, e.g. confstr
4447
4448cat >>confdefs.h <<\_ACEOF
4449#define __EXTENSIONS__ 1
4450_ACEOF
4451
4452 ;;
4453esac
4454
4455
4456
4457{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5
4458$as_echo_n "checking LIBRARY... " >&6; }
4459if test -z "$LIBRARY"
4460then
4461 LIBRARY='libpython$(VERSION).a'
4462fi
4463{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5
4464$as_echo "$LIBRARY" >&6; }
4465
4466# LDLIBRARY is the name of the library to link against (as opposed to the
4467# name of the library into which to insert object files). BLDLIBRARY is also
4468# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4469# is blank as the main program is not linked directly against LDLIBRARY.
4470# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4471# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4472# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4473# DLLLIBRARY is the shared (i.e., DLL) library.
4474#
4475# RUNSHARED is used to run shared python without installed libraries
4476#
4477# INSTSONAME is the name of the shared library that will be use to install
4478# on the system - some systems like version suffix, others don't
4479
4480
4481
4482
4483
4484
4485LDLIBRARY="$LIBRARY"
4486BLDLIBRARY='$(LDLIBRARY)'
4487INSTSONAME='$(LDLIBRARY)'
4488DLLLIBRARY=''
4489LDLIBRARYDIR=''
4490RUNSHARED=''
4491
4492# LINKCC is the command that links the python executable -- default is $(CC).
4493# If CXX is set, and if it is needed to link a main function that was
4494# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4495# python might then depend on the C++ runtime
4496# This is altered for AIX in order to build the export list before
4497# linking.
4498
4499{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5
4500$as_echo_n "checking LINKCC... " >&6; }
4501if test -z "$LINKCC"
4502then
4503 LINKCC='$(PURIFY) $(MAINCC)'
4504 case $ac_sys_system in
4505 AIX*)
4506 exp_extra="\"\""
4507 if test $ac_sys_release -ge 5 -o \
4508 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4509 exp_extra="."
4510 fi
4511 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
4512 Monterey64*)
4513 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
4514 QNX*)
4515 # qcc must be used because the other compilers do not
4516 # support -N.
4517 LINKCC=qcc;;
4518 esac
4519fi
4520{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5
4521$as_echo "$LINKCC" >&6; }
4522
4523# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4524# make sure we default having it set to "no": this is used by
4525# distutils.unixccompiler to know if it should add --enable-new-dtags
4526# to linker command lines, and failing to detect GNU ld simply results
4527# in the same bahaviour as before.
4528
4529{ $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
4530$as_echo_n "checking for GNU ld... " >&6; }
4531ac_prog=ld
4532if test "$GCC" = yes; then
4533 ac_prog=`$CC -print-prog-name=ld`
4534fi
4535case `"$ac_prog" -V 2>&1 < /dev/null` in
4536 *GNU*)
4537 GNULD=yes;;
4538 *)
4539 GNULD=no;;
4540esac
4541{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5
4542$as_echo "$GNULD" >&6; }
4543
4544{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5
4545$as_echo_n "checking for --enable-shared... " >&6; }
4546# Check whether --enable-shared was given.
4547if test "${enable_shared+set}" = set; then
4548 enableval=$enable_shared;
4549fi
4550
4551
4552if test -z "$enable_shared"
4553then
4554 case $ac_sys_system in
4555 CYGWIN* | atheos*)
4556 enable_shared="yes";;
4557 *)
4558 enable_shared="no";;
4559 esac
4560fi
4561{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
4562$as_echo "$enable_shared" >&6; }
4563
4564{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4565$as_echo_n "checking for --enable-profiling... " >&6; }
4566# Check whether --enable-profiling was given.
4567if test "${enable_profiling+set}" = set; then
4568 enableval=$enable_profiling; ac_save_cc="$CC"
4569 CC="$CC -pg"
4570 if test "$cross_compiling" = yes; then
4571 ac_enable_profiling="no"
4572else
4573 cat >conftest.$ac_ext <<_ACEOF
4574/* confdefs.h. */
4575_ACEOF
4576cat confdefs.h >>conftest.$ac_ext
4577cat >>conftest.$ac_ext <<_ACEOF
4578/* end confdefs.h. */
4579int main() { return 0; }
4580_ACEOF
4581rm -f conftest$ac_exeext
4582if { (ac_try="$ac_link"
4583case "(($ac_try" in
4584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4585 *) ac_try_echo=$ac_try;;
4586esac
4587eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4588$as_echo "$ac_try_echo") >&5
4589 (eval "$ac_link") 2>&5
4590 ac_status=$?
4591 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4592 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4593 { (case "(($ac_try" in
4594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4595 *) ac_try_echo=$ac_try;;
4596esac
4597eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4598$as_echo "$ac_try_echo") >&5
4599 (eval "$ac_try") 2>&5
4600 ac_status=$?
4601 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); }; }; then
4603 ac_enable_profiling="yes"
4604else
4605 $as_echo "$as_me: program exited with status $ac_status" >&5
4606$as_echo "$as_me: failed program was:" >&5
4607sed 's/^/| /' conftest.$ac_ext >&5
4608
4609( exit $ac_status )
4610ac_enable_profiling="no"
4611fi
4612rm -rf conftest.dSYM
4613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4614fi
4615
4616
4617 CC="$ac_save_cc"
4618fi
4619
4620{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4621$as_echo "$ac_enable_profiling" >&6; }
4622
4623case "$ac_enable_profiling" in
4624 "yes")
4625 BASECFLAGS="-pg $BASECFLAGS"
4626 LDFLAGS="-pg $LDFLAGS"
4627 ;;
4628esac
4629
4630{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4631$as_echo_n "checking LDLIBRARY... " >&6; }
4632
4633# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4634# library that we build, but we do not want to link against it (we
4635# will find it with a -framework option). For this reason there is an
4636# extra variable BLDLIBRARY against which Python and the extension
4637# modules are linked, BLDLIBRARY. This is normally the same as
4638# LDLIBRARY, but empty for MacOSX framework builds.
4639if test "$enable_framework"
4640then
4641 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4642 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4643 BLDLIBRARY=''
4644else
4645 BLDLIBRARY='$(LDLIBRARY)'
4646fi
4647
4648# Other platforms follow
4649if test $enable_shared = "yes"; then
4650
4651cat >>confdefs.h <<\_ACEOF
4652#define Py_ENABLE_SHARED 1
4653_ACEOF
4654
4655 case $ac_sys_system in
4656 CYGWIN*)
4657 LDLIBRARY='libpython$(VERSION).dll.a'
4658 DLLLIBRARY='libpython$(VERSION).dll'
4659 ;;
4660 SunOS*)
4661 LDLIBRARY='libpython$(VERSION).so'
4662 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4663 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4664 INSTSONAME="$LDLIBRARY".$SOVERSION
4665 ;;
4666 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4667 LDLIBRARY='libpython$(VERSION).so'
4668 BLDLIBRARY='-L. -lpython$(VERSION)'
4669 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4670 case $ac_sys_system in
4671 FreeBSD*)
4672 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4673 ;;
4674 esac
4675 INSTSONAME="$LDLIBRARY".$SOVERSION
4676 ;;
4677 hp*|HP*)
4678 case `uname -m` in
4679 ia64)
4680 LDLIBRARY='libpython$(VERSION).so'
4681 ;;
4682 *)
4683 LDLIBRARY='libpython$(VERSION).sl'
4684 ;;
4685 esac
4686 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4687 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4688 ;;
4689 OSF*)
4690 LDLIBRARY='libpython$(VERSION).so'
4691 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4692 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4693 ;;
4694 atheos*)
4695 LDLIBRARY='libpython$(VERSION).so'
4696 BLDLIBRARY='-L. -lpython$(VERSION)'
4697 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4698 ;;
4699 Darwin*)
4700 LDLIBRARY='libpython$(VERSION).dylib'
4701 BLDLIBRARY='-L. -lpython$(VERSION)'
4702 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4703 ;;
4704
4705 esac
4706else # shared is disabled
4707 case $ac_sys_system in
4708 CYGWIN*)
4709 BLDLIBRARY='$(LIBRARY)'
4710 LDLIBRARY='libpython$(VERSION).dll.a'
4711 ;;
4712 esac
4713fi
4714
4715{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4716$as_echo "$LDLIBRARY" >&6; }
4717
4718if test -n "$ac_tool_prefix"; then
4719 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4720set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4721{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4722$as_echo_n "checking for $ac_word... " >&6; }
4723if test "${ac_cv_prog_RANLIB+set}" = set; then
4724 $as_echo_n "(cached) " >&6
4725else
4726 if test -n "$RANLIB"; then
4727 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4728else
4729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4730for as_dir in $PATH
4731do
4732 IFS=$as_save_IFS
4733 test -z "$as_dir" && as_dir=.
4734 for ac_exec_ext in '' $ac_executable_extensions; do
4735 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4736 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4737 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4738 break 2
4739 fi
4740done
4741done
4742IFS=$as_save_IFS
4743
4744fi
4745fi
4746RANLIB=$ac_cv_prog_RANLIB
4747if test -n "$RANLIB"; then
4748 { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
4749$as_echo "$RANLIB" >&6; }
4750else
4751 { $as_echo "$as_me:$LINENO: result: no" >&5
4752$as_echo "no" >&6; }
4753fi
4754
4755
4756fi
4757if test -z "$ac_cv_prog_RANLIB"; then
4758 ac_ct_RANLIB=$RANLIB
4759 # Extract the first word of "ranlib", so it can be a program name with args.
4760set dummy ranlib; ac_word=$2
4761{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4762$as_echo_n "checking for $ac_word... " >&6; }
4763if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4764 $as_echo_n "(cached) " >&6
4765else
4766 if test -n "$ac_ct_RANLIB"; then
4767 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4768else
4769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4770for as_dir in $PATH
4771do
4772 IFS=$as_save_IFS
4773 test -z "$as_dir" && as_dir=.
4774 for ac_exec_ext in '' $ac_executable_extensions; do
4775 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4776 ac_cv_prog_ac_ct_RANLIB="ranlib"
4777 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4778 break 2
4779 fi
4780done
4781done
4782IFS=$as_save_IFS
4783
4784fi
4785fi
4786ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4787if test -n "$ac_ct_RANLIB"; then
4788 { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4789$as_echo "$ac_ct_RANLIB" >&6; }
4790else
4791 { $as_echo "$as_me:$LINENO: result: no" >&5
4792$as_echo "no" >&6; }
4793fi
4794
4795 if test "x$ac_ct_RANLIB" = x; then
4796 RANLIB=":"
4797 else
4798 case $cross_compiling:$ac_tool_warned in
4799yes:)
4800{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
4801$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4802ac_tool_warned=yes ;;
4803esac
4804 RANLIB=$ac_ct_RANLIB
4805 fi
4806else
4807 RANLIB="$ac_cv_prog_RANLIB"
4808fi
4809
4810
4811for ac_prog in ar aal
4812do
4813 # Extract the first word of "$ac_prog", so it can be a program name with args.
4814set dummy $ac_prog; ac_word=$2
4815{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
4817if test "${ac_cv_prog_AR+set}" = set; then
4818 $as_echo_n "(cached) " >&6
4819else
4820 if test -n "$AR"; then
4821 ac_cv_prog_AR="$AR" # Let the user override the test.
4822else
4823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4824for as_dir in $PATH
4825do
4826 IFS=$as_save_IFS
4827 test -z "$as_dir" && as_dir=.
4828 for ac_exec_ext in '' $ac_executable_extensions; do
4829 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4830 ac_cv_prog_AR="$ac_prog"
4831 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4832 break 2
4833 fi
4834done
4835done
4836IFS=$as_save_IFS
4837
4838fi
4839fi
4840AR=$ac_cv_prog_AR
4841if test -n "$AR"; then
4842 { $as_echo "$as_me:$LINENO: result: $AR" >&5
4843$as_echo "$AR" >&6; }
4844else
4845 { $as_echo "$as_me:$LINENO: result: no" >&5
4846$as_echo "no" >&6; }
4847fi
4848
4849
4850 test -n "$AR" && break
4851done
4852test -n "$AR" || AR="ar"
4853
4854
4855# tweak ARFLAGS only if the user didn't set it on the command line
4856
4857if test -z "$ARFLAGS"
4858then
4859 ARFLAGS="rc"
4860fi
4861
4862
4863# Extract the first word of "svnversion", so it can be a program name with args.
4864set dummy svnversion; ac_word=$2
4865{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4866$as_echo_n "checking for $ac_word... " >&6; }
4867if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4868 $as_echo_n "(cached) " >&6
4869else
4870 if test -n "$SVNVERSION"; then
4871 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4872else
4873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874for as_dir in $PATH
4875do
4876 IFS=$as_save_IFS
4877 test -z "$as_dir" && as_dir=.
4878 for ac_exec_ext in '' $ac_executable_extensions; do
4879 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4880 ac_cv_prog_SVNVERSION="found"
4881 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4882 break 2
4883 fi
4884done
4885done
4886IFS=$as_save_IFS
4887
4888 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4889fi
4890fi
4891SVNVERSION=$ac_cv_prog_SVNVERSION
4892if test -n "$SVNVERSION"; then
4893 { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4894$as_echo "$SVNVERSION" >&6; }
4895else
4896 { $as_echo "$as_me:$LINENO: result: no" >&5
4897$as_echo "no" >&6; }
4898fi
4899
4900
4901if test $SVNVERSION = found
4902then
4903 SVNVERSION="svnversion \$(srcdir)"
4904else
4905 SVNVERSION="echo Unversioned directory"
4906fi
4907
4908case $MACHDEP in
4909bsdos*|hp*|HP*)
4910 # install -d does not work on BSDI or HP-UX
4911 if test -z "$INSTALL"
4912 then
4913 INSTALL="${srcdir}/install-sh -c"
4914 fi
4915esac
4916ac_aux_dir=
4917for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4918 if test -f "$ac_dir/install-sh"; then
4919 ac_aux_dir=$ac_dir
4920 ac_install_sh="$ac_aux_dir/install-sh -c"
4921 break
4922 elif test -f "$ac_dir/install.sh"; then
4923 ac_aux_dir=$ac_dir
4924 ac_install_sh="$ac_aux_dir/install.sh -c"
4925 break
4926 elif test -f "$ac_dir/shtool"; then
4927 ac_aux_dir=$ac_dir
4928 ac_install_sh="$ac_aux_dir/shtool install -c"
4929 break
4930 fi
4931done
4932if test -z "$ac_aux_dir"; then
4933 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4934$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
4935 { (exit 1); exit 1; }; }
4936fi
4937
4938# These three variables are undocumented and unsupported,
4939# and are intended to be withdrawn in a future Autoconf release.
4940# They can cause serious problems if a builder's source tree is in a directory
4941# whose full name contains unusual characters.
4942ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4943ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4944ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4945
4946
4947# Find a good install program. We prefer a C program (faster),
4948# so one script is as good as another. But avoid the broken or
4949# incompatible versions:
4950# SysV /etc/install, /usr/sbin/install
4951# SunOS /usr/etc/install
4952# IRIX /sbin/install
4953# AIX /bin/install
4954# AmigaOS /C/install, which installs bootblocks on floppy discs
4955# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4956# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4957# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4958# OS/2's system install, which has a completely different semantic
4959# ./install, which can be erroneously created by make from ./install.sh.
4960# Reject install programs that cannot install multiple files.
4961{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4962$as_echo_n "checking for a BSD-compatible install... " >&6; }
4963if test -z "$INSTALL"; then
4964if test "${ac_cv_path_install+set}" = set; then
4965 $as_echo_n "(cached) " >&6
4966else
4967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968for as_dir in $PATH
4969do
4970 IFS=$as_save_IFS
4971 test -z "$as_dir" && as_dir=.
4972 # Account for people who put trailing slashes in PATH elements.
4973case $as_dir/ in
4974 ./ | .// | /cC/* | \
4975 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4976 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4977 /usr/ucb/* ) ;;
4978 *)
4979 # OSF1 and SCO ODT 3.0 have their own names for install.
4980 # Don't use installbsd from OSF since it installs stuff as root
4981 # by default.
4982 for ac_prog in ginstall scoinst install; do
4983 for ac_exec_ext in '' $ac_executable_extensions; do
4984 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4985 if test $ac_prog = install &&
4986 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4987 # AIX install. It has an incompatible calling convention.
4988 :
4989 elif test $ac_prog = install &&
4990 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4991 # program-specific install script used by HP pwplus--don't use.
4992 :
4993 else
4994 rm -rf conftest.one conftest.two conftest.dir
4995 echo one > conftest.one
4996 echo two > conftest.two
4997 mkdir conftest.dir
4998 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4999 test -s conftest.one && test -s conftest.two &&
5000 test -s conftest.dir/conftest.one &&
5001 test -s conftest.dir/conftest.two
5002 then
5003 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5004 break 3
5005 fi
5006 fi
5007 fi
5008 done
5009 done
5010 ;;
5011esac
5012
5013done
5014IFS=$as_save_IFS
5015
5016rm -rf conftest.one conftest.two conftest.dir
5017
5018fi
5019 if test "${ac_cv_path_install+set}" = set; then
5020 INSTALL=$ac_cv_path_install
5021 else
5022 # As a last resort, use the slow shell script. Don't cache a
5023 # value for INSTALL within a source directory, because that will
5024 # break other packages using the cache if that directory is
5025 # removed, or if the value is a relative name.
5026 INSTALL=$ac_install_sh
5027 fi
5028fi
5029{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
5030$as_echo "$INSTALL" >&6; }
5031
5032# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5033# It thinks the first close brace ends the variable substitution.
5034test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5035
5036test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5037
5038test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5039
5040
5041# Not every filesystem supports hard links
5042
5043if test -z "$LN" ; then
5044 case $ac_sys_system in
5045 CYGWIN*) LN="ln -s";;
5046 atheos*) LN="ln -s";;
5047 *) LN=ln;;
5048 esac
5049fi
5050
5051# Check for --with-pydebug
5052{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5
5053$as_echo_n "checking for --with-pydebug... " >&6; }
5054
5055# Check whether --with-pydebug was given.
5056if test "${with_pydebug+set}" = set; then
5057 withval=$with_pydebug;
5058if test "$withval" != no
5059then
5060
5061cat >>confdefs.h <<\_ACEOF
5062#define Py_DEBUG 1
5063_ACEOF
5064
5065 { $as_echo "$as_me:$LINENO: result: yes" >&5
5066$as_echo "yes" >&6; };
5067 Py_DEBUG='true'
5068else { $as_echo "$as_me:$LINENO: result: no" >&5
5069$as_echo "no" >&6; }; Py_DEBUG='false'
5070fi
5071else
5072 { $as_echo "$as_me:$LINENO: result: no" >&5
5073$as_echo "no" >&6; }
5074fi
5075
5076
5077# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5078# merged with this chunk of code?
5079
5080# Optimizer/debugger flags
5081# ------------------------
5082# (The following bit of code is complicated enough - please keep things
5083# indented properly. Just pretend you're editing Python code. ;-)
5084
5085# There are two parallel sets of case statements below, one that checks to
5086# see if OPT was set and one that does BASECFLAGS setting based upon
5087# compiler and platform. BASECFLAGS tweaks need to be made even if the
5088# user set OPT.
5089
5090# tweak OPT based on compiler and platform, only if the user didn't set
5091# it on the command line
5092
5093if test -z "$OPT"
5094then
5095 case $GCC in
5096 yes)
5097 if test "$CC" != 'g++' ; then
5098 STRICT_PROTO="-Wstrict-prototypes"
5099 fi
5100 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5101 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5102 WRAP="-fwrapv"
5103 fi
5104 case $ac_cv_prog_cc_g in
5105 yes)
5106 if test "$Py_DEBUG" = 'true' ; then
5107 # Optimization messes up debuggers, so turn it off for
5108 # debug builds.
5109 OPT="-g -Wall $STRICT_PROTO"
5110 else
5111 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5112 fi
5113 ;;
5114 *)
5115 OPT="-O3 -Wall $STRICT_PROTO"
5116 ;;
5117 esac
5118 case $ac_sys_system in
5119 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5120 ;;
5121 esac
5122 ;;
5123
5124 *)
5125 OPT="-O"
5126 ;;
5127 esac
5128
5129 # The current (beta) Monterey compiler dies with optimizations
5130 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
5131 case $ac_sys_system in
5132 Monterey*)
5133 OPT=""
5134 ;;
5135 esac
5136
5137fi
5138
5139
5140
5141# The -arch flags for universal builds on OSX
5142UNIVERSAL_ARCH_FLAGS=
5143
5144
5145# tweak BASECFLAGS based on compiler and platform
5146case $GCC in
5147yes)
5148 # Python violates C99 rules, by casting between incompatible
5149 # pointer types. GCC may generate bad code as a result of that,
5150 # so use -fno-strict-aliasing if supported.
5151 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
5152$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
5153 ac_save_cc="$CC"
5154 CC="$CC -fno-strict-aliasing"
5155 if test "$cross_compiling" = yes; then
5156 ac_cv_no_strict_aliasing_ok=no
5157else
5158 cat >conftest.$ac_ext <<_ACEOF
5159/* confdefs.h. */
5160_ACEOF
5161cat confdefs.h >>conftest.$ac_ext
5162cat >>conftest.$ac_ext <<_ACEOF
5163/* end confdefs.h. */
5164int main() { return 0; }
5165_ACEOF
5166rm -f conftest$ac_exeext
5167if { (ac_try="$ac_link"
5168case "(($ac_try" in
5169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5170 *) ac_try_echo=$ac_try;;
5171esac
5172eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5173$as_echo "$ac_try_echo") >&5
5174 (eval "$ac_link") 2>&5
5175 ac_status=$?
5176 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5177 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5178 { (case "(($ac_try" in
5179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5180 *) ac_try_echo=$ac_try;;
5181esac
5182eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5183$as_echo "$ac_try_echo") >&5
5184 (eval "$ac_try") 2>&5
5185 ac_status=$?
5186 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5187 (exit $ac_status); }; }; then
5188 ac_cv_no_strict_aliasing_ok=yes
5189else
5190 $as_echo "$as_me: program exited with status $ac_status" >&5
5191$as_echo "$as_me: failed program was:" >&5
5192sed 's/^/| /' conftest.$ac_ext >&5
5193
5194( exit $ac_status )
5195ac_cv_no_strict_aliasing_ok=no
5196fi
5197rm -rf conftest.dSYM
5198rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5199fi
5200
5201
5202 CC="$ac_save_cc"
5203 { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
5204$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
5205 if test $ac_cv_no_strict_aliasing_ok = yes
5206 then
5207 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5208 fi
5209
5210 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5211 # support. Without this, treatment of subnormals doesn't follow
5212 # the standard.
5213 case $ac_sys_machine in
5214 alpha*)
5215 BASECFLAGS="$BASECFLAGS -mieee"
5216 ;;
5217 esac
5218
5219 case $ac_sys_system in
5220 SCO_SV*)
5221 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5222 ;;
5223 # is there any other compiler on Darwin besides gcc?
5224 Darwin*)
5225 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5226 # used to be here, but non-Apple gcc doesn't accept them.
5227
5228
5229 if test "${enable_universalsdk}"; then
5230 UNIVERSAL_ARCH_FLAGS=""
5231 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5232 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5233 ARCH_RUN_32BIT=""
5234
5235 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5236 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5237
5238 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5239 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5240 ARCH_RUN_32BIT="arch -i386 -ppc"
5241
5242 else
5243 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
5244$as_echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
5245 { (exit 1); exit 1; }; }
5246
5247 fi
5248
5249
5250 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
5251 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5252 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
5253 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5254 fi
5255 fi
5256
5257 # Calculate the right deployment target for this build.
5258 #
5259 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5260 if test ${cur_target} '>' 10.2; then
5261 cur_target=10.3
5262 fi
5263 if test "${UNIVERSAL_ARCHS}" = "all"; then
5264 # Ensure that the default platform for a 4-way
5265 # universal build is OSX 10.5, that's the first
5266 # OS release where 4-way builds make sense.
5267 cur_target='10.5'
5268 fi
5269 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5270
5271 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5272 # environment with a value that is the same as what we'll use
5273 # in the Makefile to ensure that we'll get the same compiler
5274 # environment during configure and build time.
5275 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5276 export MACOSX_DEPLOYMENT_TARGET
5277 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5278
5279 ;;
5280 OSF*)
5281 BASECFLAGS="$BASECFLAGS -mieee"
5282 ;;
5283 esac
5284 ;;
5285
5286*)
5287 case $ac_sys_system in
5288 OpenUNIX*|UnixWare*)
5289 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5290 ;;
5291 OSF*)
5292 BASECFLAGS="$BASECFLAGS -ieee -std"
5293 ;;
5294 SCO_SV*)
5295 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5296 ;;
5297 esac
5298 ;;
5299esac
5300
5301if test "$Py_DEBUG" = 'true'; then
5302 :
5303else
5304 OPT="-DNDEBUG $OPT"
5305fi
5306
5307if test "$ac_arch_flags"
5308then
5309 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5310fi
5311
5312# disable check for icc since it seems to pass, but generates a warning
5313if test "$CC" = icc
5314then
5315 ac_cv_opt_olimit_ok=no
5316fi
5317
5318{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
5319$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5320if test "${ac_cv_opt_olimit_ok+set}" = set; then
5321 $as_echo_n "(cached) " >&6
5322else
5323 ac_save_cc="$CC"
5324CC="$CC -OPT:Olimit=0"
5325if test "$cross_compiling" = yes; then
5326 ac_cv_opt_olimit_ok=no
5327else
5328 cat >conftest.$ac_ext <<_ACEOF
5329/* confdefs.h. */
5330_ACEOF
5331cat confdefs.h >>conftest.$ac_ext
5332cat >>conftest.$ac_ext <<_ACEOF
5333/* end confdefs.h. */
5334int main() { return 0; }
5335_ACEOF
5336rm -f conftest$ac_exeext
5337if { (ac_try="$ac_link"
5338case "(($ac_try" in
5339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5340 *) ac_try_echo=$ac_try;;
5341esac
5342eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5343$as_echo "$ac_try_echo") >&5
5344 (eval "$ac_link") 2>&5
5345 ac_status=$?
5346 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5347 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5348 { (case "(($ac_try" in
5349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5350 *) ac_try_echo=$ac_try;;
5351esac
5352eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5353$as_echo "$ac_try_echo") >&5
5354 (eval "$ac_try") 2>&5
5355 ac_status=$?
5356 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5357 (exit $ac_status); }; }; then
5358 ac_cv_opt_olimit_ok=yes
5359else
5360 $as_echo "$as_me: program exited with status $ac_status" >&5
5361$as_echo "$as_me: failed program was:" >&5
5362sed 's/^/| /' conftest.$ac_ext >&5
5363
5364( exit $ac_status )
5365ac_cv_opt_olimit_ok=no
5366fi
5367rm -rf conftest.dSYM
5368rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5369fi
5370
5371
5372CC="$ac_save_cc"
5373fi
5374
5375{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
5376$as_echo "$ac_cv_opt_olimit_ok" >&6; }
5377if test $ac_cv_opt_olimit_ok = yes; then
5378 case $ac_sys_system in
5379 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5380 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5381 # environment?
5382 Darwin*)
5383 ;;
5384 *)
5385 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5386 ;;
5387 esac
5388else
5389 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
5390$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5391 if test "${ac_cv_olimit_ok+set}" = set; then
5392 $as_echo_n "(cached) " >&6
5393else
5394 ac_save_cc="$CC"
5395 CC="$CC -Olimit 1500"
5396 if test "$cross_compiling" = yes; then
5397 ac_cv_olimit_ok=no
5398else
5399 cat >conftest.$ac_ext <<_ACEOF
5400/* confdefs.h. */
5401_ACEOF
5402cat confdefs.h >>conftest.$ac_ext
5403cat >>conftest.$ac_ext <<_ACEOF
5404/* end confdefs.h. */
5405int main() { return 0; }
5406_ACEOF
5407rm -f conftest$ac_exeext
5408if { (ac_try="$ac_link"
5409case "(($ac_try" in
5410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5411 *) ac_try_echo=$ac_try;;
5412esac
5413eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5414$as_echo "$ac_try_echo") >&5
5415 (eval "$ac_link") 2>&5
5416 ac_status=$?
5417 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5418 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5419 { (case "(($ac_try" in
5420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5421 *) ac_try_echo=$ac_try;;
5422esac
5423eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5424$as_echo "$ac_try_echo") >&5
5425 (eval "$ac_try") 2>&5
5426 ac_status=$?
5427 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5428 (exit $ac_status); }; }; then
5429 ac_cv_olimit_ok=yes
5430else
5431 $as_echo "$as_me: program exited with status $ac_status" >&5
5432$as_echo "$as_me: failed program was:" >&5
5433sed 's/^/| /' conftest.$ac_ext >&5
5434
5435( exit $ac_status )
5436ac_cv_olimit_ok=no
5437fi
5438rm -rf conftest.dSYM
5439rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5440fi
5441
5442
5443 CC="$ac_save_cc"
5444fi
5445
5446 { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5447$as_echo "$ac_cv_olimit_ok" >&6; }
5448 if test $ac_cv_olimit_ok = yes; then
5449 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5450 fi
5451fi
5452
5453# Check whether GCC supports PyArg_ParseTuple format
5454if test "$GCC" = "yes"
5455then
5456 { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5457$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
5458 save_CFLAGS=$CFLAGS
5459 CFLAGS="$CFLAGS -Werror"
5460 cat >conftest.$ac_ext <<_ACEOF
5461/* confdefs.h. */
5462_ACEOF
5463cat confdefs.h >>conftest.$ac_ext
5464cat >>conftest.$ac_ext <<_ACEOF
5465/* end confdefs.h. */
5466
5467 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5468
5469int
5470main ()
5471{
5472
5473 ;
5474 return 0;
5475}
5476_ACEOF
5477rm -f conftest.$ac_objext
5478if { (ac_try="$ac_compile"
5479case "(($ac_try" in
5480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5481 *) ac_try_echo=$ac_try;;
5482esac
5483eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5484$as_echo "$ac_try_echo") >&5
5485 (eval "$ac_compile") 2>conftest.er1
5486 ac_status=$?
5487 grep -v '^ *+' conftest.er1 >conftest.err
5488 rm -f conftest.er1
5489 cat conftest.err >&5
5490 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5491 (exit $ac_status); } && {
5492 test -z "$ac_c_werror_flag" ||
5493 test ! -s conftest.err
5494 } && test -s conftest.$ac_objext; then
5495
5496cat >>confdefs.h <<\_ACEOF
5497#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5498_ACEOF
5499
5500 { $as_echo "$as_me:$LINENO: result: yes" >&5
5501$as_echo "yes" >&6; }
5502else
5503 $as_echo "$as_me: failed program was:" >&5
5504sed 's/^/| /' conftest.$ac_ext >&5
5505
5506 { $as_echo "$as_me:$LINENO: result: no" >&5
5507$as_echo "no" >&6; }
5508
5509fi
5510
5511rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5512 CFLAGS=$save_CFLAGS
5513fi
5514
5515# On some compilers, pthreads are available without further options
5516# (e.g. MacOS X). On some of these systems, the compiler will not
5517# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5518# So we have to see first whether pthreads are available without
5519# options before we can check whether -Kpthread improves anything.
5520{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5521$as_echo_n "checking whether pthreads are available without options... " >&6; }
5522if test "${ac_cv_pthread_is_default+set}" = set; then
5523 $as_echo_n "(cached) " >&6
5524else
5525 if test "$cross_compiling" = yes; then
5526 ac_cv_pthread_is_default=no
5527else
5528 cat >conftest.$ac_ext <<_ACEOF
5529/* confdefs.h. */
5530_ACEOF
5531cat confdefs.h >>conftest.$ac_ext
5532cat >>conftest.$ac_ext <<_ACEOF
5533/* end confdefs.h. */
5534
5535#include <pthread.h>
5536
5537void* routine(void* p){return NULL;}
5538
5539int main(){
5540 pthread_t p;
5541 if(pthread_create(&p,NULL,routine,NULL)!=0)
5542 return 1;
5543 (void)pthread_detach(p);
5544 return 0;
5545}
5546
5547_ACEOF
5548rm -f conftest$ac_exeext
5549if { (ac_try="$ac_link"
5550case "(($ac_try" in
5551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5552 *) ac_try_echo=$ac_try;;
5553esac
5554eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5555$as_echo "$ac_try_echo") >&5
5556 (eval "$ac_link") 2>&5
5557 ac_status=$?
5558 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5559 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5560 { (case "(($ac_try" in
5561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5562 *) ac_try_echo=$ac_try;;
5563esac
5564eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5565$as_echo "$ac_try_echo") >&5
5566 (eval "$ac_try") 2>&5
5567 ac_status=$?
5568 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5569 (exit $ac_status); }; }; then
5570
5571 ac_cv_pthread_is_default=yes
5572 ac_cv_kthread=no
5573 ac_cv_pthread=no
5574
5575else
5576 $as_echo "$as_me: program exited with status $ac_status" >&5
5577$as_echo "$as_me: failed program was:" >&5
5578sed 's/^/| /' conftest.$ac_ext >&5
5579
5580( exit $ac_status )
5581ac_cv_pthread_is_default=no
5582fi
5583rm -rf conftest.dSYM
5584rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5585fi
5586
5587
5588
5589fi
5590
5591{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5592$as_echo "$ac_cv_pthread_is_default" >&6; }
5593
5594
5595if test $ac_cv_pthread_is_default = yes
5596then
5597 ac_cv_kpthread=no
5598else
5599# -Kpthread, if available, provides the right #defines
5600# and linker options to make pthread_create available
5601# Some compilers won't report that they do not support -Kpthread,
5602# so we need to run a program to see whether it really made the
5603# function available.
5604{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5605$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5606if test "${ac_cv_kpthread+set}" = set; then
5607 $as_echo_n "(cached) " >&6
5608else
5609 ac_save_cc="$CC"
5610CC="$CC -Kpthread"
5611if test "$cross_compiling" = yes; then
5612 ac_cv_kpthread=no
5613else
5614 cat >conftest.$ac_ext <<_ACEOF
5615/* confdefs.h. */
5616_ACEOF
5617cat confdefs.h >>conftest.$ac_ext
5618cat >>conftest.$ac_ext <<_ACEOF
5619/* end confdefs.h. */
5620
5621#include <pthread.h>
5622
5623void* routine(void* p){return NULL;}
5624
5625int main(){
5626 pthread_t p;
5627 if(pthread_create(&p,NULL,routine,NULL)!=0)
5628 return 1;
5629 (void)pthread_detach(p);
5630 return 0;
5631}
5632
5633_ACEOF
5634rm -f conftest$ac_exeext
5635if { (ac_try="$ac_link"
5636case "(($ac_try" in
5637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5638 *) ac_try_echo=$ac_try;;
5639esac
5640eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5641$as_echo "$ac_try_echo") >&5
5642 (eval "$ac_link") 2>&5
5643 ac_status=$?
5644 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5645 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5646 { (case "(($ac_try" in
5647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5648 *) ac_try_echo=$ac_try;;
5649esac
5650eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5651$as_echo "$ac_try_echo") >&5
5652 (eval "$ac_try") 2>&5
5653 ac_status=$?
5654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5655 (exit $ac_status); }; }; then
5656 ac_cv_kpthread=yes
5657else
5658 $as_echo "$as_me: program exited with status $ac_status" >&5
5659$as_echo "$as_me: failed program was:" >&5
5660sed 's/^/| /' conftest.$ac_ext >&5
5661
5662( exit $ac_status )
5663ac_cv_kpthread=no
5664fi
5665rm -rf conftest.dSYM
5666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5667fi
5668
5669
5670CC="$ac_save_cc"
5671fi
5672
5673{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5674$as_echo "$ac_cv_kpthread" >&6; }
5675fi
5676
5677if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5678then
5679# -Kthread, if available, provides the right #defines
5680# and linker options to make pthread_create available
5681# Some compilers won't report that they do not support -Kthread,
5682# so we need to run a program to see whether it really made the
5683# function available.
5684{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5685$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5686if test "${ac_cv_kthread+set}" = set; then
5687 $as_echo_n "(cached) " >&6
5688else
5689 ac_save_cc="$CC"
5690CC="$CC -Kthread"
5691if test "$cross_compiling" = yes; then
5692 ac_cv_kthread=no
5693else
5694 cat >conftest.$ac_ext <<_ACEOF
5695/* confdefs.h. */
5696_ACEOF
5697cat confdefs.h >>conftest.$ac_ext
5698cat >>conftest.$ac_ext <<_ACEOF
5699/* end confdefs.h. */
5700
5701#include <pthread.h>
5702
5703void* routine(void* p){return NULL;}
5704
5705int main(){
5706 pthread_t p;
5707 if(pthread_create(&p,NULL,routine,NULL)!=0)
5708 return 1;
5709 (void)pthread_detach(p);
5710 return 0;
5711}
5712
5713_ACEOF
5714rm -f conftest$ac_exeext
5715if { (ac_try="$ac_link"
5716case "(($ac_try" in
5717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5718 *) ac_try_echo=$ac_try;;
5719esac
5720eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5721$as_echo "$ac_try_echo") >&5
5722 (eval "$ac_link") 2>&5
5723 ac_status=$?
5724 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5725 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5726 { (case "(($ac_try" in
5727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5728 *) ac_try_echo=$ac_try;;
5729esac
5730eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5731$as_echo "$ac_try_echo") >&5
5732 (eval "$ac_try") 2>&5
5733 ac_status=$?
5734 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5735 (exit $ac_status); }; }; then
5736 ac_cv_kthread=yes
5737else
5738 $as_echo "$as_me: program exited with status $ac_status" >&5
5739$as_echo "$as_me: failed program was:" >&5
5740sed 's/^/| /' conftest.$ac_ext >&5
5741
5742( exit $ac_status )
5743ac_cv_kthread=no
5744fi
5745rm -rf conftest.dSYM
5746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5747fi
5748
5749
5750CC="$ac_save_cc"
5751fi
5752
5753{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5754$as_echo "$ac_cv_kthread" >&6; }
5755fi
5756
5757if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5758then
5759# -pthread, if available, provides the right #defines
5760# and linker options to make pthread_create available
5761# Some compilers won't report that they do not support -pthread,
5762# so we need to run a program to see whether it really made the
5763# function available.
5764{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5765$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5766if test "${ac_cv_thread+set}" = set; then
5767 $as_echo_n "(cached) " >&6
5768else
5769 ac_save_cc="$CC"
5770CC="$CC -pthread"
5771if test "$cross_compiling" = yes; then
5772 ac_cv_pthread=no
5773else
5774 cat >conftest.$ac_ext <<_ACEOF
5775/* confdefs.h. */
5776_ACEOF
5777cat confdefs.h >>conftest.$ac_ext
5778cat >>conftest.$ac_ext <<_ACEOF
5779/* end confdefs.h. */
5780
5781#include <pthread.h>
5782
5783void* routine(void* p){return NULL;}
5784
5785int main(){
5786 pthread_t p;
5787 if(pthread_create(&p,NULL,routine,NULL)!=0)
5788 return 1;
5789 (void)pthread_detach(p);
5790 return 0;
5791}
5792
5793_ACEOF
5794rm -f conftest$ac_exeext
5795if { (ac_try="$ac_link"
5796case "(($ac_try" in
5797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5798 *) ac_try_echo=$ac_try;;
5799esac
5800eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5801$as_echo "$ac_try_echo") >&5
5802 (eval "$ac_link") 2>&5
5803 ac_status=$?
5804 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5805 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5806 { (case "(($ac_try" in
5807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5808 *) ac_try_echo=$ac_try;;
5809esac
5810eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5811$as_echo "$ac_try_echo") >&5
5812 (eval "$ac_try") 2>&5
5813 ac_status=$?
5814 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5815 (exit $ac_status); }; }; then
5816 ac_cv_pthread=yes
5817else
5818 $as_echo "$as_me: program exited with status $ac_status" >&5
5819$as_echo "$as_me: failed program was:" >&5
5820sed 's/^/| /' conftest.$ac_ext >&5
5821
5822( exit $ac_status )
5823ac_cv_pthread=no
5824fi
5825rm -rf conftest.dSYM
5826rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5827fi
5828
5829
5830CC="$ac_save_cc"
5831fi
5832
5833{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5834$as_echo "$ac_cv_pthread" >&6; }
5835fi
5836
5837# If we have set a CC compiler flag for thread support then
5838# check if it works for CXX, too.
5839ac_cv_cxx_thread=no
5840if test ! -z "$CXX"
5841then
5842{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5843$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
5844ac_save_cxx="$CXX"
5845
5846if test "$ac_cv_kpthread" = "yes"
5847then
5848 CXX="$CXX -Kpthread"
5849 ac_cv_cxx_thread=yes
5850elif test "$ac_cv_kthread" = "yes"
5851then
5852 CXX="$CXX -Kthread"
5853 ac_cv_cxx_thread=yes
5854elif test "$ac_cv_pthread" = "yes"
5855then
5856 CXX="$CXX -pthread"
5857 ac_cv_cxx_thread=yes
5858fi
5859
5860if test $ac_cv_cxx_thread = yes
5861then
5862 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5863 $CXX -c conftest.$ac_ext 2>&5
5864 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5865 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5866 then
5867 ac_cv_cxx_thread=yes
5868 else
5869 ac_cv_cxx_thread=no
5870 fi
5871 rm -fr conftest*
5872fi
5873{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5874$as_echo "$ac_cv_cxx_thread" >&6; }
5875fi
5876CXX="$ac_save_cxx"
5877
5878
5879# checks for header files
5880{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5881$as_echo_n "checking for ANSI C header files... " >&6; }
5882if test "${ac_cv_header_stdc+set}" = set; then
5883 $as_echo_n "(cached) " >&6
5884else
5885 cat >conftest.$ac_ext <<_ACEOF
5886/* confdefs.h. */
5887_ACEOF
5888cat confdefs.h >>conftest.$ac_ext
5889cat >>conftest.$ac_ext <<_ACEOF
5890/* end confdefs.h. */
5891#include <stdlib.h>
5892#include <stdarg.h>
5893#include <string.h>
5894#include <float.h>
5895
5896int
5897main ()
5898{
5899
5900 ;
5901 return 0;
5902}
5903_ACEOF
5904rm -f conftest.$ac_objext
5905if { (ac_try="$ac_compile"
5906case "(($ac_try" in
5907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5908 *) ac_try_echo=$ac_try;;
5909esac
5910eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5911$as_echo "$ac_try_echo") >&5
5912 (eval "$ac_compile") 2>conftest.er1
5913 ac_status=$?
5914 grep -v '^ *+' conftest.er1 >conftest.err
5915 rm -f conftest.er1
5916 cat conftest.err >&5
5917 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5918 (exit $ac_status); } && {
5919 test -z "$ac_c_werror_flag" ||
5920 test ! -s conftest.err
5921 } && test -s conftest.$ac_objext; then
5922 ac_cv_header_stdc=yes
5923else
5924 $as_echo "$as_me: failed program was:" >&5
5925sed 's/^/| /' conftest.$ac_ext >&5
5926
5927 ac_cv_header_stdc=no
5928fi
5929
5930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5931
5932if test $ac_cv_header_stdc = yes; then
5933 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5934 cat >conftest.$ac_ext <<_ACEOF
5935/* confdefs.h. */
5936_ACEOF
5937cat confdefs.h >>conftest.$ac_ext
5938cat >>conftest.$ac_ext <<_ACEOF
5939/* end confdefs.h. */
5940#include <string.h>
5941
5942_ACEOF
5943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5944 $EGREP "memchr" >/dev/null 2>&1; then
5945 :
5946else
5947 ac_cv_header_stdc=no
5948fi
5949rm -f conftest*
5950
5951fi
5952
5953if test $ac_cv_header_stdc = yes; then
5954 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5955 cat >conftest.$ac_ext <<_ACEOF
5956/* confdefs.h. */
5957_ACEOF
5958cat confdefs.h >>conftest.$ac_ext
5959cat >>conftest.$ac_ext <<_ACEOF
5960/* end confdefs.h. */
5961#include <stdlib.h>
5962
5963_ACEOF
5964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5965 $EGREP "free" >/dev/null 2>&1; then
5966 :
5967else
5968 ac_cv_header_stdc=no
5969fi
5970rm -f conftest*
5971
5972fi
5973
5974if test $ac_cv_header_stdc = yes; then
5975 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5976 if test "$cross_compiling" = yes; then
5977 :
5978else
5979 cat >conftest.$ac_ext <<_ACEOF
5980/* confdefs.h. */
5981_ACEOF
5982cat confdefs.h >>conftest.$ac_ext
5983cat >>conftest.$ac_ext <<_ACEOF
5984/* end confdefs.h. */
5985#include <ctype.h>
5986#include <stdlib.h>
5987#if ((' ' & 0x0FF) == 0x020)
5988# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5989# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5990#else
5991# define ISLOWER(c) \
5992 (('a' <= (c) && (c) <= 'i') \
5993 || ('j' <= (c) && (c) <= 'r') \
5994 || ('s' <= (c) && (c) <= 'z'))
5995# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5996#endif
5997
5998#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5999int
6000main ()
6001{
6002 int i;
6003 for (i = 0; i < 256; i++)
6004 if (XOR (islower (i), ISLOWER (i))
6005 || toupper (i) != TOUPPER (i))
6006 return 2;
6007 return 0;
6008}
6009_ACEOF
6010rm -f conftest$ac_exeext
6011if { (ac_try="$ac_link"
6012case "(($ac_try" in
6013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6014 *) ac_try_echo=$ac_try;;
6015esac
6016eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6017$as_echo "$ac_try_echo") >&5
6018 (eval "$ac_link") 2>&5
6019 ac_status=$?
6020 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6021 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6022 { (case "(($ac_try" in
6023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6024 *) ac_try_echo=$ac_try;;
6025esac
6026eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6027$as_echo "$ac_try_echo") >&5
6028 (eval "$ac_try") 2>&5
6029 ac_status=$?
6030 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6031 (exit $ac_status); }; }; then
6032 :
6033else
6034 $as_echo "$as_me: program exited with status $ac_status" >&5
6035$as_echo "$as_me: failed program was:" >&5
6036sed 's/^/| /' conftest.$ac_ext >&5
6037
6038( exit $ac_status )
6039ac_cv_header_stdc=no
6040fi
6041rm -rf conftest.dSYM
6042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6043fi
6044
6045
6046fi
6047fi
6048{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6049$as_echo "$ac_cv_header_stdc" >&6; }
6050if test $ac_cv_header_stdc = yes; then
6051
6052cat >>confdefs.h <<\_ACEOF
6053#define STDC_HEADERS 1
6054_ACEOF
6055
6056fi
6057
6058
Martin v. Löwis11437992002-04-12 09:54:03 +00006059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
Anthony Baxter8a560de2004-10-13 15:30:56 +00006094
Martin v. Löwisc3001752005-01-23 09:27:24 +00006095
Martin v. Löwis11017b12006-01-14 18:12:57 +00006096
Thomas Wouters477c8d52006-05-27 19:21:47 +00006097
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006098
6099
6100
6101
6102
6103
6104
6105
Thomas Wouters89f507f2006-12-13 04:49:30 +00006106
Christian Heimes043d6f62008-01-07 17:19:16 +00006107
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006108
6109
Christian Heimesbbe741d2008-03-28 10:53:29 +00006110
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006111
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006112for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6113fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006114ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006115shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006116unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006117sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6118sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006119sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006120sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006121sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006122sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00006123bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006124do
Antoine Pitrou20327222009-05-24 20:39:11 +00006125as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006126if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006127 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6128$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006130 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006131fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006132ac_res=`eval 'as_val=${'$as_ac_Header'}
6133 $as_echo "$as_val"'`
6134 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6135$as_echo "$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006136else
Martin v. Löwis11437992002-04-12 09:54:03 +00006137 # Is the header compilable?
Antoine Pitrou20327222009-05-24 20:39:11 +00006138{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6139$as_echo_n "checking $ac_header usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006140cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006141/* confdefs.h. */
6142_ACEOF
6143cat confdefs.h >>conftest.$ac_ext
6144cat >>conftest.$ac_ext <<_ACEOF
6145/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006146$ac_includes_default
6147#include <$ac_header>
6148_ACEOF
6149rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006150if { (ac_try="$ac_compile"
6151case "(($ac_try" in
6152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6153 *) ac_try_echo=$ac_try;;
6154esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006155eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6156$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006157 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006159 grep -v '^ *+' conftest.er1 >conftest.err
6160 rm -f conftest.er1
6161 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006162 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006163 (exit $ac_status); } && {
6164 test -z "$ac_c_werror_flag" ||
6165 test ! -s conftest.err
6166 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006167 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00006168else
Antoine Pitrou20327222009-05-24 20:39:11 +00006169 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006170sed 's/^/| /' conftest.$ac_ext >&5
6171
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006172 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006174
6175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00006176{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6177$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006178
6179# Is the header present?
Antoine Pitrou20327222009-05-24 20:39:11 +00006180{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6181$as_echo_n "checking $ac_header presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006182cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006183/* confdefs.h. */
6184_ACEOF
6185cat confdefs.h >>conftest.$ac_ext
6186cat >>conftest.$ac_ext <<_ACEOF
6187/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006188#include <$ac_header>
6189_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006190if { (ac_try="$ac_cpp conftest.$ac_ext"
6191case "(($ac_try" in
6192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6193 *) ac_try_echo=$ac_try;;
6194esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006195eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6196$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006197 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006198 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006199 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00006200 rm -f conftest.er1
6201 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006202 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203 (exit $ac_status); } >/dev/null && {
6204 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6205 test ! -s conftest.err
6206 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006207 ac_header_preproc=yes
6208else
Antoine Pitrou20327222009-05-24 20:39:11 +00006209 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006210sed 's/^/| /' conftest.$ac_ext >&5
6211
Martin v. Löwis11437992002-04-12 09:54:03 +00006212 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006214
Martin v. Löwis11437992002-04-12 09:54:03 +00006215rm -f conftest.err conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00006216{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6217$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006218
6219# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006220case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6221 yes:no: )
Antoine Pitrou20327222009-05-24 20:39:11 +00006222 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6223$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6224 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6225$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006226 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006227 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006228 no:yes:* )
Antoine Pitrou20327222009-05-24 20:39:11 +00006229 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6230$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6231 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6232$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6233 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6234$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6235 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6236$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6237 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6238$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6239 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6240$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006241 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006242## -------------------------------------- ##
6243## Report this to http://bugs.python.org/ ##
6244## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006245_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006247 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00006248esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006249{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6250$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006252 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006253else
Skip Montanarof0d5f792004-08-15 14:08:23 +00006254 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006255fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006256ac_res=`eval 'as_val=${'$as_ac_Header'}
6257 $as_echo "$as_val"'`
6258 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6259$as_echo "$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006260
6261fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006262as_val=`eval 'as_val=${'$as_ac_Header'}
6263 $as_echo "$as_val"'`
6264 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006265 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00006266#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006267_ACEOF
6268
6269fi
6270
Guido van Rossum627b2d71993-12-24 10:39:16 +00006271done
6272
Martin v. Löwis11437992002-04-12 09:54:03 +00006273
6274
6275
6276
6277
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006278ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006279for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Antoine Pitrou20327222009-05-24 20:39:11 +00006280 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6281{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
6282$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006283if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006284 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006285else
Martin v. Löwis11437992002-04-12 09:54:03 +00006286 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006287/* confdefs.h. */
6288_ACEOF
6289cat confdefs.h >>conftest.$ac_ext
6290cat >>conftest.$ac_ext <<_ACEOF
6291/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006292#include <sys/types.h>
6293#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006294
Martin v. Löwis11437992002-04-12 09:54:03 +00006295int
6296main ()
6297{
6298if ((DIR *) 0)
6299return 0;
6300 ;
6301 return 0;
6302}
6303_ACEOF
6304rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006305if { (ac_try="$ac_compile"
6306case "(($ac_try" in
6307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6308 *) ac_try_echo=$ac_try;;
6309esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006310eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6311$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006312 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006314 grep -v '^ *+' conftest.er1 >conftest.err
6315 rm -f conftest.er1
6316 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006317 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006318 (exit $ac_status); } && {
6319 test -z "$ac_c_werror_flag" ||
6320 test ! -s conftest.err
6321 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006322 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006323else
Antoine Pitrou20327222009-05-24 20:39:11 +00006324 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006325sed 's/^/| /' conftest.$ac_ext >&5
6326
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006327 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006328fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006329
6330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006331fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006332ac_res=`eval 'as_val=${'$as_ac_Header'}
6333 $as_echo "$as_val"'`
6334 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6335$as_echo "$ac_res" >&6; }
6336as_val=`eval 'as_val=${'$as_ac_Header'}
6337 $as_echo "$as_val"'`
6338 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006339 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00006340#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006341_ACEOF
6342
6343ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006344fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006345
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006346done
6347# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6348if test $ac_header_dirent = dirent.h; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006349 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6350$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006351if test "${ac_cv_search_opendir+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006352 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006353else
Martin v. Löwis11437992002-04-12 09:54:03 +00006354 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006355cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006356/* confdefs.h. */
6357_ACEOF
6358cat confdefs.h >>conftest.$ac_ext
6359cat >>conftest.$ac_ext <<_ACEOF
6360/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006362/* Override any GCC internal prototype to avoid an error.
6363 Use char because int might match the return type of a GCC
6364 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006365#ifdef __cplusplus
6366extern "C"
6367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006368char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006369int
6370main ()
6371{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006372return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006373 ;
6374 return 0;
6375}
6376_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006377for ac_lib in '' dir; do
6378 if test -z "$ac_lib"; then
6379 ac_res="none required"
6380 else
6381 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006382 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006383 fi
6384 rm -f conftest.$ac_objext conftest$ac_exeext
6385if { (ac_try="$ac_link"
6386case "(($ac_try" in
6387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6388 *) ac_try_echo=$ac_try;;
6389esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006390eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6391$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006392 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006393 ac_status=$?
6394 grep -v '^ *+' conftest.er1 >conftest.err
6395 rm -f conftest.er1
6396 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006397 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006398 (exit $ac_status); } && {
6399 test -z "$ac_c_werror_flag" ||
6400 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +00006401 } && test -s conftest$ac_exeext && {
6402 test "$cross_compiling" = yes ||
6403 $as_test_x conftest$ac_exeext
6404 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006405 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006406else
Antoine Pitrou20327222009-05-24 20:39:11 +00006407 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006408sed 's/^/| /' conftest.$ac_ext >&5
6409
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006410
Thomas Wouters477c8d52006-05-27 19:21:47 +00006411fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006412
Antoine Pitrou20327222009-05-24 20:39:11 +00006413rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006414rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6415 conftest$ac_exeext
6416 if test "${ac_cv_search_opendir+set}" = set; then
6417 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006419done
6420if test "${ac_cv_search_opendir+set}" = set; then
6421 :
6422else
6423 ac_cv_search_opendir=no
6424fi
6425rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006426LIBS=$ac_func_search_save_LIBS
6427fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006428{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6429$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006430ac_res=$ac_cv_search_opendir
6431if test "$ac_res" != no; then
6432 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006433
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006434fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006435
Michael W. Hudson54241132001-12-07 15:38:26 +00006436else
Antoine Pitrou20327222009-05-24 20:39:11 +00006437 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6438$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006439if test "${ac_cv_search_opendir+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006440 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006441else
6442 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006443cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006444/* confdefs.h. */
6445_ACEOF
6446cat confdefs.h >>conftest.$ac_ext
6447cat >>conftest.$ac_ext <<_ACEOF
6448/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006449
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006450/* Override any GCC internal prototype to avoid an error.
6451 Use char because int might match the return type of a GCC
6452 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006453#ifdef __cplusplus
6454extern "C"
6455#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006456char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006457int
6458main ()
6459{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006460return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006461 ;
6462 return 0;
6463}
6464_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006465for ac_lib in '' x; do
6466 if test -z "$ac_lib"; then
6467 ac_res="none required"
6468 else
6469 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006470 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006471 fi
6472 rm -f conftest.$ac_objext conftest$ac_exeext
6473if { (ac_try="$ac_link"
6474case "(($ac_try" in
6475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6476 *) ac_try_echo=$ac_try;;
6477esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006478eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6479$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006480 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006481 ac_status=$?
6482 grep -v '^ *+' conftest.er1 >conftest.err
6483 rm -f conftest.er1
6484 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006485 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006486 (exit $ac_status); } && {
6487 test -z "$ac_c_werror_flag" ||
6488 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +00006489 } && test -s conftest$ac_exeext && {
6490 test "$cross_compiling" = yes ||
6491 $as_test_x conftest$ac_exeext
6492 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006493 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006494else
Antoine Pitrou20327222009-05-24 20:39:11 +00006495 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006496sed 's/^/| /' conftest.$ac_ext >&5
6497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006498
Thomas Wouters477c8d52006-05-27 19:21:47 +00006499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006500
Antoine Pitrou20327222009-05-24 20:39:11 +00006501rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006502rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6503 conftest$ac_exeext
6504 if test "${ac_cv_search_opendir+set}" = set; then
6505 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006507done
6508if test "${ac_cv_search_opendir+set}" = set; then
6509 :
6510else
6511 ac_cv_search_opendir=no
6512fi
6513rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006514LIBS=$ac_func_search_save_LIBS
6515fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006516{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6517$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006518ac_res=$ac_cv_search_opendir
6519if test "$ac_res" != no; then
6520 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006521
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006522fi
6523
6524fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006525
Antoine Pitrou20327222009-05-24 20:39:11 +00006526{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6527$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006528if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006529 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006530else
6531 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006532/* confdefs.h. */
6533_ACEOF
6534cat confdefs.h >>conftest.$ac_ext
6535cat >>conftest.$ac_ext <<_ACEOF
6536/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006537#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006538int
6539main ()
6540{
6541return makedev(0, 0);
6542 ;
6543 return 0;
6544}
6545_ACEOF
6546rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006547if { (ac_try="$ac_link"
6548case "(($ac_try" in
6549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6550 *) ac_try_echo=$ac_try;;
6551esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006552eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6553$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006554 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006556 grep -v '^ *+' conftest.er1 >conftest.err
6557 rm -f conftest.er1
6558 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006559 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006560 (exit $ac_status); } && {
6561 test -z "$ac_c_werror_flag" ||
6562 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +00006563 } && test -s conftest$ac_exeext && {
6564 test "$cross_compiling" = yes ||
6565 $as_test_x conftest$ac_exeext
6566 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006567 ac_cv_header_sys_types_h_makedev=yes
6568else
Antoine Pitrou20327222009-05-24 20:39:11 +00006569 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006570sed 's/^/| /' conftest.$ac_ext >&5
6571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006572 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006574
Antoine Pitrou20327222009-05-24 20:39:11 +00006575rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006577 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006578
6579fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006580{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6581$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006582
6583if test $ac_cv_header_sys_types_h_makedev = no; then
6584if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006585 { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6586$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006587if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006588 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006589fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006590{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6591$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006592else
6593 # Is the header compilable?
Antoine Pitrou20327222009-05-24 20:39:11 +00006594{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6595$as_echo_n "checking sys/mkdev.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006596cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006597/* confdefs.h. */
6598_ACEOF
6599cat confdefs.h >>conftest.$ac_ext
6600cat >>conftest.$ac_ext <<_ACEOF
6601/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006602$ac_includes_default
6603#include <sys/mkdev.h>
6604_ACEOF
6605rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006606if { (ac_try="$ac_compile"
6607case "(($ac_try" in
6608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6609 *) ac_try_echo=$ac_try;;
6610esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006611eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6612$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006613 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006614 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006615 grep -v '^ *+' conftest.er1 >conftest.err
6616 rm -f conftest.er1
6617 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006618 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006619 (exit $ac_status); } && {
6620 test -z "$ac_c_werror_flag" ||
6621 test ! -s conftest.err
6622 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006623 ac_header_compiler=yes
6624else
Antoine Pitrou20327222009-05-24 20:39:11 +00006625 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006626sed 's/^/| /' conftest.$ac_ext >&5
6627
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006629fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006630
6631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00006632{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6633$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006634
6635# Is the header present?
Antoine Pitrou20327222009-05-24 20:39:11 +00006636{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6637$as_echo_n "checking sys/mkdev.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006638cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006639/* confdefs.h. */
6640_ACEOF
6641cat confdefs.h >>conftest.$ac_ext
6642cat >>conftest.$ac_ext <<_ACEOF
6643/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006644#include <sys/mkdev.h>
6645_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646if { (ac_try="$ac_cpp conftest.$ac_ext"
6647case "(($ac_try" in
6648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6649 *) ac_try_echo=$ac_try;;
6650esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006651eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6652$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006653 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006654 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006655 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006656 rm -f conftest.er1
6657 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006658 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006659 (exit $ac_status); } >/dev/null && {
6660 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6661 test ! -s conftest.err
6662 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006663 ac_header_preproc=yes
6664else
Antoine Pitrou20327222009-05-24 20:39:11 +00006665 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006666sed 's/^/| /' conftest.$ac_ext >&5
6667
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006668 ac_header_preproc=no
6669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006670
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006671rm -f conftest.err conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00006672{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6673$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006674
6675# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006676case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6677 yes:no: )
Antoine Pitrou20327222009-05-24 20:39:11 +00006678 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6679$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6680 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6681$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006682 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006683 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006684 no:yes:* )
Antoine Pitrou20327222009-05-24 20:39:11 +00006685 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6686$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6687 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6688$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6689 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6690$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6691 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6692$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6693 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6694$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6695 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6696$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006697 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006698## -------------------------------------- ##
6699## Report this to http://bugs.python.org/ ##
6700## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006701_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006702 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006703 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006704esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006705{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6706$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006707if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006708 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006709else
6710 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6711fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006712{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6713$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006714
6715fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006716if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006717
6718cat >>confdefs.h <<\_ACEOF
6719#define MAJOR_IN_MKDEV 1
6720_ACEOF
6721
6722fi
6723
6724
6725
6726 if test $ac_cv_header_sys_mkdev_h = no; then
6727 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006728 { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6729$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006730if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006731 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006732fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006733{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6734$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006735else
6736 # Is the header compilable?
Antoine Pitrou20327222009-05-24 20:39:11 +00006737{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6738$as_echo_n "checking sys/sysmacros.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006739cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006740/* confdefs.h. */
6741_ACEOF
6742cat confdefs.h >>conftest.$ac_ext
6743cat >>conftest.$ac_ext <<_ACEOF
6744/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006745$ac_includes_default
6746#include <sys/sysmacros.h>
6747_ACEOF
6748rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006749if { (ac_try="$ac_compile"
6750case "(($ac_try" in
6751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6752 *) ac_try_echo=$ac_try;;
6753esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006754eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6755$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006758 grep -v '^ *+' conftest.er1 >conftest.err
6759 rm -f conftest.er1
6760 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006761 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006762 (exit $ac_status); } && {
6763 test -z "$ac_c_werror_flag" ||
6764 test ! -s conftest.err
6765 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006766 ac_header_compiler=yes
6767else
Antoine Pitrou20327222009-05-24 20:39:11 +00006768 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006769sed 's/^/| /' conftest.$ac_ext >&5
6770
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006772fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006773
6774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00006775{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6776$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006777
6778# Is the header present?
Antoine Pitrou20327222009-05-24 20:39:11 +00006779{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6780$as_echo_n "checking sys/sysmacros.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006781cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006782/* confdefs.h. */
6783_ACEOF
6784cat confdefs.h >>conftest.$ac_ext
6785cat >>conftest.$ac_ext <<_ACEOF
6786/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006787#include <sys/sysmacros.h>
6788_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006789if { (ac_try="$ac_cpp conftest.$ac_ext"
6790case "(($ac_try" in
6791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6792 *) ac_try_echo=$ac_try;;
6793esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006794eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6795$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006796 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006797 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006798 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006799 rm -f conftest.er1
6800 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006801 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006802 (exit $ac_status); } >/dev/null && {
6803 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6804 test ! -s conftest.err
6805 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006806 ac_header_preproc=yes
6807else
Antoine Pitrou20327222009-05-24 20:39:11 +00006808 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006809sed 's/^/| /' conftest.$ac_ext >&5
6810
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006811 ac_header_preproc=no
6812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006813
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006814rm -f conftest.err conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00006815{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6816$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006817
6818# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006819case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6820 yes:no: )
Antoine Pitrou20327222009-05-24 20:39:11 +00006821 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6822$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6823 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6824$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006825 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006826 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006827 no:yes:* )
Antoine Pitrou20327222009-05-24 20:39:11 +00006828 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6829$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6830 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6831$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6832 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6833$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6834 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6835$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6836 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6837$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6838 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6839$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006840 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006841## -------------------------------------- ##
6842## Report this to http://bugs.python.org/ ##
6843## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006844_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006845 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006846 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006847esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006848{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6849$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006850if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006851 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006852else
6853 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6854fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006855{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6856$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006857
6858fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006859if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006860
6861cat >>confdefs.h <<\_ACEOF
6862#define MAJOR_IN_SYSMACROS 1
6863_ACEOF
6864
6865fi
6866
6867
6868 fi
6869fi
6870
Michael W. Hudson54241132001-12-07 15:38:26 +00006871
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006872# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006873
6874for ac_header in term.h
6875do
Antoine Pitrou20327222009-05-24 20:39:11 +00006876as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6877{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6878$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006879if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006880 $as_echo_n "(cached) " >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006881else
6882 cat >conftest.$ac_ext <<_ACEOF
6883/* confdefs.h. */
6884_ACEOF
6885cat confdefs.h >>conftest.$ac_ext
6886cat >>conftest.$ac_ext <<_ACEOF
6887/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006888
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006889#ifdef HAVE_CURSES_H
6890#include <curses.h>
6891#endif
6892
6893
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006894#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006895_ACEOF
6896rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006897if { (ac_try="$ac_compile"
6898case "(($ac_try" in
6899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6900 *) ac_try_echo=$ac_try;;
6901esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006902eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6903$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006904 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006905 ac_status=$?
6906 grep -v '^ *+' conftest.er1 >conftest.err
6907 rm -f conftest.er1
6908 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006909 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006910 (exit $ac_status); } && {
6911 test -z "$ac_c_werror_flag" ||
6912 test ! -s conftest.err
6913 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006914 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006915else
Antoine Pitrou20327222009-05-24 20:39:11 +00006916 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006917sed 's/^/| /' conftest.$ac_ext >&5
6918
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006919 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006920fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006921
6922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006923fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006924ac_res=`eval 'as_val=${'$as_ac_Header'}
6925 $as_echo "$as_val"'`
6926 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6927$as_echo "$ac_res" >&6; }
6928as_val=`eval 'as_val=${'$as_ac_Header'}
6929 $as_echo "$as_val"'`
6930 if test "x$as_val" = x""yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006931 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00006932#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006933_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006934
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006935fi
6936
6937done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006938
6939
Martin v. Löwis11017b12006-01-14 18:12:57 +00006940# On Linux, netlink.h requires asm/types.h
6941
6942for ac_header in linux/netlink.h
6943do
Antoine Pitrou20327222009-05-24 20:39:11 +00006944as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6945{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6946$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006947if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +00006948 $as_echo_n "(cached) " >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006949else
6950 cat >conftest.$ac_ext <<_ACEOF
6951/* confdefs.h. */
6952_ACEOF
6953cat confdefs.h >>conftest.$ac_ext
6954cat >>conftest.$ac_ext <<_ACEOF
6955/* end confdefs.h. */
6956
6957#ifdef HAVE_ASM_TYPES_H
6958#include <asm/types.h>
6959#endif
6960#ifdef HAVE_SYS_SOCKET_H
6961#include <sys/socket.h>
6962#endif
6963
6964
6965#include <$ac_header>
6966_ACEOF
6967rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006968if { (ac_try="$ac_compile"
6969case "(($ac_try" in
6970 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6971 *) ac_try_echo=$ac_try;;
6972esac
Antoine Pitrou20327222009-05-24 20:39:11 +00006973eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6974$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006975 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006976 ac_status=$?
6977 grep -v '^ *+' conftest.er1 >conftest.err
6978 rm -f conftest.er1
6979 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006980 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006981 (exit $ac_status); } && {
6982 test -z "$ac_c_werror_flag" ||
6983 test ! -s conftest.err
6984 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006985 eval "$as_ac_Header=yes"
6986else
Antoine Pitrou20327222009-05-24 20:39:11 +00006987 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006988sed 's/^/| /' conftest.$ac_ext >&5
6989
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006990 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006992
6993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006994fi
Antoine Pitrou20327222009-05-24 20:39:11 +00006995ac_res=`eval 'as_val=${'$as_ac_Header'}
6996 $as_echo "$as_val"'`
6997 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6998$as_echo "$ac_res" >&6; }
6999as_val=`eval 'as_val=${'$as_ac_Header'}
7000 $as_echo "$as_val"'`
7001 if test "x$as_val" = x""yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00007002 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00007003#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007004_ACEOF
7005
7006fi
7007
7008done
7009
7010
Guido van Rossum627b2d71993-12-24 10:39:16 +00007011# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007012was_it_defined=no
Antoine Pitrou20327222009-05-24 20:39:11 +00007013{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
7014$as_echo_n "checking for clock_t in time.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007015cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007016/* confdefs.h. */
7017_ACEOF
7018cat confdefs.h >>conftest.$ac_ext
7019cat >>conftest.$ac_ext <<_ACEOF
7020/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007021#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007022
7023_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007024if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007025 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00007026 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007027else
Martin v. Löwis11437992002-04-12 09:54:03 +00007028
7029
7030cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007031#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00007032_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007033
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007034
Guido van Rossum627b2d71993-12-24 10:39:16 +00007035fi
7036rm -f conftest*
7037
Antoine Pitrou20327222009-05-24 20:39:11 +00007038{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
7039$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007040
Neal Norwitz11690112002-07-30 01:08:28 +00007041# Check whether using makedev requires defining _OSF_SOURCE
Antoine Pitrou20327222009-05-24 20:39:11 +00007042{ $as_echo "$as_me:$LINENO: checking for makedev" >&5
7043$as_echo_n "checking for makedev... " >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007044cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007045/* confdefs.h. */
7046_ACEOF
7047cat confdefs.h >>conftest.$ac_ext
7048cat >>conftest.$ac_ext <<_ACEOF
7049/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007050#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007051int
7052main ()
7053{
7054 makedev(0, 0)
7055 ;
7056 return 0;
7057}
7058_ACEOF
7059rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007060if { (ac_try="$ac_link"
7061case "(($ac_try" in
7062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7063 *) ac_try_echo=$ac_try;;
7064esac
Antoine Pitrou20327222009-05-24 20:39:11 +00007065eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7066$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007067 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007069 grep -v '^ *+' conftest.er1 >conftest.err
7070 rm -f conftest.er1
7071 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007072 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007073 (exit $ac_status); } && {
7074 test -z "$ac_c_werror_flag" ||
7075 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +00007076 } && test -s conftest$ac_exeext && {
7077 test "$cross_compiling" = yes ||
7078 $as_test_x conftest$ac_exeext
7079 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007080 ac_cv_has_makedev=yes
7081else
Antoine Pitrou20327222009-05-24 20:39:11 +00007082 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007083sed 's/^/| /' conftest.$ac_ext >&5
7084
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007085 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007087
Antoine Pitrou20327222009-05-24 20:39:11 +00007088rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007090 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007091if test "$ac_cv_has_makedev" = "no"; then
7092 # we didn't link, try if _OSF_SOURCE will allow us to link
7093 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007094/* confdefs.h. */
7095_ACEOF
7096cat confdefs.h >>conftest.$ac_ext
7097cat >>conftest.$ac_ext <<_ACEOF
7098/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007099
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007100#define _OSF_SOURCE 1
7101#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007102
Neal Norwitz11690112002-07-30 01:08:28 +00007103int
7104main ()
7105{
7106 makedev(0, 0)
7107 ;
7108 return 0;
7109}
7110_ACEOF
7111rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007112if { (ac_try="$ac_link"
7113case "(($ac_try" in
7114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7115 *) ac_try_echo=$ac_try;;
7116esac
Antoine Pitrou20327222009-05-24 20:39:11 +00007117eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7118$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007119 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007121 grep -v '^ *+' conftest.er1 >conftest.err
7122 rm -f conftest.er1
7123 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007124 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007125 (exit $ac_status); } && {
7126 test -z "$ac_c_werror_flag" ||
7127 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +00007128 } && test -s conftest$ac_exeext && {
7129 test "$cross_compiling" = yes ||
7130 $as_test_x conftest$ac_exeext
7131 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007132 ac_cv_has_makedev=yes
7133else
Antoine Pitrou20327222009-05-24 20:39:11 +00007134 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007135sed 's/^/| /' conftest.$ac_ext >&5
7136
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007137 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007139
Antoine Pitrou20327222009-05-24 20:39:11 +00007140rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007142 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007143 if test "$ac_cv_has_makedev" = "yes"; then
7144
7145cat >>confdefs.h <<\_ACEOF
7146#define _OSF_SOURCE 1
7147_ACEOF
7148
7149 fi
7150fi
Antoine Pitrou20327222009-05-24 20:39:11 +00007151{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
7152$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007153if test "$ac_cv_has_makedev" = "yes"; then
7154
7155cat >>confdefs.h <<\_ACEOF
7156#define HAVE_MAKEDEV 1
7157_ACEOF
7158
7159fi
7160
Martin v. Löwis399a6892002-10-04 10:22:02 +00007161# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7162# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7163# defined, but the compiler does not support pragma redefine_extname,
7164# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7165# structures (such as rlimit64) without declaring them. As a
7166# work-around, disable LFS on such configurations
7167
7168use_lfs=yes
Antoine Pitrou20327222009-05-24 20:39:11 +00007169{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
7170$as_echo_n "checking Solaris LFS bug... " >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007171cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007172/* confdefs.h. */
7173_ACEOF
7174cat confdefs.h >>conftest.$ac_ext
7175cat >>conftest.$ac_ext <<_ACEOF
7176/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007177
7178#define _LARGEFILE_SOURCE 1
7179#define _FILE_OFFSET_BITS 64
7180#include <sys/resource.h>
7181
Martin v. Löwis399a6892002-10-04 10:22:02 +00007182int
7183main ()
7184{
7185struct rlimit foo;
7186 ;
7187 return 0;
7188}
7189_ACEOF
7190rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007191if { (ac_try="$ac_compile"
7192case "(($ac_try" in
7193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7194 *) ac_try_echo=$ac_try;;
7195esac
Antoine Pitrou20327222009-05-24 20:39:11 +00007196eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7197$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00007199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007200 grep -v '^ *+' conftest.er1 >conftest.err
7201 rm -f conftest.er1
7202 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007203 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007204 (exit $ac_status); } && {
7205 test -z "$ac_c_werror_flag" ||
7206 test ! -s conftest.err
7207 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00007208 sol_lfs_bug=no
7209else
Antoine Pitrou20327222009-05-24 20:39:11 +00007210 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007211sed 's/^/| /' conftest.$ac_ext >&5
7212
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007213 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007214fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007215
7216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +00007217{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
7218$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007219if test "$sol_lfs_bug" = "yes"; then
7220 use_lfs=no
7221fi
7222
7223if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007224# Two defines needed to enable largefile support on various platforms
7225# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00007226
Martin v. Löwis11437992002-04-12 09:54:03 +00007227cat >>confdefs.h <<\_ACEOF
7228#define _LARGEFILE_SOURCE 1
7229_ACEOF
7230
7231
7232cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007233#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00007234_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007235
Martin v. Löwis399a6892002-10-04 10:22:02 +00007236fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007237
Guido van Rossum84e7b241996-08-19 21:59:00 +00007238# Add some code to confdefs.h so that the test for off_t works on SCO
7239cat >> confdefs.h <<\EOF
7240#if defined(SCO_DS)
7241#undef _OFF_T
7242#endif
7243EOF
7244
Guido van Rossumef2255b2000-03-10 22:30:29 +00007245# Type availability checks
Antoine Pitrou20327222009-05-24 20:39:11 +00007246{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5
7247$as_echo_n "checking for mode_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007248if test "${ac_cv_type_mode_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007249 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007250else
Antoine Pitrou20327222009-05-24 20:39:11 +00007251 ac_cv_type_mode_t=no
7252cat >conftest.$ac_ext <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +00007253/* confdefs.h. */
7254_ACEOF
7255cat confdefs.h >>conftest.$ac_ext
7256cat >>conftest.$ac_ext <<_ACEOF
7257/* end confdefs.h. */
7258$ac_includes_default
7259int
7260main ()
7261{
Antoine Pitrou20327222009-05-24 20:39:11 +00007262if (sizeof (mode_t))
7263 return 0;
Antoine Pitroub52ec782009-01-25 16:34:23 +00007264 ;
7265 return 0;
7266}
7267_ACEOF
7268rm -f conftest.$ac_objext
7269if { (ac_try="$ac_compile"
7270case "(($ac_try" in
7271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7272 *) ac_try_echo=$ac_try;;
7273esac
Antoine Pitrou20327222009-05-24 20:39:11 +00007274eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7275$as_echo "$ac_try_echo") >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007276 (eval "$ac_compile") 2>conftest.er1
7277 ac_status=$?
7278 grep -v '^ *+' conftest.er1 >conftest.err
7279 rm -f conftest.er1
7280 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007281 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007282 (exit $ac_status); } && {
7283 test -z "$ac_c_werror_flag" ||
7284 test ! -s conftest.err
7285 } && test -s conftest.$ac_objext; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007286 cat >conftest.$ac_ext <<_ACEOF
7287/* confdefs.h. */
7288_ACEOF
7289cat confdefs.h >>conftest.$ac_ext
7290cat >>conftest.$ac_ext <<_ACEOF
7291/* end confdefs.h. */
7292$ac_includes_default
7293int
7294main ()
7295{
7296if (sizeof ((mode_t)))
7297 return 0;
7298 ;
7299 return 0;
7300}
7301_ACEOF
7302rm -f conftest.$ac_objext
7303if { (ac_try="$ac_compile"
7304case "(($ac_try" in
7305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7306 *) ac_try_echo=$ac_try;;
7307esac
7308eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7309$as_echo "$ac_try_echo") >&5
7310 (eval "$ac_compile") 2>conftest.er1
7311 ac_status=$?
7312 grep -v '^ *+' conftest.er1 >conftest.err
7313 rm -f conftest.er1
7314 cat conftest.err >&5
7315 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7316 (exit $ac_status); } && {
7317 test -z "$ac_c_werror_flag" ||
7318 test ! -s conftest.err
7319 } && test -s conftest.$ac_objext; then
7320 :
Jack Jansendd19cf82001-12-06 22:36:17 +00007321else
Antoine Pitrou20327222009-05-24 20:39:11 +00007322 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007323sed 's/^/| /' conftest.$ac_ext >&5
7324
Antoine Pitrou20327222009-05-24 20:39:11 +00007325 ac_cv_type_mode_t=yes
7326fi
7327
7328rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7329else
7330 $as_echo "$as_me: failed program was:" >&5
7331sed 's/^/| /' conftest.$ac_ext >&5
7332
7333
Jack Jansendd19cf82001-12-06 22:36:17 +00007334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007335
7336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007337fi
Antoine Pitrou20327222009-05-24 20:39:11 +00007338{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
7339$as_echo "$ac_cv_type_mode_t" >&6; }
7340if test "x$ac_cv_type_mode_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007341 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007342else
Martin v. Löwis11437992002-04-12 09:54:03 +00007343
7344cat >>confdefs.h <<_ACEOF
7345#define mode_t int
7346_ACEOF
7347
7348fi
7349
Antoine Pitrou20327222009-05-24 20:39:11 +00007350{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
7351$as_echo_n "checking for off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007352if test "${ac_cv_type_off_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007353 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007354else
Antoine Pitrou20327222009-05-24 20:39:11 +00007355 ac_cv_type_off_t=no
7356cat >conftest.$ac_ext <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +00007357/* confdefs.h. */
7358_ACEOF
7359cat confdefs.h >>conftest.$ac_ext
7360cat >>conftest.$ac_ext <<_ACEOF
7361/* end confdefs.h. */
7362$ac_includes_default
7363int
7364main ()
7365{
Antoine Pitrou20327222009-05-24 20:39:11 +00007366if (sizeof (off_t))
7367 return 0;
Antoine Pitroub52ec782009-01-25 16:34:23 +00007368 ;
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
Antoine Pitrou20327222009-05-24 20:39:11 +00007378eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7379$as_echo "$ac_try_echo") >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007380 (eval "$ac_compile") 2>conftest.er1
7381 ac_status=$?
7382 grep -v '^ *+' conftest.er1 >conftest.err
7383 rm -f conftest.er1
7384 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007385 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007386 (exit $ac_status); } && {
7387 test -z "$ac_c_werror_flag" ||
7388 test ! -s conftest.err
7389 } && test -s conftest.$ac_objext; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007390 cat >conftest.$ac_ext <<_ACEOF
7391/* confdefs.h. */
7392_ACEOF
7393cat confdefs.h >>conftest.$ac_ext
7394cat >>conftest.$ac_ext <<_ACEOF
7395/* end confdefs.h. */
7396$ac_includes_default
7397int
7398main ()
7399{
7400if (sizeof ((off_t)))
7401 return 0;
7402 ;
7403 return 0;
7404}
7405_ACEOF
7406rm -f conftest.$ac_objext
7407if { (ac_try="$ac_compile"
7408case "(($ac_try" in
7409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7410 *) ac_try_echo=$ac_try;;
7411esac
7412eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7413$as_echo "$ac_try_echo") >&5
7414 (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
7419 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7420 (exit $ac_status); } && {
7421 test -z "$ac_c_werror_flag" ||
7422 test ! -s conftest.err
7423 } && test -s conftest.$ac_objext; then
7424 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007425else
Antoine Pitrou20327222009-05-24 20:39:11 +00007426 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007427sed 's/^/| /' conftest.$ac_ext >&5
7428
Antoine Pitrou20327222009-05-24 20:39:11 +00007429 ac_cv_type_off_t=yes
7430fi
7431
7432rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7433else
7434 $as_echo "$as_me: failed program was:" >&5
7435sed 's/^/| /' conftest.$ac_ext >&5
7436
7437
Guido van Rossum627b2d71993-12-24 10:39:16 +00007438fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007439
7440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007441fi
Antoine Pitrou20327222009-05-24 20:39:11 +00007442{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7443$as_echo "$ac_cv_type_off_t" >&6; }
7444if test "x$ac_cv_type_off_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007445 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007446else
Martin v. Löwis11437992002-04-12 09:54:03 +00007447
7448cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007449#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007450_ACEOF
7451
7452fi
7453
Antoine Pitrou20327222009-05-24 20:39:11 +00007454{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
7455$as_echo_n "checking for pid_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007456if test "${ac_cv_type_pid_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007457 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007458else
Antoine Pitrou20327222009-05-24 20:39:11 +00007459 ac_cv_type_pid_t=no
7460cat >conftest.$ac_ext <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +00007461/* confdefs.h. */
7462_ACEOF
7463cat confdefs.h >>conftest.$ac_ext
7464cat >>conftest.$ac_ext <<_ACEOF
7465/* end confdefs.h. */
7466$ac_includes_default
7467int
7468main ()
7469{
Antoine Pitrou20327222009-05-24 20:39:11 +00007470if (sizeof (pid_t))
7471 return 0;
Antoine Pitroub52ec782009-01-25 16:34:23 +00007472 ;
7473 return 0;
7474}
7475_ACEOF
7476rm -f conftest.$ac_objext
7477if { (ac_try="$ac_compile"
7478case "(($ac_try" in
7479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7480 *) ac_try_echo=$ac_try;;
7481esac
Antoine Pitrou20327222009-05-24 20:39:11 +00007482eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7483$as_echo "$ac_try_echo") >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007484 (eval "$ac_compile") 2>conftest.er1
7485 ac_status=$?
7486 grep -v '^ *+' conftest.er1 >conftest.err
7487 rm -f conftest.er1
7488 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007489 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007490 (exit $ac_status); } && {
7491 test -z "$ac_c_werror_flag" ||
7492 test ! -s conftest.err
7493 } && test -s conftest.$ac_objext; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007494 cat >conftest.$ac_ext <<_ACEOF
7495/* confdefs.h. */
7496_ACEOF
7497cat confdefs.h >>conftest.$ac_ext
7498cat >>conftest.$ac_ext <<_ACEOF
7499/* end confdefs.h. */
7500$ac_includes_default
7501int
7502main ()
7503{
7504if (sizeof ((pid_t)))
7505 return 0;
7506 ;
7507 return 0;
7508}
7509_ACEOF
7510rm -f conftest.$ac_objext
7511if { (ac_try="$ac_compile"
7512case "(($ac_try" in
7513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7514 *) ac_try_echo=$ac_try;;
7515esac
7516eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7517$as_echo "$ac_try_echo") >&5
7518 (eval "$ac_compile") 2>conftest.er1
7519 ac_status=$?
7520 grep -v '^ *+' conftest.er1 >conftest.err
7521 rm -f conftest.er1
7522 cat conftest.err >&5
7523 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7524 (exit $ac_status); } && {
7525 test -z "$ac_c_werror_flag" ||
7526 test ! -s conftest.err
7527 } && test -s conftest.$ac_objext; then
7528 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007529else
Antoine Pitrou20327222009-05-24 20:39:11 +00007530 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007531sed 's/^/| /' conftest.$ac_ext >&5
7532
Antoine Pitrou20327222009-05-24 20:39:11 +00007533 ac_cv_type_pid_t=yes
7534fi
7535
7536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7537else
7538 $as_echo "$as_me: failed program was:" >&5
7539sed 's/^/| /' conftest.$ac_ext >&5
7540
7541
Guido van Rossum627b2d71993-12-24 10:39:16 +00007542fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007543
7544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007545fi
Antoine Pitrou20327222009-05-24 20:39:11 +00007546{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7547$as_echo "$ac_cv_type_pid_t" >&6; }
7548if test "x$ac_cv_type_pid_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007549 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007550else
Martin v. Löwis11437992002-04-12 09:54:03 +00007551
7552cat >>confdefs.h <<_ACEOF
7553#define pid_t int
7554_ACEOF
7555
7556fi
7557
Antoine Pitrou20327222009-05-24 20:39:11 +00007558{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7559$as_echo_n "checking return type of signal handlers... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007560if test "${ac_cv_type_signal+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007561 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007562else
7563 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007564/* confdefs.h. */
7565_ACEOF
7566cat confdefs.h >>conftest.$ac_ext
7567cat >>conftest.$ac_ext <<_ACEOF
7568/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007569#include <sys/types.h>
7570#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007571
Martin v. Löwis11437992002-04-12 09:54:03 +00007572int
7573main ()
7574{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007575return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007576 ;
7577 return 0;
7578}
7579_ACEOF
7580rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007581if { (ac_try="$ac_compile"
7582case "(($ac_try" in
7583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7584 *) ac_try_echo=$ac_try;;
7585esac
Antoine Pitrou20327222009-05-24 20:39:11 +00007586eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7587$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007590 grep -v '^ *+' conftest.er1 >conftest.err
7591 rm -f conftest.er1
7592 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007593 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007594 (exit $ac_status); } && {
7595 test -z "$ac_c_werror_flag" ||
7596 test ! -s conftest.err
7597 } && test -s conftest.$ac_objext; then
7598 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007599else
Antoine Pitrou20327222009-05-24 20:39:11 +00007600 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007601sed 's/^/| /' conftest.$ac_ext >&5
7602
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007603 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007605
7606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007607fi
Antoine Pitrou20327222009-05-24 20:39:11 +00007608{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7609$as_echo "$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007610
Martin v. Löwis11437992002-04-12 09:54:03 +00007611cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007612#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007613_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007614
Michael W. Hudson54241132001-12-07 15:38:26 +00007615
Antoine Pitrou20327222009-05-24 20:39:11 +00007616{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
7617$as_echo_n "checking for size_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007618if test "${ac_cv_type_size_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007619 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007620else
Antoine Pitrou20327222009-05-24 20:39:11 +00007621 ac_cv_type_size_t=no
7622cat >conftest.$ac_ext <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +00007623/* confdefs.h. */
7624_ACEOF
7625cat confdefs.h >>conftest.$ac_ext
7626cat >>conftest.$ac_ext <<_ACEOF
7627/* end confdefs.h. */
7628$ac_includes_default
7629int
7630main ()
7631{
Antoine Pitrou20327222009-05-24 20:39:11 +00007632if (sizeof (size_t))
7633 return 0;
Antoine Pitroub52ec782009-01-25 16:34:23 +00007634 ;
7635 return 0;
7636}
7637_ACEOF
7638rm -f conftest.$ac_objext
7639if { (ac_try="$ac_compile"
7640case "(($ac_try" in
7641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7642 *) ac_try_echo=$ac_try;;
7643esac
Antoine Pitrou20327222009-05-24 20:39:11 +00007644eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7645$as_echo "$ac_try_echo") >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007646 (eval "$ac_compile") 2>conftest.er1
7647 ac_status=$?
7648 grep -v '^ *+' conftest.er1 >conftest.err
7649 rm -f conftest.er1
7650 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007651 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007652 (exit $ac_status); } && {
7653 test -z "$ac_c_werror_flag" ||
7654 test ! -s conftest.err
7655 } && test -s conftest.$ac_objext; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007656 cat >conftest.$ac_ext <<_ACEOF
7657/* confdefs.h. */
7658_ACEOF
7659cat confdefs.h >>conftest.$ac_ext
7660cat >>conftest.$ac_ext <<_ACEOF
7661/* end confdefs.h. */
7662$ac_includes_default
7663int
7664main ()
7665{
7666if (sizeof ((size_t)))
7667 return 0;
7668 ;
7669 return 0;
7670}
7671_ACEOF
7672rm -f conftest.$ac_objext
7673if { (ac_try="$ac_compile"
7674case "(($ac_try" in
7675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7676 *) ac_try_echo=$ac_try;;
7677esac
7678eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7679$as_echo "$ac_try_echo") >&5
7680 (eval "$ac_compile") 2>conftest.er1
7681 ac_status=$?
7682 grep -v '^ *+' conftest.er1 >conftest.err
7683 rm -f conftest.er1
7684 cat conftest.err >&5
7685 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7686 (exit $ac_status); } && {
7687 test -z "$ac_c_werror_flag" ||
7688 test ! -s conftest.err
7689 } && test -s conftest.$ac_objext; then
7690 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007691else
Antoine Pitrou20327222009-05-24 20:39:11 +00007692 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007693sed 's/^/| /' conftest.$ac_ext >&5
7694
Antoine Pitrou20327222009-05-24 20:39:11 +00007695 ac_cv_type_size_t=yes
7696fi
7697
7698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7699else
7700 $as_echo "$as_me: failed program was:" >&5
7701sed 's/^/| /' conftest.$ac_ext >&5
7702
7703
Guido van Rossum627b2d71993-12-24 10:39:16 +00007704fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007705
7706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007707fi
Antoine Pitrou20327222009-05-24 20:39:11 +00007708{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7709$as_echo "$ac_cv_type_size_t" >&6; }
7710if test "x$ac_cv_type_size_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007711 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007712else
Martin v. Löwis11437992002-04-12 09:54:03 +00007713
7714cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007715#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007716_ACEOF
7717
7718fi
7719
Antoine Pitrou20327222009-05-24 20:39:11 +00007720{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7721$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007722if test "${ac_cv_type_uid_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007724else
7725 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007726/* confdefs.h. */
7727_ACEOF
7728cat confdefs.h >>conftest.$ac_ext
7729cat >>conftest.$ac_ext <<_ACEOF
7730/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007731#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007732
7733_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007734if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007735 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007736 ac_cv_type_uid_t=yes
7737else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007738 ac_cv_type_uid_t=no
7739fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007740rm -f conftest*
7741
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007742fi
Antoine Pitrou20327222009-05-24 20:39:11 +00007743{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7744$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007745if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007746
Martin v. Löwis11437992002-04-12 09:54:03 +00007747cat >>confdefs.h <<\_ACEOF
7748#define uid_t int
7749_ACEOF
7750
7751
7752cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007753#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007754_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007755
7756fi
7757
Mark Dickinsonbd792642009-03-18 20:06:12 +00007758
Antoine Pitrou20327222009-05-24 20:39:11 +00007759 { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
7760$as_echo_n "checking for uint32_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007761if test "${ac_cv_c_uint32_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007762 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007763else
7764 ac_cv_c_uint32_t=no
7765 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7766 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7767 cat >conftest.$ac_ext <<_ACEOF
7768/* confdefs.h. */
7769_ACEOF
7770cat confdefs.h >>conftest.$ac_ext
7771cat >>conftest.$ac_ext <<_ACEOF
7772/* end confdefs.h. */
7773$ac_includes_default
7774int
7775main ()
7776{
7777static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7778test_array [0] = 0
7779
7780 ;
7781 return 0;
7782}
7783_ACEOF
7784rm -f conftest.$ac_objext
7785if { (ac_try="$ac_compile"
7786case "(($ac_try" in
7787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7788 *) ac_try_echo=$ac_try;;
7789esac
Antoine Pitrou20327222009-05-24 20:39:11 +00007790eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7791$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007792 (eval "$ac_compile") 2>conftest.er1
7793 ac_status=$?
7794 grep -v '^ *+' conftest.er1 >conftest.err
7795 rm -f conftest.er1
7796 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007797 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007798 (exit $ac_status); } && {
7799 test -z "$ac_c_werror_flag" ||
7800 test ! -s conftest.err
7801 } && test -s conftest.$ac_objext; then
7802 case $ac_type in
7803 uint32_t) ac_cv_c_uint32_t=yes ;;
7804 *) ac_cv_c_uint32_t=$ac_type ;;
7805esac
7806
7807else
Antoine Pitrou20327222009-05-24 20:39:11 +00007808 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007809sed 's/^/| /' conftest.$ac_ext >&5
7810
7811
7812fi
7813
7814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7815 test "$ac_cv_c_uint32_t" != no && break
7816 done
7817fi
Antoine Pitrou20327222009-05-24 20:39:11 +00007818{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7819$as_echo "$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007820 case $ac_cv_c_uint32_t in #(
7821 no|yes) ;; #(
7822 *)
7823
7824cat >>confdefs.h <<\_ACEOF
7825#define _UINT32_T 1
7826_ACEOF
7827
7828
7829cat >>confdefs.h <<_ACEOF
7830#define uint32_t $ac_cv_c_uint32_t
7831_ACEOF
7832;;
7833 esac
7834
7835
Antoine Pitrou20327222009-05-24 20:39:11 +00007836 { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5
7837$as_echo_n "checking for uint64_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007838if test "${ac_cv_c_uint64_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007839 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007840else
7841 ac_cv_c_uint64_t=no
7842 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7843 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7844 cat >conftest.$ac_ext <<_ACEOF
7845/* confdefs.h. */
7846_ACEOF
7847cat confdefs.h >>conftest.$ac_ext
7848cat >>conftest.$ac_ext <<_ACEOF
7849/* end confdefs.h. */
7850$ac_includes_default
7851int
7852main ()
7853{
7854static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7855test_array [0] = 0
7856
7857 ;
7858 return 0;
7859}
7860_ACEOF
7861rm -f conftest.$ac_objext
7862if { (ac_try="$ac_compile"
7863case "(($ac_try" in
7864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7865 *) ac_try_echo=$ac_try;;
7866esac
Antoine Pitrou20327222009-05-24 20:39:11 +00007867eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7868$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007869 (eval "$ac_compile") 2>conftest.er1
7870 ac_status=$?
7871 grep -v '^ *+' conftest.er1 >conftest.err
7872 rm -f conftest.er1
7873 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007874 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007875 (exit $ac_status); } && {
7876 test -z "$ac_c_werror_flag" ||
7877 test ! -s conftest.err
7878 } && test -s conftest.$ac_objext; then
7879 case $ac_type in
7880 uint64_t) ac_cv_c_uint64_t=yes ;;
7881 *) ac_cv_c_uint64_t=$ac_type ;;
7882esac
7883
7884else
Antoine Pitrou20327222009-05-24 20:39:11 +00007885 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007886sed 's/^/| /' conftest.$ac_ext >&5
7887
7888
7889fi
7890
7891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7892 test "$ac_cv_c_uint64_t" != no && break
7893 done
7894fi
Antoine Pitrou20327222009-05-24 20:39:11 +00007895{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7896$as_echo "$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007897 case $ac_cv_c_uint64_t in #(
7898 no|yes) ;; #(
7899 *)
7900
7901cat >>confdefs.h <<\_ACEOF
7902#define _UINT64_T 1
7903_ACEOF
7904
7905
7906cat >>confdefs.h <<_ACEOF
7907#define uint64_t $ac_cv_c_uint64_t
7908_ACEOF
7909;;
7910 esac
7911
7912
Antoine Pitrou20327222009-05-24 20:39:11 +00007913 { $as_echo "$as_me:$LINENO: checking for int32_t" >&5
7914$as_echo_n "checking for int32_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007915if test "${ac_cv_c_int32_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00007916 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007917else
7918 ac_cv_c_int32_t=no
7919 for ac_type in 'int32_t' 'int' 'long int' \
7920 'long long int' 'short int' 'signed char'; do
7921 cat >conftest.$ac_ext <<_ACEOF
7922/* confdefs.h. */
7923_ACEOF
7924cat confdefs.h >>conftest.$ac_ext
7925cat >>conftest.$ac_ext <<_ACEOF
7926/* end confdefs.h. */
7927$ac_includes_default
7928int
7929main ()
7930{
7931static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7932test_array [0] = 0
7933
7934 ;
7935 return 0;
7936}
7937_ACEOF
7938rm -f conftest.$ac_objext
7939if { (ac_try="$ac_compile"
7940case "(($ac_try" in
7941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7942 *) ac_try_echo=$ac_try;;
7943esac
Antoine Pitrou20327222009-05-24 20:39:11 +00007944eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7945$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007946 (eval "$ac_compile") 2>conftest.er1
7947 ac_status=$?
7948 grep -v '^ *+' conftest.er1 >conftest.err
7949 rm -f conftest.er1
7950 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007951 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007952 (exit $ac_status); } && {
7953 test -z "$ac_c_werror_flag" ||
7954 test ! -s conftest.err
7955 } && test -s conftest.$ac_objext; then
7956 cat >conftest.$ac_ext <<_ACEOF
7957/* confdefs.h. */
7958_ACEOF
7959cat confdefs.h >>conftest.$ac_ext
7960cat >>conftest.$ac_ext <<_ACEOF
7961/* end confdefs.h. */
7962$ac_includes_default
7963int
7964main ()
7965{
7966static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Antoine Pitrou20327222009-05-24 20:39:11 +00007967 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007968test_array [0] = 0
7969
7970 ;
7971 return 0;
7972}
7973_ACEOF
7974rm -f conftest.$ac_objext
7975if { (ac_try="$ac_compile"
7976case "(($ac_try" in
7977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7978 *) ac_try_echo=$ac_try;;
7979esac
Antoine Pitrou20327222009-05-24 20:39:11 +00007980eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7981$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007982 (eval "$ac_compile") 2>conftest.er1
7983 ac_status=$?
7984 grep -v '^ *+' conftest.er1 >conftest.err
7985 rm -f conftest.er1
7986 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007987 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007988 (exit $ac_status); } && {
7989 test -z "$ac_c_werror_flag" ||
7990 test ! -s conftest.err
7991 } && test -s conftest.$ac_objext; then
7992 :
7993else
Antoine Pitrou20327222009-05-24 20:39:11 +00007994 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007995sed 's/^/| /' conftest.$ac_ext >&5
7996
7997 case $ac_type in
7998 int32_t) ac_cv_c_int32_t=yes ;;
7999 *) ac_cv_c_int32_t=$ac_type ;;
8000esac
8001
8002fi
8003
8004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8005else
Antoine Pitrou20327222009-05-24 20:39:11 +00008006 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008007sed 's/^/| /' conftest.$ac_ext >&5
8008
8009
8010fi
8011
8012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8013 test "$ac_cv_c_int32_t" != no && break
8014 done
8015fi
Antoine Pitrou20327222009-05-24 20:39:11 +00008016{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
8017$as_echo "$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008018 case $ac_cv_c_int32_t in #(
8019 no|yes) ;; #(
8020 *)
8021
8022cat >>confdefs.h <<_ACEOF
8023#define int32_t $ac_cv_c_int32_t
8024_ACEOF
8025;;
8026 esac
8027
8028
Antoine Pitrou20327222009-05-24 20:39:11 +00008029 { $as_echo "$as_me:$LINENO: checking for int64_t" >&5
8030$as_echo_n "checking for int64_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008031if test "${ac_cv_c_int64_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00008032 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00008033else
8034 ac_cv_c_int64_t=no
8035 for ac_type in 'int64_t' 'int' 'long int' \
8036 'long long int' 'short int' 'signed char'; do
8037 cat >conftest.$ac_ext <<_ACEOF
8038/* confdefs.h. */
8039_ACEOF
8040cat confdefs.h >>conftest.$ac_ext
8041cat >>conftest.$ac_ext <<_ACEOF
8042/* end confdefs.h. */
8043$ac_includes_default
8044int
8045main ()
8046{
8047static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
8048test_array [0] = 0
8049
8050 ;
8051 return 0;
8052}
8053_ACEOF
8054rm -f conftest.$ac_objext
8055if { (ac_try="$ac_compile"
8056case "(($ac_try" in
8057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8058 *) ac_try_echo=$ac_try;;
8059esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008060eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8061$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008062 (eval "$ac_compile") 2>conftest.er1
8063 ac_status=$?
8064 grep -v '^ *+' conftest.er1 >conftest.err
8065 rm -f conftest.er1
8066 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008067 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008068 (exit $ac_status); } && {
8069 test -z "$ac_c_werror_flag" ||
8070 test ! -s conftest.err
8071 } && test -s conftest.$ac_objext; then
8072 cat >conftest.$ac_ext <<_ACEOF
8073/* confdefs.h. */
8074_ACEOF
8075cat confdefs.h >>conftest.$ac_ext
8076cat >>conftest.$ac_ext <<_ACEOF
8077/* end confdefs.h. */
8078$ac_includes_default
8079int
8080main ()
8081{
8082static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Antoine Pitrou20327222009-05-24 20:39:11 +00008083 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00008084test_array [0] = 0
8085
8086 ;
8087 return 0;
8088}
8089_ACEOF
8090rm -f conftest.$ac_objext
8091if { (ac_try="$ac_compile"
8092case "(($ac_try" in
8093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8094 *) ac_try_echo=$ac_try;;
8095esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008096eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8097$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008098 (eval "$ac_compile") 2>conftest.er1
8099 ac_status=$?
8100 grep -v '^ *+' conftest.er1 >conftest.err
8101 rm -f conftest.er1
8102 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008103 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008104 (exit $ac_status); } && {
8105 test -z "$ac_c_werror_flag" ||
8106 test ! -s conftest.err
8107 } && test -s conftest.$ac_objext; then
8108 :
8109else
Antoine Pitrou20327222009-05-24 20:39:11 +00008110 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008111sed 's/^/| /' conftest.$ac_ext >&5
8112
8113 case $ac_type in
8114 int64_t) ac_cv_c_int64_t=yes ;;
8115 *) ac_cv_c_int64_t=$ac_type ;;
8116esac
8117
8118fi
8119
8120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8121else
Antoine Pitrou20327222009-05-24 20:39:11 +00008122 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008123sed 's/^/| /' conftest.$ac_ext >&5
8124
8125
8126fi
8127
8128rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8129 test "$ac_cv_c_int64_t" != no && break
8130 done
8131fi
Antoine Pitrou20327222009-05-24 20:39:11 +00008132{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
8133$as_echo "$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008134 case $ac_cv_c_int64_t in #(
8135 no|yes) ;; #(
8136 *)
8137
8138cat >>confdefs.h <<_ACEOF
8139#define int64_t $ac_cv_c_int64_t
8140_ACEOF
8141;;
8142 esac
8143
Antoine Pitrou20327222009-05-24 20:39:11 +00008144{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
8145$as_echo_n "checking for ssize_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00008146if test "${ac_cv_type_ssize_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00008147 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008148else
Antoine Pitrou20327222009-05-24 20:39:11 +00008149 ac_cv_type_ssize_t=no
8150cat >conftest.$ac_ext <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +00008151/* confdefs.h. */
8152_ACEOF
8153cat confdefs.h >>conftest.$ac_ext
8154cat >>conftest.$ac_ext <<_ACEOF
8155/* end confdefs.h. */
8156$ac_includes_default
8157int
8158main ()
8159{
Antoine Pitrou20327222009-05-24 20:39:11 +00008160if (sizeof (ssize_t))
8161 return 0;
Antoine Pitroub52ec782009-01-25 16:34:23 +00008162 ;
8163 return 0;
8164}
8165_ACEOF
8166rm -f conftest.$ac_objext
8167if { (ac_try="$ac_compile"
8168case "(($ac_try" in
8169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8170 *) ac_try_echo=$ac_try;;
8171esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008172eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8173$as_echo "$ac_try_echo") >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008174 (eval "$ac_compile") 2>conftest.er1
8175 ac_status=$?
8176 grep -v '^ *+' conftest.er1 >conftest.err
8177 rm -f conftest.er1
8178 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008179 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008180 (exit $ac_status); } && {
8181 test -z "$ac_c_werror_flag" ||
8182 test ! -s conftest.err
8183 } && test -s conftest.$ac_objext; then
Antoine Pitrou20327222009-05-24 20:39:11 +00008184 cat >conftest.$ac_ext <<_ACEOF
8185/* confdefs.h. */
8186_ACEOF
8187cat confdefs.h >>conftest.$ac_ext
8188cat >>conftest.$ac_ext <<_ACEOF
8189/* end confdefs.h. */
8190$ac_includes_default
8191int
8192main ()
8193{
8194if (sizeof ((ssize_t)))
8195 return 0;
8196 ;
8197 return 0;
8198}
8199_ACEOF
8200rm -f conftest.$ac_objext
8201if { (ac_try="$ac_compile"
8202case "(($ac_try" in
8203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8204 *) ac_try_echo=$ac_try;;
8205esac
8206eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8207$as_echo "$ac_try_echo") >&5
8208 (eval "$ac_compile") 2>conftest.er1
8209 ac_status=$?
8210 grep -v '^ *+' conftest.er1 >conftest.err
8211 rm -f conftest.er1
8212 cat conftest.err >&5
8213 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8214 (exit $ac_status); } && {
8215 test -z "$ac_c_werror_flag" ||
8216 test ! -s conftest.err
8217 } && test -s conftest.$ac_objext; then
8218 :
Martin v. Löwis18e16552006-02-15 17:27:45 +00008219else
Antoine Pitrou20327222009-05-24 20:39:11 +00008220 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00008221sed 's/^/| /' conftest.$ac_ext >&5
8222
Antoine Pitrou20327222009-05-24 20:39:11 +00008223 ac_cv_type_ssize_t=yes
8224fi
8225
8226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8227else
8228 $as_echo "$as_me: failed program was:" >&5
8229sed 's/^/| /' conftest.$ac_ext >&5
8230
8231
Martin v. Löwis18e16552006-02-15 17:27:45 +00008232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008233
8234rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00008235fi
Antoine Pitrou20327222009-05-24 20:39:11 +00008236{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
8237$as_echo "$ac_cv_type_ssize_t" >&6; }
8238if test "x$ac_cv_type_ssize_t" = x""yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00008239
8240cat >>confdefs.h <<\_ACEOF
8241#define HAVE_SSIZE_T 1
8242_ACEOF
8243
8244fi
8245
Jack Jansendd19cf82001-12-06 22:36:17 +00008246
Michael W. Hudson54241132001-12-07 15:38:26 +00008247# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008248# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008249# The cast to long int works around a bug in the HP C Compiler
8250# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8251# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8252# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +00008253{ $as_echo "$as_me:$LINENO: checking size of int" >&5
8254$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008255if test "${ac_cv_sizeof_int+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00008256 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008257else
Martin v. Löwis11437992002-04-12 09:54:03 +00008258 if test "$cross_compiling" = yes; then
8259 # Depending upon the size, compute the lo and hi bounds.
8260cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008261/* confdefs.h. */
8262_ACEOF
8263cat confdefs.h >>conftest.$ac_ext
8264cat >>conftest.$ac_ext <<_ACEOF
8265/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008266$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008267int
8268main ()
8269{
Antoine Pitrou20327222009-05-24 20:39:11 +00008270static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008271test_array [0] = 0
8272
8273 ;
8274 return 0;
8275}
8276_ACEOF
8277rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008278if { (ac_try="$ac_compile"
8279case "(($ac_try" in
8280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8281 *) ac_try_echo=$ac_try;;
8282esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008283eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8284$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008285 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008287 grep -v '^ *+' conftest.er1 >conftest.err
8288 rm -f conftest.er1
8289 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008290 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008291 (exit $ac_status); } && {
8292 test -z "$ac_c_werror_flag" ||
8293 test ! -s conftest.err
8294 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008295 ac_lo=0 ac_mid=0
8296 while :; do
8297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008298/* confdefs.h. */
8299_ACEOF
8300cat confdefs.h >>conftest.$ac_ext
8301cat >>conftest.$ac_ext <<_ACEOF
8302/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008303$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008304int
8305main ()
8306{
Antoine Pitrou20327222009-05-24 20:39:11 +00008307static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008308test_array [0] = 0
8309
8310 ;
8311 return 0;
8312}
8313_ACEOF
8314rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008315if { (ac_try="$ac_compile"
8316case "(($ac_try" in
8317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8318 *) ac_try_echo=$ac_try;;
8319esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008320eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8321$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008322 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008323 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008324 grep -v '^ *+' conftest.er1 >conftest.err
8325 rm -f conftest.er1
8326 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008327 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008328 (exit $ac_status); } && {
8329 test -z "$ac_c_werror_flag" ||
8330 test ! -s conftest.err
8331 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008332 ac_hi=$ac_mid; break
8333else
Antoine Pitrou20327222009-05-24 20:39:11 +00008334 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008335sed 's/^/| /' conftest.$ac_ext >&5
8336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008337 ac_lo=`expr $ac_mid + 1`
8338 if test $ac_lo -le $ac_mid; then
8339 ac_lo= ac_hi=
8340 break
8341 fi
8342 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008344
8345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008346 done
8347else
Antoine Pitrou20327222009-05-24 20:39:11 +00008348 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008349sed 's/^/| /' conftest.$ac_ext >&5
8350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008351 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008352/* confdefs.h. */
8353_ACEOF
8354cat confdefs.h >>conftest.$ac_ext
8355cat >>conftest.$ac_ext <<_ACEOF
8356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008357$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008358int
8359main ()
8360{
Antoine Pitrou20327222009-05-24 20:39:11 +00008361static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008362test_array [0] = 0
8363
8364 ;
8365 return 0;
8366}
8367_ACEOF
8368rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008369if { (ac_try="$ac_compile"
8370case "(($ac_try" in
8371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8372 *) ac_try_echo=$ac_try;;
8373esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008374eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8375$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008378 grep -v '^ *+' conftest.er1 >conftest.err
8379 rm -f conftest.er1
8380 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008381 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008382 (exit $ac_status); } && {
8383 test -z "$ac_c_werror_flag" ||
8384 test ! -s conftest.err
8385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008386 ac_hi=-1 ac_mid=-1
8387 while :; do
8388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008389/* confdefs.h. */
8390_ACEOF
8391cat confdefs.h >>conftest.$ac_ext
8392cat >>conftest.$ac_ext <<_ACEOF
8393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008394$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008395int
8396main ()
8397{
Antoine Pitrou20327222009-05-24 20:39:11 +00008398static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008399test_array [0] = 0
8400
8401 ;
8402 return 0;
8403}
8404_ACEOF
8405rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008406if { (ac_try="$ac_compile"
8407case "(($ac_try" in
8408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8409 *) ac_try_echo=$ac_try;;
8410esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008411eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8412$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008415 grep -v '^ *+' conftest.er1 >conftest.err
8416 rm -f conftest.er1
8417 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008418 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008419 (exit $ac_status); } && {
8420 test -z "$ac_c_werror_flag" ||
8421 test ! -s conftest.err
8422 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008423 ac_lo=$ac_mid; break
8424else
Antoine Pitrou20327222009-05-24 20:39:11 +00008425 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008426sed 's/^/| /' conftest.$ac_ext >&5
8427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008428 ac_hi=`expr '(' $ac_mid ')' - 1`
8429 if test $ac_mid -le $ac_hi; then
8430 ac_lo= ac_hi=
8431 break
8432 fi
8433 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435
8436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 done
8438else
Antoine Pitrou20327222009-05-24 20:39:11 +00008439 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008440sed 's/^/| /' conftest.$ac_ext >&5
8441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008444
8445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447
8448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008449# Binary search between lo and hi bounds.
8450while test "x$ac_lo" != "x$ac_hi"; do
8451 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8452 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008453/* confdefs.h. */
8454_ACEOF
8455cat confdefs.h >>conftest.$ac_ext
8456cat >>conftest.$ac_ext <<_ACEOF
8457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008458$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008459int
8460main ()
8461{
Antoine Pitrou20327222009-05-24 20:39:11 +00008462static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008463test_array [0] = 0
8464
8465 ;
8466 return 0;
8467}
8468_ACEOF
8469rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008470if { (ac_try="$ac_compile"
8471case "(($ac_try" in
8472 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8473 *) ac_try_echo=$ac_try;;
8474esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008475eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8476$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008477 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008478 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008479 grep -v '^ *+' conftest.er1 >conftest.err
8480 rm -f conftest.er1
8481 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008482 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008483 (exit $ac_status); } && {
8484 test -z "$ac_c_werror_flag" ||
8485 test ! -s conftest.err
8486 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008487 ac_hi=$ac_mid
8488else
Antoine Pitrou20327222009-05-24 20:39:11 +00008489 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008490sed 's/^/| /' conftest.$ac_ext >&5
8491
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008493fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494
8495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008496done
8497case $ac_lo in
8498?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499'') if test "$ac_cv_type_int" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +00008500 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8501$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8502{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008503See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008504$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008505See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00008506 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008507 else
8508 ac_cv_sizeof_int=0
8509 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008510esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008511else
Martin v. Löwis11437992002-04-12 09:54:03 +00008512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008513/* confdefs.h. */
8514_ACEOF
8515cat confdefs.h >>conftest.$ac_ext
8516cat >>conftest.$ac_ext <<_ACEOF
8517/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008518$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +00008519static long int longval () { return (long int) (sizeof (int)); }
8520static unsigned long int ulongval () { return (long int) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008521#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008522#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008523int
8524main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008525{
Martin v. Löwis11437992002-04-12 09:54:03 +00008526
8527 FILE *f = fopen ("conftest.val", "w");
8528 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008529 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00008530 if (((long int) (sizeof (int))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008531 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008532 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +00008533 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00008535 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008536 }
8537 else
8538 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +00008540 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008541 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00008542 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008543 }
Antoine Pitrou20327222009-05-24 20:39:11 +00008544 /* Do not output a trailing newline, as this causes \r\n confusion
8545 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008547
8548 ;
8549 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008550}
Martin v. Löwis11437992002-04-12 09:54:03 +00008551_ACEOF
8552rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553if { (ac_try="$ac_link"
8554case "(($ac_try" in
8555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8556 *) ac_try_echo=$ac_try;;
8557esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008558eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8559$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008561 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00008562 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008563 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564 { (case "(($ac_try" in
8565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8566 *) ac_try_echo=$ac_try;;
8567esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008568eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8569$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008570 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008571 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00008572 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 (exit $ac_status); }; }; then
8574 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008575else
Antoine Pitrou20327222009-05-24 20:39:11 +00008576 $as_echo "$as_me: program exited with status $ac_status" >&5
8577$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008578sed 's/^/| /' conftest.$ac_ext >&5
8579
Martin v. Löwis11437992002-04-12 09:54:03 +00008580( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008581if test "$ac_cv_type_int" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +00008582 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8584{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008585See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008586$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008587See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00008588 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008589 else
8590 ac_cv_sizeof_int=0
8591 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008592fi
Antoine Pitrou20327222009-05-24 20:39:11 +00008593rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594rm -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 +00008595fi
8596rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008597fi
Antoine Pitrou20327222009-05-24 20:39:11 +00008598{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8599$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008600
8601
8602
Martin v. Löwis11437992002-04-12 09:54:03 +00008603cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008604#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008605_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008606
8607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608# The cast to long int works around a bug in the HP C Compiler
8609# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8610# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8611# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +00008612{ $as_echo "$as_me:$LINENO: checking size of long" >&5
8613$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008614if test "${ac_cv_sizeof_long+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00008615 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008616else
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 if test "$cross_compiling" = yes; then
8618 # Depending upon the size, compute the lo and hi bounds.
8619cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008620/* confdefs.h. */
8621_ACEOF
8622cat confdefs.h >>conftest.$ac_ext
8623cat >>conftest.$ac_ext <<_ACEOF
8624/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008625$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008626int
8627main ()
8628{
Antoine Pitrou20327222009-05-24 20:39:11 +00008629static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008630test_array [0] = 0
8631
8632 ;
8633 return 0;
8634}
8635_ACEOF
8636rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008637if { (ac_try="$ac_compile"
8638case "(($ac_try" in
8639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8640 *) ac_try_echo=$ac_try;;
8641esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008642eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8643$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008644 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008646 grep -v '^ *+' conftest.er1 >conftest.err
8647 rm -f conftest.er1
8648 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008649 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008650 (exit $ac_status); } && {
8651 test -z "$ac_c_werror_flag" ||
8652 test ! -s conftest.err
8653 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 ac_lo=0 ac_mid=0
8655 while :; do
8656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008657/* confdefs.h. */
8658_ACEOF
8659cat confdefs.h >>conftest.$ac_ext
8660cat >>conftest.$ac_ext <<_ACEOF
8661/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008662$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008663int
8664main ()
8665{
Antoine Pitrou20327222009-05-24 20:39:11 +00008666static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008667test_array [0] = 0
8668
8669 ;
8670 return 0;
8671}
8672_ACEOF
8673rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008674if { (ac_try="$ac_compile"
8675case "(($ac_try" in
8676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8677 *) ac_try_echo=$ac_try;;
8678esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008679eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8680$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008681 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008682 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008683 grep -v '^ *+' conftest.er1 >conftest.err
8684 rm -f conftest.er1
8685 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008686 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008687 (exit $ac_status); } && {
8688 test -z "$ac_c_werror_flag" ||
8689 test ! -s conftest.err
8690 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008691 ac_hi=$ac_mid; break
8692else
Antoine Pitrou20327222009-05-24 20:39:11 +00008693 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008694sed 's/^/| /' conftest.$ac_ext >&5
8695
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008696 ac_lo=`expr $ac_mid + 1`
8697 if test $ac_lo -le $ac_mid; then
8698 ac_lo= ac_hi=
8699 break
8700 fi
8701 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008702fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008703
8704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 done
8706else
Antoine Pitrou20327222009-05-24 20:39:11 +00008707 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008708sed 's/^/| /' conftest.$ac_ext >&5
8709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008711/* confdefs.h. */
8712_ACEOF
8713cat confdefs.h >>conftest.$ac_ext
8714cat >>conftest.$ac_ext <<_ACEOF
8715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008716$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008717int
8718main ()
8719{
Antoine Pitrou20327222009-05-24 20:39:11 +00008720static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008721test_array [0] = 0
8722
8723 ;
8724 return 0;
8725}
8726_ACEOF
8727rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008728if { (ac_try="$ac_compile"
8729case "(($ac_try" in
8730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8731 *) ac_try_echo=$ac_try;;
8732esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008733eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8734$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008737 grep -v '^ *+' conftest.er1 >conftest.err
8738 rm -f conftest.er1
8739 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008740 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008741 (exit $ac_status); } && {
8742 test -z "$ac_c_werror_flag" ||
8743 test ! -s conftest.err
8744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008745 ac_hi=-1 ac_mid=-1
8746 while :; do
8747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008748/* confdefs.h. */
8749_ACEOF
8750cat confdefs.h >>conftest.$ac_ext
8751cat >>conftest.$ac_ext <<_ACEOF
8752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008753$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008754int
8755main ()
8756{
Antoine Pitrou20327222009-05-24 20:39:11 +00008757static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008758test_array [0] = 0
8759
8760 ;
8761 return 0;
8762}
8763_ACEOF
8764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008765if { (ac_try="$ac_compile"
8766case "(($ac_try" in
8767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8768 *) ac_try_echo=$ac_try;;
8769esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008770eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8771$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008774 grep -v '^ *+' conftest.er1 >conftest.err
8775 rm -f conftest.er1
8776 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008777 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008778 (exit $ac_status); } && {
8779 test -z "$ac_c_werror_flag" ||
8780 test ! -s conftest.err
8781 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008782 ac_lo=$ac_mid; break
8783else
Antoine Pitrou20327222009-05-24 20:39:11 +00008784 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008785sed 's/^/| /' conftest.$ac_ext >&5
8786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008787 ac_hi=`expr '(' $ac_mid ')' - 1`
8788 if test $ac_mid -le $ac_hi; then
8789 ac_lo= ac_hi=
8790 break
8791 fi
8792 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794
8795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008796 done
8797else
Antoine Pitrou20327222009-05-24 20:39:11 +00008798 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008799sed 's/^/| /' conftest.$ac_ext >&5
8800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008803
8804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008805fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806
8807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008808# Binary search between lo and hi bounds.
8809while test "x$ac_lo" != "x$ac_hi"; do
8810 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8811 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008812/* confdefs.h. */
8813_ACEOF
8814cat confdefs.h >>conftest.$ac_ext
8815cat >>conftest.$ac_ext <<_ACEOF
8816/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008817$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008818int
8819main ()
8820{
Antoine Pitrou20327222009-05-24 20:39:11 +00008821static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008822test_array [0] = 0
8823
8824 ;
8825 return 0;
8826}
8827_ACEOF
8828rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008829if { (ac_try="$ac_compile"
8830case "(($ac_try" in
8831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8832 *) ac_try_echo=$ac_try;;
8833esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008834eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8835$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008838 grep -v '^ *+' conftest.er1 >conftest.err
8839 rm -f conftest.er1
8840 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008841 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008842 (exit $ac_status); } && {
8843 test -z "$ac_c_werror_flag" ||
8844 test ! -s conftest.err
8845 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008846 ac_hi=$ac_mid
8847else
Antoine Pitrou20327222009-05-24 20:39:11 +00008848 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008849sed 's/^/| /' conftest.$ac_ext >&5
8850
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008852fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853
8854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008855done
8856case $ac_lo in
8857?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008858'') if test "$ac_cv_type_long" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +00008859 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8860$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8861{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008862See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008863$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008864See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00008865 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008866 else
8867 ac_cv_sizeof_long=0
8868 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008869esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008870else
Martin v. Löwis11437992002-04-12 09:54:03 +00008871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008872/* confdefs.h. */
8873_ACEOF
8874cat confdefs.h >>conftest.$ac_ext
8875cat >>conftest.$ac_ext <<_ACEOF
8876/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008877$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +00008878static long int longval () { return (long int) (sizeof (long)); }
8879static unsigned long int ulongval () { return (long int) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008880#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008881#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008882int
8883main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008884{
Martin v. Löwis11437992002-04-12 09:54:03 +00008885
8886 FILE *f = fopen ("conftest.val", "w");
8887 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008888 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00008889 if (((long int) (sizeof (long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008890 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008891 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +00008892 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00008894 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 }
8896 else
8897 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008898 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +00008899 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008900 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00008901 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008902 }
Antoine Pitrou20327222009-05-24 20:39:11 +00008903 /* Do not output a trailing newline, as this causes \r\n confusion
8904 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008905 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008906
8907 ;
8908 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008909}
Martin v. Löwis11437992002-04-12 09:54:03 +00008910_ACEOF
8911rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912if { (ac_try="$ac_link"
8913case "(($ac_try" in
8914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8915 *) ac_try_echo=$ac_try;;
8916esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008917eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8918$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008920 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00008921 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008922 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008923 { (case "(($ac_try" in
8924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8925 *) ac_try_echo=$ac_try;;
8926esac
Antoine Pitrou20327222009-05-24 20:39:11 +00008927eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8928$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008929 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008930 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00008931 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008932 (exit $ac_status); }; }; then
8933 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008934else
Antoine Pitrou20327222009-05-24 20:39:11 +00008935 $as_echo "$as_me: program exited with status $ac_status" >&5
8936$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008937sed 's/^/| /' conftest.$ac_ext >&5
8938
Martin v. Löwis11437992002-04-12 09:54:03 +00008939( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008940if test "$ac_cv_type_long" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +00008941 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8943{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008944See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008945$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008946See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00008947 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008948 else
8949 ac_cv_sizeof_long=0
8950 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008951fi
Antoine Pitrou20327222009-05-24 20:39:11 +00008952rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953rm -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 +00008954fi
8955rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008956fi
Antoine Pitrou20327222009-05-24 20:39:11 +00008957{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8958$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008959
8960
8961
Martin v. Löwis11437992002-04-12 09:54:03 +00008962cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008963#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008964_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008965
8966
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967# The cast to long int works around a bug in the HP C Compiler
8968# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8969# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8970# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +00008971{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
8972$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008973if test "${ac_cv_sizeof_void_p+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00008974 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008975else
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 if test "$cross_compiling" = yes; then
8977 # Depending upon the size, compute the lo and hi bounds.
8978cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008979/* confdefs.h. */
8980_ACEOF
8981cat confdefs.h >>conftest.$ac_ext
8982cat >>conftest.$ac_ext <<_ACEOF
8983/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008984$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008985int
8986main ()
8987{
Antoine Pitrou20327222009-05-24 20:39:11 +00008988static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008989test_array [0] = 0
8990
8991 ;
8992 return 0;
8993}
8994_ACEOF
8995rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008996if { (ac_try="$ac_compile"
8997case "(($ac_try" in
8998 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8999 *) ac_try_echo=$ac_try;;
9000esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009001eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9002$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009003 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009004 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009005 grep -v '^ *+' conftest.er1 >conftest.err
9006 rm -f conftest.er1
9007 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009008 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009009 (exit $ac_status); } && {
9010 test -z "$ac_c_werror_flag" ||
9011 test ! -s conftest.err
9012 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 ac_lo=0 ac_mid=0
9014 while :; do
9015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009016/* confdefs.h. */
9017_ACEOF
9018cat confdefs.h >>conftest.$ac_ext
9019cat >>conftest.$ac_ext <<_ACEOF
9020/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009021$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009022int
9023main ()
9024{
Antoine Pitrou20327222009-05-24 20:39:11 +00009025static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009026test_array [0] = 0
9027
9028 ;
9029 return 0;
9030}
9031_ACEOF
9032rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009033if { (ac_try="$ac_compile"
9034case "(($ac_try" in
9035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9036 *) ac_try_echo=$ac_try;;
9037esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009038eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9039$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009042 grep -v '^ *+' conftest.er1 >conftest.err
9043 rm -f conftest.er1
9044 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009045 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009046 (exit $ac_status); } && {
9047 test -z "$ac_c_werror_flag" ||
9048 test ! -s conftest.err
9049 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009050 ac_hi=$ac_mid; break
9051else
Antoine Pitrou20327222009-05-24 20:39:11 +00009052 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009053sed 's/^/| /' conftest.$ac_ext >&5
9054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009055 ac_lo=`expr $ac_mid + 1`
9056 if test $ac_lo -le $ac_mid; then
9057 ac_lo= ac_hi=
9058 break
9059 fi
9060 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009061fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009062
9063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009064 done
9065else
Antoine Pitrou20327222009-05-24 20:39:11 +00009066 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009067sed 's/^/| /' conftest.$ac_ext >&5
9068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009069 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009070/* confdefs.h. */
9071_ACEOF
9072cat confdefs.h >>conftest.$ac_ext
9073cat >>conftest.$ac_ext <<_ACEOF
9074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009075$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009076int
9077main ()
9078{
Antoine Pitrou20327222009-05-24 20:39:11 +00009079static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009080test_array [0] = 0
9081
9082 ;
9083 return 0;
9084}
9085_ACEOF
9086rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009087if { (ac_try="$ac_compile"
9088case "(($ac_try" in
9089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9090 *) ac_try_echo=$ac_try;;
9091esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009092eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9093$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009094 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009096 grep -v '^ *+' conftest.er1 >conftest.err
9097 rm -f conftest.er1
9098 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009099 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009100 (exit $ac_status); } && {
9101 test -z "$ac_c_werror_flag" ||
9102 test ! -s conftest.err
9103 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009104 ac_hi=-1 ac_mid=-1
9105 while :; do
9106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009107/* confdefs.h. */
9108_ACEOF
9109cat confdefs.h >>conftest.$ac_ext
9110cat >>conftest.$ac_ext <<_ACEOF
9111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009112$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009113int
9114main ()
9115{
Antoine Pitrou20327222009-05-24 20:39:11 +00009116static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009117test_array [0] = 0
9118
9119 ;
9120 return 0;
9121}
9122_ACEOF
9123rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009124if { (ac_try="$ac_compile"
9125case "(($ac_try" in
9126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9127 *) ac_try_echo=$ac_try;;
9128esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009129eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9130$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009133 grep -v '^ *+' conftest.er1 >conftest.err
9134 rm -f conftest.er1
9135 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009136 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009137 (exit $ac_status); } && {
9138 test -z "$ac_c_werror_flag" ||
9139 test ! -s conftest.err
9140 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009141 ac_lo=$ac_mid; break
9142else
Antoine Pitrou20327222009-05-24 20:39:11 +00009143 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009144sed 's/^/| /' conftest.$ac_ext >&5
9145
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009146 ac_hi=`expr '(' $ac_mid ')' - 1`
9147 if test $ac_mid -le $ac_hi; then
9148 ac_lo= ac_hi=
9149 break
9150 fi
9151 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009153
9154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 done
9156else
Antoine Pitrou20327222009-05-24 20:39:11 +00009157 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009158sed 's/^/| /' conftest.$ac_ext >&5
9159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009160 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009162
9163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009164fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165
9166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009167# Binary search between lo and hi bounds.
9168while test "x$ac_lo" != "x$ac_hi"; do
9169 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9170 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009171/* confdefs.h. */
9172_ACEOF
9173cat confdefs.h >>conftest.$ac_ext
9174cat >>conftest.$ac_ext <<_ACEOF
9175/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009176$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009177int
9178main ()
9179{
Antoine Pitrou20327222009-05-24 20:39:11 +00009180static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009181test_array [0] = 0
9182
9183 ;
9184 return 0;
9185}
9186_ACEOF
9187rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009188if { (ac_try="$ac_compile"
9189case "(($ac_try" in
9190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9191 *) ac_try_echo=$ac_try;;
9192esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009193eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9194$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009195 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009196 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009197 grep -v '^ *+' conftest.er1 >conftest.err
9198 rm -f conftest.er1
9199 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009200 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009201 (exit $ac_status); } && {
9202 test -z "$ac_c_werror_flag" ||
9203 test ! -s conftest.err
9204 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009205 ac_hi=$ac_mid
9206else
Antoine Pitrou20327222009-05-24 20:39:11 +00009207 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009208sed 's/^/| /' conftest.$ac_ext >&5
9209
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009210 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009211fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009212
9213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009214done
9215case $ac_lo in
9216?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217'') if test "$ac_cv_type_void_p" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +00009218 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9219$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9220{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009221See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009222$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009223See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00009224 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009225 else
9226 ac_cv_sizeof_void_p=0
9227 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009228esac
Guido van Rossumad678af1998-10-02 14:42:15 +00009229else
Martin v. Löwis11437992002-04-12 09:54:03 +00009230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009231/* confdefs.h. */
9232_ACEOF
9233cat confdefs.h >>conftest.$ac_ext
9234cat >>conftest.$ac_ext <<_ACEOF
9235/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009236$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +00009237static long int longval () { return (long int) (sizeof (void *)); }
9238static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009239#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009240#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009241int
9242main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00009243{
Martin v. Löwis11437992002-04-12 09:54:03 +00009244
9245 FILE *f = fopen ("conftest.val", "w");
9246 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009247 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00009248 if (((long int) (sizeof (void *))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009249 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009250 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +00009251 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00009253 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009254 }
9255 else
9256 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009257 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +00009258 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009259 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00009260 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009261 }
Antoine Pitrou20327222009-05-24 20:39:11 +00009262 /* Do not output a trailing newline, as this causes \r\n confusion
9263 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009265
9266 ;
9267 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00009268}
Martin v. Löwis11437992002-04-12 09:54:03 +00009269_ACEOF
9270rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271if { (ac_try="$ac_link"
9272case "(($ac_try" in
9273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9274 *) ac_try_echo=$ac_try;;
9275esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009276eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9277$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009278 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009279 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00009280 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009281 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009282 { (case "(($ac_try" in
9283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9284 *) ac_try_echo=$ac_try;;
9285esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009286eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9287$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009288 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009289 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00009290 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 (exit $ac_status); }; }; then
9292 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00009293else
Antoine Pitrou20327222009-05-24 20:39:11 +00009294 $as_echo "$as_me: program exited with status $ac_status" >&5
9295$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009296sed 's/^/| /' conftest.$ac_ext >&5
9297
Martin v. Löwis11437992002-04-12 09:54:03 +00009298( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009299if test "$ac_cv_type_void_p" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +00009300 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9301$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9302{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009303See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009304$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009305See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00009306 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009307 else
9308 ac_cv_sizeof_void_p=0
9309 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009310fi
Antoine Pitrou20327222009-05-24 20:39:11 +00009311rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312rm -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 +00009313fi
9314rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00009315fi
Antoine Pitrou20327222009-05-24 20:39:11 +00009316{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
9317$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009318
9319
9320
Martin v. Löwis11437992002-04-12 09:54:03 +00009321cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009322#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00009323_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009324
9325
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009326# The cast to long int works around a bug in the HP C Compiler
9327# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9328# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9329# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +00009330{ $as_echo "$as_me:$LINENO: checking size of short" >&5
9331$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009332if test "${ac_cv_sizeof_short+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00009333 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009334else
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 if test "$cross_compiling" = yes; then
9336 # Depending upon the size, compute the lo and hi bounds.
9337cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009338/* confdefs.h. */
9339_ACEOF
9340cat confdefs.h >>conftest.$ac_ext
9341cat >>conftest.$ac_ext <<_ACEOF
9342/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009343$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009344int
9345main ()
9346{
Antoine Pitrou20327222009-05-24 20:39:11 +00009347static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009348test_array [0] = 0
9349
9350 ;
9351 return 0;
9352}
9353_ACEOF
9354rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009355if { (ac_try="$ac_compile"
9356case "(($ac_try" in
9357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9358 *) ac_try_echo=$ac_try;;
9359esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009360eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9361$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009364 grep -v '^ *+' conftest.er1 >conftest.err
9365 rm -f conftest.er1
9366 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009367 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009368 (exit $ac_status); } && {
9369 test -z "$ac_c_werror_flag" ||
9370 test ! -s conftest.err
9371 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 ac_lo=0 ac_mid=0
9373 while :; do
9374 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009375/* confdefs.h. */
9376_ACEOF
9377cat confdefs.h >>conftest.$ac_ext
9378cat >>conftest.$ac_ext <<_ACEOF
9379/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009380$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009381int
9382main ()
9383{
Antoine Pitrou20327222009-05-24 20:39:11 +00009384static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009385test_array [0] = 0
9386
9387 ;
9388 return 0;
9389}
9390_ACEOF
9391rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009392if { (ac_try="$ac_compile"
9393case "(($ac_try" in
9394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9395 *) ac_try_echo=$ac_try;;
9396esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009397eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9398$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009401 grep -v '^ *+' conftest.er1 >conftest.err
9402 rm -f conftest.er1
9403 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009404 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009405 (exit $ac_status); } && {
9406 test -z "$ac_c_werror_flag" ||
9407 test ! -s conftest.err
9408 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009409 ac_hi=$ac_mid; break
9410else
Antoine Pitrou20327222009-05-24 20:39:11 +00009411 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009412sed 's/^/| /' conftest.$ac_ext >&5
9413
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009414 ac_lo=`expr $ac_mid + 1`
9415 if test $ac_lo -le $ac_mid; then
9416 ac_lo= ac_hi=
9417 break
9418 fi
9419 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009420fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009421
9422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 done
9424else
Antoine Pitrou20327222009-05-24 20:39:11 +00009425 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009426sed 's/^/| /' conftest.$ac_ext >&5
9427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009429/* confdefs.h. */
9430_ACEOF
9431cat confdefs.h >>conftest.$ac_ext
9432cat >>conftest.$ac_ext <<_ACEOF
9433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009434$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009435int
9436main ()
9437{
Antoine Pitrou20327222009-05-24 20:39:11 +00009438static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009439test_array [0] = 0
9440
9441 ;
9442 return 0;
9443}
9444_ACEOF
9445rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009446if { (ac_try="$ac_compile"
9447case "(($ac_try" in
9448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9449 *) ac_try_echo=$ac_try;;
9450esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009451eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9452$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009453 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009455 grep -v '^ *+' conftest.er1 >conftest.err
9456 rm -f conftest.er1
9457 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009458 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009459 (exit $ac_status); } && {
9460 test -z "$ac_c_werror_flag" ||
9461 test ! -s conftest.err
9462 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009463 ac_hi=-1 ac_mid=-1
9464 while :; do
9465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009466/* confdefs.h. */
9467_ACEOF
9468cat confdefs.h >>conftest.$ac_ext
9469cat >>conftest.$ac_ext <<_ACEOF
9470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009471$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009472int
9473main ()
9474{
Antoine Pitrou20327222009-05-24 20:39:11 +00009475static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009476test_array [0] = 0
9477
9478 ;
9479 return 0;
9480}
9481_ACEOF
9482rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009483if { (ac_try="$ac_compile"
9484case "(($ac_try" in
9485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9486 *) ac_try_echo=$ac_try;;
9487esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009488eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9489$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009492 grep -v '^ *+' conftest.er1 >conftest.err
9493 rm -f conftest.er1
9494 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009495 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009496 (exit $ac_status); } && {
9497 test -z "$ac_c_werror_flag" ||
9498 test ! -s conftest.err
9499 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009500 ac_lo=$ac_mid; break
9501else
Antoine Pitrou20327222009-05-24 20:39:11 +00009502 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009503sed 's/^/| /' conftest.$ac_ext >&5
9504
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009505 ac_hi=`expr '(' $ac_mid ')' - 1`
9506 if test $ac_mid -le $ac_hi; then
9507 ac_lo= ac_hi=
9508 break
9509 fi
9510 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512
9513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 done
9515else
Antoine Pitrou20327222009-05-24 20:39:11 +00009516 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009517sed 's/^/| /' conftest.$ac_ext >&5
9518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009521
9522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009523fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009524
9525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009526# Binary search between lo and hi bounds.
9527while test "x$ac_lo" != "x$ac_hi"; do
9528 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9529 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009530/* confdefs.h. */
9531_ACEOF
9532cat confdefs.h >>conftest.$ac_ext
9533cat >>conftest.$ac_ext <<_ACEOF
9534/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009535$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009536int
9537main ()
9538{
Antoine Pitrou20327222009-05-24 20:39:11 +00009539static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009540test_array [0] = 0
9541
9542 ;
9543 return 0;
9544}
9545_ACEOF
9546rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009547if { (ac_try="$ac_compile"
9548case "(($ac_try" in
9549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9550 *) ac_try_echo=$ac_try;;
9551esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009552eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9553$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009554 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009556 grep -v '^ *+' conftest.er1 >conftest.err
9557 rm -f conftest.er1
9558 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009559 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009560 (exit $ac_status); } && {
9561 test -z "$ac_c_werror_flag" ||
9562 test ! -s conftest.err
9563 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009564 ac_hi=$ac_mid
9565else
Antoine Pitrou20327222009-05-24 20:39:11 +00009566 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009567sed 's/^/| /' conftest.$ac_ext >&5
9568
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009571
9572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009573done
9574case $ac_lo in
9575?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576'') if test "$ac_cv_type_short" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +00009577 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9578$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9579{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009580See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009581$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009582See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00009583 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009584 else
9585 ac_cv_sizeof_short=0
9586 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009587esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009588else
Martin v. Löwis11437992002-04-12 09:54:03 +00009589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009590/* confdefs.h. */
9591_ACEOF
9592cat confdefs.h >>conftest.$ac_ext
9593cat >>conftest.$ac_ext <<_ACEOF
9594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009595$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +00009596static long int longval () { return (long int) (sizeof (short)); }
9597static unsigned long int ulongval () { return (long int) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009598#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009599#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009600int
9601main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009602{
Martin v. Löwis11437992002-04-12 09:54:03 +00009603
9604 FILE *f = fopen ("conftest.val", "w");
9605 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009606 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00009607 if (((long int) (sizeof (short))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009608 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009609 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +00009610 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00009612 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 }
9614 else
9615 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +00009617 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009618 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00009619 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009620 }
Antoine Pitrou20327222009-05-24 20:39:11 +00009621 /* Do not output a trailing newline, as this causes \r\n confusion
9622 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009623 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009624
9625 ;
9626 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009627}
Martin v. Löwis11437992002-04-12 09:54:03 +00009628_ACEOF
9629rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630if { (ac_try="$ac_link"
9631case "(($ac_try" in
9632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9633 *) ac_try_echo=$ac_try;;
9634esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009635eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9636$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009638 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00009639 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009640 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641 { (case "(($ac_try" in
9642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9643 *) ac_try_echo=$ac_try;;
9644esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009645eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9646$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009647 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009648 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00009649 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 (exit $ac_status); }; }; then
9651 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009652else
Antoine Pitrou20327222009-05-24 20:39:11 +00009653 $as_echo "$as_me: program exited with status $ac_status" >&5
9654$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009655sed 's/^/| /' conftest.$ac_ext >&5
9656
Martin v. Löwis11437992002-04-12 09:54:03 +00009657( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009658if test "$ac_cv_type_short" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +00009659 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9660$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9661{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009662See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009663$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009664See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00009665 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009666 else
9667 ac_cv_sizeof_short=0
9668 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009669fi
Antoine Pitrou20327222009-05-24 20:39:11 +00009670rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671rm -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 +00009672fi
9673rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009674fi
Antoine Pitrou20327222009-05-24 20:39:11 +00009675{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9676$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009677
9678
9679
Martin v. Löwis11437992002-04-12 09:54:03 +00009680cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009681#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009682_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009683
9684
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009685# The cast to long int works around a bug in the HP C Compiler
9686# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9687# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9688# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +00009689{ $as_echo "$as_me:$LINENO: checking size of float" >&5
9690$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009691if test "${ac_cv_sizeof_float+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +00009692 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009693else
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 if test "$cross_compiling" = yes; then
9695 # Depending upon the size, compute the lo and hi bounds.
9696cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009697/* confdefs.h. */
9698_ACEOF
9699cat confdefs.h >>conftest.$ac_ext
9700cat >>conftest.$ac_ext <<_ACEOF
9701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009702$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009703int
9704main ()
9705{
Antoine Pitrou20327222009-05-24 20:39:11 +00009706static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009707test_array [0] = 0
9708
9709 ;
9710 return 0;
9711}
9712_ACEOF
9713rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009714if { (ac_try="$ac_compile"
9715case "(($ac_try" in
9716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9717 *) ac_try_echo=$ac_try;;
9718esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009719eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9720$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009723 grep -v '^ *+' conftest.er1 >conftest.err
9724 rm -f conftest.er1
9725 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009726 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009727 (exit $ac_status); } && {
9728 test -z "$ac_c_werror_flag" ||
9729 test ! -s conftest.err
9730 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 ac_lo=0 ac_mid=0
9732 while :; do
9733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009734/* confdefs.h. */
9735_ACEOF
9736cat confdefs.h >>conftest.$ac_ext
9737cat >>conftest.$ac_ext <<_ACEOF
9738/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009739$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009740int
9741main ()
9742{
Antoine Pitrou20327222009-05-24 20:39:11 +00009743static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009744test_array [0] = 0
9745
9746 ;
9747 return 0;
9748}
9749_ACEOF
9750rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009751if { (ac_try="$ac_compile"
9752case "(($ac_try" in
9753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9754 *) ac_try_echo=$ac_try;;
9755esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009756eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9757$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009758 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009759 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009760 grep -v '^ *+' conftest.er1 >conftest.err
9761 rm -f conftest.er1
9762 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009763 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009764 (exit $ac_status); } && {
9765 test -z "$ac_c_werror_flag" ||
9766 test ! -s conftest.err
9767 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009768 ac_hi=$ac_mid; break
9769else
Antoine Pitrou20327222009-05-24 20:39:11 +00009770 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009771sed 's/^/| /' conftest.$ac_ext >&5
9772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009773 ac_lo=`expr $ac_mid + 1`
9774 if test $ac_lo -le $ac_mid; then
9775 ac_lo= ac_hi=
9776 break
9777 fi
9778 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009779fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009780
9781rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 done
9783else
Antoine Pitrou20327222009-05-24 20:39:11 +00009784 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009785sed 's/^/| /' conftest.$ac_ext >&5
9786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009788/* confdefs.h. */
9789_ACEOF
9790cat confdefs.h >>conftest.$ac_ext
9791cat >>conftest.$ac_ext <<_ACEOF
9792/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009793$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009794int
9795main ()
9796{
Antoine Pitrou20327222009-05-24 20:39:11 +00009797static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009798test_array [0] = 0
9799
9800 ;
9801 return 0;
9802}
9803_ACEOF
9804rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009805if { (ac_try="$ac_compile"
9806case "(($ac_try" in
9807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9808 *) ac_try_echo=$ac_try;;
9809esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009810eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9811$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009812 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009813 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009814 grep -v '^ *+' conftest.er1 >conftest.err
9815 rm -f conftest.er1
9816 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009817 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009818 (exit $ac_status); } && {
9819 test -z "$ac_c_werror_flag" ||
9820 test ! -s conftest.err
9821 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009822 ac_hi=-1 ac_mid=-1
9823 while :; do
9824 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009825/* confdefs.h. */
9826_ACEOF
9827cat confdefs.h >>conftest.$ac_ext
9828cat >>conftest.$ac_ext <<_ACEOF
9829/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009830$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009831int
9832main ()
9833{
Antoine Pitrou20327222009-05-24 20:39:11 +00009834static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009835test_array [0] = 0
9836
9837 ;
9838 return 0;
9839}
9840_ACEOF
9841rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009842if { (ac_try="$ac_compile"
9843case "(($ac_try" in
9844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9845 *) ac_try_echo=$ac_try;;
9846esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009847eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9848$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009850 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009851 grep -v '^ *+' conftest.er1 >conftest.err
9852 rm -f conftest.er1
9853 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009854 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009855 (exit $ac_status); } && {
9856 test -z "$ac_c_werror_flag" ||
9857 test ! -s conftest.err
9858 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009859 ac_lo=$ac_mid; break
9860else
Antoine Pitrou20327222009-05-24 20:39:11 +00009861 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009862sed 's/^/| /' conftest.$ac_ext >&5
9863
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009864 ac_hi=`expr '(' $ac_mid ')' - 1`
9865 if test $ac_mid -le $ac_hi; then
9866 ac_lo= ac_hi=
9867 break
9868 fi
9869 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871
9872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 done
9874else
Antoine Pitrou20327222009-05-24 20:39:11 +00009875 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009876sed 's/^/| /' conftest.$ac_ext >&5
9877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009879fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009880
9881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883
9884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009885# Binary search between lo and hi bounds.
9886while test "x$ac_lo" != "x$ac_hi"; do
9887 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009889/* confdefs.h. */
9890_ACEOF
9891cat confdefs.h >>conftest.$ac_ext
9892cat >>conftest.$ac_ext <<_ACEOF
9893/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009894$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009895int
9896main ()
9897{
Antoine Pitrou20327222009-05-24 20:39:11 +00009898static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009899test_array [0] = 0
9900
9901 ;
9902 return 0;
9903}
9904_ACEOF
9905rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009906if { (ac_try="$ac_compile"
9907case "(($ac_try" in
9908 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9909 *) ac_try_echo=$ac_try;;
9910esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009911eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9912$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009913 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009914 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009915 grep -v '^ *+' conftest.er1 >conftest.err
9916 rm -f conftest.er1
9917 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009918 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009919 (exit $ac_status); } && {
9920 test -z "$ac_c_werror_flag" ||
9921 test ! -s conftest.err
9922 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009923 ac_hi=$ac_mid
9924else
Antoine Pitrou20327222009-05-24 20:39:11 +00009925 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009926sed 's/^/| /' conftest.$ac_ext >&5
9927
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009929fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930
9931rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009932done
9933case $ac_lo in
9934?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935'') if test "$ac_cv_type_float" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +00009936 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9937$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9938{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009939See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00009940$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009941See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00009942 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009943 else
9944 ac_cv_sizeof_float=0
9945 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009946esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009947else
Martin v. Löwis11437992002-04-12 09:54:03 +00009948 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009949/* confdefs.h. */
9950_ACEOF
9951cat confdefs.h >>conftest.$ac_ext
9952cat >>conftest.$ac_ext <<_ACEOF
9953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009954$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +00009955static long int longval () { return (long int) (sizeof (float)); }
9956static unsigned long int ulongval () { return (long int) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009957#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009958#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009959int
9960main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009961{
Martin v. Löwis11437992002-04-12 09:54:03 +00009962
9963 FILE *f = fopen ("conftest.val", "w");
9964 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009965 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00009966 if (((long int) (sizeof (float))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009967 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009968 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +00009969 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009970 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00009971 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 }
9973 else
9974 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +00009976 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009977 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +00009978 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009979 }
Antoine Pitrou20327222009-05-24 20:39:11 +00009980 /* Do not output a trailing newline, as this causes \r\n confusion
9981 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009982 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009983
9984 ;
9985 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009986}
Martin v. Löwis11437992002-04-12 09:54:03 +00009987_ACEOF
9988rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009989if { (ac_try="$ac_link"
9990case "(($ac_try" in
9991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9992 *) ac_try_echo=$ac_try;;
9993esac
Antoine Pitrou20327222009-05-24 20:39:11 +00009994eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9995$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009997 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +00009998 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009999 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000 { (case "(($ac_try" in
10001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10002 *) ac_try_echo=$ac_try;;
10003esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010004eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10005$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010006 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010007 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000010008 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010009 (exit $ac_status); }; }; then
10010 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010011else
Antoine Pitrou20327222009-05-24 20:39:11 +000010012 $as_echo "$as_me: program exited with status $ac_status" >&5
10013$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010014sed 's/^/| /' conftest.$ac_ext >&5
10015
Martin v. Löwis11437992002-04-12 09:54:03 +000010016( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010017if test "$ac_cv_type_float" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000010018 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10020{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010021See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010022$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010023See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000010024 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010025 else
10026 ac_cv_sizeof_float=0
10027 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010028fi
Antoine Pitrou20327222009-05-24 20:39:11 +000010029rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030rm -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 +000010031fi
10032rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010033fi
Antoine Pitrou20327222009-05-24 20:39:11 +000010034{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
10035$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010036
10037
10038
Martin v. Löwis11437992002-04-12 09:54:03 +000010039cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010040#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +000010041_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010042
10043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044# The cast to long int works around a bug in the HP C Compiler
10045# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10046# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10047# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +000010048{ $as_echo "$as_me:$LINENO: checking size of double" >&5
10049$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010050if test "${ac_cv_sizeof_double+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000010051 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010052else
Martin v. Löwis11437992002-04-12 09:54:03 +000010053 if test "$cross_compiling" = yes; then
10054 # Depending upon the size, compute the lo and hi bounds.
10055cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010056/* confdefs.h. */
10057_ACEOF
10058cat confdefs.h >>conftest.$ac_ext
10059cat >>conftest.$ac_ext <<_ACEOF
10060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010061$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010062int
10063main ()
10064{
Antoine Pitrou20327222009-05-24 20:39:11 +000010065static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010066test_array [0] = 0
10067
10068 ;
10069 return 0;
10070}
10071_ACEOF
10072rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010073if { (ac_try="$ac_compile"
10074case "(($ac_try" in
10075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10076 *) ac_try_echo=$ac_try;;
10077esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010078eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10079$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010082 grep -v '^ *+' conftest.er1 >conftest.err
10083 rm -f conftest.er1
10084 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010085 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010086 (exit $ac_status); } && {
10087 test -z "$ac_c_werror_flag" ||
10088 test ! -s conftest.err
10089 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 ac_lo=0 ac_mid=0
10091 while :; do
10092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010093/* confdefs.h. */
10094_ACEOF
10095cat confdefs.h >>conftest.$ac_ext
10096cat >>conftest.$ac_ext <<_ACEOF
10097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010098$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010099int
10100main ()
10101{
Antoine Pitrou20327222009-05-24 20:39:11 +000010102static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010103test_array [0] = 0
10104
10105 ;
10106 return 0;
10107}
10108_ACEOF
10109rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010110if { (ac_try="$ac_compile"
10111case "(($ac_try" in
10112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10113 *) ac_try_echo=$ac_try;;
10114esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010115eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10116$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010119 grep -v '^ *+' conftest.er1 >conftest.err
10120 rm -f conftest.er1
10121 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010122 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010123 (exit $ac_status); } && {
10124 test -z "$ac_c_werror_flag" ||
10125 test ! -s conftest.err
10126 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010127 ac_hi=$ac_mid; break
10128else
Antoine Pitrou20327222009-05-24 20:39:11 +000010129 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010130sed 's/^/| /' conftest.$ac_ext >&5
10131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010132 ac_lo=`expr $ac_mid + 1`
10133 if test $ac_lo -le $ac_mid; then
10134 ac_lo= ac_hi=
10135 break
10136 fi
10137 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010139
10140rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 done
10142else
Antoine Pitrou20327222009-05-24 20:39:11 +000010143 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010144sed 's/^/| /' conftest.$ac_ext >&5
10145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010147/* confdefs.h. */
10148_ACEOF
10149cat confdefs.h >>conftest.$ac_ext
10150cat >>conftest.$ac_ext <<_ACEOF
10151/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010152$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010153int
10154main ()
10155{
Antoine Pitrou20327222009-05-24 20:39:11 +000010156static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010157test_array [0] = 0
10158
10159 ;
10160 return 0;
10161}
10162_ACEOF
10163rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010164if { (ac_try="$ac_compile"
10165case "(($ac_try" in
10166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10167 *) ac_try_echo=$ac_try;;
10168esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010169eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10170$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010173 grep -v '^ *+' conftest.er1 >conftest.err
10174 rm -f conftest.er1
10175 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010176 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010177 (exit $ac_status); } && {
10178 test -z "$ac_c_werror_flag" ||
10179 test ! -s conftest.err
10180 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010181 ac_hi=-1 ac_mid=-1
10182 while :; do
10183 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010184/* confdefs.h. */
10185_ACEOF
10186cat confdefs.h >>conftest.$ac_ext
10187cat >>conftest.$ac_ext <<_ACEOF
10188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010189$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010190int
10191main ()
10192{
Antoine Pitrou20327222009-05-24 20:39:11 +000010193static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010194test_array [0] = 0
10195
10196 ;
10197 return 0;
10198}
10199_ACEOF
10200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010201if { (ac_try="$ac_compile"
10202case "(($ac_try" in
10203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10204 *) ac_try_echo=$ac_try;;
10205esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010206eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10207$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010210 grep -v '^ *+' conftest.er1 >conftest.err
10211 rm -f conftest.er1
10212 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010213 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010214 (exit $ac_status); } && {
10215 test -z "$ac_c_werror_flag" ||
10216 test ! -s conftest.err
10217 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010218 ac_lo=$ac_mid; break
10219else
Antoine Pitrou20327222009-05-24 20:39:11 +000010220 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010221sed 's/^/| /' conftest.$ac_ext >&5
10222
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010223 ac_hi=`expr '(' $ac_mid ')' - 1`
10224 if test $ac_mid -le $ac_hi; then
10225 ac_lo= ac_hi=
10226 break
10227 fi
10228 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230
10231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 done
10233else
Antoine Pitrou20327222009-05-24 20:39:11 +000010234 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010235sed 's/^/| /' conftest.$ac_ext >&5
10236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010238fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010239
10240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242
10243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010244# Binary search between lo and hi bounds.
10245while test "x$ac_lo" != "x$ac_hi"; do
10246 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10247 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010248/* confdefs.h. */
10249_ACEOF
10250cat confdefs.h >>conftest.$ac_ext
10251cat >>conftest.$ac_ext <<_ACEOF
10252/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010253$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010254int
10255main ()
10256{
Antoine Pitrou20327222009-05-24 20:39:11 +000010257static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010258test_array [0] = 0
10259
10260 ;
10261 return 0;
10262}
10263_ACEOF
10264rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010265if { (ac_try="$ac_compile"
10266case "(($ac_try" in
10267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10268 *) ac_try_echo=$ac_try;;
10269esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010270eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10271$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010272 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010274 grep -v '^ *+' conftest.er1 >conftest.err
10275 rm -f conftest.er1
10276 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010277 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010278 (exit $ac_status); } && {
10279 test -z "$ac_c_werror_flag" ||
10280 test ! -s conftest.err
10281 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010282 ac_hi=$ac_mid
10283else
Antoine Pitrou20327222009-05-24 20:39:11 +000010284 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010285sed 's/^/| /' conftest.$ac_ext >&5
10286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289
10290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010291done
10292case $ac_lo in
10293?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010294'') if test "$ac_cv_type_double" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000010295 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10296$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10297{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010298See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010299$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010300See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000010301 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010302 else
10303 ac_cv_sizeof_double=0
10304 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010305esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000010306else
Martin v. Löwis11437992002-04-12 09:54:03 +000010307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010308/* confdefs.h. */
10309_ACEOF
10310cat confdefs.h >>conftest.$ac_ext
10311cat >>conftest.$ac_ext <<_ACEOF
10312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010313$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +000010314static long int longval () { return (long int) (sizeof (double)); }
10315static unsigned long int ulongval () { return (long int) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010316#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010317#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010318int
10319main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +000010320{
Martin v. Löwis11437992002-04-12 09:54:03 +000010321
10322 FILE *f = fopen ("conftest.val", "w");
10323 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010324 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000010325 if (((long int) (sizeof (double))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010326 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010327 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000010328 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000010330 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 }
10332 else
10333 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000010335 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010336 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000010337 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010338 }
Antoine Pitrou20327222009-05-24 20:39:11 +000010339 /* Do not output a trailing newline, as this causes \r\n confusion
10340 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010342
10343 ;
10344 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010345}
Martin v. Löwis11437992002-04-12 09:54:03 +000010346_ACEOF
10347rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348if { (ac_try="$ac_link"
10349case "(($ac_try" in
10350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10351 *) ac_try_echo=$ac_try;;
10352esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010353eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10354$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010355 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010356 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000010357 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010358 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359 { (case "(($ac_try" in
10360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10361 *) ac_try_echo=$ac_try;;
10362esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010363eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10364$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010365 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010366 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000010367 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010368 (exit $ac_status); }; }; then
10369 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010370else
Antoine Pitrou20327222009-05-24 20:39:11 +000010371 $as_echo "$as_me: program exited with status $ac_status" >&5
10372$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010373sed 's/^/| /' conftest.$ac_ext >&5
10374
Martin v. Löwis11437992002-04-12 09:54:03 +000010375( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010376if test "$ac_cv_type_double" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000010377 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10379{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010380See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010381$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010382See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000010383 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010384 else
10385 ac_cv_sizeof_double=0
10386 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010387fi
Antoine Pitrou20327222009-05-24 20:39:11 +000010388rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389rm -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 +000010390fi
10391rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010392fi
Antoine Pitrou20327222009-05-24 20:39:11 +000010393{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10394$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010395
10396
10397
Martin v. Löwis11437992002-04-12 09:54:03 +000010398cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010399#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010400_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010401
10402
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010403# The cast to long int works around a bug in the HP C Compiler
10404# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10405# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10406# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +000010407{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5
10408$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010409if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000010410 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010411else
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 if test "$cross_compiling" = yes; then
10413 # Depending upon the size, compute the lo and hi bounds.
10414cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010415/* confdefs.h. */
10416_ACEOF
10417cat confdefs.h >>conftest.$ac_ext
10418cat >>conftest.$ac_ext <<_ACEOF
10419/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010420$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010421int
10422main ()
10423{
Antoine Pitrou20327222009-05-24 20:39:11 +000010424static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010425test_array [0] = 0
10426
10427 ;
10428 return 0;
10429}
10430_ACEOF
10431rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010432if { (ac_try="$ac_compile"
10433case "(($ac_try" in
10434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10435 *) ac_try_echo=$ac_try;;
10436esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010437eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10438$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010439 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010441 grep -v '^ *+' conftest.er1 >conftest.err
10442 rm -f conftest.er1
10443 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010444 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010445 (exit $ac_status); } && {
10446 test -z "$ac_c_werror_flag" ||
10447 test ! -s conftest.err
10448 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 ac_lo=0 ac_mid=0
10450 while :; do
10451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010452/* confdefs.h. */
10453_ACEOF
10454cat confdefs.h >>conftest.$ac_ext
10455cat >>conftest.$ac_ext <<_ACEOF
10456/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010457$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010458int
10459main ()
10460{
Antoine Pitrou20327222009-05-24 20:39:11 +000010461static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010462test_array [0] = 0
10463
10464 ;
10465 return 0;
10466}
10467_ACEOF
10468rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010469if { (ac_try="$ac_compile"
10470case "(($ac_try" in
10471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10472 *) ac_try_echo=$ac_try;;
10473esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010474eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10475$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010478 grep -v '^ *+' conftest.er1 >conftest.err
10479 rm -f conftest.er1
10480 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010481 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010482 (exit $ac_status); } && {
10483 test -z "$ac_c_werror_flag" ||
10484 test ! -s conftest.err
10485 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010486 ac_hi=$ac_mid; break
10487else
Antoine Pitrou20327222009-05-24 20:39:11 +000010488 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010489sed 's/^/| /' conftest.$ac_ext >&5
10490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010491 ac_lo=`expr $ac_mid + 1`
10492 if test $ac_lo -le $ac_mid; then
10493 ac_lo= ac_hi=
10494 break
10495 fi
10496 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010498
10499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 done
10501else
Antoine Pitrou20327222009-05-24 20:39:11 +000010502 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010503sed 's/^/| /' conftest.$ac_ext >&5
10504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010506/* confdefs.h. */
10507_ACEOF
10508cat confdefs.h >>conftest.$ac_ext
10509cat >>conftest.$ac_ext <<_ACEOF
10510/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010511$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010512int
10513main ()
10514{
Antoine Pitrou20327222009-05-24 20:39:11 +000010515static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010516test_array [0] = 0
10517
10518 ;
10519 return 0;
10520}
10521_ACEOF
10522rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010523if { (ac_try="$ac_compile"
10524case "(($ac_try" in
10525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10526 *) ac_try_echo=$ac_try;;
10527esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010528eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10529$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010530 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010532 grep -v '^ *+' conftest.er1 >conftest.err
10533 rm -f conftest.er1
10534 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010535 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010536 (exit $ac_status); } && {
10537 test -z "$ac_c_werror_flag" ||
10538 test ! -s conftest.err
10539 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010540 ac_hi=-1 ac_mid=-1
10541 while :; do
10542 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010543/* confdefs.h. */
10544_ACEOF
10545cat confdefs.h >>conftest.$ac_ext
10546cat >>conftest.$ac_ext <<_ACEOF
10547/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010548$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010549int
10550main ()
10551{
Antoine Pitrou20327222009-05-24 20:39:11 +000010552static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010553test_array [0] = 0
10554
10555 ;
10556 return 0;
10557}
10558_ACEOF
10559rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010560if { (ac_try="$ac_compile"
10561case "(($ac_try" in
10562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10563 *) ac_try_echo=$ac_try;;
10564esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010565eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10566$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010567 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010569 grep -v '^ *+' conftest.er1 >conftest.err
10570 rm -f conftest.er1
10571 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010572 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010573 (exit $ac_status); } && {
10574 test -z "$ac_c_werror_flag" ||
10575 test ! -s conftest.err
10576 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010577 ac_lo=$ac_mid; break
10578else
Antoine Pitrou20327222009-05-24 20:39:11 +000010579 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010580sed 's/^/| /' conftest.$ac_ext >&5
10581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010582 ac_hi=`expr '(' $ac_mid ')' - 1`
10583 if test $ac_mid -le $ac_hi; then
10584 ac_lo= ac_hi=
10585 break
10586 fi
10587 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010589
10590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010591 done
10592else
Antoine Pitrou20327222009-05-24 20:39:11 +000010593 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010594sed 's/^/| /' conftest.$ac_ext >&5
10595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010598
10599rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010600fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010601
10602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010603# Binary search between lo and hi bounds.
10604while test "x$ac_lo" != "x$ac_hi"; do
10605 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10606 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010607/* confdefs.h. */
10608_ACEOF
10609cat confdefs.h >>conftest.$ac_ext
10610cat >>conftest.$ac_ext <<_ACEOF
10611/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010612$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010613int
10614main ()
10615{
Antoine Pitrou20327222009-05-24 20:39:11 +000010616static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010617test_array [0] = 0
10618
10619 ;
10620 return 0;
10621}
10622_ACEOF
10623rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010624if { (ac_try="$ac_compile"
10625case "(($ac_try" in
10626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10627 *) ac_try_echo=$ac_try;;
10628esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010629eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10630$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010631 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010633 grep -v '^ *+' conftest.er1 >conftest.err
10634 rm -f conftest.er1
10635 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010636 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010637 (exit $ac_status); } && {
10638 test -z "$ac_c_werror_flag" ||
10639 test ! -s conftest.err
10640 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010641 ac_hi=$ac_mid
10642else
Antoine Pitrou20327222009-05-24 20:39:11 +000010643 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010644sed 's/^/| /' conftest.$ac_ext >&5
10645
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648
10649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010650done
10651case $ac_lo in
10652?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653'') if test "$ac_cv_type_fpos_t" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000010654 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10655$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10656{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010657See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010658$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010659See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000010660 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010661 else
10662 ac_cv_sizeof_fpos_t=0
10663 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010664esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010665else
Martin v. Löwis11437992002-04-12 09:54:03 +000010666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010667/* confdefs.h. */
10668_ACEOF
10669cat confdefs.h >>conftest.$ac_ext
10670cat >>conftest.$ac_ext <<_ACEOF
10671/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010672$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +000010673static long int longval () { return (long int) (sizeof (fpos_t)); }
10674static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010675#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010676#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010677int
10678main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010679{
Martin v. Löwis11437992002-04-12 09:54:03 +000010680
10681 FILE *f = fopen ("conftest.val", "w");
10682 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010683 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000010684 if (((long int) (sizeof (fpos_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010685 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010686 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000010687 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000010689 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 }
10691 else
10692 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000010694 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010695 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000010696 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010697 }
Antoine Pitrou20327222009-05-24 20:39:11 +000010698 /* Do not output a trailing newline, as this causes \r\n confusion
10699 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010701
10702 ;
10703 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010704}
Martin v. Löwis11437992002-04-12 09:54:03 +000010705_ACEOF
10706rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707if { (ac_try="$ac_link"
10708case "(($ac_try" in
10709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10710 *) ac_try_echo=$ac_try;;
10711esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010712eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10713$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010715 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000010716 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718 { (case "(($ac_try" in
10719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10720 *) ac_try_echo=$ac_try;;
10721esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010722eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10723$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010724 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010725 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000010726 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010727 (exit $ac_status); }; }; then
10728 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010729else
Antoine Pitrou20327222009-05-24 20:39:11 +000010730 $as_echo "$as_me: program exited with status $ac_status" >&5
10731$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010732sed 's/^/| /' conftest.$ac_ext >&5
10733
Martin v. Löwis11437992002-04-12 09:54:03 +000010734( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010735if test "$ac_cv_type_fpos_t" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000010736 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10737$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10738{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010739See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010740$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010741See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000010742 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010743 else
10744 ac_cv_sizeof_fpos_t=0
10745 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010746fi
Antoine Pitrou20327222009-05-24 20:39:11 +000010747rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748rm -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 +000010749fi
10750rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010751fi
Antoine Pitrou20327222009-05-24 20:39:11 +000010752{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10753$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010754
10755
10756
Martin v. Löwis11437992002-04-12 09:54:03 +000010757cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010758#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010759_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010760
Michael W. Hudson54241132001-12-07 15:38:26 +000010761
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762# The cast to long int works around a bug in the HP C Compiler
10763# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10764# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10765# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +000010766{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
10767$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010768if test "${ac_cv_sizeof_size_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000010769 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010770else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010771 if test "$cross_compiling" = yes; then
10772 # Depending upon the size, compute the lo and hi bounds.
10773cat >conftest.$ac_ext <<_ACEOF
10774/* confdefs.h. */
10775_ACEOF
10776cat confdefs.h >>conftest.$ac_ext
10777cat >>conftest.$ac_ext <<_ACEOF
10778/* end confdefs.h. */
10779$ac_includes_default
10780int
10781main ()
10782{
Antoine Pitrou20327222009-05-24 20:39:11 +000010783static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010784test_array [0] = 0
10785
10786 ;
10787 return 0;
10788}
10789_ACEOF
10790rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010791if { (ac_try="$ac_compile"
10792case "(($ac_try" in
10793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10794 *) ac_try_echo=$ac_try;;
10795esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010796eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10797$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010799 ac_status=$?
10800 grep -v '^ *+' conftest.er1 >conftest.err
10801 rm -f conftest.er1
10802 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010803 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010804 (exit $ac_status); } && {
10805 test -z "$ac_c_werror_flag" ||
10806 test ! -s conftest.err
10807 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010808 ac_lo=0 ac_mid=0
10809 while :; do
10810 cat >conftest.$ac_ext <<_ACEOF
10811/* confdefs.h. */
10812_ACEOF
10813cat confdefs.h >>conftest.$ac_ext
10814cat >>conftest.$ac_ext <<_ACEOF
10815/* end confdefs.h. */
10816$ac_includes_default
10817int
10818main ()
10819{
Antoine Pitrou20327222009-05-24 20:39:11 +000010820static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010821test_array [0] = 0
10822
10823 ;
10824 return 0;
10825}
10826_ACEOF
10827rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010828if { (ac_try="$ac_compile"
10829case "(($ac_try" in
10830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10831 *) ac_try_echo=$ac_try;;
10832esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010833eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10834$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010835 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010836 ac_status=$?
10837 grep -v '^ *+' conftest.er1 >conftest.err
10838 rm -f conftest.er1
10839 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010840 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010841 (exit $ac_status); } && {
10842 test -z "$ac_c_werror_flag" ||
10843 test ! -s conftest.err
10844 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010845 ac_hi=$ac_mid; break
10846else
Antoine Pitrou20327222009-05-24 20:39:11 +000010847 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010848sed 's/^/| /' conftest.$ac_ext >&5
10849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010850 ac_lo=`expr $ac_mid + 1`
10851 if test $ac_lo -le $ac_mid; then
10852 ac_lo= ac_hi=
10853 break
10854 fi
10855 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010857
10858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010859 done
10860else
Antoine Pitrou20327222009-05-24 20:39:11 +000010861 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010862sed 's/^/| /' conftest.$ac_ext >&5
10863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010864 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010865/* confdefs.h. */
10866_ACEOF
10867cat confdefs.h >>conftest.$ac_ext
10868cat >>conftest.$ac_ext <<_ACEOF
10869/* end confdefs.h. */
10870$ac_includes_default
10871int
10872main ()
10873{
Antoine Pitrou20327222009-05-24 20:39:11 +000010874static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010875test_array [0] = 0
10876
10877 ;
10878 return 0;
10879}
10880_ACEOF
10881rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010882if { (ac_try="$ac_compile"
10883case "(($ac_try" in
10884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10885 *) ac_try_echo=$ac_try;;
10886esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010887eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10888$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010889 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010890 ac_status=$?
10891 grep -v '^ *+' conftest.er1 >conftest.err
10892 rm -f conftest.er1
10893 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010894 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010895 (exit $ac_status); } && {
10896 test -z "$ac_c_werror_flag" ||
10897 test ! -s conftest.err
10898 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010899 ac_hi=-1 ac_mid=-1
10900 while :; do
10901 cat >conftest.$ac_ext <<_ACEOF
10902/* confdefs.h. */
10903_ACEOF
10904cat confdefs.h >>conftest.$ac_ext
10905cat >>conftest.$ac_ext <<_ACEOF
10906/* end confdefs.h. */
10907$ac_includes_default
10908int
10909main ()
10910{
Antoine Pitrou20327222009-05-24 20:39:11 +000010911static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010912test_array [0] = 0
10913
10914 ;
10915 return 0;
10916}
10917_ACEOF
10918rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010919if { (ac_try="$ac_compile"
10920case "(($ac_try" in
10921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10922 *) ac_try_echo=$ac_try;;
10923esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010924eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10925$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010926 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010927 ac_status=$?
10928 grep -v '^ *+' conftest.er1 >conftest.err
10929 rm -f conftest.er1
10930 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010931 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010932 (exit $ac_status); } && {
10933 test -z "$ac_c_werror_flag" ||
10934 test ! -s conftest.err
10935 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010936 ac_lo=$ac_mid; break
10937else
Antoine Pitrou20327222009-05-24 20:39:11 +000010938 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010939sed 's/^/| /' conftest.$ac_ext >&5
10940
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010941 ac_hi=`expr '(' $ac_mid ')' - 1`
10942 if test $ac_mid -le $ac_hi; then
10943 ac_lo= ac_hi=
10944 break
10945 fi
10946 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010947fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010948
10949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010950 done
10951else
Antoine Pitrou20327222009-05-24 20:39:11 +000010952 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010953sed 's/^/| /' conftest.$ac_ext >&5
10954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010957
10958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010959fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010960
10961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010962# Binary search between lo and hi bounds.
10963while test "x$ac_lo" != "x$ac_hi"; do
10964 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10965 cat >conftest.$ac_ext <<_ACEOF
10966/* confdefs.h. */
10967_ACEOF
10968cat confdefs.h >>conftest.$ac_ext
10969cat >>conftest.$ac_ext <<_ACEOF
10970/* end confdefs.h. */
10971$ac_includes_default
10972int
10973main ()
10974{
Antoine Pitrou20327222009-05-24 20:39:11 +000010975static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010976test_array [0] = 0
10977
10978 ;
10979 return 0;
10980}
10981_ACEOF
10982rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010983if { (ac_try="$ac_compile"
10984case "(($ac_try" in
10985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10986 *) ac_try_echo=$ac_try;;
10987esac
Antoine Pitrou20327222009-05-24 20:39:11 +000010988eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10989$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010990 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010991 ac_status=$?
10992 grep -v '^ *+' conftest.er1 >conftest.err
10993 rm -f conftest.er1
10994 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000010995 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010996 (exit $ac_status); } && {
10997 test -z "$ac_c_werror_flag" ||
10998 test ! -s conftest.err
10999 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000011000 ac_hi=$ac_mid
11001else
Antoine Pitrou20327222009-05-24 20:39:11 +000011002 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011003sed 's/^/| /' conftest.$ac_ext >&5
11004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011005 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011006fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007
11008rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011009done
11010case $ac_lo in
11011?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011012'') if test "$ac_cv_type_size_t" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000011013 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11014$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11015{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011016See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011017$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011018See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000011019 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011020 else
11021 ac_cv_sizeof_size_t=0
11022 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011023esac
11024else
Martin v. Löwis18e16552006-02-15 17:27:45 +000011025 cat >conftest.$ac_ext <<_ACEOF
11026/* confdefs.h. */
11027_ACEOF
11028cat confdefs.h >>conftest.$ac_ext
11029cat >>conftest.$ac_ext <<_ACEOF
11030/* end confdefs.h. */
11031$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +000011032static long int longval () { return (long int) (sizeof (size_t)); }
11033static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011034#include <stdio.h>
11035#include <stdlib.h>
11036int
11037main ()
11038{
11039
11040 FILE *f = fopen ("conftest.val", "w");
11041 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011042 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000011043 if (((long int) (sizeof (size_t))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011044 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011045 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000011046 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011047 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000011048 fprintf (f, "%ld", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000011049 }
11050 else
11051 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000011053 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011054 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000011055 fprintf (f, "%lu", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000011056 }
Antoine Pitrou20327222009-05-24 20:39:11 +000011057 /* Do not output a trailing newline, as this causes \r\n confusion
11058 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011059 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011060
11061 ;
11062 return 0;
11063}
11064_ACEOF
11065rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011066if { (ac_try="$ac_link"
11067case "(($ac_try" in
11068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11069 *) ac_try_echo=$ac_try;;
11070esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011071eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11072$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011074 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000011075 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011076 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011077 { (case "(($ac_try" in
11078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11079 *) ac_try_echo=$ac_try;;
11080esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011081eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11082$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011083 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011084 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000011085 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011086 (exit $ac_status); }; }; then
11087 ac_cv_sizeof_size_t=`cat conftest.val`
11088else
Antoine Pitrou20327222009-05-24 20:39:11 +000011089 $as_echo "$as_me: program exited with status $ac_status" >&5
11090$as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011091sed 's/^/| /' conftest.$ac_ext >&5
11092
11093( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011094if test "$ac_cv_type_size_t" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000011095 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11096$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11097{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011098See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011099$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011100See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000011101 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011102 else
11103 ac_cv_sizeof_size_t=0
11104 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000011105fi
Antoine Pitrou20327222009-05-24 20:39:11 +000011106rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011107rm -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 +000011108fi
11109rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000011110fi
Antoine Pitrou20327222009-05-24 20:39:11 +000011111{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
11112$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011113
11114
11115
Martin v. Löwis18e16552006-02-15 17:27:45 +000011116cat >>confdefs.h <<_ACEOF
11117#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
11118_ACEOF
11119
11120
Christian Heimes400adb02008-02-01 08:12:03 +000011121# The cast to long int works around a bug in the HP C Compiler
11122# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11123# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11124# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +000011125{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5
11126$as_echo_n "checking size of pid_t... " >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011127if test "${ac_cv_sizeof_pid_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000011128 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +000011129else
11130 if test "$cross_compiling" = yes; then
11131 # Depending upon the size, compute the lo and hi bounds.
11132cat >conftest.$ac_ext <<_ACEOF
11133/* confdefs.h. */
11134_ACEOF
11135cat confdefs.h >>conftest.$ac_ext
11136cat >>conftest.$ac_ext <<_ACEOF
11137/* end confdefs.h. */
11138$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011139int
11140main ()
11141{
Antoine Pitrou20327222009-05-24 20:39:11 +000011142static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000011143test_array [0] = 0
11144
11145 ;
11146 return 0;
11147}
11148_ACEOF
11149rm -f conftest.$ac_objext
11150if { (ac_try="$ac_compile"
11151case "(($ac_try" in
11152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11153 *) ac_try_echo=$ac_try;;
11154esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011155eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11156$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011157 (eval "$ac_compile") 2>conftest.er1
11158 ac_status=$?
11159 grep -v '^ *+' conftest.er1 >conftest.err
11160 rm -f conftest.er1
11161 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011162 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011163 (exit $ac_status); } && {
11164 test -z "$ac_c_werror_flag" ||
11165 test ! -s conftest.err
11166 } && test -s conftest.$ac_objext; then
11167 ac_lo=0 ac_mid=0
11168 while :; do
11169 cat >conftest.$ac_ext <<_ACEOF
11170/* confdefs.h. */
11171_ACEOF
11172cat confdefs.h >>conftest.$ac_ext
11173cat >>conftest.$ac_ext <<_ACEOF
11174/* end confdefs.h. */
11175$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011176int
11177main ()
11178{
Antoine Pitrou20327222009-05-24 20:39:11 +000011179static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011180test_array [0] = 0
11181
11182 ;
11183 return 0;
11184}
11185_ACEOF
11186rm -f conftest.$ac_objext
11187if { (ac_try="$ac_compile"
11188case "(($ac_try" in
11189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11190 *) ac_try_echo=$ac_try;;
11191esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011192eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11193$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011194 (eval "$ac_compile") 2>conftest.er1
11195 ac_status=$?
11196 grep -v '^ *+' conftest.er1 >conftest.err
11197 rm -f conftest.er1
11198 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011199 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011200 (exit $ac_status); } && {
11201 test -z "$ac_c_werror_flag" ||
11202 test ! -s conftest.err
11203 } && test -s conftest.$ac_objext; then
11204 ac_hi=$ac_mid; break
11205else
Antoine Pitrou20327222009-05-24 20:39:11 +000011206 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011207sed 's/^/| /' conftest.$ac_ext >&5
11208
11209 ac_lo=`expr $ac_mid + 1`
11210 if test $ac_lo -le $ac_mid; then
11211 ac_lo= ac_hi=
11212 break
11213 fi
11214 ac_mid=`expr 2 '*' $ac_mid + 1`
11215fi
11216
11217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11218 done
11219else
Antoine Pitrou20327222009-05-24 20:39:11 +000011220 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011221sed 's/^/| /' conftest.$ac_ext >&5
11222
11223 cat >conftest.$ac_ext <<_ACEOF
11224/* confdefs.h. */
11225_ACEOF
11226cat confdefs.h >>conftest.$ac_ext
11227cat >>conftest.$ac_ext <<_ACEOF
11228/* end confdefs.h. */
11229$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011230int
11231main ()
11232{
Antoine Pitrou20327222009-05-24 20:39:11 +000011233static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000011234test_array [0] = 0
11235
11236 ;
11237 return 0;
11238}
11239_ACEOF
11240rm -f conftest.$ac_objext
11241if { (ac_try="$ac_compile"
11242case "(($ac_try" in
11243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11244 *) ac_try_echo=$ac_try;;
11245esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011246eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11247$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011248 (eval "$ac_compile") 2>conftest.er1
11249 ac_status=$?
11250 grep -v '^ *+' conftest.er1 >conftest.err
11251 rm -f conftest.er1
11252 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011253 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011254 (exit $ac_status); } && {
11255 test -z "$ac_c_werror_flag" ||
11256 test ! -s conftest.err
11257 } && test -s conftest.$ac_objext; then
11258 ac_hi=-1 ac_mid=-1
11259 while :; do
11260 cat >conftest.$ac_ext <<_ACEOF
11261/* confdefs.h. */
11262_ACEOF
11263cat confdefs.h >>conftest.$ac_ext
11264cat >>conftest.$ac_ext <<_ACEOF
11265/* end confdefs.h. */
11266$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011267int
11268main ()
11269{
Antoine Pitrou20327222009-05-24 20:39:11 +000011270static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011271test_array [0] = 0
11272
11273 ;
11274 return 0;
11275}
11276_ACEOF
11277rm -f conftest.$ac_objext
11278if { (ac_try="$ac_compile"
11279case "(($ac_try" in
11280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11281 *) ac_try_echo=$ac_try;;
11282esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011283eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11284$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011285 (eval "$ac_compile") 2>conftest.er1
11286 ac_status=$?
11287 grep -v '^ *+' conftest.er1 >conftest.err
11288 rm -f conftest.er1
11289 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011290 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011291 (exit $ac_status); } && {
11292 test -z "$ac_c_werror_flag" ||
11293 test ! -s conftest.err
11294 } && test -s conftest.$ac_objext; then
11295 ac_lo=$ac_mid; break
11296else
Antoine Pitrou20327222009-05-24 20:39:11 +000011297 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011298sed 's/^/| /' conftest.$ac_ext >&5
11299
11300 ac_hi=`expr '(' $ac_mid ')' - 1`
11301 if test $ac_mid -le $ac_hi; then
11302 ac_lo= ac_hi=
11303 break
11304 fi
11305 ac_mid=`expr 2 '*' $ac_mid`
11306fi
11307
11308rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11309 done
11310else
Antoine Pitrou20327222009-05-24 20:39:11 +000011311 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011312sed 's/^/| /' conftest.$ac_ext >&5
11313
11314 ac_lo= ac_hi=
11315fi
11316
11317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11318fi
11319
11320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11321# Binary search between lo and hi bounds.
11322while test "x$ac_lo" != "x$ac_hi"; do
11323 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11324 cat >conftest.$ac_ext <<_ACEOF
11325/* confdefs.h. */
11326_ACEOF
11327cat confdefs.h >>conftest.$ac_ext
11328cat >>conftest.$ac_ext <<_ACEOF
11329/* end confdefs.h. */
11330$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011331int
11332main ()
11333{
Antoine Pitrou20327222009-05-24 20:39:11 +000011334static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011335test_array [0] = 0
11336
11337 ;
11338 return 0;
11339}
11340_ACEOF
11341rm -f conftest.$ac_objext
11342if { (ac_try="$ac_compile"
11343case "(($ac_try" in
11344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11345 *) ac_try_echo=$ac_try;;
11346esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011347eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11348$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011349 (eval "$ac_compile") 2>conftest.er1
11350 ac_status=$?
11351 grep -v '^ *+' conftest.er1 >conftest.err
11352 rm -f conftest.er1
11353 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011354 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011355 (exit $ac_status); } && {
11356 test -z "$ac_c_werror_flag" ||
11357 test ! -s conftest.err
11358 } && test -s conftest.$ac_objext; then
11359 ac_hi=$ac_mid
11360else
Antoine Pitrou20327222009-05-24 20:39:11 +000011361 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011362sed 's/^/| /' conftest.$ac_ext >&5
11363
11364 ac_lo=`expr '(' $ac_mid ')' + 1`
11365fi
11366
11367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11368done
11369case $ac_lo in
11370?*) ac_cv_sizeof_pid_t=$ac_lo;;
11371'') if test "$ac_cv_type_pid_t" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000011372 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11373$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11374{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011375See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011376$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011377See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000011378 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011379 else
11380 ac_cv_sizeof_pid_t=0
11381 fi ;;
11382esac
11383else
11384 cat >conftest.$ac_ext <<_ACEOF
11385/* confdefs.h. */
11386_ACEOF
11387cat confdefs.h >>conftest.$ac_ext
11388cat >>conftest.$ac_ext <<_ACEOF
11389/* end confdefs.h. */
11390$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +000011391static long int longval () { return (long int) (sizeof (pid_t)); }
11392static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011393#include <stdio.h>
11394#include <stdlib.h>
11395int
11396main ()
11397{
11398
11399 FILE *f = fopen ("conftest.val", "w");
11400 if (! f)
11401 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000011402 if (((long int) (sizeof (pid_t))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011403 {
11404 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000011405 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000011406 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000011407 fprintf (f, "%ld", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011408 }
11409 else
11410 {
11411 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000011412 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000011413 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000011414 fprintf (f, "%lu", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011415 }
Antoine Pitrou20327222009-05-24 20:39:11 +000011416 /* Do not output a trailing newline, as this causes \r\n confusion
11417 on some platforms. */
Christian Heimes400adb02008-02-01 08:12:03 +000011418 return ferror (f) || fclose (f) != 0;
11419
11420 ;
11421 return 0;
11422}
11423_ACEOF
11424rm -f conftest$ac_exeext
11425if { (ac_try="$ac_link"
11426case "(($ac_try" in
11427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11428 *) ac_try_echo=$ac_try;;
11429esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011430eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11431$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011432 (eval "$ac_link") 2>&5
11433 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000011434 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011435 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11436 { (case "(($ac_try" in
11437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11438 *) ac_try_echo=$ac_try;;
11439esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011440eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11441$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011442 (eval "$ac_try") 2>&5
11443 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000011444 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011445 (exit $ac_status); }; }; then
11446 ac_cv_sizeof_pid_t=`cat conftest.val`
11447else
Antoine Pitrou20327222009-05-24 20:39:11 +000011448 $as_echo "$as_me: program exited with status $ac_status" >&5
11449$as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011450sed 's/^/| /' conftest.$ac_ext >&5
11451
11452( exit $ac_status )
11453if test "$ac_cv_type_pid_t" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000011454 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11456{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011457See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011458$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011459See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000011460 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011461 else
11462 ac_cv_sizeof_pid_t=0
11463 fi
11464fi
Antoine Pitrou20327222009-05-24 20:39:11 +000011465rm -rf conftest.dSYM
Christian Heimes400adb02008-02-01 08:12:03 +000011466rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11467fi
11468rm -f conftest.val
11469fi
Antoine Pitrou20327222009-05-24 20:39:11 +000011470{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11471$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011472
11473
11474
11475cat >>confdefs.h <<_ACEOF
11476#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11477_ACEOF
11478
11479
Michael W. Hudson54241132001-12-07 15:38:26 +000011480
Antoine Pitrou20327222009-05-24 20:39:11 +000011481{ $as_echo "$as_me:$LINENO: checking for long long support" >&5
11482$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011483have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011484cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011485/* confdefs.h. */
11486_ACEOF
11487cat confdefs.h >>conftest.$ac_ext
11488cat >>conftest.$ac_ext <<_ACEOF
11489/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011490
Martin v. Löwis11437992002-04-12 09:54:03 +000011491int
11492main ()
11493{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011494long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011495 ;
11496 return 0;
11497}
11498_ACEOF
11499rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011500if { (ac_try="$ac_compile"
11501case "(($ac_try" in
11502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11503 *) ac_try_echo=$ac_try;;
11504esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011505eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11506$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011507 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011509 grep -v '^ *+' conftest.er1 >conftest.err
11510 rm -f conftest.er1
11511 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011512 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011513 (exit $ac_status); } && {
11514 test -z "$ac_c_werror_flag" ||
11515 test ! -s conftest.err
11516 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011517
11518
11519cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011520#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011521_ACEOF
11522
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011523 have_long_long=yes
11524
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011525else
Antoine Pitrou20327222009-05-24 20:39:11 +000011526 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011527sed 's/^/| /' conftest.$ac_ext >&5
11528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011529
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011531
11532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000011533{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5
11534$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011535if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536# The cast to long int works around a bug in the HP C Compiler
11537# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11538# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11539# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +000011540{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
11541$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011542if test "${ac_cv_sizeof_long_long+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000011543 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011544else
Martin v. Löwis11437992002-04-12 09:54:03 +000011545 if test "$cross_compiling" = yes; then
11546 # Depending upon the size, compute the lo and hi bounds.
11547cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011548/* confdefs.h. */
11549_ACEOF
11550cat confdefs.h >>conftest.$ac_ext
11551cat >>conftest.$ac_ext <<_ACEOF
11552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011553$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011554int
11555main ()
11556{
Antoine Pitrou20327222009-05-24 20:39:11 +000011557static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011558test_array [0] = 0
11559
11560 ;
11561 return 0;
11562}
11563_ACEOF
11564rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011565if { (ac_try="$ac_compile"
11566case "(($ac_try" in
11567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11568 *) ac_try_echo=$ac_try;;
11569esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011570eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11571$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011572 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011574 grep -v '^ *+' conftest.er1 >conftest.err
11575 rm -f conftest.er1
11576 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011577 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011578 (exit $ac_status); } && {
11579 test -z "$ac_c_werror_flag" ||
11580 test ! -s conftest.err
11581 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011582 ac_lo=0 ac_mid=0
11583 while :; do
11584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011585/* confdefs.h. */
11586_ACEOF
11587cat confdefs.h >>conftest.$ac_ext
11588cat >>conftest.$ac_ext <<_ACEOF
11589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011590$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011591int
11592main ()
11593{
Antoine Pitrou20327222009-05-24 20:39:11 +000011594static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011595test_array [0] = 0
11596
11597 ;
11598 return 0;
11599}
11600_ACEOF
11601rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011602if { (ac_try="$ac_compile"
11603case "(($ac_try" in
11604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11605 *) ac_try_echo=$ac_try;;
11606esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011607eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11608$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011611 grep -v '^ *+' conftest.er1 >conftest.err
11612 rm -f conftest.er1
11613 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011614 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011615 (exit $ac_status); } && {
11616 test -z "$ac_c_werror_flag" ||
11617 test ! -s conftest.err
11618 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011619 ac_hi=$ac_mid; break
11620else
Antoine Pitrou20327222009-05-24 20:39:11 +000011621 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011622sed 's/^/| /' conftest.$ac_ext >&5
11623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011624 ac_lo=`expr $ac_mid + 1`
11625 if test $ac_lo -le $ac_mid; then
11626 ac_lo= ac_hi=
11627 break
11628 fi
11629 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011631
11632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011633 done
11634else
Antoine Pitrou20327222009-05-24 20:39:11 +000011635 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011636sed 's/^/| /' conftest.$ac_ext >&5
11637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011639/* confdefs.h. */
11640_ACEOF
11641cat confdefs.h >>conftest.$ac_ext
11642cat >>conftest.$ac_ext <<_ACEOF
11643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011644$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011645int
11646main ()
11647{
Antoine Pitrou20327222009-05-24 20:39:11 +000011648static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011649test_array [0] = 0
11650
11651 ;
11652 return 0;
11653}
11654_ACEOF
11655rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011656if { (ac_try="$ac_compile"
11657case "(($ac_try" in
11658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11659 *) ac_try_echo=$ac_try;;
11660esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011661eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11662$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011665 grep -v '^ *+' conftest.er1 >conftest.err
11666 rm -f conftest.er1
11667 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011668 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011669 (exit $ac_status); } && {
11670 test -z "$ac_c_werror_flag" ||
11671 test ! -s conftest.err
11672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011673 ac_hi=-1 ac_mid=-1
11674 while :; do
11675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011676/* confdefs.h. */
11677_ACEOF
11678cat confdefs.h >>conftest.$ac_ext
11679cat >>conftest.$ac_ext <<_ACEOF
11680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011681$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011682int
11683main ()
11684{
Antoine Pitrou20327222009-05-24 20:39:11 +000011685static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011686test_array [0] = 0
11687
11688 ;
11689 return 0;
11690}
11691_ACEOF
11692rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011693if { (ac_try="$ac_compile"
11694case "(($ac_try" in
11695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11696 *) ac_try_echo=$ac_try;;
11697esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011698eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11699$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011702 grep -v '^ *+' conftest.er1 >conftest.err
11703 rm -f conftest.er1
11704 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011705 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011706 (exit $ac_status); } && {
11707 test -z "$ac_c_werror_flag" ||
11708 test ! -s conftest.err
11709 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011710 ac_lo=$ac_mid; break
11711else
Antoine Pitrou20327222009-05-24 20:39:11 +000011712 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011713sed 's/^/| /' conftest.$ac_ext >&5
11714
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011715 ac_hi=`expr '(' $ac_mid ')' - 1`
11716 if test $ac_mid -le $ac_hi; then
11717 ac_lo= ac_hi=
11718 break
11719 fi
11720 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011722
11723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011724 done
11725else
Antoine Pitrou20327222009-05-24 20:39:11 +000011726 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011727sed 's/^/| /' conftest.$ac_ext >&5
11728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011729 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011731
11732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011734
11735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011736# Binary search between lo and hi bounds.
11737while test "x$ac_lo" != "x$ac_hi"; do
11738 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011740/* confdefs.h. */
11741_ACEOF
11742cat confdefs.h >>conftest.$ac_ext
11743cat >>conftest.$ac_ext <<_ACEOF
11744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011745$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011746int
11747main ()
11748{
Antoine Pitrou20327222009-05-24 20:39:11 +000011749static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011750test_array [0] = 0
11751
11752 ;
11753 return 0;
11754}
11755_ACEOF
11756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011757if { (ac_try="$ac_compile"
11758case "(($ac_try" in
11759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11760 *) ac_try_echo=$ac_try;;
11761esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011762eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11763$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011766 grep -v '^ *+' conftest.er1 >conftest.err
11767 rm -f conftest.er1
11768 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011769 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011770 (exit $ac_status); } && {
11771 test -z "$ac_c_werror_flag" ||
11772 test ! -s conftest.err
11773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011774 ac_hi=$ac_mid
11775else
Antoine Pitrou20327222009-05-24 20:39:11 +000011776 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011777sed 's/^/| /' conftest.$ac_ext >&5
11778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011779 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011781
11782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011783done
11784case $ac_lo in
11785?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011786'') if test "$ac_cv_type_long_long" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000011787 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11788$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11789{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011790See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011791$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011792See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000011793 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011794 else
11795 ac_cv_sizeof_long_long=0
11796 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011797esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011798else
Martin v. Löwis11437992002-04-12 09:54:03 +000011799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011800/* confdefs.h. */
11801_ACEOF
11802cat confdefs.h >>conftest.$ac_ext
11803cat >>conftest.$ac_ext <<_ACEOF
11804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011805$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +000011806static long int longval () { return (long int) (sizeof (long long)); }
11807static unsigned long int ulongval () { return (long int) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011808#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011809#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011810int
11811main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011812{
Martin v. Löwis11437992002-04-12 09:54:03 +000011813
11814 FILE *f = fopen ("conftest.val", "w");
11815 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011816 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000011817 if (((long int) (sizeof (long long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011818 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011819 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000011820 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011821 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000011822 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011823 }
11824 else
11825 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000011827 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011828 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000011829 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011830 }
Antoine Pitrou20327222009-05-24 20:39:11 +000011831 /* Do not output a trailing newline, as this causes \r\n confusion
11832 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011833 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011834
11835 ;
11836 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011837}
Martin v. Löwis11437992002-04-12 09:54:03 +000011838_ACEOF
11839rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011840if { (ac_try="$ac_link"
11841case "(($ac_try" in
11842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11843 *) ac_try_echo=$ac_try;;
11844esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011845eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11846$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011847 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011848 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000011849 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011850 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011851 { (case "(($ac_try" in
11852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11853 *) ac_try_echo=$ac_try;;
11854esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011855eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11856$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011857 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011858 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000011859 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011860 (exit $ac_status); }; }; then
11861 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011862else
Antoine Pitrou20327222009-05-24 20:39:11 +000011863 $as_echo "$as_me: program exited with status $ac_status" >&5
11864$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011865sed 's/^/| /' conftest.$ac_ext >&5
11866
Martin v. Löwis11437992002-04-12 09:54:03 +000011867( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011868if test "$ac_cv_type_long_long" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000011869 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11871{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011872See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011873$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011874See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000011875 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011876 else
11877 ac_cv_sizeof_long_long=0
11878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011879fi
Antoine Pitrou20327222009-05-24 20:39:11 +000011880rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011881rm -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 +000011882fi
11883rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011884fi
Antoine Pitrou20327222009-05-24 20:39:11 +000011885{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11886$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011887
11888
11889
Martin v. Löwis11437992002-04-12 09:54:03 +000011890cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011891#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011892_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011893
Michael W. Hudson54241132001-12-07 15:38:26 +000011894
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011895fi
11896
Antoine Pitrou20327222009-05-24 20:39:11 +000011897{ $as_echo "$as_me:$LINENO: checking for long double support" >&5
11898$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011899have_long_double=no
11900cat >conftest.$ac_ext <<_ACEOF
11901/* confdefs.h. */
11902_ACEOF
11903cat confdefs.h >>conftest.$ac_ext
11904cat >>conftest.$ac_ext <<_ACEOF
11905/* end confdefs.h. */
11906
11907int
11908main ()
11909{
11910long double x; x = (long double)0;
11911 ;
11912 return 0;
11913}
11914_ACEOF
11915rm -f conftest.$ac_objext
11916if { (ac_try="$ac_compile"
11917case "(($ac_try" in
11918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11919 *) ac_try_echo=$ac_try;;
11920esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011921eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11922$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011923 (eval "$ac_compile") 2>conftest.er1
11924 ac_status=$?
11925 grep -v '^ *+' conftest.er1 >conftest.err
11926 rm -f conftest.er1
11927 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011928 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011929 (exit $ac_status); } && {
11930 test -z "$ac_c_werror_flag" ||
11931 test ! -s conftest.err
11932 } && test -s conftest.$ac_objext; then
11933
11934
11935cat >>confdefs.h <<\_ACEOF
11936#define HAVE_LONG_DOUBLE 1
11937_ACEOF
11938
11939 have_long_double=yes
11940
11941else
Antoine Pitrou20327222009-05-24 20:39:11 +000011942 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011943sed 's/^/| /' conftest.$ac_ext >&5
11944
11945
11946fi
11947
11948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000011949{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5
11950$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011951if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011952# The cast to long int works around a bug in the HP C Compiler
11953# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11954# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11955# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +000011956{ $as_echo "$as_me:$LINENO: checking size of long double" >&5
11957$as_echo_n "checking size of long double... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011958if test "${ac_cv_sizeof_long_double+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000011959 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011960else
11961 if test "$cross_compiling" = yes; then
11962 # Depending upon the size, compute the lo and hi bounds.
11963cat >conftest.$ac_ext <<_ACEOF
11964/* confdefs.h. */
11965_ACEOF
11966cat confdefs.h >>conftest.$ac_ext
11967cat >>conftest.$ac_ext <<_ACEOF
11968/* end confdefs.h. */
11969$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011970int
11971main ()
11972{
Antoine Pitrou20327222009-05-24 20:39:11 +000011973static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011974test_array [0] = 0
11975
11976 ;
11977 return 0;
11978}
11979_ACEOF
11980rm -f conftest.$ac_objext
11981if { (ac_try="$ac_compile"
11982case "(($ac_try" in
11983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11984 *) ac_try_echo=$ac_try;;
11985esac
Antoine Pitrou20327222009-05-24 20:39:11 +000011986eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11987$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011988 (eval "$ac_compile") 2>conftest.er1
11989 ac_status=$?
11990 grep -v '^ *+' conftest.er1 >conftest.err
11991 rm -f conftest.er1
11992 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000011993 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011994 (exit $ac_status); } && {
11995 test -z "$ac_c_werror_flag" ||
11996 test ! -s conftest.err
11997 } && test -s conftest.$ac_objext; then
11998 ac_lo=0 ac_mid=0
11999 while :; do
12000 cat >conftest.$ac_ext <<_ACEOF
12001/* confdefs.h. */
12002_ACEOF
12003cat confdefs.h >>conftest.$ac_ext
12004cat >>conftest.$ac_ext <<_ACEOF
12005/* end confdefs.h. */
12006$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012007int
12008main ()
12009{
Antoine Pitrou20327222009-05-24 20:39:11 +000012010static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012011test_array [0] = 0
12012
12013 ;
12014 return 0;
12015}
12016_ACEOF
12017rm -f conftest.$ac_objext
12018if { (ac_try="$ac_compile"
12019case "(($ac_try" in
12020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12021 *) ac_try_echo=$ac_try;;
12022esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012023eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12024$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012025 (eval "$ac_compile") 2>conftest.er1
12026 ac_status=$?
12027 grep -v '^ *+' conftest.er1 >conftest.err
12028 rm -f conftest.er1
12029 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012030 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012031 (exit $ac_status); } && {
12032 test -z "$ac_c_werror_flag" ||
12033 test ! -s conftest.err
12034 } && test -s conftest.$ac_objext; then
12035 ac_hi=$ac_mid; break
12036else
Antoine Pitrou20327222009-05-24 20:39:11 +000012037 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012038sed 's/^/| /' conftest.$ac_ext >&5
12039
12040 ac_lo=`expr $ac_mid + 1`
12041 if test $ac_lo -le $ac_mid; then
12042 ac_lo= ac_hi=
12043 break
12044 fi
12045 ac_mid=`expr 2 '*' $ac_mid + 1`
12046fi
12047
12048rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12049 done
12050else
Antoine Pitrou20327222009-05-24 20:39:11 +000012051 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012052sed 's/^/| /' conftest.$ac_ext >&5
12053
12054 cat >conftest.$ac_ext <<_ACEOF
12055/* confdefs.h. */
12056_ACEOF
12057cat confdefs.h >>conftest.$ac_ext
12058cat >>conftest.$ac_ext <<_ACEOF
12059/* end confdefs.h. */
12060$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012061int
12062main ()
12063{
Antoine Pitrou20327222009-05-24 20:39:11 +000012064static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012065test_array [0] = 0
12066
12067 ;
12068 return 0;
12069}
12070_ACEOF
12071rm -f conftest.$ac_objext
12072if { (ac_try="$ac_compile"
12073case "(($ac_try" in
12074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12075 *) ac_try_echo=$ac_try;;
12076esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012077eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12078$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012079 (eval "$ac_compile") 2>conftest.er1
12080 ac_status=$?
12081 grep -v '^ *+' conftest.er1 >conftest.err
12082 rm -f conftest.er1
12083 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012084 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012085 (exit $ac_status); } && {
12086 test -z "$ac_c_werror_flag" ||
12087 test ! -s conftest.err
12088 } && test -s conftest.$ac_objext; then
12089 ac_hi=-1 ac_mid=-1
12090 while :; do
12091 cat >conftest.$ac_ext <<_ACEOF
12092/* confdefs.h. */
12093_ACEOF
12094cat confdefs.h >>conftest.$ac_ext
12095cat >>conftest.$ac_ext <<_ACEOF
12096/* end confdefs.h. */
12097$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012098int
12099main ()
12100{
Antoine Pitrou20327222009-05-24 20:39:11 +000012101static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012102test_array [0] = 0
12103
12104 ;
12105 return 0;
12106}
12107_ACEOF
12108rm -f conftest.$ac_objext
12109if { (ac_try="$ac_compile"
12110case "(($ac_try" in
12111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12112 *) ac_try_echo=$ac_try;;
12113esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012114eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12115$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012116 (eval "$ac_compile") 2>conftest.er1
12117 ac_status=$?
12118 grep -v '^ *+' conftest.er1 >conftest.err
12119 rm -f conftest.er1
12120 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012121 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012122 (exit $ac_status); } && {
12123 test -z "$ac_c_werror_flag" ||
12124 test ! -s conftest.err
12125 } && test -s conftest.$ac_objext; then
12126 ac_lo=$ac_mid; break
12127else
Antoine Pitrou20327222009-05-24 20:39:11 +000012128 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012129sed 's/^/| /' conftest.$ac_ext >&5
12130
12131 ac_hi=`expr '(' $ac_mid ')' - 1`
12132 if test $ac_mid -le $ac_hi; then
12133 ac_lo= ac_hi=
12134 break
12135 fi
12136 ac_mid=`expr 2 '*' $ac_mid`
12137fi
12138
12139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12140 done
12141else
Antoine Pitrou20327222009-05-24 20:39:11 +000012142 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012143sed 's/^/| /' conftest.$ac_ext >&5
12144
12145 ac_lo= ac_hi=
12146fi
12147
12148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12149fi
12150
12151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12152# Binary search between lo and hi bounds.
12153while test "x$ac_lo" != "x$ac_hi"; do
12154 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12155 cat >conftest.$ac_ext <<_ACEOF
12156/* confdefs.h. */
12157_ACEOF
12158cat confdefs.h >>conftest.$ac_ext
12159cat >>conftest.$ac_ext <<_ACEOF
12160/* end confdefs.h. */
12161$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012162int
12163main ()
12164{
Antoine Pitrou20327222009-05-24 20:39:11 +000012165static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012166test_array [0] = 0
12167
12168 ;
12169 return 0;
12170}
12171_ACEOF
12172rm -f conftest.$ac_objext
12173if { (ac_try="$ac_compile"
12174case "(($ac_try" in
12175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12176 *) ac_try_echo=$ac_try;;
12177esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012178eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12179$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012180 (eval "$ac_compile") 2>conftest.er1
12181 ac_status=$?
12182 grep -v '^ *+' conftest.er1 >conftest.err
12183 rm -f conftest.er1
12184 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012185 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012186 (exit $ac_status); } && {
12187 test -z "$ac_c_werror_flag" ||
12188 test ! -s conftest.err
12189 } && test -s conftest.$ac_objext; then
12190 ac_hi=$ac_mid
12191else
Antoine Pitrou20327222009-05-24 20:39:11 +000012192 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012193sed 's/^/| /' conftest.$ac_ext >&5
12194
12195 ac_lo=`expr '(' $ac_mid ')' + 1`
12196fi
12197
12198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12199done
12200case $ac_lo in
12201?*) ac_cv_sizeof_long_double=$ac_lo;;
12202'') if test "$ac_cv_type_long_double" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000012203 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12204$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12205{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012206See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012207$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012208See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000012209 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012210 else
12211 ac_cv_sizeof_long_double=0
12212 fi ;;
12213esac
12214else
12215 cat >conftest.$ac_ext <<_ACEOF
12216/* confdefs.h. */
12217_ACEOF
12218cat confdefs.h >>conftest.$ac_ext
12219cat >>conftest.$ac_ext <<_ACEOF
12220/* end confdefs.h. */
12221$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +000012222static long int longval () { return (long int) (sizeof (long double)); }
12223static unsigned long int ulongval () { return (long int) (sizeof (long double)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012224#include <stdio.h>
12225#include <stdlib.h>
12226int
12227main ()
12228{
12229
12230 FILE *f = fopen ("conftest.val", "w");
12231 if (! f)
12232 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000012233 if (((long int) (sizeof (long double))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012234 {
12235 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000012236 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012237 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000012238 fprintf (f, "%ld", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012239 }
12240 else
12241 {
12242 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000012243 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012244 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000012245 fprintf (f, "%lu", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012246 }
Antoine Pitrou20327222009-05-24 20:39:11 +000012247 /* Do not output a trailing newline, as this causes \r\n confusion
12248 on some platforms. */
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012249 return ferror (f) || fclose (f) != 0;
12250
12251 ;
12252 return 0;
12253}
12254_ACEOF
12255rm -f conftest$ac_exeext
12256if { (ac_try="$ac_link"
12257case "(($ac_try" in
12258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12259 *) ac_try_echo=$ac_try;;
12260esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012261eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12262$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012263 (eval "$ac_link") 2>&5
12264 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000012265 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012266 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12267 { (case "(($ac_try" in
12268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12269 *) ac_try_echo=$ac_try;;
12270esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012271eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12272$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012273 (eval "$ac_try") 2>&5
12274 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000012275 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012276 (exit $ac_status); }; }; then
12277 ac_cv_sizeof_long_double=`cat conftest.val`
12278else
Antoine Pitrou20327222009-05-24 20:39:11 +000012279 $as_echo "$as_me: program exited with status $ac_status" >&5
12280$as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012281sed 's/^/| /' conftest.$ac_ext >&5
12282
12283( exit $ac_status )
12284if test "$ac_cv_type_long_double" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000012285 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12286$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12287{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012288See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012289$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012290See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000012291 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012292 else
12293 ac_cv_sizeof_long_double=0
12294 fi
12295fi
Antoine Pitrou20327222009-05-24 20:39:11 +000012296rm -rf conftest.dSYM
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012297rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12298fi
12299rm -f conftest.val
12300fi
Antoine Pitrou20327222009-05-24 20:39:11 +000012301{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12302$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012303
12304
12305
12306cat >>confdefs.h <<_ACEOF
12307#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12308_ACEOF
12309
12310
12311fi
12312
12313
Antoine Pitrou20327222009-05-24 20:39:11 +000012314{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5
12315$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012316have_c99_bool=no
12317cat >conftest.$ac_ext <<_ACEOF
12318/* confdefs.h. */
12319_ACEOF
12320cat confdefs.h >>conftest.$ac_ext
12321cat >>conftest.$ac_ext <<_ACEOF
12322/* end confdefs.h. */
12323
12324int
12325main ()
12326{
12327_Bool x; x = (_Bool)0;
12328 ;
12329 return 0;
12330}
12331_ACEOF
12332rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012333if { (ac_try="$ac_compile"
12334case "(($ac_try" in
12335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12336 *) ac_try_echo=$ac_try;;
12337esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012338eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12339$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012340 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012341 ac_status=$?
12342 grep -v '^ *+' conftest.er1 >conftest.err
12343 rm -f conftest.er1
12344 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012345 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012346 (exit $ac_status); } && {
12347 test -z "$ac_c_werror_flag" ||
12348 test ! -s conftest.err
12349 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012350
12351
12352cat >>confdefs.h <<\_ACEOF
12353#define HAVE_C99_BOOL 1
12354_ACEOF
12355
12356 have_c99_bool=yes
12357
12358else
Antoine Pitrou20327222009-05-24 20:39:11 +000012359 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012360sed 's/^/| /' conftest.$ac_ext >&5
12361
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012362
Thomas Woutersb2137042007-02-01 18:02:27 +000012363fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012364
12365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000012366{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12367$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012368if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369# The cast to long int works around a bug in the HP C Compiler
12370# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12371# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12372# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +000012373{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5
12374$as_echo_n "checking size of _Bool... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012375if test "${ac_cv_sizeof__Bool+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000012376 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012377else
12378 if test "$cross_compiling" = yes; then
12379 # Depending upon the size, compute the lo and hi bounds.
12380cat >conftest.$ac_ext <<_ACEOF
12381/* confdefs.h. */
12382_ACEOF
12383cat confdefs.h >>conftest.$ac_ext
12384cat >>conftest.$ac_ext <<_ACEOF
12385/* end confdefs.h. */
12386$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012387int
12388main ()
12389{
Antoine Pitrou20327222009-05-24 20:39:11 +000012390static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012391test_array [0] = 0
12392
12393 ;
12394 return 0;
12395}
12396_ACEOF
12397rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012398if { (ac_try="$ac_compile"
12399case "(($ac_try" in
12400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12401 *) ac_try_echo=$ac_try;;
12402esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012403eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12404$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012405 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012406 ac_status=$?
12407 grep -v '^ *+' conftest.er1 >conftest.err
12408 rm -f conftest.er1
12409 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012410 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012411 (exit $ac_status); } && {
12412 test -z "$ac_c_werror_flag" ||
12413 test ! -s conftest.err
12414 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012415 ac_lo=0 ac_mid=0
12416 while :; do
12417 cat >conftest.$ac_ext <<_ACEOF
12418/* confdefs.h. */
12419_ACEOF
12420cat confdefs.h >>conftest.$ac_ext
12421cat >>conftest.$ac_ext <<_ACEOF
12422/* end confdefs.h. */
12423$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012424int
12425main ()
12426{
Antoine Pitrou20327222009-05-24 20:39:11 +000012427static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012428test_array [0] = 0
12429
12430 ;
12431 return 0;
12432}
12433_ACEOF
12434rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012435if { (ac_try="$ac_compile"
12436case "(($ac_try" in
12437 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12438 *) ac_try_echo=$ac_try;;
12439esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012440eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12441$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012442 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012443 ac_status=$?
12444 grep -v '^ *+' conftest.er1 >conftest.err
12445 rm -f conftest.er1
12446 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012447 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012448 (exit $ac_status); } && {
12449 test -z "$ac_c_werror_flag" ||
12450 test ! -s conftest.err
12451 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012452 ac_hi=$ac_mid; break
12453else
Antoine Pitrou20327222009-05-24 20:39:11 +000012454 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012455sed 's/^/| /' conftest.$ac_ext >&5
12456
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012457 ac_lo=`expr $ac_mid + 1`
12458 if test $ac_lo -le $ac_mid; then
12459 ac_lo= ac_hi=
12460 break
12461 fi
12462 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012464
12465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012466 done
12467else
Antoine Pitrou20327222009-05-24 20:39:11 +000012468 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012469sed 's/^/| /' conftest.$ac_ext >&5
12470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012472/* confdefs.h. */
12473_ACEOF
12474cat confdefs.h >>conftest.$ac_ext
12475cat >>conftest.$ac_ext <<_ACEOF
12476/* end confdefs.h. */
12477$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012478int
12479main ()
12480{
Antoine Pitrou20327222009-05-24 20:39:11 +000012481static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012482test_array [0] = 0
12483
12484 ;
12485 return 0;
12486}
12487_ACEOF
12488rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012489if { (ac_try="$ac_compile"
12490case "(($ac_try" in
12491 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12492 *) ac_try_echo=$ac_try;;
12493esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012494eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12495$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012496 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012497 ac_status=$?
12498 grep -v '^ *+' conftest.er1 >conftest.err
12499 rm -f conftest.er1
12500 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012501 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012502 (exit $ac_status); } && {
12503 test -z "$ac_c_werror_flag" ||
12504 test ! -s conftest.err
12505 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012506 ac_hi=-1 ac_mid=-1
12507 while :; do
12508 cat >conftest.$ac_ext <<_ACEOF
12509/* confdefs.h. */
12510_ACEOF
12511cat confdefs.h >>conftest.$ac_ext
12512cat >>conftest.$ac_ext <<_ACEOF
12513/* end confdefs.h. */
12514$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012515int
12516main ()
12517{
Antoine Pitrou20327222009-05-24 20:39:11 +000012518static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012519test_array [0] = 0
12520
12521 ;
12522 return 0;
12523}
12524_ACEOF
12525rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012526if { (ac_try="$ac_compile"
12527case "(($ac_try" in
12528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12529 *) ac_try_echo=$ac_try;;
12530esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012531eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12532$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012533 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012534 ac_status=$?
12535 grep -v '^ *+' conftest.er1 >conftest.err
12536 rm -f conftest.er1
12537 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012538 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012539 (exit $ac_status); } && {
12540 test -z "$ac_c_werror_flag" ||
12541 test ! -s conftest.err
12542 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012543 ac_lo=$ac_mid; break
12544else
Antoine Pitrou20327222009-05-24 20:39:11 +000012545 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012546sed 's/^/| /' conftest.$ac_ext >&5
12547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012548 ac_hi=`expr '(' $ac_mid ')' - 1`
12549 if test $ac_mid -le $ac_hi; then
12550 ac_lo= ac_hi=
12551 break
12552 fi
12553 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012554fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012555
12556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012557 done
12558else
Antoine Pitrou20327222009-05-24 20:39:11 +000012559 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012560sed 's/^/| /' conftest.$ac_ext >&5
12561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012563fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012564
12565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012566fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012567
12568rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012569# Binary search between lo and hi bounds.
12570while test "x$ac_lo" != "x$ac_hi"; do
12571 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12572 cat >conftest.$ac_ext <<_ACEOF
12573/* confdefs.h. */
12574_ACEOF
12575cat confdefs.h >>conftest.$ac_ext
12576cat >>conftest.$ac_ext <<_ACEOF
12577/* end confdefs.h. */
12578$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012579int
12580main ()
12581{
Antoine Pitrou20327222009-05-24 20:39:11 +000012582static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012583test_array [0] = 0
12584
12585 ;
12586 return 0;
12587}
12588_ACEOF
12589rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012590if { (ac_try="$ac_compile"
12591case "(($ac_try" in
12592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12593 *) ac_try_echo=$ac_try;;
12594esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012595eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12596$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012597 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012598 ac_status=$?
12599 grep -v '^ *+' conftest.er1 >conftest.err
12600 rm -f conftest.er1
12601 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012602 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012603 (exit $ac_status); } && {
12604 test -z "$ac_c_werror_flag" ||
12605 test ! -s conftest.err
12606 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012607 ac_hi=$ac_mid
12608else
Antoine Pitrou20327222009-05-24 20:39:11 +000012609 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012610sed 's/^/| /' conftest.$ac_ext >&5
12611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012612 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012614
12615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012616done
12617case $ac_lo in
12618?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012619'') if test "$ac_cv_type__Bool" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000012620 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12621$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12622{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012623See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012624$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012625See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000012626 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012627 else
12628 ac_cv_sizeof__Bool=0
12629 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012630esac
12631else
12632 cat >conftest.$ac_ext <<_ACEOF
12633/* confdefs.h. */
12634_ACEOF
12635cat confdefs.h >>conftest.$ac_ext
12636cat >>conftest.$ac_ext <<_ACEOF
12637/* end confdefs.h. */
12638$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +000012639static long int longval () { return (long int) (sizeof (_Bool)); }
12640static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012641#include <stdio.h>
12642#include <stdlib.h>
12643int
12644main ()
12645{
12646
12647 FILE *f = fopen ("conftest.val", "w");
12648 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012649 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000012650 if (((long int) (sizeof (_Bool))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012651 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012652 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000012653 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012654 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000012655 fprintf (f, "%ld", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012656 }
12657 else
12658 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000012660 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012661 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000012662 fprintf (f, "%lu", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012663 }
Antoine Pitrou20327222009-05-24 20:39:11 +000012664 /* Do not output a trailing newline, as this causes \r\n confusion
12665 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012667
12668 ;
12669 return 0;
12670}
12671_ACEOF
12672rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673if { (ac_try="$ac_link"
12674case "(($ac_try" in
12675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12676 *) ac_try_echo=$ac_try;;
12677esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012678eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12679$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012680 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012681 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000012682 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012683 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012684 { (case "(($ac_try" in
12685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12686 *) ac_try_echo=$ac_try;;
12687esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012688eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12689$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012690 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012691 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000012692 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012693 (exit $ac_status); }; }; then
12694 ac_cv_sizeof__Bool=`cat conftest.val`
12695else
Antoine Pitrou20327222009-05-24 20:39:11 +000012696 $as_echo "$as_me: program exited with status $ac_status" >&5
12697$as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012698sed 's/^/| /' conftest.$ac_ext >&5
12699
12700( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012701if test "$ac_cv_type__Bool" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000012702 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12703$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12704{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012705See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012706$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012707See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000012708 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709 else
12710 ac_cv_sizeof__Bool=0
12711 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012712fi
Antoine Pitrou20327222009-05-24 20:39:11 +000012713rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012714rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012715fi
12716rm -f conftest.val
12717fi
Antoine Pitrou20327222009-05-24 20:39:11 +000012718{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12719$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720
12721
12722
Thomas Woutersb2137042007-02-01 18:02:27 +000012723cat >>confdefs.h <<_ACEOF
12724#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12725_ACEOF
12726
12727
12728fi
12729
Antoine Pitrou20327222009-05-24 20:39:11 +000012730{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
12731$as_echo_n "checking for uintptr_t... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012732if test "${ac_cv_type_uintptr_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000012733 $as_echo_n "(cached) " >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012734else
Antoine Pitrou20327222009-05-24 20:39:11 +000012735 ac_cv_type_uintptr_t=no
12736cat >conftest.$ac_ext <<_ACEOF
12737/* confdefs.h. */
12738_ACEOF
12739cat confdefs.h >>conftest.$ac_ext
12740cat >>conftest.$ac_ext <<_ACEOF
12741/* end confdefs.h. */
12742#ifdef HAVE_STDINT_H
12743 #include <stdint.h>
12744 #endif
12745
12746int
12747main ()
12748{
12749if (sizeof (uintptr_t))
12750 return 0;
12751 ;
12752 return 0;
12753}
12754_ACEOF
12755rm -f conftest.$ac_objext
12756if { (ac_try="$ac_compile"
12757case "(($ac_try" in
12758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12759 *) ac_try_echo=$ac_try;;
12760esac
12761eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12762$as_echo "$ac_try_echo") >&5
12763 (eval "$ac_compile") 2>conftest.er1
12764 ac_status=$?
12765 grep -v '^ *+' conftest.er1 >conftest.err
12766 rm -f conftest.er1
12767 cat conftest.err >&5
12768 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12769 (exit $ac_status); } && {
12770 test -z "$ac_c_werror_flag" ||
12771 test ! -s conftest.err
12772 } && test -s conftest.$ac_objext; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012774/* confdefs.h. */
12775_ACEOF
12776cat confdefs.h >>conftest.$ac_ext
12777cat >>conftest.$ac_ext <<_ACEOF
12778/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012779#ifdef HAVE_STDINT_H
12780 #include <stdint.h>
12781 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012782
Martin v. Löwis11437992002-04-12 09:54:03 +000012783int
12784main ()
12785{
Antoine Pitrou20327222009-05-24 20:39:11 +000012786if (sizeof ((uintptr_t)))
12787 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012788 ;
12789 return 0;
12790}
12791_ACEOF
12792rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012793if { (ac_try="$ac_compile"
12794case "(($ac_try" in
12795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12796 *) ac_try_echo=$ac_try;;
12797esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012798eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12799$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012802 grep -v '^ *+' conftest.er1 >conftest.err
12803 rm -f conftest.er1
12804 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012805 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012806 (exit $ac_status); } && {
12807 test -z "$ac_c_werror_flag" ||
12808 test ! -s conftest.err
12809 } && test -s conftest.$ac_objext; then
Antoine Pitrou20327222009-05-24 20:39:11 +000012810 :
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012811else
Antoine Pitrou20327222009-05-24 20:39:11 +000012812 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012813sed 's/^/| /' conftest.$ac_ext >&5
12814
Antoine Pitrou20327222009-05-24 20:39:11 +000012815 ac_cv_type_uintptr_t=yes
12816fi
12817
12818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12819else
12820 $as_echo "$as_me: failed program was:" >&5
12821sed 's/^/| /' conftest.$ac_ext >&5
12822
12823
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012825
12826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012827fi
Antoine Pitrou20327222009-05-24 20:39:11 +000012828{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12829$as_echo "$ac_cv_type_uintptr_t" >&6; }
12830if test "x$ac_cv_type_uintptr_t" = x""yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012831
12832cat >>confdefs.h <<_ACEOF
12833#define HAVE_UINTPTR_T 1
12834_ACEOF
12835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012836# The cast to long int works around a bug in the HP C Compiler
12837# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12838# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12839# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +000012840{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12841$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012842if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000012843 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012844else
Martin v. Löwis11437992002-04-12 09:54:03 +000012845 if test "$cross_compiling" = yes; then
12846 # Depending upon the size, compute the lo and hi bounds.
12847cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012848/* confdefs.h. */
12849_ACEOF
12850cat confdefs.h >>conftest.$ac_ext
12851cat >>conftest.$ac_ext <<_ACEOF
12852/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012853$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012854int
12855main ()
12856{
Antoine Pitrou20327222009-05-24 20:39:11 +000012857static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012858test_array [0] = 0
12859
12860 ;
12861 return 0;
12862}
12863_ACEOF
12864rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012865if { (ac_try="$ac_compile"
12866case "(($ac_try" in
12867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12868 *) ac_try_echo=$ac_try;;
12869esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012870eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12871$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012872 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012874 grep -v '^ *+' conftest.er1 >conftest.err
12875 rm -f conftest.er1
12876 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012877 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012878 (exit $ac_status); } && {
12879 test -z "$ac_c_werror_flag" ||
12880 test ! -s conftest.err
12881 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ac_lo=0 ac_mid=0
12883 while :; do
12884 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012885/* confdefs.h. */
12886_ACEOF
12887cat confdefs.h >>conftest.$ac_ext
12888cat >>conftest.$ac_ext <<_ACEOF
12889/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012890$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012891int
12892main ()
12893{
Antoine Pitrou20327222009-05-24 20:39:11 +000012894static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012895test_array [0] = 0
12896
12897 ;
12898 return 0;
12899}
12900_ACEOF
12901rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012902if { (ac_try="$ac_compile"
12903case "(($ac_try" in
12904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12905 *) ac_try_echo=$ac_try;;
12906esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012907eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12908$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012911 grep -v '^ *+' conftest.er1 >conftest.err
12912 rm -f conftest.er1
12913 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012914 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012915 (exit $ac_status); } && {
12916 test -z "$ac_c_werror_flag" ||
12917 test ! -s conftest.err
12918 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012919 ac_hi=$ac_mid; break
12920else
Antoine Pitrou20327222009-05-24 20:39:11 +000012921 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012922sed 's/^/| /' conftest.$ac_ext >&5
12923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012924 ac_lo=`expr $ac_mid + 1`
12925 if test $ac_lo -le $ac_mid; then
12926 ac_lo= ac_hi=
12927 break
12928 fi
12929 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012930fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012931
12932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 done
12934else
Antoine Pitrou20327222009-05-24 20:39:11 +000012935 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012936sed 's/^/| /' conftest.$ac_ext >&5
12937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012939/* confdefs.h. */
12940_ACEOF
12941cat confdefs.h >>conftest.$ac_ext
12942cat >>conftest.$ac_ext <<_ACEOF
12943/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012944$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012945int
12946main ()
12947{
Antoine Pitrou20327222009-05-24 20:39:11 +000012948static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012949test_array [0] = 0
12950
12951 ;
12952 return 0;
12953}
12954_ACEOF
12955rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012956if { (ac_try="$ac_compile"
12957case "(($ac_try" in
12958 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12959 *) ac_try_echo=$ac_try;;
12960esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012961eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12962$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012963 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012964 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012965 grep -v '^ *+' conftest.er1 >conftest.err
12966 rm -f conftest.er1
12967 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000012968 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012969 (exit $ac_status); } && {
12970 test -z "$ac_c_werror_flag" ||
12971 test ! -s conftest.err
12972 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012973 ac_hi=-1 ac_mid=-1
12974 while :; do
12975 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012976/* confdefs.h. */
12977_ACEOF
12978cat confdefs.h >>conftest.$ac_ext
12979cat >>conftest.$ac_ext <<_ACEOF
12980/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012981$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012982int
12983main ()
12984{
Antoine Pitrou20327222009-05-24 20:39:11 +000012985static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012986test_array [0] = 0
12987
12988 ;
12989 return 0;
12990}
12991_ACEOF
12992rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012993if { (ac_try="$ac_compile"
12994case "(($ac_try" in
12995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12996 *) ac_try_echo=$ac_try;;
12997esac
Antoine Pitrou20327222009-05-24 20:39:11 +000012998eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12999$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013000 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013002 grep -v '^ *+' conftest.er1 >conftest.err
13003 rm -f conftest.er1
13004 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000013005 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013006 (exit $ac_status); } && {
13007 test -z "$ac_c_werror_flag" ||
13008 test ! -s conftest.err
13009 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013010 ac_lo=$ac_mid; break
13011else
Antoine Pitrou20327222009-05-24 20:39:11 +000013012 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013013sed 's/^/| /' conftest.$ac_ext >&5
13014
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013015 ac_hi=`expr '(' $ac_mid ')' - 1`
13016 if test $ac_mid -le $ac_hi; then
13017 ac_lo= ac_hi=
13018 break
13019 fi
13020 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000013021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013022
13023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013024 done
13025else
Antoine Pitrou20327222009-05-24 20:39:11 +000013026 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013027sed 's/^/| /' conftest.$ac_ext >&5
13028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013029 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000013030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013031
13032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013033fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034
13035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013036# Binary search between lo and hi bounds.
13037while test "x$ac_lo" != "x$ac_hi"; do
13038 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13039 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013040/* confdefs.h. */
13041_ACEOF
13042cat confdefs.h >>conftest.$ac_ext
13043cat >>conftest.$ac_ext <<_ACEOF
13044/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013045$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013046int
13047main ()
13048{
Antoine Pitrou20327222009-05-24 20:39:11 +000013049static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000013050test_array [0] = 0
13051
13052 ;
13053 return 0;
13054}
13055_ACEOF
13056rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013057if { (ac_try="$ac_compile"
13058case "(($ac_try" in
13059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13060 *) ac_try_echo=$ac_try;;
13061esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013062eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13063$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013066 grep -v '^ *+' conftest.er1 >conftest.err
13067 rm -f conftest.er1
13068 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000013069 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013070 (exit $ac_status); } && {
13071 test -z "$ac_c_werror_flag" ||
13072 test ! -s conftest.err
13073 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013074 ac_hi=$ac_mid
13075else
Antoine Pitrou20327222009-05-24 20:39:11 +000013076 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013077sed 's/^/| /' conftest.$ac_ext >&5
13078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013079 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000013080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013081
13082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013083done
13084case $ac_lo in
13085?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086'') if test "$ac_cv_type_uintptr_t" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000013087 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13088$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13089{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013090See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000013091$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013092See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000013093 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013094 else
13095 ac_cv_sizeof_uintptr_t=0
13096 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013097esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013098else
Martin v. Löwis11437992002-04-12 09:54:03 +000013099 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013100/* confdefs.h. */
13101_ACEOF
13102cat confdefs.h >>conftest.$ac_ext
13103cat >>conftest.$ac_ext <<_ACEOF
13104/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013105$ac_includes_default
Antoine Pitrou20327222009-05-24 20:39:11 +000013106static long int longval () { return (long int) (sizeof (uintptr_t)); }
13107static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013108#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013109#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013110int
13111main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013112{
Martin v. Löwis11437992002-04-12 09:54:03 +000013113
13114 FILE *f = fopen ("conftest.val", "w");
13115 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013116 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000013117 if (((long int) (sizeof (uintptr_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013118 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013119 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000013120 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000013122 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013123 }
13124 else
13125 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013126 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000013127 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013128 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000013129 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013130 }
Antoine Pitrou20327222009-05-24 20:39:11 +000013131 /* Do not output a trailing newline, as this causes \r\n confusion
13132 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013134
13135 ;
13136 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013137}
Martin v. Löwis11437992002-04-12 09:54:03 +000013138_ACEOF
13139rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140if { (ac_try="$ac_link"
13141case "(($ac_try" in
13142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13143 *) ac_try_echo=$ac_try;;
13144esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013145eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13146$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013148 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000013149 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013150 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013151 { (case "(($ac_try" in
13152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13153 *) ac_try_echo=$ac_try;;
13154esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013155eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13156$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013157 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013158 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000013159 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013160 (exit $ac_status); }; }; then
13161 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013162else
Antoine Pitrou20327222009-05-24 20:39:11 +000013163 $as_echo "$as_me: program exited with status $ac_status" >&5
13164$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013165sed 's/^/| /' conftest.$ac_ext >&5
13166
Martin v. Löwis11437992002-04-12 09:54:03 +000013167( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013168if test "$ac_cv_type_uintptr_t" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000013169 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13170$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13171{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013172See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000013173$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013174See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000013175 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013176 else
13177 ac_cv_sizeof_uintptr_t=0
13178 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013179fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013180rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013181rm -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 +000013182fi
13183rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013184fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013185{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13186$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013187
13188
13189
Martin v. Löwis11437992002-04-12 09:54:03 +000013190cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013191#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013192_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013193
Michael W. Hudson54241132001-12-07 15:38:26 +000013194
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013195fi
13196
Thomas Wouters89f507f2006-12-13 04:49:30 +000013197
13198
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013199# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Antoine Pitrou20327222009-05-24 20:39:11 +000013200{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5
13201$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013202if test "${ac_cv_sizeof_off_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000013203 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013204else
13205 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013206 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013207else
Martin v. Löwis11437992002-04-12 09:54:03 +000013208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013209/* confdefs.h. */
13210_ACEOF
13211cat confdefs.h >>conftest.$ac_ext
13212cat >>conftest.$ac_ext <<_ACEOF
13213/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013214#include <stdio.h>
13215#include <sys/types.h>
13216main()
13217{
13218 FILE *f=fopen("conftestval", "w");
13219 if (!f) exit(1);
13220 fprintf(f, "%d\n", sizeof(off_t));
13221 exit(0);
13222}
Martin v. Löwis11437992002-04-12 09:54:03 +000013223_ACEOF
13224rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013225if { (ac_try="$ac_link"
13226case "(($ac_try" in
13227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13228 *) ac_try_echo=$ac_try;;
13229esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013230eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13231$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013232 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013233 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000013234 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013235 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013236 { (case "(($ac_try" in
13237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13238 *) ac_try_echo=$ac_try;;
13239esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013240eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13241$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013242 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013243 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000013244 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013245 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013246 ac_cv_sizeof_off_t=`cat conftestval`
13247else
Antoine Pitrou20327222009-05-24 20:39:11 +000013248 $as_echo "$as_me: program exited with status $ac_status" >&5
13249$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013250sed 's/^/| /' conftest.$ac_ext >&5
13251
Martin v. Löwis11437992002-04-12 09:54:03 +000013252( exit $ac_status )
13253ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013254fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013255rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013256rm -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 +000013257fi
13258
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013259
13260
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013261fi
13262
Antoine Pitrou20327222009-05-24 20:39:11 +000013263{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13264$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013265
13266cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013267#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013268_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013269
Michael W. Hudson54241132001-12-07 15:38:26 +000013270
Antoine Pitrou20327222009-05-24 20:39:11 +000013271{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13272$as_echo_n "checking whether to enable large file support... " >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013273if test "$have_long_long" = yes -a \
13274 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13275 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013276
Martin v. Löwis11437992002-04-12 09:54:03 +000013277cat >>confdefs.h <<\_ACEOF
13278#define HAVE_LARGEFILE_SUPPORT 1
13279_ACEOF
13280
Antoine Pitrou20327222009-05-24 20:39:11 +000013281 { $as_echo "$as_me:$LINENO: result: yes" >&5
13282$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013283else
Antoine Pitrou20327222009-05-24 20:39:11 +000013284 { $as_echo "$as_me:$LINENO: result: no" >&5
13285$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013286fi
13287
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013288# AC_CHECK_SIZEOF() doesn't include <time.h>.
Antoine Pitrou20327222009-05-24 20:39:11 +000013289{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5
13290$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013291if test "${ac_cv_sizeof_time_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000013292 $as_echo_n "(cached) " >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013293else
13294 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013295 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013296else
Martin v. Löwis11437992002-04-12 09:54:03 +000013297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013298/* confdefs.h. */
13299_ACEOF
13300cat confdefs.h >>conftest.$ac_ext
13301cat >>conftest.$ac_ext <<_ACEOF
13302/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013303#include <stdio.h>
13304#include <time.h>
13305main()
13306{
13307 FILE *f=fopen("conftestval", "w");
13308 if (!f) exit(1);
13309 fprintf(f, "%d\n", sizeof(time_t));
13310 exit(0);
13311}
Martin v. Löwis11437992002-04-12 09:54:03 +000013312_ACEOF
13313rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013314if { (ac_try="$ac_link"
13315case "(($ac_try" in
13316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13317 *) ac_try_echo=$ac_try;;
13318esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013319eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13320$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013321 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013322 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000013323 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013324 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013325 { (case "(($ac_try" in
13326 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13327 *) ac_try_echo=$ac_try;;
13328esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013329eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13330$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013331 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013332 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000013333 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013334 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013335 ac_cv_sizeof_time_t=`cat conftestval`
13336else
Antoine Pitrou20327222009-05-24 20:39:11 +000013337 $as_echo "$as_me: program exited with status $ac_status" >&5
13338$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013339sed 's/^/| /' conftest.$ac_ext >&5
13340
Martin v. Löwis11437992002-04-12 09:54:03 +000013341( exit $ac_status )
13342ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013343fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013344rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013345rm -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 +000013346fi
13347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013348
13349
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013350fi
13351
Antoine Pitrou20327222009-05-24 20:39:11 +000013352{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13353$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013354
13355cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013356#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013357_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013358
Michael W. Hudson54241132001-12-07 15:38:26 +000013359
13360
Trent Mick635f6fb2000-08-23 21:33:05 +000013361# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013362ac_save_cc="$CC"
13363if test "$ac_cv_kpthread" = "yes"
13364then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013365elif test "$ac_cv_kthread" = "yes"
13366then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013367elif test "$ac_cv_pthread" = "yes"
13368then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013369fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013370{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5
13371$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013372have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013373cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013374/* confdefs.h. */
13375_ACEOF
13376cat confdefs.h >>conftest.$ac_ext
13377cat >>conftest.$ac_ext <<_ACEOF
13378/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013379#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013380int
13381main ()
13382{
Guido van Rossum12580492000-09-24 16:47:19 +000013383pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013384 ;
13385 return 0;
13386}
13387_ACEOF
13388rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013389if { (ac_try="$ac_compile"
13390case "(($ac_try" in
13391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13392 *) ac_try_echo=$ac_try;;
13393esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013394eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13395$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013396 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013397 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013398 grep -v '^ *+' conftest.er1 >conftest.err
13399 rm -f conftest.er1
13400 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000013401 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013402 (exit $ac_status); } && {
13403 test -z "$ac_c_werror_flag" ||
13404 test ! -s conftest.err
13405 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013406 have_pthread_t=yes
13407else
Antoine Pitrou20327222009-05-24 20:39:11 +000013408 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013409sed 's/^/| /' conftest.$ac_ext >&5
13410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013411
Trent Mick635f6fb2000-08-23 21:33:05 +000013412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013413
13414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000013415{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13416$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013417if test "$have_pthread_t" = yes ; then
13418 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Antoine Pitrou20327222009-05-24 20:39:11 +000013419 { $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5
13420$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013421 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000013422 $as_echo_n "(cached) " >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013423else
13424 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013425 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013426else
Martin v. Löwis11437992002-04-12 09:54:03 +000013427 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013428/* confdefs.h. */
13429_ACEOF
13430cat confdefs.h >>conftest.$ac_ext
13431cat >>conftest.$ac_ext <<_ACEOF
13432/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013433#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013434#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013435 main()
13436 {
13437 FILE *f=fopen("conftestval", "w");
13438 if (!f) exit(1);
13439 fprintf(f, "%d\n", sizeof(pthread_t));
13440 exit(0);
13441 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013442_ACEOF
13443rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013444if { (ac_try="$ac_link"
13445case "(($ac_try" in
13446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13447 *) ac_try_echo=$ac_try;;
13448esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013449eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13450$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013451 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013452 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000013453 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013455 { (case "(($ac_try" in
13456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13457 *) ac_try_echo=$ac_try;;
13458esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013459eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13460$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013461 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013462 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000013463 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013465 ac_cv_sizeof_pthread_t=`cat conftestval`
13466else
Antoine Pitrou20327222009-05-24 20:39:11 +000013467 $as_echo "$as_me: program exited with status $ac_status" >&5
13468$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013469sed 's/^/| /' conftest.$ac_ext >&5
13470
Martin v. Löwis11437992002-04-12 09:54:03 +000013471( exit $ac_status )
13472ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013473fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013474rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013475rm -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 +000013476fi
13477
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013478
13479
Trent Mick635f6fb2000-08-23 21:33:05 +000013480fi
13481
Antoine Pitrou20327222009-05-24 20:39:11 +000013482 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13483$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013484
13485cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013486#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013487_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013488
13489fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013490CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013491
Michael W. Hudson54241132001-12-07 15:38:26 +000013492
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013493
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013494
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013495case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013496 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013497 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13498 ;;
13499 Darwin/*)
13500 OTHER_LIBTOOL_OPT=""
13501 ;;
13502esac
13503
13504
13505case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013506 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013507 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13508 if test "${enable_universalsdk}"; then
13509 :
13510 else
13511 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
13512 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013513 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013514 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013515 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013516 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13517 if test ${gcc_version} '<' 4.0
13518 then
13519 LIBTOOL_CRUFT="-lcc_dynamic"
13520 else
13521 LIBTOOL_CRUFT=""
13522 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000013523 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000013524 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013525 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013526esac
13527
Antoine Pitrou20327222009-05-24 20:39:11 +000013528{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5
13529$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013530if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013531then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013532 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013533 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013534 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013535
Martin v. Löwis11437992002-04-12 09:54:03 +000013536cat >>confdefs.h <<\_ACEOF
13537#define WITH_NEXT_FRAMEWORK 1
13538_ACEOF
13539
Antoine Pitrou20327222009-05-24 20:39:11 +000013540 { $as_echo "$as_me:$LINENO: result: yes" >&5
13541$as_echo "yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013542else
Antoine Pitrou20327222009-05-24 20:39:11 +000013543 { $as_echo "$as_me:$LINENO: result: no" >&5
13544$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013545fi
13546
Antoine Pitrou20327222009-05-24 20:39:11 +000013547{ $as_echo "$as_me:$LINENO: checking for dyld" >&5
13548$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013549case $ac_sys_system/$ac_sys_release in
13550 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013551
Martin v. Löwis11437992002-04-12 09:54:03 +000013552cat >>confdefs.h <<\_ACEOF
13553#define WITH_DYLD 1
13554_ACEOF
13555
Antoine Pitrou20327222009-05-24 20:39:11 +000013556 { $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5
13557$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013558 ;;
13559 *)
Antoine Pitrou20327222009-05-24 20:39:11 +000013560 { $as_echo "$as_me:$LINENO: result: no" >&5
13561$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013562 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013563esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013564
Guido van Rossum0a516c91994-09-12 10:58:40 +000013565# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013566
Michael W. Hudson54241132001-12-07 15:38:26 +000013567
13568
13569
13570
Guido van Rossum0a516c91994-09-12 10:58:40 +000013571# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013572# -- usually .so, .sl on HP-UX, .dll on Cygwin
Antoine Pitrou20327222009-05-24 20:39:11 +000013573{ $as_echo "$as_me:$LINENO: checking SO" >&5
13574$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013575if test -z "$SO"
13576then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013577 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013578 hp*|HP*)
13579 case `uname -m` in
13580 ia64) SO=.so;;
13581 *) SO=.sl;;
13582 esac
13583 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013584 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013585 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013586 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013587else
13588 # this might also be a termcap variable, see #610332
13589 echo
13590 echo '====================================================================='
13591 echo '+ +'
13592 echo '+ WARNING: You have set SO in your environment. +'
13593 echo '+ Do you really mean to change the extension for shared libraries? +'
13594 echo '+ Continuing in 10 seconds to let you to ponder. +'
13595 echo '+ +'
13596 echo '====================================================================='
13597 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013598fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013599{ $as_echo "$as_me:$LINENO: result: $SO" >&5
13600$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013601
Georg Brandlb1441c72009-01-03 22:33:39 +000013602
Thomas Wouters477c8d52006-05-27 19:21:47 +000013603cat >>confdefs.h <<_ACEOF
13604#define SHLIB_EXT "$SO"
13605_ACEOF
13606
Guido van Rossum0a516c91994-09-12 10:58:40 +000013607# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013608# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013609# (Shared libraries in this instance are shared modules to be loaded into
13610# Python, as opposed to building Python itself as a shared library.)
Antoine Pitrou20327222009-05-24 20:39:11 +000013611{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5
13612$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013613if test -z "$LDSHARED"
13614then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013615 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013616 AIX*)
13617 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013618 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013619 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013620 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013621 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013622 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013623 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013624 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013625 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013626 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013627 hp*|HP*)
13628 if test "$GCC" = "yes"
13629 then LDSHARED='$(CC) -shared'
13630 else LDSHARED='ld -b';
13631 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013632 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013633 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013634 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13635 if test "$enable_framework" ; then
13636 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013637 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13638 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013639 else
13640 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013641 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013642 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013643 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013644 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13645 if test "$enable_framework" ; then
13646 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013647 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13648 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013649 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013650 # No framework, use the Python app as bundle-loader
13651 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013652 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013653 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013654 Darwin/*)
13655 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13656 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013657
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013658 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013659 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013660 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013661 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013662 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013663 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13664 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013665 else
13666 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13667 if test "$enable_framework" ; then
13668 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013669 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13670 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013671 else
13672 # No framework, use the Python app as bundle-loader
13673 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13674 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13675 fi
13676 fi
13677 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013678 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013679 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013680 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013681 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013682 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013683 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013684 else
13685 LDSHARED="ld -Bshareable ${LDFLAGS}"
13686 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013687 OpenBSD*)
13688 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13689 then
13690 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13691 else
13692 case `uname -r` in
13693 [01].* | 2.[0-7] | 2.[0-7].*)
13694 LDSHARED="ld -Bshareable ${LDFLAGS}"
13695 ;;
13696 *)
13697 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13698 ;;
13699 esac
13700 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013701 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013702 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013703 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013704 then LDSHARED='$(CC) -shared'
13705 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013706 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013707 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013708 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013709 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013710 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013711 *) LDSHARED="ld";;
13712 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013713fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013714{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5
13715$as_echo "$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013716BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013717# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013718# library (module) -- this is only needed for a few systems
Antoine Pitrou20327222009-05-24 20:39:11 +000013719{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5
13720$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013721if test -z "$CCSHARED"
13722then
Guido van Rossum07397971997-04-29 21:49:50 +000013723 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013724 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013725 then CCSHARED="-fPIC";
13726 elif test `uname -p` = sparc;
13727 then CCSHARED="-xcode=pic32";
13728 else CCSHARED="-Kpic";
13729 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013730 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013731 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013732 else CCSHARED="+z";
13733 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013734 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013735 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013736 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013737 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013738 if test "$GCC" = "yes"
13739 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013740 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013741 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013742 SCO_SV*)
13743 if test "$GCC" = "yes"
13744 then CCSHARED="-fPIC"
13745 else CCSHARED="-Kpic -belf"
13746 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013747 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013748 IRIX*/6*) case $CC in
13749 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013750 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013751 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013752 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013753 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013754fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013755{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5
13756$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013757# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013758# the python executable -- this is only needed for a few systems
Antoine Pitrou20327222009-05-24 20:39:11 +000013759{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13760$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013761if test -z "$LINKFORSHARED"
13762then
Guido van Rossum07397971997-04-29 21:49:50 +000013763 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013764 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013765 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013766 LINKFORSHARED="-Wl,-E -Wl,+s";;
13767# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013768 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013769 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013770 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013771 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013772 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013773 if test "$enable_framework"
13774 then
Jack Jansenda49e192005-01-07 13:08:22 +000013775 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013776 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013777 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013778 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013779 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013780 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013781 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013782 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13783 then
13784 LINKFORSHARED="-Wl,--export-dynamic"
13785 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013786 SunOS/5*) case $CC in
13787 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013788 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013789 then
13790 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013791 fi;;
13792 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013793 CYGWIN*)
13794 if test $enable_shared = "no"
13795 then
13796 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13797 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013798 QNX*)
13799 # -Wl,-E causes the symbols to be added to the dynamic
13800 # symbol table so that they can be found when a module
13801 # is loaded. -N 2048K causes the stack size to be set
13802 # to 2048 kilobytes so that the stack doesn't overflow
13803 # when running test_compile.py.
13804 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013805 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013806fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013807{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13808$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013809
Michael W. Hudson54241132001-12-07 15:38:26 +000013810
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013811
Antoine Pitrou20327222009-05-24 20:39:11 +000013812{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13813$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013814if test ! "$LIBRARY" = "$LDLIBRARY"
13815then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013816 case $ac_sys_system in
13817 CYGWIN*)
13818 # Cygwin needs CCSHARED when building extension DLLs
13819 # but not when building the interpreter DLL.
13820 CFLAGSFORSHARED='';;
13821 *)
13822 CFLAGSFORSHARED='$(CCSHARED)'
13823 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013824fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013825{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13826$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013827
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013828# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13829# library (with --enable-shared).
13830# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013831# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13832# if it is not required, since it creates a dependency of the shared library
13833# to LIBS. This, in turn, means that applications linking the shared libpython
13834# don't need to link LIBS explicitly. The default should be only changed
13835# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013836
Antoine Pitrou20327222009-05-24 20:39:11 +000013837{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5
13838$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013839case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013840 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013841 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013842esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013843{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5
13844$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013845
13846
Guido van Rossum627b2d71993-12-24 10:39:16 +000013847# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013848
Antoine Pitrou20327222009-05-24 20:39:11 +000013849{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13850$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013851if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000013852 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013853else
Martin v. Löwis11437992002-04-12 09:54:03 +000013854 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013855LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013856cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013857/* confdefs.h. */
13858_ACEOF
13859cat confdefs.h >>conftest.$ac_ext
13860cat >>conftest.$ac_ext <<_ACEOF
13861/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863/* Override any GCC internal prototype to avoid an error.
13864 Use char because int might match the return type of a GCC
13865 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013866#ifdef __cplusplus
13867extern "C"
13868#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013869char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013870int
13871main ()
13872{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013873return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013874 ;
13875 return 0;
13876}
13877_ACEOF
13878rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013879if { (ac_try="$ac_link"
13880case "(($ac_try" in
13881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13882 *) ac_try_echo=$ac_try;;
13883esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013884eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13885$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013886 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013888 grep -v '^ *+' conftest.er1 >conftest.err
13889 rm -f conftest.er1
13890 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000013891 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013892 (exit $ac_status); } && {
13893 test -z "$ac_c_werror_flag" ||
13894 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000013895 } && test -s conftest$ac_exeext && {
13896 test "$cross_compiling" = yes ||
13897 $as_test_x conftest$ac_exeext
13898 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013899 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013900else
Antoine Pitrou20327222009-05-24 20:39:11 +000013901 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013902sed 's/^/| /' conftest.$ac_ext >&5
13903
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013904 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013906
Antoine Pitrou20327222009-05-24 20:39:11 +000013907rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013908rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013909 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013910LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013911fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013912{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13913$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13914if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013915 cat >>confdefs.h <<_ACEOF
13916#define HAVE_LIBDL 1
13917_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013918
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013919 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013920
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013921fi
13922 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013923
Antoine Pitrou20327222009-05-24 20:39:11 +000013924{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13925$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013926if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000013927 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013928else
Martin v. Löwis11437992002-04-12 09:54:03 +000013929 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013930LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013931cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013932/* confdefs.h. */
13933_ACEOF
13934cat confdefs.h >>conftest.$ac_ext
13935cat >>conftest.$ac_ext <<_ACEOF
13936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013938/* Override any GCC internal prototype to avoid an error.
13939 Use char because int might match the return type of a GCC
13940 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013941#ifdef __cplusplus
13942extern "C"
13943#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013944char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013945int
13946main ()
13947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013949 ;
13950 return 0;
13951}
13952_ACEOF
13953rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013954if { (ac_try="$ac_link"
13955case "(($ac_try" in
13956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13957 *) ac_try_echo=$ac_try;;
13958esac
Antoine Pitrou20327222009-05-24 20:39:11 +000013959eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13960$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013961 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013963 grep -v '^ *+' conftest.er1 >conftest.err
13964 rm -f conftest.er1
13965 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000013966 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013967 (exit $ac_status); } && {
13968 test -z "$ac_c_werror_flag" ||
13969 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000013970 } && test -s conftest$ac_exeext && {
13971 test "$cross_compiling" = yes ||
13972 $as_test_x conftest$ac_exeext
13973 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013974 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013975else
Antoine Pitrou20327222009-05-24 20:39:11 +000013976 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013977sed 's/^/| /' conftest.$ac_ext >&5
13978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013981
Antoine Pitrou20327222009-05-24 20:39:11 +000013982rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013984 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013985LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013986fi
Antoine Pitrou20327222009-05-24 20:39:11 +000013987{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13988$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13989if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013990 cat >>confdefs.h <<_ACEOF
13991#define HAVE_LIBDLD 1
13992_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013993
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013994 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013995
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013996fi
13997 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013998
Georg Brandlb1441c72009-01-03 22:33:39 +000013999# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014000if test "$with_threads" = "yes" -o -z "$with_threads"; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014001 { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14002$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014003if test "${ac_cv_search_sem_init+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014004 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014005else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014006 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014007cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014008/* confdefs.h. */
14009_ACEOF
14010cat confdefs.h >>conftest.$ac_ext
14011cat >>conftest.$ac_ext <<_ACEOF
14012/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014013
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014014/* Override any GCC internal prototype to avoid an error.
14015 Use char because int might match the return type of a GCC
14016 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014017#ifdef __cplusplus
14018extern "C"
14019#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014020char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014021int
14022main ()
14023{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014024return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014025 ;
14026 return 0;
14027}
14028_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014029for ac_lib in '' pthread rt posix4; do
14030 if test -z "$ac_lib"; then
14031 ac_res="none required"
14032 else
14033 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014034 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014035 fi
14036 rm -f conftest.$ac_objext conftest$ac_exeext
14037if { (ac_try="$ac_link"
14038case "(($ac_try" in
14039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14040 *) ac_try_echo=$ac_try;;
14041esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014042eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14043$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014044 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014045 ac_status=$?
14046 grep -v '^ *+' conftest.er1 >conftest.err
14047 rm -f conftest.er1
14048 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000014049 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014050 (exit $ac_status); } && {
14051 test -z "$ac_c_werror_flag" ||
14052 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000014053 } && test -s conftest$ac_exeext && {
14054 test "$cross_compiling" = yes ||
14055 $as_test_x conftest$ac_exeext
14056 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014057 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000014058else
Antoine Pitrou20327222009-05-24 20:39:11 +000014059 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014060sed 's/^/| /' conftest.$ac_ext >&5
14061
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014062
Thomas Wouters477c8d52006-05-27 19:21:47 +000014063fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014064
Antoine Pitrou20327222009-05-24 20:39:11 +000014065rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014066rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14067 conftest$ac_exeext
14068 if test "${ac_cv_search_sem_init+set}" = set; then
14069 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014071done
14072if test "${ac_cv_search_sem_init+set}" = set; then
14073 :
14074else
14075 ac_cv_search_sem_init=no
14076fi
14077rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014078LIBS=$ac_func_search_save_LIBS
14079fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014080{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
14081$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014082ac_res=$ac_cv_search_sem_init
14083if test "$ac_res" != no; then
14084 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014085
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014086fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000014087 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000014088 # posix4 on Solaris 2.6
14089 # pthread (first!) on Linux
14090fi
14091
Martin v. Löwis19d17342003-06-14 21:03:05 +000014092# check if we need libintl for locale functions
Antoine Pitrou20327222009-05-24 20:39:11 +000014093{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
14094$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000014095if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014096 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000014097else
14098 ac_check_lib_save_LIBS=$LIBS
14099LIBS="-lintl $LIBS"
14100cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014101/* confdefs.h. */
14102_ACEOF
14103cat confdefs.h >>conftest.$ac_ext
14104cat >>conftest.$ac_ext <<_ACEOF
14105/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014107/* Override any GCC internal prototype to avoid an error.
14108 Use char because int might match the return type of a GCC
14109 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014110#ifdef __cplusplus
14111extern "C"
14112#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000014113char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014114int
14115main ()
14116{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014117return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014118 ;
14119 return 0;
14120}
14121_ACEOF
14122rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014123if { (ac_try="$ac_link"
14124case "(($ac_try" in
14125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14126 *) ac_try_echo=$ac_try;;
14127esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014128eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14129$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000014131 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014132 grep -v '^ *+' conftest.er1 >conftest.err
14133 rm -f conftest.er1
14134 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000014135 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136 (exit $ac_status); } && {
14137 test -z "$ac_c_werror_flag" ||
14138 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000014139 } && test -s conftest$ac_exeext && {
14140 test "$cross_compiling" = yes ||
14141 $as_test_x conftest$ac_exeext
14142 }; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014143 ac_cv_lib_intl_textdomain=yes
14144else
Antoine Pitrou20327222009-05-24 20:39:11 +000014145 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014146sed 's/^/| /' conftest.$ac_ext >&5
14147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014148 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000014149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014150
Antoine Pitrou20327222009-05-24 20:39:11 +000014151rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014153 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000014154LIBS=$ac_check_lib_save_LIBS
14155fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014156{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
14157$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
14158if test "x$ac_cv_lib_intl_textdomain" = x""yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014159
14160cat >>confdefs.h <<\_ACEOF
14161#define WITH_LIBINTL 1
14162_ACEOF
14163
14164fi
14165
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014166
14167# checks for system dependent C++ extensions support
14168case "$ac_sys_system" in
Antoine Pitrou20327222009-05-24 20:39:11 +000014169 AIX*) { $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14170$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014171 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014172/* confdefs.h. */
14173_ACEOF
14174cat confdefs.h >>conftest.$ac_ext
14175cat >>conftest.$ac_ext <<_ACEOF
14176/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014177#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014178int
14179main ()
14180{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014181loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014182 ;
14183 return 0;
14184}
14185_ACEOF
14186rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014187if { (ac_try="$ac_link"
14188case "(($ac_try" in
14189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14190 *) ac_try_echo=$ac_try;;
14191esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014192eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14193$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014194 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014196 grep -v '^ *+' conftest.er1 >conftest.err
14197 rm -f conftest.er1
14198 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000014199 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014200 (exit $ac_status); } && {
14201 test -z "$ac_c_werror_flag" ||
14202 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000014203 } && test -s conftest$ac_exeext && {
14204 test "$cross_compiling" = yes ||
14205 $as_test_x conftest$ac_exeext
14206 }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014207
Martin v. Löwis11437992002-04-12 09:54:03 +000014208cat >>confdefs.h <<\_ACEOF
14209#define AIX_GENUINE_CPLUSPLUS 1
14210_ACEOF
14211
Antoine Pitrou20327222009-05-24 20:39:11 +000014212 { $as_echo "$as_me:$LINENO: result: yes" >&5
14213$as_echo "yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014214else
Antoine Pitrou20327222009-05-24 20:39:11 +000014215 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014216sed 's/^/| /' conftest.$ac_ext >&5
14217
Antoine Pitrou20327222009-05-24 20:39:11 +000014218 { $as_echo "$as_me:$LINENO: result: no" >&5
14219$as_echo "no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014220fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014221
Antoine Pitrou20327222009-05-24 20:39:11 +000014222rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014223rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014224 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014225 *) ;;
14226esac
14227
Guido van Rossum70c7f481998-03-26 18:44:10 +000014228# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Antoine Pitrou20327222009-05-24 20:39:11 +000014229{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14230$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014231if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014232 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014233else
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014235LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014236cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014237/* confdefs.h. */
14238_ACEOF
14239cat confdefs.h >>conftest.$ac_ext
14240cat >>conftest.$ac_ext <<_ACEOF
14241/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014243/* Override any GCC internal prototype to avoid an error.
14244 Use char because int might match the return type of a GCC
14245 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014246#ifdef __cplusplus
14247extern "C"
14248#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014249char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014250int
14251main ()
14252{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014254 ;
14255 return 0;
14256}
14257_ACEOF
14258rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014259if { (ac_try="$ac_link"
14260case "(($ac_try" in
14261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14262 *) ac_try_echo=$ac_try;;
14263esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014264eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14265$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014266 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014268 grep -v '^ *+' conftest.er1 >conftest.err
14269 rm -f conftest.er1
14270 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000014271 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014272 (exit $ac_status); } && {
14273 test -z "$ac_c_werror_flag" ||
14274 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000014275 } && test -s conftest$ac_exeext && {
14276 test "$cross_compiling" = yes ||
14277 $as_test_x conftest$ac_exeext
14278 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014279 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014280else
Antoine Pitrou20327222009-05-24 20:39:11 +000014281 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014282sed 's/^/| /' conftest.$ac_ext >&5
14283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014284 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014286
Antoine Pitrou20327222009-05-24 20:39:11 +000014287rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014288rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014289 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014290LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014291fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014292{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14293$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
14294if test "x$ac_cv_lib_nsl_t_open" = x""yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014295 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014296fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014297 # SVR4
Antoine Pitrou20327222009-05-24 20:39:11 +000014298{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14299$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014300if test "${ac_cv_lib_socket_socket+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014301 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014302else
Martin v. Löwis11437992002-04-12 09:54:03 +000014303 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014304LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014305cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014306/* confdefs.h. */
14307_ACEOF
14308cat confdefs.h >>conftest.$ac_ext
14309cat >>conftest.$ac_ext <<_ACEOF
14310/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014311
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312/* Override any GCC internal prototype to avoid an error.
14313 Use char because int might match the return type of a GCC
14314 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014315#ifdef __cplusplus
14316extern "C"
14317#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014318char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014319int
14320main ()
14321{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014322return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014323 ;
14324 return 0;
14325}
14326_ACEOF
14327rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328if { (ac_try="$ac_link"
14329case "(($ac_try" in
14330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14331 *) ac_try_echo=$ac_try;;
14332esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014333eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14334$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014335 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014337 grep -v '^ *+' conftest.er1 >conftest.err
14338 rm -f conftest.er1
14339 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000014340 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014341 (exit $ac_status); } && {
14342 test -z "$ac_c_werror_flag" ||
14343 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000014344 } && test -s conftest$ac_exeext && {
14345 test "$cross_compiling" = yes ||
14346 $as_test_x conftest$ac_exeext
14347 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014348 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014349else
Antoine Pitrou20327222009-05-24 20:39:11 +000014350 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014351sed 's/^/| /' conftest.$ac_ext >&5
14352
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014353 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014355
Antoine Pitrou20327222009-05-24 20:39:11 +000014356rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014357rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014359LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014360fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014361{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14362$as_echo "$ac_cv_lib_socket_socket" >&6; }
14363if test "x$ac_cv_lib_socket_socket" = x""yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014364 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014365fi
14366 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014367
Antoine Pitrou20327222009-05-24 20:39:11 +000014368{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5
14369$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014371# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014372if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014373 withval=$with_libs;
Antoine Pitrou20327222009-05-24 20:39:11 +000014374{ $as_echo "$as_me:$LINENO: result: $withval" >&5
14375$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014376LIBS="$withval $LIBS"
14377
14378else
Antoine Pitrou20327222009-05-24 20:39:11 +000014379 { $as_echo "$as_me:$LINENO: result: no" >&5
14380$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014381fi
14382
Guido van Rossum7f43da71994-08-01 12:15:30 +000014383
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014384# Check for use of the system libffi library
Antoine Pitrou20327222009-05-24 20:39:11 +000014385{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14386$as_echo_n "checking for --with-system-ffi... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014388# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014389if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014390 withval=$with_system_ffi;
14391fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014392
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014393
Antoine Pitrou20327222009-05-24 20:39:11 +000014394{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14395$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014396
Matthias Klose55708cc2009-04-30 08:06:49 +000014397# Check for --with-dbmliborder
Antoine Pitrou20327222009-05-24 20:39:11 +000014398{ $as_echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14399$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014400
14401# Check whether --with-dbmliborder was given.
14402if test "${with_dbmliborder+set}" = set; then
14403 withval=$with_dbmliborder;
14404if test x$with_dbmliborder = xyes
14405then
Antoine Pitrou20327222009-05-24 20:39:11 +000014406{ { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14407$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014408 { (exit 1); exit 1; }; }
14409else
14410 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14411 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14412 then
Antoine Pitrou20327222009-05-24 20:39:11 +000014413 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14414$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014415 { (exit 1); exit 1; }; }
14416 fi
14417 done
14418fi
14419fi
14420
Antoine Pitrou20327222009-05-24 20:39:11 +000014421{ $as_echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14422$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014423
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014424# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014425
14426
Antoine Pitrou20327222009-05-24 20:39:11 +000014427{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14428$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014431if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014432 withval=$with_signal_module;
14433fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014434
14435
14436if test -z "$with_signal_module"
14437then with_signal_module="yes"
14438fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014439{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5
14440$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014441
14442if test "${with_signal_module}" = "yes"; then
14443 USE_SIGNAL_MODULE=""
14444 SIGNAL_OBJS=""
14445else
14446 USE_SIGNAL_MODULE="#"
14447 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14448fi
14449
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014450# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014451
Barry Warsawc0d24d82000-06-29 16:12:00 +000014452USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014453
Antoine Pitrou20327222009-05-24 20:39:11 +000014454{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14455$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014456
Guido van Rossumec2f0731997-01-22 20:54:01 +000014457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014458# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014459if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460 withval=$with_dec_threads;
Antoine Pitrou20327222009-05-24 20:39:11 +000014461{ $as_echo "$as_me:$LINENO: result: $withval" >&5
14462$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014463LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014464if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014465 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014466fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014467else
Antoine Pitrou20327222009-05-24 20:39:11 +000014468 { $as_echo "$as_me:$LINENO: result: no" >&5
14469$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014470fi
14471
Martin v. Löwis11437992002-04-12 09:54:03 +000014472
14473# Templates for things AC_DEFINEd more than once.
14474# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014475
14476
Martin v. Löwis11437992002-04-12 09:54:03 +000014477
14478
14479
14480
14481
Antoine Pitrou20327222009-05-24 20:39:11 +000014482{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5
14483$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014485# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014486if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014487 withval=$with_threads;
14488fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014489
14490
Barry Warsawc0d24d82000-06-29 16:12:00 +000014491# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014493# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014494if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495 withval=$with_thread; with_threads=$with_thread
14496fi
14497
Barry Warsawc0d24d82000-06-29 16:12:00 +000014498
14499if test -z "$with_threads"
14500then with_threads="yes"
14501fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014502{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5
14503$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000014504
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014505
Barry Warsawc0d24d82000-06-29 16:12:00 +000014506if test "$with_threads" = "no"
14507then
14508 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014509elif test "$ac_cv_pthread_is_default" = yes
14510then
Martin v. Löwis11437992002-04-12 09:54:03 +000014511 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014512#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014513_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014514
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014515 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014516 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014517#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014518_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014519
14520 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014521 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014522elif test "$ac_cv_kpthread" = "yes"
14523then
14524 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014525 if test "$ac_cv_cxx_thread" = "yes"; then
14526 CXX="$CXX -Kpthread"
14527 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014528 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014529#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014530_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014531
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014532 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014533 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014534elif test "$ac_cv_kthread" = "yes"
14535then
14536 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014537 if test "$ac_cv_cxx_thread" = "yes"; then
14538 CXX="$CXX -Kthread"
14539 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014540 cat >>confdefs.h <<\_ACEOF
14541#define WITH_THREAD 1
14542_ACEOF
14543
14544 posix_threads=yes
14545 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014546elif test "$ac_cv_pthread" = "yes"
14547then
14548 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014549 if test "$ac_cv_cxx_thread" = "yes"; then
14550 CXX="$CXX -pthread"
14551 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014552 cat >>confdefs.h <<\_ACEOF
14553#define WITH_THREAD 1
14554_ACEOF
14555
14556 posix_threads=yes
14557 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014558else
14559 if test ! -z "$with_threads" -a -d "$with_threads"
14560 then LDFLAGS="$LDFLAGS -L$with_threads"
14561 fi
14562 if test ! -z "$withval" -a -d "$withval"
14563 then LDFLAGS="$LDFLAGS -L$withval"
14564 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014565
14566 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014567 # define _POSIX_THREADS in unistd.h. Some apparently don't
14568 # (e.g. gnu pth with pthread emulation)
Antoine Pitrou20327222009-05-24 20:39:11 +000014569 { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14570$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014572/* confdefs.h. */
14573_ACEOF
14574cat confdefs.h >>conftest.$ac_ext
14575cat >>conftest.$ac_ext <<_ACEOF
14576/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014577
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014578#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014579#ifdef _POSIX_THREADS
14580yes
14581#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014582
14583_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014584if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014585 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014586 unistd_defines_pthreads=yes
14587else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014588 unistd_defines_pthreads=no
14589fi
14590rm -f conftest*
14591
Antoine Pitrou20327222009-05-24 20:39:11 +000014592 { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14593$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014594
Martin v. Löwis11437992002-04-12 09:54:03 +000014595 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014596#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014597_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014598
Martin v. Löwis11437992002-04-12 09:54:03 +000014599 if test "${ac_cv_header_cthreads_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014600 { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
14601$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014602if test "${ac_cv_header_cthreads_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014603 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014604fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014605{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14606$as_echo "$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014607else
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 # Is the header compilable?
Antoine Pitrou20327222009-05-24 20:39:11 +000014609{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14610$as_echo_n "checking cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014611cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014612/* confdefs.h. */
14613_ACEOF
14614cat confdefs.h >>conftest.$ac_ext
14615cat >>conftest.$ac_ext <<_ACEOF
14616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014617$ac_includes_default
14618#include <cthreads.h>
14619_ACEOF
14620rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014621if { (ac_try="$ac_compile"
14622case "(($ac_try" in
14623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14624 *) ac_try_echo=$ac_try;;
14625esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014626eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14627$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014628 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014630 grep -v '^ *+' conftest.er1 >conftest.err
14631 rm -f conftest.er1
14632 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000014633 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014634 (exit $ac_status); } && {
14635 test -z "$ac_c_werror_flag" ||
14636 test ! -s conftest.err
14637 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014638 ac_header_compiler=yes
14639else
Antoine Pitrou20327222009-05-24 20:39:11 +000014640 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014641sed 's/^/| /' conftest.$ac_ext >&5
14642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014645
14646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000014647{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14648$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014649
14650# Is the header present?
Antoine Pitrou20327222009-05-24 20:39:11 +000014651{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14652$as_echo_n "checking cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014653cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014654/* confdefs.h. */
14655_ACEOF
14656cat confdefs.h >>conftest.$ac_ext
14657cat >>conftest.$ac_ext <<_ACEOF
14658/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014659#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014660_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014661if { (ac_try="$ac_cpp conftest.$ac_ext"
14662case "(($ac_try" in
14663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14664 *) ac_try_echo=$ac_try;;
14665esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014666eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14667$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014670 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014671 rm -f conftest.er1
14672 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000014673 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014674 (exit $ac_status); } >/dev/null && {
14675 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14676 test ! -s conftest.err
14677 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014678 ac_header_preproc=yes
14679else
Antoine Pitrou20327222009-05-24 20:39:11 +000014680 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014681sed 's/^/| /' conftest.$ac_ext >&5
14682
Martin v. Löwis11437992002-04-12 09:54:03 +000014683 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014685
Martin v. Löwis11437992002-04-12 09:54:03 +000014686rm -f conftest.err conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000014687{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14688$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014689
14690# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014691case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14692 yes:no: )
Antoine Pitrou20327222009-05-24 20:39:11 +000014693 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14694$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14695 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14696$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014697 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014698 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014699 no:yes:* )
Antoine Pitrou20327222009-05-24 20:39:11 +000014700 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14701$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14702 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14703$as_echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14704 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14705$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14706 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14707$as_echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14708 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14709$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14710 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14711$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014712 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014713## -------------------------------------- ##
14714## Report this to http://bugs.python.org/ ##
14715## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014716_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014717 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014718 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014719esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014720{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
14721$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014722if test "${ac_cv_header_cthreads_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014723 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014724else
14725 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014726fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014727{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14728$as_echo "$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014729
14730fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014731if test "x$ac_cv_header_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014732 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014733#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014734_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014735
Martin v. Löwis11437992002-04-12 09:54:03 +000014736 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014737#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014738_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014739
Martin v. Löwis11437992002-04-12 09:54:03 +000014740
14741cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014742#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014743_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014744
14745 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014746 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014747else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014748
Martin v. Löwis11437992002-04-12 09:54:03 +000014749 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014750 { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14751$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014752if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014753 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014754fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014755{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14756$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014757else
Martin v. Löwis11437992002-04-12 09:54:03 +000014758 # Is the header compilable?
Antoine Pitrou20327222009-05-24 20:39:11 +000014759{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14760$as_echo_n "checking mach/cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014761cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014762/* confdefs.h. */
14763_ACEOF
14764cat confdefs.h >>conftest.$ac_ext
14765cat >>conftest.$ac_ext <<_ACEOF
14766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014767$ac_includes_default
14768#include <mach/cthreads.h>
14769_ACEOF
14770rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014771if { (ac_try="$ac_compile"
14772case "(($ac_try" in
14773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14774 *) ac_try_echo=$ac_try;;
14775esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014776eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14777$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014780 grep -v '^ *+' conftest.er1 >conftest.err
14781 rm -f conftest.er1
14782 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000014783 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784 (exit $ac_status); } && {
14785 test -z "$ac_c_werror_flag" ||
14786 test ! -s conftest.err
14787 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014788 ac_header_compiler=yes
14789else
Antoine Pitrou20327222009-05-24 20:39:11 +000014790 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014791sed 's/^/| /' conftest.$ac_ext >&5
14792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014793 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014795
14796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000014797{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14798$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014799
14800# Is the header present?
Antoine Pitrou20327222009-05-24 20:39:11 +000014801{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14802$as_echo_n "checking mach/cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014803cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014804/* confdefs.h. */
14805_ACEOF
14806cat confdefs.h >>conftest.$ac_ext
14807cat >>conftest.$ac_ext <<_ACEOF
14808/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014809#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014810_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811if { (ac_try="$ac_cpp conftest.$ac_ext"
14812case "(($ac_try" in
14813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14814 *) ac_try_echo=$ac_try;;
14815esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014816eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14817$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014818 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014819 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014820 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 rm -f conftest.er1
14822 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000014823 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014824 (exit $ac_status); } >/dev/null && {
14825 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14826 test ! -s conftest.err
14827 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014828 ac_header_preproc=yes
14829else
Antoine Pitrou20327222009-05-24 20:39:11 +000014830 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014831sed 's/^/| /' conftest.$ac_ext >&5
14832
Martin v. Löwis11437992002-04-12 09:54:03 +000014833 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014834fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014835
Martin v. Löwis11437992002-04-12 09:54:03 +000014836rm -f conftest.err conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000014837{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14838$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014839
14840# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014841case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14842 yes:no: )
Antoine Pitrou20327222009-05-24 20:39:11 +000014843 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14844$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14845 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14846$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014847 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014848 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014849 no:yes:* )
Antoine Pitrou20327222009-05-24 20:39:11 +000014850 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14851$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14852 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14853$as_echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14854 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14855$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14856 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14857$as_echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14858 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14859$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14860 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14861$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014862 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014863## -------------------------------------- ##
14864## Report this to http://bugs.python.org/ ##
14865## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014866_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014867 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014868 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014869esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014870{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14871$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014872if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014873 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014874else
14875 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014876fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014877{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14878$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014879
14880fi
Antoine Pitrou20327222009-05-24 20:39:11 +000014881if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014882 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014883#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014884_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014885
Martin v. Löwis11437992002-04-12 09:54:03 +000014886 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014887#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014888_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014889
Martin v. Löwis11437992002-04-12 09:54:03 +000014890
14891cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014892#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014893_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014894
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014895 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014896else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014897
Antoine Pitrou20327222009-05-24 20:39:11 +000014898 { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5
14899$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014901# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014902if test "${with_pth+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014903 withval=$with_pth; { $as_echo "$as_me:$LINENO: result: $withval" >&5
14904$as_echo "$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014905 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014906#define WITH_THREAD 1
14907_ACEOF
14908
14909
14910cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014911#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014912_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014913
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014914 LIBS="-lpth $LIBS"
14915 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014916else
Antoine Pitrou20327222009-05-24 20:39:11 +000014917 { $as_echo "$as_me:$LINENO: result: no" >&5
14918$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014919
14920 # Just looking for pthread_create in libpthread is not enough:
14921 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14922 # So we really have to include pthread.h, and then link.
14923 _libs=$LIBS
14924 LIBS="$LIBS -lpthread"
Antoine Pitrou20327222009-05-24 20:39:11 +000014925 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14926$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014927 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014928/* confdefs.h. */
14929_ACEOF
14930cat confdefs.h >>conftest.$ac_ext
14931cat >>conftest.$ac_ext <<_ACEOF
14932/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014933#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014934
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014935void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014936int
14937main ()
14938{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014939
14940pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 ;
14942 return 0;
14943}
14944_ACEOF
14945rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014946if { (ac_try="$ac_link"
14947case "(($ac_try" in
14948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14949 *) ac_try_echo=$ac_try;;
14950esac
Antoine Pitrou20327222009-05-24 20:39:11 +000014951eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14952$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014953 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014955 grep -v '^ *+' conftest.er1 >conftest.err
14956 rm -f conftest.er1
14957 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000014958 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959 (exit $ac_status); } && {
14960 test -z "$ac_c_werror_flag" ||
14961 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000014962 } && test -s conftest$ac_exeext && {
14963 test "$cross_compiling" = yes ||
14964 $as_test_x conftest$ac_exeext
14965 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014966
Antoine Pitrou20327222009-05-24 20:39:11 +000014967 { $as_echo "$as_me:$LINENO: result: yes" >&5
14968$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014969 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014970#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014971_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014972
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014973 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014974 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014975else
Antoine Pitrou20327222009-05-24 20:39:11 +000014976 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014977sed 's/^/| /' conftest.$ac_ext >&5
14978
Martin v. Löwis11437992002-04-12 09:54:03 +000014979
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014980 LIBS=$_libs
Antoine Pitrou20327222009-05-24 20:39:11 +000014981 { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5
14982$as_echo_n "checking for pthread_detach... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014983if test "${ac_cv_func_pthread_detach+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000014984 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014985else
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014987/* confdefs.h. */
14988_ACEOF
14989cat confdefs.h >>conftest.$ac_ext
14990cat >>conftest.$ac_ext <<_ACEOF
14991/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014992/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14993 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14994#define pthread_detach innocuous_pthread_detach
14995
Guido van Rossumad678af1998-10-02 14:42:15 +000014996/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014997 which can conflict with char pthread_detach (); below.
14998 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014999 <limits.h> exists even on freestanding compilers. */
15000
15001#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015002# include <limits.h>
15003#else
15004# include <assert.h>
15005#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015006
15007#undef pthread_detach
15008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015009/* Override any GCC internal prototype to avoid an error.
15010 Use char because int might match the return type of a GCC
15011 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015012#ifdef __cplusplus
15013extern "C"
15014#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015015char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015016/* The GNU C library defines this for functions which it implements
15017 to always fail with ENOSYS. Some functions are actually named
15018 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015020choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015021#endif
15022
Skip Montanaro6dead952003-09-25 14:50:04 +000015023int
15024main ()
15025{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015026return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015027 ;
15028 return 0;
15029}
15030_ACEOF
15031rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032if { (ac_try="$ac_link"
15033case "(($ac_try" in
15034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15035 *) ac_try_echo=$ac_try;;
15036esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015037eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15038$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015039 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015040 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015041 grep -v '^ *+' conftest.er1 >conftest.err
15042 rm -f conftest.er1
15043 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000015044 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045 (exit $ac_status); } && {
15046 test -z "$ac_c_werror_flag" ||
15047 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000015048 } && test -s conftest$ac_exeext && {
15049 test "$cross_compiling" = yes ||
15050 $as_test_x conftest$ac_exeext
15051 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015052 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015053else
Antoine Pitrou20327222009-05-24 20:39:11 +000015054 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015055sed 's/^/| /' conftest.$ac_ext >&5
15056
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015057 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015058fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015059
Antoine Pitrou20327222009-05-24 20:39:11 +000015060rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015061rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015062 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015063fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015064{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15065$as_echo "$ac_cv_func_pthread_detach" >&6; }
15066if test "x$ac_cv_func_pthread_detach" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015067 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015068#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015069_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015070
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015071 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015072 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015073else
Guido van Rossumad678af1998-10-02 14:42:15 +000015074
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015075 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015076 { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15077$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015078if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015079 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015080fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015081{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15082$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015083else
15084 # Is the header compilable?
Antoine Pitrou20327222009-05-24 20:39:11 +000015085{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
15086$as_echo_n "checking atheos/threads.h usability... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015087cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015088/* confdefs.h. */
15089_ACEOF
15090cat confdefs.h >>conftest.$ac_ext
15091cat >>conftest.$ac_ext <<_ACEOF
15092/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015093$ac_includes_default
15094#include <atheos/threads.h>
15095_ACEOF
15096rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097if { (ac_try="$ac_compile"
15098case "(($ac_try" in
15099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15100 *) ac_try_echo=$ac_try;;
15101esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015102eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15103$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015104 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015105 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015106 grep -v '^ *+' conftest.er1 >conftest.err
15107 rm -f conftest.er1
15108 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000015109 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110 (exit $ac_status); } && {
15111 test -z "$ac_c_werror_flag" ||
15112 test ! -s conftest.err
15113 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015114 ac_header_compiler=yes
15115else
Antoine Pitrou20327222009-05-24 20:39:11 +000015116 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015117sed 's/^/| /' conftest.$ac_ext >&5
15118
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015119 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015121
15122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000015123{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15124$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015125
15126# Is the header present?
Antoine Pitrou20327222009-05-24 20:39:11 +000015127{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
15128$as_echo_n "checking atheos/threads.h presence... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015129cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015130/* confdefs.h. */
15131_ACEOF
15132cat confdefs.h >>conftest.$ac_ext
15133cat >>conftest.$ac_ext <<_ACEOF
15134/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015135#include <atheos/threads.h>
15136_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015137if { (ac_try="$ac_cpp conftest.$ac_ext"
15138case "(($ac_try" in
15139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15140 *) ac_try_echo=$ac_try;;
15141esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015142eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15143$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015144 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015145 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015146 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015147 rm -f conftest.er1
15148 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000015149 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150 (exit $ac_status); } >/dev/null && {
15151 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15152 test ! -s conftest.err
15153 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015154 ac_header_preproc=yes
15155else
Antoine Pitrou20327222009-05-24 20:39:11 +000015156 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015157sed 's/^/| /' conftest.$ac_ext >&5
15158
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015159 ac_header_preproc=no
15160fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015162rm -f conftest.err conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000015163{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15164$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015165
15166# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015167case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15168 yes:no: )
Antoine Pitrou20327222009-05-24 20:39:11 +000015169 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15170$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15171 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15172$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015173 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015174 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015175 no:yes:* )
Antoine Pitrou20327222009-05-24 20:39:11 +000015176 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15177$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
15178 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15179$as_echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15180 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15181$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15182 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15183$as_echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15184 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15185$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15186 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15187$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015188 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015189## -------------------------------------- ##
15190## Report this to http://bugs.python.org/ ##
15191## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015192_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015193 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015194 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015195esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015196{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15197$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015198if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015199 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015200else
15201 ac_cv_header_atheos_threads_h=$ac_header_preproc
15202fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015203{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15204$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015205
15206fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015207if test "x$ac_cv_header_atheos_threads_h" = x""yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015208 cat >>confdefs.h <<\_ACEOF
15209#define WITH_THREAD 1
15210_ACEOF
15211
15212
15213cat >>confdefs.h <<\_ACEOF
15214#define ATHEOS_THREADS 1
15215_ACEOF
15216
15217 THREADOBJ="Python/thread.o"
15218else
15219
Antoine Pitrou20327222009-05-24 20:39:11 +000015220 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15221$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015222if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015223 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015224else
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015226LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015227cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015228/* confdefs.h. */
15229_ACEOF
15230cat confdefs.h >>conftest.$ac_ext
15231cat >>conftest.$ac_ext <<_ACEOF
15232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015233
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234/* Override any GCC internal prototype to avoid an error.
15235 Use char because int might match the return type of a GCC
15236 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015237#ifdef __cplusplus
15238extern "C"
15239#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015240char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015241int
15242main ()
15243{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015244return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015245 ;
15246 return 0;
15247}
15248_ACEOF
15249rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015250if { (ac_try="$ac_link"
15251case "(($ac_try" in
15252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15253 *) ac_try_echo=$ac_try;;
15254esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015255eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15256$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015257 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015258 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015259 grep -v '^ *+' conftest.er1 >conftest.err
15260 rm -f conftest.er1
15261 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000015262 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015263 (exit $ac_status); } && {
15264 test -z "$ac_c_werror_flag" ||
15265 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000015266 } && test -s conftest$ac_exeext && {
15267 test "$cross_compiling" = yes ||
15268 $as_test_x conftest$ac_exeext
15269 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015270 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015271else
Antoine Pitrou20327222009-05-24 20:39:11 +000015272 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015273sed 's/^/| /' conftest.$ac_ext >&5
15274
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015275 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015276fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015277
Antoine Pitrou20327222009-05-24 20:39:11 +000015278rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015279rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015280 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015281LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015282fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015283{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15284$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
15285if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015286 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015287#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015288_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015289
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015290 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015291 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015292 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015293else
Greg Steinadf63d62000-07-05 10:38:09 +000015294
Antoine Pitrou20327222009-05-24 20:39:11 +000015295 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15296$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015297if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015298 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015299else
Martin v. Löwis11437992002-04-12 09:54:03 +000015300 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015301LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015302cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015303/* confdefs.h. */
15304_ACEOF
15305cat confdefs.h >>conftest.$ac_ext
15306cat >>conftest.$ac_ext <<_ACEOF
15307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015308
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015309/* Override any GCC internal prototype to avoid an error.
15310 Use char because int might match the return type of a GCC
15311 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015312#ifdef __cplusplus
15313extern "C"
15314#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015315char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015316int
15317main ()
15318{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015319return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015320 ;
15321 return 0;
15322}
15323_ACEOF
15324rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015325if { (ac_try="$ac_link"
15326case "(($ac_try" in
15327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15328 *) ac_try_echo=$ac_try;;
15329esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015330eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15331$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015332 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015334 grep -v '^ *+' conftest.er1 >conftest.err
15335 rm -f conftest.er1
15336 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000015337 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015338 (exit $ac_status); } && {
15339 test -z "$ac_c_werror_flag" ||
15340 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000015341 } && test -s conftest$ac_exeext && {
15342 test "$cross_compiling" = yes ||
15343 $as_test_x conftest$ac_exeext
15344 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015345 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015346else
Antoine Pitrou20327222009-05-24 20:39:11 +000015347 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015348sed 's/^/| /' conftest.$ac_ext >&5
15349
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015350 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015351fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015352
Antoine Pitrou20327222009-05-24 20:39:11 +000015353rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015355 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015356LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015357fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015358{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15359$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
15360if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015361 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015362#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015363_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015364
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015365 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015366 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015367 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015368else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015369
Antoine Pitrou20327222009-05-24 20:39:11 +000015370 { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15371$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015372if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015373 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015374else
Martin v. Löwis11437992002-04-12 09:54:03 +000015375 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015376LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015377cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015378/* confdefs.h. */
15379_ACEOF
15380cat confdefs.h >>conftest.$ac_ext
15381cat >>conftest.$ac_ext <<_ACEOF
15382/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015383
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015384/* Override any GCC internal prototype to avoid an error.
15385 Use char because int might match the return type of a GCC
15386 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015387#ifdef __cplusplus
15388extern "C"
15389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015390char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015391int
15392main ()
15393{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015394return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015395 ;
15396 return 0;
15397}
15398_ACEOF
15399rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015400if { (ac_try="$ac_link"
15401case "(($ac_try" in
15402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15403 *) ac_try_echo=$ac_try;;
15404esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015405eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15406$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015407 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015408 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015409 grep -v '^ *+' conftest.er1 >conftest.err
15410 rm -f conftest.er1
15411 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000015412 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413 (exit $ac_status); } && {
15414 test -z "$ac_c_werror_flag" ||
15415 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000015416 } && test -s conftest$ac_exeext && {
15417 test "$cross_compiling" = yes ||
15418 $as_test_x conftest$ac_exeext
15419 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015420 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015421else
Antoine Pitrou20327222009-05-24 20:39:11 +000015422 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015423sed 's/^/| /' conftest.$ac_ext >&5
15424
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015425 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427
Antoine Pitrou20327222009-05-24 20:39:11 +000015428rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015429rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015430 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015431LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015432fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015433{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15434$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
15435if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015436 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015437#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015438_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015439
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015440 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015441 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015442 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015443else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015444
Antoine Pitrou20327222009-05-24 20:39:11 +000015445 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15446$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015447if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015448 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015449else
Martin v. Löwis11437992002-04-12 09:54:03 +000015450 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015451LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015452cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015453/* confdefs.h. */
15454_ACEOF
15455cat confdefs.h >>conftest.$ac_ext
15456cat >>conftest.$ac_ext <<_ACEOF
15457/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015458
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015459/* Override any GCC internal prototype to avoid an error.
15460 Use char because int might match the return type of a GCC
15461 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015462#ifdef __cplusplus
15463extern "C"
15464#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015465char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015466int
15467main ()
15468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015469return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015470 ;
15471 return 0;
15472}
15473_ACEOF
15474rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015475if { (ac_try="$ac_link"
15476case "(($ac_try" in
15477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15478 *) ac_try_echo=$ac_try;;
15479esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015480eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15481$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015482 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015484 grep -v '^ *+' conftest.er1 >conftest.err
15485 rm -f conftest.er1
15486 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000015487 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015488 (exit $ac_status); } && {
15489 test -z "$ac_c_werror_flag" ||
15490 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000015491 } && test -s conftest$ac_exeext && {
15492 test "$cross_compiling" = yes ||
15493 $as_test_x conftest$ac_exeext
15494 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015495 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015496else
Antoine Pitrou20327222009-05-24 20:39:11 +000015497 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015498sed 's/^/| /' conftest.$ac_ext >&5
15499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015500 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502
Antoine Pitrou20327222009-05-24 20:39:11 +000015503rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015504rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015505 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015506LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015507fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015508{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15509$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
15510if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015511 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015512#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015513_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015514
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015515 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015516 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015517 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015518else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015519
Martin v. Löwis130fb172001-07-19 11:00:41 +000015520 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015521fi
15522
Guido van Rossum627b2d71993-12-24 10:39:16 +000015523
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015524fi
15525
Guido van Rossum0be3e491997-05-22 20:33:33 +000015526fi
15527
Guido van Rossum49545951997-12-02 19:28:29 +000015528fi
15529
Guido van Rossumb93a8621998-05-07 13:27:32 +000015530fi
15531
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015532
Michael W. Hudson54241132001-12-07 15:38:26 +000015533fi
15534
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015536
Antoine Pitrou20327222009-05-24 20:39:11 +000015537rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015539 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015540fi
15541
Martin v. Löwis11437992002-04-12 09:54:03 +000015542fi
15543
15544
15545fi
15546
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015547
Michael W. Hudson54241132001-12-07 15:38:26 +000015548
Antoine Pitrou20327222009-05-24 20:39:11 +000015549 { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15550$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015551if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015552 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015553else
Martin v. Löwis11437992002-04-12 09:54:03 +000015554 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015555LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015556cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015557/* confdefs.h. */
15558_ACEOF
15559cat confdefs.h >>conftest.$ac_ext
15560cat >>conftest.$ac_ext <<_ACEOF
15561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015562
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015563/* Override any GCC internal prototype to avoid an error.
15564 Use char because int might match the return type of a GCC
15565 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015566#ifdef __cplusplus
15567extern "C"
15568#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015569char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015570int
15571main ()
15572{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015573return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015574 ;
15575 return 0;
15576}
15577_ACEOF
15578rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015579if { (ac_try="$ac_link"
15580case "(($ac_try" in
15581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15582 *) ac_try_echo=$ac_try;;
15583esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015584eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15585$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015586 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015588 grep -v '^ *+' conftest.er1 >conftest.err
15589 rm -f conftest.er1
15590 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000015591 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015592 (exit $ac_status); } && {
15593 test -z "$ac_c_werror_flag" ||
15594 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000015595 } && test -s conftest$ac_exeext && {
15596 test "$cross_compiling" = yes ||
15597 $as_test_x conftest$ac_exeext
15598 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015599 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015600else
Antoine Pitrou20327222009-05-24 20:39:11 +000015601 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015602sed 's/^/| /' conftest.$ac_ext >&5
15603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015604 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015606
Antoine Pitrou20327222009-05-24 20:39:11 +000015607rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015608rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015609 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015610LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015611fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015612{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15613$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
15614if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015615 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015616#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015617_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015618
Martin v. Löwis130fb172001-07-19 11:00:41 +000015619 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015620 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015621 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015622fi
15623
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015624
Neal Norwitza978ab02002-11-02 16:58:05 +000015625 if test "$posix_threads" != "yes"; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015626 { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15627$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015628if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015629 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015630else
Martin v. Löwis11437992002-04-12 09:54:03 +000015631 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015632LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015634/* confdefs.h. */
15635_ACEOF
15636cat confdefs.h >>conftest.$ac_ext
15637cat >>conftest.$ac_ext <<_ACEOF
15638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015640/* Override any GCC internal prototype to avoid an error.
15641 Use char because int might match the return type of a GCC
15642 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015643#ifdef __cplusplus
15644extern "C"
15645#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015646char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015647int
15648main ()
15649{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015650return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 ;
15652 return 0;
15653}
15654_ACEOF
15655rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015656if { (ac_try="$ac_link"
15657case "(($ac_try" in
15658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15659 *) ac_try_echo=$ac_try;;
15660esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015661eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15662$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015663 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015665 grep -v '^ *+' conftest.er1 >conftest.err
15666 rm -f conftest.er1
15667 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000015668 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015669 (exit $ac_status); } && {
15670 test -z "$ac_c_werror_flag" ||
15671 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000015672 } && test -s conftest$ac_exeext && {
15673 test "$cross_compiling" = yes ||
15674 $as_test_x conftest$ac_exeext
15675 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015676 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015677else
Antoine Pitrou20327222009-05-24 20:39:11 +000015678 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015679sed 's/^/| /' conftest.$ac_ext >&5
15680
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015681 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015682fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015683
Antoine Pitrou20327222009-05-24 20:39:11 +000015684rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015685rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015686 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015687LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015688fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015689{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15690$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
15691if test "x$ac_cv_lib_thread_thr_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015692 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015693#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015694_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015695
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015696 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015697 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015698 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015699fi
15700
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015701 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015702
Martin v. Löwis130fb172001-07-19 11:00:41 +000015703 if test "$USE_THREAD_MODULE" != "#"
15704 then
15705 # If the above checks didn't disable threads, (at least) OSF1
15706 # needs this '-threads' argument during linking.
15707 case $ac_sys_system in
15708 OSF1) LDLAST=-threads;;
15709 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015710 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015711fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015712
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015713if test "$posix_threads" = "yes"; then
15714 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015715
15716cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015717#define _POSIX_THREADS 1
15718_ACEOF
15719
15720 fi
15721
15722 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15723 case $ac_sys_system/$ac_sys_release in
15724 SunOS/5.6)
15725cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015726#define HAVE_PTHREAD_DESTRUCTOR 1
15727_ACEOF
15728
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015729 ;;
15730 SunOS/5.8)
15731cat >>confdefs.h <<\_ACEOF
15732#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15733_ACEOF
15734
15735 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015736 AIX/5)
15737cat >>confdefs.h <<\_ACEOF
15738#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15739_ACEOF
15740
15741 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015742 esac
15743
Antoine Pitrou20327222009-05-24 20:39:11 +000015744 { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15745$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015746 if test "${ac_cv_pthread_system_supported+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015747 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015748else
15749 if test "$cross_compiling" = yes; then
15750 ac_cv_pthread_system_supported=no
15751else
15752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015753/* confdefs.h. */
15754_ACEOF
15755cat confdefs.h >>conftest.$ac_ext
15756cat >>conftest.$ac_ext <<_ACEOF
15757/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015758#include <pthread.h>
15759 void *foo(void *parm) {
15760 return NULL;
15761 }
15762 main() {
15763 pthread_attr_t attr;
15764 pthread_t id;
15765 if (pthread_attr_init(&attr)) exit(-1);
15766 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15767 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15768 exit(0);
15769 }
15770_ACEOF
15771rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015772if { (ac_try="$ac_link"
15773case "(($ac_try" in
15774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15775 *) ac_try_echo=$ac_try;;
15776esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015777eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15778$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015779 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015780 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000015781 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015782 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015783 { (case "(($ac_try" in
15784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15785 *) ac_try_echo=$ac_try;;
15786esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015787eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15788$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015790 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000015791 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015792 (exit $ac_status); }; }; then
15793 ac_cv_pthread_system_supported=yes
15794else
Antoine Pitrou20327222009-05-24 20:39:11 +000015795 $as_echo "$as_me: program exited with status $ac_status" >&5
15796$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015797sed 's/^/| /' conftest.$ac_ext >&5
15798
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015799( exit $ac_status )
15800ac_cv_pthread_system_supported=no
15801fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015802rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015803rm -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 +000015804fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015805
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015806
15807
Guido van Rossum627b2d71993-12-24 10:39:16 +000015808fi
15809
Antoine Pitrou20327222009-05-24 20:39:11 +000015810 { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15811$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015812 if test "$ac_cv_pthread_system_supported" = "yes"; then
15813
15814cat >>confdefs.h <<\_ACEOF
15815#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15816_ACEOF
15817
15818 fi
15819
15820for ac_func in pthread_sigmask
15821do
Antoine Pitrou20327222009-05-24 20:39:11 +000015822as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15823{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
15824$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015825if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015826 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015827else
15828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015829/* confdefs.h. */
15830_ACEOF
15831cat confdefs.h >>conftest.$ac_ext
15832cat >>conftest.$ac_ext <<_ACEOF
15833/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015834/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15835 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15836#define $ac_func innocuous_$ac_func
15837
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015838/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015839 which can conflict with char $ac_func (); below.
15840 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015841 <limits.h> exists even on freestanding compilers. */
15842
15843#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015844# include <limits.h>
15845#else
15846# include <assert.h>
15847#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015848
15849#undef $ac_func
15850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851/* Override any GCC internal prototype to avoid an error.
15852 Use char because int might match the return type of a GCC
15853 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015854#ifdef __cplusplus
15855extern "C"
15856#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015857char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015858/* The GNU C library defines this for functions which it implements
15859 to always fail with ENOSYS. Some functions are actually named
15860 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015861#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015862choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015863#endif
15864
Skip Montanaro6dead952003-09-25 14:50:04 +000015865int
15866main ()
15867{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015869 ;
15870 return 0;
15871}
15872_ACEOF
15873rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015874if { (ac_try="$ac_link"
15875case "(($ac_try" in
15876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15877 *) ac_try_echo=$ac_try;;
15878esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015879eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15880$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015881 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015883 grep -v '^ *+' conftest.er1 >conftest.err
15884 rm -f conftest.er1
15885 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000015886 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015887 (exit $ac_status); } && {
15888 test -z "$ac_c_werror_flag" ||
15889 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000015890 } && test -s conftest$ac_exeext && {
15891 test "$cross_compiling" = yes ||
15892 $as_test_x conftest$ac_exeext
15893 }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015894 eval "$as_ac_var=yes"
15895else
Antoine Pitrou20327222009-05-24 20:39:11 +000015896 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015897sed 's/^/| /' conftest.$ac_ext >&5
15898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015899 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015900fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015901
Antoine Pitrou20327222009-05-24 20:39:11 +000015902rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015903rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015904 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015905fi
Antoine Pitrou20327222009-05-24 20:39:11 +000015906ac_res=`eval 'as_val=${'$as_ac_var'}
15907 $as_echo "$as_val"'`
15908 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
15909$as_echo "$ac_res" >&6; }
15910as_val=`eval 'as_val=${'$as_ac_var'}
15911 $as_echo "$as_val"'`
15912 if test "x$as_val" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015913 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000015914#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015915_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015916 case $ac_sys_system in
15917 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015918
Jason Tishlerfac083d2003-07-22 15:20:49 +000015919cat >>confdefs.h <<\_ACEOF
15920#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15921_ACEOF
15922
15923 ;;
15924 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015925fi
15926done
15927
15928fi
15929
15930
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015931# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015932
15933
Antoine Pitrou20327222009-05-24 20:39:11 +000015934{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15935$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015936# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015937if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015938 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015939 no)
Antoine Pitrou20327222009-05-24 20:39:11 +000015940 { $as_echo "$as_me:$LINENO: result: no" >&5
15941$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015942 ipv6=no
15943 ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000015944 *) { $as_echo "$as_me:$LINENO: result: yes" >&5
15945$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015946 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015947#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015948_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015949
15950 ipv6=yes
15951 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015952 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015953else
Martin v. Löwis11437992002-04-12 09:54:03 +000015954
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015955 if test "$cross_compiling" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000015956 { $as_echo "$as_me:$LINENO: result: no" >&5
15957$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015958 ipv6=no
15959
15960else
Martin v. Löwis11437992002-04-12 09:54:03 +000015961 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015962/* confdefs.h. */
15963_ACEOF
15964cat confdefs.h >>conftest.$ac_ext
15965cat >>conftest.$ac_ext <<_ACEOF
15966/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015967 /* AF_INET6 available check */
15968#include <sys/types.h>
15969#include <sys/socket.h>
15970main()
15971{
15972 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15973 exit(1);
15974 else
15975 exit(0);
15976}
15977
Martin v. Löwis11437992002-04-12 09:54:03 +000015978_ACEOF
15979rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015980if { (ac_try="$ac_link"
15981case "(($ac_try" in
15982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15983 *) ac_try_echo=$ac_try;;
15984esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015985eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15986$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015987 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015988 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000015989 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015990 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015991 { (case "(($ac_try" in
15992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15993 *) ac_try_echo=$ac_try;;
15994esac
Antoine Pitrou20327222009-05-24 20:39:11 +000015995eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15996$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015997 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015998 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000015999 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016000 (exit $ac_status); }; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000016001 { $as_echo "$as_me:$LINENO: result: yes" >&5
16002$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016003 ipv6=yes
16004else
Antoine Pitrou20327222009-05-24 20:39:11 +000016005 $as_echo "$as_me: program exited with status $ac_status" >&5
16006$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016007sed 's/^/| /' conftest.$ac_ext >&5
16008
Martin v. Löwis11437992002-04-12 09:54:03 +000016009( exit $ac_status )
Antoine Pitrou20327222009-05-24 20:39:11 +000016010{ $as_echo "$as_me:$LINENO: result: no" >&5
16011$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016012 ipv6=no
16013fi
Antoine Pitrou20327222009-05-24 20:39:11 +000016014rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016015rm -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 +000016016fi
16017
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016018
16019
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016020if test "$ipv6" = "yes"; then
Antoine Pitrou20327222009-05-24 20:39:11 +000016021 { $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16022$as_echo_n "checking if RFC2553 API is available... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016024/* confdefs.h. */
16025_ACEOF
16026cat confdefs.h >>conftest.$ac_ext
16027cat >>conftest.$ac_ext <<_ACEOF
16028/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016029#include <sys/types.h>
16030#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016031int
16032main ()
16033{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016034struct sockaddr_in6 x;
16035x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016036 ;
16037 return 0;
16038}
16039_ACEOF
16040rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016041if { (ac_try="$ac_compile"
16042case "(($ac_try" in
16043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16044 *) ac_try_echo=$ac_try;;
16045esac
Antoine Pitrou20327222009-05-24 20:39:11 +000016046eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16047$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016048 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016050 grep -v '^ *+' conftest.er1 >conftest.err
16051 rm -f conftest.er1
16052 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000016053 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016054 (exit $ac_status); } && {
16055 test -z "$ac_c_werror_flag" ||
16056 test ! -s conftest.err
16057 } && test -s conftest.$ac_objext; then
Antoine Pitrou20327222009-05-24 20:39:11 +000016058 { $as_echo "$as_me:$LINENO: result: yes" >&5
16059$as_echo "yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016060 ipv6=yes
16061else
Antoine Pitrou20327222009-05-24 20:39:11 +000016062 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016063sed 's/^/| /' conftest.$ac_ext >&5
16064
Antoine Pitrou20327222009-05-24 20:39:11 +000016065 { $as_echo "$as_me:$LINENO: result: no" >&5
16066$as_echo "no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016067 ipv6=no
16068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016069
16070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016071fi
16072
16073if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016074 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016075#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016076_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016077
16078fi
16079
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016080fi
16081
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016082
16083ipv6type=unknown
16084ipv6lib=none
16085ipv6trylibc=no
16086
16087if test "$ipv6" = "yes"; then
Antoine Pitrou20327222009-05-24 20:39:11 +000016088 { $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16089$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016090 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16091 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016092 case $i in
16093 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016094 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016095/* confdefs.h. */
16096_ACEOF
16097cat confdefs.h >>conftest.$ac_ext
16098cat >>conftest.$ac_ext <<_ACEOF
16099/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016100
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016101#include <netinet/in.h>
16102#ifdef IPV6_INRIA_VERSION
16103yes
16104#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016105_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016106if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016107 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016108 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016109fi
16110rm -f conftest*
16111
16112 ;;
16113 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016115/* confdefs.h. */
16116_ACEOF
16117cat confdefs.h >>conftest.$ac_ext
16118cat >>conftest.$ac_ext <<_ACEOF
16119/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016120
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016121#include <netinet/in.h>
16122#ifdef __KAME__
16123yes
16124#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016125_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016126if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016127 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016128 ipv6type=$i;
16129 ipv6lib=inet6
16130 ipv6libdir=/usr/local/v6/lib
16131 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016132fi
16133rm -f conftest*
16134
16135 ;;
16136 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016138/* confdefs.h. */
16139_ACEOF
16140cat confdefs.h >>conftest.$ac_ext
16141cat >>conftest.$ac_ext <<_ACEOF
16142/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016143
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016144#include <features.h>
16145#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16146yes
16147#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016148_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016149if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016150 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016151 ipv6type=$i;
16152 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016153fi
16154rm -f conftest*
16155
16156 ;;
16157 linux-inet6)
16158 if test -d /usr/inet6; then
16159 ipv6type=$i
16160 ipv6lib=inet6
16161 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016162 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016163 fi
16164 ;;
16165 solaris)
16166 if test -f /etc/netconfig; then
16167 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16168 ipv6type=$i
16169 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016170 fi
16171 fi
16172 ;;
16173 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016175/* confdefs.h. */
16176_ACEOF
16177cat confdefs.h >>conftest.$ac_ext
16178cat >>conftest.$ac_ext <<_ACEOF
16179/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016180
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016181#include <sys/param.h>
16182#ifdef _TOSHIBA_INET6
16183yes
16184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016185_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016187 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016188 ipv6type=$i;
16189 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016190 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016191fi
16192rm -f conftest*
16193
16194 ;;
16195 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016197/* confdefs.h. */
16198_ACEOF
16199cat confdefs.h >>conftest.$ac_ext
16200cat >>conftest.$ac_ext <<_ACEOF
16201/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016202
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016203#include </usr/local/v6/include/sys/v6config.h>
16204#ifdef __V6D__
16205yes
16206#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016207_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016208if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016209 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016210 ipv6type=$i;
16211 ipv6lib=v6;
16212 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016213 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016214fi
16215rm -f conftest*
16216
16217 ;;
16218 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016220/* confdefs.h. */
16221_ACEOF
16222cat confdefs.h >>conftest.$ac_ext
16223cat >>conftest.$ac_ext <<_ACEOF
16224/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016225
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016226#include <sys/param.h>
16227#ifdef _ZETA_MINAMI_INET6
16228yes
16229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016230_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016231if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016232 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016233 ipv6type=$i;
16234 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016235 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016236fi
16237rm -f conftest*
16238
16239 ;;
16240 esac
16241 if test "$ipv6type" != "unknown"; then
16242 break
16243 fi
16244 done
Antoine Pitrou20327222009-05-24 20:39:11 +000016245 { $as_echo "$as_me:$LINENO: result: $ipv6type" >&5
16246$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016247fi
16248
16249if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16250 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16251 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16252 echo "using lib$ipv6lib"
16253 else
16254 if test $ipv6trylibc = "yes"; then
16255 echo "using libc"
16256 else
16257 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16258 echo "You need to fetch lib$ipv6lib.a from appropriate"
16259 echo 'ipv6 kit and compile beforehand.'
16260 exit 1
16261 fi
16262 fi
16263fi
16264
Antoine Pitrou20327222009-05-24 20:39:11 +000016265{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16266$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016267cat >conftest.$ac_ext <<_ACEOF
16268/* confdefs.h. */
16269_ACEOF
16270cat confdefs.h >>conftest.$ac_ext
16271cat >>conftest.$ac_ext <<_ACEOF
16272/* end confdefs.h. */
16273#include <Carbon/Carbon.h>
16274int
16275main ()
16276{
16277FSIORefNum fRef = 0
16278 ;
16279 return 0;
16280}
16281_ACEOF
16282rm -f conftest.$ac_objext
16283if { (ac_try="$ac_compile"
16284case "(($ac_try" in
16285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16286 *) ac_try_echo=$ac_try;;
16287esac
Antoine Pitrou20327222009-05-24 20:39:11 +000016288eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16289$as_echo "$ac_try_echo") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016290 (eval "$ac_compile") 2>conftest.er1
16291 ac_status=$?
16292 grep -v '^ *+' conftest.er1 >conftest.err
16293 rm -f conftest.er1
16294 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000016295 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016296 (exit $ac_status); } && {
16297 test -z "$ac_c_werror_flag" ||
16298 test ! -s conftest.err
16299 } && test -s conftest.$ac_objext; then
16300
16301cat >>confdefs.h <<\_ACEOF
16302#define HAVE_OSX105_SDK 1
16303_ACEOF
16304
Antoine Pitrou20327222009-05-24 20:39:11 +000016305 { $as_echo "$as_me:$LINENO: result: yes" >&5
16306$as_echo "yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016307else
Antoine Pitrou20327222009-05-24 20:39:11 +000016308 $as_echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016309sed 's/^/| /' conftest.$ac_ext >&5
16310
Antoine Pitrou20327222009-05-24 20:39:11 +000016311 { $as_echo "$as_me:$LINENO: result: no" >&5
16312$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016313
16314fi
16315
16316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16317
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016318# Check for --with-doc-strings
Antoine Pitrou20327222009-05-24 20:39:11 +000016319{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16320$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016321
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016322# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016323if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324 withval=$with_doc_strings;
16325fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016326
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016327
16328if test -z "$with_doc_strings"
16329then with_doc_strings="yes"
16330fi
16331if test "$with_doc_strings" != "no"
16332then
16333
16334cat >>confdefs.h <<\_ACEOF
16335#define WITH_DOC_STRINGS 1
16336_ACEOF
16337
16338fi
Antoine Pitrou20327222009-05-24 20:39:11 +000016339{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16340$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016341
Neil Schemenauera35c6882001-02-27 04:45:05 +000016342# Check for Python-specific malloc support
Antoine Pitrou20327222009-05-24 20:39:11 +000016343{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5
16344$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016345
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016346# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016347if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016348 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016349if test "$withval" != no
16350then
16351
16352cat >>confdefs.h <<\_ACEOF
16353#define WITH_TSC 1
16354_ACEOF
16355
Antoine Pitrou20327222009-05-24 20:39:11 +000016356 { $as_echo "$as_me:$LINENO: result: yes" >&5
16357$as_echo "yes" >&6; }
16358else { $as_echo "$as_me:$LINENO: result: no" >&5
16359$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016360fi
16361else
Antoine Pitrou20327222009-05-24 20:39:11 +000016362 { $as_echo "$as_me:$LINENO: result: no" >&5
16363$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016364fi
16365
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016366
16367# Check for Python-specific malloc support
Antoine Pitrou20327222009-05-24 20:39:11 +000016368{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16369$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016371# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016372if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016373 withval=$with_pymalloc;
16374fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016375
Neil Schemenauera35c6882001-02-27 04:45:05 +000016376
Neil Schemenauer16c22972002-03-22 15:34:49 +000016377if test -z "$with_pymalloc"
16378then with_pymalloc="yes"
16379fi
16380if test "$with_pymalloc" != "no"
16381then
Martin v. Löwis11437992002-04-12 09:54:03 +000016382
16383cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016384#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016385_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016386
16387fi
Antoine Pitrou20327222009-05-24 20:39:11 +000016388{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16389$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016390
Barry Warsawef82cd72000-06-30 16:21:01 +000016391# Check for --with-wctype-functions
Antoine Pitrou20327222009-05-24 20:39:11 +000016392{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16393$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016396if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016397 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016398if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016399then
16400
16401cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016402#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016403_ACEOF
16404
Antoine Pitrou20327222009-05-24 20:39:11 +000016405 { $as_echo "$as_me:$LINENO: result: yes" >&5
16406$as_echo "yes" >&6; }
16407else { $as_echo "$as_me:$LINENO: result: no" >&5
16408$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016409fi
16410else
Antoine Pitrou20327222009-05-24 20:39:11 +000016411 { $as_echo "$as_me:$LINENO: result: no" >&5
16412$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016413fi
16414
Barry Warsawef82cd72000-06-30 16:21:01 +000016415
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016416# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016417
Guido van Rossum98935bf2001-09-05 19:13:16 +000016418DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016419
Guido van Rossume97ee181999-12-20 21:27:22 +000016420# the dlopen() function means we might want to use dynload_shlib.o. some
16421# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016422
Thomas Wouters3a584202000-08-05 23:28:51 +000016423for ac_func in dlopen
16424do
Antoine Pitrou20327222009-05-24 20:39:11 +000016425as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16426{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16427$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016428if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000016429 $as_echo_n "(cached) " >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016430else
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016432/* confdefs.h. */
16433_ACEOF
16434cat confdefs.h >>conftest.$ac_ext
16435cat >>conftest.$ac_ext <<_ACEOF
16436/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016437/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16438 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16439#define $ac_func innocuous_$ac_func
16440
Guido van Rossume97ee181999-12-20 21:27:22 +000016441/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016442 which can conflict with char $ac_func (); below.
16443 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016444 <limits.h> exists even on freestanding compilers. */
16445
16446#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016447# include <limits.h>
16448#else
16449# include <assert.h>
16450#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016451
16452#undef $ac_func
16453
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016454/* Override any GCC internal prototype to avoid an error.
16455 Use char because int might match the return type of a GCC
16456 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016457#ifdef __cplusplus
16458extern "C"
16459#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016460char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016461/* The GNU C library defines this for functions which it implements
16462 to always fail with ENOSYS. Some functions are actually named
16463 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016464#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016465choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016466#endif
16467
Skip Montanaro6dead952003-09-25 14:50:04 +000016468int
16469main ()
16470{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016471return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016472 ;
16473 return 0;
16474}
16475_ACEOF
16476rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016477if { (ac_try="$ac_link"
16478case "(($ac_try" in
16479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16480 *) ac_try_echo=$ac_try;;
16481esac
Antoine Pitrou20327222009-05-24 20:39:11 +000016482eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16483$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016484 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016486 grep -v '^ *+' conftest.er1 >conftest.err
16487 rm -f conftest.er1
16488 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000016489 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016490 (exit $ac_status); } && {
16491 test -z "$ac_c_werror_flag" ||
16492 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000016493 } && test -s conftest$ac_exeext && {
16494 test "$cross_compiling" = yes ||
16495 $as_test_x conftest$ac_exeext
16496 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016497 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016498else
Antoine Pitrou20327222009-05-24 20:39:11 +000016499 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016500sed 's/^/| /' conftest.$ac_ext >&5
16501
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016502 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016503fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016504
Antoine Pitrou20327222009-05-24 20:39:11 +000016505rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016507 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016508fi
Antoine Pitrou20327222009-05-24 20:39:11 +000016509ac_res=`eval 'as_val=${'$as_ac_var'}
16510 $as_echo "$as_val"'`
16511 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16512$as_echo "$ac_res" >&6; }
16513as_val=`eval 'as_val=${'$as_ac_var'}
16514 $as_echo "$as_val"'`
16515 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016516 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000016517#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016518_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016519
Guido van Rossume97ee181999-12-20 21:27:22 +000016520fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016521done
Guido van Rossume97ee181999-12-20 21:27:22 +000016522
Michael W. Hudson54241132001-12-07 15:38:26 +000016523
Guido van Rossume97ee181999-12-20 21:27:22 +000016524# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16525# loading of modules.
16526
Antoine Pitrou20327222009-05-24 20:39:11 +000016527{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16528$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016529if test -z "$DYNLOADFILE"
16530then
16531 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016532 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16533 if test "$ac_cv_func_dlopen" = yes
16534 then DYNLOADFILE="dynload_shlib.o"
16535 else DYNLOADFILE="dynload_aix.o"
16536 fi
16537 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016538 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016539 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16540 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016541 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016542 *)
16543 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16544 # out any dynamic loading
16545 if test "$ac_cv_func_dlopen" = yes
16546 then DYNLOADFILE="dynload_shlib.o"
16547 else DYNLOADFILE="dynload_stub.o"
16548 fi
16549 ;;
16550 esac
16551fi
Antoine Pitrou20327222009-05-24 20:39:11 +000016552{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16553$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016554if test "$DYNLOADFILE" != "dynload_stub.o"
16555then
Martin v. Löwis11437992002-04-12 09:54:03 +000016556
16557cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016558#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016559_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016560
16561fi
16562
Neil Schemenauer4e425612001-06-19 15:44:15 +000016563# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16564
Michael W. Hudson54241132001-12-07 15:38:26 +000016565
Antoine Pitrou20327222009-05-24 20:39:11 +000016566{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16567$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016568if test -z "$MACHDEP_OBJS"
16569then
Jack Jansene578a632001-08-15 01:27:14 +000016570 MACHDEP_OBJS=$extra_machdep_objs
16571else
16572 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016573fi
Antoine Pitrou20327222009-05-24 20:39:11 +000016574{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16575$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016576
Guido van Rossum627b2d71993-12-24 10:39:16 +000016577# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016578
16579
16580
16581
16582
16583
16584
16585
16586
16587
16588
16589
16590
16591
16592
16593
16594
16595
16596
16597
16598
16599
16600
16601
16602
16603
16604
16605
16606
16607
16608
16609
16610
16611
16612
16613
16614
16615
16616
16617
16618
16619
16620
16621
16622
16623
16624
16625
16626
16627
16628
16629
16630
16631
16632
16633
16634
16635
16636
16637
16638
16639
16640
16641
16642
16643
16644
16645
16646
16647
16648
Martin v. Löwisd6320502004-08-12 13:45:08 +000016649
Martin v. Löwisc3001752005-01-23 09:27:24 +000016650
16651
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016652
16653
Thomas Wouterscf297e42007-02-23 15:07:44 +000016654
16655
Gregory P. Smith25523d22007-09-03 16:44:55 +000016656
Christian Heimes4e30a842007-11-30 22:12:06 +000016657
Martin v. Löwis92fab752008-03-08 10:40:41 +000016658
Martin v. Löwis823725e2008-03-24 13:39:54 +000016659
16660
Benjamin Peterson965ce872009-04-05 21:24:58 +000016661
16662
16663
16664
Martin v. Löwis011e8422009-05-05 04:43:17 +000016665
Martin v. Löwis823725e2008-03-24 13:39:54 +000016666for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16667 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016668 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016669 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016670 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016671 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016672 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016673 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16674 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016675 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016676 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016677 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis92fab752008-03-08 10:40:41 +000016678 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016679do
Antoine Pitrou20327222009-05-24 20:39:11 +000016680as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16681{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16682$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016683if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000016684 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016685else
Martin v. Löwis11437992002-04-12 09:54:03 +000016686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016687/* confdefs.h. */
16688_ACEOF
16689cat confdefs.h >>conftest.$ac_ext
16690cat >>conftest.$ac_ext <<_ACEOF
16691/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016692/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16693 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16694#define $ac_func innocuous_$ac_func
16695
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016696/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016697 which can conflict with char $ac_func (); below.
16698 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016699 <limits.h> exists even on freestanding compilers. */
16700
16701#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016702# include <limits.h>
16703#else
16704# include <assert.h>
16705#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016706
16707#undef $ac_func
16708
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016709/* Override any GCC internal prototype to avoid an error.
16710 Use char because int might match the return type of a GCC
16711 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016712#ifdef __cplusplus
16713extern "C"
16714#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016715char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016716/* The GNU C library defines this for functions which it implements
16717 to always fail with ENOSYS. Some functions are actually named
16718 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016719#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016720choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016721#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016722
Skip Montanaro6dead952003-09-25 14:50:04 +000016723int
16724main ()
16725{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016726return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016727 ;
16728 return 0;
16729}
16730_ACEOF
16731rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016732if { (ac_try="$ac_link"
16733case "(($ac_try" in
16734 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16735 *) ac_try_echo=$ac_try;;
16736esac
Antoine Pitrou20327222009-05-24 20:39:11 +000016737eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16738$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016739 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016740 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016741 grep -v '^ *+' conftest.er1 >conftest.err
16742 rm -f conftest.er1
16743 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000016744 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016745 (exit $ac_status); } && {
16746 test -z "$ac_c_werror_flag" ||
16747 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000016748 } && test -s conftest$ac_exeext && {
16749 test "$cross_compiling" = yes ||
16750 $as_test_x conftest$ac_exeext
16751 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016752 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016753else
Antoine Pitrou20327222009-05-24 20:39:11 +000016754 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016755sed 's/^/| /' conftest.$ac_ext >&5
16756
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016757 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016758fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016759
Antoine Pitrou20327222009-05-24 20:39:11 +000016760rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016761rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016762 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016763fi
Antoine Pitrou20327222009-05-24 20:39:11 +000016764ac_res=`eval 'as_val=${'$as_ac_var'}
16765 $as_echo "$as_val"'`
16766 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16767$as_echo "$ac_res" >&6; }
16768as_val=`eval 'as_val=${'$as_ac_var'}
16769 $as_echo "$as_val"'`
16770 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016771 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000016772#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016773_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016774
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016775fi
16776done
16777
Michael W. Hudson54241132001-12-07 15:38:26 +000016778
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016779# For some functions, having a definition is not sufficient, since
16780# we want to take their address.
Antoine Pitrou20327222009-05-24 20:39:11 +000016781{ $as_echo "$as_me:$LINENO: checking for chroot" >&5
16782$as_echo_n "checking for chroot... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016783cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016784/* confdefs.h. */
16785_ACEOF
16786cat confdefs.h >>conftest.$ac_ext
16787cat >>conftest.$ac_ext <<_ACEOF
16788/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016789#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016790int
16791main ()
16792{
16793void *x=chroot
16794 ;
16795 return 0;
16796}
16797_ACEOF
16798rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016799if { (ac_try="$ac_compile"
16800case "(($ac_try" in
16801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16802 *) ac_try_echo=$ac_try;;
16803esac
Antoine Pitrou20327222009-05-24 20:39:11 +000016804eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16805$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016807 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016808 grep -v '^ *+' conftest.er1 >conftest.err
16809 rm -f conftest.er1
16810 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000016811 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016812 (exit $ac_status); } && {
16813 test -z "$ac_c_werror_flag" ||
16814 test ! -s conftest.err
16815 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016816
16817cat >>confdefs.h <<\_ACEOF
16818#define HAVE_CHROOT 1
16819_ACEOF
16820
Antoine Pitrou20327222009-05-24 20:39:11 +000016821 { $as_echo "$as_me:$LINENO: result: yes" >&5
16822$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016823else
Antoine Pitrou20327222009-05-24 20:39:11 +000016824 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016825sed 's/^/| /' conftest.$ac_ext >&5
16826
Antoine Pitrou20327222009-05-24 20:39:11 +000016827 { $as_echo "$as_me:$LINENO: result: no" >&5
16828$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016829
16830fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016831
16832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000016833{ $as_echo "$as_me:$LINENO: checking for link" >&5
16834$as_echo_n "checking for link... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016835cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016836/* confdefs.h. */
16837_ACEOF
16838cat confdefs.h >>conftest.$ac_ext
16839cat >>conftest.$ac_ext <<_ACEOF
16840/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016841#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016842int
16843main ()
16844{
16845void *x=link
16846 ;
16847 return 0;
16848}
16849_ACEOF
16850rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016851if { (ac_try="$ac_compile"
16852case "(($ac_try" in
16853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16854 *) ac_try_echo=$ac_try;;
16855esac
Antoine Pitrou20327222009-05-24 20:39:11 +000016856eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16857$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016858 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016860 grep -v '^ *+' conftest.er1 >conftest.err
16861 rm -f conftest.er1
16862 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000016863 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016864 (exit $ac_status); } && {
16865 test -z "$ac_c_werror_flag" ||
16866 test ! -s conftest.err
16867 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016868
16869cat >>confdefs.h <<\_ACEOF
16870#define HAVE_LINK 1
16871_ACEOF
16872
Antoine Pitrou20327222009-05-24 20:39:11 +000016873 { $as_echo "$as_me:$LINENO: result: yes" >&5
16874$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016875else
Antoine Pitrou20327222009-05-24 20:39:11 +000016876 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016877sed 's/^/| /' conftest.$ac_ext >&5
16878
Antoine Pitrou20327222009-05-24 20:39:11 +000016879 { $as_echo "$as_me:$LINENO: result: no" >&5
16880$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016881
16882fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883
16884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000016885{ $as_echo "$as_me:$LINENO: checking for symlink" >&5
16886$as_echo_n "checking for symlink... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016887cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016888/* confdefs.h. */
16889_ACEOF
16890cat confdefs.h >>conftest.$ac_ext
16891cat >>conftest.$ac_ext <<_ACEOF
16892/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016893#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016894int
16895main ()
16896{
16897void *x=symlink
16898 ;
16899 return 0;
16900}
16901_ACEOF
16902rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016903if { (ac_try="$ac_compile"
16904case "(($ac_try" in
16905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16906 *) ac_try_echo=$ac_try;;
16907esac
Antoine Pitrou20327222009-05-24 20:39:11 +000016908eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16909$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016910 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016911 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016912 grep -v '^ *+' conftest.er1 >conftest.err
16913 rm -f conftest.er1
16914 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000016915 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016916 (exit $ac_status); } && {
16917 test -z "$ac_c_werror_flag" ||
16918 test ! -s conftest.err
16919 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016920
16921cat >>confdefs.h <<\_ACEOF
16922#define HAVE_SYMLINK 1
16923_ACEOF
16924
Antoine Pitrou20327222009-05-24 20:39:11 +000016925 { $as_echo "$as_me:$LINENO: result: yes" >&5
16926$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016927else
Antoine Pitrou20327222009-05-24 20:39:11 +000016928 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016929sed 's/^/| /' conftest.$ac_ext >&5
16930
Antoine Pitrou20327222009-05-24 20:39:11 +000016931 { $as_echo "$as_me:$LINENO: result: no" >&5
16932$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016933
16934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016935
16936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000016937{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5
16938$as_echo_n "checking for fchdir... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016939cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016940/* confdefs.h. */
16941_ACEOF
16942cat confdefs.h >>conftest.$ac_ext
16943cat >>conftest.$ac_ext <<_ACEOF
16944/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016945#include <unistd.h>
16946int
16947main ()
16948{
16949void *x=fchdir
16950 ;
16951 return 0;
16952}
16953_ACEOF
16954rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016955if { (ac_try="$ac_compile"
16956case "(($ac_try" in
16957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16958 *) ac_try_echo=$ac_try;;
16959esac
Antoine Pitrou20327222009-05-24 20:39:11 +000016960eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16961$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016962 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016964 grep -v '^ *+' conftest.er1 >conftest.err
16965 rm -f conftest.er1
16966 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000016967 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016968 (exit $ac_status); } && {
16969 test -z "$ac_c_werror_flag" ||
16970 test ! -s conftest.err
16971 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016972
16973cat >>confdefs.h <<\_ACEOF
16974#define HAVE_FCHDIR 1
16975_ACEOF
16976
Antoine Pitrou20327222009-05-24 20:39:11 +000016977 { $as_echo "$as_me:$LINENO: result: yes" >&5
16978$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016979else
Antoine Pitrou20327222009-05-24 20:39:11 +000016980 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016981sed 's/^/| /' conftest.$ac_ext >&5
16982
Antoine Pitrou20327222009-05-24 20:39:11 +000016983 { $as_echo "$as_me:$LINENO: result: no" >&5
16984$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016985
16986fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016987
16988rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000016989{ $as_echo "$as_me:$LINENO: checking for fsync" >&5
16990$as_echo_n "checking for fsync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016991cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016992/* confdefs.h. */
16993_ACEOF
16994cat confdefs.h >>conftest.$ac_ext
16995cat >>conftest.$ac_ext <<_ACEOF
16996/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016997#include <unistd.h>
16998int
16999main ()
17000{
17001void *x=fsync
17002 ;
17003 return 0;
17004}
17005_ACEOF
17006rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017007if { (ac_try="$ac_compile"
17008case "(($ac_try" in
17009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17010 *) ac_try_echo=$ac_try;;
17011esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017012eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17013$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017016 grep -v '^ *+' conftest.er1 >conftest.err
17017 rm -f conftest.er1
17018 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017019 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017020 (exit $ac_status); } && {
17021 test -z "$ac_c_werror_flag" ||
17022 test ! -s conftest.err
17023 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017024
17025cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017026#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017027_ACEOF
17028
Antoine Pitrou20327222009-05-24 20:39:11 +000017029 { $as_echo "$as_me:$LINENO: result: yes" >&5
17030$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017031else
Antoine Pitrou20327222009-05-24 20:39:11 +000017032 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017033sed 's/^/| /' conftest.$ac_ext >&5
17034
Antoine Pitrou20327222009-05-24 20:39:11 +000017035 { $as_echo "$as_me:$LINENO: result: no" >&5
17036$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017037
17038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017039
17040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000017041{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5
17042$as_echo_n "checking for fdatasync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017043cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017044/* confdefs.h. */
17045_ACEOF
17046cat confdefs.h >>conftest.$ac_ext
17047cat >>conftest.$ac_ext <<_ACEOF
17048/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017049#include <unistd.h>
17050int
17051main ()
17052{
17053void *x=fdatasync
17054 ;
17055 return 0;
17056}
17057_ACEOF
17058rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017059if { (ac_try="$ac_compile"
17060case "(($ac_try" in
17061 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17062 *) ac_try_echo=$ac_try;;
17063esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017064eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17065$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017066 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017067 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017068 grep -v '^ *+' conftest.er1 >conftest.err
17069 rm -f conftest.er1
17070 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017071 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017072 (exit $ac_status); } && {
17073 test -z "$ac_c_werror_flag" ||
17074 test ! -s conftest.err
17075 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017076
17077cat >>confdefs.h <<\_ACEOF
17078#define HAVE_FDATASYNC 1
17079_ACEOF
17080
Antoine Pitrou20327222009-05-24 20:39:11 +000017081 { $as_echo "$as_me:$LINENO: result: yes" >&5
17082$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017083else
Antoine Pitrou20327222009-05-24 20:39:11 +000017084 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017085sed 's/^/| /' conftest.$ac_ext >&5
17086
Antoine Pitrou20327222009-05-24 20:39:11 +000017087 { $as_echo "$as_me:$LINENO: result: no" >&5
17088$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017089
17090fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017091
17092rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000017093{ $as_echo "$as_me:$LINENO: checking for epoll" >&5
17094$as_echo_n "checking for epoll... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017095cat >conftest.$ac_ext <<_ACEOF
17096/* confdefs.h. */
17097_ACEOF
17098cat confdefs.h >>conftest.$ac_ext
17099cat >>conftest.$ac_ext <<_ACEOF
17100/* end confdefs.h. */
17101#include <sys/epoll.h>
17102int
17103main ()
17104{
17105void *x=epoll_create
17106 ;
17107 return 0;
17108}
17109_ACEOF
17110rm -f conftest.$ac_objext
17111if { (ac_try="$ac_compile"
17112case "(($ac_try" in
17113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17114 *) ac_try_echo=$ac_try;;
17115esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017116eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17117$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017118 (eval "$ac_compile") 2>conftest.er1
17119 ac_status=$?
17120 grep -v '^ *+' conftest.er1 >conftest.err
17121 rm -f conftest.er1
17122 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017123 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017124 (exit $ac_status); } && {
17125 test -z "$ac_c_werror_flag" ||
17126 test ! -s conftest.err
17127 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017128
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017129cat >>confdefs.h <<\_ACEOF
17130#define HAVE_EPOLL 1
17131_ACEOF
17132
Antoine Pitrou20327222009-05-24 20:39:11 +000017133 { $as_echo "$as_me:$LINENO: result: yes" >&5
17134$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017135else
Antoine Pitrou20327222009-05-24 20:39:11 +000017136 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017137sed 's/^/| /' conftest.$ac_ext >&5
17138
Antoine Pitrou20327222009-05-24 20:39:11 +000017139 { $as_echo "$as_me:$LINENO: result: no" >&5
17140$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017141
17142fi
17143
17144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000017145{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5
17146$as_echo_n "checking for kqueue... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017147cat >conftest.$ac_ext <<_ACEOF
17148/* confdefs.h. */
17149_ACEOF
17150cat confdefs.h >>conftest.$ac_ext
17151cat >>conftest.$ac_ext <<_ACEOF
17152/* end confdefs.h. */
17153
17154#include <sys/types.h>
17155#include <sys/event.h>
17156
17157int
17158main ()
17159{
17160int x=kqueue()
17161 ;
17162 return 0;
17163}
17164_ACEOF
17165rm -f conftest.$ac_objext
17166if { (ac_try="$ac_compile"
17167case "(($ac_try" in
17168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17169 *) ac_try_echo=$ac_try;;
17170esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017171eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17172$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017173 (eval "$ac_compile") 2>conftest.er1
17174 ac_status=$?
17175 grep -v '^ *+' conftest.er1 >conftest.err
17176 rm -f conftest.er1
17177 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017178 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017179 (exit $ac_status); } && {
17180 test -z "$ac_c_werror_flag" ||
17181 test ! -s conftest.err
17182 } && test -s conftest.$ac_objext; then
17183
17184cat >>confdefs.h <<\_ACEOF
17185#define HAVE_KQUEUE 1
17186_ACEOF
17187
Antoine Pitrou20327222009-05-24 20:39:11 +000017188 { $as_echo "$as_me:$LINENO: result: yes" >&5
17189$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017190else
Antoine Pitrou20327222009-05-24 20:39:11 +000017191 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017192sed 's/^/| /' conftest.$ac_ext >&5
17193
Antoine Pitrou20327222009-05-24 20:39:11 +000017194 { $as_echo "$as_me:$LINENO: result: no" >&5
17195$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017196
17197fi
17198
17199rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017200# On some systems (eg. FreeBSD 5), we would find a definition of the
17201# functions ctermid_r, setgroups in the library, but no prototype
17202# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17203# address to avoid compiler warnings and potential miscompilations
17204# because of the missing prototypes.
17205
Antoine Pitrou20327222009-05-24 20:39:11 +000017206{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5
17207$as_echo_n "checking for ctermid_r... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017209/* confdefs.h. */
17210_ACEOF
17211cat confdefs.h >>conftest.$ac_ext
17212cat >>conftest.$ac_ext <<_ACEOF
17213/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017214
17215#include "confdefs.h"
17216#include <stdio.h>
17217
Martin v. Löwisd5843682002-11-21 20:41:28 +000017218int
17219main ()
17220{
17221void* p = ctermid_r
17222 ;
17223 return 0;
17224}
17225_ACEOF
17226rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017227if { (ac_try="$ac_compile"
17228case "(($ac_try" in
17229 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17230 *) ac_try_echo=$ac_try;;
17231esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017232eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17233$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017234 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017235 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017236 grep -v '^ *+' conftest.er1 >conftest.err
17237 rm -f conftest.er1
17238 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017239 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017240 (exit $ac_status); } && {
17241 test -z "$ac_c_werror_flag" ||
17242 test ! -s conftest.err
17243 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017244
17245cat >>confdefs.h <<\_ACEOF
17246#define HAVE_CTERMID_R 1
17247_ACEOF
17248
Antoine Pitrou20327222009-05-24 20:39:11 +000017249 { $as_echo "$as_me:$LINENO: result: yes" >&5
17250$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017251else
Antoine Pitrou20327222009-05-24 20:39:11 +000017252 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017253sed 's/^/| /' conftest.$ac_ext >&5
17254
Antoine Pitrou20327222009-05-24 20:39:11 +000017255 { $as_echo "$as_me:$LINENO: result: no" >&5
17256$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017257
17258fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17261
Antoine Pitrou20327222009-05-24 20:39:11 +000017262{ $as_echo "$as_me:$LINENO: checking for flock" >&5
17263$as_echo_n "checking for flock... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017264cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017265/* confdefs.h. */
17266_ACEOF
17267cat confdefs.h >>conftest.$ac_ext
17268cat >>conftest.$ac_ext <<_ACEOF
17269/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017270
17271#include "confdefs.h"
17272#include <sys/file.h>
17273
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017274int
17275main ()
17276{
17277void* p = flock
17278 ;
17279 return 0;
17280}
17281_ACEOF
17282rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017283if { (ac_try="$ac_compile"
17284case "(($ac_try" in
17285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17286 *) ac_try_echo=$ac_try;;
17287esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017288eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17289$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017290 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017292 grep -v '^ *+' conftest.er1 >conftest.err
17293 rm -f conftest.er1
17294 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017295 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017296 (exit $ac_status); } && {
17297 test -z "$ac_c_werror_flag" ||
17298 test ! -s conftest.err
17299 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017300
17301cat >>confdefs.h <<\_ACEOF
17302#define HAVE_FLOCK 1
17303_ACEOF
17304
Antoine Pitrou20327222009-05-24 20:39:11 +000017305 { $as_echo "$as_me:$LINENO: result: yes" >&5
17306$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017307else
Antoine Pitrou20327222009-05-24 20:39:11 +000017308 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017309sed 's/^/| /' conftest.$ac_ext >&5
17310
Antoine Pitrou20327222009-05-24 20:39:11 +000017311 { $as_echo "$as_me:$LINENO: result: no" >&5
17312$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017313
17314fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017315
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17317
Antoine Pitrou20327222009-05-24 20:39:11 +000017318{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5
17319$as_echo_n "checking for getpagesize... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017320cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017321/* confdefs.h. */
17322_ACEOF
17323cat confdefs.h >>conftest.$ac_ext
17324cat >>conftest.$ac_ext <<_ACEOF
17325/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017326
17327#include "confdefs.h"
17328#include <unistd.h>
17329
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017330int
17331main ()
17332{
17333void* p = getpagesize
17334 ;
17335 return 0;
17336}
17337_ACEOF
17338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017339if { (ac_try="$ac_compile"
17340case "(($ac_try" in
17341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17342 *) ac_try_echo=$ac_try;;
17343esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017344eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17345$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017348 grep -v '^ *+' conftest.er1 >conftest.err
17349 rm -f conftest.er1
17350 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017351 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352 (exit $ac_status); } && {
17353 test -z "$ac_c_werror_flag" ||
17354 test ! -s conftest.err
17355 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017356
17357cat >>confdefs.h <<\_ACEOF
17358#define HAVE_GETPAGESIZE 1
17359_ACEOF
17360
Antoine Pitrou20327222009-05-24 20:39:11 +000017361 { $as_echo "$as_me:$LINENO: result: yes" >&5
17362$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017363else
Antoine Pitrou20327222009-05-24 20:39:11 +000017364 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017365sed 's/^/| /' conftest.$ac_ext >&5
17366
Antoine Pitrou20327222009-05-24 20:39:11 +000017367 { $as_echo "$as_me:$LINENO: result: no" >&5
17368$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017369
17370fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017371
17372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017373
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017374for ac_prog in true
17375do
17376 # Extract the first word of "$ac_prog", so it can be a program name with args.
17377set dummy $ac_prog; ac_word=$2
Antoine Pitrou20327222009-05-24 20:39:11 +000017378{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
17379$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017380if test "${ac_cv_prog_TRUE+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000017381 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017382else
17383 if test -n "$TRUE"; then
17384 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17385else
17386as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17387for as_dir in $PATH
17388do
17389 IFS=$as_save_IFS
17390 test -z "$as_dir" && as_dir=.
17391 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017392 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 +000017393 ac_cv_prog_TRUE="$ac_prog"
Antoine Pitrou20327222009-05-24 20:39:11 +000017394 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017395 break 2
17396 fi
17397done
17398done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017399IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017400
17401fi
17402fi
17403TRUE=$ac_cv_prog_TRUE
17404if test -n "$TRUE"; then
Antoine Pitrou20327222009-05-24 20:39:11 +000017405 { $as_echo "$as_me:$LINENO: result: $TRUE" >&5
17406$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017407else
Antoine Pitrou20327222009-05-24 20:39:11 +000017408 { $as_echo "$as_me:$LINENO: result: no" >&5
17409$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017410fi
17411
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017413 test -n "$TRUE" && break
17414done
17415test -n "$TRUE" || TRUE="/bin/true"
17416
17417
Antoine Pitrou20327222009-05-24 20:39:11 +000017418{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17419$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017420if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000017421 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017422else
17423 ac_check_lib_save_LIBS=$LIBS
17424LIBS="-lc $LIBS"
17425cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017426/* confdefs.h. */
17427_ACEOF
17428cat confdefs.h >>conftest.$ac_ext
17429cat >>conftest.$ac_ext <<_ACEOF
17430/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432/* Override any GCC internal prototype to avoid an error.
17433 Use char because int might match the return type of a GCC
17434 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017435#ifdef __cplusplus
17436extern "C"
17437#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017438char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017439int
17440main ()
17441{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017442return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017443 ;
17444 return 0;
17445}
17446_ACEOF
17447rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017448if { (ac_try="$ac_link"
17449case "(($ac_try" in
17450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17451 *) ac_try_echo=$ac_try;;
17452esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017453eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17454$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017455 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017456 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017457 grep -v '^ *+' conftest.er1 >conftest.err
17458 rm -f conftest.er1
17459 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017460 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017461 (exit $ac_status); } && {
17462 test -z "$ac_c_werror_flag" ||
17463 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000017464 } && test -s conftest$ac_exeext && {
17465 test "$cross_compiling" = yes ||
17466 $as_test_x conftest$ac_exeext
17467 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017468 ac_cv_lib_c_inet_aton=yes
17469else
Antoine Pitrou20327222009-05-24 20:39:11 +000017470 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017471sed 's/^/| /' conftest.$ac_ext >&5
17472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017473 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017474fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475
Antoine Pitrou20327222009-05-24 20:39:11 +000017476rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017477rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017478 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017479LIBS=$ac_check_lib_save_LIBS
17480fi
Antoine Pitrou20327222009-05-24 20:39:11 +000017481{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17482$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
17483if test "x$ac_cv_lib_c_inet_aton" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017484 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017485else
17486
Antoine Pitrou20327222009-05-24 20:39:11 +000017487{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17488$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017489if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000017490 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017491else
17492 ac_check_lib_save_LIBS=$LIBS
17493LIBS="-lresolv $LIBS"
17494cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017495/* confdefs.h. */
17496_ACEOF
17497cat confdefs.h >>conftest.$ac_ext
17498cat >>conftest.$ac_ext <<_ACEOF
17499/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501/* Override any GCC internal prototype to avoid an error.
17502 Use char because int might match the return type of a GCC
17503 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017504#ifdef __cplusplus
17505extern "C"
17506#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017507char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017508int
17509main ()
17510{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017511return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017512 ;
17513 return 0;
17514}
17515_ACEOF
17516rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017517if { (ac_try="$ac_link"
17518case "(($ac_try" in
17519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17520 *) ac_try_echo=$ac_try;;
17521esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017522eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17523$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017525 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017526 grep -v '^ *+' conftest.er1 >conftest.err
17527 rm -f conftest.er1
17528 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017529 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017530 (exit $ac_status); } && {
17531 test -z "$ac_c_werror_flag" ||
17532 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000017533 } && test -s conftest$ac_exeext && {
17534 test "$cross_compiling" = yes ||
17535 $as_test_x conftest$ac_exeext
17536 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017537 ac_cv_lib_resolv_inet_aton=yes
17538else
Antoine Pitrou20327222009-05-24 20:39:11 +000017539 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017540sed 's/^/| /' conftest.$ac_ext >&5
17541
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017542 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017543fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544
Antoine Pitrou20327222009-05-24 20:39:11 +000017545rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017546rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017547 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017548LIBS=$ac_check_lib_save_LIBS
17549fi
Antoine Pitrou20327222009-05-24 20:39:11 +000017550{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17551$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
17552if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017553 cat >>confdefs.h <<_ACEOF
17554#define HAVE_LIBRESOLV 1
17555_ACEOF
17556
17557 LIBS="-lresolv $LIBS"
17558
17559fi
17560
17561
17562fi
17563
17564
Christian Heimesd0764e22007-12-04 15:00:33 +000017565# On Tru64, chflags seems to be present, but calling it will
17566# exit Python
Antoine Pitrou20327222009-05-24 20:39:11 +000017567{ $as_echo "$as_me:$LINENO: checking for chflags" >&5
17568$as_echo_n "checking for chflags... " >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017569if test "$cross_compiling" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000017570 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
17571$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17572{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017573See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017574$as_echo "$as_me: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017575See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000017576 { (exit 1); exit 1; }; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017577else
17578 cat >conftest.$ac_ext <<_ACEOF
17579/* confdefs.h. */
17580_ACEOF
17581cat confdefs.h >>conftest.$ac_ext
17582cat >>conftest.$ac_ext <<_ACEOF
17583/* end confdefs.h. */
17584
17585#include <sys/stat.h>
17586#include <unistd.h>
17587int main(int argc, char*argv[])
17588{
17589 if(chflags(argv[0], 0) != 0)
17590 return 1;
17591 return 0;
17592}
17593
17594_ACEOF
17595rm -f conftest$ac_exeext
17596if { (ac_try="$ac_link"
17597case "(($ac_try" in
17598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17599 *) ac_try_echo=$ac_try;;
17600esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017601eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17602$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017603 (eval "$ac_link") 2>&5
17604 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000017605 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017606 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17607 { (case "(($ac_try" in
17608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17609 *) ac_try_echo=$ac_try;;
17610esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017611eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17612$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017613 (eval "$ac_try") 2>&5
17614 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000017615 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017616 (exit $ac_status); }; }; then
17617
17618cat >>confdefs.h <<\_ACEOF
17619#define HAVE_CHFLAGS 1
17620_ACEOF
17621
Antoine Pitrou20327222009-05-24 20:39:11 +000017622 { $as_echo "$as_me:$LINENO: result: yes" >&5
17623$as_echo "yes" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017624else
Antoine Pitrou20327222009-05-24 20:39:11 +000017625 $as_echo "$as_me: program exited with status $ac_status" >&5
17626$as_echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017627sed 's/^/| /' conftest.$ac_ext >&5
17628
17629( exit $ac_status )
Antoine Pitrou20327222009-05-24 20:39:11 +000017630{ $as_echo "$as_me:$LINENO: result: no" >&5
17631$as_echo "no" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017632
17633fi
Antoine Pitrou20327222009-05-24 20:39:11 +000017634rm -rf conftest.dSYM
Christian Heimesd0764e22007-12-04 15:00:33 +000017635rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17636fi
17637
17638
17639
Antoine Pitrou20327222009-05-24 20:39:11 +000017640{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5
17641$as_echo_n "checking for lchflags... " >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017642if test "$cross_compiling" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000017643 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
17644$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17645{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017646See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017647$as_echo "$as_me: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017648See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000017649 { (exit 1); exit 1; }; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017650else
17651 cat >conftest.$ac_ext <<_ACEOF
17652/* confdefs.h. */
17653_ACEOF
17654cat confdefs.h >>conftest.$ac_ext
17655cat >>conftest.$ac_ext <<_ACEOF
17656/* end confdefs.h. */
17657
17658#include <sys/stat.h>
17659#include <unistd.h>
17660int main(int argc, char*argv[])
17661{
17662 if(lchflags(argv[0], 0) != 0)
17663 return 1;
17664 return 0;
17665}
17666
17667_ACEOF
17668rm -f conftest$ac_exeext
17669if { (ac_try="$ac_link"
17670case "(($ac_try" in
17671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17672 *) ac_try_echo=$ac_try;;
17673esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017674eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17675$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017676 (eval "$ac_link") 2>&5
17677 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000017678 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017679 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17680 { (case "(($ac_try" in
17681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17682 *) ac_try_echo=$ac_try;;
17683esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017684eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17685$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017686 (eval "$ac_try") 2>&5
17687 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000017688 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017689 (exit $ac_status); }; }; then
17690
17691cat >>confdefs.h <<\_ACEOF
17692#define HAVE_LCHFLAGS 1
17693_ACEOF
17694
Antoine Pitrou20327222009-05-24 20:39:11 +000017695 { $as_echo "$as_me:$LINENO: result: yes" >&5
17696$as_echo "yes" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017697else
Antoine Pitrou20327222009-05-24 20:39:11 +000017698 $as_echo "$as_me: program exited with status $ac_status" >&5
17699$as_echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017700sed 's/^/| /' conftest.$ac_ext >&5
17701
17702( exit $ac_status )
Antoine Pitrou20327222009-05-24 20:39:11 +000017703{ $as_echo "$as_me:$LINENO: result: no" >&5
17704$as_echo "no" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017705
17706fi
Antoine Pitrou20327222009-05-24 20:39:11 +000017707rm -rf conftest.dSYM
Christian Heimesd0764e22007-12-04 15:00:33 +000017708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17709fi
17710
17711
17712
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017713case $ac_sys_system/$ac_sys_release in
17714Darwin/*)
17715 _CUR_CFLAGS="${CFLAGS}"
17716 _CUR_LDFLAGS="${LDFLAGS}"
17717 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17718 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17719 ;;
17720esac
17721
Antoine Pitrou20327222009-05-24 20:39:11 +000017722{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17723$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017724if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000017725 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017726else
17727 ac_check_lib_save_LIBS=$LIBS
17728LIBS="-lz $LIBS"
17729cat >conftest.$ac_ext <<_ACEOF
17730/* confdefs.h. */
17731_ACEOF
17732cat confdefs.h >>conftest.$ac_ext
17733cat >>conftest.$ac_ext <<_ACEOF
17734/* end confdefs.h. */
17735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017736/* Override any GCC internal prototype to avoid an error.
17737 Use char because int might match the return type of a GCC
17738 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017739#ifdef __cplusplus
17740extern "C"
17741#endif
17742char inflateCopy ();
17743int
17744main ()
17745{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017746return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017747 ;
17748 return 0;
17749}
17750_ACEOF
17751rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017752if { (ac_try="$ac_link"
17753case "(($ac_try" in
17754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17755 *) ac_try_echo=$ac_try;;
17756esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017757eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17758$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017759 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017760 ac_status=$?
17761 grep -v '^ *+' conftest.er1 >conftest.err
17762 rm -f conftest.er1
17763 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017764 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765 (exit $ac_status); } && {
17766 test -z "$ac_c_werror_flag" ||
17767 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000017768 } && test -s conftest$ac_exeext && {
17769 test "$cross_compiling" = yes ||
17770 $as_test_x conftest$ac_exeext
17771 }; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017772 ac_cv_lib_z_inflateCopy=yes
17773else
Antoine Pitrou20327222009-05-24 20:39:11 +000017774 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017775sed 's/^/| /' conftest.$ac_ext >&5
17776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017778fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017779
Antoine Pitrou20327222009-05-24 20:39:11 +000017780rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017781rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017782 conftest$ac_exeext conftest.$ac_ext
17783LIBS=$ac_check_lib_save_LIBS
17784fi
Antoine Pitrou20327222009-05-24 20:39:11 +000017785{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17786$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
17787if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017788
17789cat >>confdefs.h <<\_ACEOF
17790#define HAVE_ZLIB_COPY 1
17791_ACEOF
17792
17793fi
17794
17795
17796case $ac_sys_system/$ac_sys_release in
17797Darwin/*)
17798 CFLAGS="${_CUR_CFLAGS}"
17799 LDFLAGS="${_CUR_LDFLAGS}"
17800 ;;
17801esac
17802
Antoine Pitrou20327222009-05-24 20:39:11 +000017803{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5
17804$as_echo_n "checking for hstrerror... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017805cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017806/* confdefs.h. */
17807_ACEOF
17808cat confdefs.h >>conftest.$ac_ext
17809cat >>conftest.$ac_ext <<_ACEOF
17810/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017811
17812#include "confdefs.h"
17813#include <netdb.h>
17814
Martin v. Löwise9416172003-05-03 10:12:45 +000017815int
17816main ()
17817{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017818void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017819 ;
17820 return 0;
17821}
17822_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017823rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017824if { (ac_try="$ac_link"
17825case "(($ac_try" in
17826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17827 *) ac_try_echo=$ac_try;;
17828esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017829eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17830$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017831 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017833 grep -v '^ *+' conftest.er1 >conftest.err
17834 rm -f conftest.er1
17835 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017836 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017837 (exit $ac_status); } && {
17838 test -z "$ac_c_werror_flag" ||
17839 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000017840 } && test -s conftest$ac_exeext && {
17841 test "$cross_compiling" = yes ||
17842 $as_test_x conftest$ac_exeext
17843 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017844
17845cat >>confdefs.h <<\_ACEOF
17846#define HAVE_HSTRERROR 1
17847_ACEOF
17848
Antoine Pitrou20327222009-05-24 20:39:11 +000017849 { $as_echo "$as_me:$LINENO: result: yes" >&5
17850$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017851else
Antoine Pitrou20327222009-05-24 20:39:11 +000017852 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017853sed 's/^/| /' conftest.$ac_ext >&5
17854
Antoine Pitrou20327222009-05-24 20:39:11 +000017855 { $as_echo "$as_me:$LINENO: result: no" >&5
17856$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017857
17858fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017859
Antoine Pitrou20327222009-05-24 20:39:11 +000017860rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017861rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017862 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017863
Antoine Pitrou20327222009-05-24 20:39:11 +000017864{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5
17865$as_echo_n "checking for inet_aton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017866cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017867/* confdefs.h. */
17868_ACEOF
17869cat confdefs.h >>conftest.$ac_ext
17870cat >>conftest.$ac_ext <<_ACEOF
17871/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017872
17873#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017874#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017875#include <sys/socket.h>
17876#include <netinet/in.h>
17877#include <arpa/inet.h>
17878
Martin v. Löwise9416172003-05-03 10:12:45 +000017879int
17880main ()
17881{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017882void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017883 ;
17884 return 0;
17885}
17886_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017887rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888if { (ac_try="$ac_link"
17889case "(($ac_try" in
17890 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17891 *) ac_try_echo=$ac_try;;
17892esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017893eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17894$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017895 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017896 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017897 grep -v '^ *+' conftest.er1 >conftest.err
17898 rm -f conftest.er1
17899 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017900 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017901 (exit $ac_status); } && {
17902 test -z "$ac_c_werror_flag" ||
17903 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000017904 } && test -s conftest$ac_exeext && {
17905 test "$cross_compiling" = yes ||
17906 $as_test_x conftest$ac_exeext
17907 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017908
17909cat >>confdefs.h <<\_ACEOF
17910#define HAVE_INET_ATON 1
17911_ACEOF
17912
Antoine Pitrou20327222009-05-24 20:39:11 +000017913 { $as_echo "$as_me:$LINENO: result: yes" >&5
17914$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017915else
Antoine Pitrou20327222009-05-24 20:39:11 +000017916 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017917sed 's/^/| /' conftest.$ac_ext >&5
17918
Antoine Pitrou20327222009-05-24 20:39:11 +000017919 { $as_echo "$as_me:$LINENO: result: no" >&5
17920$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017921
17922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017923
Antoine Pitrou20327222009-05-24 20:39:11 +000017924rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017925rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017926 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017927
Antoine Pitrou20327222009-05-24 20:39:11 +000017928{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5
17929$as_echo_n "checking for inet_pton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017930cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017931/* confdefs.h. */
17932_ACEOF
17933cat confdefs.h >>conftest.$ac_ext
17934cat >>conftest.$ac_ext <<_ACEOF
17935/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017936
17937#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017938#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017939#include <sys/socket.h>
17940#include <netinet/in.h>
17941#include <arpa/inet.h>
17942
Martin v. Löwise9416172003-05-03 10:12:45 +000017943int
17944main ()
17945{
17946void* p = inet_pton
17947 ;
17948 return 0;
17949}
17950_ACEOF
17951rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017952if { (ac_try="$ac_compile"
17953case "(($ac_try" in
17954 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17955 *) ac_try_echo=$ac_try;;
17956esac
Antoine Pitrou20327222009-05-24 20:39:11 +000017957eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17958$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017959 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017960 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017961 grep -v '^ *+' conftest.er1 >conftest.err
17962 rm -f conftest.er1
17963 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000017964 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965 (exit $ac_status); } && {
17966 test -z "$ac_c_werror_flag" ||
17967 test ! -s conftest.err
17968 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017969
17970cat >>confdefs.h <<\_ACEOF
17971#define HAVE_INET_PTON 1
17972_ACEOF
17973
Antoine Pitrou20327222009-05-24 20:39:11 +000017974 { $as_echo "$as_me:$LINENO: result: yes" >&5
17975$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017976else
Antoine Pitrou20327222009-05-24 20:39:11 +000017977 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017978sed 's/^/| /' conftest.$ac_ext >&5
17979
Antoine Pitrou20327222009-05-24 20:39:11 +000017980 { $as_echo "$as_me:$LINENO: result: no" >&5
17981$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017982
17983fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984
17985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017986
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017987# On some systems, setgroups is in unistd.h, on others, in grp.h
Antoine Pitrou20327222009-05-24 20:39:11 +000017988{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5
17989$as_echo_n "checking for setgroups... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017990cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017991/* confdefs.h. */
17992_ACEOF
17993cat confdefs.h >>conftest.$ac_ext
17994cat >>conftest.$ac_ext <<_ACEOF
17995/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017996
17997#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017998#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017999#ifdef HAVE_GRP_H
18000#include <grp.h>
18001#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018002
Martin v. Löwisd5843682002-11-21 20:41:28 +000018003int
18004main ()
18005{
18006void* p = setgroups
18007 ;
18008 return 0;
18009}
18010_ACEOF
18011rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018012if { (ac_try="$ac_compile"
18013case "(($ac_try" in
18014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18015 *) ac_try_echo=$ac_try;;
18016esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018017eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18018$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018019 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018020 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018021 grep -v '^ *+' conftest.er1 >conftest.err
18022 rm -f conftest.er1
18023 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018024 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018025 (exit $ac_status); } && {
18026 test -z "$ac_c_werror_flag" ||
18027 test ! -s conftest.err
18028 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018029
18030cat >>confdefs.h <<\_ACEOF
18031#define HAVE_SETGROUPS 1
18032_ACEOF
18033
Antoine Pitrou20327222009-05-24 20:39:11 +000018034 { $as_echo "$as_me:$LINENO: result: yes" >&5
18035$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018036else
Antoine Pitrou20327222009-05-24 20:39:11 +000018037 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018038sed 's/^/| /' conftest.$ac_ext >&5
18039
Antoine Pitrou20327222009-05-24 20:39:11 +000018040 { $as_echo "$as_me:$LINENO: result: no" >&5
18041$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018042
18043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044
18045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018046
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018047# check for openpty and forkpty
18048
Martin v. Löwis11437992002-04-12 09:54:03 +000018049
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018050for ac_func in openpty
18051do
Antoine Pitrou20327222009-05-24 20:39:11 +000018052as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18053{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18054$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018055if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000018056 $as_echo_n "(cached) " >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018057else
Martin v. Löwis11437992002-04-12 09:54:03 +000018058 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018059/* confdefs.h. */
18060_ACEOF
18061cat confdefs.h >>conftest.$ac_ext
18062cat >>conftest.$ac_ext <<_ACEOF
18063/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018064/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18065 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18066#define $ac_func innocuous_$ac_func
18067
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018068/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018069 which can conflict with char $ac_func (); below.
18070 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018071 <limits.h> exists even on freestanding compilers. */
18072
18073#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018074# include <limits.h>
18075#else
18076# include <assert.h>
18077#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018078
18079#undef $ac_func
18080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018081/* Override any GCC internal prototype to avoid an error.
18082 Use char because int might match the return type of a GCC
18083 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018084#ifdef __cplusplus
18085extern "C"
18086#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018087char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018088/* The GNU C library defines this for functions which it implements
18089 to always fail with ENOSYS. Some functions are actually named
18090 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018091#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018092choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018093#endif
18094
Skip Montanaro6dead952003-09-25 14:50:04 +000018095int
18096main ()
18097{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018098return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018099 ;
18100 return 0;
18101}
18102_ACEOF
18103rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018104if { (ac_try="$ac_link"
18105case "(($ac_try" in
18106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18107 *) ac_try_echo=$ac_try;;
18108esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018109eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18110$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018111 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018112 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018113 grep -v '^ *+' conftest.er1 >conftest.err
18114 rm -f conftest.er1
18115 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018116 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018117 (exit $ac_status); } && {
18118 test -z "$ac_c_werror_flag" ||
18119 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000018120 } && test -s conftest$ac_exeext && {
18121 test "$cross_compiling" = yes ||
18122 $as_test_x conftest$ac_exeext
18123 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018124 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018125else
Antoine Pitrou20327222009-05-24 20:39:11 +000018126 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018127sed 's/^/| /' conftest.$ac_ext >&5
18128
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018129 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018131
Antoine Pitrou20327222009-05-24 20:39:11 +000018132rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018133rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018134 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018135fi
Antoine Pitrou20327222009-05-24 20:39:11 +000018136ac_res=`eval 'as_val=${'$as_ac_var'}
18137 $as_echo "$as_val"'`
18138 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18139$as_echo "$ac_res" >&6; }
18140as_val=`eval 'as_val=${'$as_ac_var'}
18141 $as_echo "$as_val"'`
18142 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018143 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000018144#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018145_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018146
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018147else
Antoine Pitrou20327222009-05-24 20:39:11 +000018148 { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18149$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018150if test "${ac_cv_lib_util_openpty+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000018151 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018152else
Martin v. Löwis11437992002-04-12 09:54:03 +000018153 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018154LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018155cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018156/* confdefs.h. */
18157_ACEOF
18158cat confdefs.h >>conftest.$ac_ext
18159cat >>conftest.$ac_ext <<_ACEOF
18160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018161
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018162/* Override any GCC internal prototype to avoid an error.
18163 Use char because int might match the return type of a GCC
18164 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018165#ifdef __cplusplus
18166extern "C"
18167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018168char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018169int
18170main ()
18171{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018172return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018173 ;
18174 return 0;
18175}
18176_ACEOF
18177rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018178if { (ac_try="$ac_link"
18179case "(($ac_try" in
18180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18181 *) ac_try_echo=$ac_try;;
18182esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018183eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18184$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018185 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018187 grep -v '^ *+' conftest.er1 >conftest.err
18188 rm -f conftest.er1
18189 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018190 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018191 (exit $ac_status); } && {
18192 test -z "$ac_c_werror_flag" ||
18193 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000018194 } && test -s conftest$ac_exeext && {
18195 test "$cross_compiling" = yes ||
18196 $as_test_x conftest$ac_exeext
18197 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018198 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018199else
Antoine Pitrou20327222009-05-24 20:39:11 +000018200 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018201sed 's/^/| /' conftest.$ac_ext >&5
18202
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018203 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018204fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018205
Antoine Pitrou20327222009-05-24 20:39:11 +000018206rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018207rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018208 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018209LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018210fi
Antoine Pitrou20327222009-05-24 20:39:11 +000018211{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18212$as_echo "$ac_cv_lib_util_openpty" >&6; }
18213if test "x$ac_cv_lib_util_openpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018214 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018215#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018216_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018217 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018218else
Antoine Pitrou20327222009-05-24 20:39:11 +000018219 { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18220$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018221if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000018222 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018223else
18224 ac_check_lib_save_LIBS=$LIBS
18225LIBS="-lbsd $LIBS"
18226cat >conftest.$ac_ext <<_ACEOF
18227/* confdefs.h. */
18228_ACEOF
18229cat confdefs.h >>conftest.$ac_ext
18230cat >>conftest.$ac_ext <<_ACEOF
18231/* end confdefs.h. */
18232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018233/* Override any GCC internal prototype to avoid an error.
18234 Use char because int might match the return type of a GCC
18235 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018236#ifdef __cplusplus
18237extern "C"
18238#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018239char openpty ();
18240int
18241main ()
18242{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018243return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018244 ;
18245 return 0;
18246}
18247_ACEOF
18248rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018249if { (ac_try="$ac_link"
18250case "(($ac_try" in
18251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18252 *) ac_try_echo=$ac_try;;
18253esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018254eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18255$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018257 ac_status=$?
18258 grep -v '^ *+' conftest.er1 >conftest.err
18259 rm -f conftest.er1
18260 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018261 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018262 (exit $ac_status); } && {
18263 test -z "$ac_c_werror_flag" ||
18264 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000018265 } && test -s conftest$ac_exeext && {
18266 test "$cross_compiling" = yes ||
18267 $as_test_x conftest$ac_exeext
18268 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018269 ac_cv_lib_bsd_openpty=yes
18270else
Antoine Pitrou20327222009-05-24 20:39:11 +000018271 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018272sed 's/^/| /' conftest.$ac_ext >&5
18273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018274 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018276
Antoine Pitrou20327222009-05-24 20:39:11 +000018277rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018278rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018279 conftest$ac_exeext conftest.$ac_ext
18280LIBS=$ac_check_lib_save_LIBS
18281fi
Antoine Pitrou20327222009-05-24 20:39:11 +000018282{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18283$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
18284if test "x$ac_cv_lib_bsd_openpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018285 cat >>confdefs.h <<\_ACEOF
18286#define HAVE_OPENPTY 1
18287_ACEOF
18288 LIBS="$LIBS -lbsd"
18289fi
18290
18291
18292fi
18293
Fred Drake8cef4cf2000-06-28 16:40:38 +000018294
18295fi
18296done
18297
Martin v. Löwis11437992002-04-12 09:54:03 +000018298
Fred Drake8cef4cf2000-06-28 16:40:38 +000018299for ac_func in forkpty
18300do
Antoine Pitrou20327222009-05-24 20:39:11 +000018301as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18302{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18303$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018304if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000018305 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018306else
Martin v. Löwis11437992002-04-12 09:54:03 +000018307 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018308/* confdefs.h. */
18309_ACEOF
18310cat confdefs.h >>conftest.$ac_ext
18311cat >>conftest.$ac_ext <<_ACEOF
18312/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018313/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18314 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18315#define $ac_func innocuous_$ac_func
18316
Fred Drake8cef4cf2000-06-28 16:40:38 +000018317/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018318 which can conflict with char $ac_func (); below.
18319 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018320 <limits.h> exists even on freestanding compilers. */
18321
18322#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018323# include <limits.h>
18324#else
18325# include <assert.h>
18326#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018327
18328#undef $ac_func
18329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018330/* Override any GCC internal prototype to avoid an error.
18331 Use char because int might match the return type of a GCC
18332 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018333#ifdef __cplusplus
18334extern "C"
18335#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018336char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018337/* The GNU C library defines this for functions which it implements
18338 to always fail with ENOSYS. Some functions are actually named
18339 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018340#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018341choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018342#endif
18343
Skip Montanaro6dead952003-09-25 14:50:04 +000018344int
18345main ()
18346{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018347return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018348 ;
18349 return 0;
18350}
18351_ACEOF
18352rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018353if { (ac_try="$ac_link"
18354case "(($ac_try" in
18355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18356 *) ac_try_echo=$ac_try;;
18357esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018358eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18359$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018360 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018361 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018362 grep -v '^ *+' conftest.er1 >conftest.err
18363 rm -f conftest.er1
18364 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018365 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018366 (exit $ac_status); } && {
18367 test -z "$ac_c_werror_flag" ||
18368 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000018369 } && test -s conftest$ac_exeext && {
18370 test "$cross_compiling" = yes ||
18371 $as_test_x conftest$ac_exeext
18372 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018373 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018374else
Antoine Pitrou20327222009-05-24 20:39:11 +000018375 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018376sed 's/^/| /' conftest.$ac_ext >&5
18377
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018378 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018379fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018380
Antoine Pitrou20327222009-05-24 20:39:11 +000018381rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018382rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018383 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018384fi
Antoine Pitrou20327222009-05-24 20:39:11 +000018385ac_res=`eval 'as_val=${'$as_ac_var'}
18386 $as_echo "$as_val"'`
18387 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18388$as_echo "$ac_res" >&6; }
18389as_val=`eval 'as_val=${'$as_ac_var'}
18390 $as_echo "$as_val"'`
18391 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018392 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000018393#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018394_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018395
Fred Drake8cef4cf2000-06-28 16:40:38 +000018396else
Antoine Pitrou20327222009-05-24 20:39:11 +000018397 { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18398$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018399if test "${ac_cv_lib_util_forkpty+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000018400 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018401else
Martin v. Löwis11437992002-04-12 09:54:03 +000018402 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018403LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018404cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018405/* confdefs.h. */
18406_ACEOF
18407cat confdefs.h >>conftest.$ac_ext
18408cat >>conftest.$ac_ext <<_ACEOF
18409/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018411/* Override any GCC internal prototype to avoid an error.
18412 Use char because int might match the return type of a GCC
18413 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018414#ifdef __cplusplus
18415extern "C"
18416#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018417char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018418int
18419main ()
18420{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018422 ;
18423 return 0;
18424}
18425_ACEOF
18426rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018427if { (ac_try="$ac_link"
18428case "(($ac_try" in
18429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18430 *) ac_try_echo=$ac_try;;
18431esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018432eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18433$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018434 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018435 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018436 grep -v '^ *+' conftest.er1 >conftest.err
18437 rm -f conftest.er1
18438 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018439 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018440 (exit $ac_status); } && {
18441 test -z "$ac_c_werror_flag" ||
18442 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000018443 } && test -s conftest$ac_exeext && {
18444 test "$cross_compiling" = yes ||
18445 $as_test_x conftest$ac_exeext
18446 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018447 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018448else
Antoine Pitrou20327222009-05-24 20:39:11 +000018449 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018450sed 's/^/| /' conftest.$ac_ext >&5
18451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018454
Antoine Pitrou20327222009-05-24 20:39:11 +000018455rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018456rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018457 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018458LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018459fi
Antoine Pitrou20327222009-05-24 20:39:11 +000018460{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18461$as_echo "$ac_cv_lib_util_forkpty" >&6; }
18462if test "x$ac_cv_lib_util_forkpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018463 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018464#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018465_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018466 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018467else
Antoine Pitrou20327222009-05-24 20:39:11 +000018468 { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18469$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018470if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000018471 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018472else
18473 ac_check_lib_save_LIBS=$LIBS
18474LIBS="-lbsd $LIBS"
18475cat >conftest.$ac_ext <<_ACEOF
18476/* confdefs.h. */
18477_ACEOF
18478cat confdefs.h >>conftest.$ac_ext
18479cat >>conftest.$ac_ext <<_ACEOF
18480/* end confdefs.h. */
18481
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018482/* Override any GCC internal prototype to avoid an error.
18483 Use char because int might match the return type of a GCC
18484 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018485#ifdef __cplusplus
18486extern "C"
18487#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018488char forkpty ();
18489int
18490main ()
18491{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018492return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018493 ;
18494 return 0;
18495}
18496_ACEOF
18497rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018498if { (ac_try="$ac_link"
18499case "(($ac_try" in
18500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18501 *) ac_try_echo=$ac_try;;
18502esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018503eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18504$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018505 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018506 ac_status=$?
18507 grep -v '^ *+' conftest.er1 >conftest.err
18508 rm -f conftest.er1
18509 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018510 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018511 (exit $ac_status); } && {
18512 test -z "$ac_c_werror_flag" ||
18513 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000018514 } && test -s conftest$ac_exeext && {
18515 test "$cross_compiling" = yes ||
18516 $as_test_x conftest$ac_exeext
18517 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018518 ac_cv_lib_bsd_forkpty=yes
18519else
Antoine Pitrou20327222009-05-24 20:39:11 +000018520 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018521sed 's/^/| /' conftest.$ac_ext >&5
18522
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018523 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525
Antoine Pitrou20327222009-05-24 20:39:11 +000018526rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018528 conftest$ac_exeext conftest.$ac_ext
18529LIBS=$ac_check_lib_save_LIBS
18530fi
Antoine Pitrou20327222009-05-24 20:39:11 +000018531{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18532$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
18533if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018534 cat >>confdefs.h <<\_ACEOF
18535#define HAVE_FORKPTY 1
18536_ACEOF
18537 LIBS="$LIBS -lbsd"
18538fi
18539
18540
18541fi
18542
Fred Drake8cef4cf2000-06-28 16:40:38 +000018543
18544fi
18545done
18546
Jack Jansendd19cf82001-12-06 22:36:17 +000018547
Christian Heimesb186d002008-03-18 15:15:01 +000018548# Stuff for expat.
18549
18550for ac_func in memmove
18551do
Antoine Pitrou20327222009-05-24 20:39:11 +000018552as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18553{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18554$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018555if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000018556 $as_echo_n "(cached) " >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018557else
18558 cat >conftest.$ac_ext <<_ACEOF
18559/* confdefs.h. */
18560_ACEOF
18561cat confdefs.h >>conftest.$ac_ext
18562cat >>conftest.$ac_ext <<_ACEOF
18563/* end confdefs.h. */
18564/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18565 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18566#define $ac_func innocuous_$ac_func
18567
18568/* System header to define __stub macros and hopefully few prototypes,
18569 which can conflict with char $ac_func (); below.
18570 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18571 <limits.h> exists even on freestanding compilers. */
18572
18573#ifdef __STDC__
18574# include <limits.h>
18575#else
18576# include <assert.h>
18577#endif
18578
18579#undef $ac_func
18580
18581/* Override any GCC internal prototype to avoid an error.
18582 Use char because int might match the return type of a GCC
18583 builtin and then its argument prototype would still apply. */
18584#ifdef __cplusplus
18585extern "C"
18586#endif
18587char $ac_func ();
18588/* The GNU C library defines this for functions which it implements
18589 to always fail with ENOSYS. Some functions are actually named
18590 something starting with __ and the normal name is an alias. */
18591#if defined __stub_$ac_func || defined __stub___$ac_func
18592choke me
18593#endif
18594
18595int
18596main ()
18597{
18598return $ac_func ();
18599 ;
18600 return 0;
18601}
18602_ACEOF
18603rm -f conftest.$ac_objext conftest$ac_exeext
18604if { (ac_try="$ac_link"
18605case "(($ac_try" in
18606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18607 *) ac_try_echo=$ac_try;;
18608esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018609eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18610$as_echo "$ac_try_echo") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018611 (eval "$ac_link") 2>conftest.er1
18612 ac_status=$?
18613 grep -v '^ *+' conftest.er1 >conftest.err
18614 rm -f conftest.er1
18615 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018616 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018617 (exit $ac_status); } && {
18618 test -z "$ac_c_werror_flag" ||
18619 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000018620 } && test -s conftest$ac_exeext && {
18621 test "$cross_compiling" = yes ||
18622 $as_test_x conftest$ac_exeext
18623 }; then
Christian Heimesb186d002008-03-18 15:15:01 +000018624 eval "$as_ac_var=yes"
18625else
Antoine Pitrou20327222009-05-24 20:39:11 +000018626 $as_echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018627sed 's/^/| /' conftest.$ac_ext >&5
18628
18629 eval "$as_ac_var=no"
18630fi
18631
Antoine Pitrou20327222009-05-24 20:39:11 +000018632rm -rf conftest.dSYM
Christian Heimesb186d002008-03-18 15:15:01 +000018633rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18634 conftest$ac_exeext conftest.$ac_ext
18635fi
Antoine Pitrou20327222009-05-24 20:39:11 +000018636ac_res=`eval 'as_val=${'$as_ac_var'}
18637 $as_echo "$as_val"'`
18638 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18639$as_echo "$ac_res" >&6; }
18640as_val=`eval 'as_val=${'$as_ac_var'}
18641 $as_echo "$as_val"'`
18642 if test "x$as_val" = x""yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018643 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000018644#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018645_ACEOF
18646
18647fi
18648done
18649
18650
Michael W. Hudson54241132001-12-07 15:38:26 +000018651# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018652
18653
18654
18655
18656
18657
Fred Drake8cef4cf2000-06-28 16:40:38 +000018658for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18659do
Antoine Pitrou20327222009-05-24 20:39:11 +000018660as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18661{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18662$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018663if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000018664 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018665else
Martin v. Löwis11437992002-04-12 09:54:03 +000018666 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018667/* confdefs.h. */
18668_ACEOF
18669cat confdefs.h >>conftest.$ac_ext
18670cat >>conftest.$ac_ext <<_ACEOF
18671/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018672/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18673 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18674#define $ac_func innocuous_$ac_func
18675
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018676/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018677 which can conflict with char $ac_func (); below.
18678 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018679 <limits.h> exists even on freestanding compilers. */
18680
18681#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018682# include <limits.h>
18683#else
18684# include <assert.h>
18685#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018686
18687#undef $ac_func
18688
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018689/* Override any GCC internal prototype to avoid an error.
18690 Use char because int might match the return type of a GCC
18691 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018692#ifdef __cplusplus
18693extern "C"
18694#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018695char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018696/* The GNU C library defines this for functions which it implements
18697 to always fail with ENOSYS. Some functions are actually named
18698 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018699#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018700choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018701#endif
18702
Skip Montanaro6dead952003-09-25 14:50:04 +000018703int
18704main ()
18705{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018706return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018707 ;
18708 return 0;
18709}
18710_ACEOF
18711rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018712if { (ac_try="$ac_link"
18713case "(($ac_try" in
18714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18715 *) ac_try_echo=$ac_try;;
18716esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018717eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18718$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018719 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018720 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018721 grep -v '^ *+' conftest.er1 >conftest.err
18722 rm -f conftest.er1
18723 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018724 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018725 (exit $ac_status); } && {
18726 test -z "$ac_c_werror_flag" ||
18727 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000018728 } && test -s conftest$ac_exeext && {
18729 test "$cross_compiling" = yes ||
18730 $as_test_x conftest$ac_exeext
18731 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018732 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018733else
Antoine Pitrou20327222009-05-24 20:39:11 +000018734 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018735sed 's/^/| /' conftest.$ac_ext >&5
18736
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018737 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018739
Antoine Pitrou20327222009-05-24 20:39:11 +000018740rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018741rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018742 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018743fi
Antoine Pitrou20327222009-05-24 20:39:11 +000018744ac_res=`eval 'as_val=${'$as_ac_var'}
18745 $as_echo "$as_val"'`
18746 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18747$as_echo "$ac_res" >&6; }
18748as_val=`eval 'as_val=${'$as_ac_var'}
18749 $as_echo "$as_val"'`
18750 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018751 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000018752#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018753_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018754
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018755fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018756done
18757
Michael W. Hudson54241132001-12-07 15:38:26 +000018758
Martin v. Löwis11437992002-04-12 09:54:03 +000018759
18760
18761
Christian Heimesb186d002008-03-18 15:15:01 +000018762for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018763do
Antoine Pitrou20327222009-05-24 20:39:11 +000018764as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18765{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18766$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018767if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000018768 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018769else
Martin v. Löwis11437992002-04-12 09:54:03 +000018770 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018771/* confdefs.h. */
18772_ACEOF
18773cat confdefs.h >>conftest.$ac_ext
18774cat >>conftest.$ac_ext <<_ACEOF
18775/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018776/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18777 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18778#define $ac_func innocuous_$ac_func
18779
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018780/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018781 which can conflict with char $ac_func (); below.
18782 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018783 <limits.h> exists even on freestanding compilers. */
18784
18785#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018786# include <limits.h>
18787#else
18788# include <assert.h>
18789#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018790
18791#undef $ac_func
18792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018793/* Override any GCC internal prototype to avoid an error.
18794 Use char because int might match the return type of a GCC
18795 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018796#ifdef __cplusplus
18797extern "C"
18798#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018799char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018800/* The GNU C library defines this for functions which it implements
18801 to always fail with ENOSYS. Some functions are actually named
18802 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018803#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018804choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018805#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018806
Skip Montanaro6dead952003-09-25 14:50:04 +000018807int
18808main ()
18809{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018810return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018811 ;
18812 return 0;
18813}
18814_ACEOF
18815rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018816if { (ac_try="$ac_link"
18817case "(($ac_try" in
18818 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18819 *) ac_try_echo=$ac_try;;
18820esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018821eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18822$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018823 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018824 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018825 grep -v '^ *+' conftest.er1 >conftest.err
18826 rm -f conftest.er1
18827 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018828 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018829 (exit $ac_status); } && {
18830 test -z "$ac_c_werror_flag" ||
18831 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000018832 } && test -s conftest$ac_exeext && {
18833 test "$cross_compiling" = yes ||
18834 $as_test_x conftest$ac_exeext
18835 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018836 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018837else
Antoine Pitrou20327222009-05-24 20:39:11 +000018838 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018839sed 's/^/| /' conftest.$ac_ext >&5
18840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018841 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018842fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018843
Antoine Pitrou20327222009-05-24 20:39:11 +000018844rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018845rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018846 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018847fi
Antoine Pitrou20327222009-05-24 20:39:11 +000018848ac_res=`eval 'as_val=${'$as_ac_var'}
18849 $as_echo "$as_val"'`
18850 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18851$as_echo "$ac_res" >&6; }
18852as_val=`eval 'as_val=${'$as_ac_var'}
18853 $as_echo "$as_val"'`
18854 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018855 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000018856#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018857_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018858
Martin v. Löwis1142de32002-03-29 16:28:31 +000018859else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018860 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018861 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018862 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18863 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018864esac
18865
Martin v. Löwis1142de32002-03-29 16:28:31 +000018866fi
18867done
18868
18869
Martin v. Löwis11437992002-04-12 09:54:03 +000018870
Martin v. Löwis1142de32002-03-29 16:28:31 +000018871for ac_func in getpgrp
18872do
Antoine Pitrou20327222009-05-24 20:39:11 +000018873as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18874{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18875$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018876if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000018877 $as_echo_n "(cached) " >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018878else
Martin v. Löwis11437992002-04-12 09:54:03 +000018879 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018880/* confdefs.h. */
18881_ACEOF
18882cat confdefs.h >>conftest.$ac_ext
18883cat >>conftest.$ac_ext <<_ACEOF
18884/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018885/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18886 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18887#define $ac_func innocuous_$ac_func
18888
Martin v. Löwis1142de32002-03-29 16:28:31 +000018889/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018890 which can conflict with char $ac_func (); below.
18891 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018892 <limits.h> exists even on freestanding compilers. */
18893
18894#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018895# include <limits.h>
18896#else
18897# include <assert.h>
18898#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018899
18900#undef $ac_func
18901
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018902/* Override any GCC internal prototype to avoid an error.
18903 Use char because int might match the return type of a GCC
18904 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018905#ifdef __cplusplus
18906extern "C"
18907#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018908char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018909/* The GNU C library defines this for functions which it implements
18910 to always fail with ENOSYS. Some functions are actually named
18911 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018912#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018913choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018914#endif
18915
Skip Montanaro6dead952003-09-25 14:50:04 +000018916int
18917main ()
18918{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018919return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018920 ;
18921 return 0;
18922}
18923_ACEOF
18924rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018925if { (ac_try="$ac_link"
18926case "(($ac_try" in
18927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18928 *) ac_try_echo=$ac_try;;
18929esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018930eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18931$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018932 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018934 grep -v '^ *+' conftest.er1 >conftest.err
18935 rm -f conftest.er1
18936 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018937 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018938 (exit $ac_status); } && {
18939 test -z "$ac_c_werror_flag" ||
18940 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000018941 } && test -s conftest$ac_exeext && {
18942 test "$cross_compiling" = yes ||
18943 $as_test_x conftest$ac_exeext
18944 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018945 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018946else
Antoine Pitrou20327222009-05-24 20:39:11 +000018947 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018948sed 's/^/| /' conftest.$ac_ext >&5
18949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018950 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018952
Antoine Pitrou20327222009-05-24 20:39:11 +000018953rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018954rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018955 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018956fi
Antoine Pitrou20327222009-05-24 20:39:11 +000018957ac_res=`eval 'as_val=${'$as_ac_var'}
18958 $as_echo "$as_val"'`
18959 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18960$as_echo "$ac_res" >&6; }
18961as_val=`eval 'as_val=${'$as_ac_var'}
18962 $as_echo "$as_val"'`
18963 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018964 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000018965#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018966_ACEOF
18967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018968/* confdefs.h. */
18969_ACEOF
18970cat confdefs.h >>conftest.$ac_ext
18971cat >>conftest.$ac_ext <<_ACEOF
18972/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018973#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018974int
18975main ()
18976{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018977getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018978 ;
18979 return 0;
18980}
18981_ACEOF
18982rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018983if { (ac_try="$ac_compile"
18984case "(($ac_try" in
18985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18986 *) ac_try_echo=$ac_try;;
18987esac
Antoine Pitrou20327222009-05-24 20:39:11 +000018988eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18989$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018990 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018992 grep -v '^ *+' conftest.er1 >conftest.err
18993 rm -f conftest.er1
18994 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000018995 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018996 (exit $ac_status); } && {
18997 test -z "$ac_c_werror_flag" ||
18998 test ! -s conftest.err
18999 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019000
19001cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019002#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019003_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019004
Martin v. Löwis11437992002-04-12 09:54:03 +000019005
Guido van Rossumf78abae1997-01-21 22:02:36 +000019006else
Antoine Pitrou20327222009-05-24 20:39:11 +000019007 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019008sed 's/^/| /' conftest.$ac_ext >&5
19009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019010
Guido van Rossum627b2d71993-12-24 10:39:16 +000019011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019012
19013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019014
Guido van Rossum627b2d71993-12-24 10:39:16 +000019015fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019016done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019017
Jack Jansen150753c2003-03-29 22:07:47 +000019018
19019for ac_func in setpgrp
19020do
Antoine Pitrou20327222009-05-24 20:39:11 +000019021as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19022{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19023$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019024if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000019025 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019026else
Martin v. Löwis11437992002-04-12 09:54:03 +000019027 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019028/* confdefs.h. */
19029_ACEOF
19030cat confdefs.h >>conftest.$ac_ext
19031cat >>conftest.$ac_ext <<_ACEOF
19032/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019033/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19034 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19035#define $ac_func innocuous_$ac_func
19036
Jack Jansen150753c2003-03-29 22:07:47 +000019037/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019038 which can conflict with char $ac_func (); below.
19039 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019040 <limits.h> exists even on freestanding compilers. */
19041
19042#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019043# include <limits.h>
19044#else
19045# include <assert.h>
19046#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019047
19048#undef $ac_func
19049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019050/* Override any GCC internal prototype to avoid an error.
19051 Use char because int might match the return type of a GCC
19052 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019053#ifdef __cplusplus
19054extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019055#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019056char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019057/* The GNU C library defines this for functions which it implements
19058 to always fail with ENOSYS. Some functions are actually named
19059 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019060#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019061choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019062#endif
19063
Skip Montanaro6dead952003-09-25 14:50:04 +000019064int
19065main ()
19066{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019067return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019068 ;
19069 return 0;
19070}
19071_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019072rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019073if { (ac_try="$ac_link"
19074case "(($ac_try" in
19075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19076 *) ac_try_echo=$ac_try;;
19077esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019078eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19079$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019080 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019082 grep -v '^ *+' conftest.er1 >conftest.err
19083 rm -f conftest.er1
19084 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019085 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019086 (exit $ac_status); } && {
19087 test -z "$ac_c_werror_flag" ||
19088 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000019089 } && test -s conftest$ac_exeext && {
19090 test "$cross_compiling" = yes ||
19091 $as_test_x conftest$ac_exeext
19092 }; then
Jack Jansen150753c2003-03-29 22:07:47 +000019093 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019094else
Antoine Pitrou20327222009-05-24 20:39:11 +000019095 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019096sed 's/^/| /' conftest.$ac_ext >&5
19097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019098 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019100
Antoine Pitrou20327222009-05-24 20:39:11 +000019101rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019102rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019103 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019104fi
Antoine Pitrou20327222009-05-24 20:39:11 +000019105ac_res=`eval 'as_val=${'$as_ac_var'}
19106 $as_echo "$as_val"'`
19107 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19108$as_echo "$ac_res" >&6; }
19109as_val=`eval 'as_val=${'$as_ac_var'}
19110 $as_echo "$as_val"'`
19111 if test "x$as_val" = x""yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019112 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000019113#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019114_ACEOF
19115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019116/* confdefs.h. */
19117_ACEOF
19118cat confdefs.h >>conftest.$ac_ext
19119cat >>conftest.$ac_ext <<_ACEOF
19120/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019121#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019122int
19123main ()
19124{
19125setpgrp(0,0);
19126 ;
19127 return 0;
19128}
19129_ACEOF
19130rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019131if { (ac_try="$ac_compile"
19132case "(($ac_try" in
19133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19134 *) ac_try_echo=$ac_try;;
19135esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019136eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19137$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019138 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019140 grep -v '^ *+' conftest.er1 >conftest.err
19141 rm -f conftest.er1
19142 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019143 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019144 (exit $ac_status); } && {
19145 test -z "$ac_c_werror_flag" ||
19146 test ! -s conftest.err
19147 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019148
19149cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019150#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019151_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019152
Jack Jansen150753c2003-03-29 22:07:47 +000019153
19154else
Antoine Pitrou20327222009-05-24 20:39:11 +000019155 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019156sed 's/^/| /' conftest.$ac_ext >&5
19157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019158
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019159fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019160
19161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019162
19163fi
19164done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019165
Martin v. Löwis11437992002-04-12 09:54:03 +000019166
Thomas Wouters3a584202000-08-05 23:28:51 +000019167for ac_func in gettimeofday
19168do
Antoine Pitrou20327222009-05-24 20:39:11 +000019169as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19170{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19171$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019172if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000019173 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019174else
Martin v. Löwis11437992002-04-12 09:54:03 +000019175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019176/* confdefs.h. */
19177_ACEOF
19178cat confdefs.h >>conftest.$ac_ext
19179cat >>conftest.$ac_ext <<_ACEOF
19180/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019181/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19183#define $ac_func innocuous_$ac_func
19184
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019185/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019186 which can conflict with char $ac_func (); below.
19187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019188 <limits.h> exists even on freestanding compilers. */
19189
19190#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019191# include <limits.h>
19192#else
19193# include <assert.h>
19194#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019195
19196#undef $ac_func
19197
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019198/* Override any GCC internal prototype to avoid an error.
19199 Use char because int might match the return type of a GCC
19200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019201#ifdef __cplusplus
19202extern "C"
19203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019204char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019205/* The GNU C library defines this for functions which it implements
19206 to always fail with ENOSYS. Some functions are actually named
19207 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019208#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019209choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019210#endif
19211
Skip Montanaro6dead952003-09-25 14:50:04 +000019212int
19213main ()
19214{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019215return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019216 ;
19217 return 0;
19218}
19219_ACEOF
19220rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019221if { (ac_try="$ac_link"
19222case "(($ac_try" in
19223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19224 *) ac_try_echo=$ac_try;;
19225esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019226eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19227$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019228 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019229 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019230 grep -v '^ *+' conftest.er1 >conftest.err
19231 rm -f conftest.er1
19232 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019233 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019234 (exit $ac_status); } && {
19235 test -z "$ac_c_werror_flag" ||
19236 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000019237 } && test -s conftest$ac_exeext && {
19238 test "$cross_compiling" = yes ||
19239 $as_test_x conftest$ac_exeext
19240 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019241 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019242else
Antoine Pitrou20327222009-05-24 20:39:11 +000019243 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019244sed 's/^/| /' conftest.$ac_ext >&5
19245
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019246 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019248
Antoine Pitrou20327222009-05-24 20:39:11 +000019249rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019250rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019251 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019252fi
Antoine Pitrou20327222009-05-24 20:39:11 +000019253ac_res=`eval 'as_val=${'$as_ac_var'}
19254 $as_echo "$as_val"'`
19255 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19256$as_echo "$ac_res" >&6; }
19257as_val=`eval 'as_val=${'$as_ac_var'}
19258 $as_echo "$as_val"'`
19259 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019260 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000019261#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019262_ACEOF
19263 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019264/* confdefs.h. */
19265_ACEOF
19266cat confdefs.h >>conftest.$ac_ext
19267cat >>conftest.$ac_ext <<_ACEOF
19268/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019269#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019270int
19271main ()
19272{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019273gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019274 ;
19275 return 0;
19276}
19277_ACEOF
19278rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019279if { (ac_try="$ac_compile"
19280case "(($ac_try" in
19281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19282 *) ac_try_echo=$ac_try;;
19283esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019284eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19285$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019288 grep -v '^ *+' conftest.er1 >conftest.err
19289 rm -f conftest.er1
19290 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019291 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019292 (exit $ac_status); } && {
19293 test -z "$ac_c_werror_flag" ||
19294 test ! -s conftest.err
19295 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019296 :
19297else
Antoine Pitrou20327222009-05-24 20:39:11 +000019298 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019299sed 's/^/| /' conftest.$ac_ext >&5
19300
Martin v. Löwis11437992002-04-12 09:54:03 +000019301
19302cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019303#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019304_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019305
Martin v. Löwis11437992002-04-12 09:54:03 +000019306
Guido van Rossum627b2d71993-12-24 10:39:16 +000019307fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019308
19309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019310
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019311fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019312done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019313
Michael W. Hudson54241132001-12-07 15:38:26 +000019314
Antoine Pitrou20327222009-05-24 20:39:11 +000019315{ $as_echo "$as_me:$LINENO: checking for major" >&5
19316$as_echo_n "checking for major... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019317cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019318/* confdefs.h. */
19319_ACEOF
19320cat confdefs.h >>conftest.$ac_ext
19321cat >>conftest.$ac_ext <<_ACEOF
19322/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019323
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019324#if defined(MAJOR_IN_MKDEV)
19325#include <sys/mkdev.h>
19326#elif defined(MAJOR_IN_SYSMACROS)
19327#include <sys/sysmacros.h>
19328#else
19329#include <sys/types.h>
19330#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019331
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019332int
19333main ()
19334{
19335
19336 makedev(major(0),minor(0));
19337
19338 ;
19339 return 0;
19340}
19341_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019342rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019343if { (ac_try="$ac_link"
19344case "(($ac_try" in
19345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19346 *) ac_try_echo=$ac_try;;
19347esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019348eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19349$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019350 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019352 grep -v '^ *+' conftest.er1 >conftest.err
19353 rm -f conftest.er1
19354 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019355 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019356 (exit $ac_status); } && {
19357 test -z "$ac_c_werror_flag" ||
19358 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000019359 } && test -s conftest$ac_exeext && {
19360 test "$cross_compiling" = yes ||
19361 $as_test_x conftest$ac_exeext
19362 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019363
19364
19365cat >>confdefs.h <<\_ACEOF
19366#define HAVE_DEVICE_MACROS 1
19367_ACEOF
19368
Antoine Pitrou20327222009-05-24 20:39:11 +000019369 { $as_echo "$as_me:$LINENO: result: yes" >&5
19370$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019371
19372else
Antoine Pitrou20327222009-05-24 20:39:11 +000019373 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019374sed 's/^/| /' conftest.$ac_ext >&5
19375
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019376
Antoine Pitrou20327222009-05-24 20:39:11 +000019377 { $as_echo "$as_me:$LINENO: result: no" >&5
19378$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019379
19380fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019381
Antoine Pitrou20327222009-05-24 20:39:11 +000019382rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019383rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019384 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019385
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019386# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019387# for [no]getaddrinfo in netdb.h.
Antoine Pitrou20327222009-05-24 20:39:11 +000019388{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19389$as_echo_n "checking for getaddrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019390cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019391/* confdefs.h. */
19392_ACEOF
19393cat confdefs.h >>conftest.$ac_ext
19394cat >>conftest.$ac_ext <<_ACEOF
19395/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019396
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019397#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019398#include <sys/socket.h>
19399#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019400#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019401
Martin v. Löwis11437992002-04-12 09:54:03 +000019402int
19403main ()
19404{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019405
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019406getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019407
Martin v. Löwis11437992002-04-12 09:54:03 +000019408 ;
19409 return 0;
19410}
19411_ACEOF
19412rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019413if { (ac_try="$ac_link"
19414case "(($ac_try" in
19415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19416 *) ac_try_echo=$ac_try;;
19417esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019418eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19419$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019420 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019422 grep -v '^ *+' conftest.er1 >conftest.err
19423 rm -f conftest.er1
19424 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019425 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019426 (exit $ac_status); } && {
19427 test -z "$ac_c_werror_flag" ||
19428 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000019429 } && test -s conftest$ac_exeext && {
19430 test "$cross_compiling" = yes ||
19431 $as_test_x conftest$ac_exeext
19432 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019433
Antoine Pitrou20327222009-05-24 20:39:11 +000019434{ $as_echo "$as_me:$LINENO: result: yes" >&5
19435$as_echo "yes" >&6; }
19436{ $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19437$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019438if test "$cross_compiling" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000019439 { $as_echo "$as_me:$LINENO: result: buggy" >&5
19440$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019441buggygetaddrinfo=yes
19442else
Martin v. Löwis11437992002-04-12 09:54:03 +000019443 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019444/* confdefs.h. */
19445_ACEOF
19446cat confdefs.h >>conftest.$ac_ext
19447cat >>conftest.$ac_ext <<_ACEOF
19448/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019449
19450#include <sys/types.h>
19451#include <netdb.h>
19452#include <string.h>
19453#include <sys/socket.h>
19454#include <netinet/in.h>
19455
19456main()
19457{
19458 int passive, gaierr, inet4 = 0, inet6 = 0;
19459 struct addrinfo hints, *ai, *aitop;
19460 char straddr[INET6_ADDRSTRLEN], strport[16];
19461
19462 for (passive = 0; passive <= 1; passive++) {
19463 memset(&hints, 0, sizeof(hints));
19464 hints.ai_family = AF_UNSPEC;
19465 hints.ai_flags = passive ? AI_PASSIVE : 0;
19466 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019467 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019468 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19469 (void)gai_strerror(gaierr);
19470 goto bad;
19471 }
19472 for (ai = aitop; ai; ai = ai->ai_next) {
19473 if (ai->ai_addr == NULL ||
19474 ai->ai_addrlen == 0 ||
19475 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19476 straddr, sizeof(straddr), strport, sizeof(strport),
19477 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19478 goto bad;
19479 }
19480 switch (ai->ai_family) {
19481 case AF_INET:
19482 if (strcmp(strport, "54321") != 0) {
19483 goto bad;
19484 }
19485 if (passive) {
19486 if (strcmp(straddr, "0.0.0.0") != 0) {
19487 goto bad;
19488 }
19489 } else {
19490 if (strcmp(straddr, "127.0.0.1") != 0) {
19491 goto bad;
19492 }
19493 }
19494 inet4++;
19495 break;
19496 case AF_INET6:
19497 if (strcmp(strport, "54321") != 0) {
19498 goto bad;
19499 }
19500 if (passive) {
19501 if (strcmp(straddr, "::") != 0) {
19502 goto bad;
19503 }
19504 } else {
19505 if (strcmp(straddr, "::1") != 0) {
19506 goto bad;
19507 }
19508 }
19509 inet6++;
19510 break;
19511 case AF_UNSPEC:
19512 goto bad;
19513 break;
19514 default:
19515 /* another family support? */
19516 break;
19517 }
19518 }
19519 }
19520
19521 if (!(inet4 == 0 || inet4 == 2))
19522 goto bad;
19523 if (!(inet6 == 0 || inet6 == 2))
19524 goto bad;
19525
19526 if (aitop)
19527 freeaddrinfo(aitop);
19528 exit(0);
19529
19530 bad:
19531 if (aitop)
19532 freeaddrinfo(aitop);
19533 exit(1);
19534}
19535
Martin v. Löwis11437992002-04-12 09:54:03 +000019536_ACEOF
19537rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019538if { (ac_try="$ac_link"
19539case "(($ac_try" in
19540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19541 *) ac_try_echo=$ac_try;;
19542esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019543eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19544$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019545 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019546 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000019547 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019548 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019549 { (case "(($ac_try" in
19550 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19551 *) ac_try_echo=$ac_try;;
19552esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019553eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19554$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019555 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019556 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000019557 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019558 (exit $ac_status); }; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000019559 { $as_echo "$as_me:$LINENO: result: good" >&5
19560$as_echo "good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019561buggygetaddrinfo=no
19562else
Antoine Pitrou20327222009-05-24 20:39:11 +000019563 $as_echo "$as_me: program exited with status $ac_status" >&5
19564$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019565sed 's/^/| /' conftest.$ac_ext >&5
19566
Martin v. Löwis11437992002-04-12 09:54:03 +000019567( exit $ac_status )
Antoine Pitrou20327222009-05-24 20:39:11 +000019568{ $as_echo "$as_me:$LINENO: result: buggy" >&5
19569$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019570buggygetaddrinfo=yes
19571fi
Antoine Pitrou20327222009-05-24 20:39:11 +000019572rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019573rm -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 +000019574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019575
19576
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019577else
Antoine Pitrou20327222009-05-24 20:39:11 +000019578 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019579sed 's/^/| /' conftest.$ac_ext >&5
19580
Martin v. Löwis11437992002-04-12 09:54:03 +000019581
Antoine Pitrou20327222009-05-24 20:39:11 +000019582{ $as_echo "$as_me:$LINENO: result: no" >&5
19583$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019584buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019585
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019587
Antoine Pitrou20327222009-05-24 20:39:11 +000019588rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019589rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019591
19592if test "$buggygetaddrinfo" = "yes"; then
19593 if test "$ipv6" = "yes"; then
19594 echo 'Fatal: You must get working getaddrinfo() function.'
19595 echo ' or you can specify "--disable-ipv6"'.
19596 exit 1
19597 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019598else
Martin v. Löwis11437992002-04-12 09:54:03 +000019599
19600cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019601#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019602_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019603
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019604fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019605
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019606for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019607do
Antoine Pitrou20327222009-05-24 20:39:11 +000019608as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19609{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19610$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019611if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000019612 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019613else
Martin v. Löwis11437992002-04-12 09:54:03 +000019614 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019615/* confdefs.h. */
19616_ACEOF
19617cat confdefs.h >>conftest.$ac_ext
19618cat >>conftest.$ac_ext <<_ACEOF
19619/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019620/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19621 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19622#define $ac_func innocuous_$ac_func
19623
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019624/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019625 which can conflict with char $ac_func (); below.
19626 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019627 <limits.h> exists even on freestanding compilers. */
19628
19629#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019630# include <limits.h>
19631#else
19632# include <assert.h>
19633#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019634
19635#undef $ac_func
19636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019637/* Override any GCC internal prototype to avoid an error.
19638 Use char because int might match the return type of a GCC
19639 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019640#ifdef __cplusplus
19641extern "C"
19642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019643char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019644/* The GNU C library defines this for functions which it implements
19645 to always fail with ENOSYS. Some functions are actually named
19646 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019647#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019648choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019649#endif
19650
Skip Montanaro6dead952003-09-25 14:50:04 +000019651int
19652main ()
19653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019654return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019655 ;
19656 return 0;
19657}
19658_ACEOF
19659rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019660if { (ac_try="$ac_link"
19661case "(($ac_try" in
19662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19663 *) ac_try_echo=$ac_try;;
19664esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019665eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19666$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019667 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019669 grep -v '^ *+' conftest.er1 >conftest.err
19670 rm -f conftest.er1
19671 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019672 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019673 (exit $ac_status); } && {
19674 test -z "$ac_c_werror_flag" ||
19675 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000019676 } && test -s conftest$ac_exeext && {
19677 test "$cross_compiling" = yes ||
19678 $as_test_x conftest$ac_exeext
19679 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019680 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019681else
Antoine Pitrou20327222009-05-24 20:39:11 +000019682 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019683sed 's/^/| /' conftest.$ac_ext >&5
19684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019685 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019687
Antoine Pitrou20327222009-05-24 20:39:11 +000019688rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019689rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019690 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019691fi
Antoine Pitrou20327222009-05-24 20:39:11 +000019692ac_res=`eval 'as_val=${'$as_ac_var'}
19693 $as_echo "$as_val"'`
19694 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19695$as_echo "$ac_res" >&6; }
19696as_val=`eval 'as_val=${'$as_ac_var'}
19697 $as_echo "$as_val"'`
19698 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019699 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000019700#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019701_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019702
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019703fi
19704done
19705
Michael W. Hudson54241132001-12-07 15:38:26 +000019706
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019707# checks for structures
Antoine Pitrou20327222009-05-24 20:39:11 +000019708{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19709$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019710if test "${ac_cv_header_time+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000019711 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019712else
Martin v. Löwis11437992002-04-12 09:54:03 +000019713 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019714/* confdefs.h. */
19715_ACEOF
19716cat confdefs.h >>conftest.$ac_ext
19717cat >>conftest.$ac_ext <<_ACEOF
19718/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019719#include <sys/types.h>
19720#include <sys/time.h>
19721#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019722
Martin v. Löwis11437992002-04-12 09:54:03 +000019723int
19724main ()
19725{
19726if ((struct tm *) 0)
19727return 0;
19728 ;
19729 return 0;
19730}
19731_ACEOF
19732rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019733if { (ac_try="$ac_compile"
19734case "(($ac_try" in
19735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19736 *) ac_try_echo=$ac_try;;
19737esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019738eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19739$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019742 grep -v '^ *+' conftest.er1 >conftest.err
19743 rm -f conftest.er1
19744 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019745 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019746 (exit $ac_status); } && {
19747 test -z "$ac_c_werror_flag" ||
19748 test ! -s conftest.err
19749 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019750 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019751else
Antoine Pitrou20327222009-05-24 20:39:11 +000019752 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019753sed 's/^/| /' conftest.$ac_ext >&5
19754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019755 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019756fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019757
19758rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019759fi
Antoine Pitrou20327222009-05-24 20:39:11 +000019760{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19761$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019762if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019763
19764cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019765#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019766_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019767
19768fi
19769
Antoine Pitrou20327222009-05-24 20:39:11 +000019770{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19771$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019772if test "${ac_cv_struct_tm+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000019773 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019774else
Martin v. Löwis11437992002-04-12 09:54:03 +000019775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019776/* confdefs.h. */
19777_ACEOF
19778cat confdefs.h >>conftest.$ac_ext
19779cat >>conftest.$ac_ext <<_ACEOF
19780/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019781#include <sys/types.h>
19782#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019783
Martin v. Löwis11437992002-04-12 09:54:03 +000019784int
19785main ()
19786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019787struct tm tm;
19788 int *p = &tm.tm_sec;
Antoine Pitrou20327222009-05-24 20:39:11 +000019789 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019790 ;
19791 return 0;
19792}
19793_ACEOF
19794rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019795if { (ac_try="$ac_compile"
19796case "(($ac_try" in
19797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19798 *) ac_try_echo=$ac_try;;
19799esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019800eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19801$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019804 grep -v '^ *+' conftest.er1 >conftest.err
19805 rm -f conftest.er1
19806 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019807 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019808 (exit $ac_status); } && {
19809 test -z "$ac_c_werror_flag" ||
19810 test ! -s conftest.err
19811 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019812 ac_cv_struct_tm=time.h
19813else
Antoine Pitrou20327222009-05-24 20:39:11 +000019814 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019815sed 's/^/| /' conftest.$ac_ext >&5
19816
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019817 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019818fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019819
19820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019821fi
Antoine Pitrou20327222009-05-24 20:39:11 +000019822{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19823$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019824if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019825
19826cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019827#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019828_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019829
19830fi
19831
Antoine Pitrou20327222009-05-24 20:39:11 +000019832{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19833$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019834if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000019835 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019836else
Martin v. Löwis11437992002-04-12 09:54:03 +000019837 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019838/* confdefs.h. */
19839_ACEOF
19840cat confdefs.h >>conftest.$ac_ext
19841cat >>conftest.$ac_ext <<_ACEOF
19842/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019843#include <sys/types.h>
19844#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019845
19846
Martin v. Löwis11437992002-04-12 09:54:03 +000019847int
19848main ()
19849{
19850static struct tm ac_aggr;
19851if (ac_aggr.tm_zone)
19852return 0;
19853 ;
19854 return 0;
19855}
19856_ACEOF
19857rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019858if { (ac_try="$ac_compile"
19859case "(($ac_try" in
19860 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19861 *) ac_try_echo=$ac_try;;
19862esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019863eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19864$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019865 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019866 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019867 grep -v '^ *+' conftest.er1 >conftest.err
19868 rm -f conftest.er1
19869 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019870 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019871 (exit $ac_status); } && {
19872 test -z "$ac_c_werror_flag" ||
19873 test ! -s conftest.err
19874 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019875 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019876else
Antoine Pitrou20327222009-05-24 20:39:11 +000019877 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019878sed 's/^/| /' conftest.$ac_ext >&5
19879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019881/* confdefs.h. */
19882_ACEOF
19883cat confdefs.h >>conftest.$ac_ext
19884cat >>conftest.$ac_ext <<_ACEOF
19885/* end confdefs.h. */
19886#include <sys/types.h>
19887#include <$ac_cv_struct_tm>
19888
19889
19890int
19891main ()
19892{
19893static struct tm ac_aggr;
19894if (sizeof ac_aggr.tm_zone)
19895return 0;
19896 ;
19897 return 0;
19898}
19899_ACEOF
19900rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019901if { (ac_try="$ac_compile"
19902case "(($ac_try" in
19903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19904 *) ac_try_echo=$ac_try;;
19905esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019906eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19907$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019908 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019910 grep -v '^ *+' conftest.er1 >conftest.err
19911 rm -f conftest.er1
19912 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019913 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019914 (exit $ac_status); } && {
19915 test -z "$ac_c_werror_flag" ||
19916 test ! -s conftest.err
19917 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019918 ac_cv_member_struct_tm_tm_zone=yes
19919else
Antoine Pitrou20327222009-05-24 20:39:11 +000019920 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019921sed 's/^/| /' conftest.$ac_ext >&5
19922
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019923 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019925
19926rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019927fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019928
19929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019930fi
Antoine Pitrou20327222009-05-24 20:39:11 +000019931{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19932$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
19933if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019934
19935cat >>confdefs.h <<_ACEOF
19936#define HAVE_STRUCT_TM_TM_ZONE 1
19937_ACEOF
19938
19939
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019940fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019941
Martin v. Löwis11437992002-04-12 09:54:03 +000019942if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19943
19944cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019945#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019946_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019947
19948else
Antoine Pitrou20327222009-05-24 20:39:11 +000019949 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19950$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019951if test "${ac_cv_have_decl_tzname+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000019952 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019953else
19954 cat >conftest.$ac_ext <<_ACEOF
19955/* confdefs.h. */
19956_ACEOF
19957cat confdefs.h >>conftest.$ac_ext
19958cat >>conftest.$ac_ext <<_ACEOF
19959/* end confdefs.h. */
19960#include <time.h>
19961
19962int
19963main ()
19964{
19965#ifndef tzname
19966 (void) tzname;
19967#endif
19968
19969 ;
19970 return 0;
19971}
19972_ACEOF
19973rm -f conftest.$ac_objext
19974if { (ac_try="$ac_compile"
19975case "(($ac_try" in
19976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19977 *) ac_try_echo=$ac_try;;
19978esac
Antoine Pitrou20327222009-05-24 20:39:11 +000019979eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19980$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019981 (eval "$ac_compile") 2>conftest.er1
19982 ac_status=$?
19983 grep -v '^ *+' conftest.er1 >conftest.err
19984 rm -f conftest.er1
19985 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000019986 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019987 (exit $ac_status); } && {
19988 test -z "$ac_c_werror_flag" ||
19989 test ! -s conftest.err
19990 } && test -s conftest.$ac_objext; then
19991 ac_cv_have_decl_tzname=yes
19992else
Antoine Pitrou20327222009-05-24 20:39:11 +000019993 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019994sed 's/^/| /' conftest.$ac_ext >&5
19995
19996 ac_cv_have_decl_tzname=no
19997fi
19998
19999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20000fi
Antoine Pitrou20327222009-05-24 20:39:11 +000020001{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20002$as_echo "$ac_cv_have_decl_tzname" >&6; }
20003if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020004
20005cat >>confdefs.h <<_ACEOF
20006#define HAVE_DECL_TZNAME 1
20007_ACEOF
20008
20009
20010else
20011 cat >>confdefs.h <<_ACEOF
20012#define HAVE_DECL_TZNAME 0
20013_ACEOF
20014
20015
20016fi
20017
20018
Antoine Pitrou20327222009-05-24 20:39:11 +000020019 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
20020$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020021if test "${ac_cv_var_tzname+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000020022 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020023else
Martin v. Löwis11437992002-04-12 09:54:03 +000020024 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020025/* confdefs.h. */
20026_ACEOF
20027cat confdefs.h >>conftest.$ac_ext
20028cat >>conftest.$ac_ext <<_ACEOF
20029/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020030#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020031#if !HAVE_DECL_TZNAME
20032extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020033#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020034
Martin v. Löwis11437992002-04-12 09:54:03 +000020035int
20036main ()
20037{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020038return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020039 ;
20040 return 0;
20041}
20042_ACEOF
20043rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020044if { (ac_try="$ac_link"
20045case "(($ac_try" in
20046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20047 *) ac_try_echo=$ac_try;;
20048esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020049eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20050$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020051 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020052 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020053 grep -v '^ *+' conftest.er1 >conftest.err
20054 rm -f conftest.er1
20055 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020056 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020057 (exit $ac_status); } && {
20058 test -z "$ac_c_werror_flag" ||
20059 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000020060 } && test -s conftest$ac_exeext && {
20061 test "$cross_compiling" = yes ||
20062 $as_test_x conftest$ac_exeext
20063 }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020064 ac_cv_var_tzname=yes
20065else
Antoine Pitrou20327222009-05-24 20:39:11 +000020066 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020067sed 's/^/| /' conftest.$ac_ext >&5
20068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020069 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020071
Antoine Pitrou20327222009-05-24 20:39:11 +000020072rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020073rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020074 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020075fi
Antoine Pitrou20327222009-05-24 20:39:11 +000020076{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20077$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020078 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020079
20080cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020081#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020082_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020083
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020084 fi
20085fi
20086
Antoine Pitrou20327222009-05-24 20:39:11 +000020087{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20088$as_echo_n "checking for struct stat.st_rdev... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020089if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000020090 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020091else
20092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020093/* confdefs.h. */
20094_ACEOF
20095cat confdefs.h >>conftest.$ac_ext
20096cat >>conftest.$ac_ext <<_ACEOF
20097/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020098$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020099int
20100main ()
20101{
20102static struct stat ac_aggr;
20103if (ac_aggr.st_rdev)
20104return 0;
20105 ;
20106 return 0;
20107}
20108_ACEOF
20109rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020110if { (ac_try="$ac_compile"
20111case "(($ac_try" in
20112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20113 *) ac_try_echo=$ac_try;;
20114esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020115eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20116$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020117 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020118 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020119 grep -v '^ *+' conftest.er1 >conftest.err
20120 rm -f conftest.er1
20121 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020122 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020123 (exit $ac_status); } && {
20124 test -z "$ac_c_werror_flag" ||
20125 test ! -s conftest.err
20126 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020127 ac_cv_member_struct_stat_st_rdev=yes
20128else
Antoine Pitrou20327222009-05-24 20:39:11 +000020129 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020130sed 's/^/| /' conftest.$ac_ext >&5
20131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020133/* confdefs.h. */
20134_ACEOF
20135cat confdefs.h >>conftest.$ac_ext
20136cat >>conftest.$ac_ext <<_ACEOF
20137/* end confdefs.h. */
20138$ac_includes_default
20139int
20140main ()
20141{
20142static struct stat ac_aggr;
20143if (sizeof ac_aggr.st_rdev)
20144return 0;
20145 ;
20146 return 0;
20147}
20148_ACEOF
20149rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020150if { (ac_try="$ac_compile"
20151case "(($ac_try" in
20152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20153 *) ac_try_echo=$ac_try;;
20154esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020155eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20156$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020157 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020158 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020159 grep -v '^ *+' conftest.er1 >conftest.err
20160 rm -f conftest.er1
20161 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020162 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020163 (exit $ac_status); } && {
20164 test -z "$ac_c_werror_flag" ||
20165 test ! -s conftest.err
20166 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020167 ac_cv_member_struct_stat_st_rdev=yes
20168else
Antoine Pitrou20327222009-05-24 20:39:11 +000020169 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020170sed 's/^/| /' conftest.$ac_ext >&5
20171
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020172 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020173fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020174
20175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020176fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020177
20178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020179fi
Antoine Pitrou20327222009-05-24 20:39:11 +000020180{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20181$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; }
20182if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020183
20184cat >>confdefs.h <<_ACEOF
20185#define HAVE_STRUCT_STAT_ST_RDEV 1
20186_ACEOF
20187
20188
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020189fi
20190
Antoine Pitrou20327222009-05-24 20:39:11 +000020191{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20192$as_echo_n "checking for struct stat.st_blksize... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020193if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000020194 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020195else
Martin v. Löwis11437992002-04-12 09:54:03 +000020196 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020197/* confdefs.h. */
20198_ACEOF
20199cat confdefs.h >>conftest.$ac_ext
20200cat >>conftest.$ac_ext <<_ACEOF
20201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020202$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020203int
20204main ()
20205{
20206static struct stat ac_aggr;
20207if (ac_aggr.st_blksize)
20208return 0;
20209 ;
20210 return 0;
20211}
20212_ACEOF
20213rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020214if { (ac_try="$ac_compile"
20215case "(($ac_try" in
20216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20217 *) ac_try_echo=$ac_try;;
20218esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020219eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20220$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020221 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020223 grep -v '^ *+' conftest.er1 >conftest.err
20224 rm -f conftest.er1
20225 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020226 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020227 (exit $ac_status); } && {
20228 test -z "$ac_c_werror_flag" ||
20229 test ! -s conftest.err
20230 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020231 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020232else
Antoine Pitrou20327222009-05-24 20:39:11 +000020233 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020234sed 's/^/| /' conftest.$ac_ext >&5
20235
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020237/* confdefs.h. */
20238_ACEOF
20239cat confdefs.h >>conftest.$ac_ext
20240cat >>conftest.$ac_ext <<_ACEOF
20241/* end confdefs.h. */
20242$ac_includes_default
20243int
20244main ()
20245{
20246static struct stat ac_aggr;
20247if (sizeof ac_aggr.st_blksize)
20248return 0;
20249 ;
20250 return 0;
20251}
20252_ACEOF
20253rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020254if { (ac_try="$ac_compile"
20255case "(($ac_try" in
20256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20257 *) ac_try_echo=$ac_try;;
20258esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020259eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20260$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020261 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020263 grep -v '^ *+' conftest.er1 >conftest.err
20264 rm -f conftest.er1
20265 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020266 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020267 (exit $ac_status); } && {
20268 test -z "$ac_c_werror_flag" ||
20269 test ! -s conftest.err
20270 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020271 ac_cv_member_struct_stat_st_blksize=yes
20272else
Antoine Pitrou20327222009-05-24 20:39:11 +000020273 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020274sed 's/^/| /' conftest.$ac_ext >&5
20275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020276 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020278
20279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020280fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020281
20282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020283fi
Antoine Pitrou20327222009-05-24 20:39:11 +000020284{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20285$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; }
20286if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020287
Martin v. Löwis11437992002-04-12 09:54:03 +000020288cat >>confdefs.h <<_ACEOF
20289#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20290_ACEOF
20291
20292
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020293fi
20294
Antoine Pitrou20327222009-05-24 20:39:11 +000020295{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20296$as_echo_n "checking for struct stat.st_flags... " >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020297if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000020298 $as_echo_n "(cached) " >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020299else
20300 cat >conftest.$ac_ext <<_ACEOF
20301/* confdefs.h. */
20302_ACEOF
20303cat confdefs.h >>conftest.$ac_ext
20304cat >>conftest.$ac_ext <<_ACEOF
20305/* end confdefs.h. */
20306$ac_includes_default
20307int
20308main ()
20309{
20310static struct stat ac_aggr;
20311if (ac_aggr.st_flags)
20312return 0;
20313 ;
20314 return 0;
20315}
20316_ACEOF
20317rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020318if { (ac_try="$ac_compile"
20319case "(($ac_try" in
20320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20321 *) ac_try_echo=$ac_try;;
20322esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020323eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20324$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020325 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020326 ac_status=$?
20327 grep -v '^ *+' conftest.er1 >conftest.err
20328 rm -f conftest.er1
20329 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020330 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020331 (exit $ac_status); } && {
20332 test -z "$ac_c_werror_flag" ||
20333 test ! -s conftest.err
20334 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020335 ac_cv_member_struct_stat_st_flags=yes
20336else
Antoine Pitrou20327222009-05-24 20:39:11 +000020337 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020338sed 's/^/| /' conftest.$ac_ext >&5
20339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020340 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020341/* confdefs.h. */
20342_ACEOF
20343cat confdefs.h >>conftest.$ac_ext
20344cat >>conftest.$ac_ext <<_ACEOF
20345/* end confdefs.h. */
20346$ac_includes_default
20347int
20348main ()
20349{
20350static struct stat ac_aggr;
20351if (sizeof ac_aggr.st_flags)
20352return 0;
20353 ;
20354 return 0;
20355}
20356_ACEOF
20357rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020358if { (ac_try="$ac_compile"
20359case "(($ac_try" in
20360 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20361 *) ac_try_echo=$ac_try;;
20362esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020363eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20364$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020365 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020366 ac_status=$?
20367 grep -v '^ *+' conftest.er1 >conftest.err
20368 rm -f conftest.er1
20369 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020370 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020371 (exit $ac_status); } && {
20372 test -z "$ac_c_werror_flag" ||
20373 test ! -s conftest.err
20374 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020375 ac_cv_member_struct_stat_st_flags=yes
20376else
Antoine Pitrou20327222009-05-24 20:39:11 +000020377 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020378sed 's/^/| /' conftest.$ac_ext >&5
20379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020380 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020381fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020382
20383rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020385
20386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020387fi
Antoine Pitrou20327222009-05-24 20:39:11 +000020388{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20389$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; }
20390if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020391
20392cat >>confdefs.h <<_ACEOF
20393#define HAVE_STRUCT_STAT_ST_FLAGS 1
20394_ACEOF
20395
20396
20397fi
20398
Antoine Pitrou20327222009-05-24 20:39:11 +000020399{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20400$as_echo_n "checking for struct stat.st_gen... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020401if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000020402 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020403else
20404 cat >conftest.$ac_ext <<_ACEOF
20405/* confdefs.h. */
20406_ACEOF
20407cat confdefs.h >>conftest.$ac_ext
20408cat >>conftest.$ac_ext <<_ACEOF
20409/* end confdefs.h. */
20410$ac_includes_default
20411int
20412main ()
20413{
20414static struct stat ac_aggr;
20415if (ac_aggr.st_gen)
20416return 0;
20417 ;
20418 return 0;
20419}
20420_ACEOF
20421rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020422if { (ac_try="$ac_compile"
20423case "(($ac_try" in
20424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20425 *) ac_try_echo=$ac_try;;
20426esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020427eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20428$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020430 ac_status=$?
20431 grep -v '^ *+' conftest.er1 >conftest.err
20432 rm -f conftest.er1
20433 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020434 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020435 (exit $ac_status); } && {
20436 test -z "$ac_c_werror_flag" ||
20437 test ! -s conftest.err
20438 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020439 ac_cv_member_struct_stat_st_gen=yes
20440else
Antoine Pitrou20327222009-05-24 20:39:11 +000020441 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020442sed 's/^/| /' conftest.$ac_ext >&5
20443
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020444 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020445/* confdefs.h. */
20446_ACEOF
20447cat confdefs.h >>conftest.$ac_ext
20448cat >>conftest.$ac_ext <<_ACEOF
20449/* end confdefs.h. */
20450$ac_includes_default
20451int
20452main ()
20453{
20454static struct stat ac_aggr;
20455if (sizeof ac_aggr.st_gen)
20456return 0;
20457 ;
20458 return 0;
20459}
20460_ACEOF
20461rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020462if { (ac_try="$ac_compile"
20463case "(($ac_try" in
20464 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20465 *) ac_try_echo=$ac_try;;
20466esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020467eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20468$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020469 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020470 ac_status=$?
20471 grep -v '^ *+' conftest.er1 >conftest.err
20472 rm -f conftest.er1
20473 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020474 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020475 (exit $ac_status); } && {
20476 test -z "$ac_c_werror_flag" ||
20477 test ! -s conftest.err
20478 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020479 ac_cv_member_struct_stat_st_gen=yes
20480else
Antoine Pitrou20327222009-05-24 20:39:11 +000020481 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020482sed 's/^/| /' conftest.$ac_ext >&5
20483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020484 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020486
20487rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020488fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020489
20490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020491fi
Antoine Pitrou20327222009-05-24 20:39:11 +000020492{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20493$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; }
20494if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020495
20496cat >>confdefs.h <<_ACEOF
20497#define HAVE_STRUCT_STAT_ST_GEN 1
20498_ACEOF
20499
20500
20501fi
20502
Antoine Pitrou20327222009-05-24 20:39:11 +000020503{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20504$as_echo_n "checking for struct stat.st_birthtime... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020505if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000020506 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020507else
20508 cat >conftest.$ac_ext <<_ACEOF
20509/* confdefs.h. */
20510_ACEOF
20511cat confdefs.h >>conftest.$ac_ext
20512cat >>conftest.$ac_ext <<_ACEOF
20513/* end confdefs.h. */
20514$ac_includes_default
20515int
20516main ()
20517{
20518static struct stat ac_aggr;
20519if (ac_aggr.st_birthtime)
20520return 0;
20521 ;
20522 return 0;
20523}
20524_ACEOF
20525rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020526if { (ac_try="$ac_compile"
20527case "(($ac_try" in
20528 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20529 *) ac_try_echo=$ac_try;;
20530esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020531eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20532$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020533 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020534 ac_status=$?
20535 grep -v '^ *+' conftest.er1 >conftest.err
20536 rm -f conftest.er1
20537 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020538 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020539 (exit $ac_status); } && {
20540 test -z "$ac_c_werror_flag" ||
20541 test ! -s conftest.err
20542 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020543 ac_cv_member_struct_stat_st_birthtime=yes
20544else
Antoine Pitrou20327222009-05-24 20:39:11 +000020545 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020546sed 's/^/| /' conftest.$ac_ext >&5
20547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020548 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020549/* confdefs.h. */
20550_ACEOF
20551cat confdefs.h >>conftest.$ac_ext
20552cat >>conftest.$ac_ext <<_ACEOF
20553/* end confdefs.h. */
20554$ac_includes_default
20555int
20556main ()
20557{
20558static struct stat ac_aggr;
20559if (sizeof ac_aggr.st_birthtime)
20560return 0;
20561 ;
20562 return 0;
20563}
20564_ACEOF
20565rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020566if { (ac_try="$ac_compile"
20567case "(($ac_try" in
20568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20569 *) ac_try_echo=$ac_try;;
20570esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020571eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20572$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020573 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020574 ac_status=$?
20575 grep -v '^ *+' conftest.er1 >conftest.err
20576 rm -f conftest.er1
20577 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020578 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020579 (exit $ac_status); } && {
20580 test -z "$ac_c_werror_flag" ||
20581 test ! -s conftest.err
20582 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020583 ac_cv_member_struct_stat_st_birthtime=yes
20584else
Antoine Pitrou20327222009-05-24 20:39:11 +000020585 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020586sed 's/^/| /' conftest.$ac_ext >&5
20587
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020588 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020589fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020590
20591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020593
20594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020595fi
Antoine Pitrou20327222009-05-24 20:39:11 +000020596{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20597$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; }
20598if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020599
20600cat >>confdefs.h <<_ACEOF
20601#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20602_ACEOF
20603
20604
20605fi
20606
Antoine Pitrou20327222009-05-24 20:39:11 +000020607{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20608$as_echo_n "checking for struct stat.st_blocks... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020609if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000020610 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020611else
Martin v. Löwis11437992002-04-12 09:54:03 +000020612 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020613/* confdefs.h. */
20614_ACEOF
20615cat confdefs.h >>conftest.$ac_ext
20616cat >>conftest.$ac_ext <<_ACEOF
20617/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020618$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020619int
20620main ()
20621{
20622static struct stat ac_aggr;
20623if (ac_aggr.st_blocks)
20624return 0;
20625 ;
20626 return 0;
20627}
20628_ACEOF
20629rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020630if { (ac_try="$ac_compile"
20631case "(($ac_try" in
20632 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20633 *) ac_try_echo=$ac_try;;
20634esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020635eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20636$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020637 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020638 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020639 grep -v '^ *+' conftest.er1 >conftest.err
20640 rm -f conftest.er1
20641 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020642 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020643 (exit $ac_status); } && {
20644 test -z "$ac_c_werror_flag" ||
20645 test ! -s conftest.err
20646 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020647 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020648else
Antoine Pitrou20327222009-05-24 20:39:11 +000020649 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020650sed 's/^/| /' conftest.$ac_ext >&5
20651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020653/* confdefs.h. */
20654_ACEOF
20655cat confdefs.h >>conftest.$ac_ext
20656cat >>conftest.$ac_ext <<_ACEOF
20657/* end confdefs.h. */
20658$ac_includes_default
20659int
20660main ()
20661{
20662static struct stat ac_aggr;
20663if (sizeof ac_aggr.st_blocks)
20664return 0;
20665 ;
20666 return 0;
20667}
20668_ACEOF
20669rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020670if { (ac_try="$ac_compile"
20671case "(($ac_try" in
20672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20673 *) ac_try_echo=$ac_try;;
20674esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020675eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20676$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020677 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020679 grep -v '^ *+' conftest.er1 >conftest.err
20680 rm -f conftest.er1
20681 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020682 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020683 (exit $ac_status); } && {
20684 test -z "$ac_c_werror_flag" ||
20685 test ! -s conftest.err
20686 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020687 ac_cv_member_struct_stat_st_blocks=yes
20688else
Antoine Pitrou20327222009-05-24 20:39:11 +000020689 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020690sed 's/^/| /' conftest.$ac_ext >&5
20691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020692 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020694
20695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020696fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020697
20698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020699fi
Antoine Pitrou20327222009-05-24 20:39:11 +000020700{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20701$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; }
20702if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020703
Martin v. Löwis11437992002-04-12 09:54:03 +000020704cat >>confdefs.h <<_ACEOF
20705#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20706_ACEOF
20707
20708
20709cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020710#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020711_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020712
20713else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020714 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020715 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020716 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20717 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020718esac
20719
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020720fi
20721
Michael W. Hudson54241132001-12-07 15:38:26 +000020722
Martin v. Löwis11437992002-04-12 09:54:03 +000020723
Antoine Pitrou20327222009-05-24 20:39:11 +000020724{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20725$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020726if test "${ac_cv_header_time_altzone+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000020727 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020728else
Martin v. Löwis11437992002-04-12 09:54:03 +000020729 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020730/* confdefs.h. */
20731_ACEOF
20732cat confdefs.h >>conftest.$ac_ext
20733cat >>conftest.$ac_ext <<_ACEOF
20734/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020735#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020736int
20737main ()
20738{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020739return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020740 ;
20741 return 0;
20742}
20743_ACEOF
20744rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020745if { (ac_try="$ac_compile"
20746case "(($ac_try" in
20747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20748 *) ac_try_echo=$ac_try;;
20749esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020750eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20751$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020752 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020753 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020754 grep -v '^ *+' conftest.er1 >conftest.err
20755 rm -f conftest.er1
20756 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020757 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020758 (exit $ac_status); } && {
20759 test -z "$ac_c_werror_flag" ||
20760 test ! -s conftest.err
20761 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020762 ac_cv_header_time_altzone=yes
20763else
Antoine Pitrou20327222009-05-24 20:39:11 +000020764 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020765sed 's/^/| /' conftest.$ac_ext >&5
20766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020767 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020768fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20771fi
20772
Antoine Pitrou20327222009-05-24 20:39:11 +000020773{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20774$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020775if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020776
20777cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020778#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020779_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020780
20781fi
20782
Guido van Rossumda88dad1995-01-26 00:46:29 +000020783was_it_defined=no
Antoine Pitrou20327222009-05-24 20:39:11 +000020784{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20785$as_echo_n "checking whether sys/select.h and sys/time.h may both be included... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020786cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020787/* confdefs.h. */
20788_ACEOF
20789cat confdefs.h >>conftest.$ac_ext
20790cat >>conftest.$ac_ext <<_ACEOF
20791/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020792
20793#include <sys/types.h>
20794#include <sys/select.h>
20795#include <sys/time.h>
20796
Martin v. Löwis11437992002-04-12 09:54:03 +000020797int
20798main ()
20799{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020800;
Martin v. Löwis11437992002-04-12 09:54:03 +000020801 ;
20802 return 0;
20803}
20804_ACEOF
20805rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020806if { (ac_try="$ac_compile"
20807case "(($ac_try" in
20808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20809 *) ac_try_echo=$ac_try;;
20810esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020811eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20812$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020813 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020815 grep -v '^ *+' conftest.er1 >conftest.err
20816 rm -f conftest.er1
20817 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020818 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020819 (exit $ac_status); } && {
20820 test -z "$ac_c_werror_flag" ||
20821 test ! -s conftest.err
20822 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020823
20824
20825cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020826#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020827_ACEOF
20828
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020829 was_it_defined=yes
20830
Guido van Rossumf78abae1997-01-21 22:02:36 +000020831else
Antoine Pitrou20327222009-05-24 20:39:11 +000020832 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020833sed 's/^/| /' conftest.$ac_ext >&5
20834
Thomas Wouters477c8d52006-05-27 19:21:47 +000020835
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020836fi
20837
20838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000020839{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
20840$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020841
Antoine Pitrou20327222009-05-24 20:39:11 +000020842{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5
20843$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020844if test "${ac_cv_struct_addrinfo+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000020845 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020846else
Martin v. Löwis11437992002-04-12 09:54:03 +000020847 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020848/* confdefs.h. */
20849_ACEOF
20850cat confdefs.h >>conftest.$ac_ext
20851cat >>conftest.$ac_ext <<_ACEOF
20852/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020853
20854# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020855int
20856main ()
20857{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020858struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020859 ;
20860 return 0;
20861}
20862_ACEOF
20863rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020864if { (ac_try="$ac_compile"
20865case "(($ac_try" in
20866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20867 *) ac_try_echo=$ac_try;;
20868esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020869eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20870$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020871 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020872 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020873 grep -v '^ *+' conftest.er1 >conftest.err
20874 rm -f conftest.er1
20875 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020876 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020877 (exit $ac_status); } && {
20878 test -z "$ac_c_werror_flag" ||
20879 test ! -s conftest.err
20880 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020881 ac_cv_struct_addrinfo=yes
20882else
Antoine Pitrou20327222009-05-24 20:39:11 +000020883 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020884sed 's/^/| /' conftest.$ac_ext >&5
20885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020886 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020887fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20890fi
20891
Antoine Pitrou20327222009-05-24 20:39:11 +000020892{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20893$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020894if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020895
20896cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020897#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020898_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020899
20900fi
20901
Antoine Pitrou20327222009-05-24 20:39:11 +000020902{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20903$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020904if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000020905 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020906else
Martin v. Löwis11437992002-04-12 09:54:03 +000020907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020908/* confdefs.h. */
20909_ACEOF
20910cat confdefs.h >>conftest.$ac_ext
20911cat >>conftest.$ac_ext <<_ACEOF
20912/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020913
20914# include <sys/types.h>
20915# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020916int
20917main ()
20918{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020919struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020920 ;
20921 return 0;
20922}
20923_ACEOF
20924rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020925if { (ac_try="$ac_compile"
20926case "(($ac_try" in
20927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20928 *) ac_try_echo=$ac_try;;
20929esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020930eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20931$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020932 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020934 grep -v '^ *+' conftest.er1 >conftest.err
20935 rm -f conftest.er1
20936 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000020937 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020938 (exit $ac_status); } && {
20939 test -z "$ac_c_werror_flag" ||
20940 test ! -s conftest.err
20941 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020942 ac_cv_struct_sockaddr_storage=yes
20943else
Antoine Pitrou20327222009-05-24 20:39:11 +000020944 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020945sed 's/^/| /' conftest.$ac_ext >&5
20946
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020947 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020948fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020949
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20951fi
20952
Antoine Pitrou20327222009-05-24 20:39:11 +000020953{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20954$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020955if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020956
20957cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020958#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020959_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020960
20961fi
20962
Guido van Rossum627b2d71993-12-24 10:39:16 +000020963# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020964
Michael W. Hudson54241132001-12-07 15:38:26 +000020965
Antoine Pitrou20327222009-05-24 20:39:11 +000020966{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20967$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020968if test "${ac_cv_c_char_unsigned+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000020969 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020970else
Martin v. Löwis11437992002-04-12 09:54:03 +000020971 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020972/* confdefs.h. */
20973_ACEOF
20974cat confdefs.h >>conftest.$ac_ext
20975cat >>conftest.$ac_ext <<_ACEOF
20976/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020977$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020978int
20979main ()
20980{
20981static int test_array [1 - 2 * !(((char) -1) < 0)];
20982test_array [0] = 0
20983
20984 ;
20985 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020986}
Martin v. Löwis11437992002-04-12 09:54:03 +000020987_ACEOF
20988rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020989if { (ac_try="$ac_compile"
20990case "(($ac_try" in
20991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20992 *) ac_try_echo=$ac_try;;
20993esac
Antoine Pitrou20327222009-05-24 20:39:11 +000020994eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20995$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020996 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020997 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020998 grep -v '^ *+' conftest.er1 >conftest.err
20999 rm -f conftest.er1
21000 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021001 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021002 (exit $ac_status); } && {
21003 test -z "$ac_c_werror_flag" ||
21004 test ! -s conftest.err
21005 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021006 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021007else
Antoine Pitrou20327222009-05-24 20:39:11 +000021008 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021009sed 's/^/| /' conftest.$ac_ext >&5
21010
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021011 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021013
21014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021015fi
Antoine Pitrou20327222009-05-24 20:39:11 +000021016{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21017$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021018if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021019 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021020#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021021_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021022
21023fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021024
Antoine Pitrou20327222009-05-24 20:39:11 +000021025{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21026$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021027if test "${ac_cv_c_const+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000021028 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021029else
21030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021031/* confdefs.h. */
21032_ACEOF
21033cat confdefs.h >>conftest.$ac_ext
21034cat >>conftest.$ac_ext <<_ACEOF
21035/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021036
Martin v. Löwis11437992002-04-12 09:54:03 +000021037int
21038main ()
21039{
21040/* FIXME: Include the comments suggested by Paul. */
21041#ifndef __cplusplus
21042 /* Ultrix mips cc rejects this. */
21043 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021044 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021045 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021046 char const *const *pcpcc;
21047 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021048 /* NEC SVR4.0.2 mips cc rejects this. */
21049 struct point {int x, y;};
21050 static struct point const zero = {0,0};
21051 /* AIX XL C 1.02.0.0 rejects this.
21052 It does not let you subtract one const X* pointer from another in
21053 an arm of an if-expression whose if-part is not a constant
21054 expression */
21055 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021056 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021057 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021058 ++pcpcc;
21059 ppc = (char**) pcpcc;
21060 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021061 { /* SCO 3.2v4 cc rejects this. */
21062 char *t;
21063 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021064
Martin v. Löwis11437992002-04-12 09:54:03 +000021065 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021066 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021067 }
21068 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21069 int x[] = {25, 17};
21070 const int *foo = &x[0];
21071 ++foo;
21072 }
21073 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21074 typedef const int *iptr;
21075 iptr p = 0;
21076 ++p;
21077 }
21078 { /* AIX XL C 1.02.0.0 rejects this saying
21079 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21080 struct s { int j; const int *ap[3]; };
21081 struct s *b; b->j = 5;
21082 }
21083 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21084 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021085 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021086 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021087 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021088#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021089
Martin v. Löwis11437992002-04-12 09:54:03 +000021090 ;
21091 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021092}
Martin v. Löwis11437992002-04-12 09:54:03 +000021093_ACEOF
21094rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021095if { (ac_try="$ac_compile"
21096case "(($ac_try" in
21097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21098 *) ac_try_echo=$ac_try;;
21099esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021100eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21101$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021102 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021104 grep -v '^ *+' conftest.er1 >conftest.err
21105 rm -f conftest.er1
21106 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021107 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021108 (exit $ac_status); } && {
21109 test -z "$ac_c_werror_flag" ||
21110 test ! -s conftest.err
21111 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021112 ac_cv_c_const=yes
21113else
Antoine Pitrou20327222009-05-24 20:39:11 +000021114 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021115sed 's/^/| /' conftest.$ac_ext >&5
21116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021117 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021119
21120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021121fi
Antoine Pitrou20327222009-05-24 20:39:11 +000021122{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21123$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021124if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021125
21126cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000021127#define const /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021128_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021129
21130fi
21131
Michael W. Hudson54241132001-12-07 15:38:26 +000021132
Guido van Rossumda88dad1995-01-26 00:46:29 +000021133works=no
Antoine Pitrou20327222009-05-24 20:39:11 +000021134{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
21135$as_echo_n "checking for working volatile... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021137/* confdefs.h. */
21138_ACEOF
21139cat confdefs.h >>conftest.$ac_ext
21140cat >>conftest.$ac_ext <<_ACEOF
21141/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021142
Martin v. Löwis11437992002-04-12 09:54:03 +000021143int
21144main ()
21145{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021146volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021147 ;
21148 return 0;
21149}
21150_ACEOF
21151rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021152if { (ac_try="$ac_compile"
21153case "(($ac_try" in
21154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21155 *) ac_try_echo=$ac_try;;
21156esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021157eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21158$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021159 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021160 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021161 grep -v '^ *+' conftest.er1 >conftest.err
21162 rm -f conftest.er1
21163 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021164 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021165 (exit $ac_status); } && {
21166 test -z "$ac_c_werror_flag" ||
21167 test ! -s conftest.err
21168 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021169 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021170else
Antoine Pitrou20327222009-05-24 20:39:11 +000021171 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021172sed 's/^/| /' conftest.$ac_ext >&5
21173
Martin v. Löwis11437992002-04-12 09:54:03 +000021174
21175cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000021176#define volatile /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021177_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021178
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021179
Guido van Rossum627b2d71993-12-24 10:39:16 +000021180fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021181
21182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000021183{ $as_echo "$as_me:$LINENO: result: $works" >&5
21184$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021185
Guido van Rossumda88dad1995-01-26 00:46:29 +000021186works=no
Antoine Pitrou20327222009-05-24 20:39:11 +000021187{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5
21188$as_echo_n "checking for working signed char... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021189cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021190/* confdefs.h. */
21191_ACEOF
21192cat confdefs.h >>conftest.$ac_ext
21193cat >>conftest.$ac_ext <<_ACEOF
21194/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021195
Martin v. Löwis11437992002-04-12 09:54:03 +000021196int
21197main ()
21198{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021199signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021200 ;
21201 return 0;
21202}
21203_ACEOF
21204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021205if { (ac_try="$ac_compile"
21206case "(($ac_try" in
21207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21208 *) ac_try_echo=$ac_try;;
21209esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021210eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21211$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021212 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021214 grep -v '^ *+' conftest.er1 >conftest.err
21215 rm -f conftest.er1
21216 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021217 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021218 (exit $ac_status); } && {
21219 test -z "$ac_c_werror_flag" ||
21220 test ! -s conftest.err
21221 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021222 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021223else
Antoine Pitrou20327222009-05-24 20:39:11 +000021224 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021225sed 's/^/| /' conftest.$ac_ext >&5
21226
Martin v. Löwis11437992002-04-12 09:54:03 +000021227
21228cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000021229#define signed /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021230_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021231
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021232
Guido van Rossum7f43da71994-08-01 12:15:30 +000021233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021234
21235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000021236{ $as_echo "$as_me:$LINENO: result: $works" >&5
21237$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021238
Guido van Rossumda88dad1995-01-26 00:46:29 +000021239have_prototypes=no
Antoine Pitrou20327222009-05-24 20:39:11 +000021240{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5
21241$as_echo_n "checking for prototypes... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021242cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021243/* confdefs.h. */
21244_ACEOF
21245cat confdefs.h >>conftest.$ac_ext
21246cat >>conftest.$ac_ext <<_ACEOF
21247/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021248int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021249int
21250main ()
21251{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021252return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021253 ;
21254 return 0;
21255}
21256_ACEOF
21257rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021258if { (ac_try="$ac_compile"
21259case "(($ac_try" in
21260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21261 *) ac_try_echo=$ac_try;;
21262esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021263eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21264$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021265 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021266 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021267 grep -v '^ *+' conftest.er1 >conftest.err
21268 rm -f conftest.er1
21269 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021270 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021271 (exit $ac_status); } && {
21272 test -z "$ac_c_werror_flag" ||
21273 test ! -s conftest.err
21274 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021275
21276
21277cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021278#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021279_ACEOF
21280
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021281 have_prototypes=yes
21282
Guido van Rossumf78abae1997-01-21 22:02:36 +000021283else
Antoine Pitrou20327222009-05-24 20:39:11 +000021284 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021285sed 's/^/| /' conftest.$ac_ext >&5
21286
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021287
Guido van Rossum7f43da71994-08-01 12:15:30 +000021288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021289
21290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000021291{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5
21292$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021293
Guido van Rossumda88dad1995-01-26 00:46:29 +000021294works=no
Antoine Pitrou20327222009-05-24 20:39:11 +000021295{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21296$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021297cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021298/* confdefs.h. */
21299_ACEOF
21300cat confdefs.h >>conftest.$ac_ext
21301cat >>conftest.$ac_ext <<_ACEOF
21302/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021303
21304#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021305int foo(int x, ...) {
21306 va_list va;
21307 va_start(va, x);
21308 va_arg(va, int);
21309 va_arg(va, char *);
21310 va_arg(va, double);
21311 return 0;
21312}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021313
Martin v. Löwis11437992002-04-12 09:54:03 +000021314int
21315main ()
21316{
Guido van Rossum90eea071996-08-30 20:58:57 +000021317return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021318 ;
21319 return 0;
21320}
21321_ACEOF
21322rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021323if { (ac_try="$ac_compile"
21324case "(($ac_try" in
21325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21326 *) ac_try_echo=$ac_try;;
21327esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021328eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21329$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021332 grep -v '^ *+' conftest.er1 >conftest.err
21333 rm -f conftest.er1
21334 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021335 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021336 (exit $ac_status); } && {
21337 test -z "$ac_c_werror_flag" ||
21338 test ! -s conftest.err
21339 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021340
21341
21342cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021343#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021344_ACEOF
21345
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021346 works=yes
21347
Guido van Rossumf78abae1997-01-21 22:02:36 +000021348else
Antoine Pitrou20327222009-05-24 20:39:11 +000021349 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021350sed 's/^/| /' conftest.$ac_ext >&5
21351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021352
Guido van Rossum627b2d71993-12-24 10:39:16 +000021353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021354
21355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000021356{ $as_echo "$as_me:$LINENO: result: $works" >&5
21357$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021358
Martin v. Löwisd6320502004-08-12 13:45:08 +000021359# check for socketpair
Antoine Pitrou20327222009-05-24 20:39:11 +000021360{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5
21361$as_echo_n "checking for socketpair... " >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021362cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021363/* confdefs.h. */
21364_ACEOF
21365cat confdefs.h >>conftest.$ac_ext
21366cat >>conftest.$ac_ext <<_ACEOF
21367/* end confdefs.h. */
21368
21369#include <sys/types.h>
21370#include <sys/socket.h>
21371
21372int
21373main ()
21374{
21375void *x=socketpair
21376 ;
21377 return 0;
21378}
21379_ACEOF
21380rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021381if { (ac_try="$ac_compile"
21382case "(($ac_try" in
21383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21384 *) ac_try_echo=$ac_try;;
21385esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021386eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21387$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021388 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021390 grep -v '^ *+' conftest.er1 >conftest.err
21391 rm -f conftest.er1
21392 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021393 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021394 (exit $ac_status); } && {
21395 test -z "$ac_c_werror_flag" ||
21396 test ! -s conftest.err
21397 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021398
21399cat >>confdefs.h <<\_ACEOF
21400#define HAVE_SOCKETPAIR 1
21401_ACEOF
21402
Antoine Pitrou20327222009-05-24 20:39:11 +000021403 { $as_echo "$as_me:$LINENO: result: yes" >&5
21404$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021405else
Antoine Pitrou20327222009-05-24 20:39:11 +000021406 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021407sed 's/^/| /' conftest.$ac_ext >&5
21408
Antoine Pitrou20327222009-05-24 20:39:11 +000021409 { $as_echo "$as_me:$LINENO: result: no" >&5
21410$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021411
21412fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021413
21414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021415
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021416# check if sockaddr has sa_len member
Antoine Pitrou20327222009-05-24 20:39:11 +000021417{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21418$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021419cat >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. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021425#include <sys/types.h>
21426#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021427int
21428main ()
21429{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021430struct sockaddr x;
21431x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021432 ;
21433 return 0;
21434}
21435_ACEOF
21436rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021437if { (ac_try="$ac_compile"
21438case "(($ac_try" in
21439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21440 *) ac_try_echo=$ac_try;;
21441esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021442eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21443$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021446 grep -v '^ *+' conftest.er1 >conftest.err
21447 rm -f conftest.er1
21448 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021449 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021450 (exit $ac_status); } && {
21451 test -z "$ac_c_werror_flag" ||
21452 test ! -s conftest.err
21453 } && test -s conftest.$ac_objext; then
Antoine Pitrou20327222009-05-24 20:39:11 +000021454 { $as_echo "$as_me:$LINENO: result: yes" >&5
21455$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021456
21457cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021458#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021459_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021460
21461else
Antoine Pitrou20327222009-05-24 20:39:11 +000021462 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021463sed 's/^/| /' conftest.$ac_ext >&5
21464
Antoine Pitrou20327222009-05-24 20:39:11 +000021465 { $as_echo "$as_me:$LINENO: result: no" >&5
21466$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021467fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021468
21469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021470
Guido van Rossumda88dad1995-01-26 00:46:29 +000021471va_list_is_array=no
Antoine Pitrou20327222009-05-24 20:39:11 +000021472{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21473$as_echo_n "checking whether va_list is an array... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021474cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021475/* confdefs.h. */
21476_ACEOF
21477cat confdefs.h >>conftest.$ac_ext
21478cat >>conftest.$ac_ext <<_ACEOF
21479/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021480
21481#ifdef HAVE_STDARG_PROTOTYPES
21482#include <stdarg.h>
21483#else
21484#include <varargs.h>
21485#endif
21486
Martin v. Löwis11437992002-04-12 09:54:03 +000021487int
21488main ()
21489{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021490va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021491 ;
21492 return 0;
21493}
21494_ACEOF
21495rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021496if { (ac_try="$ac_compile"
21497case "(($ac_try" in
21498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21499 *) ac_try_echo=$ac_try;;
21500esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021501eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21502$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021503 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021505 grep -v '^ *+' conftest.er1 >conftest.err
21506 rm -f conftest.er1
21507 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021508 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021509 (exit $ac_status); } && {
21510 test -z "$ac_c_werror_flag" ||
21511 test ! -s conftest.err
21512 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021513 :
21514else
Antoine Pitrou20327222009-05-24 20:39:11 +000021515 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021516sed 's/^/| /' conftest.$ac_ext >&5
21517
Martin v. Löwis11437992002-04-12 09:54:03 +000021518
21519
21520cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021521#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021522_ACEOF
21523
Guido van Rossumda88dad1995-01-26 00:46:29 +000021524 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021525
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021527
21528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000021529{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21530$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021531
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021532# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021533
21534
21535
Antoine Pitrou20327222009-05-24 20:39:11 +000021536{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21537$as_echo_n "checking for gethostbyname_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021538if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000021539 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +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. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021547/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21548 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21549#define gethostbyname_r innocuous_gethostbyname_r
21550
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021551/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021552 which can conflict with char gethostbyname_r (); below.
21553 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021554 <limits.h> exists even on freestanding compilers. */
21555
21556#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021557# include <limits.h>
21558#else
21559# include <assert.h>
21560#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021561
21562#undef gethostbyname_r
21563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021564/* Override any GCC internal prototype to avoid an error.
21565 Use char because int might match the return type of a GCC
21566 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021567#ifdef __cplusplus
21568extern "C"
21569#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021570char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021571/* The GNU C library defines this for functions which it implements
21572 to always fail with ENOSYS. Some functions are actually named
21573 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021574#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021575choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021576#endif
21577
Skip Montanaro6dead952003-09-25 14:50:04 +000021578int
21579main ()
21580{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021581return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021582 ;
21583 return 0;
21584}
21585_ACEOF
21586rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021587if { (ac_try="$ac_link"
21588case "(($ac_try" in
21589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21590 *) ac_try_echo=$ac_try;;
21591esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021592eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21593$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021594 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021595 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021596 grep -v '^ *+' conftest.er1 >conftest.err
21597 rm -f conftest.er1
21598 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021599 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021600 (exit $ac_status); } && {
21601 test -z "$ac_c_werror_flag" ||
21602 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000021603 } && test -s conftest$ac_exeext && {
21604 test "$cross_compiling" = yes ||
21605 $as_test_x conftest$ac_exeext
21606 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021607 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021608else
Antoine Pitrou20327222009-05-24 20:39:11 +000021609 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021610sed 's/^/| /' conftest.$ac_ext >&5
21611
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021612 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021614
Antoine Pitrou20327222009-05-24 20:39:11 +000021615rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021616rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021617 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021618fi
Antoine Pitrou20327222009-05-24 20:39:11 +000021619{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21620$as_echo "$ac_cv_func_gethostbyname_r" >&6; }
21621if test "x$ac_cv_func_gethostbyname_r" = x""yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021622
Martin v. Löwis11437992002-04-12 09:54:03 +000021623 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021624#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021625_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021626
Antoine Pitrou20327222009-05-24 20:39:11 +000021627 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21628$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021629 OLD_CFLAGS=$CFLAGS
21630 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021631 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021632/* confdefs.h. */
21633_ACEOF
21634cat confdefs.h >>conftest.$ac_ext
21635cat >>conftest.$ac_ext <<_ACEOF
21636/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021637
21638# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021639
Martin v. Löwis11437992002-04-12 09:54:03 +000021640int
21641main ()
21642{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021643
21644 char *name;
21645 struct hostent *he, *res;
21646 char buffer[2048];
21647 int buflen = 2048;
21648 int h_errnop;
21649
21650 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021651
21652 ;
21653 return 0;
21654}
21655_ACEOF
21656rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021657if { (ac_try="$ac_compile"
21658case "(($ac_try" in
21659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21660 *) ac_try_echo=$ac_try;;
21661esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021662eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21663$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021664 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021666 grep -v '^ *+' conftest.er1 >conftest.err
21667 rm -f conftest.er1
21668 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021669 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021670 (exit $ac_status); } && {
21671 test -z "$ac_c_werror_flag" ||
21672 test ! -s conftest.err
21673 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021674
21675 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021676#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021677_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021678
Martin v. Löwis11437992002-04-12 09:54:03 +000021679
21680cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021681#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021682_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021683
Antoine Pitrou20327222009-05-24 20:39:11 +000021684 { $as_echo "$as_me:$LINENO: result: yes" >&5
21685$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021686
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021687else
Antoine Pitrou20327222009-05-24 20:39:11 +000021688 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021689sed 's/^/| /' conftest.$ac_ext >&5
21690
Martin v. Löwis11437992002-04-12 09:54:03 +000021691
Antoine Pitrou20327222009-05-24 20:39:11 +000021692 { $as_echo "$as_me:$LINENO: result: no" >&5
21693$as_echo "no" >&6; }
21694 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21695$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021697/* confdefs.h. */
21698_ACEOF
21699cat confdefs.h >>conftest.$ac_ext
21700cat >>conftest.$ac_ext <<_ACEOF
21701/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021702
21703# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021704
Martin v. Löwis11437992002-04-12 09:54:03 +000021705int
21706main ()
21707{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021708
21709 char *name;
21710 struct hostent *he;
21711 char buffer[2048];
21712 int buflen = 2048;
21713 int h_errnop;
21714
21715 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021716
21717 ;
21718 return 0;
21719}
21720_ACEOF
21721rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021722if { (ac_try="$ac_compile"
21723case "(($ac_try" in
21724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21725 *) ac_try_echo=$ac_try;;
21726esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021727eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21728$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021731 grep -v '^ *+' conftest.er1 >conftest.err
21732 rm -f conftest.er1
21733 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021734 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021735 (exit $ac_status); } && {
21736 test -z "$ac_c_werror_flag" ||
21737 test ! -s conftest.err
21738 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021739
21740 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021741#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021742_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021743
Martin v. Löwis11437992002-04-12 09:54:03 +000021744
21745cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021746#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021747_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021748
Antoine Pitrou20327222009-05-24 20:39:11 +000021749 { $as_echo "$as_me:$LINENO: result: yes" >&5
21750$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021751
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021752else
Antoine Pitrou20327222009-05-24 20:39:11 +000021753 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021754sed 's/^/| /' conftest.$ac_ext >&5
21755
Martin v. Löwis11437992002-04-12 09:54:03 +000021756
Antoine Pitrou20327222009-05-24 20:39:11 +000021757 { $as_echo "$as_me:$LINENO: result: no" >&5
21758$as_echo "no" >&6; }
21759 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21760$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021762/* confdefs.h. */
21763_ACEOF
21764cat confdefs.h >>conftest.$ac_ext
21765cat >>conftest.$ac_ext <<_ACEOF
21766/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021767
21768# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021769
Martin v. Löwis11437992002-04-12 09:54:03 +000021770int
21771main ()
21772{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021773
21774 char *name;
21775 struct hostent *he;
21776 struct hostent_data data;
21777
21778 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021779
21780 ;
21781 return 0;
21782}
21783_ACEOF
21784rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021785if { (ac_try="$ac_compile"
21786case "(($ac_try" in
21787 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21788 *) ac_try_echo=$ac_try;;
21789esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021790eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21791$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021792 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021793 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021794 grep -v '^ *+' conftest.er1 >conftest.err
21795 rm -f conftest.er1
21796 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021797 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021798 (exit $ac_status); } && {
21799 test -z "$ac_c_werror_flag" ||
21800 test ! -s conftest.err
21801 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021802
21803 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021804#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021805_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021806
Martin v. Löwis11437992002-04-12 09:54:03 +000021807
21808cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021809#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021810_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021811
Antoine Pitrou20327222009-05-24 20:39:11 +000021812 { $as_echo "$as_me:$LINENO: result: yes" >&5
21813$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021814
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021815else
Antoine Pitrou20327222009-05-24 20:39:11 +000021816 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021817sed 's/^/| /' conftest.$ac_ext >&5
21818
Martin v. Löwis11437992002-04-12 09:54:03 +000021819
Antoine Pitrou20327222009-05-24 20:39:11 +000021820 { $as_echo "$as_me:$LINENO: result: no" >&5
21821$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021822
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021823fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021824
21825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021826
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021828
21829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021830
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021831fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021832
21833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021834 CFLAGS=$OLD_CFLAGS
21835
21836else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021837
Martin v. Löwis11437992002-04-12 09:54:03 +000021838
21839for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021840do
Antoine Pitrou20327222009-05-24 20:39:11 +000021841as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21842{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21843$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021844if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000021845 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021846else
Martin v. Löwis11437992002-04-12 09:54:03 +000021847 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021848/* confdefs.h. */
21849_ACEOF
21850cat confdefs.h >>conftest.$ac_ext
21851cat >>conftest.$ac_ext <<_ACEOF
21852/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021853/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21854 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21855#define $ac_func innocuous_$ac_func
21856
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021857/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021858 which can conflict with char $ac_func (); below.
21859 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021860 <limits.h> exists even on freestanding compilers. */
21861
21862#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021863# include <limits.h>
21864#else
21865# include <assert.h>
21866#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021867
21868#undef $ac_func
21869
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021870/* Override any GCC internal prototype to avoid an error.
21871 Use char because int might match the return type of a GCC
21872 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021873#ifdef __cplusplus
21874extern "C"
21875#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021876char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021877/* The GNU C library defines this for functions which it implements
21878 to always fail with ENOSYS. Some functions are actually named
21879 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021880#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021881choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021882#endif
21883
Skip Montanaro6dead952003-09-25 14:50:04 +000021884int
21885main ()
21886{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021887return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021888 ;
21889 return 0;
21890}
21891_ACEOF
21892rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021893if { (ac_try="$ac_link"
21894case "(($ac_try" in
21895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21896 *) ac_try_echo=$ac_try;;
21897esac
Antoine Pitrou20327222009-05-24 20:39:11 +000021898eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21899$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021900 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021901 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021902 grep -v '^ *+' conftest.er1 >conftest.err
21903 rm -f conftest.er1
21904 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000021905 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021906 (exit $ac_status); } && {
21907 test -z "$ac_c_werror_flag" ||
21908 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000021909 } && test -s conftest$ac_exeext && {
21910 test "$cross_compiling" = yes ||
21911 $as_test_x conftest$ac_exeext
21912 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021913 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021914else
Antoine Pitrou20327222009-05-24 20:39:11 +000021915 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021916sed 's/^/| /' conftest.$ac_ext >&5
21917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021918 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021919fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021920
Antoine Pitrou20327222009-05-24 20:39:11 +000021921rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021922rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021923 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021924fi
Antoine Pitrou20327222009-05-24 20:39:11 +000021925ac_res=`eval 'as_val=${'$as_ac_var'}
21926 $as_echo "$as_val"'`
21927 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21928$as_echo "$ac_res" >&6; }
21929as_val=`eval 'as_val=${'$as_ac_var'}
21930 $as_echo "$as_val"'`
21931 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021932 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000021933#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021934_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021935
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021936fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021937done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021938
Michael W. Hudson54241132001-12-07 15:38:26 +000021939
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021940fi
21941
Michael W. Hudson54241132001-12-07 15:38:26 +000021942
21943
21944
21945
21946
21947
Guido van Rossum627b2d71993-12-24 10:39:16 +000021948# checks for system services
21949# (none yet)
21950
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021951# Linux requires this for correct f.p. operations
Antoine Pitrou20327222009-05-24 20:39:11 +000021952{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5
21953$as_echo_n "checking for __fpu_control... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021954if test "${ac_cv_func___fpu_control+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000021955 $as_echo_n "(cached) " >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021956else
Martin v. Löwis11437992002-04-12 09:54:03 +000021957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021958/* confdefs.h. */
21959_ACEOF
21960cat confdefs.h >>conftest.$ac_ext
21961cat >>conftest.$ac_ext <<_ACEOF
21962/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021963/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21964 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21965#define __fpu_control innocuous___fpu_control
21966
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021967/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021968 which can conflict with char __fpu_control (); below.
21969 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021970 <limits.h> exists even on freestanding compilers. */
21971
21972#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021973# include <limits.h>
21974#else
21975# include <assert.h>
21976#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021977
21978#undef __fpu_control
21979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021980/* Override any GCC internal prototype to avoid an error.
21981 Use char because int might match the return type of a GCC
21982 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021983#ifdef __cplusplus
21984extern "C"
21985#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021986char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021987/* The GNU C library defines this for functions which it implements
21988 to always fail with ENOSYS. Some functions are actually named
21989 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021990#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021991choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021992#endif
21993
Skip Montanaro6dead952003-09-25 14:50:04 +000021994int
21995main ()
21996{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021997return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021998 ;
21999 return 0;
22000}
22001_ACEOF
22002rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022003if { (ac_try="$ac_link"
22004case "(($ac_try" in
22005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22006 *) ac_try_echo=$ac_try;;
22007esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022008eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22009$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022010 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022012 grep -v '^ *+' conftest.er1 >conftest.err
22013 rm -f conftest.er1
22014 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000022015 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022016 (exit $ac_status); } && {
22017 test -z "$ac_c_werror_flag" ||
22018 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000022019 } && test -s conftest$ac_exeext && {
22020 test "$cross_compiling" = yes ||
22021 $as_test_x conftest$ac_exeext
22022 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022023 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022024else
Antoine Pitrou20327222009-05-24 20:39:11 +000022025 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022026sed 's/^/| /' conftest.$ac_ext >&5
22027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022028 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022030
Antoine Pitrou20327222009-05-24 20:39:11 +000022031rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022032rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022033 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022034fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022035{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22036$as_echo "$ac_cv_func___fpu_control" >&6; }
22037if test "x$ac_cv_func___fpu_control" = x""yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022038 :
22039else
Martin v. Löwis11437992002-04-12 09:54:03 +000022040
Antoine Pitrou20327222009-05-24 20:39:11 +000022041{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22042$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022043if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000022044 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022045else
Martin v. Löwis11437992002-04-12 09:54:03 +000022046 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022047LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022048cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022049/* confdefs.h. */
22050_ACEOF
22051cat confdefs.h >>conftest.$ac_ext
22052cat >>conftest.$ac_ext <<_ACEOF
22053/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022054
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022055/* Override any GCC internal prototype to avoid an error.
22056 Use char because int might match the return type of a GCC
22057 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022058#ifdef __cplusplus
22059extern "C"
22060#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022061char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022062int
22063main ()
22064{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022065return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022066 ;
22067 return 0;
22068}
22069_ACEOF
22070rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022071if { (ac_try="$ac_link"
22072case "(($ac_try" in
22073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22074 *) ac_try_echo=$ac_try;;
22075esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022076eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22077$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022078 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022080 grep -v '^ *+' conftest.er1 >conftest.err
22081 rm -f conftest.er1
22082 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000022083 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022084 (exit $ac_status); } && {
22085 test -z "$ac_c_werror_flag" ||
22086 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000022087 } && test -s conftest$ac_exeext && {
22088 test "$cross_compiling" = yes ||
22089 $as_test_x conftest$ac_exeext
22090 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022091 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022092else
Antoine Pitrou20327222009-05-24 20:39:11 +000022093 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022094sed 's/^/| /' conftest.$ac_ext >&5
22095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022096 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022098
Antoine Pitrou20327222009-05-24 20:39:11 +000022099rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022100rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022101 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022102LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022103fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022104{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22105$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
22106if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022107 cat >>confdefs.h <<_ACEOF
22108#define HAVE_LIBIEEE 1
22109_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022110
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022111 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022112
Guido van Rossum627b2d71993-12-24 10:39:16 +000022113fi
22114
Michael W. Hudson54241132001-12-07 15:38:26 +000022115
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022116fi
22117
Michael W. Hudson54241132001-12-07 15:38:26 +000022118
Guido van Rossum7f253911997-05-09 02:42:48 +000022119# Check for --with-fpectl
Antoine Pitrou20327222009-05-24 20:39:11 +000022120{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22121$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022122
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022123# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022124if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022125 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022126if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022127then
22128
22129cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022130#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022131_ACEOF
22132
Antoine Pitrou20327222009-05-24 20:39:11 +000022133 { $as_echo "$as_me:$LINENO: result: yes" >&5
22134$as_echo "yes" >&6; }
22135else { $as_echo "$as_me:$LINENO: result: no" >&5
22136$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022137fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022138else
Antoine Pitrou20327222009-05-24 20:39:11 +000022139 { $as_echo "$as_me:$LINENO: result: no" >&5
22140$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022141fi
22142
Guido van Rossum7f253911997-05-09 02:42:48 +000022143
Guido van Rossum7f43da71994-08-01 12:15:30 +000022144# check for --with-libm=...
22145
Guido van Rossum563e7081996-09-10 18:20:48 +000022146case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022147Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022148*) LIBM=-lm
22149esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022150{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22151$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022153# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022154if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022155 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022156if test "$withval" = no
22157then LIBM=
Antoine Pitrou20327222009-05-24 20:39:11 +000022158 { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5
22159$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022160elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022161then LIBM=$withval
Antoine Pitrou20327222009-05-24 20:39:11 +000022162 { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22163$as_echo "set LIBM=\"$withval\"" >&6; }
22164else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22165$as_echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022166 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022167fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022168else
Antoine Pitrou20327222009-05-24 20:39:11 +000022169 { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22170$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022171fi
22172
Guido van Rossum7f43da71994-08-01 12:15:30 +000022173
22174# check for --with-libc=...
22175
Antoine Pitrou20327222009-05-24 20:39:11 +000022176{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22177$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022178
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022179# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022180if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022181 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022182if test "$withval" = no
22183then LIBC=
Antoine Pitrou20327222009-05-24 20:39:11 +000022184 { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5
22185$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022186elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022187then LIBC=$withval
Antoine Pitrou20327222009-05-24 20:39:11 +000022188 { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22189$as_echo "set LIBC=\"$withval\"" >&6; }
22190else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22191$as_echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022192 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022193fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022194else
Antoine Pitrou20327222009-05-24 20:39:11 +000022195 { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22196$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022197fi
22198
Guido van Rossum7f43da71994-08-01 12:15:30 +000022199
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022200# **************************************************
22201# * Check for various properties of floating point *
22202# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022203
Antoine Pitrou20327222009-05-24 20:39:11 +000022204{ $as_echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22205$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022206if test "${ac_cv_little_endian_double+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000022207 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022208else
22209
22210if test "$cross_compiling" = yes; then
22211 ac_cv_little_endian_double=no
22212else
22213 cat >conftest.$ac_ext <<_ACEOF
22214/* confdefs.h. */
22215_ACEOF
22216cat confdefs.h >>conftest.$ac_ext
22217cat >>conftest.$ac_ext <<_ACEOF
22218/* end confdefs.h. */
22219
22220#include <string.h>
22221int main() {
22222 double x = 9006104071832581.0;
22223 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22224 return 0;
22225 else
22226 return 1;
22227}
22228
22229_ACEOF
22230rm -f conftest$ac_exeext
22231if { (ac_try="$ac_link"
22232case "(($ac_try" in
22233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22234 *) ac_try_echo=$ac_try;;
22235esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022236eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22237$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022238 (eval "$ac_link") 2>&5
22239 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000022240 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022241 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22242 { (case "(($ac_try" in
22243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22244 *) ac_try_echo=$ac_try;;
22245esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022246eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22247$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022248 (eval "$ac_try") 2>&5
22249 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000022250 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022251 (exit $ac_status); }; }; then
22252 ac_cv_little_endian_double=yes
22253else
Antoine Pitrou20327222009-05-24 20:39:11 +000022254 $as_echo "$as_me: program exited with status $ac_status" >&5
22255$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022256sed 's/^/| /' conftest.$ac_ext >&5
22257
22258( exit $ac_status )
22259ac_cv_little_endian_double=no
22260fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022261rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22263fi
22264
22265
22266fi
22267
Antoine Pitrou20327222009-05-24 20:39:11 +000022268{ $as_echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22269$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022270if test "$ac_cv_little_endian_double" = yes
22271then
22272
22273cat >>confdefs.h <<\_ACEOF
22274#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22275_ACEOF
22276
22277fi
22278
Antoine Pitrou20327222009-05-24 20:39:11 +000022279{ $as_echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22280$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022281if test "${ac_cv_big_endian_double+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000022282 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022283else
22284
22285if test "$cross_compiling" = yes; then
22286 ac_cv_big_endian_double=no
22287else
22288 cat >conftest.$ac_ext <<_ACEOF
22289/* confdefs.h. */
22290_ACEOF
22291cat confdefs.h >>conftest.$ac_ext
22292cat >>conftest.$ac_ext <<_ACEOF
22293/* end confdefs.h. */
22294
22295#include <string.h>
22296int main() {
22297 double x = 9006104071832581.0;
22298 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22299 return 0;
22300 else
22301 return 1;
22302}
22303
22304_ACEOF
22305rm -f conftest$ac_exeext
22306if { (ac_try="$ac_link"
22307case "(($ac_try" in
22308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22309 *) ac_try_echo=$ac_try;;
22310esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022311eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22312$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022313 (eval "$ac_link") 2>&5
22314 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000022315 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22317 { (case "(($ac_try" in
22318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22319 *) ac_try_echo=$ac_try;;
22320esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022321eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22322$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022323 (eval "$ac_try") 2>&5
22324 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000022325 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022326 (exit $ac_status); }; }; then
22327 ac_cv_big_endian_double=yes
22328else
Antoine Pitrou20327222009-05-24 20:39:11 +000022329 $as_echo "$as_me: program exited with status $ac_status" >&5
22330$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022331sed 's/^/| /' conftest.$ac_ext >&5
22332
22333( exit $ac_status )
22334ac_cv_big_endian_double=no
22335fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022336rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022337rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22338fi
22339
22340
22341fi
22342
Antoine Pitrou20327222009-05-24 20:39:11 +000022343{ $as_echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22344$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022345if test "$ac_cv_big_endian_double" = yes
22346then
22347
22348cat >>confdefs.h <<\_ACEOF
22349#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22350_ACEOF
22351
22352fi
22353
22354# Some ARM platforms use a mixed-endian representation for doubles.
22355# While Python doesn't currently have full support for these platforms
22356# (see e.g., issue 1762561), we can at least make sure that float <-> string
22357# conversions work.
Antoine Pitrou20327222009-05-24 20:39:11 +000022358{ $as_echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22359$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022360if test "${ac_cv_mixed_endian_double+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000022361 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022362else
22363
22364if test "$cross_compiling" = yes; then
22365 ac_cv_mixed_endian_double=no
22366else
22367 cat >conftest.$ac_ext <<_ACEOF
22368/* confdefs.h. */
22369_ACEOF
22370cat confdefs.h >>conftest.$ac_ext
22371cat >>conftest.$ac_ext <<_ACEOF
22372/* end confdefs.h. */
22373
22374#include <string.h>
22375int main() {
22376 double x = 9006104071832581.0;
22377 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22378 return 0;
22379 else
22380 return 1;
22381}
22382
22383_ACEOF
22384rm -f conftest$ac_exeext
22385if { (ac_try="$ac_link"
22386case "(($ac_try" in
22387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22388 *) ac_try_echo=$ac_try;;
22389esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022390eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22391$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022392 (eval "$ac_link") 2>&5
22393 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000022394 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022395 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22396 { (case "(($ac_try" in
22397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22398 *) ac_try_echo=$ac_try;;
22399esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022400eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22401$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022402 (eval "$ac_try") 2>&5
22403 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000022404 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022405 (exit $ac_status); }; }; then
22406 ac_cv_mixed_endian_double=yes
22407else
Antoine Pitrou20327222009-05-24 20:39:11 +000022408 $as_echo "$as_me: program exited with status $ac_status" >&5
22409$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022410sed 's/^/| /' conftest.$ac_ext >&5
22411
22412( exit $ac_status )
22413ac_cv_mixed_endian_double=no
22414fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022415rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022416rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22417fi
22418
22419
22420fi
22421
Antoine Pitrou20327222009-05-24 20:39:11 +000022422{ $as_echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22423$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022424if test "$ac_cv_mixed_endian_double" = yes
22425then
22426
22427cat >>confdefs.h <<\_ACEOF
22428#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22429_ACEOF
22430
22431fi
22432
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022433# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022434# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022435# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022436# rounding; this is a problem on x86, where the x87 FPU has a default
22437# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22438# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022439if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22440then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022441 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022442 # x87 control word. It should be, but you never know...
Antoine Pitrou20327222009-05-24 20:39:11 +000022443 { $as_echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22444$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022445 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022446/* confdefs.h. */
22447_ACEOF
22448cat confdefs.h >>conftest.$ac_ext
22449cat >>conftest.$ac_ext <<_ACEOF
22450/* end confdefs.h. */
22451
22452int
22453main ()
22454{
22455
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022456 unsigned short cw;
22457 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22458 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022459
22460 ;
22461 return 0;
22462}
22463_ACEOF
22464rm -f conftest.$ac_objext
22465if { (ac_try="$ac_compile"
22466case "(($ac_try" in
22467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22468 *) ac_try_echo=$ac_try;;
22469esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022470eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22471$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022472 (eval "$ac_compile") 2>conftest.er1
22473 ac_status=$?
22474 grep -v '^ *+' conftest.er1 >conftest.err
22475 rm -f conftest.er1
22476 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000022477 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022478 (exit $ac_status); } && {
22479 test -z "$ac_c_werror_flag" ||
22480 test ! -s conftest.err
22481 } && test -s conftest.$ac_objext; then
22482 have_gcc_asm_for_x87=yes
22483else
Antoine Pitrou20327222009-05-24 20:39:11 +000022484 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022485sed 's/^/| /' conftest.$ac_ext >&5
22486
22487 have_gcc_asm_for_x87=no
22488fi
22489
22490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000022491 { $as_echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22492$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022493 if test "$have_gcc_asm_for_x87" = yes
22494 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022495
22496cat >>confdefs.h <<\_ACEOF
22497#define HAVE_GCC_ASM_FOR_X87 1
22498_ACEOF
22499
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022500 fi
22501fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022502
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022503# Detect whether system arithmetic is subject to x87-style double
22504# rounding issues. The result of this test has little meaning on non
22505# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22506# mode is round-to-nearest and double rounding issues are present, and
22507# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Antoine Pitrou20327222009-05-24 20:39:11 +000022508{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22509$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022510# $BASECFLAGS may affect the result
22511ac_save_cc="$CC"
22512CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022513if test "$cross_compiling" = yes; then
22514 ac_cv_x87_double_rounding=no
22515else
22516 cat >conftest.$ac_ext <<_ACEOF
22517/* confdefs.h. */
22518_ACEOF
22519cat confdefs.h >>conftest.$ac_ext
22520cat >>conftest.$ac_ext <<_ACEOF
22521/* end confdefs.h. */
22522
22523#include <stdlib.h>
22524#include <math.h>
22525int main() {
22526 volatile double x, y, z;
22527 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22528 x = 0.99999999999999989; /* 1-2**-53 */
22529 y = 1./x;
22530 if (y != 1.)
22531 exit(0);
22532 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22533 x = 1e16;
22534 y = 2.99999;
22535 z = x + y;
22536 if (z != 1e16+4.)
22537 exit(0);
22538 /* both tests show evidence of double rounding */
22539 exit(1);
22540}
22541
22542_ACEOF
22543rm -f conftest$ac_exeext
22544if { (ac_try="$ac_link"
22545case "(($ac_try" in
22546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22547 *) ac_try_echo=$ac_try;;
22548esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022549eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22550$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022551 (eval "$ac_link") 2>&5
22552 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000022553 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022554 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22555 { (case "(($ac_try" in
22556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22557 *) ac_try_echo=$ac_try;;
22558esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022559eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22560$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022561 (eval "$ac_try") 2>&5
22562 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000022563 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022564 (exit $ac_status); }; }; then
22565 ac_cv_x87_double_rounding=no
22566else
Antoine Pitrou20327222009-05-24 20:39:11 +000022567 $as_echo "$as_me: program exited with status $ac_status" >&5
22568$as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022569sed 's/^/| /' conftest.$ac_ext >&5
22570
22571( exit $ac_status )
22572ac_cv_x87_double_rounding=yes
22573fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022574rm -rf conftest.dSYM
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22576fi
22577
22578
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022579CC="$ac_save_cc"
Antoine Pitrou20327222009-05-24 20:39:11 +000022580{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22581$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022582if test "$ac_cv_x87_double_rounding" = yes
22583then
22584
22585cat >>confdefs.h <<\_ACEOF
22586#define X87_DOUBLE_ROUNDING 1
22587_ACEOF
22588
22589fi
22590
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022591# ************************************
22592# * Check for mathematical functions *
22593# ************************************
22594
22595LIBS_SAVE=$LIBS
22596LIBS="$LIBS $LIBM"
22597
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022598# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22599# -0. on some architectures.
Antoine Pitrou20327222009-05-24 20:39:11 +000022600{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22601$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022602if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000022603 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022604else
22605
22606if test "$cross_compiling" = yes; then
22607 ac_cv_tanh_preserves_zero_sign=no
22608else
22609 cat >conftest.$ac_ext <<_ACEOF
22610/* confdefs.h. */
22611_ACEOF
22612cat confdefs.h >>conftest.$ac_ext
22613cat >>conftest.$ac_ext <<_ACEOF
22614/* end confdefs.h. */
22615
22616#include <math.h>
22617#include <stdlib.h>
22618int main() {
22619 /* return 0 if either negative zeros don't exist
22620 on this platform or if negative zeros exist
22621 and tanh(-0.) == -0. */
22622 if (atan2(0., -1.) == atan2(-0., -1.) ||
22623 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22624 else exit(1);
22625}
22626
22627_ACEOF
22628rm -f conftest$ac_exeext
22629if { (ac_try="$ac_link"
22630case "(($ac_try" in
22631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22632 *) ac_try_echo=$ac_try;;
22633esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022634eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22635$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022636 (eval "$ac_link") 2>&5
22637 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000022638 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022639 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22640 { (case "(($ac_try" in
22641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22642 *) ac_try_echo=$ac_try;;
22643esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022644eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22645$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022646 (eval "$ac_try") 2>&5
22647 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000022648 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022649 (exit $ac_status); }; }; then
22650 ac_cv_tanh_preserves_zero_sign=yes
22651else
Antoine Pitrou20327222009-05-24 20:39:11 +000022652 $as_echo "$as_me: program exited with status $ac_status" >&5
22653$as_echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022654sed 's/^/| /' conftest.$ac_ext >&5
22655
22656( exit $ac_status )
22657ac_cv_tanh_preserves_zero_sign=no
22658fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022659rm -rf conftest.dSYM
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22661fi
22662
22663
22664fi
22665
Antoine Pitrou20327222009-05-24 20:39:11 +000022666{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22667$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022668if test "$ac_cv_tanh_preserves_zero_sign" = yes
22669then
22670
22671cat >>confdefs.h <<\_ACEOF
22672#define TANH_PRESERVES_ZERO_SIGN 1
22673_ACEOF
22674
22675fi
22676
22677
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022678
Michael W. Hudson54241132001-12-07 15:38:26 +000022679
Christian Heimes99170a52007-12-19 02:07:34 +000022680
22681
22682
22683
22684
Mark Dickinsonf2537862009-04-18 13:58:18 +000022685
22686for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000022687do
Antoine Pitrou20327222009-05-24 20:39:11 +000022688as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22689{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22690$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000022691if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000022692 $as_echo_n "(cached) " >&6
Christian Heimes99170a52007-12-19 02:07:34 +000022693else
22694 cat >conftest.$ac_ext <<_ACEOF
22695/* confdefs.h. */
22696_ACEOF
22697cat confdefs.h >>conftest.$ac_ext
22698cat >>conftest.$ac_ext <<_ACEOF
22699/* end confdefs.h. */
22700/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22701 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22702#define $ac_func innocuous_$ac_func
22703
22704/* System header to define __stub macros and hopefully few prototypes,
22705 which can conflict with char $ac_func (); below.
22706 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22707 <limits.h> exists even on freestanding compilers. */
22708
22709#ifdef __STDC__
22710# include <limits.h>
22711#else
22712# include <assert.h>
22713#endif
22714
22715#undef $ac_func
22716
22717/* Override any GCC internal prototype to avoid an error.
22718 Use char because int might match the return type of a GCC
22719 builtin and then its argument prototype would still apply. */
22720#ifdef __cplusplus
22721extern "C"
22722#endif
22723char $ac_func ();
22724/* The GNU C library defines this for functions which it implements
22725 to always fail with ENOSYS. Some functions are actually named
22726 something starting with __ and the normal name is an alias. */
22727#if defined __stub_$ac_func || defined __stub___$ac_func
22728choke me
22729#endif
22730
22731int
22732main ()
22733{
22734return $ac_func ();
22735 ;
22736 return 0;
22737}
22738_ACEOF
22739rm -f conftest.$ac_objext conftest$ac_exeext
22740if { (ac_try="$ac_link"
22741case "(($ac_try" in
22742 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22743 *) ac_try_echo=$ac_try;;
22744esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022745eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22746$as_echo "$ac_try_echo") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022747 (eval "$ac_link") 2>conftest.er1
22748 ac_status=$?
22749 grep -v '^ *+' conftest.er1 >conftest.err
22750 rm -f conftest.er1
22751 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000022752 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022753 (exit $ac_status); } && {
22754 test -z "$ac_c_werror_flag" ||
22755 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000022756 } && test -s conftest$ac_exeext && {
22757 test "$cross_compiling" = yes ||
22758 $as_test_x conftest$ac_exeext
22759 }; then
Christian Heimes99170a52007-12-19 02:07:34 +000022760 eval "$as_ac_var=yes"
22761else
Antoine Pitrou20327222009-05-24 20:39:11 +000022762 $as_echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022763sed 's/^/| /' conftest.$ac_ext >&5
22764
22765 eval "$as_ac_var=no"
22766fi
22767
Antoine Pitrou20327222009-05-24 20:39:11 +000022768rm -rf conftest.dSYM
Christian Heimes99170a52007-12-19 02:07:34 +000022769rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22770 conftest$ac_exeext conftest.$ac_ext
22771fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022772ac_res=`eval 'as_val=${'$as_ac_var'}
22773 $as_echo "$as_val"'`
22774 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22775$as_echo "$ac_res" >&6; }
22776as_val=`eval 'as_val=${'$as_ac_var'}
22777 $as_echo "$as_val"'`
22778 if test "x$as_val" = x""yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022779 cat >>confdefs.h <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000022780#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022781_ACEOF
22782
22783fi
22784done
22785
Antoine Pitrou20327222009-05-24 20:39:11 +000022786{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22787$as_echo_n "checking whether isinf is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022788if test "${ac_cv_have_decl_isinf+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000022789 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022790else
22791 cat >conftest.$ac_ext <<_ACEOF
22792/* confdefs.h. */
22793_ACEOF
22794cat confdefs.h >>conftest.$ac_ext
22795cat >>conftest.$ac_ext <<_ACEOF
22796/* end confdefs.h. */
22797#include <math.h>
22798
22799int
22800main ()
22801{
22802#ifndef isinf
22803 (void) isinf;
22804#endif
22805
22806 ;
22807 return 0;
22808}
22809_ACEOF
22810rm -f conftest.$ac_objext
22811if { (ac_try="$ac_compile"
22812case "(($ac_try" in
22813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22814 *) ac_try_echo=$ac_try;;
22815esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022816eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22817$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022818 (eval "$ac_compile") 2>conftest.er1
22819 ac_status=$?
22820 grep -v '^ *+' conftest.er1 >conftest.err
22821 rm -f conftest.er1
22822 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000022823 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022824 (exit $ac_status); } && {
22825 test -z "$ac_c_werror_flag" ||
22826 test ! -s conftest.err
22827 } && test -s conftest.$ac_objext; then
22828 ac_cv_have_decl_isinf=yes
22829else
Antoine Pitrou20327222009-05-24 20:39:11 +000022830 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022831sed 's/^/| /' conftest.$ac_ext >&5
22832
22833 ac_cv_have_decl_isinf=no
22834fi
22835
22836rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22837fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022838{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22839$as_echo "$ac_cv_have_decl_isinf" >&6; }
22840if test "x$ac_cv_have_decl_isinf" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022841
22842cat >>confdefs.h <<_ACEOF
22843#define HAVE_DECL_ISINF 1
22844_ACEOF
22845
22846
22847else
22848 cat >>confdefs.h <<_ACEOF
22849#define HAVE_DECL_ISINF 0
22850_ACEOF
22851
22852
22853fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022854{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22855$as_echo_n "checking whether isnan is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022856if test "${ac_cv_have_decl_isnan+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000022857 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022858else
22859 cat >conftest.$ac_ext <<_ACEOF
22860/* confdefs.h. */
22861_ACEOF
22862cat confdefs.h >>conftest.$ac_ext
22863cat >>conftest.$ac_ext <<_ACEOF
22864/* end confdefs.h. */
22865#include <math.h>
22866
22867int
22868main ()
22869{
22870#ifndef isnan
22871 (void) isnan;
22872#endif
22873
22874 ;
22875 return 0;
22876}
22877_ACEOF
22878rm -f conftest.$ac_objext
22879if { (ac_try="$ac_compile"
22880case "(($ac_try" in
22881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22882 *) ac_try_echo=$ac_try;;
22883esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022884eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22885$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022886 (eval "$ac_compile") 2>conftest.er1
22887 ac_status=$?
22888 grep -v '^ *+' conftest.er1 >conftest.err
22889 rm -f conftest.er1
22890 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000022891 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022892 (exit $ac_status); } && {
22893 test -z "$ac_c_werror_flag" ||
22894 test ! -s conftest.err
22895 } && test -s conftest.$ac_objext; then
22896 ac_cv_have_decl_isnan=yes
22897else
Antoine Pitrou20327222009-05-24 20:39:11 +000022898 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022899sed 's/^/| /' conftest.$ac_ext >&5
22900
22901 ac_cv_have_decl_isnan=no
22902fi
22903
22904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22905fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022906{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22907$as_echo "$ac_cv_have_decl_isnan" >&6; }
22908if test "x$ac_cv_have_decl_isnan" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022909
22910cat >>confdefs.h <<_ACEOF
22911#define HAVE_DECL_ISNAN 1
22912_ACEOF
22913
22914
22915else
22916 cat >>confdefs.h <<_ACEOF
22917#define HAVE_DECL_ISNAN 0
22918_ACEOF
22919
22920
22921fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022922{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22923$as_echo_n "checking whether isfinite is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022924if test "${ac_cv_have_decl_isfinite+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000022925 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022926else
22927 cat >conftest.$ac_ext <<_ACEOF
22928/* confdefs.h. */
22929_ACEOF
22930cat confdefs.h >>conftest.$ac_ext
22931cat >>conftest.$ac_ext <<_ACEOF
22932/* end confdefs.h. */
22933#include <math.h>
22934
22935int
22936main ()
22937{
22938#ifndef isfinite
22939 (void) isfinite;
22940#endif
22941
22942 ;
22943 return 0;
22944}
22945_ACEOF
22946rm -f conftest.$ac_objext
22947if { (ac_try="$ac_compile"
22948case "(($ac_try" in
22949 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22950 *) ac_try_echo=$ac_try;;
22951esac
Antoine Pitrou20327222009-05-24 20:39:11 +000022952eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22953$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022954 (eval "$ac_compile") 2>conftest.er1
22955 ac_status=$?
22956 grep -v '^ *+' conftest.er1 >conftest.err
22957 rm -f conftest.er1
22958 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000022959 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022960 (exit $ac_status); } && {
22961 test -z "$ac_c_werror_flag" ||
22962 test ! -s conftest.err
22963 } && test -s conftest.$ac_objext; then
22964 ac_cv_have_decl_isfinite=yes
22965else
Antoine Pitrou20327222009-05-24 20:39:11 +000022966 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022967sed 's/^/| /' conftest.$ac_ext >&5
22968
22969 ac_cv_have_decl_isfinite=no
22970fi
22971
22972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22973fi
Antoine Pitrou20327222009-05-24 20:39:11 +000022974{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22975$as_echo "$ac_cv_have_decl_isfinite" >&6; }
22976if test "x$ac_cv_have_decl_isfinite" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022977
22978cat >>confdefs.h <<_ACEOF
22979#define HAVE_DECL_ISFINITE 1
22980_ACEOF
22981
22982
22983else
22984 cat >>confdefs.h <<_ACEOF
22985#define HAVE_DECL_ISFINITE 0
22986_ACEOF
22987
22988
22989fi
22990
22991
Christian Heimes99170a52007-12-19 02:07:34 +000022992
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022993LIBS=$LIBS_SAVE
22994
Mark Dickinson10683072009-04-18 21:18:19 +000022995# Multiprocessing check for broken sem_getvalue
Antoine Pitrou20327222009-05-24 20:39:11 +000022996{ $as_echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
22997$as_echo_n "checking for broken sem_getvalue... " >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000022998if test "$cross_compiling" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000022999 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23000$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23001{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000023002See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023003$as_echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000023004See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000023005 { (exit 1); exit 1; }; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000023006else
23007 cat >conftest.$ac_ext <<_ACEOF
23008/* confdefs.h. */
23009_ACEOF
23010cat confdefs.h >>conftest.$ac_ext
23011cat >>conftest.$ac_ext <<_ACEOF
23012/* end confdefs.h. */
23013
23014#include <unistd.h>
23015#include <fcntl.h>
23016#include <stdio.h>
23017#include <semaphore.h>
23018#include <sys/stat.h>
23019
23020int main(void){
23021 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23022 int count;
23023 int res;
23024 if(a==SEM_FAILED){
23025 perror("sem_open");
23026 return 1;
23027
23028 }
23029 res = sem_getvalue(a, &count);
23030 sem_close(a);
23031 return res==-1 ? 1 : 0;
23032}
23033
23034
23035_ACEOF
23036rm -f conftest$ac_exeext
23037if { (ac_try="$ac_link"
23038case "(($ac_try" in
23039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23040 *) ac_try_echo=$ac_try;;
23041esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023042eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23043$as_echo "$ac_try_echo") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023044 (eval "$ac_link") 2>&5
23045 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000023046 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023047 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23048 { (case "(($ac_try" in
23049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23050 *) ac_try_echo=$ac_try;;
23051esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023052eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23053$as_echo "$ac_try_echo") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023054 (eval "$ac_try") 2>&5
23055 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000023056 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023057 (exit $ac_status); }; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000023058 { $as_echo "$as_me:$LINENO: result: no" >&5
23059$as_echo "no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000023060else
Antoine Pitrou20327222009-05-24 20:39:11 +000023061 $as_echo "$as_me: program exited with status $ac_status" >&5
23062$as_echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023063sed 's/^/| /' conftest.$ac_ext >&5
23064
23065( exit $ac_status )
Antoine Pitrou20327222009-05-24 20:39:11 +000023066{ $as_echo "$as_me:$LINENO: result: yes" >&5
23067$as_echo "yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000023068
23069cat >>confdefs.h <<\_ACEOF
23070#define HAVE_BROKEN_SEM_GETVALUE 1
23071_ACEOF
23072
23073
23074fi
Antoine Pitrou20327222009-05-24 20:39:11 +000023075rm -rf conftest.dSYM
Mark Dickinson10683072009-04-18 21:18:19 +000023076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23077fi
23078
23079
23080
Mark Dickinsonbd792642009-03-18 20:06:12 +000023081# determine what size digit to use for Python's longs
Antoine Pitrou20327222009-05-24 20:39:11 +000023082{ $as_echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23083$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023084# Check whether --enable-big-digits was given.
23085if test "${enable_big_digits+set}" = set; then
23086 enableval=$enable_big_digits; case $enable_big_digits in
23087yes)
23088 enable_big_digits=30 ;;
23089no)
23090 enable_big_digits=15 ;;
2309115|30)
23092 ;;
23093*)
Antoine Pitrou20327222009-05-24 20:39:11 +000023094 { { $as_echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23095$as_echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
Mark Dickinsonbd792642009-03-18 20:06:12 +000023096 { (exit 1); exit 1; }; } ;;
23097esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023098{ $as_echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23099$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023100
23101cat >>confdefs.h <<_ACEOF
23102#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23103_ACEOF
23104
23105
23106else
Antoine Pitrou20327222009-05-24 20:39:11 +000023107 { $as_echo "$as_me:$LINENO: result: no value specified" >&5
23108$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023109fi
23110
23111
Guido van Rossumef2255b2000-03-10 22:30:29 +000023112# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023113if test "${ac_cv_header_wchar_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000023114 { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
23115$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023116if test "${ac_cv_header_wchar_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000023117 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023118fi
Antoine Pitrou20327222009-05-24 20:39:11 +000023119{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23120$as_echo "$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023121else
Martin v. Löwis11437992002-04-12 09:54:03 +000023122 # Is the header compilable?
Antoine Pitrou20327222009-05-24 20:39:11 +000023123{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5
23124$as_echo_n "checking wchar.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023125cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023126/* confdefs.h. */
23127_ACEOF
23128cat confdefs.h >>conftest.$ac_ext
23129cat >>conftest.$ac_ext <<_ACEOF
23130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023131$ac_includes_default
23132#include <wchar.h>
23133_ACEOF
23134rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023135if { (ac_try="$ac_compile"
23136case "(($ac_try" in
23137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23138 *) ac_try_echo=$ac_try;;
23139esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023140eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23141$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023142 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023144 grep -v '^ *+' conftest.er1 >conftest.err
23145 rm -f conftest.er1
23146 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023147 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023148 (exit $ac_status); } && {
23149 test -z "$ac_c_werror_flag" ||
23150 test ! -s conftest.err
23151 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023152 ac_header_compiler=yes
23153else
Antoine Pitrou20327222009-05-24 20:39:11 +000023154 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023155sed 's/^/| /' conftest.$ac_ext >&5
23156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023157 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023159
23160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000023161{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23162$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023163
23164# Is the header present?
Antoine Pitrou20327222009-05-24 20:39:11 +000023165{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5
23166$as_echo_n "checking wchar.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023168/* confdefs.h. */
23169_ACEOF
23170cat confdefs.h >>conftest.$ac_ext
23171cat >>conftest.$ac_ext <<_ACEOF
23172/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023173#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023174_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023175if { (ac_try="$ac_cpp conftest.$ac_ext"
23176case "(($ac_try" in
23177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23178 *) ac_try_echo=$ac_try;;
23179esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023180eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23181$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023182 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023183 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023184 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023185 rm -f conftest.er1
23186 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023187 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023188 (exit $ac_status); } >/dev/null && {
23189 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23190 test ! -s conftest.err
23191 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023192 ac_header_preproc=yes
23193else
Antoine Pitrou20327222009-05-24 20:39:11 +000023194 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023195sed 's/^/| /' conftest.$ac_ext >&5
23196
Martin v. Löwis11437992002-04-12 09:54:03 +000023197 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023199
Martin v. Löwis11437992002-04-12 09:54:03 +000023200rm -f conftest.err conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000023201{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23202$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023203
23204# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023205case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23206 yes:no: )
Antoine Pitrou20327222009-05-24 20:39:11 +000023207 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23208$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23209 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23210$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023211 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023212 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023213 no:yes:* )
Antoine Pitrou20327222009-05-24 20:39:11 +000023214 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23215$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23216 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23217$as_echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23218 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23219$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23220 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23221$as_echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23222 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23223$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23224 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23225$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023226 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023227## -------------------------------------- ##
23228## Report this to http://bugs.python.org/ ##
23229## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023230_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023231 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023232 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023233esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023234{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
23235$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023236if test "${ac_cv_header_wchar_h+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000023237 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023238else
23239 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023240fi
Antoine Pitrou20327222009-05-24 20:39:11 +000023241{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23242$as_echo "$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023243
23244fi
Antoine Pitrou20327222009-05-24 20:39:11 +000023245if test "x$ac_cv_header_wchar_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023246
23247
23248cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023249#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023250_ACEOF
23251
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023252 wchar_h="yes"
23253
Guido van Rossumef2255b2000-03-10 22:30:29 +000023254else
Martin v. Löwis11437992002-04-12 09:54:03 +000023255 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023256
23257fi
23258
Michael W. Hudson54241132001-12-07 15:38:26 +000023259
Martin v. Löwis11437992002-04-12 09:54:03 +000023260
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023261# determine wchar_t size
23262if test "$wchar_h" = yes
23263then
Antoine Pitrou20327222009-05-24 20:39:11 +000023264 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023265# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23266# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23267# This bug is HP SR number 8606223364.
Antoine Pitrou20327222009-05-24 20:39:11 +000023268{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5
23269$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023270if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000023271 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023272else
Martin v. Löwis11437992002-04-12 09:54:03 +000023273 if test "$cross_compiling" = yes; then
23274 # Depending upon the size, compute the lo and hi bounds.
23275cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023276/* confdefs.h. */
23277_ACEOF
23278cat confdefs.h >>conftest.$ac_ext
23279cat >>conftest.$ac_ext <<_ACEOF
23280/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023281#include <wchar.h>
23282
Martin v. Löwis11437992002-04-12 09:54:03 +000023283int
23284main ()
23285{
Antoine Pitrou20327222009-05-24 20:39:11 +000023286static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023287test_array [0] = 0
23288
23289 ;
23290 return 0;
23291}
23292_ACEOF
23293rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023294if { (ac_try="$ac_compile"
23295case "(($ac_try" in
23296 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23297 *) ac_try_echo=$ac_try;;
23298esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023299eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23300$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023301 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023302 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023303 grep -v '^ *+' conftest.er1 >conftest.err
23304 rm -f conftest.er1
23305 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023306 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023307 (exit $ac_status); } && {
23308 test -z "$ac_c_werror_flag" ||
23309 test ! -s conftest.err
23310 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023311 ac_lo=0 ac_mid=0
23312 while :; do
23313 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023314/* confdefs.h. */
23315_ACEOF
23316cat confdefs.h >>conftest.$ac_ext
23317cat >>conftest.$ac_ext <<_ACEOF
23318/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023319#include <wchar.h>
23320
Martin v. Löwis11437992002-04-12 09:54:03 +000023321int
23322main ()
23323{
Antoine Pitrou20327222009-05-24 20:39:11 +000023324static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023325test_array [0] = 0
23326
23327 ;
23328 return 0;
23329}
23330_ACEOF
23331rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023332if { (ac_try="$ac_compile"
23333case "(($ac_try" in
23334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23335 *) ac_try_echo=$ac_try;;
23336esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023337eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23338$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023339 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023340 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023341 grep -v '^ *+' conftest.er1 >conftest.err
23342 rm -f conftest.er1
23343 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023344 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023345 (exit $ac_status); } && {
23346 test -z "$ac_c_werror_flag" ||
23347 test ! -s conftest.err
23348 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023349 ac_hi=$ac_mid; break
23350else
Antoine Pitrou20327222009-05-24 20:39:11 +000023351 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023352sed 's/^/| /' conftest.$ac_ext >&5
23353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023354 ac_lo=`expr $ac_mid + 1`
23355 if test $ac_lo -le $ac_mid; then
23356 ac_lo= ac_hi=
23357 break
23358 fi
23359 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023360fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023361
23362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023363 done
23364else
Antoine Pitrou20327222009-05-24 20:39:11 +000023365 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023366sed 's/^/| /' conftest.$ac_ext >&5
23367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023369/* confdefs.h. */
23370_ACEOF
23371cat confdefs.h >>conftest.$ac_ext
23372cat >>conftest.$ac_ext <<_ACEOF
23373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023374#include <wchar.h>
23375
Martin v. Löwis11437992002-04-12 09:54:03 +000023376int
23377main ()
23378{
Antoine Pitrou20327222009-05-24 20:39:11 +000023379static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023380test_array [0] = 0
23381
23382 ;
23383 return 0;
23384}
23385_ACEOF
23386rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023387if { (ac_try="$ac_compile"
23388case "(($ac_try" in
23389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23390 *) ac_try_echo=$ac_try;;
23391esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023392eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23393$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023394 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023395 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023396 grep -v '^ *+' conftest.er1 >conftest.err
23397 rm -f conftest.er1
23398 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023399 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023400 (exit $ac_status); } && {
23401 test -z "$ac_c_werror_flag" ||
23402 test ! -s conftest.err
23403 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023404 ac_hi=-1 ac_mid=-1
23405 while :; do
23406 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023407/* confdefs.h. */
23408_ACEOF
23409cat confdefs.h >>conftest.$ac_ext
23410cat >>conftest.$ac_ext <<_ACEOF
23411/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023412#include <wchar.h>
23413
Martin v. Löwis11437992002-04-12 09:54:03 +000023414int
23415main ()
23416{
Antoine Pitrou20327222009-05-24 20:39:11 +000023417static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023418test_array [0] = 0
23419
23420 ;
23421 return 0;
23422}
23423_ACEOF
23424rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023425if { (ac_try="$ac_compile"
23426case "(($ac_try" in
23427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23428 *) ac_try_echo=$ac_try;;
23429esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023430eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23431$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023432 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023433 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023434 grep -v '^ *+' conftest.er1 >conftest.err
23435 rm -f conftest.er1
23436 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023437 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023438 (exit $ac_status); } && {
23439 test -z "$ac_c_werror_flag" ||
23440 test ! -s conftest.err
23441 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023442 ac_lo=$ac_mid; break
23443else
Antoine Pitrou20327222009-05-24 20:39:11 +000023444 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023445sed 's/^/| /' conftest.$ac_ext >&5
23446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023447 ac_hi=`expr '(' $ac_mid ')' - 1`
23448 if test $ac_mid -le $ac_hi; then
23449 ac_lo= ac_hi=
23450 break
23451 fi
23452 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023453fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023454
23455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023456 done
23457else
Antoine Pitrou20327222009-05-24 20:39:11 +000023458 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023459sed 's/^/| /' conftest.$ac_ext >&5
23460
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023461 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023462fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023463
23464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023466
23467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023468# Binary search between lo and hi bounds.
23469while test "x$ac_lo" != "x$ac_hi"; do
23470 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23471 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023472/* confdefs.h. */
23473_ACEOF
23474cat confdefs.h >>conftest.$ac_ext
23475cat >>conftest.$ac_ext <<_ACEOF
23476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023477#include <wchar.h>
23478
Martin v. Löwis11437992002-04-12 09:54:03 +000023479int
23480main ()
23481{
Antoine Pitrou20327222009-05-24 20:39:11 +000023482static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023483test_array [0] = 0
23484
23485 ;
23486 return 0;
23487}
23488_ACEOF
23489rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023490if { (ac_try="$ac_compile"
23491case "(($ac_try" in
23492 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23493 *) ac_try_echo=$ac_try;;
23494esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023495eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23496$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023497 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023498 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023499 grep -v '^ *+' conftest.er1 >conftest.err
23500 rm -f conftest.er1
23501 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023502 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023503 (exit $ac_status); } && {
23504 test -z "$ac_c_werror_flag" ||
23505 test ! -s conftest.err
23506 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023507 ac_hi=$ac_mid
23508else
Antoine Pitrou20327222009-05-24 20:39:11 +000023509 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023510sed 's/^/| /' conftest.$ac_ext >&5
23511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023512 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023514
23515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023516done
23517case $ac_lo in
23518?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023519'') if test "$ac_cv_type_wchar_t" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000023520 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23521$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23522{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023523See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023524$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023525See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000023526 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023527 else
23528 ac_cv_sizeof_wchar_t=0
23529 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023530esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023531else
Martin v. Löwis11437992002-04-12 09:54:03 +000023532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023533/* confdefs.h. */
23534_ACEOF
23535cat confdefs.h >>conftest.$ac_ext
23536cat >>conftest.$ac_ext <<_ACEOF
23537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023538#include <wchar.h>
23539
Antoine Pitrou20327222009-05-24 20:39:11 +000023540static long int longval () { return (long int) (sizeof (wchar_t)); }
23541static unsigned long int ulongval () { return (long int) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023542#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023543#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023544int
23545main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023546{
Martin v. Löwis11437992002-04-12 09:54:03 +000023547
23548 FILE *f = fopen ("conftest.val", "w");
23549 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023550 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000023551 if (((long int) (sizeof (wchar_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023552 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023553 long int i = longval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000023554 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023555 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000023556 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023557 }
23558 else
23559 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023560 unsigned long int i = ulongval ();
Antoine Pitrou20327222009-05-24 20:39:11 +000023561 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023562 return 1;
Antoine Pitrou20327222009-05-24 20:39:11 +000023563 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023564 }
Antoine Pitrou20327222009-05-24 20:39:11 +000023565 /* Do not output a trailing newline, as this causes \r\n confusion
23566 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023567 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023568
23569 ;
23570 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023571}
Martin v. Löwis11437992002-04-12 09:54:03 +000023572_ACEOF
23573rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023574if { (ac_try="$ac_link"
23575case "(($ac_try" in
23576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23577 *) ac_try_echo=$ac_try;;
23578esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023579eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23580$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023581 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023582 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000023583 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023584 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023585 { (case "(($ac_try" in
23586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23587 *) ac_try_echo=$ac_try;;
23588esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023589eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23590$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023591 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023592 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000023593 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023594 (exit $ac_status); }; }; then
23595 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023596else
Antoine Pitrou20327222009-05-24 20:39:11 +000023597 $as_echo "$as_me: program exited with status $ac_status" >&5
23598$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023599sed 's/^/| /' conftest.$ac_ext >&5
23600
Martin v. Löwis11437992002-04-12 09:54:03 +000023601( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023602if test "$ac_cv_type_wchar_t" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000023603 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23605{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023606See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023607$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023608See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000023609 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023610 else
23611 ac_cv_sizeof_wchar_t=0
23612 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023613fi
Antoine Pitrou20327222009-05-24 20:39:11 +000023614rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023615rm -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 +000023616fi
23617rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023618fi
Antoine Pitrou20327222009-05-24 20:39:11 +000023619{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23620$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023621
23622
23623
Martin v. Löwis11437992002-04-12 09:54:03 +000023624cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023625#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023626_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023627
Michael W. Hudson54241132001-12-07 15:38:26 +000023628
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023629fi
23630
Antoine Pitrou20327222009-05-24 20:39:11 +000023631{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23632$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023633have_ucs4_tcl=no
23634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023635/* confdefs.h. */
23636_ACEOF
23637cat confdefs.h >>conftest.$ac_ext
23638cat >>conftest.$ac_ext <<_ACEOF
23639/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023640
23641#include <tcl.h>
23642#if TCL_UTF_MAX != 6
23643# error "NOT UCS4_TCL"
23644#endif
23645int
23646main ()
23647{
23648
23649 ;
23650 return 0;
23651}
23652_ACEOF
23653rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023654if { (ac_try="$ac_compile"
23655case "(($ac_try" in
23656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23657 *) ac_try_echo=$ac_try;;
23658esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023659eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23660$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023661 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023663 grep -v '^ *+' conftest.er1 >conftest.err
23664 rm -f conftest.er1
23665 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023666 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023667 (exit $ac_status); } && {
23668 test -z "$ac_c_werror_flag" ||
23669 test ! -s conftest.err
23670 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023671
23672
23673cat >>confdefs.h <<\_ACEOF
23674#define HAVE_UCS4_TCL 1
23675_ACEOF
23676
23677 have_ucs4_tcl=yes
23678
23679else
Antoine Pitrou20327222009-05-24 20:39:11 +000023680 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023681sed 's/^/| /' conftest.$ac_ext >&5
23682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023683
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023685
23686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitrou20327222009-05-24 20:39:11 +000023687{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23688$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023689
Skip Montanaro6dead952003-09-25 14:50:04 +000023690# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023691if test "$wchar_h" = yes
23692then
23693 # check whether wchar_t is signed or not
Antoine Pitrou20327222009-05-24 20:39:11 +000023694 { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23695$as_echo_n "checking whether wchar_t is signed... " >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023696 if test "${ac_cv_wchar_t_signed+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000023697 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023698else
23699
23700 if test "$cross_compiling" = yes; then
23701 ac_cv_wchar_t_signed=yes
23702else
23703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023704/* confdefs.h. */
23705_ACEOF
23706cat confdefs.h >>conftest.$ac_ext
23707cat >>conftest.$ac_ext <<_ACEOF
23708/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023709
23710 #include <wchar.h>
23711 int main()
23712 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000023713 /* Success: exit code 0 */
23714 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023715 }
23716
23717_ACEOF
23718rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023719if { (ac_try="$ac_link"
23720case "(($ac_try" in
23721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23722 *) ac_try_echo=$ac_try;;
23723esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023724eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23725$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023726 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023727 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000023728 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023729 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023730 { (case "(($ac_try" in
23731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23732 *) ac_try_echo=$ac_try;;
23733esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023734eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23735$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023736 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023737 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000023738 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023739 (exit $ac_status); }; }; then
23740 ac_cv_wchar_t_signed=yes
23741else
Antoine Pitrou20327222009-05-24 20:39:11 +000023742 $as_echo "$as_me: program exited with status $ac_status" >&5
23743$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023744sed 's/^/| /' conftest.$ac_ext >&5
23745
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023746( exit $ac_status )
23747ac_cv_wchar_t_signed=no
23748fi
Antoine Pitrou20327222009-05-24 20:39:11 +000023749rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023750rm -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 +000023751fi
23752
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023753
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023754fi
23755
Antoine Pitrou20327222009-05-24 20:39:11 +000023756 { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23757$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023758fi
23759
Antoine Pitrou20327222009-05-24 20:39:11 +000023760{ $as_echo "$as_me:$LINENO: checking what type to use for str" >&5
23761$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000023762
23763# Check whether --with-wide-unicode was given.
23764if test "${with_wide_unicode+set}" = set; then
23765 withval=$with_wide_unicode;
23766if test "$withval" != no
23767then unicode_size="4"
23768else unicode_size="2"
23769fi
23770
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023771else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023772
Georg Brandl52d168a2008-01-07 18:10:24 +000023773case "$have_ucs4_tcl" in
23774 yes) unicode_size="4" ;;
23775 *) unicode_size="2" ;;
23776esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023777
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023778fi
23779
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023780
23781
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023782
Georg Brandl52d168a2008-01-07 18:10:24 +000023783case "$unicode_size" in
23784 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023785#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023786_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000023787 ;;
23788 *) cat >>confdefs.h <<\_ACEOF
23789#define Py_UNICODE_SIZE 2
23790_ACEOF
23791 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023792esac
23793
Michael W. Hudson54241132001-12-07 15:38:26 +000023794
Martin v. Löwis11437992002-04-12 09:54:03 +000023795
23796
Georg Brandl52d168a2008-01-07 18:10:24 +000023797# wchar_t is only usable if it maps to an unsigned type
23798if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023799 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000023800then
23801 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023802
Martin v. Löwis11437992002-04-12 09:54:03 +000023803cat >>confdefs.h <<\_ACEOF
23804#define HAVE_USABLE_WCHAR_T 1
23805_ACEOF
23806
Georg Brandl52d168a2008-01-07 18:10:24 +000023807 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023808#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023809_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023810
Georg Brandl52d168a2008-01-07 18:10:24 +000023811elif test "$ac_cv_sizeof_short" = "$unicode_size"
23812then
23813 PY_UNICODE_TYPE="unsigned short"
23814 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023815#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023816_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023817
Georg Brandl52d168a2008-01-07 18:10:24 +000023818elif test "$ac_cv_sizeof_long" = "$unicode_size"
23819then
23820 PY_UNICODE_TYPE="unsigned long"
23821 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023822#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023823_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023824
Georg Brandl52d168a2008-01-07 18:10:24 +000023825else
23826 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023827fi
Antoine Pitrou20327222009-05-24 20:39:11 +000023828{ $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23829$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023830
23831# check for endianness
Antoine Pitrou20327222009-05-24 20:39:11 +000023832
23833 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23834$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023835if test "${ac_cv_c_bigendian+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000023836 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023837else
Antoine Pitrou20327222009-05-24 20:39:11 +000023838 ac_cv_c_bigendian=unknown
23839 # See if we're dealing with a universal compiler.
23840 cat >conftest.$ac_ext <<_ACEOF
23841/* confdefs.h. */
23842_ACEOF
23843cat confdefs.h >>conftest.$ac_ext
23844cat >>conftest.$ac_ext <<_ACEOF
23845/* end confdefs.h. */
23846#ifndef __APPLE_CC__
23847 not a universal capable compiler
23848 #endif
23849 typedef int dummy;
23850
23851_ACEOF
23852rm -f conftest.$ac_objext
23853if { (ac_try="$ac_compile"
23854case "(($ac_try" in
23855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23856 *) ac_try_echo=$ac_try;;
23857esac
23858eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23859$as_echo "$ac_try_echo") >&5
23860 (eval "$ac_compile") 2>conftest.er1
23861 ac_status=$?
23862 grep -v '^ *+' conftest.er1 >conftest.err
23863 rm -f conftest.er1
23864 cat conftest.err >&5
23865 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23866 (exit $ac_status); } && {
23867 test -z "$ac_c_werror_flag" ||
23868 test ! -s conftest.err
23869 } && test -s conftest.$ac_objext; then
23870
23871 # Check for potential -arch flags. It is not universal unless
23872 # there are some -arch flags. Note that *ppc* also matches
23873 # ppc64. This check is also rather less than ideal.
23874 case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
23875 *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
23876 esac
23877else
23878 $as_echo "$as_me: failed program was:" >&5
23879sed 's/^/| /' conftest.$ac_ext >&5
23880
23881
23882fi
23883
23884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23885 if test $ac_cv_c_bigendian = unknown; then
23886 # See if sys/param.h defines the BYTE_ORDER macro.
23887 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023888/* confdefs.h. */
23889_ACEOF
23890cat confdefs.h >>conftest.$ac_ext
23891cat >>conftest.$ac_ext <<_ACEOF
23892/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023893#include <sys/types.h>
Antoine Pitrou20327222009-05-24 20:39:11 +000023894 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023895
Martin v. Löwis11437992002-04-12 09:54:03 +000023896int
23897main ()
23898{
Antoine Pitrou20327222009-05-24 20:39:11 +000023899#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23900 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23901 && LITTLE_ENDIAN)
23902 bogus endian macros
23903 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023904
23905 ;
23906 return 0;
23907}
23908_ACEOF
23909rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023910if { (ac_try="$ac_compile"
23911case "(($ac_try" in
23912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23913 *) ac_try_echo=$ac_try;;
23914esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023915eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23916$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023919 grep -v '^ *+' conftest.er1 >conftest.err
23920 rm -f conftest.er1
23921 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023922 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023923 (exit $ac_status); } && {
23924 test -z "$ac_c_werror_flag" ||
23925 test ! -s conftest.err
23926 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023927 # It does; now see whether it defined to BIG_ENDIAN or not.
Antoine Pitrou20327222009-05-24 20:39:11 +000023928 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023929/* confdefs.h. */
23930_ACEOF
23931cat confdefs.h >>conftest.$ac_ext
23932cat >>conftest.$ac_ext <<_ACEOF
23933/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023934#include <sys/types.h>
Antoine Pitrou20327222009-05-24 20:39:11 +000023935 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023936
Martin v. Löwis11437992002-04-12 09:54:03 +000023937int
23938main ()
23939{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023940#if BYTE_ORDER != BIG_ENDIAN
Antoine Pitrou20327222009-05-24 20:39:11 +000023941 not big endian
23942 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023943
23944 ;
23945 return 0;
23946}
23947_ACEOF
23948rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023949if { (ac_try="$ac_compile"
23950case "(($ac_try" in
23951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23952 *) ac_try_echo=$ac_try;;
23953esac
Antoine Pitrou20327222009-05-24 20:39:11 +000023954eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23955$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023956 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023957 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023958 grep -v '^ *+' conftest.er1 >conftest.err
23959 rm -f conftest.er1
23960 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000023961 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023962 (exit $ac_status); } && {
23963 test -z "$ac_c_werror_flag" ||
23964 test ! -s conftest.err
23965 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023966 ac_cv_c_bigendian=yes
23967else
Antoine Pitrou20327222009-05-24 20:39:11 +000023968 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023969sed 's/^/| /' conftest.$ac_ext >&5
23970
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023971 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023972fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023973
23974rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023975else
Antoine Pitrou20327222009-05-24 20:39:11 +000023976 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023977sed 's/^/| /' conftest.$ac_ext >&5
23978
Antoine Pitrou20327222009-05-24 20:39:11 +000023979
23980fi
23981
23982rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23983 fi
23984 if test $ac_cv_c_bigendian = unknown; then
23985 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23986 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023987/* confdefs.h. */
23988_ACEOF
23989cat confdefs.h >>conftest.$ac_ext
23990cat >>conftest.$ac_ext <<_ACEOF
23991/* end confdefs.h. */
Antoine Pitrou20327222009-05-24 20:39:11 +000023992#include <limits.h>
23993
Martin v. Löwis11437992002-04-12 09:54:03 +000023994int
23995main ()
23996{
Antoine Pitrou20327222009-05-24 20:39:11 +000023997#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23998 bogus endian macros
23999 #endif
24000
Martin v. Löwis11437992002-04-12 09:54:03 +000024001 ;
24002 return 0;
24003}
24004_ACEOF
24005rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024006if { (ac_try="$ac_compile"
24007case "(($ac_try" in
24008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24009 *) ac_try_echo=$ac_try;;
24010esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024011eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24012$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024014 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024015 grep -v '^ *+' conftest.er1 >conftest.err
24016 rm -f conftest.er1
24017 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000024018 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024019 (exit $ac_status); } && {
24020 test -z "$ac_c_werror_flag" ||
24021 test ! -s conftest.err
24022 } && test -s conftest.$ac_objext; then
Antoine Pitrou20327222009-05-24 20:39:11 +000024023 # It does; now see whether it defined to _BIG_ENDIAN or not.
24024 cat >conftest.$ac_ext <<_ACEOF
24025/* confdefs.h. */
24026_ACEOF
24027cat confdefs.h >>conftest.$ac_ext
24028cat >>conftest.$ac_ext <<_ACEOF
24029/* end confdefs.h. */
24030#include <limits.h>
24031
24032int
24033main ()
24034{
24035#ifndef _BIG_ENDIAN
24036 not big endian
24037 #endif
24038
24039 ;
24040 return 0;
24041}
24042_ACEOF
24043rm -f conftest.$ac_objext
24044if { (ac_try="$ac_compile"
24045case "(($ac_try" in
24046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24047 *) ac_try_echo=$ac_try;;
24048esac
24049eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24050$as_echo "$ac_try_echo") >&5
24051 (eval "$ac_compile") 2>conftest.er1
24052 ac_status=$?
24053 grep -v '^ *+' conftest.er1 >conftest.err
24054 rm -f conftest.er1
24055 cat conftest.err >&5
24056 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24057 (exit $ac_status); } && {
24058 test -z "$ac_c_werror_flag" ||
24059 test ! -s conftest.err
24060 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024061 ac_cv_c_bigendian=yes
Antoine Pitroub52ec782009-01-25 16:34:23 +000024062else
Antoine Pitrou20327222009-05-24 20:39:11 +000024063 $as_echo "$as_me: failed program was:" >&5
24064sed 's/^/| /' conftest.$ac_ext >&5
24065
24066 ac_cv_c_bigendian=no
24067fi
24068
24069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24070else
24071 $as_echo "$as_me: failed program was:" >&5
24072sed 's/^/| /' conftest.$ac_ext >&5
24073
24074
24075fi
24076
24077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24078 fi
24079 if test $ac_cv_c_bigendian = unknown; then
24080 # Compile a test program.
24081 if test "$cross_compiling" = yes; then
24082 # Try to guess by grepping values from an object file.
24083 cat >conftest.$ac_ext <<_ACEOF
24084/* confdefs.h. */
24085_ACEOF
24086cat confdefs.h >>conftest.$ac_ext
24087cat >>conftest.$ac_ext <<_ACEOF
24088/* end confdefs.h. */
24089short int ascii_mm[] =
24090 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24091 short int ascii_ii[] =
24092 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24093 int use_ascii (int i) {
24094 return ascii_mm[i] + ascii_ii[i];
24095 }
24096 short int ebcdic_ii[] =
24097 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24098 short int ebcdic_mm[] =
24099 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24100 int use_ebcdic (int i) {
24101 return ebcdic_mm[i] + ebcdic_ii[i];
24102 }
24103 extern int foo;
24104
24105int
24106main ()
24107{
24108return use_ascii (foo) == use_ebcdic (foo);
24109 ;
24110 return 0;
24111}
24112_ACEOF
24113rm -f conftest.$ac_objext
24114if { (ac_try="$ac_compile"
24115case "(($ac_try" in
24116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24117 *) ac_try_echo=$ac_try;;
24118esac
24119eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24120$as_echo "$ac_try_echo") >&5
24121 (eval "$ac_compile") 2>conftest.er1
24122 ac_status=$?
24123 grep -v '^ *+' conftest.er1 >conftest.err
24124 rm -f conftest.er1
24125 cat conftest.err >&5
24126 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24127 (exit $ac_status); } && {
24128 test -z "$ac_c_werror_flag" ||
24129 test ! -s conftest.err
24130 } && test -s conftest.$ac_objext; then
24131 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
24132 ac_cv_c_bigendian=yes
24133 fi
24134 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24135 if test "$ac_cv_c_bigendian" = unknown; then
24136 ac_cv_c_bigendian=no
24137 else
24138 # finding both strings is unlikely to happen, but who knows?
24139 ac_cv_c_bigendian=unknown
24140 fi
24141 fi
24142else
24143 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024144sed 's/^/| /' conftest.$ac_ext >&5
24145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024146
Martin v. Löwis11437992002-04-12 09:54:03 +000024147fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024148
24149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024150else
24151 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024152/* confdefs.h. */
24153_ACEOF
24154cat confdefs.h >>conftest.$ac_ext
24155cat >>conftest.$ac_ext <<_ACEOF
24156/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024157$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024158int
24159main ()
24160{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024161
Antoine Pitrou20327222009-05-24 20:39:11 +000024162 /* Are we little or big endian? From Harbison&Steele. */
24163 union
24164 {
24165 long int l;
24166 char c[sizeof (long int)];
24167 } u;
24168 u.l = 1;
24169 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024170
24171 ;
24172 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024173}
Martin v. Löwis11437992002-04-12 09:54:03 +000024174_ACEOF
24175rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024176if { (ac_try="$ac_link"
24177case "(($ac_try" in
24178 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24179 *) ac_try_echo=$ac_try;;
24180esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024181eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24182$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024183 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024184 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000024185 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024186 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024187 { (case "(($ac_try" in
24188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24189 *) ac_try_echo=$ac_try;;
24190esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024191eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24192$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024193 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024194 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000024195 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024196 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024197 ac_cv_c_bigendian=no
24198else
Antoine Pitrou20327222009-05-24 20:39:11 +000024199 $as_echo "$as_me: program exited with status $ac_status" >&5
24200$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024201sed 's/^/| /' conftest.$ac_ext >&5
24202
Martin v. Löwis11437992002-04-12 09:54:03 +000024203( exit $ac_status )
24204ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024205fi
Antoine Pitrou20327222009-05-24 20:39:11 +000024206rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024207rm -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 +000024208fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024209
24210
Antoine Pitrou20327222009-05-24 20:39:11 +000024211 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024212fi
Antoine Pitrou20327222009-05-24 20:39:11 +000024213{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24214$as_echo "$ac_cv_c_bigendian" >&6; }
24215 case $ac_cv_c_bigendian in #(
24216 yes)
24217 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisb70bcf52009-02-19 07:51:52 +000024218#define WORDS_BIGENDIAN 1
Antoine Pitroub52ec782009-01-25 16:34:23 +000024219_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000024220;; #(
24221 no)
24222 ;; #(
24223 universal)
24224
24225cat >>confdefs.h <<\_ACEOF
24226#define AC_APPLE_UNIVERSAL_BUILD 1
24227_ACEOF
24228
24229 ;; #(
24230 *)
24231 { { $as_echo "$as_me:$LINENO: error: unknown endianness
24232 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24233$as_echo "$as_me: error: unknown endianness
24234 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024235 { (exit 1); exit 1; }; } ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000024236 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024237
Michael W. Hudson54241132001-12-07 15:38:26 +000024238
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024239# Check whether right shifting a negative integer extends the sign bit
24240# or fills with zeros (like the Cray J90, according to Tim Peters).
Antoine Pitrou20327222009-05-24 20:39:11 +000024241{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24242$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024243if test "${ac_cv_rshift_extends_sign+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000024244 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024245else
Martin v. Löwis11437992002-04-12 09:54:03 +000024246
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024247if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024248 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024249else
Martin v. Löwis11437992002-04-12 09:54:03 +000024250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024251/* confdefs.h. */
24252_ACEOF
24253cat confdefs.h >>conftest.$ac_ext
24254cat >>conftest.$ac_ext <<_ACEOF
24255/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024256
24257int main()
24258{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024259 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024260}
24261
Martin v. Löwis11437992002-04-12 09:54:03 +000024262_ACEOF
24263rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024264if { (ac_try="$ac_link"
24265case "(($ac_try" in
24266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24267 *) ac_try_echo=$ac_try;;
24268esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024269eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24270$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024271 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024272 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000024273 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024274 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024275 { (case "(($ac_try" in
24276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24277 *) ac_try_echo=$ac_try;;
24278esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024279eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24280$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024281 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024282 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000024283 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024284 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024285 ac_cv_rshift_extends_sign=yes
24286else
Antoine Pitrou20327222009-05-24 20:39:11 +000024287 $as_echo "$as_me: program exited with status $ac_status" >&5
24288$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024289sed 's/^/| /' conftest.$ac_ext >&5
24290
Martin v. Löwis11437992002-04-12 09:54:03 +000024291( exit $ac_status )
24292ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024293fi
Antoine Pitrou20327222009-05-24 20:39:11 +000024294rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024295rm -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 +000024296fi
24297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024298
24299fi
24300
Antoine Pitrou20327222009-05-24 20:39:11 +000024301{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24302$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024303if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024304then
Martin v. Löwis11437992002-04-12 09:54:03 +000024305
24306cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024307#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024308_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024309
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024310fi
24311
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024312# check for getc_unlocked and related locking functions
Antoine Pitrou20327222009-05-24 20:39:11 +000024313{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24314$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024315if test "${ac_cv_have_getc_unlocked+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000024316 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024317else
Martin v. Löwis11437992002-04-12 09:54:03 +000024318
24319cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024320/* confdefs.h. */
24321_ACEOF
24322cat confdefs.h >>conftest.$ac_ext
24323cat >>conftest.$ac_ext <<_ACEOF
24324/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024325#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024326int
24327main ()
24328{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024329
24330 FILE *f = fopen("/dev/null", "r");
24331 flockfile(f);
24332 getc_unlocked(f);
24333 funlockfile(f);
24334
Martin v. Löwis11437992002-04-12 09:54:03 +000024335 ;
24336 return 0;
24337}
24338_ACEOF
24339rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024340if { (ac_try="$ac_link"
24341case "(($ac_try" in
24342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24343 *) ac_try_echo=$ac_try;;
24344esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024345eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24346$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024347 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024349 grep -v '^ *+' conftest.er1 >conftest.err
24350 rm -f conftest.er1
24351 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000024352 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024353 (exit $ac_status); } && {
24354 test -z "$ac_c_werror_flag" ||
24355 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000024356 } && test -s conftest$ac_exeext && {
24357 test "$cross_compiling" = yes ||
24358 $as_test_x conftest$ac_exeext
24359 }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024360 ac_cv_have_getc_unlocked=yes
24361else
Antoine Pitrou20327222009-05-24 20:39:11 +000024362 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024363sed 's/^/| /' conftest.$ac_ext >&5
24364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024365 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024367
Antoine Pitrou20327222009-05-24 20:39:11 +000024368rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024370 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024371fi
24372
Antoine Pitrou20327222009-05-24 20:39:11 +000024373{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24374$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024375if test "$ac_cv_have_getc_unlocked" = yes
24376then
Martin v. Löwis11437992002-04-12 09:54:03 +000024377
24378cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024379#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024380_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024381
24382fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024383
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024384# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024385# save the value of LIBS so we don't actually link Python with readline
24386LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024387
Gregory P. Smith18820942008-09-07 06:24:49 +000024388# On some systems we need to link readline to a termcap compatible
24389# library. NOTE: Keep the precedence of listed libraries synchronised
24390# with setup.py.
24391py_cv_lib_readline=no
Antoine Pitrou20327222009-05-24 20:39:11 +000024392{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5
24393$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024394for py_libtermcap in "" ncursesw ncurses curses termcap; do
24395 if test -z "$py_libtermcap"; then
24396 READLINE_LIBS="-lreadline"
24397 else
24398 READLINE_LIBS="-lreadline -l$py_libtermcap"
24399 fi
24400 LIBS="$READLINE_LIBS $LIBS_no_readline"
24401 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024402/* confdefs.h. */
24403_ACEOF
24404cat confdefs.h >>conftest.$ac_ext
24405cat >>conftest.$ac_ext <<_ACEOF
24406/* end confdefs.h. */
24407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024408/* Override any GCC internal prototype to avoid an error.
24409 Use char because int might match the return type of a GCC
24410 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024411#ifdef __cplusplus
24412extern "C"
24413#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024414char readline ();
24415int
24416main ()
24417{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024418return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024419 ;
24420 return 0;
24421}
24422_ACEOF
24423rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024424if { (ac_try="$ac_link"
24425case "(($ac_try" in
24426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24427 *) ac_try_echo=$ac_try;;
24428esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024429eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24430$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024431 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024432 ac_status=$?
24433 grep -v '^ *+' conftest.er1 >conftest.err
24434 rm -f conftest.er1
24435 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000024436 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024437 (exit $ac_status); } && {
24438 test -z "$ac_c_werror_flag" ||
24439 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000024440 } && test -s conftest$ac_exeext && {
24441 test "$cross_compiling" = yes ||
24442 $as_test_x conftest$ac_exeext
24443 }; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024444 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024445else
Antoine Pitrou20327222009-05-24 20:39:11 +000024446 $as_echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024447sed 's/^/| /' conftest.$ac_ext >&5
24448
Gregory P. Smith18820942008-09-07 06:24:49 +000024449
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024451
Antoine Pitrou20327222009-05-24 20:39:11 +000024452rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024453rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024454 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024455 if test $py_cv_lib_readline = yes; then
24456 break
24457 fi
24458done
24459# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24460#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024461if test $py_cv_lib_readline = no; then
Antoine Pitrou20327222009-05-24 20:39:11 +000024462 { $as_echo "$as_me:$LINENO: result: none" >&5
24463$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024464else
Antoine Pitrou20327222009-05-24 20:39:11 +000024465 { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24466$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024467
24468cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024469#define HAVE_LIBREADLINE 1
24470_ACEOF
24471
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024472fi
24473
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024474# check for readline 2.1
Antoine Pitrou20327222009-05-24 20:39:11 +000024475{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24476$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024477if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000024478 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024479else
24480 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024481LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024482cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024483/* confdefs.h. */
24484_ACEOF
24485cat confdefs.h >>conftest.$ac_ext
24486cat >>conftest.$ac_ext <<_ACEOF
24487/* end confdefs.h. */
24488
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024489/* Override any GCC internal prototype to avoid an error.
24490 Use char because int might match the return type of a GCC
24491 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024492#ifdef __cplusplus
24493extern "C"
24494#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024495char rl_callback_handler_install ();
24496int
24497main ()
24498{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024499return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024500 ;
24501 return 0;
24502}
24503_ACEOF
24504rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024505if { (ac_try="$ac_link"
24506case "(($ac_try" in
24507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24508 *) ac_try_echo=$ac_try;;
24509esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024510eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24511$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024512 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024514 grep -v '^ *+' conftest.er1 >conftest.err
24515 rm -f conftest.er1
24516 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000024517 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024518 (exit $ac_status); } && {
24519 test -z "$ac_c_werror_flag" ||
24520 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000024521 } && test -s conftest$ac_exeext && {
24522 test "$cross_compiling" = yes ||
24523 $as_test_x conftest$ac_exeext
24524 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024525 ac_cv_lib_readline_rl_callback_handler_install=yes
24526else
Antoine Pitrou20327222009-05-24 20:39:11 +000024527 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024528sed 's/^/| /' conftest.$ac_ext >&5
24529
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024530 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024531fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024532
Antoine Pitrou20327222009-05-24 20:39:11 +000024533rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024534rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024535 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024536LIBS=$ac_check_lib_save_LIBS
24537fi
Antoine Pitrou20327222009-05-24 20:39:11 +000024538{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24539$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24540if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024541
24542cat >>confdefs.h <<\_ACEOF
24543#define HAVE_RL_CALLBACK 1
24544_ACEOF
24545
24546fi
24547
24548
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024549# check for readline 2.2
24550cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024551/* confdefs.h. */
24552_ACEOF
24553cat confdefs.h >>conftest.$ac_ext
24554cat >>conftest.$ac_ext <<_ACEOF
24555/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024556#include <readline/readline.h>
24557_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024558if { (ac_try="$ac_cpp conftest.$ac_ext"
24559case "(($ac_try" in
24560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24561 *) ac_try_echo=$ac_try;;
24562esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024563eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24564$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024565 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024566 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024567 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024568 rm -f conftest.er1
24569 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000024570 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024571 (exit $ac_status); } >/dev/null && {
24572 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24573 test ! -s conftest.err
24574 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024575 have_readline=yes
24576else
Antoine Pitrou20327222009-05-24 20:39:11 +000024577 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024578sed 's/^/| /' conftest.$ac_ext >&5
24579
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024580 have_readline=no
24581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024582
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024583rm -f conftest.err conftest.$ac_ext
24584if test $have_readline = yes
24585then
24586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024587/* confdefs.h. */
24588_ACEOF
24589cat confdefs.h >>conftest.$ac_ext
24590cat >>conftest.$ac_ext <<_ACEOF
24591/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024592#include <readline/readline.h>
24593
24594_ACEOF
24595if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024596 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024597
24598cat >>confdefs.h <<\_ACEOF
24599#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24600_ACEOF
24601
24602fi
24603rm -f conftest*
24604
24605fi
24606
Martin v. Löwis0daad592001-09-30 21:09:59 +000024607# check for readline 4.0
Antoine Pitrou20327222009-05-24 20:39:11 +000024608{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24609$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024610if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000024611 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024612else
Martin v. Löwis11437992002-04-12 09:54:03 +000024613 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024614LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024615cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024616/* confdefs.h. */
24617_ACEOF
24618cat confdefs.h >>conftest.$ac_ext
24619cat >>conftest.$ac_ext <<_ACEOF
24620/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024622/* Override any GCC internal prototype to avoid an error.
24623 Use char because int might match the return type of a GCC
24624 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024625#ifdef __cplusplus
24626extern "C"
24627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024628char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024629int
24630main ()
24631{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024632return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024633 ;
24634 return 0;
24635}
24636_ACEOF
24637rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024638if { (ac_try="$ac_link"
24639case "(($ac_try" in
24640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24641 *) ac_try_echo=$ac_try;;
24642esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024643eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24644$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024645 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024647 grep -v '^ *+' conftest.er1 >conftest.err
24648 rm -f conftest.er1
24649 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000024650 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024651 (exit $ac_status); } && {
24652 test -z "$ac_c_werror_flag" ||
24653 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000024654 } && test -s conftest$ac_exeext && {
24655 test "$cross_compiling" = yes ||
24656 $as_test_x conftest$ac_exeext
24657 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024658 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024659else
Antoine Pitrou20327222009-05-24 20:39:11 +000024660 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024661sed 's/^/| /' conftest.$ac_ext >&5
24662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024663 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024664fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024665
Antoine Pitrou20327222009-05-24 20:39:11 +000024666rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024667rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024668 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024669LIBS=$ac_check_lib_save_LIBS
24670fi
Antoine Pitrou20327222009-05-24 20:39:11 +000024671{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24672$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24673if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024674
Martin v. Löwis11437992002-04-12 09:54:03 +000024675cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024676#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024677_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024678
Martin v. Löwis0daad592001-09-30 21:09:59 +000024679fi
24680
Michael W. Hudson54241132001-12-07 15:38:26 +000024681
Thomas Wouters89d996e2007-09-08 17:39:28 +000024682# also in 4.0
Antoine Pitrou20327222009-05-24 20:39:11 +000024683{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24684$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000024685if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000024686 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000024687else
24688 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024689LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000024690cat >conftest.$ac_ext <<_ACEOF
24691/* confdefs.h. */
24692_ACEOF
24693cat confdefs.h >>conftest.$ac_ext
24694cat >>conftest.$ac_ext <<_ACEOF
24695/* end confdefs.h. */
24696
24697/* Override any GCC internal prototype to avoid an error.
24698 Use char because int might match the return type of a GCC
24699 builtin and then its argument prototype would still apply. */
24700#ifdef __cplusplus
24701extern "C"
24702#endif
24703char rl_completion_display_matches_hook ();
24704int
24705main ()
24706{
24707return rl_completion_display_matches_hook ();
24708 ;
24709 return 0;
24710}
24711_ACEOF
24712rm -f conftest.$ac_objext conftest$ac_exeext
24713if { (ac_try="$ac_link"
24714case "(($ac_try" in
24715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24716 *) ac_try_echo=$ac_try;;
24717esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024718eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24719$as_echo "$ac_try_echo") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024720 (eval "$ac_link") 2>conftest.er1
24721 ac_status=$?
24722 grep -v '^ *+' conftest.er1 >conftest.err
24723 rm -f conftest.er1
24724 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000024725 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024726 (exit $ac_status); } && {
24727 test -z "$ac_c_werror_flag" ||
24728 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000024729 } && test -s conftest$ac_exeext && {
24730 test "$cross_compiling" = yes ||
24731 $as_test_x conftest$ac_exeext
24732 }; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024733 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24734else
Antoine Pitrou20327222009-05-24 20:39:11 +000024735 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000024736sed 's/^/| /' conftest.$ac_ext >&5
24737
24738 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24739fi
24740
Antoine Pitrou20327222009-05-24 20:39:11 +000024741rm -rf conftest.dSYM
Thomas Wouters89d996e2007-09-08 17:39:28 +000024742rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24743 conftest$ac_exeext conftest.$ac_ext
24744LIBS=$ac_check_lib_save_LIBS
24745fi
Antoine Pitrou20327222009-05-24 20:39:11 +000024746{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24747$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24748if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000024749
24750cat >>confdefs.h <<\_ACEOF
24751#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24752_ACEOF
24753
24754fi
24755
24756
Martin v. Löwis0daad592001-09-30 21:09:59 +000024757# check for readline 4.2
Antoine Pitrou20327222009-05-24 20:39:11 +000024758{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24759$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024760if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000024761 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024762else
Martin v. Löwis11437992002-04-12 09:54:03 +000024763 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024764LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024765cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024766/* confdefs.h. */
24767_ACEOF
24768cat confdefs.h >>conftest.$ac_ext
24769cat >>conftest.$ac_ext <<_ACEOF
24770/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024771
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024772/* Override any GCC internal prototype to avoid an error.
24773 Use char because int might match the return type of a GCC
24774 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024775#ifdef __cplusplus
24776extern "C"
24777#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024778char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024779int
24780main ()
24781{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024782return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024783 ;
24784 return 0;
24785}
24786_ACEOF
24787rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024788if { (ac_try="$ac_link"
24789case "(($ac_try" in
24790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24791 *) ac_try_echo=$ac_try;;
24792esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024793eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24794$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024795 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024796 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024797 grep -v '^ *+' conftest.er1 >conftest.err
24798 rm -f conftest.er1
24799 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000024800 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024801 (exit $ac_status); } && {
24802 test -z "$ac_c_werror_flag" ||
24803 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000024804 } && test -s conftest$ac_exeext && {
24805 test "$cross_compiling" = yes ||
24806 $as_test_x conftest$ac_exeext
24807 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024808 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024809else
Antoine Pitrou20327222009-05-24 20:39:11 +000024810 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024811sed 's/^/| /' conftest.$ac_ext >&5
24812
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024813 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024815
Antoine Pitrou20327222009-05-24 20:39:11 +000024816rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024817rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024818 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024819LIBS=$ac_check_lib_save_LIBS
24820fi
Antoine Pitrou20327222009-05-24 20:39:11 +000024821{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24822$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
24823if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024824
Martin v. Löwis11437992002-04-12 09:54:03 +000024825cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024826#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024827_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024828
Guido van Rossum353ae582001-07-10 16:45:32 +000024829fi
24830
Jack Jansendd19cf82001-12-06 22:36:17 +000024831
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024832# also in readline 4.2
24833cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024834/* confdefs.h. */
24835_ACEOF
24836cat confdefs.h >>conftest.$ac_ext
24837cat >>conftest.$ac_ext <<_ACEOF
24838/* end confdefs.h. */
24839#include <readline/readline.h>
24840_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024841if { (ac_try="$ac_cpp conftest.$ac_ext"
24842case "(($ac_try" in
24843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24844 *) ac_try_echo=$ac_try;;
24845esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024846eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24847$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024848 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024849 ac_status=$?
24850 grep -v '^ *+' conftest.er1 >conftest.err
24851 rm -f conftest.er1
24852 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000024853 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024854 (exit $ac_status); } >/dev/null && {
24855 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24856 test ! -s conftest.err
24857 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024858 have_readline=yes
24859else
Antoine Pitrou20327222009-05-24 20:39:11 +000024860 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024861sed 's/^/| /' conftest.$ac_ext >&5
24862
24863 have_readline=no
24864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024865
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024866rm -f conftest.err conftest.$ac_ext
24867if test $have_readline = yes
24868then
24869 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024870/* confdefs.h. */
24871_ACEOF
24872cat confdefs.h >>conftest.$ac_ext
24873cat >>conftest.$ac_ext <<_ACEOF
24874/* end confdefs.h. */
24875#include <readline/readline.h>
24876
24877_ACEOF
24878if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24879 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24880
24881cat >>confdefs.h <<\_ACEOF
24882#define HAVE_RL_CATCH_SIGNAL 1
24883_ACEOF
24884
24885fi
24886rm -f conftest*
24887
24888fi
24889
Martin v. Löwis82bca632006-02-10 20:49:30 +000024890# End of readline checks: restore LIBS
24891LIBS=$LIBS_no_readline
24892
Antoine Pitrou20327222009-05-24 20:39:11 +000024893{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5
24894$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024895if test "${ac_cv_broken_nice+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000024896 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024897else
Martin v. Löwis11437992002-04-12 09:54:03 +000024898
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024899if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024900 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024901else
Martin v. Löwis11437992002-04-12 09:54:03 +000024902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024903/* confdefs.h. */
24904_ACEOF
24905cat confdefs.h >>conftest.$ac_ext
24906cat >>conftest.$ac_ext <<_ACEOF
24907/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024908
24909int main()
24910{
24911 int val1 = nice(1);
24912 if (val1 != -1 && val1 == nice(2))
24913 exit(0);
24914 exit(1);
24915}
24916
Martin v. Löwis11437992002-04-12 09:54:03 +000024917_ACEOF
24918rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024919if { (ac_try="$ac_link"
24920case "(($ac_try" in
24921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24922 *) ac_try_echo=$ac_try;;
24923esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024924eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24925$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024926 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024927 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000024928 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024929 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024930 { (case "(($ac_try" in
24931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24932 *) ac_try_echo=$ac_try;;
24933esac
Antoine Pitrou20327222009-05-24 20:39:11 +000024934eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24935$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024936 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024937 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000024938 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024939 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024940 ac_cv_broken_nice=yes
24941else
Antoine Pitrou20327222009-05-24 20:39:11 +000024942 $as_echo "$as_me: program exited with status $ac_status" >&5
24943$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024944sed 's/^/| /' conftest.$ac_ext >&5
24945
Martin v. Löwis11437992002-04-12 09:54:03 +000024946( exit $ac_status )
24947ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024948fi
Antoine Pitrou20327222009-05-24 20:39:11 +000024949rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024950rm -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 +000024951fi
24952
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024953
24954fi
24955
Antoine Pitrou20327222009-05-24 20:39:11 +000024956{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24957$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024958if test "$ac_cv_broken_nice" = yes
24959then
Martin v. Löwis11437992002-04-12 09:54:03 +000024960
24961cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024962#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024963_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024964
24965fi
24966
Antoine Pitrou20327222009-05-24 20:39:11 +000024967{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5
24968$as_echo_n "checking for broken poll()... " >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024969if test "$cross_compiling" = yes; then
24970 ac_cv_broken_poll=no
24971else
24972 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024973/* confdefs.h. */
24974_ACEOF
24975cat confdefs.h >>conftest.$ac_ext
24976cat >>conftest.$ac_ext <<_ACEOF
24977/* end confdefs.h. */
24978
24979#include <poll.h>
24980
24981int main (void)
24982 {
24983 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24984
24985 close (42);
24986
24987 int poll_test = poll (&poll_struct, 1, 0);
24988
24989 if (poll_test < 0)
24990 {
24991 exit(0);
24992 }
24993 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24994 {
24995 exit(0);
24996 }
24997 else
24998 {
24999 exit(1);
25000 }
25001 }
25002
25003_ACEOF
25004rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025005if { (ac_try="$ac_link"
25006case "(($ac_try" in
25007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25008 *) ac_try_echo=$ac_try;;
25009esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025010eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25011$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025012 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025013 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000025014 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025015 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025016 { (case "(($ac_try" in
25017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25018 *) ac_try_echo=$ac_try;;
25019esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025020eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25021$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025022 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025023 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000025024 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025025 (exit $ac_status); }; }; then
25026 ac_cv_broken_poll=yes
25027else
Antoine Pitrou20327222009-05-24 20:39:11 +000025028 $as_echo "$as_me: program exited with status $ac_status" >&5
25029$as_echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025030sed 's/^/| /' conftest.$ac_ext >&5
25031
25032( exit $ac_status )
25033ac_cv_broken_poll=no
25034fi
Antoine Pitrou20327222009-05-24 20:39:11 +000025035rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025036rm -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 +000025037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025038
25039
Antoine Pitrou20327222009-05-24 20:39:11 +000025040{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25041$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025042if test "$ac_cv_broken_poll" = yes
25043then
25044
25045cat >>confdefs.h <<\_ACEOF
25046#define HAVE_BROKEN_POLL 1
25047_ACEOF
25048
25049fi
25050
Brett Cannon43802422005-02-10 20:48:03 +000025051# 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 +000025052# (which is not required by ISO C or UNIX spec) and/or if we support
25053# tzname[]
Antoine Pitrou20327222009-05-24 20:39:11 +000025054{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25055$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025056if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000025057 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000025058else
25059 cat >conftest.$ac_ext <<_ACEOF
25060/* confdefs.h. */
25061_ACEOF
25062cat confdefs.h >>conftest.$ac_ext
25063cat >>conftest.$ac_ext <<_ACEOF
25064/* end confdefs.h. */
25065#include <sys/types.h>
25066#include <$ac_cv_struct_tm>
25067
25068
25069int
25070main ()
25071{
25072static struct tm ac_aggr;
25073if (ac_aggr.tm_zone)
25074return 0;
25075 ;
25076 return 0;
25077}
25078_ACEOF
25079rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025080if { (ac_try="$ac_compile"
25081case "(($ac_try" in
25082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25083 *) ac_try_echo=$ac_try;;
25084esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025085eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25086$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025087 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025088 ac_status=$?
25089 grep -v '^ *+' conftest.er1 >conftest.err
25090 rm -f conftest.er1
25091 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025092 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025093 (exit $ac_status); } && {
25094 test -z "$ac_c_werror_flag" ||
25095 test ! -s conftest.err
25096 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025097 ac_cv_member_struct_tm_tm_zone=yes
25098else
Antoine Pitrou20327222009-05-24 20:39:11 +000025099 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025100sed 's/^/| /' conftest.$ac_ext >&5
25101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025102 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025103/* confdefs.h. */
25104_ACEOF
25105cat confdefs.h >>conftest.$ac_ext
25106cat >>conftest.$ac_ext <<_ACEOF
25107/* end confdefs.h. */
25108#include <sys/types.h>
25109#include <$ac_cv_struct_tm>
25110
25111
25112int
25113main ()
25114{
25115static struct tm ac_aggr;
25116if (sizeof ac_aggr.tm_zone)
25117return 0;
25118 ;
25119 return 0;
25120}
25121_ACEOF
25122rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025123if { (ac_try="$ac_compile"
25124case "(($ac_try" in
25125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25126 *) ac_try_echo=$ac_try;;
25127esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025128eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25129$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025130 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025131 ac_status=$?
25132 grep -v '^ *+' conftest.er1 >conftest.err
25133 rm -f conftest.er1
25134 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025135 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025136 (exit $ac_status); } && {
25137 test -z "$ac_c_werror_flag" ||
25138 test ! -s conftest.err
25139 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025140 ac_cv_member_struct_tm_tm_zone=yes
25141else
Antoine Pitrou20327222009-05-24 20:39:11 +000025142 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025143sed 's/^/| /' conftest.$ac_ext >&5
25144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025145 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025147
25148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025150
25151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025152fi
Antoine Pitrou20327222009-05-24 20:39:11 +000025153{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25154$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
25155if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025156
25157cat >>confdefs.h <<_ACEOF
25158#define HAVE_STRUCT_TM_TM_ZONE 1
25159_ACEOF
25160
25161
25162fi
25163
25164if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25165
25166cat >>confdefs.h <<\_ACEOF
25167#define HAVE_TM_ZONE 1
25168_ACEOF
25169
25170else
Antoine Pitrou20327222009-05-24 20:39:11 +000025171 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25172$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025173if test "${ac_cv_have_decl_tzname+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000025174 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025175else
25176 cat >conftest.$ac_ext <<_ACEOF
25177/* confdefs.h. */
25178_ACEOF
25179cat confdefs.h >>conftest.$ac_ext
25180cat >>conftest.$ac_ext <<_ACEOF
25181/* end confdefs.h. */
25182#include <time.h>
25183
25184int
25185main ()
25186{
25187#ifndef tzname
25188 (void) tzname;
25189#endif
25190
25191 ;
25192 return 0;
25193}
25194_ACEOF
25195rm -f conftest.$ac_objext
25196if { (ac_try="$ac_compile"
25197case "(($ac_try" in
25198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25199 *) ac_try_echo=$ac_try;;
25200esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025201eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25202$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025203 (eval "$ac_compile") 2>conftest.er1
25204 ac_status=$?
25205 grep -v '^ *+' conftest.er1 >conftest.err
25206 rm -f conftest.er1
25207 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025208 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025209 (exit $ac_status); } && {
25210 test -z "$ac_c_werror_flag" ||
25211 test ! -s conftest.err
25212 } && test -s conftest.$ac_objext; then
25213 ac_cv_have_decl_tzname=yes
25214else
Antoine Pitrou20327222009-05-24 20:39:11 +000025215 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025216sed 's/^/| /' conftest.$ac_ext >&5
25217
25218 ac_cv_have_decl_tzname=no
25219fi
25220
25221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25222fi
Antoine Pitrou20327222009-05-24 20:39:11 +000025223{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25224$as_echo "$ac_cv_have_decl_tzname" >&6; }
25225if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025226
25227cat >>confdefs.h <<_ACEOF
25228#define HAVE_DECL_TZNAME 1
25229_ACEOF
25230
25231
25232else
25233 cat >>confdefs.h <<_ACEOF
25234#define HAVE_DECL_TZNAME 0
25235_ACEOF
25236
25237
25238fi
25239
25240
Antoine Pitrou20327222009-05-24 20:39:11 +000025241 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
25242$as_echo_n "checking for tzname... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025243if test "${ac_cv_var_tzname+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000025244 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000025245else
25246 cat >conftest.$ac_ext <<_ACEOF
25247/* confdefs.h. */
25248_ACEOF
25249cat confdefs.h >>conftest.$ac_ext
25250cat >>conftest.$ac_ext <<_ACEOF
25251/* end confdefs.h. */
25252#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025253#if !HAVE_DECL_TZNAME
25254extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025255#endif
25256
25257int
25258main ()
25259{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025260return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025261 ;
25262 return 0;
25263}
25264_ACEOF
25265rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025266if { (ac_try="$ac_link"
25267case "(($ac_try" in
25268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25269 *) ac_try_echo=$ac_try;;
25270esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025271eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25272$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025273 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025274 ac_status=$?
25275 grep -v '^ *+' conftest.er1 >conftest.err
25276 rm -f conftest.er1
25277 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025278 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025279 (exit $ac_status); } && {
25280 test -z "$ac_c_werror_flag" ||
25281 test ! -s conftest.err
Antoine Pitrou20327222009-05-24 20:39:11 +000025282 } && test -s conftest$ac_exeext && {
25283 test "$cross_compiling" = yes ||
25284 $as_test_x conftest$ac_exeext
25285 }; then
Brett Cannon43802422005-02-10 20:48:03 +000025286 ac_cv_var_tzname=yes
25287else
Antoine Pitrou20327222009-05-24 20:39:11 +000025288 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025289sed 's/^/| /' conftest.$ac_ext >&5
25290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025291 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025293
Antoine Pitrou20327222009-05-24 20:39:11 +000025294rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025296 conftest$ac_exeext conftest.$ac_ext
25297fi
Antoine Pitrou20327222009-05-24 20:39:11 +000025298{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25299$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025300 if test $ac_cv_var_tzname = yes; then
25301
25302cat >>confdefs.h <<\_ACEOF
25303#define HAVE_TZNAME 1
25304_ACEOF
25305
25306 fi
25307fi
25308
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025309
Martin v. Löwis1d459062005-03-14 21:23:33 +000025310# check tzset(3) exists and works like we expect it to
Antoine Pitrou20327222009-05-24 20:39:11 +000025311{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5
25312$as_echo_n "checking for working tzset()... " >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025313if test "${ac_cv_working_tzset+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000025314 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025315else
25316
25317if test "$cross_compiling" = yes; then
25318 ac_cv_working_tzset=no
25319else
25320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025321/* confdefs.h. */
25322_ACEOF
25323cat confdefs.h >>conftest.$ac_ext
25324cat >>conftest.$ac_ext <<_ACEOF
25325/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025326
25327#include <stdlib.h>
25328#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025329#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025330
25331#if HAVE_TZNAME
25332extern char *tzname[];
25333#endif
25334
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025335int main()
25336{
Brett Cannon18367812003-09-19 00:59:16 +000025337 /* Note that we need to ensure that not only does tzset(3)
25338 do 'something' with localtime, but it works as documented
25339 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025340 This includes making sure that tzname is set properly if
25341 tm->tm_zone does not exist since it is the alternative way
25342 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025343
25344 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025345 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025346 */
25347
Martin v. Löwis1d459062005-03-14 21:23:33 +000025348 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025349 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25350
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025351 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025352 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025353 if (localtime(&groundhogday)->tm_hour != 0)
25354 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025355#if HAVE_TZNAME
25356 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25357 if (strcmp(tzname[0], "UTC") ||
25358 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25359 exit(1);
25360#endif
Brett Cannon18367812003-09-19 00:59:16 +000025361
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025362 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025363 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025364 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025365 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025366#if HAVE_TZNAME
25367 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25368 exit(1);
25369#endif
Brett Cannon18367812003-09-19 00:59:16 +000025370
25371 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25372 tzset();
25373 if (localtime(&groundhogday)->tm_hour != 11)
25374 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025375#if HAVE_TZNAME
25376 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25377 exit(1);
25378#endif
25379
25380#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025381 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25382 exit(1);
25383 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25384 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025385#endif
Brett Cannon18367812003-09-19 00:59:16 +000025386
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025387 exit(0);
25388}
25389
25390_ACEOF
25391rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025392if { (ac_try="$ac_link"
25393case "(($ac_try" in
25394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25395 *) ac_try_echo=$ac_try;;
25396esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025397eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25398$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025399 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025400 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000025401 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025402 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025403 { (case "(($ac_try" in
25404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25405 *) ac_try_echo=$ac_try;;
25406esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025407eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25408$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025409 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025410 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000025411 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025412 (exit $ac_status); }; }; then
25413 ac_cv_working_tzset=yes
25414else
Antoine Pitrou20327222009-05-24 20:39:11 +000025415 $as_echo "$as_me: program exited with status $ac_status" >&5
25416$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025417sed 's/^/| /' conftest.$ac_ext >&5
25418
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025419( exit $ac_status )
25420ac_cv_working_tzset=no
25421fi
Antoine Pitrou20327222009-05-24 20:39:11 +000025422rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025423rm -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 +000025424fi
25425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025426
25427fi
25428
Antoine Pitrou20327222009-05-24 20:39:11 +000025429{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25430$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025431if test "$ac_cv_working_tzset" = yes
25432then
25433
25434cat >>confdefs.h <<\_ACEOF
25435#define HAVE_WORKING_TZSET 1
25436_ACEOF
25437
25438fi
25439
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025440# Look for subsecond timestamps in struct stat
Antoine Pitrou20327222009-05-24 20:39:11 +000025441{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25442$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025443if test "${ac_cv_stat_tv_nsec+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000025444 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025445else
25446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025447/* confdefs.h. */
25448_ACEOF
25449cat confdefs.h >>conftest.$ac_ext
25450cat >>conftest.$ac_ext <<_ACEOF
25451/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025452#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025453int
25454main ()
25455{
25456
25457struct stat st;
25458st.st_mtim.tv_nsec = 1;
25459
25460 ;
25461 return 0;
25462}
25463_ACEOF
25464rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025465if { (ac_try="$ac_compile"
25466case "(($ac_try" in
25467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25468 *) ac_try_echo=$ac_try;;
25469esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025470eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25471$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025474 grep -v '^ *+' conftest.er1 >conftest.err
25475 rm -f conftest.er1
25476 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025477 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025478 (exit $ac_status); } && {
25479 test -z "$ac_c_werror_flag" ||
25480 test ! -s conftest.err
25481 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025482 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025483else
Antoine Pitrou20327222009-05-24 20:39:11 +000025484 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025485sed 's/^/| /' conftest.$ac_ext >&5
25486
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025487 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025488fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025489
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25491fi
25492
Antoine Pitrou20327222009-05-24 20:39:11 +000025493{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25494$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025495if test "$ac_cv_stat_tv_nsec" = yes
25496then
25497
25498cat >>confdefs.h <<\_ACEOF
25499#define HAVE_STAT_TV_NSEC 1
25500_ACEOF
25501
25502fi
25503
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025504# Look for BSD style subsecond timestamps in struct stat
Antoine Pitrou20327222009-05-24 20:39:11 +000025505{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25506$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025507if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000025508 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025509else
25510 cat >conftest.$ac_ext <<_ACEOF
25511/* confdefs.h. */
25512_ACEOF
25513cat confdefs.h >>conftest.$ac_ext
25514cat >>conftest.$ac_ext <<_ACEOF
25515/* end confdefs.h. */
25516#include <sys/stat.h>
25517int
25518main ()
25519{
25520
25521struct stat st;
25522st.st_mtimespec.tv_nsec = 1;
25523
25524 ;
25525 return 0;
25526}
25527_ACEOF
25528rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025529if { (ac_try="$ac_compile"
25530case "(($ac_try" in
25531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25532 *) ac_try_echo=$ac_try;;
25533esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025534eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25535$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025536 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025537 ac_status=$?
25538 grep -v '^ *+' conftest.er1 >conftest.err
25539 rm -f conftest.er1
25540 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025541 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025542 (exit $ac_status); } && {
25543 test -z "$ac_c_werror_flag" ||
25544 test ! -s conftest.err
25545 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025546 ac_cv_stat_tv_nsec2=yes
25547else
Antoine Pitrou20327222009-05-24 20:39:11 +000025548 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025549sed 's/^/| /' conftest.$ac_ext >&5
25550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025551 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025552fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25555fi
25556
Antoine Pitrou20327222009-05-24 20:39:11 +000025557{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25558$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025559if test "$ac_cv_stat_tv_nsec2" = yes
25560then
25561
25562cat >>confdefs.h <<\_ACEOF
25563#define HAVE_STAT_TV_NSEC2 1
25564_ACEOF
25565
25566fi
25567
Jack Jansen666b1e72001-10-31 12:11:48 +000025568# On HP/UX 11.0, mvwdelch is a block with a return statement
Antoine Pitrou20327222009-05-24 20:39:11 +000025569{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25570$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025571if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000025572 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025573else
Martin v. Löwis11437992002-04-12 09:54:03 +000025574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025575/* confdefs.h. */
25576_ACEOF
25577cat confdefs.h >>conftest.$ac_ext
25578cat >>conftest.$ac_ext <<_ACEOF
25579/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025580#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025581int
25582main ()
25583{
Jack Jansen666b1e72001-10-31 12:11:48 +000025584
25585 int rtn;
25586 rtn = mvwdelch(0,0,0);
25587
Martin v. Löwis11437992002-04-12 09:54:03 +000025588 ;
25589 return 0;
25590}
25591_ACEOF
25592rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025593if { (ac_try="$ac_compile"
25594case "(($ac_try" in
25595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25596 *) ac_try_echo=$ac_try;;
25597esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025598eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25599$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025600 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025601 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025602 grep -v '^ *+' conftest.er1 >conftest.err
25603 rm -f conftest.er1
25604 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025605 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025606 (exit $ac_status); } && {
25607 test -z "$ac_c_werror_flag" ||
25608 test ! -s conftest.err
25609 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025610 ac_cv_mvwdelch_is_expression=yes
25611else
Antoine Pitrou20327222009-05-24 20:39:11 +000025612 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025613sed 's/^/| /' conftest.$ac_ext >&5
25614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025615 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025616fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025617
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25619fi
25620
Antoine Pitrou20327222009-05-24 20:39:11 +000025621{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25622$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025623
25624if test "$ac_cv_mvwdelch_is_expression" = yes
25625then
Martin v. Löwis11437992002-04-12 09:54:03 +000025626
25627cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025628#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025629_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025630
25631fi
25632
Antoine Pitrou20327222009-05-24 20:39:11 +000025633{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25634$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025635if test "${ac_cv_window_has_flags+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000025636 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025637else
Martin v. Löwis11437992002-04-12 09:54:03 +000025638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025639/* confdefs.h. */
25640_ACEOF
25641cat confdefs.h >>conftest.$ac_ext
25642cat >>conftest.$ac_ext <<_ACEOF
25643/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025644#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025645int
25646main ()
25647{
Jack Jansen666b1e72001-10-31 12:11:48 +000025648
25649 WINDOW *w;
25650 w->_flags = 0;
25651
Martin v. Löwis11437992002-04-12 09:54:03 +000025652 ;
25653 return 0;
25654}
25655_ACEOF
25656rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025657if { (ac_try="$ac_compile"
25658case "(($ac_try" in
25659 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25660 *) ac_try_echo=$ac_try;;
25661esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025662eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25663$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025664 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025665 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025666 grep -v '^ *+' conftest.er1 >conftest.err
25667 rm -f conftest.er1
25668 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025669 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025670 (exit $ac_status); } && {
25671 test -z "$ac_c_werror_flag" ||
25672 test ! -s conftest.err
25673 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025674 ac_cv_window_has_flags=yes
25675else
Antoine Pitrou20327222009-05-24 20:39:11 +000025676 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025677sed 's/^/| /' conftest.$ac_ext >&5
25678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025679 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025680fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025681
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025682rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25683fi
25684
Antoine Pitrou20327222009-05-24 20:39:11 +000025685{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25686$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025687
Jack Jansen666b1e72001-10-31 12:11:48 +000025688
25689if test "$ac_cv_window_has_flags" = yes
25690then
Martin v. Löwis11437992002-04-12 09:54:03 +000025691
25692cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025693#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025694_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025695
25696fi
25697
Antoine Pitrou20327222009-05-24 20:39:11 +000025698{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5
25699$as_echo_n "checking for is_term_resized... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025700cat >conftest.$ac_ext <<_ACEOF
25701/* confdefs.h. */
25702_ACEOF
25703cat confdefs.h >>conftest.$ac_ext
25704cat >>conftest.$ac_ext <<_ACEOF
25705/* end confdefs.h. */
25706#include <curses.h>
25707int
25708main ()
25709{
25710void *x=is_term_resized
25711 ;
25712 return 0;
25713}
25714_ACEOF
25715rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025716if { (ac_try="$ac_compile"
25717case "(($ac_try" in
25718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25719 *) ac_try_echo=$ac_try;;
25720esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025721eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25722$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025723 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025724 ac_status=$?
25725 grep -v '^ *+' conftest.er1 >conftest.err
25726 rm -f conftest.er1
25727 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025728 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025729 (exit $ac_status); } && {
25730 test -z "$ac_c_werror_flag" ||
25731 test ! -s conftest.err
25732 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025733
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025734cat >>confdefs.h <<\_ACEOF
25735#define HAVE_CURSES_IS_TERM_RESIZED 1
25736_ACEOF
25737
Antoine Pitrou20327222009-05-24 20:39:11 +000025738 { $as_echo "$as_me:$LINENO: result: yes" >&5
25739$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025740else
Antoine Pitrou20327222009-05-24 20:39:11 +000025741 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025742sed 's/^/| /' conftest.$ac_ext >&5
25743
Antoine Pitrou20327222009-05-24 20:39:11 +000025744 { $as_echo "$as_me:$LINENO: result: no" >&5
25745$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025746
25747fi
25748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25750
Antoine Pitrou20327222009-05-24 20:39:11 +000025751{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5
25752$as_echo_n "checking for resize_term... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025753cat >conftest.$ac_ext <<_ACEOF
25754/* confdefs.h. */
25755_ACEOF
25756cat confdefs.h >>conftest.$ac_ext
25757cat >>conftest.$ac_ext <<_ACEOF
25758/* end confdefs.h. */
25759#include <curses.h>
25760int
25761main ()
25762{
25763void *x=resize_term
25764 ;
25765 return 0;
25766}
25767_ACEOF
25768rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025769if { (ac_try="$ac_compile"
25770case "(($ac_try" in
25771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25772 *) ac_try_echo=$ac_try;;
25773esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025774eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25775$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025776 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025777 ac_status=$?
25778 grep -v '^ *+' conftest.er1 >conftest.err
25779 rm -f conftest.er1
25780 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025781 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025782 (exit $ac_status); } && {
25783 test -z "$ac_c_werror_flag" ||
25784 test ! -s conftest.err
25785 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025786
25787cat >>confdefs.h <<\_ACEOF
25788#define HAVE_CURSES_RESIZE_TERM 1
25789_ACEOF
25790
Antoine Pitrou20327222009-05-24 20:39:11 +000025791 { $as_echo "$as_me:$LINENO: result: yes" >&5
25792$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025793else
Antoine Pitrou20327222009-05-24 20:39:11 +000025794 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025795sed 's/^/| /' conftest.$ac_ext >&5
25796
Antoine Pitrou20327222009-05-24 20:39:11 +000025797 { $as_echo "$as_me:$LINENO: result: no" >&5
25798$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025799
25800fi
25801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25803
Antoine Pitrou20327222009-05-24 20:39:11 +000025804{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5
25805$as_echo_n "checking for resizeterm... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025806cat >conftest.$ac_ext <<_ACEOF
25807/* confdefs.h. */
25808_ACEOF
25809cat confdefs.h >>conftest.$ac_ext
25810cat >>conftest.$ac_ext <<_ACEOF
25811/* end confdefs.h. */
25812#include <curses.h>
25813int
25814main ()
25815{
25816void *x=resizeterm
25817 ;
25818 return 0;
25819}
25820_ACEOF
25821rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025822if { (ac_try="$ac_compile"
25823case "(($ac_try" in
25824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25825 *) ac_try_echo=$ac_try;;
25826esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025827eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25828$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025829 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025830 ac_status=$?
25831 grep -v '^ *+' conftest.er1 >conftest.err
25832 rm -f conftest.er1
25833 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025834 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025835 (exit $ac_status); } && {
25836 test -z "$ac_c_werror_flag" ||
25837 test ! -s conftest.err
25838 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025839
25840cat >>confdefs.h <<\_ACEOF
25841#define HAVE_CURSES_RESIZETERM 1
25842_ACEOF
25843
Antoine Pitrou20327222009-05-24 20:39:11 +000025844 { $as_echo "$as_me:$LINENO: result: yes" >&5
25845$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025846else
Antoine Pitrou20327222009-05-24 20:39:11 +000025847 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025848sed 's/^/| /' conftest.$ac_ext >&5
25849
Antoine Pitrou20327222009-05-24 20:39:11 +000025850 { $as_echo "$as_me:$LINENO: result: no" >&5
25851$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000025852
25853fi
25854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25856
Antoine Pitrou20327222009-05-24 20:39:11 +000025857{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25858$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025859
25860if test -r /dev/ptmx
25861then
Antoine Pitrou20327222009-05-24 20:39:11 +000025862 { $as_echo "$as_me:$LINENO: result: yes" >&5
25863$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025864
25865cat >>confdefs.h <<\_ACEOF
25866#define HAVE_DEV_PTMX 1
25867_ACEOF
25868
Thomas Wouters89f507f2006-12-13 04:49:30 +000025869else
Antoine Pitrou20327222009-05-24 20:39:11 +000025870 { $as_echo "$as_me:$LINENO: result: no" >&5
25871$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025872fi
25873
Antoine Pitrou20327222009-05-24 20:39:11 +000025874{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25875$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025876
25877if test -r /dev/ptc
25878then
Antoine Pitrou20327222009-05-24 20:39:11 +000025879 { $as_echo "$as_me:$LINENO: result: yes" >&5
25880$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025881
25882cat >>confdefs.h <<\_ACEOF
25883#define HAVE_DEV_PTC 1
25884_ACEOF
25885
Thomas Wouters89f507f2006-12-13 04:49:30 +000025886else
Antoine Pitrou20327222009-05-24 20:39:11 +000025887 { $as_echo "$as_me:$LINENO: result: no" >&5
25888$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025889fi
25890
Antoine Pitrou20327222009-05-24 20:39:11 +000025891{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25892$as_echo_n "checking for %zd printf() format support... " >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025893if test "$cross_compiling" = yes; then
Antoine Pitrou20327222009-05-24 20:39:11 +000025894 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25895$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25896{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025897See \`config.log' for more details." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000025898$as_echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025899See \`config.log' for more details." >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +000025900 { (exit 1); exit 1; }; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025901else
25902 cat >conftest.$ac_ext <<_ACEOF
25903/* confdefs.h. */
25904_ACEOF
25905cat confdefs.h >>conftest.$ac_ext
25906cat >>conftest.$ac_ext <<_ACEOF
25907/* end confdefs.h. */
25908#include <stdio.h>
25909#include <stddef.h>
25910#include <string.h>
25911
Christian Heimes2c181612007-12-17 20:04:13 +000025912#ifdef HAVE_SYS_TYPES_H
25913#include <sys/types.h>
25914#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025915
25916#ifdef HAVE_SSIZE_T
25917typedef ssize_t Py_ssize_t;
25918#elif SIZEOF_VOID_P == SIZEOF_LONG
25919typedef long Py_ssize_t;
25920#else
25921typedef int Py_ssize_t;
25922#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025923
Christian Heimes2c181612007-12-17 20:04:13 +000025924int main()
25925{
25926 char buffer[256];
25927
Thomas Wouters477c8d52006-05-27 19:21:47 +000025928 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25929 return 1;
25930
Thomas Wouters89f507f2006-12-13 04:49:30 +000025931 if (strcmp(buffer, "123"))
25932 return 1;
25933
25934 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25935 return 1;
25936
25937 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025938 return 1;
25939
25940 return 0;
25941}
25942_ACEOF
25943rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025944if { (ac_try="$ac_link"
25945case "(($ac_try" in
25946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25947 *) ac_try_echo=$ac_try;;
25948esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025949eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25950$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025951 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025952 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000025953 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025954 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025955 { (case "(($ac_try" in
25956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25957 *) ac_try_echo=$ac_try;;
25958esac
Antoine Pitrou20327222009-05-24 20:39:11 +000025959eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25960$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025961 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025962 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000025963 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025964 (exit $ac_status); }; }; then
Antoine Pitrou20327222009-05-24 20:39:11 +000025965 { $as_echo "$as_me:$LINENO: result: yes" >&5
25966$as_echo "yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025967
25968cat >>confdefs.h <<\_ACEOF
25969#define PY_FORMAT_SIZE_T "z"
25970_ACEOF
25971
25972else
Antoine Pitrou20327222009-05-24 20:39:11 +000025973 $as_echo "$as_me: program exited with status $ac_status" >&5
25974$as_echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025975sed 's/^/| /' conftest.$ac_ext >&5
25976
25977( exit $ac_status )
Antoine Pitrou20327222009-05-24 20:39:11 +000025978{ $as_echo "$as_me:$LINENO: result: no" >&5
25979$as_echo "no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025980fi
Antoine Pitrou20327222009-05-24 20:39:11 +000025981rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025982rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Wouters477c8d52006-05-27 19:21:47 +000025983fi
25984
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025985
25986
Antoine Pitrou20327222009-05-24 20:39:11 +000025987{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
25988$as_echo_n "checking for socklen_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025989if test "${ac_cv_type_socklen_t+set}" = set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000025990 $as_echo_n "(cached) " >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025991else
Antoine Pitrou20327222009-05-24 20:39:11 +000025992 ac_cv_type_socklen_t=no
25993cat >conftest.$ac_ext <<_ACEOF
25994/* confdefs.h. */
25995_ACEOF
25996cat confdefs.h >>conftest.$ac_ext
25997cat >>conftest.$ac_ext <<_ACEOF
25998/* end confdefs.h. */
25999
26000#ifdef HAVE_SYS_TYPES_H
26001#include <sys/types.h>
26002#endif
26003#ifdef HAVE_SYS_SOCKET_H
26004#include <sys/socket.h>
26005#endif
26006
26007
26008int
26009main ()
26010{
26011if (sizeof (socklen_t))
26012 return 0;
26013 ;
26014 return 0;
26015}
26016_ACEOF
26017rm -f conftest.$ac_objext
26018if { (ac_try="$ac_compile"
26019case "(($ac_try" in
26020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26021 *) ac_try_echo=$ac_try;;
26022esac
26023eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26024$as_echo "$ac_try_echo") >&5
26025 (eval "$ac_compile") 2>conftest.er1
26026 ac_status=$?
26027 grep -v '^ *+' conftest.er1 >conftest.err
26028 rm -f conftest.er1
26029 cat conftest.err >&5
26030 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26031 (exit $ac_status); } && {
26032 test -z "$ac_c_werror_flag" ||
26033 test ! -s conftest.err
26034 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026036/* confdefs.h. */
26037_ACEOF
26038cat confdefs.h >>conftest.$ac_ext
26039cat >>conftest.$ac_ext <<_ACEOF
26040/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026041
26042#ifdef HAVE_SYS_TYPES_H
26043#include <sys/types.h>
26044#endif
26045#ifdef HAVE_SYS_SOCKET_H
26046#include <sys/socket.h>
26047#endif
26048
26049
Martin v. Löwis11437992002-04-12 09:54:03 +000026050int
26051main ()
26052{
Antoine Pitrou20327222009-05-24 20:39:11 +000026053if (sizeof ((socklen_t)))
26054 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026055 ;
26056 return 0;
26057}
26058_ACEOF
26059rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026060if { (ac_try="$ac_compile"
26061case "(($ac_try" in
26062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26063 *) ac_try_echo=$ac_try;;
26064esac
Antoine Pitrou20327222009-05-24 20:39:11 +000026065eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26066$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026067 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026069 grep -v '^ *+' conftest.er1 >conftest.err
26070 rm -f conftest.er1
26071 cat conftest.err >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000026072 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026073 (exit $ac_status); } && {
26074 test -z "$ac_c_werror_flag" ||
26075 test ! -s conftest.err
26076 } && test -s conftest.$ac_objext; then
Antoine Pitrou20327222009-05-24 20:39:11 +000026077 :
Guido van Rossum95713eb2000-05-18 20:53:31 +000026078else
Antoine Pitrou20327222009-05-24 20:39:11 +000026079 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026080sed 's/^/| /' conftest.$ac_ext >&5
26081
Antoine Pitrou20327222009-05-24 20:39:11 +000026082 ac_cv_type_socklen_t=yes
26083fi
26084
26085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26086else
26087 $as_echo "$as_me: failed program was:" >&5
26088sed 's/^/| /' conftest.$ac_ext >&5
26089
26090
Guido van Rossum95713eb2000-05-18 20:53:31 +000026091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026092
26093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026094fi
Antoine Pitrou20327222009-05-24 20:39:11 +000026095{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26096$as_echo "$ac_cv_type_socklen_t" >&6; }
26097if test "x$ac_cv_type_socklen_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026098 :
26099else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026100
Martin v. Löwis01c04012002-11-11 14:58:44 +000026101cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026102#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026103_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026104
26105fi
26106
Michael W. Hudson54241132001-12-07 15:38:26 +000026107
Antoine Pitrou20327222009-05-24 20:39:11 +000026108{ $as_echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26109$as_echo_n "checking for broken mbstowcs... " >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026110if test "$cross_compiling" = yes; then
26111 ac_cv_broken_mbstowcs=no
26112else
26113 cat >conftest.$ac_ext <<_ACEOF
26114/* confdefs.h. */
26115_ACEOF
26116cat confdefs.h >>conftest.$ac_ext
26117cat >>conftest.$ac_ext <<_ACEOF
26118/* end confdefs.h. */
26119
26120#include<stdlib.h>
26121int main() {
26122 size_t len = -1;
26123 const char *str = "text";
26124 len = mbstowcs(NULL, str, 0);
26125 return (len != 4);
26126}
26127
26128_ACEOF
26129rm -f conftest$ac_exeext
26130if { (ac_try="$ac_link"
26131case "(($ac_try" in
26132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26133 *) ac_try_echo=$ac_try;;
26134esac
Antoine Pitrou20327222009-05-24 20:39:11 +000026135eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26136$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026137 (eval "$ac_link") 2>&5
26138 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000026139 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026140 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26141 { (case "(($ac_try" in
26142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26143 *) ac_try_echo=$ac_try;;
26144esac
Antoine Pitrou20327222009-05-24 20:39:11 +000026145eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26146$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026147 (eval "$ac_try") 2>&5
26148 ac_status=$?
Antoine Pitrou20327222009-05-24 20:39:11 +000026149 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026150 (exit $ac_status); }; }; then
26151 ac_cv_broken_mbstowcs=no
26152else
Antoine Pitrou20327222009-05-24 20:39:11 +000026153 $as_echo "$as_me: program exited with status $ac_status" >&5
26154$as_echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026155sed 's/^/| /' conftest.$ac_ext >&5
26156
26157( exit $ac_status )
26158ac_cv_broken_mbstowcs=yes
26159fi
Antoine Pitrou20327222009-05-24 20:39:11 +000026160rm -rf conftest.dSYM
Antoine Pitroufff95302008-09-03 18:58:51 +000026161rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26162fi
26163
26164
Antoine Pitrou20327222009-05-24 20:39:11 +000026165{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26166$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026167if test "$ac_cv_broken_mbstowcs" = yes
26168then
26169
26170cat >>confdefs.h <<\_ACEOF
26171#define HAVE_BROKEN_MBSTOWCS 1
26172_ACEOF
26173
26174fi
26175
Antoine Pitroub52ec782009-01-25 16:34:23 +000026176# Check for --with-computed-gotos
Antoine Pitrou20327222009-05-24 20:39:11 +000026177{ $as_echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26178$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026179
26180# Check whether --with-computed-gotos was given.
26181if test "${with_computed_gotos+set}" = set; then
26182 withval=$with_computed_gotos;
26183if test "$withval" != no
26184then
26185
26186cat >>confdefs.h <<\_ACEOF
26187#define USE_COMPUTED_GOTOS 1
26188_ACEOF
26189
Antoine Pitrou20327222009-05-24 20:39:11 +000026190 { $as_echo "$as_me:$LINENO: result: yes" >&5
26191$as_echo "yes" >&6; }
26192else { $as_echo "$as_me:$LINENO: result: no" >&5
26193$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026194fi
26195else
Antoine Pitrou20327222009-05-24 20:39:11 +000026196 { $as_echo "$as_me:$LINENO: result: no" >&5
26197$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026198fi
26199
26200
26201
Michael W. Hudson54241132001-12-07 15:38:26 +000026202
26203
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026204for h in `(cd $srcdir;echo Python/thread_*.h)`
26205do
26206 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26207done
26208
Michael W. Hudson54241132001-12-07 15:38:26 +000026209
Neal Norwitzd24499d2005-12-18 21:36:39 +000026210SRCDIRS="Parser Grammar Objects Python Modules Mac"
Antoine Pitrou20327222009-05-24 20:39:11 +000026211{ $as_echo "$as_me:$LINENO: checking for build directories" >&5
26212$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026213for dir in $SRCDIRS; do
26214 if test ! -d $dir; then
26215 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026216 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026217done
Antoine Pitrou20327222009-05-24 20:39:11 +000026218{ $as_echo "$as_me:$LINENO: result: done" >&5
26219$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026220
Guido van Rossum627b2d71993-12-24 10:39:16 +000026221# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026222ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026223
Martin v. Löwis11437992002-04-12 09:54:03 +000026224cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026225# This file is a shell script that caches the results of configure
26226# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026227# scripts and configure runs, see configure's option --config-cache.
26228# It is not useful on other systems. If it contains results you don't
26229# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026230#
Martin v. Löwis11437992002-04-12 09:54:03 +000026231# config.status only pays attention to the cache file if you give it
26232# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026233#
Skip Montanaro6dead952003-09-25 14:50:04 +000026234# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026235# loading this file, other *unset* `ac_cv_foo' will be assigned the
26236# following values.
26237
26238_ACEOF
26239
Guido van Rossumf78abae1997-01-21 22:02:36 +000026240# The following way of writing the cache mishandles newlines in values,
26241# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026242# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026243# Ultrix sh set writes to stderr and can't be redirected directly,
26244# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026245(
26246 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26247 eval ac_val=\$$ac_var
26248 case $ac_val in #(
26249 *${as_nl}*)
26250 case $ac_var in #(
Antoine Pitrou20327222009-05-24 20:39:11 +000026251 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
26252$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026253 esac
26254 case $ac_var in #(
26255 _ | IFS | as_nl) ;; #(
Antoine Pitrou20327222009-05-24 20:39:11 +000026256 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026257 *) $as_unset $ac_var ;;
26258 esac ;;
26259 esac
26260 done
26261
Martin v. Löwis11437992002-04-12 09:54:03 +000026262 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026263 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26264 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026265 # `set' does not quote correctly, so add quotes (double-quote
26266 # substitution turns \\\\ into \\, and sed turns \\ into \).
26267 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026268 "s/'/'\\\\''/g;
26269 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026270 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026271 *)
26272 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026273 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026274 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026275 esac |
26276 sort
26277) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026278 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026279 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026280 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026281 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026282 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26283 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026284 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26285 :end' >>confcache
26286if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26287 if test -w "$cache_file"; then
26288 test "x$cache_file" != "x/dev/null" &&
Antoine Pitrou20327222009-05-24 20:39:11 +000026289 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
26290$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026291 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026292 else
Antoine Pitrou20327222009-05-24 20:39:11 +000026293 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26294$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026295 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026296fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026297rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026298
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026299test "x$prefix" = xNONE && prefix=$ac_default_prefix
26300# Let make expand exec_prefix.
26301test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026302
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026303DEFS=-DHAVE_CONFIG_H
26304
Skip Montanaro6dead952003-09-25 14:50:04 +000026305ac_libobjs=
26306ac_ltlibobjs=
26307for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26308 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026309 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Antoine Pitrou20327222009-05-24 20:39:11 +000026310 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026311 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26312 # will be set to the directory where LIBOBJS objects are built.
26313 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26314 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026315done
26316LIBOBJS=$ac_libobjs
26317
26318LTLIBOBJS=$ac_ltlibobjs
26319
26320
Martin v. Löwis11437992002-04-12 09:54:03 +000026321
Antoine Pitrou20327222009-05-24 20:39:11 +000026322
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026323: ${CONFIG_STATUS=./config.status}
Antoine Pitrou20327222009-05-24 20:39:11 +000026324ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000026325ac_clean_files_save=$ac_clean_files
26326ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Antoine Pitrou20327222009-05-24 20:39:11 +000026327{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26328$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
26329cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026330#! $SHELL
26331# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026332# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026333# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026334# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026335
Martin v. Löwis11437992002-04-12 09:54:03 +000026336debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026337ac_cs_recheck=false
26338ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026339SHELL=\${CONFIG_SHELL-$SHELL}
26340_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026341
Antoine Pitrou20327222009-05-24 20:39:11 +000026342cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026343## --------------------- ##
26344## M4sh Initialization. ##
26345## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026347# Be more Bourne compatible
26348DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026349if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26350 emulate sh
26351 NULLCMD=:
Antoine Pitrou20327222009-05-24 20:39:11 +000026352 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026353 # is contrary to our usage. Disable this feature.
26354 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026355 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026356else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026357 case `(set -o) 2>/dev/null` in
26358 *posix*) set -o posix ;;
26359esac
26360
Michael W. Hudson54241132001-12-07 15:38:26 +000026361fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026362
26363
Michael W. Hudson54241132001-12-07 15:38:26 +000026364
Michael W. Hudson54241132001-12-07 15:38:26 +000026365
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026366# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026367# Avoid depending upon Character Ranges.
26368as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26369as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26370as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26371as_cr_digits='0123456789'
26372as_cr_alnum=$as_cr_Letters$as_cr_digits
26373
Antoine Pitrou20327222009-05-24 20:39:11 +000026374as_nl='
26375'
26376export as_nl
26377# Printing a long string crashes Solaris 7 /usr/bin/printf.
26378as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26379as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26380as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26381if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26382 as_echo='printf %s\n'
26383 as_echo_n='printf %s'
26384else
26385 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26386 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26387 as_echo_n='/usr/ucb/echo -n'
26388 else
26389 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26390 as_echo_n_body='eval
26391 arg=$1;
26392 case $arg in
26393 *"$as_nl"*)
26394 expr "X$arg" : "X\\(.*\\)$as_nl";
26395 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26396 esac;
26397 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26398 '
26399 export as_echo_n_body
26400 as_echo_n='sh -c $as_echo_n_body as_echo'
26401 fi
26402 export as_echo_body
26403 as_echo='sh -c $as_echo_body as_echo'
26404fi
26405
Martin v. Löwis11437992002-04-12 09:54:03 +000026406# The user is always right.
26407if test "${PATH_SEPARATOR+set}" != set; then
Antoine Pitrou20327222009-05-24 20:39:11 +000026408 PATH_SEPARATOR=:
26409 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26410 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26411 PATH_SEPARATOR=';'
26412 }
Martin v. Löwis11437992002-04-12 09:54:03 +000026413fi
26414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026415# Support unset when possible.
26416if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26417 as_unset=unset
26418else
26419 as_unset=false
26420fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026421
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026422
26423# IFS
26424# We need space, tab and new line, in precisely that order. Quoting is
26425# there to prevent editors from complaining about space-tab.
26426# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26427# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026428IFS=" "" $as_nl"
26429
26430# Find who we are. Look in the path if we contain no directory separator.
26431case $0 in
26432 *[\\/]* ) as_myself=$0 ;;
26433 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026434for as_dir in $PATH
26435do
26436 IFS=$as_save_IFS
26437 test -z "$as_dir" && as_dir=.
26438 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26439done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026440IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026441
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026442 ;;
26443esac
26444# We did not find ourselves, most probably we were run as `sh COMMAND'
26445# in which case we are not to be found in the path.
26446if test "x$as_myself" = x; then
26447 as_myself=$0
26448fi
26449if test ! -f "$as_myself"; then
Antoine Pitrou20327222009-05-24 20:39:11 +000026450 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026451 { (exit 1); exit 1; }
26452fi
26453
26454# Work around bugs in pre-3.0 UWIN ksh.
26455for as_var in ENV MAIL MAILPATH
26456do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26457done
26458PS1='$ '
26459PS2='> '
26460PS4='+ '
26461
26462# NLS nuisances.
Antoine Pitrou20327222009-05-24 20:39:11 +000026463LC_ALL=C
26464export LC_ALL
26465LANGUAGE=C
26466export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026467
26468# Required to use basename.
26469if expr a : '\(a\)' >/dev/null 2>&1 &&
26470 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26471 as_expr=expr
26472else
26473 as_expr=false
26474fi
26475
26476if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26477 as_basename=basename
26478else
26479 as_basename=false
26480fi
26481
26482
26483# Name of the executable.
26484as_me=`$as_basename -- "$0" ||
26485$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26486 X"$0" : 'X\(//\)$' \| \
26487 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Antoine Pitrou20327222009-05-24 20:39:11 +000026488$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026489 sed '/^.*\/\([^/][^/]*\)\/*$/{
26490 s//\1/
26491 q
26492 }
26493 /^X\/\(\/\/\)$/{
26494 s//\1/
26495 q
26496 }
26497 /^X\/\(\/\).*/{
26498 s//\1/
26499 q
26500 }
26501 s/.*/./; q'`
26502
26503# CDPATH.
26504$as_unset CDPATH
26505
26506
26507
Martin v. Löwis11437992002-04-12 09:54:03 +000026508 as_lineno_1=$LINENO
26509 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026510 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026511 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026512
Martin v. Löwis11437992002-04-12 09:54:03 +000026513 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26514 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026515 # line-number line after each line using $LINENO; the second 'sed'
26516 # does the real work. The second script uses 'N' to pair each
26517 # line-number line with the line containing $LINENO, and appends
26518 # trailing '-' during substitution so that $LINENO is not a special
26519 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026520 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026521 # scripts with optimization help from Paolo Bonzini. Blame Lee
26522 # E. McMahon (1931-1989) for sed's syntax. :-)
26523 sed -n '
26524 p
26525 /[$]LINENO/=
26526 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026527 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026528 s/[$]LINENO.*/&-/
26529 t lineno
26530 b
26531 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026532 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026533 :loop
26534 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026535 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026536 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026537 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026538 chmod +x "$as_me.lineno" ||
Antoine Pitrou20327222009-05-24 20:39:11 +000026539 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026540 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026541
Martin v. Löwis11437992002-04-12 09:54:03 +000026542 # Don't try to exec as it changes $[0], causing all sort of problems
26543 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026544 # original and so on. Autoconf is especially sensitive to this).
26545 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026546 # Exit status is that of the last command.
26547 exit
26548}
26549
26550
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026551if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26552 as_dirname=dirname
26553else
26554 as_dirname=false
26555fi
26556
26557ECHO_C= ECHO_N= ECHO_T=
26558case `echo -n x` in
26559-n*)
26560 case `echo 'x\c'` in
26561 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26562 *) ECHO_C='\c';;
26563 esac;;
26564*)
26565 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026566esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026567if expr a : '\(a\)' >/dev/null 2>&1 &&
26568 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026569 as_expr=expr
26570else
26571 as_expr=false
26572fi
26573
26574rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026575if test -d conf$$.dir; then
26576 rm -f conf$$.dir/conf$$.file
26577else
26578 rm -f conf$$.dir
Antoine Pitrou20327222009-05-24 20:39:11 +000026579 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026580fi
Antoine Pitrou20327222009-05-24 20:39:11 +000026581if (echo >conf$$.file) 2>/dev/null; then
26582 if ln -s conf$$.file conf$$ 2>/dev/null; then
26583 as_ln_s='ln -s'
26584 # ... but there are two gotchas:
26585 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26586 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26587 # In both cases, we have to default to `cp -p'.
26588 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26589 as_ln_s='cp -p'
26590 elif ln conf$$.file conf$$ 2>/dev/null; then
26591 as_ln_s=ln
26592 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026593 as_ln_s='cp -p'
Antoine Pitrou20327222009-05-24 20:39:11 +000026594 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026595else
26596 as_ln_s='cp -p'
26597fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026598rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26599rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026600
Skip Montanaro6dead952003-09-25 14:50:04 +000026601if mkdir -p . 2>/dev/null; then
26602 as_mkdir_p=:
26603else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026604 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026605 as_mkdir_p=false
26606fi
26607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026608if test -x / >/dev/null 2>&1; then
26609 as_test_x='test -x'
26610else
26611 if ls -dL / >/dev/null 2>&1; then
26612 as_ls_L_option=L
26613 else
26614 as_ls_L_option=
26615 fi
26616 as_test_x='
26617 eval sh -c '\''
26618 if test -d "$1"; then
Antoine Pitrou20327222009-05-24 20:39:11 +000026619 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026620 else
26621 case $1 in
Antoine Pitrou20327222009-05-24 20:39:11 +000026622 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026623 esac;
26624 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26625 ???[sx]*):;;*)false;;esac;fi
26626 '\'' sh
26627 '
26628fi
26629as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026630
26631# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026632as_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 +000026633
26634# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026635as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026636
26637
Martin v. Löwis11437992002-04-12 09:54:03 +000026638exec 6>&1
26639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026640# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026641# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026642# values after options handling.
26643ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000026644This file was extended by python $as_me 3.1, which was
Antoine Pitrou20327222009-05-24 20:39:11 +000026645generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026646
26647 CONFIG_FILES = $CONFIG_FILES
26648 CONFIG_HEADERS = $CONFIG_HEADERS
26649 CONFIG_LINKS = $CONFIG_LINKS
26650 CONFIG_COMMANDS = $CONFIG_COMMANDS
26651 $ $0 $@
26652
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026653on `(hostname || uname -n) 2>/dev/null | sed 1q`
26654"
26655
Martin v. Löwis11437992002-04-12 09:54:03 +000026656_ACEOF
26657
Antoine Pitrou20327222009-05-24 20:39:11 +000026658case $ac_config_files in *"
26659"*) set x $ac_config_files; shift; ac_config_files=$*;;
26660esac
26661
26662case $ac_config_headers in *"
26663"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26664esac
26665
26666
26667cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026668# Files that config.status was made for.
Antoine Pitrou20327222009-05-24 20:39:11 +000026669config_files="`echo $ac_config_files`"
26670config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000026671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026672_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026673
Antoine Pitrou20327222009-05-24 20:39:11 +000026674cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026675ac_cs_usage="\
26676\`$as_me' instantiates files from templates according to the
26677current configuration.
26678
Antoine Pitrou20327222009-05-24 20:39:11 +000026679Usage: $0 [OPTION]... [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026680
26681 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026682 -V, --version print version number and configuration settings, then exit
Antoine Pitrou20327222009-05-24 20:39:11 +000026683 -q, --quiet, --silent
26684 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026685 -d, --debug don't remove temporary files
26686 --recheck update $as_me by reconfiguring in the same conditions
Antoine Pitrou20327222009-05-24 20:39:11 +000026687 --file=FILE[:TEMPLATE]
26688 instantiate the configuration file FILE
26689 --header=FILE[:TEMPLATE]
26690 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026691
26692Configuration files:
26693$config_files
26694
26695Configuration headers:
26696$config_headers
26697
26698Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026699
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026700_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000026701cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026702ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000026703python config.status 3.1
Antoine Pitrou20327222009-05-24 20:39:11 +000026704configured by $0, generated by GNU Autoconf 2.63,
26705 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026706
Antoine Pitrou20327222009-05-24 20:39:11 +000026707Copyright (C) 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026708This config.status script is free software; the Free Software Foundation
26709gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026710
26711ac_pwd='$ac_pwd'
26712srcdir='$srcdir'
26713INSTALL='$INSTALL'
Antoine Pitrou20327222009-05-24 20:39:11 +000026714test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000026715_ACEOF
26716
Antoine Pitrou20327222009-05-24 20:39:11 +000026717cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26718# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000026719ac_need_defaults=:
26720while test $# != 0
26721do
26722 case $1 in
26723 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026724 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26725 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026726 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026727 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026728 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026729 ac_option=$1
26730 ac_optarg=$2
26731 ac_shift=shift
26732 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026733 esac
26734
Skip Montanaro6dead952003-09-25 14:50:04 +000026735 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026736 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026737 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26738 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026739 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Antoine Pitrou20327222009-05-24 20:39:11 +000026740 $as_echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026741 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026742 debug=: ;;
26743 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026744 $ac_shift
Antoine Pitrou20327222009-05-24 20:39:11 +000026745 case $ac_optarg in
26746 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26747 esac
26748 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026749 ac_need_defaults=false;;
26750 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026751 $ac_shift
Antoine Pitrou20327222009-05-24 20:39:11 +000026752 case $ac_optarg in
26753 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26754 esac
26755 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026756 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026757 --he | --h)
26758 # Conflict between --help and --header
Antoine Pitrou20327222009-05-24 20:39:11 +000026759 { $as_echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026760Try \`$0 --help' for more information." >&2
26761 { (exit 1); exit 1; }; };;
26762 --help | --hel | -h )
Antoine Pitrou20327222009-05-24 20:39:11 +000026763 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026764 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26765 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26766 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026767
26768 # This is an error.
Antoine Pitrou20327222009-05-24 20:39:11 +000026769 -*) { $as_echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026770Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026771 { (exit 1); exit 1; }; } ;;
26772
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026773 *) ac_config_targets="$ac_config_targets $1"
26774 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026775
26776 esac
26777 shift
26778done
26779
Skip Montanaro6dead952003-09-25 14:50:04 +000026780ac_configure_extra_args=
26781
26782if $ac_cs_silent; then
26783 exec 6>/dev/null
26784 ac_configure_extra_args="$ac_configure_extra_args --silent"
26785fi
26786
26787_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000026788cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000026789if \$ac_cs_recheck; then
Antoine Pitrou20327222009-05-24 20:39:11 +000026790 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26791 shift
26792 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
26793 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026794 export CONFIG_SHELL
Antoine Pitrou20327222009-05-24 20:39:11 +000026795 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000026796fi
26797
Martin v. Löwis11437992002-04-12 09:54:03 +000026798_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000026799cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026800exec 5>>config.log
26801{
26802 echo
26803 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26804## Running $as_me. ##
26805_ASBOX
Antoine Pitrou20327222009-05-24 20:39:11 +000026806 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026807} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026809_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000026810cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026811_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026812
Antoine Pitrou20327222009-05-24 20:39:11 +000026813cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026814
26815# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026816for ac_config_target in $ac_config_targets
26817do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026818 case $ac_config_target in
26819 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26820 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26821 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000026822 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26823 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026824 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26825 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000026826 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026827
Antoine Pitrou20327222009-05-24 20:39:11 +000026828 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26829$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026830 { (exit 1); exit 1; }; };;
26831 esac
26832done
26833
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026834
Martin v. Löwis11437992002-04-12 09:54:03 +000026835# If the user did not use the arguments to specify the items to instantiate,
26836# then the envvar interface is used. Set only those that are not.
26837# We use the long form for the default assignment because of an extremely
26838# bizarre bug on SunOS 4.1.3.
26839if $ac_need_defaults; then
26840 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26841 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26842fi
26843
Skip Montanaro6dead952003-09-25 14:50:04 +000026844# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026845# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026846# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026847# Hook for its removal unless debugging.
26848# Note that there is a small window in which the directory will not be cleaned:
26849# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026850$debug ||
26851{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026852 tmp=
26853 trap 'exit_status=$?
26854 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26855' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026856 trap '{ (exit 1); exit 1; }' 1 2 13 15
26857}
Martin v. Löwis11437992002-04-12 09:54:03 +000026858# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026859
Martin v. Löwis11437992002-04-12 09:54:03 +000026860{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026861 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026862 test -n "$tmp" && test -d "$tmp"
26863} ||
26864{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026865 tmp=./conf$$-$RANDOM
26866 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026867} ||
26868{
Antoine Pitrou20327222009-05-24 20:39:11 +000026869 $as_echo "$as_me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026870 { (exit 1); exit 1; }
26871}
26872
Antoine Pitrou20327222009-05-24 20:39:11 +000026873# Set up the scripts for CONFIG_FILES section.
26874# No need to generate them if there are no CONFIG_FILES.
26875# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026876if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026877
Antoine Pitrou20327222009-05-24 20:39:11 +000026878
26879ac_cr='
26880'
26881ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26882if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
26883 ac_cs_awk_cr='\\r'
26884else
26885 ac_cs_awk_cr=$ac_cr
26886fi
26887
26888echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026889_ACEOF
26890
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026891
Antoine Pitrou20327222009-05-24 20:39:11 +000026892{
26893 echo "cat >conf$$subs.awk <<_ACEOF" &&
26894 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26895 echo "_ACEOF"
26896} >conf$$subs.sh ||
26897 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26898$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26899 { (exit 1); exit 1; }; }
26900ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026901ac_delim='%!_!# '
26902for ac_last_try in false false false false false :; do
Antoine Pitrou20327222009-05-24 20:39:11 +000026903 . ./conf$$subs.sh ||
26904 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26905$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26906 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026907
Antoine Pitrou20327222009-05-24 20:39:11 +000026908 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26909 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026910 break
26911 elif $ac_last_try; then
Antoine Pitrou20327222009-05-24 20:39:11 +000026912 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26913$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026914 { (exit 1); exit 1; }; }
26915 else
26916 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026917 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026918done
Antoine Pitrou20327222009-05-24 20:39:11 +000026919rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026920
Antoine Pitrou20327222009-05-24 20:39:11 +000026921cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26922cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026923_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000026924sed -n '
26925h
26926s/^/S["/; s/!.*/"]=/
26927p
26928g
26929s/^[^!]*!//
26930:repl
26931t repl
26932s/'"$ac_delim"'$//
26933t delim
26934:nl
26935h
26936s/\(.\{148\}\).*/\1/
26937t more1
26938s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26939p
26940n
26941b repl
26942:more1
26943s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26944p
26945g
26946s/.\{148\}//
26947t nl
26948:delim
26949h
26950s/\(.\{148\}\).*/\1/
26951t more2
26952s/["\\]/\\&/g; s/^/"/; s/$/"/
26953p
26954b
26955:more2
26956s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26957p
26958g
26959s/.\{148\}//
26960t delim
26961' <conf$$subs.awk | sed '
26962/^[^""]/{
26963 N
26964 s/\n//
26965}
26966' >>$CONFIG_STATUS || ac_write_fail=1
26967rm -f conf$$subs.awk
26968cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26969_ACAWK
26970cat >>"\$tmp/subs1.awk" <<_ACAWK &&
26971 for (key in S) S_is_set[key] = 1
26972 FS = ""
26973
26974}
26975{
26976 line = $ 0
26977 nfields = split(line, field, "@")
26978 substed = 0
26979 len = length(field[1])
26980 for (i = 2; i < nfields; i++) {
26981 key = field[i]
26982 keylen = length(key)
26983 if (S_is_set[key]) {
26984 value = S[key]
26985 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26986 len += length(value) + length(field[++i])
26987 substed = 1
26988 } else
26989 len += 1 + keylen
26990 }
26991
26992 print line
26993}
26994
26995_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026996_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000026997cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26998if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26999 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27000else
27001 cat
27002fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
27003 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
27004$as_echo "$as_me: error: could not setup config files machinery" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027005 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027006_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027007
27008# VPATH may cause trouble with some makes, so we remove $(srcdir),
27009# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27010# trailing colons and then remove the whole line if VPATH becomes empty
27011# (actually we leave an empty line to preserve line numbers).
27012if test "x$srcdir" = x.; then
27013 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27014s/:*\$(srcdir):*/:/
27015s/:*\${srcdir}:*/:/
27016s/:*@srcdir@:*/:/
27017s/^\([^=]*=[ ]*\):*/\1/
27018s/:*$//
27019s/^[^=]*=[ ]*$//
27020}'
27021fi
27022
Antoine Pitrou20327222009-05-24 20:39:11 +000027023cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027024fi # test -n "$CONFIG_FILES"
27025
Antoine Pitrou20327222009-05-24 20:39:11 +000027026# Set up the scripts for CONFIG_HEADERS section.
27027# No need to generate them if there are no CONFIG_HEADERS.
27028# This happens for instance with `./config.status Makefile'.
27029if test -n "$CONFIG_HEADERS"; then
27030cat >"$tmp/defines.awk" <<\_ACAWK ||
27031BEGIN {
27032_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027033
Antoine Pitrou20327222009-05-24 20:39:11 +000027034# Transform confdefs.h into an awk script `defines.awk', embedded as
27035# here-document in config.status, that substitutes the proper values into
27036# config.h.in to produce config.h.
27037
27038# Create a delimiter string that does not exist in confdefs.h, to ease
27039# handling of long lines.
27040ac_delim='%!_!# '
27041for ac_last_try in false false :; do
27042 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
27043 if test -z "$ac_t"; then
27044 break
27045 elif $ac_last_try; then
27046 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
27047$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
27048 { (exit 1); exit 1; }; }
27049 else
27050 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27051 fi
27052done
27053
27054# For the awk script, D is an array of macro values keyed by name,
27055# likewise P contains macro parameters if any. Preserve backslash
27056# newline sequences.
27057
27058ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27059sed -n '
27060s/.\{148\}/&'"$ac_delim"'/g
27061t rset
27062:rset
27063s/^[ ]*#[ ]*define[ ][ ]*/ /
27064t def
27065d
27066:def
27067s/\\$//
27068t bsnl
27069s/["\\]/\\&/g
27070s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27071D["\1"]=" \3"/p
27072s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
27073d
27074:bsnl
27075s/["\\]/\\&/g
27076s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27077D["\1"]=" \3\\\\\\n"\\/p
27078t cont
27079s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27080t cont
27081d
27082:cont
27083n
27084s/.\{148\}/&'"$ac_delim"'/g
27085t clear
27086:clear
27087s/\\$//
27088t bsnlc
27089s/["\\]/\\&/g; s/^/"/; s/$/"/p
27090d
27091:bsnlc
27092s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27093b cont
27094' <confdefs.h | sed '
27095s/'"$ac_delim"'/"\\\
27096"/g' >>$CONFIG_STATUS || ac_write_fail=1
27097
27098cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27099 for (key in D) D_is_set[key] = 1
27100 FS = ""
27101}
27102/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27103 line = \$ 0
27104 split(line, arg, " ")
27105 if (arg[1] == "#") {
27106 defundef = arg[2]
27107 mac1 = arg[3]
27108 } else {
27109 defundef = substr(arg[1], 2)
27110 mac1 = arg[2]
27111 }
27112 split(mac1, mac2, "(") #)
27113 macro = mac2[1]
27114 prefix = substr(line, 1, index(line, defundef) - 1)
27115 if (D_is_set[macro]) {
27116 # Preserve the white space surrounding the "#".
27117 print prefix "define", macro P[macro] D[macro]
27118 next
27119 } else {
27120 # Replace #undef with comments. This is necessary, for example,
27121 # in the case of _POSIX_SOURCE, which is predefined and required
27122 # on some systems where configure will not decide to define it.
27123 if (defundef == "undef") {
27124 print "/*", prefix defundef, macro, "*/"
27125 next
27126 }
27127 }
27128}
27129{ print }
27130_ACAWK
27131_ACEOF
27132cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27133 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
27134$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
27135 { (exit 1); exit 1; }; }
27136fi # test -n "$CONFIG_HEADERS"
27137
27138
27139eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
27140shift
27141for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027142do
27143 case $ac_tag in
27144 :[FHLC]) ac_mode=$ac_tag; continue;;
27145 esac
27146 case $ac_mode$ac_tag in
27147 :[FHL]*:*);;
Antoine Pitrou20327222009-05-24 20:39:11 +000027148 :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
27149$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027150 { (exit 1); exit 1; }; };;
27151 :[FH]-) ac_tag=-:-;;
27152 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27153 esac
27154 ac_save_IFS=$IFS
27155 IFS=:
27156 set x $ac_tag
27157 IFS=$ac_save_IFS
27158 shift
27159 ac_file=$1
27160 shift
27161
27162 case $ac_mode in
27163 :L) ac_source=$1;;
27164 :[FH])
27165 ac_file_inputs=
27166 for ac_f
27167 do
27168 case $ac_f in
27169 -) ac_f="$tmp/stdin";;
27170 *) # Look for the file first in the build tree, then in the source tree
27171 # (if the path is not absolute). The absolute path cannot be DOS-style,
27172 # because $ac_f cannot contain `:'.
27173 test -f "$ac_f" ||
27174 case $ac_f in
27175 [\\/$]*) false;;
27176 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27177 esac ||
Antoine Pitrou20327222009-05-24 20:39:11 +000027178 { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27179$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027180 { (exit 1); exit 1; }; };;
27181 esac
Antoine Pitrou20327222009-05-24 20:39:11 +000027182 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27183 ac_file_inputs="$ac_file_inputs '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027184 done
27185
27186 # Let's still pretend it is `configure' which instantiates (i.e., don't
27187 # use $as_me), people would be surprised to read:
27188 # /* config.h. Generated by config.status. */
Antoine Pitrou20327222009-05-24 20:39:11 +000027189 configure_input='Generated from '`
27190 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27191 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027192 if test x"$ac_file" != x-; then
27193 configure_input="$ac_file. $configure_input"
Antoine Pitrou20327222009-05-24 20:39:11 +000027194 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
27195$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027196 fi
Antoine Pitrou20327222009-05-24 20:39:11 +000027197 # Neutralize special characters interpreted by sed in replacement strings.
27198 case $configure_input in #(
27199 *\&* | *\|* | *\\* )
27200 ac_sed_conf_input=`$as_echo "$configure_input" |
27201 sed 's/[\\\\&|]/\\\\&/g'`;; #(
27202 *) ac_sed_conf_input=$configure_input;;
27203 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027204
27205 case $ac_tag in
Antoine Pitrou20327222009-05-24 20:39:11 +000027206 *:-:* | *:-) cat >"$tmp/stdin" \
27207 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27208$as_echo "$as_me: error: could not create $ac_file" >&2;}
27209 { (exit 1); exit 1; }; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027210 esac
27211 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027212 esac
27213
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027214 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027215$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027216 X"$ac_file" : 'X\(//\)[^/]' \| \
27217 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027218 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Antoine Pitrou20327222009-05-24 20:39:11 +000027219$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027220 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27221 s//\1/
27222 q
27223 }
27224 /^X\(\/\/\)[^/].*/{
27225 s//\1/
27226 q
27227 }
27228 /^X\(\/\/\)$/{
27229 s//\1/
27230 q
27231 }
27232 /^X\(\/\).*/{
27233 s//\1/
27234 q
27235 }
27236 s/.*/./; q'`
27237 { as_dir="$ac_dir"
27238 case $as_dir in #(
27239 -*) as_dir=./$as_dir;;
27240 esac
27241 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027242 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027243 while :; do
27244 case $as_dir in #(
Antoine Pitrou20327222009-05-24 20:39:11 +000027245 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027246 *) as_qdir=$as_dir;;
27247 esac
27248 as_dirs="'$as_qdir' $as_dirs"
27249 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027250$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027251 X"$as_dir" : 'X\(//\)[^/]' \| \
27252 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027253 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Antoine Pitrou20327222009-05-24 20:39:11 +000027254$as_echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027255 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27256 s//\1/
27257 q
27258 }
27259 /^X\(\/\/\)[^/].*/{
27260 s//\1/
27261 q
27262 }
27263 /^X\(\/\/\)$/{
27264 s//\1/
27265 q
27266 }
27267 /^X\(\/\).*/{
27268 s//\1/
27269 q
27270 }
27271 s/.*/./; q'`
27272 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027273 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027274 test -z "$as_dirs" || eval "mkdir $as_dirs"
Antoine Pitrou20327222009-05-24 20:39:11 +000027275 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27276$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027277 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027278 ac_builddir=.
27279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027280case "$ac_dir" in
27281.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27282*)
Antoine Pitrou20327222009-05-24 20:39:11 +000027283 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027284 # A ".." for each directory in $ac_dir_suffix.
Antoine Pitrou20327222009-05-24 20:39:11 +000027285 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027286 case $ac_top_builddir_sub in
27287 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27288 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27289 esac ;;
27290esac
27291ac_abs_top_builddir=$ac_pwd
27292ac_abs_builddir=$ac_pwd$ac_dir_suffix
27293# for backward compatibility:
27294ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027295
27296case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027297 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027298 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027299 ac_top_srcdir=$ac_top_builddir_sub
27300 ac_abs_top_srcdir=$ac_pwd ;;
27301 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027302 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027303 ac_top_srcdir=$srcdir
27304 ac_abs_top_srcdir=$srcdir ;;
27305 *) # Relative name.
27306 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27307 ac_top_srcdir=$ac_top_build_prefix$srcdir
27308 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027309esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027310ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027311
Martin v. Löwis11437992002-04-12 09:54:03 +000027312
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027313 case $ac_mode in
27314 :F)
27315 #
27316 # CONFIG_FILE
27317 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027318
27319 case $INSTALL in
27320 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027321 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027322 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027323_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027324
Antoine Pitrou20327222009-05-24 20:39:11 +000027325cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027326# If the template does not know about datarootdir, expand it.
27327# FIXME: This hack should be removed a few years after 2.60.
27328ac_datarootdir_hack=; ac_datarootdir_seen=
27329
Antoine Pitrou20327222009-05-24 20:39:11 +000027330ac_sed_dataroot='
27331/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027332 p
27333 q
27334}
27335/@datadir@/p
27336/@docdir@/p
27337/@infodir@/p
27338/@localedir@/p
27339/@mandir@/p
Antoine Pitrou20327222009-05-24 20:39:11 +000027340'
27341case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027342*datarootdir*) ac_datarootdir_seen=yes;;
27343*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Antoine Pitrou20327222009-05-24 20:39:11 +000027344 { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27345$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027346_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000027347cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027348 ac_datarootdir_hack='
27349 s&@datadir@&$datadir&g
27350 s&@docdir@&$docdir&g
27351 s&@infodir@&$infodir&g
27352 s&@localedir@&$localedir&g
27353 s&@mandir@&$mandir&g
27354 s&\\\${datarootdir}&$datarootdir&g' ;;
27355esac
27356_ACEOF
27357
27358# Neutralize VPATH when `$srcdir' = `.'.
27359# Shell code in configure.ac might set extrasub.
27360# FIXME: do we really want to maintain this feature?
Antoine Pitrou20327222009-05-24 20:39:11 +000027361cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27362ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027363$extrasub
27364_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +000027365cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027366:t
27367/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Antoine Pitrou20327222009-05-24 20:39:11 +000027368s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027369s&@top_builddir@&$ac_top_builddir_sub&;t t
Antoine Pitrou20327222009-05-24 20:39:11 +000027370s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027371s&@srcdir@&$ac_srcdir&;t t
27372s&@abs_srcdir@&$ac_abs_srcdir&;t t
27373s&@top_srcdir@&$ac_top_srcdir&;t t
27374s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27375s&@builddir@&$ac_builddir&;t t
27376s&@abs_builddir@&$ac_abs_builddir&;t t
27377s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27378s&@INSTALL@&$ac_INSTALL&;t t
27379$ac_datarootdir_hack
Antoine Pitrou20327222009-05-24 20:39:11 +000027380"
27381eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
27382 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27383$as_echo "$as_me: error: could not create $ac_file" >&2;}
27384 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027385
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027386test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27387 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27388 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Antoine Pitrou20327222009-05-24 20:39:11 +000027389 { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027390which seems to be undefined. Please make sure it is defined." >&5
Antoine Pitrou20327222009-05-24 20:39:11 +000027391$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027392which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027394 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027395 case $ac_file in
Antoine Pitrou20327222009-05-24 20:39:11 +000027396 -) cat "$tmp/out" && rm -f "$tmp/out";;
27397 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
27398 esac \
27399 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27400$as_echo "$as_me: error: could not create $ac_file" >&2;}
27401 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027402 ;;
27403 :H)
27404 #
27405 # CONFIG_HEADER
27406 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027407 if test x"$ac_file" != x-; then
Antoine Pitrou20327222009-05-24 20:39:11 +000027408 {
27409 $as_echo "/* $configure_input */" \
27410 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
27411 } >"$tmp/config.h" \
27412 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27413$as_echo "$as_me: error: could not create $ac_file" >&2;}
27414 { (exit 1); exit 1; }; }
27415 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
27416 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27417$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027418 else
Antoine Pitrou20327222009-05-24 20:39:11 +000027419 rm -f "$ac_file"
27420 mv "$tmp/config.h" "$ac_file" \
27421 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27422$as_echo "$as_me: error: could not create $ac_file" >&2;}
27423 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027424 fi
27425 else
Antoine Pitrou20327222009-05-24 20:39:11 +000027426 $as_echo "/* $configure_input */" \
27427 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
27428 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
27429$as_echo "$as_me: error: could not create -" >&2;}
27430 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027431 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027432 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027434
27435 esac
27436
27437done # for ac_tag
27438
Guido van Rossum627b2d71993-12-24 10:39:16 +000027439
Martin v. Löwis11437992002-04-12 09:54:03 +000027440{ (exit 0); exit 0; }
27441_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027442chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027443ac_clean_files=$ac_clean_files_save
27444
Antoine Pitrou20327222009-05-24 20:39:11 +000027445test $ac_write_fail = 0 ||
27446 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
27447$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
27448 { (exit 1); exit 1; }; }
27449
Martin v. Löwis11437992002-04-12 09:54:03 +000027450
27451# configure is writing to config.log, and then calls config.status.
27452# config.status does its own redirection, appending to config.log.
27453# Unfortunately, on DOS this fails, as config.log is still kept open
27454# by configure, so config.status won't be able to write to it; its
27455# output is simply discarded. So we exec the FD to /dev/null,
27456# effectively closing config.log, so it can be properly (re)opened and
27457# appended to by config.status. When coming back to configure, we
27458# need to make the FD available again.
27459if test "$no_create" != yes; then
27460 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027461 ac_config_status_args=
27462 test "$silent" = yes &&
27463 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027464 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027465 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027466 exec 5>>config.log
27467 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27468 # would make configure fail if this is the last instruction.
27469 $ac_cs_success || { (exit 1); exit 1; }
27470fi
Antoine Pitrou20327222009-05-24 20:39:11 +000027471if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27472 { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27473$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
27474fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027475
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027476
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027477echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027478if test ! -f Modules/Setup
27479then
27480 cp $srcdir/Modules/Setup.dist Modules/Setup
27481fi
27482
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027483echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027484if test ! -f Modules/Setup.local
27485then
27486 echo "# Edit this file for local setup changes" >Modules/Setup.local
27487fi
27488
27489echo "creating Makefile"
27490$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27491 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027492 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027493mv config.c Modules