blob: fc843daac0a1c396e2e57469942e45d701b495a0 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Antoine Pitroub52ec782009-01-25 16:34:23 +00002# From configure.in Revision: 68440 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Antoine Pitroub52ec782009-01-25 16:34:23 +00004# Generated by GNU Autoconf 2.63 for python 3.1.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Antoine Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +0000517 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518fi
Antoine Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +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 Pitroub52ec782009-01-25 16:34:23 +0000557 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000558 else
559 case $1 in
Antoine Pitroub52ec782009-01-25 16:34:23 +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'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000602PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
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 Pitroub52ec782009-01-25 16:34:23 +0000641ac_subst_vars='LTLIBOBJS
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000642SRCDIRS
Antoine Pitroub52ec782009-01-25 16:34:23 +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
678AR
679RANLIB
680LINKCC
681RUNSHARED
682INSTSONAME
683LDLIBRARYDIR
684BLDLIBRARY
685DLLLIBRARY
686LDLIBRARY
687LIBRARY
688BUILDEXEEXT
689EGREP
690GREP
691CPP
692MAINCC
693CXX
694OBJEXT
695EXEEXT
696ac_ct_CC
697CPPFLAGS
698LDFLAGS
699CFLAGS
700CC
701EXPORT_MACOSX_DEPLOYMENT_TARGET
702CONFIGURE_MACOSX_DEPLOYMENT_TARGET
703SGI_ABI
704MACHDEP
705FRAMEWORKUNIXTOOLSPREFIX
706FRAMEWORKALTINSTALLLAST
707FRAMEWORKALTINSTALLFIRST
708FRAMEWORKINSTALLLAST
709FRAMEWORKINSTALLFIRST
710PYTHONFRAMEWORKINSTALLDIR
711PYTHONFRAMEWORKPREFIX
712PYTHONFRAMEWORKDIR
713PYTHONFRAMEWORKIDENTIFIER
714PYTHONFRAMEWORK
715ARCH_RUN_32BIT
716UNIVERSALSDK
717CONFIG_ARGS
718SOVERSION
719VERSION
720target_alias
721host_alias
722build_alias
723LIBS
724ECHO_T
725ECHO_N
726ECHO_C
727DEFS
728mandir
729localedir
730libdir
731psdir
732pdfdir
733dvidir
734htmldir
735infodir
736docdir
737oldincludedir
738includedir
739localstatedir
740sharedstatedir
741sysconfdir
742datadir
743datarootdir
744libexecdir
745sbindir
746bindir
747program_transform_name
748prefix
749exec_prefix
750PACKAGE_BUGREPORT
751PACKAGE_STRING
752PACKAGE_VERSION
753PACKAGE_TARNAME
754PACKAGE_NAME
755PATH_SEPARATOR
756SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000757ac_subst_files=''
Antoine Pitroub52ec782009-01-25 16:34:23 +0000758ac_user_opts='
759enable_option_checking
760enable_universalsdk
761with_universal_archs
762with_framework_name
763enable_framework
764with_gcc
765with_cxx_main
766with_suffix
767enable_shared
768enable_profiling
769with_pydebug
770with_libs
771with_system_ffi
772with_signal_module
773with_dec_threads
774with_threads
775with_thread
776with_pth
777enable_ipv6
778with_doc_strings
779with_tsc
780with_pymalloc
781with_wctype_functions
782with_fpectl
783with_libm
784with_libc
785with_wide_unicode
786with_computed_gotos
787'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000788 ac_precious_vars='build_alias
789host_alias
790target_alias
791CC
792CFLAGS
793LDFLAGS
794LIBS
795CPPFLAGS
796CPP'
797
Guido van Rossum627b2d71993-12-24 10:39:16 +0000798
Guido van Rossum7f43da71994-08-01 12:15:30 +0000799# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000800ac_init_help=
801ac_init_version=false
Antoine Pitroub52ec782009-01-25 16:34:23 +0000802ac_unrecognized_opts=
803ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804# The variables have the same names as the options, with
805# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000806cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000807exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000809no_recursion=
810prefix=NONE
811program_prefix=NONE
812program_suffix=NONE
813program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000816srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000817verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000818x_includes=NONE
819x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000820
821# Installation directory options.
822# These are left unexpanded so users can "make install exec_prefix=/foo"
823# and all the variables that are supposed to be based on exec_prefix
824# by default will actually change.
825# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000826# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000827bindir='${exec_prefix}/bin'
828sbindir='${exec_prefix}/sbin'
829libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830datarootdir='${prefix}/share'
831datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000832sysconfdir='${prefix}/etc'
833sharedstatedir='${prefix}/com'
834localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000835includedir='${prefix}/include'
836oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000837docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
838infodir='${datarootdir}/info'
839htmldir='${docdir}'
840dvidir='${docdir}'
841pdfdir='${docdir}'
842psdir='${docdir}'
843libdir='${exec_prefix}/lib'
844localedir='${datarootdir}/locale'
845mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000846
Guido van Rossum7f43da71994-08-01 12:15:30 +0000847ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000848ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000849for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000850do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851 # If the previous option needs an argument, assign it.
852 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000853 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854 ac_prev=
855 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000858 case $ac_option in
859 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
860 *) ac_optarg=yes ;;
861 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000863 # Accept the important Cygnus configure options, so we can diagnose typos.
864
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000865 case $ac_dashdash$ac_option in
866 --)
867 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000869 -bindir | --bindir | --bindi | --bind | --bin | --bi)
870 ac_prev=bindir ;;
871 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000872 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000873
874 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000875 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000876 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000878
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000879 -cache-file | --cache-file | --cache-fil | --cache-fi \
880 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
881 ac_prev=cache_file ;;
882 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
883 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000884 cache_file=$ac_optarg ;;
885
886 --config-cache | -C)
887 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000888
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000889 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000890 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000891 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000892 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000893
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000894 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
895 | --dataroo | --dataro | --datar)
896 ac_prev=datarootdir ;;
897 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
898 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
899 datarootdir=$ac_optarg ;;
900
Guido van Rossum7f43da71994-08-01 12:15:30 +0000901 -disable-* | --disable-*)
Antoine Pitroub52ec782009-01-25 16:34:23 +0000902 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000903 # Reject names that are not valid shell variable names.
Antoine Pitroub52ec782009-01-25 16:34:23 +0000904 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
905 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000906 { (exit 1); exit 1; }; }
Antoine Pitroub52ec782009-01-25 16:34:23 +0000907 ac_useropt_orig=$ac_useropt
908 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
909 case $ac_user_opts in
910 *"
911"enable_$ac_useropt"
912"*) ;;
913 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
914 ac_unrecognized_sep=', ';;
915 esac
916 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000917
918 -docdir | --docdir | --docdi | --doc | --do)
919 ac_prev=docdir ;;
920 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
921 docdir=$ac_optarg ;;
922
923 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
924 ac_prev=dvidir ;;
925 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
926 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000927
928 -enable-* | --enable-*)
Antoine Pitroub52ec782009-01-25 16:34:23 +0000929 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000930 # Reject names that are not valid shell variable names.
Antoine Pitroub52ec782009-01-25 16:34:23 +0000931 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
932 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000933 { (exit 1); exit 1; }; }
Antoine Pitroub52ec782009-01-25 16:34:23 +0000934 ac_useropt_orig=$ac_useropt
935 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
936 case $ac_user_opts in
937 *"
938"enable_$ac_useropt"
939"*) ;;
940 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
941 ac_unrecognized_sep=', ';;
942 esac
943 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000944
Guido van Rossum7f43da71994-08-01 12:15:30 +0000945 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
946 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
947 | --exec | --exe | --ex)
948 ac_prev=exec_prefix ;;
949 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
950 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
951 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000952 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000953
954 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000955 # Obsolete; use --with-gas.
956 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 -help | --help | --hel | --he | -h)
959 ac_init_help=long ;;
960 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
961 ac_init_help=recursive ;;
962 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
963 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000964
965 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000966 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000967 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000968 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000970 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
971 ac_prev=htmldir ;;
972 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
973 | --ht=*)
974 htmldir=$ac_optarg ;;
975
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000976 -includedir | --includedir | --includedi | --included | --include \
977 | --includ | --inclu | --incl | --inc)
978 ac_prev=includedir ;;
979 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
980 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000981 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982
983 -infodir | --infodir | --infodi | --infod | --info | --inf)
984 ac_prev=infodir ;;
985 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -libdir | --libdir | --libdi | --libd)
989 ac_prev=libdir ;;
990 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
993 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
994 | --libexe | --libex | --libe)
995 ac_prev=libexecdir ;;
996 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
997 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000998 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000999
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001000 -localedir | --localedir | --localedi | --localed | --locale)
1001 ac_prev=localedir ;;
1002 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1003 localedir=$ac_optarg ;;
1004
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001007 ac_prev=localstatedir ;;
1008 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001009 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001010 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011
1012 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1013 ac_prev=mandir ;;
1014 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
Guido van Rossum7f43da71994-08-01 12:15:30 +00001017 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001018 # Obsolete; use --without-fp.
1019 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001020
1021 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001022 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 no_create=yes ;;
1024
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001025 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1026 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1027 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001029 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1030 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1031 | --oldin | --oldi | --old | --ol | --o)
1032 ac_prev=oldincludedir ;;
1033 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1034 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1035 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001036 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001037
Guido van Rossum7f43da71994-08-01 12:15:30 +00001038 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1039 ac_prev=prefix ;;
1040 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042
1043 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1044 | --program-pre | --program-pr | --program-p)
1045 ac_prev=program_prefix ;;
1046 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1047 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001048 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001049
1050 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1051 | --program-suf | --program-su | --program-s)
1052 ac_prev=program_suffix ;;
1053 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1054 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001055 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001056
1057 -program-transform-name | --program-transform-name \
1058 | --program-transform-nam | --program-transform-na \
1059 | --program-transform-n | --program-transform- \
1060 | --program-transform | --program-transfor \
1061 | --program-transfo | --program-transf \
1062 | --program-trans | --program-tran \
1063 | --progr-tra | --program-tr | --program-t)
1064 ac_prev=program_transform_name ;;
1065 -program-transform-name=* | --program-transform-name=* \
1066 | --program-transform-nam=* | --program-transform-na=* \
1067 | --program-transform-n=* | --program-transform-=* \
1068 | --program-transform=* | --program-transfor=* \
1069 | --program-transfo=* | --program-transf=* \
1070 | --program-trans=* | --program-tran=* \
1071 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001072 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001074 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1075 ac_prev=pdfdir ;;
1076 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1077 pdfdir=$ac_optarg ;;
1078
1079 -psdir | --psdir | --psdi | --psd | --ps)
1080 ac_prev=psdir ;;
1081 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1082 psdir=$ac_optarg ;;
1083
Guido van Rossum7f43da71994-08-01 12:15:30 +00001084 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1085 | -silent | --silent | --silen | --sile | --sil)
1086 silent=yes ;;
1087
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001088 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1089 ac_prev=sbindir ;;
1090 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1091 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001092 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093
1094 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1095 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1096 | --sharedst | --shareds | --shared | --share | --shar \
1097 | --sha | --sh)
1098 ac_prev=sharedstatedir ;;
1099 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1100 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1101 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1102 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001103 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001104
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001105 -site | --site | --sit)
1106 ac_prev=site ;;
1107 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001109
Guido van Rossum7f43da71994-08-01 12:15:30 +00001110 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1111 ac_prev=srcdir ;;
1112 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001115 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1116 | --syscon | --sysco | --sysc | --sys | --sy)
1117 ac_prev=sysconfdir ;;
1118 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1119 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001120 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001121
Guido van Rossum7f43da71994-08-01 12:15:30 +00001122 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001123 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001124 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126
1127 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1128 verbose=yes ;;
1129
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 -version | --version | --versio | --versi | --vers | -V)
1131 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -with-* | --with-*)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001134 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001135 # Reject names that are not valid shell variable names.
Antoine Pitroub52ec782009-01-25 16:34:23 +00001136 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1137 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001138 { (exit 1); exit 1; }; }
Antoine Pitroub52ec782009-01-25 16:34:23 +00001139 ac_useropt_orig=$ac_useropt
1140 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1141 case $ac_user_opts in
1142 *"
1143"with_$ac_useropt"
1144"*) ;;
1145 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1146 ac_unrecognized_sep=', ';;
1147 esac
1148 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001149
1150 -without-* | --without-*)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001151 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001152 # Reject names that are not valid shell variable names.
Antoine Pitroub52ec782009-01-25 16:34:23 +00001153 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1154 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001155 { (exit 1); exit 1; }; }
Antoine Pitroub52ec782009-01-25 16:34:23 +00001156 ac_useropt_orig=$ac_useropt
1157 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1158 case $ac_user_opts in
1159 *"
1160"with_$ac_useropt"
1161"*) ;;
1162 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1163 ac_unrecognized_sep=', ';;
1164 esac
1165 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001166
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001167 --x)
1168 # Obsolete; use --with-x.
1169 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
1171 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1172 | --x-incl | --x-inc | --x-in | --x-i)
1173 ac_prev=x_includes ;;
1174 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1175 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001176 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001177
1178 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1179 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1180 ac_prev=x_libraries ;;
1181 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1182 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001183 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001184
Antoine Pitroub52ec782009-01-25 16:34:23 +00001185 -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001186Try \`$0 --help' for more information." >&2
1187 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188 ;;
1189
Martin v. Löwis11437992002-04-12 09:54:03 +00001190 *=*)
1191 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1192 # Reject names that are not valid shell variable names.
1193 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Antoine Pitroub52ec782009-01-25 16:34:23 +00001194 { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001196 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001197 export $ac_envvar ;;
1198
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001199 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 # FIXME: should be removed in autoconf 3.0.
Antoine Pitroub52ec782009-01-25 16:34:23 +00001201 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Antoine Pitroub52ec782009-01-25 16:34:23 +00001203 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001205 ;;
1206
1207 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001208done
1209
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001211 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Antoine Pitroub52ec782009-01-25 16:34:23 +00001212 { $as_echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001213 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214fi
1215
Antoine Pitroub52ec782009-01-25 16:34:23 +00001216if test -n "$ac_unrecognized_opts"; then
1217 case $enable_option_checking in
1218 no) ;;
1219 fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1220 { (exit 1); exit 1; }; } ;;
1221 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1222 esac
1223fi
1224
1225# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001226for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1227 datadir sysconfdir sharedstatedir localstatedir includedir \
1228 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1229 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001230do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001231 eval ac_val=\$$ac_var
Antoine Pitroub52ec782009-01-25 16:34:23 +00001232 # Remove trailing slashes.
1233 case $ac_val in
1234 */ )
1235 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1236 eval $ac_var=\$ac_val;;
1237 esac
1238 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001239 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001240 [\\/$]* | ?:[\\/]* ) continue;;
1241 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001242 esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00001243 { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001245done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001246
Martin v. Löwis11437992002-04-12 09:54:03 +00001247# There might be people who depend on the old broken behavior: `$host'
1248# used to hold the argument of --host etc.
1249# FIXME: To remove some day.
1250build=$build_alias
1251host=$host_alias
1252target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001253
Martin v. Löwis11437992002-04-12 09:54:03 +00001254# FIXME: To remove some day.
1255if test "x$host_alias" != x; then
1256 if test "x$build_alias" = x; then
1257 cross_compiling=maybe
Antoine Pitroub52ec782009-01-25 16:34:23 +00001258 $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 +00001259 If a cross compiler is detected then cross compile mode will be used." >&2
1260 elif test "x$build_alias" != "x$host_alias"; then
1261 cross_compiling=yes
1262 fi
1263fi
1264
1265ac_tool_prefix=
1266test -n "$host_alias" && ac_tool_prefix=$host_alias-
1267
1268test "$silent" = yes && exec 6>/dev/null
1269
Guido van Rossum627b2d71993-12-24 10:39:16 +00001270
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001271ac_pwd=`pwd` && test -n "$ac_pwd" &&
1272ac_ls_di=`ls -di .` &&
1273ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Antoine Pitroub52ec782009-01-25 16:34:23 +00001274 { $as_echo "$as_me: error: working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275 { (exit 1); exit 1; }; }
1276test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Antoine Pitroub52ec782009-01-25 16:34:23 +00001277 { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001278 { (exit 1); exit 1; }; }
1279
1280
Guido van Rossum627b2d71993-12-24 10:39:16 +00001281# Find the source files, if location was not specified.
1282if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001283 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284 # Try the directory containing this script, then the parent directory.
Antoine Pitroub52ec782009-01-25 16:34:23 +00001285 ac_confdir=`$as_dirname -- "$as_myself" ||
1286$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1287 X"$as_myself" : 'X\(//\)[^/]' \| \
1288 X"$as_myself" : 'X\(//\)$' \| \
1289 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1290$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001291 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1292 s//\1/
1293 q
1294 }
1295 /^X\(\/\/\)[^/].*/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\/\)$/{
1300 s//\1/
1301 q
1302 }
1303 /^X\(\/\).*/{
1304 s//\1/
1305 q
1306 }
1307 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001308 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001309 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001310 srcdir=..
1311 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001312else
1313 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001315if test ! -r "$srcdir/$ac_unique_file"; then
1316 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Antoine Pitroub52ec782009-01-25 16:34:23 +00001317 { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001318 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001320ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1321ac_abs_confdir=`(
Antoine Pitroub52ec782009-01-25 16:34:23 +00001322 cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001323 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324 pwd)`
1325# When building in place, set srcdir=.
1326if test "$ac_abs_confdir" = "$ac_pwd"; then
1327 srcdir=.
1328fi
1329# Remove unnecessary trailing slashes from srcdir.
1330# Double slashes in file names in object file debugging info
1331# mess up M-x gdb in Emacs.
1332case $srcdir in
1333*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1334esac
1335for ac_var in $ac_precious_vars; do
1336 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1337 eval ac_env_${ac_var}_value=\$${ac_var}
1338 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1339 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1340done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001341
Martin v. Löwis11437992002-04-12 09:54:03 +00001342#
1343# Report the --help message.
1344#
1345if test "$ac_init_help" = "long"; then
1346 # Omit some internal or obsolete options to make the list less imposing.
1347 # This message is too long to be a string in the A/UX 3.1 sh.
1348 cat <<_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001349\`configure' configures python 3.1 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001350
1351Usage: $0 [OPTION]... [VAR=VALUE]...
1352
1353To assign environment variables (e.g., CC, CFLAGS...), specify them as
1354VAR=VALUE. See below for descriptions of some of the useful variables.
1355
1356Defaults for the options are specified in brackets.
1357
1358Configuration:
1359 -h, --help display this help and exit
1360 --help=short display options specific to this package
1361 --help=recursive display the short help of all the included packages
1362 -V, --version display version information and exit
1363 -q, --quiet, --silent do not print \`checking...' messages
1364 --cache-file=FILE cache test results in FILE [disabled]
1365 -C, --config-cache alias for \`--cache-file=config.cache'
1366 -n, --no-create do not create output files
1367 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1368
Martin v. Löwis11437992002-04-12 09:54:03 +00001369Installation directories:
1370 --prefix=PREFIX install architecture-independent files in PREFIX
Antoine Pitroub52ec782009-01-25 16:34:23 +00001371 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001372 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Antoine Pitroub52ec782009-01-25 16:34:23 +00001373 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001374
1375By default, \`make install' will install all the files in
1376\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1377an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1378for instance \`--prefix=\$HOME'.
1379
1380For better control, use the options below.
1381
1382Fine tuning of the installation directories:
Antoine Pitroub52ec782009-01-25 16:34:23 +00001383 --bindir=DIR user executables [EPREFIX/bin]
1384 --sbindir=DIR system admin executables [EPREFIX/sbin]
1385 --libexecdir=DIR program executables [EPREFIX/libexec]
1386 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1387 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1388 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1389 --libdir=DIR object code libraries [EPREFIX/lib]
1390 --includedir=DIR C header files [PREFIX/include]
1391 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1392 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1393 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1394 --infodir=DIR info documentation [DATAROOTDIR/info]
1395 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1396 --mandir=DIR man documentation [DATAROOTDIR/man]
1397 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1398 --htmldir=DIR html documentation [DOCDIR]
1399 --dvidir=DIR dvi documentation [DOCDIR]
1400 --pdfdir=DIR pdf documentation [DOCDIR]
1401 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001402_ACEOF
1403
1404 cat <<\_ACEOF
1405_ACEOF
1406fi
1407
1408if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001409 case $ac_init_help in
Christian Heimes70e5cab2008-12-03 18:18:23 +00001410 short | recursive ) echo "Configuration of python 3.1:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001411 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001412 cat <<\_ACEOF
1413
1414Optional Features:
Antoine Pitroub52ec782009-01-25 16:34:23 +00001415 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1417 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001418 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001419 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001420 --enable-framework[=INSTALLDIR]
1421 Build (MacOSX|Darwin) framework
1422 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001423 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --enable-ipv6 Enable ipv6 (with ipv4) support
1425 --disable-ipv6 Disable ipv6 support
Martin v. Löwis11437992002-04-12 09:54:03 +00001426
1427Optional Packages:
1428 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1429 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001430 --with-universal-archs=ARCH
1431 select architectures for universal build ("32-bit",
1432 "64-bit" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001433 --with-framework-name=FRAMEWORK
1434 specify an alternate name of the framework built
1435 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001436 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001437 --with-cxx-main=<compiler>
1438 compile main() and link python executable with C++
1439 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001440 --with-suffix=.exe set executable suffix
1441 --with-pydebug build with Py_DEBUG defined
1442 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001443 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --with-signal-module disable/enable signal module
1445 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1446 --with(out)-threads[=DIRECTORY]
1447 disable/enable thread support
1448 --with(out)-thread[=DIRECTORY]
1449 deprecated; use --with(out)-threads
1450 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001451 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001452 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001453 --with(out)-pymalloc disable/enable specialized mallocs
1454 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001455 --with-fpectl enable SIGFPE catching
1456 --with-libm=STRING math library
1457 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001458 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001459 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1460 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001461
1462Some influential environment variables:
1463 CC C compiler command
1464 CFLAGS C compiler flags
1465 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1466 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001467 LIBS libraries to pass to the linker, e.g. -l<library>
1468 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1469 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001470 CPP C preprocessor
1471
1472Use these variables to override the choices made by `configure' or to help
1473it to find libraries and programs with nonstandard names/locations.
1474
Martin v. Löwis1d459062005-03-14 21:23:33 +00001475Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001476_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001478fi
1479
1480if test "$ac_init_help" = "recursive"; then
1481 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Antoine Pitroub52ec782009-01-25 16:34:23 +00001483 test -d "$ac_dir" ||
1484 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1485 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001486 ac_builddir=.
1487
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001488case "$ac_dir" in
1489.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1490*)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001491 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001492 # A ".." for each directory in $ac_dir_suffix.
Antoine Pitroub52ec782009-01-25 16:34:23 +00001493 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001494 case $ac_top_builddir_sub in
1495 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1496 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1497 esac ;;
1498esac
1499ac_abs_top_builddir=$ac_pwd
1500ac_abs_builddir=$ac_pwd$ac_dir_suffix
1501# for backward compatibility:
1502ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001503
1504case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001505 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001506 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001507 ac_top_srcdir=$ac_top_builddir_sub
1508 ac_abs_top_srcdir=$ac_pwd ;;
1509 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001510 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001511 ac_top_srcdir=$srcdir
1512 ac_abs_top_srcdir=$srcdir ;;
1513 *) # Relative name.
1514 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1515 ac_top_srcdir=$ac_top_build_prefix$srcdir
1516 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001517esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001518ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001520 cd "$ac_dir" || { ac_status=$?; continue; }
1521 # Check for guested configure.
1522 if test -f "$ac_srcdir/configure.gnu"; then
1523 echo &&
1524 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1525 elif test -f "$ac_srcdir/configure"; then
1526 echo &&
1527 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001528 else
Antoine Pitroub52ec782009-01-25 16:34:23 +00001529 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 fi || ac_status=$?
1531 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001532 done
1533fi
1534
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001535test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001536if $ac_init_version; then
1537 cat <<\_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001538python configure 3.1
Antoine Pitroub52ec782009-01-25 16:34:23 +00001539generated by GNU Autoconf 2.63
Martin v. Löwis11437992002-04-12 09:54:03 +00001540
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001541Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Antoine Pitroub52ec782009-01-25 16:34:23 +000015422002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001543This configure script is free software; the Free Software Foundation
1544gives unlimited permission to copy, distribute and modify it.
1545_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001546 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001548cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001549This file contains any messages produced by compilers while
1550running configure, to aid debugging if configure makes a mistake.
1551
Christian Heimes70e5cab2008-12-03 18:18:23 +00001552It was created by python $as_me 3.1, which was
Antoine Pitroub52ec782009-01-25 16:34:23 +00001553generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001554
1555 $ $0 $@
1556
1557_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001559{
1560cat <<_ASUNAME
1561## --------- ##
1562## Platform. ##
1563## --------- ##
1564
1565hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1566uname -m = `(uname -m) 2>/dev/null || echo unknown`
1567uname -r = `(uname -r) 2>/dev/null || echo unknown`
1568uname -s = `(uname -s) 2>/dev/null || echo unknown`
1569uname -v = `(uname -v) 2>/dev/null || echo unknown`
1570
1571/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1572/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1573
1574/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1575/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1576/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001577/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001578/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1579/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1580/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1581
1582_ASUNAME
1583
1584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1585for as_dir in $PATH
1586do
1587 IFS=$as_save_IFS
1588 test -z "$as_dir" && as_dir=.
Antoine Pitroub52ec782009-01-25 16:34:23 +00001589 $as_echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001590done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001591IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001592
1593} >&5
1594
1595cat >&5 <<_ACEOF
1596
1597
1598## ----------- ##
1599## Core tests. ##
1600## ----------- ##
1601
1602_ACEOF
1603
1604
1605# Keep a trace of the command line.
1606# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001607# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001608# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001609# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001610ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001611ac_configure_args0=
1612ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001613ac_must_keep_next=false
1614for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001615do
Skip Montanaro6dead952003-09-25 14:50:04 +00001616 for ac_arg
1617 do
1618 case $ac_arg in
1619 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1620 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1621 | -silent | --silent | --silen | --sile | --sil)
1622 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001623 *\'*)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001624 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001625 esac
1626 case $ac_pass in
1627 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1628 2)
1629 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1630 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001631 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001632 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001633 case $ac_arg in
1634 *=* | --config-cache | -C | -disable-* | --disable-* \
1635 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1636 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1637 | -with-* | --with-* | -without-* | --without-* | --x)
1638 case "$ac_configure_args0 " in
1639 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1640 esac
1641 ;;
1642 -* ) ac_must_keep_next=true ;;
1643 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001644 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001645 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001646 ;;
1647 esac
1648 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001649done
Skip Montanaro6dead952003-09-25 14:50:04 +00001650$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1651$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 +00001652
1653# When interrupted or exit'd, cleanup temporary files, and complete
1654# config.log. We remove comments because anyway the quotes in there
1655# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001656# WARNING: Use '\'' to represent an apostrophe within the trap.
1657# 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 +00001658trap 'exit_status=$?
1659 # Save into config.log some information that might help in debugging.
1660 {
1661 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001662
Martin v. Löwis11437992002-04-12 09:54:03 +00001663 cat <<\_ASBOX
1664## ---------------- ##
1665## Cache variables. ##
1666## ---------------- ##
1667_ASBOX
1668 echo
1669 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001670(
1671 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1672 eval ac_val=\$$ac_var
1673 case $ac_val in #(
1674 *${as_nl}*)
1675 case $ac_var in #(
Antoine Pitroub52ec782009-01-25 16:34:23 +00001676 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1677$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001678 esac
1679 case $ac_var in #(
1680 _ | IFS | as_nl) ;; #(
Antoine Pitroub52ec782009-01-25 16:34:23 +00001681 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001682 *) $as_unset $ac_var ;;
1683 esac ;;
1684 esac
1685 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001686 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001687 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1688 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001689 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001690 "s/'\''/'\''\\\\'\'''\''/g;
1691 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1692 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001693 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001695 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001696 esac |
1697 sort
1698)
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001700
1701 cat <<\_ASBOX
1702## ----------------- ##
1703## Output variables. ##
1704## ----------------- ##
1705_ASBOX
1706 echo
1707 for ac_var in $ac_subst_vars
1708 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001709 eval ac_val=\$$ac_var
1710 case $ac_val in
Antoine Pitroub52ec782009-01-25 16:34:23 +00001711 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001712 esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00001713 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001714 done | sort
1715 echo
1716
1717 if test -n "$ac_subst_files"; then
1718 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001719## ------------------- ##
1720## File substitutions. ##
1721## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001722_ASBOX
1723 echo
1724 for ac_var in $ac_subst_files
1725 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001726 eval ac_val=\$$ac_var
1727 case $ac_val in
Antoine Pitroub52ec782009-01-25 16:34:23 +00001728 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001729 esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00001730 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001731 done | sort
1732 echo
1733 fi
1734
Martin v. Löwis11437992002-04-12 09:54:03 +00001735 if test -s confdefs.h; then
1736 cat <<\_ASBOX
1737## ----------- ##
1738## confdefs.h. ##
1739## ----------- ##
1740_ASBOX
1741 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001742 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001743 echo
1744 fi
1745 test "$ac_signal" != 0 &&
Antoine Pitroub52ec782009-01-25 16:34:23 +00001746 $as_echo "$as_me: caught signal $ac_signal"
1747 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001748 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001749 rm -f core *.core core.conftest.* &&
1750 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001751 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001752' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001753for ac_signal in 1 2 13 15; do
1754 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1755done
1756ac_signal=0
1757
1758# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001759rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001760
1761# Predefined preprocessor variables.
1762
1763cat >>confdefs.h <<_ACEOF
1764#define PACKAGE_NAME "$PACKAGE_NAME"
1765_ACEOF
1766
1767
1768cat >>confdefs.h <<_ACEOF
1769#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1770_ACEOF
1771
1772
1773cat >>confdefs.h <<_ACEOF
1774#define PACKAGE_VERSION "$PACKAGE_VERSION"
1775_ACEOF
1776
1777
1778cat >>confdefs.h <<_ACEOF
1779#define PACKAGE_STRING "$PACKAGE_STRING"
1780_ACEOF
1781
1782
1783cat >>confdefs.h <<_ACEOF
1784#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1785_ACEOF
1786
1787
1788# Let the site file select an alternate cache file if it wants to.
Antoine Pitroub52ec782009-01-25 16:34:23 +00001789# Prefer an explicitly selected file to automatically selected ones.
1790ac_site_file1=NONE
1791ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001792if test -n "$CONFIG_SITE"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00001793 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001794elif test "x$prefix" != xNONE; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00001795 ac_site_file1=$prefix/share/config.site
1796 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001797else
Antoine Pitroub52ec782009-01-25 16:34:23 +00001798 ac_site_file1=$ac_default_prefix/share/config.site
1799 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001800fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00001801for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001802do
Antoine Pitroub52ec782009-01-25 16:34:23 +00001803 test "x$ac_site_file" = xNONE && continue
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001804 if test -r "$ac_site_file"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00001805 { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1806$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001807 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001808 . "$ac_site_file"
1809 fi
1810done
1811
1812if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001813 # Some versions of bash will fail to source /dev/null (special
1814 # files actually), so we avoid doing that.
1815 if test -f "$cache_file"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00001816 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1817$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001818 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001819 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1820 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001821 esac
1822 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001823else
Antoine Pitroub52ec782009-01-25 16:34:23 +00001824 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1825$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001826 >$cache_file
1827fi
1828
1829# Check that the precious variables saved in the cache have kept the same
1830# value.
1831ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001832for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001833 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1834 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001835 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1836 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001837 case $ac_old_set,$ac_new_set in
1838 set,)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001839 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1840$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 +00001841 ac_cache_corrupted=: ;;
1842 ,set)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001843 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1844$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001845 ac_cache_corrupted=: ;;
1846 ,);;
1847 *)
1848 if test "x$ac_old_val" != "x$ac_new_val"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00001849 # differences in whitespace do not lead to failure.
1850 ac_old_val_w=`echo x $ac_old_val`
1851 ac_new_val_w=`echo x $ac_new_val`
1852 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1853 { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1854$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1855 ac_cache_corrupted=:
1856 else
1857 { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1858$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1859 eval $ac_var=\$ac_old_val
1860 fi
1861 { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1862$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1863 { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1864$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001865 fi;;
1866 esac
1867 # Pass precious variables to config.status.
1868 if test "$ac_new_set" = set; then
1869 case $ac_new_val in
Antoine Pitroub52ec782009-01-25 16:34:23 +00001870 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001871 *) ac_arg=$ac_var=$ac_new_val ;;
1872 esac
1873 case " $ac_configure_args " in
1874 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1875 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1876 esac
1877 fi
1878done
1879if $ac_cache_corrupted; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00001880 { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1881$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1882 { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1883$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1884 { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1885$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 +00001886 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001887fi
1888
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
Guido van Rossum7f43da71994-08-01 12:15:30 +00001913ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001914ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001915ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1916ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1917ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001918
Guido van Rossum627b2d71993-12-24 10:39:16 +00001919
Michael W. Hudson54241132001-12-07 15:38:26 +00001920
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001921ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001922
1923
Martin v. Löwis11437992002-04-12 09:54:03 +00001924
1925
1926
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001927
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001928
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001929# We don't use PACKAGE_ variables, and they cause conflicts
1930# with other autoconf-based packages that include Python.h
1931grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1932rm confdefs.h
1933mv confdefs.h.new confdefs.h
1934
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001935
Christian Heimes70e5cab2008-12-03 18:18:23 +00001936VERSION=3.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001937
Martin v. Löwis1142de32002-03-29 16:28:31 +00001938
1939SOVERSION=1.0
1940
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001941# The later defininition of _XOPEN_SOURCE disables certain features
1942# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1943
1944cat >>confdefs.h <<\_ACEOF
1945#define _GNU_SOURCE 1
1946_ACEOF
1947
1948
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001949# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1950# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1951# them.
1952
1953cat >>confdefs.h <<\_ACEOF
1954#define _NETBSD_SOURCE 1
1955_ACEOF
1956
1957
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001958# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1959# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1960# them.
1961
1962cat >>confdefs.h <<\_ACEOF
1963#define __BSD_VISIBLE 1
1964_ACEOF
1965
1966
Martin v. Löwisd6320502004-08-12 13:45:08 +00001967# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1968# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1969
1970cat >>confdefs.h <<\_ACEOF
1971#define _BSD_TYPES 1
1972_ACEOF
1973
1974
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1976# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1977# them.
1978
1979cat >>confdefs.h <<\_ACEOF
1980#define _DARWIN_C_SOURCE 1
1981_ACEOF
1982
1983
1984
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001985define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001986
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001987# Arguments passed to configure.
1988
1989CONFIG_ARGS="$ac_configure_args"
1990
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001991# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00001992if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001993 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00001994 case $enableval in
1995 yes)
1996 enableval=/Developer/SDKs/MacOSX10.4u.sdk
1997 ;;
1998 esac
1999 case $enableval in
2000 no)
2001 UNIVERSALSDK=
2002 enable_universalsdk=
2003 ;;
2004 *)
2005 UNIVERSALSDK=$enableval
2006 ;;
2007 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002008
Thomas Wouters477c8d52006-05-27 19:21:47 +00002009else
2010
2011 UNIVERSALSDK=
2012 enable_universalsdk=
2013
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002014fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002015
2016
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002017
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002018ARCH_RUN_32BIT=
2019
2020
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002021UNIVERSAL_ARCHS="32-bit"
Antoine Pitroub52ec782009-01-25 16:34:23 +00002022{ $as_echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
2023$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002024
2025# Check whether --with-universal-archs was given.
2026if test "${with_universal_archs+set}" = set; then
2027 withval=$with_universal_archs;
Antoine Pitroub52ec782009-01-25 16:34:23 +00002028 { $as_echo "$as_me:$LINENO: result: $withval" >&5
2029$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002030 UNIVERSAL_ARCHS="$withval"
2031
2032else
2033
Antoine Pitroub52ec782009-01-25 16:34:23 +00002034 { $as_echo "$as_me:$LINENO: result: 32-bit" >&5
2035$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002036
2037fi
2038
2039
2040
2041
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002042
2043# Check whether --with-framework-name was given.
2044if test "${with_framework_name+set}" = set; then
2045 withval=$with_framework_name;
2046 PYTHONFRAMEWORK=${withval}
2047 PYTHONFRAMEWORKDIR=${withval}.framework
2048 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2049
2050else
2051
2052 PYTHONFRAMEWORK=Python
2053 PYTHONFRAMEWORKDIR=Python.framework
2054 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2055
2056fi
2057
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002058# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002059if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002060 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002061 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002062 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002063 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002064 esac
2065 case $enableval in
2066 no)
2067 PYTHONFRAMEWORK=
2068 PYTHONFRAMEWORKDIR=no-framework
2069 PYTHONFRAMEWORKPREFIX=
2070 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002071 FRAMEWORKINSTALLFIRST=
2072 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002073 FRAMEWORKALTINSTALLFIRST=
2074 FRAMEWORKALTINSTALLLAST=
2075 if test "x${prefix}" = "xNONE"; then
2076 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2077 else
2078 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2079 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002080 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002081 ;;
2082 *)
2083 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002084 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002085 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002086 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
2087 if test "$UNIVERSAL_ARCHS" = "all"
2088 then
2089 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
2090 else
2091 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2092 fi
2093
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002094 if test "x${prefix}" = "xNONE" ; then
2095 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2096 else
2097 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2098 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002099 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002100
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002101 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002102 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002103 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002105 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002106
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002107 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2108
2109 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2110
Jack Jansene578a632001-08-15 01:27:14 +00002111 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002112
Guido van Rossum563e7081996-09-10 18:20:48 +00002113else
Martin v. Löwis11437992002-04-12 09:54:03 +00002114
Jack Jansene578a632001-08-15 01:27:14 +00002115 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002116 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002117 PYTHONFRAMEWORKPREFIX=
2118 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002119 FRAMEWORKINSTALLFIRST=
2120 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002121 FRAMEWORKALTINSTALLFIRST=
2122 FRAMEWORKALTINSTALLLAST=
2123 if test "x${prefix}" = "xNONE" ; then
2124 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2125 else
2126 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2127 fi
Jack Jansene578a632001-08-15 01:27:14 +00002128 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002129
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002130 if test "$UNIVERSAL_ARCHS" = "all"
2131 then
2132 FRAMEWORKINSTALLLAST=update4wayuniversal
2133 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2134 fi
2135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002136fi
2137
Thomas Wouters477c8d52006-05-27 19:21:47 +00002138
2139
Michael W. Hudson54241132001-12-07 15:38:26 +00002140
2141
2142
2143
Jack Jansene578a632001-08-15 01:27:14 +00002144
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002145
2146
2147
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002148
Jack Jansene578a632001-08-15 01:27:14 +00002149##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002150## AC_HELP_STRING(--with-dyld,
2151## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002152##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002153# Set name for machine-dependent library files
2154
Antoine Pitroub52ec782009-01-25 16:34:23 +00002155{ $as_echo "$as_me:$LINENO: checking MACHDEP" >&5
2156$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002157if test -z "$MACHDEP"
2158then
Guido van Rossum563e7081996-09-10 18:20:48 +00002159 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002160 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2161 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002162 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002163 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002164 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002165 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002166 ac_md_system=`echo $ac_sys_system |
2167 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2168 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002169 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002170 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002171
Guido van Rossum07397971997-04-29 21:49:50 +00002172 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002173 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002174 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002175 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002176 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002177 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002178 esac
2179fi
Guido van Rossum91922671997-10-09 20:24:13 +00002180
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002181# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2182# disable features if it is defined, without any means to access these
2183# features as extensions. For these systems, we skip the definition of
2184# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2185# some feature, make sure there is no alternative way to access this
2186# feature. Also, when using wildcards, make sure you have verified the
2187# need for not defining _XOPEN_SOURCE on all systems matching the
2188# wildcard, and that the wildcard does not include future systems
2189# (which may remove their limitations).
2190case $ac_sys_system/$ac_sys_release in
2191 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2192 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002193 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002194 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002195 define_xopen_source=no
2196 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2197 # also defined. This can be overridden by defining _BSD_SOURCE
2198 # As this has a different meaning on Linux, only define it on OpenBSD
2199
2200cat >>confdefs.h <<\_ACEOF
2201#define _BSD_SOURCE 1
2202_ACEOF
2203
2204 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002205 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2206 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2207 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002208 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 +00002209 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002210 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2211 # of union __?sigval. Reported by Stuart Bishop.
2212 SunOS/5.6)
2213 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002214 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2215 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002216 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002217 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002218 define_xopen_source=no;;
2219 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002220 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002221 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002222 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002223 # On FreeBSD 4, the math functions C89 does not cover are never defined
2224 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2225 FreeBSD/4.*)
2226 define_xopen_source=no;;
2227 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2228 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2229 # identifies itself as Darwin/7.*
2230 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2231 # disables platform specific features beyond repair.
2232 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2233 # has no effect, don't bother defining them
2234 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002235 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002236 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2237 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2238 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002239 AIX/4)
2240 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002241 AIX/5)
2242 if test `uname -r` -eq 1; then
2243 define_xopen_source=no
2244 fi
2245 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002246 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2247 # defining NI_NUMERICHOST.
2248 QNX/6.3.2)
2249 define_xopen_source=no
2250 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002251
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002252esac
2253
2254if test $define_xopen_source = yes
2255then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002256 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2257 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002258 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2259 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002260 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002261 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002262
2263cat >>confdefs.h <<\_ACEOF
2264#define _XOPEN_SOURCE 500
2265_ACEOF
2266
2267 ;;
2268 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002269
2270cat >>confdefs.h <<\_ACEOF
2271#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002272_ACEOF
2273
Skip Montanarof0d5f792004-08-15 14:08:23 +00002274 ;;
2275 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002276
2277 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2278 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2279 # several APIs are not declared. Since this is also needed in some
2280 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002281 # except for Solaris 10, where it must not be defined,
2282 # as it implies XPG4.2
2283 case $ac_sys_system/$ac_sys_release in
2284 SunOS/5.10)
2285 ;;
2286 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002287
2288cat >>confdefs.h <<\_ACEOF
2289#define _XOPEN_SOURCE_EXTENDED 1
2290_ACEOF
2291
Martin v. Löwis7dece662005-11-26 11:38:24 +00002292 ;;
2293 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002294
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002295
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002296cat >>confdefs.h <<\_ACEOF
2297#define _POSIX_C_SOURCE 200112L
2298_ACEOF
2299
2300
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002301fi
2302
Guido van Rossum91922671997-10-09 20:24:13 +00002303#
2304# SGI compilers allow the specification of the both the ABI and the
2305# ISA on the command line. Depending on the values of these switches,
2306# different and often incompatable code will be generated.
2307#
2308# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2309# thus supply support for various ABI/ISA combinations. The MACHDEP
2310# variable is also adjusted.
2311#
2312
2313if test ! -z "$SGI_ABI"
2314then
2315 CC="cc $SGI_ABI"
2316 LDFLAGS="$SGI_ABI $LDFLAGS"
2317 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2318fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00002319{ $as_echo "$as_me:$LINENO: result: $MACHDEP" >&5
2320$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002321
Jack Jansen6b08a402004-06-03 12:41:45 +00002322# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2323# it may influence the way we can build extensions, so distutils
2324# needs to check it
2325
Thomas Wouters477c8d52006-05-27 19:21:47 +00002326
Jack Jansen6b08a402004-06-03 12:41:45 +00002327CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002328EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002329
Antoine Pitroub52ec782009-01-25 16:34:23 +00002330{ $as_echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2331$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002332ac_sys_machine=`uname -m`
Antoine Pitroub52ec782009-01-25 16:34:23 +00002333{ $as_echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2334$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002335
Guido van Rossum627b2d71993-12-24 10:39:16 +00002336# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002337
2338# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2339# for debug/optimization stuff. BASECFLAGS is for flags that are required
2340# just to get things to compile and link. Users are free to override OPT
2341# when running configure or make. The build should not break if they do.
2342# BASECFLAGS should generally not be messed with, however.
2343
2344# XXX shouldn't some/most/all of this code be merged with the stuff later
2345# on that fiddles with OPT and BASECFLAGS?
Antoine Pitroub52ec782009-01-25 16:34:23 +00002346{ $as_echo "$as_me:$LINENO: checking for --without-gcc" >&5
2347$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002348
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002349# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002350if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002351 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002352 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002353 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002354 without_gcc=yes;;
2355 yes) CC=gcc
2356 without_gcc=no;;
2357 *) CC=$withval
2358 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002359 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002360else
Martin v. Löwis11437992002-04-12 09:54:03 +00002361
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002362 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002363 AIX*) CC=cc_r
2364 without_gcc=;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002365 Monterey*)
2366 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002367 without_gcc=;;
2368 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002369 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002370fi
2371
Antoine Pitroub52ec782009-01-25 16:34:23 +00002372{ $as_echo "$as_me:$LINENO: result: $without_gcc" >&5
2373$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002374
Guido van Rossum8b131c51995-03-09 14:10:13 +00002375# If the user switches compilers, we can't believe the cache
2376if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2377then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002378 { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002379(it is also a good idea to do 'make clean' before compiling)" >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00002380$as_echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002381(it is also a good idea to do 'make clean' before compiling)" >&2;}
2382 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002383fi
2384
Martin v. Löwis11437992002-04-12 09:54:03 +00002385ac_ext=c
2386ac_cpp='$CPP $CPPFLAGS'
2387ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2388ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2389ac_compiler_gnu=$ac_cv_c_compiler_gnu
2390if test -n "$ac_tool_prefix"; then
2391 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2392set dummy ${ac_tool_prefix}gcc; ac_word=$2
Antoine Pitroub52ec782009-01-25 16:34:23 +00002393{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2394$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002395if test "${ac_cv_prog_CC+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002396 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002397else
2398 if test -n "$CC"; then
2399 ac_cv_prog_CC="$CC" # Let the user override the test.
2400else
Martin v. Löwis11437992002-04-12 09:54:03 +00002401as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2402for as_dir in $PATH
2403do
2404 IFS=$as_save_IFS
2405 test -z "$as_dir" && as_dir=.
2406 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002407 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 +00002408 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Antoine Pitroub52ec782009-01-25 16:34:23 +00002409 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002410 break 2
2411 fi
2412done
2413done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002414IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002415
Jack Jansendd19cf82001-12-06 22:36:17 +00002416fi
2417fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002418CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002419if test -n "$CC"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002420 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2421$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002422else
Antoine Pitroub52ec782009-01-25 16:34:23 +00002423 { $as_echo "$as_me:$LINENO: result: no" >&5
2424$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002425fi
2426
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002427
Martin v. Löwis11437992002-04-12 09:54:03 +00002428fi
2429if test -z "$ac_cv_prog_CC"; then
2430 ac_ct_CC=$CC
2431 # Extract the first word of "gcc", so it can be a program name with args.
2432set dummy gcc; ac_word=$2
Antoine Pitroub52ec782009-01-25 16:34:23 +00002433{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2434$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002435if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002436 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002437else
2438 if test -n "$ac_ct_CC"; then
2439 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2440else
2441as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2442for as_dir in $PATH
2443do
2444 IFS=$as_save_IFS
2445 test -z "$as_dir" && as_dir=.
2446 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002447 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 +00002448 ac_cv_prog_ac_ct_CC="gcc"
Antoine Pitroub52ec782009-01-25 16:34:23 +00002449 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002450 break 2
2451 fi
2452done
2453done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002454IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002455
2456fi
2457fi
2458ac_ct_CC=$ac_cv_prog_ac_ct_CC
2459if test -n "$ac_ct_CC"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002460 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2461$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002462else
Antoine Pitroub52ec782009-01-25 16:34:23 +00002463 { $as_echo "$as_me:$LINENO: result: no" >&5
2464$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002465fi
2466
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467 if test "x$ac_ct_CC" = x; then
2468 CC=""
2469 else
2470 case $cross_compiling:$ac_tool_warned in
2471yes:)
Antoine Pitroub52ec782009-01-25 16:34:23 +00002472{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2473$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002474ac_tool_warned=yes ;;
2475esac
2476 CC=$ac_ct_CC
2477 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002478else
2479 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002480fi
2481
Jack Jansendd19cf82001-12-06 22:36:17 +00002482if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002483 if test -n "$ac_tool_prefix"; then
2484 # 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 +00002485set dummy ${ac_tool_prefix}cc; ac_word=$2
Antoine Pitroub52ec782009-01-25 16:34:23 +00002486{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2487$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002488if test "${ac_cv_prog_CC+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002489 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002490else
2491 if test -n "$CC"; then
2492 ac_cv_prog_CC="$CC" # Let the user override the test.
2493else
Martin v. Löwis11437992002-04-12 09:54:03 +00002494as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2495for as_dir in $PATH
2496do
2497 IFS=$as_save_IFS
2498 test -z "$as_dir" && as_dir=.
2499 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 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 +00002501 ac_cv_prog_CC="${ac_tool_prefix}cc"
Antoine Pitroub52ec782009-01-25 16:34:23 +00002502 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002503 break 2
2504 fi
2505done
2506done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002507IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002508
2509fi
2510fi
2511CC=$ac_cv_prog_CC
2512if test -n "$CC"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002513 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2514$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002515else
Antoine Pitroub52ec782009-01-25 16:34:23 +00002516 { $as_echo "$as_me:$LINENO: result: no" >&5
2517$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002518fi
2519
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520
Martin v. Löwis11437992002-04-12 09:54:03 +00002521 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002522fi
2523if test -z "$CC"; then
2524 # Extract the first word of "cc", so it can be a program name with args.
2525set dummy cc; ac_word=$2
Antoine Pitroub52ec782009-01-25 16:34:23 +00002526{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2527$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002528if test "${ac_cv_prog_CC+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002529 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002530else
2531 if test -n "$CC"; then
2532 ac_cv_prog_CC="$CC" # Let the user override the test.
2533else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002534 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002535as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2536for as_dir in $PATH
2537do
2538 IFS=$as_save_IFS
2539 test -z "$as_dir" && as_dir=.
2540 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002541 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 +00002542 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2543 ac_prog_rejected=yes
2544 continue
2545 fi
2546 ac_cv_prog_CC="cc"
Antoine Pitroub52ec782009-01-25 16:34:23 +00002547 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002548 break 2
2549 fi
2550done
2551done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002552IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002553
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002554if test $ac_prog_rejected = yes; then
2555 # We found a bogon in the path, so make sure we never use it.
2556 set dummy $ac_cv_prog_CC
2557 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002558 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002559 # We chose a different compiler from the bogus one.
2560 # However, it has the same basename, so the bogon will be chosen
2561 # first if we set CC to just the basename; use the full file name.
2562 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002563 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002564 fi
2565fi
2566fi
2567fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002568CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002569if test -n "$CC"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002570 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2571$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002572else
Antoine Pitroub52ec782009-01-25 16:34:23 +00002573 { $as_echo "$as_me:$LINENO: result: no" >&5
2574$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002575fi
2576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002577
Martin v. Löwis11437992002-04-12 09:54:03 +00002578fi
2579if test -z "$CC"; then
2580 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002581 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002582 do
2583 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2584set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Antoine Pitroub52ec782009-01-25 16:34:23 +00002585{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2586$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002587if test "${ac_cv_prog_CC+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002588 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002589else
2590 if test -n "$CC"; then
2591 ac_cv_prog_CC="$CC" # Let the user override the test.
2592else
Martin v. Löwis11437992002-04-12 09:54:03 +00002593as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2594for as_dir in $PATH
2595do
2596 IFS=$as_save_IFS
2597 test -z "$as_dir" && as_dir=.
2598 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002599 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002600 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Antoine Pitroub52ec782009-01-25 16:34:23 +00002601 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002603 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002604done
2605done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002607
2608fi
2609fi
2610CC=$ac_cv_prog_CC
2611if test -n "$CC"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002612 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2613$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002614else
Antoine Pitroub52ec782009-01-25 16:34:23 +00002615 { $as_echo "$as_me:$LINENO: result: no" >&5
2616$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002617fi
2618
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619
Martin v. Löwis11437992002-04-12 09:54:03 +00002620 test -n "$CC" && break
2621 done
2622fi
2623if test -z "$CC"; then
2624 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002625 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002626do
2627 # Extract the first word of "$ac_prog", so it can be a program name with args.
2628set dummy $ac_prog; ac_word=$2
Antoine Pitroub52ec782009-01-25 16:34:23 +00002629{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2630$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002631if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002632 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002633else
2634 if test -n "$ac_ct_CC"; then
2635 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2636else
2637as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2638for as_dir in $PATH
2639do
2640 IFS=$as_save_IFS
2641 test -z "$as_dir" && as_dir=.
2642 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002643 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 +00002644 ac_cv_prog_ac_ct_CC="$ac_prog"
Antoine Pitroub52ec782009-01-25 16:34:23 +00002645 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002646 break 2
2647 fi
2648done
2649done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002650IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002651
Martin v. Löwis11437992002-04-12 09:54:03 +00002652fi
2653fi
2654ac_ct_CC=$ac_cv_prog_ac_ct_CC
2655if test -n "$ac_ct_CC"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002656 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2657$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002658else
Antoine Pitroub52ec782009-01-25 16:34:23 +00002659 { $as_echo "$as_me:$LINENO: result: no" >&5
2660$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002661fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002662
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663
Martin v. Löwis11437992002-04-12 09:54:03 +00002664 test -n "$ac_ct_CC" && break
2665done
Michael W. Hudson54241132001-12-07 15:38:26 +00002666
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667 if test "x$ac_ct_CC" = x; then
2668 CC=""
2669 else
2670 case $cross_compiling:$ac_tool_warned in
2671yes:)
Antoine Pitroub52ec782009-01-25 16:34:23 +00002672{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2673$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002674ac_tool_warned=yes ;;
2675esac
2676 CC=$ac_ct_CC
2677 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002678fi
2679
2680fi
2681
2682
Antoine Pitroub52ec782009-01-25 16:34:23 +00002683test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2684$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2685{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002686See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00002687$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002688See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00002689 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002690
2691# Provide some information about the compiler.
Antoine Pitroub52ec782009-01-25 16:34:23 +00002692$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2693set X $ac_compile
2694ac_compiler=$2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002695{ (ac_try="$ac_compiler --version >&5"
2696case "(($ac_try" in
2697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698 *) ac_try_echo=$ac_try;;
2699esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00002700eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2701$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002702 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002703 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00002704 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002705 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002706{ (ac_try="$ac_compiler -v >&5"
2707case "(($ac_try" in
2708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2709 *) ac_try_echo=$ac_try;;
2710esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00002711eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2712$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002713 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002714 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00002715 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002717{ (ac_try="$ac_compiler -V >&5"
2718case "(($ac_try" in
2719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2720 *) ac_try_echo=$ac_try;;
2721esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00002722eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2723$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002724 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00002726 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 (exit $ac_status); }
2728
2729cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002730/* confdefs.h. */
2731_ACEOF
2732cat confdefs.h >>conftest.$ac_ext
2733cat >>conftest.$ac_ext <<_ACEOF
2734/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002735
Martin v. Löwis11437992002-04-12 09:54:03 +00002736int
2737main ()
2738{
2739
2740 ;
2741 return 0;
2742}
2743_ACEOF
2744ac_clean_files_save=$ac_clean_files
Antoine Pitroub52ec782009-01-25 16:34:23 +00002745ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002746# Try to create an executable without -o first, disregard a.out.
2747# It will help us diagnose broken compilers, and finding out an intuition
2748# of exeext.
Antoine Pitroub52ec782009-01-25 16:34:23 +00002749{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2750$as_echo_n "checking for C compiler default output file name... " >&6; }
2751ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2752
2753# The possible output files:
2754ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2755
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756ac_rmfiles=
2757for ac_file in $ac_files
2758do
2759 case $ac_file in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002760 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002761 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2762 esac
2763done
2764rm -f $ac_rmfiles
2765
2766if { (ac_try="$ac_link_default"
2767case "(($ac_try" in
2768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2769 *) ac_try_echo=$ac_try;;
2770esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00002771eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2772$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002773 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002774 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00002775 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002776 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002777 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2778# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2779# in a Makefile. We should not override ac_cv_exeext if it was cached,
2780# so that the user can short-circuit this test for compilers unknown to
2781# Autoconf.
2782for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002783do
2784 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002785 case $ac_file in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002786 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002787 ;;
2788 [ab].out )
2789 # We found the default executable, but exeext='' is most
2790 # certainly right.
2791 break;;
2792 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002793 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2794 then :; else
2795 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2796 fi
2797 # We set ac_cv_exeext here because the later test for it is not
2798 # safe: cross compilers may not add the suffix if given an `-o'
2799 # argument, so we may need to know it at that point already.
2800 # Even if this section looks crufty: it has the advantage of
2801 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002802 break;;
2803 * )
2804 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002805 esac
2806done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002807test "$ac_cv_exeext" = no && ac_cv_exeext=
2808
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002809else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002810 ac_file=''
2811fi
2812
Antoine Pitroub52ec782009-01-25 16:34:23 +00002813{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2814$as_echo "$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002815if test -z "$ac_file"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002816 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002817sed 's/^/| /' conftest.$ac_ext >&5
2818
Antoine Pitroub52ec782009-01-25 16:34:23 +00002819{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2820$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2821{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002822See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00002823$as_echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002824See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00002825 { (exit 77); exit 77; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002826fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002827
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002828ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002829
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002830# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002831# the compiler is broken, or we cross compile.
Antoine Pitroub52ec782009-01-25 16:34:23 +00002832{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2833$as_echo_n "checking whether the C compiler works... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002834# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2835# If not cross compiling, check that we can run a simple program.
2836if test "$cross_compiling" != yes; then
2837 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002838 { (case "(($ac_try" in
2839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2840 *) ac_try_echo=$ac_try;;
2841esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00002842eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2843$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002844 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002845 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00002846 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002847 (exit $ac_status); }; }; then
2848 cross_compiling=no
2849 else
2850 if test "$cross_compiling" = maybe; then
2851 cross_compiling=yes
2852 else
Antoine Pitroub52ec782009-01-25 16:34:23 +00002853 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2854$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2855{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002856If you meant to cross compile, use \`--host'.
2857See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00002858$as_echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002859If you meant to cross compile, use \`--host'.
2860See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00002861 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002862 fi
2863 fi
2864fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00002865{ $as_echo "$as_me:$LINENO: result: yes" >&5
2866$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002867
Antoine Pitroub52ec782009-01-25 16:34:23 +00002868rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002869ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002870# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002871# the compiler is broken, or we cross compile.
Antoine Pitroub52ec782009-01-25 16:34:23 +00002872{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2873$as_echo_n "checking whether we are cross compiling... " >&6; }
2874{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
2875$as_echo "$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002876
Antoine Pitroub52ec782009-01-25 16:34:23 +00002877{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
2878$as_echo_n "checking for suffix of executables... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002879if { (ac_try="$ac_link"
2880case "(($ac_try" in
2881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2882 *) ac_try_echo=$ac_try;;
2883esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00002884eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2885$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002886 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002887 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00002888 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002889 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002890 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2891# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2892# work properly (i.e., refer to `conftest.exe'), while it won't with
2893# `rm'.
2894for ac_file in conftest.exe conftest conftest.*; do
2895 test -f "$ac_file" || continue
2896 case $ac_file in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002897 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002898 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2899 break;;
2900 * ) break;;
2901 esac
2902done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002903else
Antoine Pitroub52ec782009-01-25 16:34:23 +00002904 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2905$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2906{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002907See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00002908$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002909See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00002910 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002911fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002912
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002913rm -f conftest$ac_cv_exeext
Antoine Pitroub52ec782009-01-25 16:34:23 +00002914{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2915$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002916
2917rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002918EXEEXT=$ac_cv_exeext
2919ac_exeext=$EXEEXT
Antoine Pitroub52ec782009-01-25 16:34:23 +00002920{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
2921$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002922if test "${ac_cv_objext+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002923 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002924else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002925 cat >conftest.$ac_ext <<_ACEOF
2926/* confdefs.h. */
2927_ACEOF
2928cat confdefs.h >>conftest.$ac_ext
2929cat >>conftest.$ac_ext <<_ACEOF
2930/* end confdefs.h. */
2931
2932int
2933main ()
2934{
2935
2936 ;
2937 return 0;
2938}
2939_ACEOF
2940rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002941if { (ac_try="$ac_compile"
2942case "(($ac_try" in
2943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2944 *) ac_try_echo=$ac_try;;
2945esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00002946eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2947$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002948 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002949 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00002950 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002951 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002952 for ac_file in conftest.o conftest.obj conftest.*; do
2953 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002954 case $ac_file in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002955 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002956 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2957 break;;
2958 esac
2959done
2960else
Antoine Pitroub52ec782009-01-25 16:34:23 +00002961 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002962sed 's/^/| /' conftest.$ac_ext >&5
2963
Antoine Pitroub52ec782009-01-25 16:34:23 +00002964{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2965$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2966{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002967See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00002968$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002969See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00002970 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002971fi
2972
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002973rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002974fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00002975{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2976$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002977OBJEXT=$ac_cv_objext
2978ac_objext=$OBJEXT
Antoine Pitroub52ec782009-01-25 16:34:23 +00002979{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2980$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002981if test "${ac_cv_c_compiler_gnu+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00002982 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002983else
2984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002985/* confdefs.h. */
2986_ACEOF
2987cat confdefs.h >>conftest.$ac_ext
2988cat >>conftest.$ac_ext <<_ACEOF
2989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00002990
Martin v. Löwis11437992002-04-12 09:54:03 +00002991int
2992main ()
2993{
2994#ifndef __GNUC__
2995 choke me
2996#endif
2997
2998 ;
2999 return 0;
3000}
3001_ACEOF
3002rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003003if { (ac_try="$ac_compile"
3004case "(($ac_try" in
3005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3006 *) ac_try_echo=$ac_try;;
3007esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00003008eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3009$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003010 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003011 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003012 grep -v '^ *+' conftest.er1 >conftest.err
3013 rm -f conftest.er1
3014 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003015 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016 (exit $ac_status); } && {
3017 test -z "$ac_c_werror_flag" ||
3018 test ! -s conftest.err
3019 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003020 ac_compiler_gnu=yes
3021else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003022 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003023sed 's/^/| /' conftest.$ac_ext >&5
3024
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003025 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003027
3028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003029ac_cv_c_compiler_gnu=$ac_compiler_gnu
3030
3031fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00003032{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3033$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3034if test $ac_compiler_gnu = yes; then
3035 GCC=yes
3036else
3037 GCC=
3038fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003039ac_test_CFLAGS=${CFLAGS+set}
3040ac_save_CFLAGS=$CFLAGS
Antoine Pitroub52ec782009-01-25 16:34:23 +00003041{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3042$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003043if test "${ac_cv_prog_cc_g+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003044 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003045else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003046 ac_save_c_werror_flag=$ac_c_werror_flag
3047 ac_c_werror_flag=yes
3048 ac_cv_prog_cc_g=no
3049 CFLAGS="-g"
3050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003051/* confdefs.h. */
3052_ACEOF
3053cat confdefs.h >>conftest.$ac_ext
3054cat >>conftest.$ac_ext <<_ACEOF
3055/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003056
Martin v. Löwis11437992002-04-12 09:54:03 +00003057int
3058main ()
3059{
3060
3061 ;
3062 return 0;
3063}
3064_ACEOF
3065rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003066if { (ac_try="$ac_compile"
3067case "(($ac_try" in
3068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3069 *) ac_try_echo=$ac_try;;
3070esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00003071eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3072$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003075 grep -v '^ *+' conftest.er1 >conftest.err
3076 rm -f conftest.er1
3077 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003078 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079 (exit $ac_status); } && {
3080 test -z "$ac_c_werror_flag" ||
3081 test ! -s conftest.err
3082 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003083 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003084else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003085 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003086sed 's/^/| /' conftest.$ac_ext >&5
3087
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003088 CFLAGS=""
3089 cat >conftest.$ac_ext <<_ACEOF
3090/* confdefs.h. */
3091_ACEOF
3092cat confdefs.h >>conftest.$ac_ext
3093cat >>conftest.$ac_ext <<_ACEOF
3094/* end confdefs.h. */
3095
3096int
3097main ()
3098{
3099
3100 ;
3101 return 0;
3102}
3103_ACEOF
3104rm -f conftest.$ac_objext
3105if { (ac_try="$ac_compile"
3106case "(($ac_try" in
3107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3108 *) ac_try_echo=$ac_try;;
3109esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00003110eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3111$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003112 (eval "$ac_compile") 2>conftest.er1
3113 ac_status=$?
3114 grep -v '^ *+' conftest.er1 >conftest.err
3115 rm -f conftest.er1
3116 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003117 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003118 (exit $ac_status); } && {
3119 test -z "$ac_c_werror_flag" ||
3120 test ! -s conftest.err
3121 } && test -s conftest.$ac_objext; then
3122 :
3123else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003124 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125sed 's/^/| /' conftest.$ac_ext >&5
3126
3127 ac_c_werror_flag=$ac_save_c_werror_flag
3128 CFLAGS="-g"
3129 cat >conftest.$ac_ext <<_ACEOF
3130/* confdefs.h. */
3131_ACEOF
3132cat confdefs.h >>conftest.$ac_ext
3133cat >>conftest.$ac_ext <<_ACEOF
3134/* end confdefs.h. */
3135
3136int
3137main ()
3138{
3139
3140 ;
3141 return 0;
3142}
3143_ACEOF
3144rm -f conftest.$ac_objext
3145if { (ac_try="$ac_compile"
3146case "(($ac_try" in
3147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3148 *) ac_try_echo=$ac_try;;
3149esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00003150eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3151$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003152 (eval "$ac_compile") 2>conftest.er1
3153 ac_status=$?
3154 grep -v '^ *+' conftest.er1 >conftest.err
3155 rm -f conftest.er1
3156 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003157 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003158 (exit $ac_status); } && {
3159 test -z "$ac_c_werror_flag" ||
3160 test ! -s conftest.err
3161 } && test -s conftest.$ac_objext; then
3162 ac_cv_prog_cc_g=yes
3163else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003164 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003165sed 's/^/| /' conftest.$ac_ext >&5
3166
3167
Guido van Rossum627b2d71993-12-24 10:39:16 +00003168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169
3170rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172
3173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3174fi
3175
3176rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3177 ac_c_werror_flag=$ac_save_c_werror_flag
3178fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00003179{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3180$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003181if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003182 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003183elif test $ac_cv_prog_cc_g = yes; then
3184 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003185 CFLAGS="-g -O2"
3186 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003187 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188 fi
3189else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003190 if test "$GCC" = yes; then
3191 CFLAGS="-O2"
3192 else
3193 CFLAGS=
3194 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003195fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00003196{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3197$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003198if test "${ac_cv_prog_cc_c89+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003199 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003200else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003201 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003202ac_save_CC=$CC
3203cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003204/* confdefs.h. */
3205_ACEOF
3206cat confdefs.h >>conftest.$ac_ext
3207cat >>conftest.$ac_ext <<_ACEOF
3208/* end confdefs.h. */
3209#include <stdarg.h>
3210#include <stdio.h>
3211#include <sys/types.h>
3212#include <sys/stat.h>
3213/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3214struct buf { int x; };
3215FILE * (*rcsopen) (struct buf *, struct stat *, int);
3216static char *e (p, i)
3217 char **p;
3218 int i;
3219{
3220 return p[i];
3221}
3222static char *f (char * (*g) (char **, int), char **p, ...)
3223{
3224 char *s;
3225 va_list v;
3226 va_start (v,p);
3227 s = g (p, va_arg (v,int));
3228 va_end (v);
3229 return s;
3230}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003231
3232/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3233 function prototypes and stuff, but not '\xHH' hex character constants.
3234 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003235 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003236 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3237 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003238 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003239int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003241/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3242 inside strings and character constants. */
3243#define FOO(x) 'x'
3244int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3245
Skip Montanaro6dead952003-09-25 14:50:04 +00003246int test (int i, double x);
3247struct s1 {int (*f) (int a);};
3248struct s2 {int (*f) (double a);};
3249int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3250int argc;
3251char **argv;
3252int
3253main ()
3254{
3255return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3256 ;
3257 return 0;
3258}
3259_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003260for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3261 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003262do
3263 CC="$ac_save_CC $ac_arg"
3264 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003265if { (ac_try="$ac_compile"
3266case "(($ac_try" in
3267 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3268 *) ac_try_echo=$ac_try;;
3269esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00003270eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3271$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003272 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003273 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003274 grep -v '^ *+' conftest.er1 >conftest.err
3275 rm -f conftest.er1
3276 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003277 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003278 (exit $ac_status); } && {
3279 test -z "$ac_c_werror_flag" ||
3280 test ! -s conftest.err
3281 } && test -s conftest.$ac_objext; then
3282 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003283else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003284 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003285sed 's/^/| /' conftest.$ac_ext >&5
3286
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003287
Skip Montanaro6dead952003-09-25 14:50:04 +00003288fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289
3290rm -f core conftest.err conftest.$ac_objext
3291 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003292done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003293rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003294CC=$ac_save_CC
3295
3296fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003297# AC_CACHE_VAL
3298case "x$ac_cv_prog_cc_c89" in
3299 x)
Antoine Pitroub52ec782009-01-25 16:34:23 +00003300 { $as_echo "$as_me:$LINENO: result: none needed" >&5
3301$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003302 xno)
Antoine Pitroub52ec782009-01-25 16:34:23 +00003303 { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3304$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003305 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306 CC="$CC $ac_cv_prog_cc_c89"
Antoine Pitroub52ec782009-01-25 16:34:23 +00003307 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3308$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003309esac
3310
Skip Montanaro6dead952003-09-25 14:50:04 +00003311
Martin v. Löwis11437992002-04-12 09:54:03 +00003312ac_ext=c
3313ac_cpp='$CPP $CPPFLAGS'
3314ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3315ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3316ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003317
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003318
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003319
3320
Antoine Pitroub52ec782009-01-25 16:34:23 +00003321{ $as_echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3322$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003323
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003324# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003325if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003326 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003327
3328 case $withval in
3329 no) with_cxx_main=no
3330 MAINCC='$(CC)';;
3331 yes) with_cxx_main=yes
3332 MAINCC='$(CXX)';;
3333 *) with_cxx_main=yes
3334 MAINCC=$withval
3335 if test -z "$CXX"
3336 then
3337 CXX=$withval
3338 fi;;
3339 esac
3340else
3341
3342 with_cxx_main=no
3343 MAINCC='$(CC)'
3344
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003345fi
3346
Antoine Pitroub52ec782009-01-25 16:34:23 +00003347{ $as_echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3348$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003349
3350preset_cxx="$CXX"
3351if test -z "$CXX"
3352then
3353 case "$CC" in
3354 gcc) # Extract the first word of "g++", so it can be a program name with args.
3355set dummy g++; ac_word=$2
Antoine Pitroub52ec782009-01-25 16:34:23 +00003356{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3357$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003358if test "${ac_cv_path_CXX+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003359 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003360else
3361 case $CXX in
3362 [\\/]* | ?:[\\/]*)
3363 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3364 ;;
3365 *)
3366 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3367for as_dir in notfound
3368do
3369 IFS=$as_save_IFS
3370 test -z "$as_dir" && as_dir=.
3371 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003372 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 +00003373 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Antoine Pitroub52ec782009-01-25 16:34:23 +00003374 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375 break 2
3376 fi
3377done
3378done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003379IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003380
3381 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3382 ;;
3383esac
3384fi
3385CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003386if test -n "$CXX"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003387 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3388$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003389else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003390 { $as_echo "$as_me:$LINENO: result: no" >&5
3391$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003392fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003393
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003394 ;;
3395 cc) # Extract the first word of "c++", so it can be a program name with args.
3396set dummy c++; ac_word=$2
Antoine Pitroub52ec782009-01-25 16:34:23 +00003397{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3398$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003399if test "${ac_cv_path_CXX+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003400 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003401else
3402 case $CXX in
3403 [\\/]* | ?:[\\/]*)
3404 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3405 ;;
3406 *)
3407 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3408for as_dir in notfound
3409do
3410 IFS=$as_save_IFS
3411 test -z "$as_dir" && as_dir=.
3412 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003413 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 +00003414 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Antoine Pitroub52ec782009-01-25 16:34:23 +00003415 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003416 break 2
3417 fi
3418done
3419done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003420IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003421
3422 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3423 ;;
3424esac
3425fi
3426CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003427if test -n "$CXX"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003428 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3429$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003430else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003431 { $as_echo "$as_me:$LINENO: result: no" >&5
3432$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003433fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003434
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003435 ;;
3436 esac
3437 if test "$CXX" = "notfound"
3438 then
3439 CXX=""
3440 fi
3441fi
3442if test -z "$CXX"
3443then
3444 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3445do
3446 # Extract the first word of "$ac_prog", so it can be a program name with args.
3447set dummy $ac_prog; ac_word=$2
Antoine Pitroub52ec782009-01-25 16:34:23 +00003448{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3449$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003450if test "${ac_cv_prog_CXX+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003451 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003452else
3453 if test -n "$CXX"; then
3454 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3455else
3456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3457for as_dir in $PATH
3458do
3459 IFS=$as_save_IFS
3460 test -z "$as_dir" && as_dir=.
3461 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003462 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 +00003463 ac_cv_prog_CXX="$ac_prog"
Antoine Pitroub52ec782009-01-25 16:34:23 +00003464 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003465 break 2
3466 fi
3467done
3468done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003469IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003470
3471fi
3472fi
3473CXX=$ac_cv_prog_CXX
3474if test -n "$CXX"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003475 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3476$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003477else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003478 { $as_echo "$as_me:$LINENO: result: no" >&5
3479$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003480fi
3481
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003483 test -n "$CXX" && break
3484done
3485test -n "$CXX" || CXX="notfound"
3486
3487 if test "$CXX" = "notfound"
3488 then
3489 CXX=""
3490 fi
3491fi
3492if test "$preset_cxx" != "$CXX"
3493then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003494 { $as_echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003495
3496 By default, distutils will build C++ extension modules with \"$CXX\".
3497 If this is not intended, then set CXX on the configure command line.
3498 " >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003499$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003500
3501 By default, distutils will build C++ extension modules with \"$CXX\".
3502 If this is not intended, then set CXX on the configure command line.
3503 " >&2;}
3504fi
3505
3506
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003507# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003508
3509ac_ext=c
3510ac_cpp='$CPP $CPPFLAGS'
3511ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3512ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3513ac_compiler_gnu=$ac_cv_c_compiler_gnu
Antoine Pitroub52ec782009-01-25 16:34:23 +00003514{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3515$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003516# On Suns, sometimes $CPP names a directory.
3517if test -n "$CPP" && test -d "$CPP"; then
3518 CPP=
3519fi
3520if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003521 if test "${ac_cv_prog_CPP+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003522 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003523else
Martin v. Löwis11437992002-04-12 09:54:03 +00003524 # Double quotes because CPP needs to be expanded
3525 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3526 do
3527 ac_preproc_ok=false
3528for ac_c_preproc_warn_flag in '' yes
3529do
3530 # Use a header file that comes with gcc, so configuring glibc
3531 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003532 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3533 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003534 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003535 # not just through cpp. "Syntax error" is here to catch this case.
3536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003537/* confdefs.h. */
3538_ACEOF
3539cat confdefs.h >>conftest.$ac_ext
3540cat >>conftest.$ac_ext <<_ACEOF
3541/* end confdefs.h. */
3542#ifdef __STDC__
3543# include <limits.h>
3544#else
3545# include <assert.h>
3546#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003547 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003548_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003549if { (ac_try="$ac_cpp conftest.$ac_ext"
3550case "(($ac_try" in
3551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3552 *) ac_try_echo=$ac_try;;
3553esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00003554eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3555$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003556 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003557 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003558 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003559 rm -f conftest.er1
3560 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003561 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562 (exit $ac_status); } >/dev/null && {
3563 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3564 test ! -s conftest.err
3565 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003566 :
3567else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003568 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003569sed 's/^/| /' conftest.$ac_ext >&5
3570
Martin v. Löwis11437992002-04-12 09:54:03 +00003571 # Broken: fails on valid input.
3572continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003574
Martin v. Löwis11437992002-04-12 09:54:03 +00003575rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003577 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 # can be detected and how.
3579 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003580/* confdefs.h. */
3581_ACEOF
3582cat confdefs.h >>conftest.$ac_ext
3583cat >>conftest.$ac_ext <<_ACEOF
3584/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003585#include <ac_nonexistent.h>
3586_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587if { (ac_try="$ac_cpp conftest.$ac_ext"
3588case "(($ac_try" in
3589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3590 *) ac_try_echo=$ac_try;;
3591esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00003592eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3593$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003596 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003597 rm -f conftest.er1
3598 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003599 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600 (exit $ac_status); } >/dev/null && {
3601 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3602 test ! -s conftest.err
3603 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003604 # Broken: success on invalid input.
3605continue
3606else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003607 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003608sed 's/^/| /' conftest.$ac_ext >&5
3609
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 # Passes both tests.
3611ac_preproc_ok=:
3612break
3613fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003614
Martin v. Löwis11437992002-04-12 09:54:03 +00003615rm -f conftest.err conftest.$ac_ext
3616
3617done
3618# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3619rm -f conftest.err conftest.$ac_ext
3620if $ac_preproc_ok; then
3621 break
3622fi
3623
3624 done
3625 ac_cv_prog_CPP=$CPP
3626
3627fi
3628 CPP=$ac_cv_prog_CPP
3629else
3630 ac_cv_prog_CPP=$CPP
3631fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00003632{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
3633$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003634ac_preproc_ok=false
3635for ac_c_preproc_warn_flag in '' yes
3636do
3637 # Use a header file that comes with gcc, so configuring glibc
3638 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003639 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3640 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003641 # On the NeXT, cc -E runs the code through the compiler's parser,
3642 # not just through cpp. "Syntax error" is here to catch this case.
3643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003644/* confdefs.h. */
3645_ACEOF
3646cat confdefs.h >>conftest.$ac_ext
3647cat >>conftest.$ac_ext <<_ACEOF
3648/* end confdefs.h. */
3649#ifdef __STDC__
3650# include <limits.h>
3651#else
3652# include <assert.h>
3653#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003654 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003655_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003656if { (ac_try="$ac_cpp conftest.$ac_ext"
3657case "(($ac_try" in
3658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3659 *) ac_try_echo=$ac_try;;
3660esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00003661eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3662$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003663 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003665 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003666 rm -f conftest.er1
3667 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003668 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669 (exit $ac_status); } >/dev/null && {
3670 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3671 test ! -s conftest.err
3672 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003673 :
3674else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003675 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003676sed 's/^/| /' conftest.$ac_ext >&5
3677
Martin v. Löwis11437992002-04-12 09:54:03 +00003678 # Broken: fails on valid input.
3679continue
3680fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003681
Martin v. Löwis11437992002-04-12 09:54:03 +00003682rm -f conftest.err conftest.$ac_ext
3683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003684 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003685 # can be detected and how.
3686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003687/* confdefs.h. */
3688_ACEOF
3689cat confdefs.h >>conftest.$ac_ext
3690cat >>conftest.$ac_ext <<_ACEOF
3691/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003692#include <ac_nonexistent.h>
3693_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694if { (ac_try="$ac_cpp conftest.$ac_ext"
3695case "(($ac_try" in
3696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3697 *) ac_try_echo=$ac_try;;
3698esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00003699eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3700$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003703 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003704 rm -f conftest.er1
3705 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003706 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707 (exit $ac_status); } >/dev/null && {
3708 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3709 test ! -s conftest.err
3710 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003711 # Broken: success on invalid input.
3712continue
3713else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003714 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003715sed 's/^/| /' conftest.$ac_ext >&5
3716
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 # Passes both tests.
3718ac_preproc_ok=:
3719break
3720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003721
Martin v. Löwis11437992002-04-12 09:54:03 +00003722rm -f conftest.err conftest.$ac_ext
3723
3724done
3725# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3726rm -f conftest.err conftest.$ac_ext
3727if $ac_preproc_ok; then
3728 :
3729else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003730 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3731$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3732{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003733See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003734$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003735See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00003736 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003737fi
3738
3739ac_ext=c
3740ac_cpp='$CPP $CPPFLAGS'
3741ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3742ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3743ac_compiler_gnu=$ac_cv_c_compiler_gnu
3744
3745
Antoine Pitroub52ec782009-01-25 16:34:23 +00003746{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3747$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748if test "${ac_cv_path_GREP+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003749 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003750else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003751 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003752 ac_path_GREP_found=false
Antoine Pitroub52ec782009-01-25 16:34:23 +00003753 # Loop through the user's path and test for each of PROGNAME-LIST
3754 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3756do
3757 IFS=$as_save_IFS
3758 test -z "$as_dir" && as_dir=.
3759 for ac_prog in grep ggrep; do
Antoine Pitroub52ec782009-01-25 16:34:23 +00003760 for ac_exec_ext in '' $ac_executable_extensions; do
3761 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3762 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3763# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003764 # Check for GNU $ac_path_GREP
3765case `"$ac_path_GREP" --version 2>&1` in
3766*GNU*)
3767 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3768*)
3769 ac_count=0
Antoine Pitroub52ec782009-01-25 16:34:23 +00003770 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003771 while :
3772 do
3773 cat "conftest.in" "conftest.in" >"conftest.tmp"
3774 mv "conftest.tmp" "conftest.in"
3775 cp "conftest.in" "conftest.nl"
Antoine Pitroub52ec782009-01-25 16:34:23 +00003776 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3778 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3779 ac_count=`expr $ac_count + 1`
3780 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3781 # Best one so far, save it but keep looking for a better one
3782 ac_cv_path_GREP="$ac_path_GREP"
3783 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003784 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003785 # 10*(2^10) chars as input seems more than enough
3786 test $ac_count -gt 10 && break
3787 done
3788 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3789esac
3790
Antoine Pitroub52ec782009-01-25 16:34:23 +00003791 $ac_path_GREP_found && break 3
3792 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003793 done
3794done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003795IFS=$as_save_IFS
Antoine Pitroub52ec782009-01-25 16:34:23 +00003796 if test -z "$ac_cv_path_GREP"; then
3797 { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3798$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 +00003799 { (exit 1); exit 1; }; }
Antoine Pitroub52ec782009-01-25 16:34:23 +00003800 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003801else
3802 ac_cv_path_GREP=$GREP
3803fi
3804
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003805fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00003806{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3807$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808 GREP="$ac_cv_path_GREP"
3809
3810
Antoine Pitroub52ec782009-01-25 16:34:23 +00003811{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
3812$as_echo_n "checking for egrep... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003813if test "${ac_cv_path_EGREP+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003814 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003815else
3816 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3817 then ac_cv_path_EGREP="$GREP -E"
3818 else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003819 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003820 ac_path_EGREP_found=false
Antoine Pitroub52ec782009-01-25 16:34:23 +00003821 # Loop through the user's path and test for each of PROGNAME-LIST
3822 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003823for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3824do
3825 IFS=$as_save_IFS
3826 test -z "$as_dir" && as_dir=.
3827 for ac_prog in egrep; do
Antoine Pitroub52ec782009-01-25 16:34:23 +00003828 for ac_exec_ext in '' $ac_executable_extensions; do
3829 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3830 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3831# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832 # Check for GNU $ac_path_EGREP
3833case `"$ac_path_EGREP" --version 2>&1` in
3834*GNU*)
3835 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3836*)
3837 ac_count=0
Antoine Pitroub52ec782009-01-25 16:34:23 +00003838 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839 while :
3840 do
3841 cat "conftest.in" "conftest.in" >"conftest.tmp"
3842 mv "conftest.tmp" "conftest.in"
3843 cp "conftest.in" "conftest.nl"
Antoine Pitroub52ec782009-01-25 16:34:23 +00003844 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3846 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3847 ac_count=`expr $ac_count + 1`
3848 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3849 # Best one so far, save it but keep looking for a better one
3850 ac_cv_path_EGREP="$ac_path_EGREP"
3851 ac_path_EGREP_max=$ac_count
3852 fi
3853 # 10*(2^10) chars as input seems more than enough
3854 test $ac_count -gt 10 && break
3855 done
3856 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3857esac
3858
Antoine Pitroub52ec782009-01-25 16:34:23 +00003859 $ac_path_EGREP_found && break 3
3860 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003861 done
3862done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003863IFS=$as_save_IFS
Antoine Pitroub52ec782009-01-25 16:34:23 +00003864 if test -z "$ac_cv_path_EGREP"; then
3865 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3866$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 +00003867 { (exit 1); exit 1; }; }
Antoine Pitroub52ec782009-01-25 16:34:23 +00003868 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869else
3870 ac_cv_path_EGREP=$EGREP
3871fi
3872
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003873 fi
3874fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00003875{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3876$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003878
3879
Antoine Pitroub52ec782009-01-25 16:34:23 +00003880{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3881$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003882if test "${ac_cv_header_stdc+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00003883 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003884else
Martin v. Löwis11437992002-04-12 09:54:03 +00003885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003886/* confdefs.h. */
3887_ACEOF
3888cat confdefs.h >>conftest.$ac_ext
3889cat >>conftest.$ac_ext <<_ACEOF
3890/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003891#include <stdlib.h>
3892#include <stdarg.h>
3893#include <string.h>
3894#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003895
Skip Montanaro6dead952003-09-25 14:50:04 +00003896int
3897main ()
3898{
3899
3900 ;
3901 return 0;
3902}
Martin v. Löwis11437992002-04-12 09:54:03 +00003903_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003904rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003905if { (ac_try="$ac_compile"
3906case "(($ac_try" in
3907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3908 *) ac_try_echo=$ac_try;;
3909esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00003910eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3911$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003912 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003914 grep -v '^ *+' conftest.er1 >conftest.err
3915 rm -f conftest.er1
3916 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00003917 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003918 (exit $ac_status); } && {
3919 test -z "$ac_c_werror_flag" ||
3920 test ! -s conftest.err
3921 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003922 ac_cv_header_stdc=yes
3923else
Antoine Pitroub52ec782009-01-25 16:34:23 +00003924 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003925sed 's/^/| /' conftest.$ac_ext >&5
3926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003929
3930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003931
3932if test $ac_cv_header_stdc = yes; then
3933 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003934 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003935/* confdefs.h. */
3936_ACEOF
3937cat confdefs.h >>conftest.$ac_ext
3938cat >>conftest.$ac_ext <<_ACEOF
3939/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003940#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003941
3942_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003944 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003945 :
3946else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003947 ac_cv_header_stdc=no
3948fi
3949rm -f conftest*
3950
3951fi
3952
3953if test $ac_cv_header_stdc = yes; then
3954 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00003955 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003956/* confdefs.h. */
3957_ACEOF
3958cat confdefs.h >>conftest.$ac_ext
3959cat >>conftest.$ac_ext <<_ACEOF
3960/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003961#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003962
3963_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003964if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00003965 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003966 :
3967else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003968 ac_cv_header_stdc=no
3969fi
3970rm -f conftest*
3971
3972fi
3973
3974if test $ac_cv_header_stdc = yes; then
3975 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00003976 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00003977 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003978else
Martin v. Löwis11437992002-04-12 09:54:03 +00003979 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003980/* confdefs.h. */
3981_ACEOF
3982cat confdefs.h >>conftest.$ac_ext
3983cat >>conftest.$ac_ext <<_ACEOF
3984/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00003985#include <ctype.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003986#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00003987#if ((' ' & 0x0FF) == 0x020)
3988# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3989# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3990#else
Skip Montanaro6dead952003-09-25 14:50:04 +00003991# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00003992 (('a' <= (c) && (c) <= 'i') \
3993 || ('j' <= (c) && (c) <= 'r') \
3994 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00003995# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3996#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00003997
Martin v. Löwis11437992002-04-12 09:54:03 +00003998#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3999int
4000main ()
4001{
4002 int i;
4003 for (i = 0; i < 256; i++)
4004 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00004005 || toupper (i) != TOUPPER (i))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004006 return 2;
4007 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00004008}
4009_ACEOF
4010rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004011if { (ac_try="$ac_link"
4012case "(($ac_try" in
4013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4014 *) ac_try_echo=$ac_try;;
4015esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00004016eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4017$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004018 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004019 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00004020 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004021 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004022 { (case "(($ac_try" in
4023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4024 *) ac_try_echo=$ac_try;;
4025esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00004026eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4027$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004028 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004029 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00004030 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004031 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004032 :
4033else
Antoine Pitroub52ec782009-01-25 16:34:23 +00004034 $as_echo "$as_me: program exited with status $ac_status" >&5
4035$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00004036sed 's/^/| /' conftest.$ac_ext >&5
4037
Martin v. Löwis11437992002-04-12 09:54:03 +00004038( exit $ac_status )
4039ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00004040fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00004041rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4043fi
4044
4045
Michael W. Hudson54241132001-12-07 15:38:26 +00004046fi
4047fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00004048{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4049$as_echo "$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004050if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004051
4052cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004053#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004054_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00004055
4056fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004057
Skip Montanarob9820a32004-01-17 00:16:12 +00004058# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
Skip Montanarof0d5f792004-08-15 14:08:23 +00004069 inttypes.h stdint.h unistd.h
Skip Montanarob9820a32004-01-17 00:16:12 +00004070do
Antoine Pitroub52ec782009-01-25 16:34:23 +00004071as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4072{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4073$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004074if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00004075 $as_echo_n "(cached) " >&6
Skip Montanarob9820a32004-01-17 00:16:12 +00004076else
4077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanarob9820a32004-01-17 00:16:12 +00004078/* confdefs.h. */
4079_ACEOF
4080cat confdefs.h >>conftest.$ac_ext
4081cat >>conftest.$ac_ext <<_ACEOF
4082/* end confdefs.h. */
4083$ac_includes_default
4084
4085#include <$ac_header>
4086_ACEOF
4087rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004088if { (ac_try="$ac_compile"
4089case "(($ac_try" in
4090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4091 *) ac_try_echo=$ac_try;;
4092esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00004093eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4094$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004095 (eval "$ac_compile") 2>conftest.er1
Skip Montanarob9820a32004-01-17 00:16:12 +00004096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00004097 grep -v '^ *+' conftest.er1 >conftest.err
4098 rm -f conftest.er1
4099 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00004100 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004101 (exit $ac_status); } && {
4102 test -z "$ac_c_werror_flag" ||
4103 test ! -s conftest.err
4104 } && test -s conftest.$ac_objext; then
Skip Montanarob9820a32004-01-17 00:16:12 +00004105 eval "$as_ac_Header=yes"
4106else
Antoine Pitroub52ec782009-01-25 16:34:23 +00004107 $as_echo "$as_me: failed program was:" >&5
Skip Montanarob9820a32004-01-17 00:16:12 +00004108sed 's/^/| /' conftest.$ac_ext >&5
4109
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004110 eval "$as_ac_Header=no"
Skip Montanarob9820a32004-01-17 00:16:12 +00004111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00004112
4113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanarob9820a32004-01-17 00:16:12 +00004114fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00004115ac_res=`eval 'as_val=${'$as_ac_Header'}
4116 $as_echo "$as_val"'`
4117 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4118$as_echo "$ac_res" >&6; }
4119as_val=`eval 'as_val=${'$as_ac_Header'}
4120 $as_echo "$as_val"'`
4121 if test "x$as_val" = x""yes; then
Skip Montanarob9820a32004-01-17 00:16:12 +00004122 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +00004123#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Skip Montanarob9820a32004-01-17 00:16:12 +00004124_ACEOF
4125
4126fi
4127
4128done
4129
4130
Martin v. Löwis11437992002-04-12 09:54:03 +00004131
Antoine Pitroub52ec782009-01-25 16:34:23 +00004132 if test "${ac_cv_header_minix_config_h+set}" = set; then
4133 { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4134$as_echo_n "checking for minix/config.h... " >&6; }
4135if test "${ac_cv_header_minix_config_h+set}" = set; then
4136 $as_echo_n "(cached) " >&6
4137fi
4138{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4139$as_echo "$ac_cv_header_minix_config_h" >&6; }
4140else
4141 # Is the header compilable?
4142{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4143$as_echo_n "checking minix/config.h usability... " >&6; }
4144cat >conftest.$ac_ext <<_ACEOF
4145/* confdefs.h. */
4146_ACEOF
4147cat confdefs.h >>conftest.$ac_ext
4148cat >>conftest.$ac_ext <<_ACEOF
4149/* end confdefs.h. */
4150$ac_includes_default
4151#include <minix/config.h>
4152_ACEOF
4153rm -f conftest.$ac_objext
4154if { (ac_try="$ac_compile"
4155case "(($ac_try" in
4156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4157 *) ac_try_echo=$ac_try;;
4158esac
4159eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4160$as_echo "$ac_try_echo") >&5
4161 (eval "$ac_compile") 2>conftest.er1
4162 ac_status=$?
4163 grep -v '^ *+' conftest.er1 >conftest.err
4164 rm -f conftest.er1
4165 cat conftest.err >&5
4166 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4167 (exit $ac_status); } && {
4168 test -z "$ac_c_werror_flag" ||
4169 test ! -s conftest.err
4170 } && test -s conftest.$ac_objext; then
4171 ac_header_compiler=yes
4172else
4173 $as_echo "$as_me: failed program was:" >&5
4174sed 's/^/| /' conftest.$ac_ext >&5
4175
4176 ac_header_compiler=no
4177fi
4178
4179rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4180{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4181$as_echo "$ac_header_compiler" >&6; }
4182
4183# Is the header present?
4184{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4185$as_echo_n "checking minix/config.h presence... " >&6; }
4186cat >conftest.$ac_ext <<_ACEOF
4187/* confdefs.h. */
4188_ACEOF
4189cat confdefs.h >>conftest.$ac_ext
4190cat >>conftest.$ac_ext <<_ACEOF
4191/* end confdefs.h. */
4192#include <minix/config.h>
4193_ACEOF
4194if { (ac_try="$ac_cpp conftest.$ac_ext"
4195case "(($ac_try" in
4196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4197 *) ac_try_echo=$ac_try;;
4198esac
4199eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4200$as_echo "$ac_try_echo") >&5
4201 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4202 ac_status=$?
4203 grep -v '^ *+' conftest.er1 >conftest.err
4204 rm -f conftest.er1
4205 cat conftest.err >&5
4206 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4207 (exit $ac_status); } >/dev/null && {
4208 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4209 test ! -s conftest.err
4210 }; then
4211 ac_header_preproc=yes
4212else
4213 $as_echo "$as_me: failed program was:" >&5
4214sed 's/^/| /' conftest.$ac_ext >&5
4215
4216 ac_header_preproc=no
4217fi
4218
4219rm -f conftest.err conftest.$ac_ext
4220{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4221$as_echo "$ac_header_preproc" >&6; }
4222
4223# So? What about this header?
4224case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4225 yes:no: )
4226 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4227$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4228 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4229$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4230 ac_header_preproc=yes
4231 ;;
4232 no:yes:* )
4233 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4234$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4235 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4236$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4237 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4238$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4239 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4240$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4241 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4242$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4243 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4244$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4245 ( cat <<\_ASBOX
4246## ------------------------------------------------ ##
4247## Report this to http://www.python.org/python-bugs ##
4248## ------------------------------------------------ ##
4249_ASBOX
4250 ) | sed "s/^/$as_me: WARNING: /" >&2
4251 ;;
4252esac
4253{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4254$as_echo_n "checking for minix/config.h... " >&6; }
4255if test "${ac_cv_header_minix_config_h+set}" = set; then
4256 $as_echo_n "(cached) " >&6
4257else
4258 ac_cv_header_minix_config_h=$ac_header_preproc
4259fi
4260{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4261$as_echo "$ac_cv_header_minix_config_h" >&6; }
4262
4263fi
4264if test "x$ac_cv_header_minix_config_h" = x""yes; then
4265 MINIX=yes
4266else
4267 MINIX=
4268fi
4269
4270
4271 if test "$MINIX" = yes; then
4272
4273cat >>confdefs.h <<\_ACEOF
4274#define _POSIX_SOURCE 1
4275_ACEOF
4276
4277
4278cat >>confdefs.h <<\_ACEOF
4279#define _POSIX_1_SOURCE 2
4280_ACEOF
4281
4282
4283cat >>confdefs.h <<\_ACEOF
4284#define _MINIX 1
4285_ACEOF
4286
4287 fi
4288
4289
4290
4291 { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4292$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4293if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4294 $as_echo_n "(cached) " >&6
4295else
4296 cat >conftest.$ac_ext <<_ACEOF
4297/* confdefs.h. */
4298_ACEOF
4299cat confdefs.h >>conftest.$ac_ext
4300cat >>conftest.$ac_ext <<_ACEOF
4301/* end confdefs.h. */
4302
4303# define __EXTENSIONS__ 1
4304 $ac_includes_default
4305int
4306main ()
4307{
4308
4309 ;
4310 return 0;
4311}
4312_ACEOF
4313rm -f conftest.$ac_objext
4314if { (ac_try="$ac_compile"
4315case "(($ac_try" in
4316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4317 *) ac_try_echo=$ac_try;;
4318esac
4319eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4320$as_echo "$ac_try_echo") >&5
4321 (eval "$ac_compile") 2>conftest.er1
4322 ac_status=$?
4323 grep -v '^ *+' conftest.er1 >conftest.err
4324 rm -f conftest.er1
4325 cat conftest.err >&5
4326 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4327 (exit $ac_status); } && {
4328 test -z "$ac_c_werror_flag" ||
4329 test ! -s conftest.err
4330 } && test -s conftest.$ac_objext; then
4331 ac_cv_safe_to_define___extensions__=yes
4332else
4333 $as_echo "$as_me: failed program was:" >&5
4334sed 's/^/| /' conftest.$ac_ext >&5
4335
4336 ac_cv_safe_to_define___extensions__=no
4337fi
4338
4339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4340fi
4341{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4342$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4343 test $ac_cv_safe_to_define___extensions__ = yes &&
4344 cat >>confdefs.h <<\_ACEOF
4345#define __EXTENSIONS__ 1
4346_ACEOF
4347
4348 cat >>confdefs.h <<\_ACEOF
4349#define _ALL_SOURCE 1
4350_ACEOF
4351
4352 cat >>confdefs.h <<\_ACEOF
4353#define _GNU_SOURCE 1
4354_ACEOF
4355
4356 cat >>confdefs.h <<\_ACEOF
4357#define _POSIX_PTHREAD_SEMANTICS 1
4358_ACEOF
4359
4360 cat >>confdefs.h <<\_ACEOF
4361#define _TANDEM_SOURCE 1
4362_ACEOF
4363
4364
4365
4366# Check for unsupported systems
4367case $ac_sys_system/$ac_sys_release in
4368atheos*|Linux*/1*)
4369 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4370 echo See README for details.
4371 exit 1;;
4372esac
4373
4374
4375{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5
4376$as_echo_n "checking for --with-suffix... " >&6; }
4377
4378# Check whether --with-suffix was given.
4379if test "${with_suffix+set}" = set; then
4380 withval=$with_suffix;
4381 case $withval in
4382 no) EXEEXT=;;
4383 yes) EXEEXT=.exe;;
4384 *) EXEEXT=$withval;;
4385 esac
4386fi
4387
4388{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5
4389$as_echo "$EXEEXT" >&6; }
4390
4391# Test whether we're running on a non-case-sensitive system, in which
4392# case we give a warning if no ext is given
4393
4394{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
4395$as_echo_n "checking for case-insensitive build directory... " >&6; }
4396if test ! -d CaseSensitiveTestDir; then
4397mkdir CaseSensitiveTestDir
4398fi
4399
4400if test -d casesensitivetestdir
4401then
4402 { $as_echo "$as_me:$LINENO: result: yes" >&5
4403$as_echo "yes" >&6; }
4404 BUILDEXEEXT=.exe
4405else
4406 { $as_echo "$as_me:$LINENO: result: no" >&5
4407$as_echo "no" >&6; }
4408 BUILDEXEEXT=$EXEEXT
4409fi
4410rmdir CaseSensitiveTestDir
4411
4412case $MACHDEP in
4413bsdos*)
4414 case $CC in
4415 gcc) CC="$CC -D_HAVE_BSDI";;
4416 esac;;
4417esac
4418
4419case $ac_sys_system in
4420hp*|HP*)
4421 case $CC in
4422 cc|*/cc) CC="$CC -Ae";;
4423 esac;;
4424Monterey*)
4425 case $CC in
4426 cc) CC="$CC -Wl,-Bexport";;
4427 esac;;
4428SunOS*)
4429 # Some functions have a prototype only with that define, e.g. confstr
4430
4431cat >>confdefs.h <<\_ACEOF
4432#define __EXTENSIONS__ 1
4433_ACEOF
4434
4435 ;;
4436esac
4437
4438
4439
4440{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5
4441$as_echo_n "checking LIBRARY... " >&6; }
4442if test -z "$LIBRARY"
4443then
4444 LIBRARY='libpython$(VERSION).a'
4445fi
4446{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5
4447$as_echo "$LIBRARY" >&6; }
4448
4449# LDLIBRARY is the name of the library to link against (as opposed to the
4450# name of the library into which to insert object files). BLDLIBRARY is also
4451# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4452# is blank as the main program is not linked directly against LDLIBRARY.
4453# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4454# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4455# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4456# DLLLIBRARY is the shared (i.e., DLL) library.
4457#
4458# RUNSHARED is used to run shared python without installed libraries
4459#
4460# INSTSONAME is the name of the shared library that will be use to install
4461# on the system - some systems like version suffix, others don't
4462
4463
4464
4465
4466
4467
4468LDLIBRARY="$LIBRARY"
4469BLDLIBRARY='$(LDLIBRARY)'
4470INSTSONAME='$(LDLIBRARY)'
4471DLLLIBRARY=''
4472LDLIBRARYDIR=''
4473RUNSHARED=''
4474
4475# LINKCC is the command that links the python executable -- default is $(CC).
4476# If CXX is set, and if it is needed to link a main function that was
4477# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4478# python might then depend on the C++ runtime
4479# This is altered for AIX in order to build the export list before
4480# linking.
4481
4482{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5
4483$as_echo_n "checking LINKCC... " >&6; }
4484if test -z "$LINKCC"
4485then
4486 LINKCC='$(PURIFY) $(MAINCC)'
4487 case $ac_sys_system in
4488 AIX*)
4489 exp_extra="\"\""
4490 if test $ac_sys_release -ge 5 -o \
4491 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4492 exp_extra="."
4493 fi
4494 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
4495 Monterey64*)
4496 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
4497 QNX*)
4498 # qcc must be used because the other compilers do not
4499 # support -N.
4500 LINKCC=qcc;;
4501 esac
4502fi
4503{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5
4504$as_echo "$LINKCC" >&6; }
4505
4506{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5
4507$as_echo_n "checking for --enable-shared... " >&6; }
4508# Check whether --enable-shared was given.
4509if test "${enable_shared+set}" = set; then
4510 enableval=$enable_shared;
4511fi
4512
4513
4514if test -z "$enable_shared"
4515then
4516 case $ac_sys_system in
4517 CYGWIN* | atheos*)
4518 enable_shared="yes";;
4519 *)
4520 enable_shared="no";;
4521 esac
4522fi
4523{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
4524$as_echo "$enable_shared" >&6; }
4525
4526{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4527$as_echo_n "checking for --enable-profiling... " >&6; }
4528# Check whether --enable-profiling was given.
4529if test "${enable_profiling+set}" = set; then
4530 enableval=$enable_profiling; ac_save_cc="$CC"
4531 CC="$CC -pg"
4532 if test "$cross_compiling" = yes; then
4533 ac_enable_profiling="no"
4534else
4535 cat >conftest.$ac_ext <<_ACEOF
4536/* confdefs.h. */
4537_ACEOF
4538cat confdefs.h >>conftest.$ac_ext
4539cat >>conftest.$ac_ext <<_ACEOF
4540/* end confdefs.h. */
4541int main() { return 0; }
4542_ACEOF
4543rm -f conftest$ac_exeext
4544if { (ac_try="$ac_link"
4545case "(($ac_try" in
4546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4547 *) ac_try_echo=$ac_try;;
4548esac
4549eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4550$as_echo "$ac_try_echo") >&5
4551 (eval "$ac_link") 2>&5
4552 ac_status=$?
4553 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4554 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4555 { (case "(($ac_try" in
4556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4557 *) ac_try_echo=$ac_try;;
4558esac
4559eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4560$as_echo "$ac_try_echo") >&5
4561 (eval "$ac_try") 2>&5
4562 ac_status=$?
4563 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4564 (exit $ac_status); }; }; then
4565 ac_enable_profiling="yes"
4566else
4567 $as_echo "$as_me: program exited with status $ac_status" >&5
4568$as_echo "$as_me: failed program was:" >&5
4569sed 's/^/| /' conftest.$ac_ext >&5
4570
4571( exit $ac_status )
4572ac_enable_profiling="no"
4573fi
4574rm -rf conftest.dSYM
4575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4576fi
4577
4578
4579 CC="$ac_save_cc"
4580fi
4581
4582{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4583$as_echo "$ac_enable_profiling" >&6; }
4584
4585case "$ac_enable_profiling" in
4586 "yes")
4587 BASECFLAGS="-pg $BASECFLAGS"
4588 LDFLAGS="-pg $LDFLAGS"
4589 ;;
4590esac
4591
4592{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4593$as_echo_n "checking LDLIBRARY... " >&6; }
4594
4595# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4596# library that we build, but we do not want to link against it (we
4597# will find it with a -framework option). For this reason there is an
4598# extra variable BLDLIBRARY against which Python and the extension
4599# modules are linked, BLDLIBRARY. This is normally the same as
4600# LDLIBRARY, but empty for MacOSX framework builds.
4601if test "$enable_framework"
4602then
4603 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4604 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4605 BLDLIBRARY=''
4606else
4607 BLDLIBRARY='$(LDLIBRARY)'
4608fi
4609
4610# Other platforms follow
4611if test $enable_shared = "yes"; then
4612
4613cat >>confdefs.h <<\_ACEOF
4614#define Py_ENABLE_SHARED 1
4615_ACEOF
4616
4617 case $ac_sys_system in
4618 CYGWIN*)
4619 LDLIBRARY='libpython$(VERSION).dll.a'
4620 DLLLIBRARY='libpython$(VERSION).dll'
4621 ;;
4622 SunOS*)
4623 LDLIBRARY='libpython$(VERSION).so'
4624 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4625 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4626 INSTSONAME="$LDLIBRARY".$SOVERSION
4627 ;;
4628 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4629 LDLIBRARY='libpython$(VERSION).so'
4630 BLDLIBRARY='-L. -lpython$(VERSION)'
4631 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4632 case $ac_sys_system in
4633 FreeBSD*)
4634 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4635 ;;
4636 esac
4637 INSTSONAME="$LDLIBRARY".$SOVERSION
4638 ;;
4639 hp*|HP*)
4640 case `uname -m` in
4641 ia64)
4642 LDLIBRARY='libpython$(VERSION).so'
4643 ;;
4644 *)
4645 LDLIBRARY='libpython$(VERSION).sl'
4646 ;;
4647 esac
4648 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4649 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4650 ;;
4651 OSF*)
4652 LDLIBRARY='libpython$(VERSION).so'
4653 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4654 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4655 ;;
4656 atheos*)
4657 LDLIBRARY='libpython$(VERSION).so'
4658 BLDLIBRARY='-L. -lpython$(VERSION)'
4659 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4660 ;;
4661 Darwin*)
4662 LDLIBRARY='libpython$(VERSION).dylib'
4663 BLDLIBRARY='-L. -lpython$(VERSION)'
4664 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4665 ;;
4666
4667 esac
4668else # shared is disabled
4669 case $ac_sys_system in
4670 CYGWIN*)
4671 BLDLIBRARY='$(LIBRARY)'
4672 LDLIBRARY='libpython$(VERSION).dll.a'
4673 ;;
4674 esac
4675fi
4676
4677{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4678$as_echo "$LDLIBRARY" >&6; }
4679
4680if test -n "$ac_tool_prefix"; then
4681 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4682set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4683{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if test "${ac_cv_prog_RANLIB+set}" = set; then
4686 $as_echo_n "(cached) " >&6
4687else
4688 if test -n "$RANLIB"; then
4689 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4690else
4691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4692for as_dir in $PATH
4693do
4694 IFS=$as_save_IFS
4695 test -z "$as_dir" && as_dir=.
4696 for ac_exec_ext in '' $ac_executable_extensions; do
4697 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4698 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4699 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4700 break 2
4701 fi
4702done
4703done
4704IFS=$as_save_IFS
4705
4706fi
4707fi
4708RANLIB=$ac_cv_prog_RANLIB
4709if test -n "$RANLIB"; then
4710 { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
4711$as_echo "$RANLIB" >&6; }
4712else
4713 { $as_echo "$as_me:$LINENO: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717
4718fi
4719if test -z "$ac_cv_prog_RANLIB"; then
4720 ac_ct_RANLIB=$RANLIB
4721 # Extract the first word of "ranlib", so it can be a program name with args.
4722set dummy ranlib; ac_word=$2
4723{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4724$as_echo_n "checking for $ac_word... " >&6; }
4725if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4726 $as_echo_n "(cached) " >&6
4727else
4728 if test -n "$ac_ct_RANLIB"; then
4729 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4730else
4731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4732for as_dir in $PATH
4733do
4734 IFS=$as_save_IFS
4735 test -z "$as_dir" && as_dir=.
4736 for ac_exec_ext in '' $ac_executable_extensions; do
4737 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4738 ac_cv_prog_ac_ct_RANLIB="ranlib"
4739 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4740 break 2
4741 fi
4742done
4743done
4744IFS=$as_save_IFS
4745
4746fi
4747fi
4748ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4749if test -n "$ac_ct_RANLIB"; then
4750 { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4751$as_echo "$ac_ct_RANLIB" >&6; }
4752else
4753 { $as_echo "$as_me:$LINENO: result: no" >&5
4754$as_echo "no" >&6; }
4755fi
4756
4757 if test "x$ac_ct_RANLIB" = x; then
4758 RANLIB=":"
4759 else
4760 case $cross_compiling:$ac_tool_warned in
4761yes:)
4762{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
4763$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4764ac_tool_warned=yes ;;
4765esac
4766 RANLIB=$ac_ct_RANLIB
4767 fi
4768else
4769 RANLIB="$ac_cv_prog_RANLIB"
4770fi
4771
4772
4773for ac_prog in ar aal
4774do
4775 # Extract the first word of "$ac_prog", so it can be a program name with args.
4776set dummy $ac_prog; ac_word=$2
4777{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4778$as_echo_n "checking for $ac_word... " >&6; }
4779if test "${ac_cv_prog_AR+set}" = set; then
4780 $as_echo_n "(cached) " >&6
4781else
4782 if test -n "$AR"; then
4783 ac_cv_prog_AR="$AR" # Let the user override the test.
4784else
4785as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4786for as_dir in $PATH
4787do
4788 IFS=$as_save_IFS
4789 test -z "$as_dir" && as_dir=.
4790 for ac_exec_ext in '' $ac_executable_extensions; do
4791 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4792 ac_cv_prog_AR="$ac_prog"
4793 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4794 break 2
4795 fi
4796done
4797done
4798IFS=$as_save_IFS
4799
4800fi
4801fi
4802AR=$ac_cv_prog_AR
4803if test -n "$AR"; then
4804 { $as_echo "$as_me:$LINENO: result: $AR" >&5
4805$as_echo "$AR" >&6; }
4806else
4807 { $as_echo "$as_me:$LINENO: result: no" >&5
4808$as_echo "no" >&6; }
4809fi
4810
4811
4812 test -n "$AR" && break
4813done
4814test -n "$AR" || AR="ar"
4815
4816
4817
4818# Extract the first word of "svnversion", so it can be a program name with args.
4819set dummy svnversion; ac_word=$2
4820{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4821$as_echo_n "checking for $ac_word... " >&6; }
4822if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4823 $as_echo_n "(cached) " >&6
4824else
4825 if test -n "$SVNVERSION"; then
4826 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4827else
4828as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4829for as_dir in $PATH
4830do
4831 IFS=$as_save_IFS
4832 test -z "$as_dir" && as_dir=.
4833 for ac_exec_ext in '' $ac_executable_extensions; do
4834 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4835 ac_cv_prog_SVNVERSION="found"
4836 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4837 break 2
4838 fi
4839done
4840done
4841IFS=$as_save_IFS
4842
4843 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4844fi
4845fi
4846SVNVERSION=$ac_cv_prog_SVNVERSION
4847if test -n "$SVNVERSION"; then
4848 { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4849$as_echo "$SVNVERSION" >&6; }
4850else
4851 { $as_echo "$as_me:$LINENO: result: no" >&5
4852$as_echo "no" >&6; }
4853fi
4854
4855
4856if test $SVNVERSION = found
4857then
4858 SVNVERSION="svnversion \$(srcdir)"
4859else
4860 SVNVERSION="echo exported"
4861fi
4862
4863case $MACHDEP in
4864bsdos*|hp*|HP*)
4865 # install -d does not work on BSDI or HP-UX
4866 if test -z "$INSTALL"
4867 then
4868 INSTALL="${srcdir}/install-sh -c"
4869 fi
4870esac
4871ac_aux_dir=
4872for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4873 if test -f "$ac_dir/install-sh"; then
4874 ac_aux_dir=$ac_dir
4875 ac_install_sh="$ac_aux_dir/install-sh -c"
4876 break
4877 elif test -f "$ac_dir/install.sh"; then
4878 ac_aux_dir=$ac_dir
4879 ac_install_sh="$ac_aux_dir/install.sh -c"
4880 break
4881 elif test -f "$ac_dir/shtool"; then
4882 ac_aux_dir=$ac_dir
4883 ac_install_sh="$ac_aux_dir/shtool install -c"
4884 break
4885 fi
4886done
4887if test -z "$ac_aux_dir"; then
4888 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4889$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
4890 { (exit 1); exit 1; }; }
4891fi
4892
4893# These three variables are undocumented and unsupported,
4894# and are intended to be withdrawn in a future Autoconf release.
4895# They can cause serious problems if a builder's source tree is in a directory
4896# whose full name contains unusual characters.
4897ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4898ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4899ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4900
4901
4902# Find a good install program. We prefer a C program (faster),
4903# so one script is as good as another. But avoid the broken or
4904# incompatible versions:
4905# SysV /etc/install, /usr/sbin/install
4906# SunOS /usr/etc/install
4907# IRIX /sbin/install
4908# AIX /bin/install
4909# AmigaOS /C/install, which installs bootblocks on floppy discs
4910# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4911# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4912# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4913# OS/2's system install, which has a completely different semantic
4914# ./install, which can be erroneously created by make from ./install.sh.
4915# Reject install programs that cannot install multiple files.
4916{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4917$as_echo_n "checking for a BSD-compatible install... " >&6; }
4918if test -z "$INSTALL"; then
4919if test "${ac_cv_path_install+set}" = set; then
4920 $as_echo_n "(cached) " >&6
4921else
4922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4923for as_dir in $PATH
4924do
4925 IFS=$as_save_IFS
4926 test -z "$as_dir" && as_dir=.
4927 # Account for people who put trailing slashes in PATH elements.
4928case $as_dir/ in
4929 ./ | .// | /cC/* | \
4930 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4931 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4932 /usr/ucb/* ) ;;
4933 *)
4934 # OSF1 and SCO ODT 3.0 have their own names for install.
4935 # Don't use installbsd from OSF since it installs stuff as root
4936 # by default.
4937 for ac_prog in ginstall scoinst install; do
4938 for ac_exec_ext in '' $ac_executable_extensions; do
4939 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4940 if test $ac_prog = install &&
4941 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4942 # AIX install. It has an incompatible calling convention.
4943 :
4944 elif test $ac_prog = install &&
4945 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4946 # program-specific install script used by HP pwplus--don't use.
4947 :
4948 else
4949 rm -rf conftest.one conftest.two conftest.dir
4950 echo one > conftest.one
4951 echo two > conftest.two
4952 mkdir conftest.dir
4953 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4954 test -s conftest.one && test -s conftest.two &&
4955 test -s conftest.dir/conftest.one &&
4956 test -s conftest.dir/conftest.two
4957 then
4958 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4959 break 3
4960 fi
4961 fi
4962 fi
4963 done
4964 done
4965 ;;
4966esac
4967
4968done
4969IFS=$as_save_IFS
4970
4971rm -rf conftest.one conftest.two conftest.dir
4972
4973fi
4974 if test "${ac_cv_path_install+set}" = set; then
4975 INSTALL=$ac_cv_path_install
4976 else
4977 # As a last resort, use the slow shell script. Don't cache a
4978 # value for INSTALL within a source directory, because that will
4979 # break other packages using the cache if that directory is
4980 # removed, or if the value is a relative name.
4981 INSTALL=$ac_install_sh
4982 fi
4983fi
4984{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
4985$as_echo "$INSTALL" >&6; }
4986
4987# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4988# It thinks the first close brace ends the variable substitution.
4989test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4990
4991test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4992
4993test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4994
4995
4996# Not every filesystem supports hard links
4997
4998if test -z "$LN" ; then
4999 case $ac_sys_system in
5000 CYGWIN*) LN="ln -s";;
5001 atheos*) LN="ln -s";;
5002 *) LN=ln;;
5003 esac
5004fi
5005
5006# Check for --with-pydebug
5007{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5
5008$as_echo_n "checking for --with-pydebug... " >&6; }
5009
5010# Check whether --with-pydebug was given.
5011if test "${with_pydebug+set}" = set; then
5012 withval=$with_pydebug;
5013if test "$withval" != no
5014then
5015
5016cat >>confdefs.h <<\_ACEOF
5017#define Py_DEBUG 1
5018_ACEOF
5019
5020 { $as_echo "$as_me:$LINENO: result: yes" >&5
5021$as_echo "yes" >&6; };
5022 Py_DEBUG='true'
5023else { $as_echo "$as_me:$LINENO: result: no" >&5
5024$as_echo "no" >&6; }; Py_DEBUG='false'
5025fi
5026else
5027 { $as_echo "$as_me:$LINENO: result: no" >&5
5028$as_echo "no" >&6; }
5029fi
5030
5031
5032# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5033# merged with this chunk of code?
5034
5035# Optimizer/debugger flags
5036# ------------------------
5037# (The following bit of code is complicated enough - please keep things
5038# indented properly. Just pretend you're editing Python code. ;-)
5039
5040# There are two parallel sets of case statements below, one that checks to
5041# see if OPT was set and one that does BASECFLAGS setting based upon
5042# compiler and platform. BASECFLAGS tweaks need to be made even if the
5043# user set OPT.
5044
5045# tweak OPT based on compiler and platform, only if the user didn't set
5046# it on the command line
5047
5048if test -z "$OPT"
5049then
5050 case $GCC in
5051 yes)
5052 if test "$CC" != 'g++' ; then
5053 STRICT_PROTO="-Wstrict-prototypes"
5054 fi
5055 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5056 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5057 WRAP="-fwrapv"
5058 fi
5059 case $ac_cv_prog_cc_g in
5060 yes)
5061 if test "$Py_DEBUG" = 'true' ; then
5062 # Optimization messes up debuggers, so turn it off for
5063 # debug builds.
5064 OPT="-g -Wall $STRICT_PROTO"
5065 else
5066 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5067 fi
5068 ;;
5069 *)
5070 OPT="-O3 -Wall $STRICT_PROTO"
5071 ;;
5072 esac
5073 case $ac_sys_system in
5074 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5075 ;;
5076 esac
5077 ;;
5078
5079 *)
5080 OPT="-O"
5081 ;;
5082 esac
5083
5084 # The current (beta) Monterey compiler dies with optimizations
5085 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
5086 case $ac_sys_system in
5087 Monterey*)
5088 OPT=""
5089 ;;
5090 esac
5091
5092fi
5093
5094
5095
5096# The -arch flags for universal builds on OSX
5097UNIVERSAL_ARCH_FLAGS=
5098
5099
5100# tweak BASECFLAGS based on compiler and platform
5101case $GCC in
5102yes)
5103 # Python violates C99 rules, by casting between incompatible
5104 # pointer types. GCC may generate bad code as a result of that,
5105 # so use -fno-strict-aliasing if supported.
5106 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
5107$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
5108 ac_save_cc="$CC"
5109 CC="$CC -fno-strict-aliasing"
5110 if test "$cross_compiling" = yes; then
5111 ac_cv_no_strict_aliasing_ok=no
5112else
5113 cat >conftest.$ac_ext <<_ACEOF
5114/* confdefs.h. */
5115_ACEOF
5116cat confdefs.h >>conftest.$ac_ext
5117cat >>conftest.$ac_ext <<_ACEOF
5118/* end confdefs.h. */
5119int main() { return 0; }
5120_ACEOF
5121rm -f conftest$ac_exeext
5122if { (ac_try="$ac_link"
5123case "(($ac_try" in
5124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5125 *) ac_try_echo=$ac_try;;
5126esac
5127eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5128$as_echo "$ac_try_echo") >&5
5129 (eval "$ac_link") 2>&5
5130 ac_status=$?
5131 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5132 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5133 { (case "(($ac_try" in
5134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5135 *) ac_try_echo=$ac_try;;
5136esac
5137eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5138$as_echo "$ac_try_echo") >&5
5139 (eval "$ac_try") 2>&5
5140 ac_status=$?
5141 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5142 (exit $ac_status); }; }; then
5143 ac_cv_no_strict_aliasing_ok=yes
5144else
5145 $as_echo "$as_me: program exited with status $ac_status" >&5
5146$as_echo "$as_me: failed program was:" >&5
5147sed 's/^/| /' conftest.$ac_ext >&5
5148
5149( exit $ac_status )
5150ac_cv_no_strict_aliasing_ok=no
5151fi
5152rm -rf conftest.dSYM
5153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5154fi
5155
5156
5157 CC="$ac_save_cc"
5158 { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
5159$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
5160 if test $ac_cv_no_strict_aliasing_ok = yes
5161 then
5162 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5163 fi
5164
5165 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5166 # support. Without this, treatment of subnormals doesn't follow
5167 # the standard.
5168 case $ac_sys_machine in
5169 alpha*)
5170 BASECFLAGS="$BASECFLAGS -mieee"
5171 ;;
5172 esac
5173
5174 case $ac_sys_system in
5175 SCO_SV*)
5176 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5177 ;;
5178 # is there any other compiler on Darwin besides gcc?
5179 Darwin*)
5180 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5181 # used to be here, but non-Apple gcc doesn't accept them.
5182
5183
5184 if test "${enable_universalsdk}"; then
5185 UNIVERSAL_ARCH_FLAGS=""
5186 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5187 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5188 ARCH_RUN_32BIT=""
5189
5190 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5191 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5192
5193 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5194 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5195 ARCH_RUN_32BIT="arch -i386 -ppc"
5196
5197 else
5198 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
5199$as_echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
5200 { (exit 1); exit 1; }; }
5201
5202 fi
5203
5204
5205 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
5206 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5207 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
5208 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5209 fi
5210 fi
5211
5212 # Calculate the right deployment target for this build.
5213 #
5214 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5215 if test ${cur_target} '>' 10.2; then
5216 cur_target=10.3
5217 fi
5218 if test "${UNIVERSAL_ARCHS}" = "all"; then
5219 # Ensure that the default platform for a 4-way
5220 # universal build is OSX 10.5, that's the first
5221 # OS release where 4-way builds make sense.
5222 cur_target='10.5'
5223 fi
5224 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5225
5226 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5227 # environment with a value that is the same as what we'll use
5228 # in the Makefile to ensure that we'll get the same compiler
5229 # environment during configure and build time.
5230 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5231 export MACOSX_DEPLOYMENT_TARGET
5232 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5233
5234 ;;
5235 OSF*)
5236 BASECFLAGS="$BASECFLAGS -mieee"
5237 ;;
5238 esac
5239 ;;
5240
5241*)
5242 case $ac_sys_system in
5243 OpenUNIX*|UnixWare*)
5244 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5245 ;;
5246 OSF*)
5247 BASECFLAGS="$BASECFLAGS -ieee -std"
5248 ;;
5249 SCO_SV*)
5250 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5251 ;;
5252 esac
5253 ;;
5254esac
5255
5256if test "$Py_DEBUG" = 'true'; then
5257 :
5258else
5259 OPT="-DNDEBUG $OPT"
5260fi
5261
5262if test "$ac_arch_flags"
5263then
5264 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5265fi
5266
5267# disable check for icc since it seems to pass, but generates a warning
5268if test "$CC" = icc
5269then
5270 ac_cv_opt_olimit_ok=no
5271fi
5272
5273{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
5274$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5275if test "${ac_cv_opt_olimit_ok+set}" = set; then
5276 $as_echo_n "(cached) " >&6
5277else
5278 ac_save_cc="$CC"
5279CC="$CC -OPT:Olimit=0"
5280if test "$cross_compiling" = yes; then
5281 ac_cv_opt_olimit_ok=no
5282else
5283 cat >conftest.$ac_ext <<_ACEOF
5284/* confdefs.h. */
5285_ACEOF
5286cat confdefs.h >>conftest.$ac_ext
5287cat >>conftest.$ac_ext <<_ACEOF
5288/* end confdefs.h. */
5289int main() { return 0; }
5290_ACEOF
5291rm -f conftest$ac_exeext
5292if { (ac_try="$ac_link"
5293case "(($ac_try" in
5294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5295 *) ac_try_echo=$ac_try;;
5296esac
5297eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5298$as_echo "$ac_try_echo") >&5
5299 (eval "$ac_link") 2>&5
5300 ac_status=$?
5301 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5302 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5303 { (case "(($ac_try" in
5304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5305 *) ac_try_echo=$ac_try;;
5306esac
5307eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5308$as_echo "$ac_try_echo") >&5
5309 (eval "$ac_try") 2>&5
5310 ac_status=$?
5311 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5312 (exit $ac_status); }; }; then
5313 ac_cv_opt_olimit_ok=yes
5314else
5315 $as_echo "$as_me: program exited with status $ac_status" >&5
5316$as_echo "$as_me: failed program was:" >&5
5317sed 's/^/| /' conftest.$ac_ext >&5
5318
5319( exit $ac_status )
5320ac_cv_opt_olimit_ok=no
5321fi
5322rm -rf conftest.dSYM
5323rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5324fi
5325
5326
5327CC="$ac_save_cc"
5328fi
5329
5330{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
5331$as_echo "$ac_cv_opt_olimit_ok" >&6; }
5332if test $ac_cv_opt_olimit_ok = yes; then
5333 case $ac_sys_system in
5334 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5335 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5336 # environment?
5337 Darwin*)
5338 ;;
5339 *)
5340 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5341 ;;
5342 esac
5343else
5344 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
5345$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5346 if test "${ac_cv_olimit_ok+set}" = set; then
5347 $as_echo_n "(cached) " >&6
5348else
5349 ac_save_cc="$CC"
5350 CC="$CC -Olimit 1500"
5351 if test "$cross_compiling" = yes; then
5352 ac_cv_olimit_ok=no
5353else
5354 cat >conftest.$ac_ext <<_ACEOF
5355/* confdefs.h. */
5356_ACEOF
5357cat confdefs.h >>conftest.$ac_ext
5358cat >>conftest.$ac_ext <<_ACEOF
5359/* end confdefs.h. */
5360int main() { return 0; }
5361_ACEOF
5362rm -f conftest$ac_exeext
5363if { (ac_try="$ac_link"
5364case "(($ac_try" in
5365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5366 *) ac_try_echo=$ac_try;;
5367esac
5368eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5369$as_echo "$ac_try_echo") >&5
5370 (eval "$ac_link") 2>&5
5371 ac_status=$?
5372 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5373 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5374 { (case "(($ac_try" in
5375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5376 *) ac_try_echo=$ac_try;;
5377esac
5378eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5379$as_echo "$ac_try_echo") >&5
5380 (eval "$ac_try") 2>&5
5381 ac_status=$?
5382 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5383 (exit $ac_status); }; }; then
5384 ac_cv_olimit_ok=yes
5385else
5386 $as_echo "$as_me: program exited with status $ac_status" >&5
5387$as_echo "$as_me: failed program was:" >&5
5388sed 's/^/| /' conftest.$ac_ext >&5
5389
5390( exit $ac_status )
5391ac_cv_olimit_ok=no
5392fi
5393rm -rf conftest.dSYM
5394rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5395fi
5396
5397
5398 CC="$ac_save_cc"
5399fi
5400
5401 { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5402$as_echo "$ac_cv_olimit_ok" >&6; }
5403 if test $ac_cv_olimit_ok = yes; then
5404 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5405 fi
5406fi
5407
5408# Check whether GCC supports PyArg_ParseTuple format
5409if test "$GCC" = "yes"
5410then
5411 { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5412$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
5413 save_CFLAGS=$CFLAGS
5414 CFLAGS="$CFLAGS -Werror"
5415 cat >conftest.$ac_ext <<_ACEOF
5416/* confdefs.h. */
5417_ACEOF
5418cat confdefs.h >>conftest.$ac_ext
5419cat >>conftest.$ac_ext <<_ACEOF
5420/* end confdefs.h. */
5421
5422 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5423
5424int
5425main ()
5426{
5427
5428 ;
5429 return 0;
5430}
5431_ACEOF
5432rm -f conftest.$ac_objext
5433if { (ac_try="$ac_compile"
5434case "(($ac_try" in
5435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5436 *) ac_try_echo=$ac_try;;
5437esac
5438eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5439$as_echo "$ac_try_echo") >&5
5440 (eval "$ac_compile") 2>conftest.er1
5441 ac_status=$?
5442 grep -v '^ *+' conftest.er1 >conftest.err
5443 rm -f conftest.er1
5444 cat conftest.err >&5
5445 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5446 (exit $ac_status); } && {
5447 test -z "$ac_c_werror_flag" ||
5448 test ! -s conftest.err
5449 } && test -s conftest.$ac_objext; then
5450
5451cat >>confdefs.h <<\_ACEOF
5452#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5453_ACEOF
5454
5455 { $as_echo "$as_me:$LINENO: result: yes" >&5
5456$as_echo "yes" >&6; }
5457else
5458 $as_echo "$as_me: failed program was:" >&5
5459sed 's/^/| /' conftest.$ac_ext >&5
5460
5461 { $as_echo "$as_me:$LINENO: result: no" >&5
5462$as_echo "no" >&6; }
5463
5464fi
5465
5466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5467 CFLAGS=$save_CFLAGS
5468fi
5469
5470# On some compilers, pthreads are available without further options
5471# (e.g. MacOS X). On some of these systems, the compiler will not
5472# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5473# So we have to see first whether pthreads are available without
5474# options before we can check whether -Kpthread improves anything.
5475{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5476$as_echo_n "checking whether pthreads are available without options... " >&6; }
5477if test "${ac_cv_pthread_is_default+set}" = set; then
5478 $as_echo_n "(cached) " >&6
5479else
5480 if test "$cross_compiling" = yes; then
5481 ac_cv_pthread_is_default=no
5482else
5483 cat >conftest.$ac_ext <<_ACEOF
5484/* confdefs.h. */
5485_ACEOF
5486cat confdefs.h >>conftest.$ac_ext
5487cat >>conftest.$ac_ext <<_ACEOF
5488/* end confdefs.h. */
5489
5490#include <pthread.h>
5491
5492void* routine(void* p){return NULL;}
5493
5494int main(){
5495 pthread_t p;
5496 if(pthread_create(&p,NULL,routine,NULL)!=0)
5497 return 1;
5498 (void)pthread_detach(p);
5499 return 0;
5500}
5501
5502_ACEOF
5503rm -f conftest$ac_exeext
5504if { (ac_try="$ac_link"
5505case "(($ac_try" in
5506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5507 *) ac_try_echo=$ac_try;;
5508esac
5509eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5510$as_echo "$ac_try_echo") >&5
5511 (eval "$ac_link") 2>&5
5512 ac_status=$?
5513 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5514 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5515 { (case "(($ac_try" in
5516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5517 *) ac_try_echo=$ac_try;;
5518esac
5519eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5520$as_echo "$ac_try_echo") >&5
5521 (eval "$ac_try") 2>&5
5522 ac_status=$?
5523 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5524 (exit $ac_status); }; }; then
5525
5526 ac_cv_pthread_is_default=yes
5527 ac_cv_kthread=no
5528 ac_cv_pthread=no
5529
5530else
5531 $as_echo "$as_me: program exited with status $ac_status" >&5
5532$as_echo "$as_me: failed program was:" >&5
5533sed 's/^/| /' conftest.$ac_ext >&5
5534
5535( exit $ac_status )
5536ac_cv_pthread_is_default=no
5537fi
5538rm -rf conftest.dSYM
5539rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5540fi
5541
5542
5543
5544fi
5545
5546{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5547$as_echo "$ac_cv_pthread_is_default" >&6; }
5548
5549
5550if test $ac_cv_pthread_is_default = yes
5551then
5552 ac_cv_kpthread=no
5553else
5554# -Kpthread, if available, provides the right #defines
5555# and linker options to make pthread_create available
5556# Some compilers won't report that they do not support -Kpthread,
5557# so we need to run a program to see whether it really made the
5558# function available.
5559{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5560$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5561if test "${ac_cv_kpthread+set}" = set; then
5562 $as_echo_n "(cached) " >&6
5563else
5564 ac_save_cc="$CC"
5565CC="$CC -Kpthread"
5566if test "$cross_compiling" = yes; then
5567 ac_cv_kpthread=no
5568else
5569 cat >conftest.$ac_ext <<_ACEOF
5570/* confdefs.h. */
5571_ACEOF
5572cat confdefs.h >>conftest.$ac_ext
5573cat >>conftest.$ac_ext <<_ACEOF
5574/* end confdefs.h. */
5575
5576#include <pthread.h>
5577
5578void* routine(void* p){return NULL;}
5579
5580int main(){
5581 pthread_t p;
5582 if(pthread_create(&p,NULL,routine,NULL)!=0)
5583 return 1;
5584 (void)pthread_detach(p);
5585 return 0;
5586}
5587
5588_ACEOF
5589rm -f conftest$ac_exeext
5590if { (ac_try="$ac_link"
5591case "(($ac_try" in
5592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5593 *) ac_try_echo=$ac_try;;
5594esac
5595eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5596$as_echo "$ac_try_echo") >&5
5597 (eval "$ac_link") 2>&5
5598 ac_status=$?
5599 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5601 { (case "(($ac_try" in
5602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5603 *) ac_try_echo=$ac_try;;
5604esac
5605eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5606$as_echo "$ac_try_echo") >&5
5607 (eval "$ac_try") 2>&5
5608 ac_status=$?
5609 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5610 (exit $ac_status); }; }; then
5611 ac_cv_kpthread=yes
5612else
5613 $as_echo "$as_me: program exited with status $ac_status" >&5
5614$as_echo "$as_me: failed program was:" >&5
5615sed 's/^/| /' conftest.$ac_ext >&5
5616
5617( exit $ac_status )
5618ac_cv_kpthread=no
5619fi
5620rm -rf conftest.dSYM
5621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5622fi
5623
5624
5625CC="$ac_save_cc"
5626fi
5627
5628{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5629$as_echo "$ac_cv_kpthread" >&6; }
5630fi
5631
5632if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5633then
5634# -Kthread, if available, provides the right #defines
5635# and linker options to make pthread_create available
5636# Some compilers won't report that they do not support -Kthread,
5637# so we need to run a program to see whether it really made the
5638# function available.
5639{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5640$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5641if test "${ac_cv_kthread+set}" = set; then
5642 $as_echo_n "(cached) " >&6
5643else
5644 ac_save_cc="$CC"
5645CC="$CC -Kthread"
5646if test "$cross_compiling" = yes; then
5647 ac_cv_kthread=no
5648else
5649 cat >conftest.$ac_ext <<_ACEOF
5650/* confdefs.h. */
5651_ACEOF
5652cat confdefs.h >>conftest.$ac_ext
5653cat >>conftest.$ac_ext <<_ACEOF
5654/* end confdefs.h. */
5655
5656#include <pthread.h>
5657
5658void* routine(void* p){return NULL;}
5659
5660int main(){
5661 pthread_t p;
5662 if(pthread_create(&p,NULL,routine,NULL)!=0)
5663 return 1;
5664 (void)pthread_detach(p);
5665 return 0;
5666}
5667
5668_ACEOF
5669rm -f conftest$ac_exeext
5670if { (ac_try="$ac_link"
5671case "(($ac_try" in
5672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5673 *) ac_try_echo=$ac_try;;
5674esac
5675eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5676$as_echo "$ac_try_echo") >&5
5677 (eval "$ac_link") 2>&5
5678 ac_status=$?
5679 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5680 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5681 { (case "(($ac_try" in
5682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5683 *) ac_try_echo=$ac_try;;
5684esac
5685eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5686$as_echo "$ac_try_echo") >&5
5687 (eval "$ac_try") 2>&5
5688 ac_status=$?
5689 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5690 (exit $ac_status); }; }; then
5691 ac_cv_kthread=yes
5692else
5693 $as_echo "$as_me: program exited with status $ac_status" >&5
5694$as_echo "$as_me: failed program was:" >&5
5695sed 's/^/| /' conftest.$ac_ext >&5
5696
5697( exit $ac_status )
5698ac_cv_kthread=no
5699fi
5700rm -rf conftest.dSYM
5701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5702fi
5703
5704
5705CC="$ac_save_cc"
5706fi
5707
5708{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5709$as_echo "$ac_cv_kthread" >&6; }
5710fi
5711
5712if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5713then
5714# -pthread, if available, provides the right #defines
5715# and linker options to make pthread_create available
5716# Some compilers won't report that they do not support -pthread,
5717# so we need to run a program to see whether it really made the
5718# function available.
5719{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5720$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5721if test "${ac_cv_thread+set}" = set; then
5722 $as_echo_n "(cached) " >&6
5723else
5724 ac_save_cc="$CC"
5725CC="$CC -pthread"
5726if test "$cross_compiling" = yes; then
5727 ac_cv_pthread=no
5728else
5729 cat >conftest.$ac_ext <<_ACEOF
5730/* confdefs.h. */
5731_ACEOF
5732cat confdefs.h >>conftest.$ac_ext
5733cat >>conftest.$ac_ext <<_ACEOF
5734/* end confdefs.h. */
5735
5736#include <pthread.h>
5737
5738void* routine(void* p){return NULL;}
5739
5740int main(){
5741 pthread_t p;
5742 if(pthread_create(&p,NULL,routine,NULL)!=0)
5743 return 1;
5744 (void)pthread_detach(p);
5745 return 0;
5746}
5747
5748_ACEOF
5749rm -f conftest$ac_exeext
5750if { (ac_try="$ac_link"
5751case "(($ac_try" in
5752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5753 *) ac_try_echo=$ac_try;;
5754esac
5755eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5756$as_echo "$ac_try_echo") >&5
5757 (eval "$ac_link") 2>&5
5758 ac_status=$?
5759 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5760 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5761 { (case "(($ac_try" in
5762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5763 *) ac_try_echo=$ac_try;;
5764esac
5765eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5766$as_echo "$ac_try_echo") >&5
5767 (eval "$ac_try") 2>&5
5768 ac_status=$?
5769 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5770 (exit $ac_status); }; }; then
5771 ac_cv_pthread=yes
5772else
5773 $as_echo "$as_me: program exited with status $ac_status" >&5
5774$as_echo "$as_me: failed program was:" >&5
5775sed 's/^/| /' conftest.$ac_ext >&5
5776
5777( exit $ac_status )
5778ac_cv_pthread=no
5779fi
5780rm -rf conftest.dSYM
5781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5782fi
5783
5784
5785CC="$ac_save_cc"
5786fi
5787
5788{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5789$as_echo "$ac_cv_pthread" >&6; }
5790fi
5791
5792# If we have set a CC compiler flag for thread support then
5793# check if it works for CXX, too.
5794ac_cv_cxx_thread=no
5795if test ! -z "$CXX"
5796then
5797{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5798$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
5799ac_save_cxx="$CXX"
5800
5801if test "$ac_cv_kpthread" = "yes"
5802then
5803 CXX="$CXX -Kpthread"
5804 ac_cv_cxx_thread=yes
5805elif test "$ac_cv_kthread" = "yes"
5806then
5807 CXX="$CXX -Kthread"
5808 ac_cv_cxx_thread=yes
5809elif test "$ac_cv_pthread" = "yes"
5810then
5811 CXX="$CXX -pthread"
5812 ac_cv_cxx_thread=yes
5813fi
5814
5815if test $ac_cv_cxx_thread = yes
5816then
5817 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5818 $CXX -c conftest.$ac_ext 2>&5
5819 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5820 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5821 then
5822 ac_cv_cxx_thread=yes
5823 else
5824 ac_cv_cxx_thread=no
5825 fi
5826 rm -fr conftest*
5827fi
5828{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5829$as_echo "$ac_cv_cxx_thread" >&6; }
5830fi
5831CXX="$ac_save_cxx"
5832
5833
5834# checks for header files
5835{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5836$as_echo_n "checking for ANSI C header files... " >&6; }
5837if test "${ac_cv_header_stdc+set}" = set; then
5838 $as_echo_n "(cached) " >&6
5839else
5840 cat >conftest.$ac_ext <<_ACEOF
5841/* confdefs.h. */
5842_ACEOF
5843cat confdefs.h >>conftest.$ac_ext
5844cat >>conftest.$ac_ext <<_ACEOF
5845/* end confdefs.h. */
5846#include <stdlib.h>
5847#include <stdarg.h>
5848#include <string.h>
5849#include <float.h>
5850
5851int
5852main ()
5853{
5854
5855 ;
5856 return 0;
5857}
5858_ACEOF
5859rm -f conftest.$ac_objext
5860if { (ac_try="$ac_compile"
5861case "(($ac_try" in
5862 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5863 *) ac_try_echo=$ac_try;;
5864esac
5865eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5866$as_echo "$ac_try_echo") >&5
5867 (eval "$ac_compile") 2>conftest.er1
5868 ac_status=$?
5869 grep -v '^ *+' conftest.er1 >conftest.err
5870 rm -f conftest.er1
5871 cat conftest.err >&5
5872 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5873 (exit $ac_status); } && {
5874 test -z "$ac_c_werror_flag" ||
5875 test ! -s conftest.err
5876 } && test -s conftest.$ac_objext; then
5877 ac_cv_header_stdc=yes
5878else
5879 $as_echo "$as_me: failed program was:" >&5
5880sed 's/^/| /' conftest.$ac_ext >&5
5881
5882 ac_cv_header_stdc=no
5883fi
5884
5885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5886
5887if test $ac_cv_header_stdc = yes; then
5888 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5889 cat >conftest.$ac_ext <<_ACEOF
5890/* confdefs.h. */
5891_ACEOF
5892cat confdefs.h >>conftest.$ac_ext
5893cat >>conftest.$ac_ext <<_ACEOF
5894/* end confdefs.h. */
5895#include <string.h>
5896
5897_ACEOF
5898if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5899 $EGREP "memchr" >/dev/null 2>&1; then
5900 :
5901else
5902 ac_cv_header_stdc=no
5903fi
5904rm -f conftest*
5905
5906fi
5907
5908if test $ac_cv_header_stdc = yes; then
5909 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5910 cat >conftest.$ac_ext <<_ACEOF
5911/* confdefs.h. */
5912_ACEOF
5913cat confdefs.h >>conftest.$ac_ext
5914cat >>conftest.$ac_ext <<_ACEOF
5915/* end confdefs.h. */
5916#include <stdlib.h>
5917
5918_ACEOF
5919if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5920 $EGREP "free" >/dev/null 2>&1; then
5921 :
5922else
5923 ac_cv_header_stdc=no
5924fi
5925rm -f conftest*
5926
5927fi
5928
5929if test $ac_cv_header_stdc = yes; then
5930 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5931 if test "$cross_compiling" = yes; then
5932 :
5933else
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 <ctype.h>
5941#include <stdlib.h>
5942#if ((' ' & 0x0FF) == 0x020)
5943# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5944# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5945#else
5946# define ISLOWER(c) \
5947 (('a' <= (c) && (c) <= 'i') \
5948 || ('j' <= (c) && (c) <= 'r') \
5949 || ('s' <= (c) && (c) <= 'z'))
5950# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5951#endif
5952
5953#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5954int
5955main ()
5956{
5957 int i;
5958 for (i = 0; i < 256; i++)
5959 if (XOR (islower (i), ISLOWER (i))
5960 || toupper (i) != TOUPPER (i))
5961 return 2;
5962 return 0;
5963}
5964_ACEOF
5965rm -f conftest$ac_exeext
5966if { (ac_try="$ac_link"
5967case "(($ac_try" in
5968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5969 *) ac_try_echo=$ac_try;;
5970esac
5971eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5972$as_echo "$ac_try_echo") >&5
5973 (eval "$ac_link") 2>&5
5974 ac_status=$?
5975 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5976 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5977 { (case "(($ac_try" in
5978 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5979 *) ac_try_echo=$ac_try;;
5980esac
5981eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5982$as_echo "$ac_try_echo") >&5
5983 (eval "$ac_try") 2>&5
5984 ac_status=$?
5985 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5986 (exit $ac_status); }; }; then
5987 :
5988else
5989 $as_echo "$as_me: program exited with status $ac_status" >&5
5990$as_echo "$as_me: failed program was:" >&5
5991sed 's/^/| /' conftest.$ac_ext >&5
5992
5993( exit $ac_status )
5994ac_cv_header_stdc=no
5995fi
5996rm -rf conftest.dSYM
5997rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5998fi
5999
6000
6001fi
6002fi
6003{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6004$as_echo "$ac_cv_header_stdc" >&6; }
6005if test $ac_cv_header_stdc = yes; then
6006
6007cat >>confdefs.h <<\_ACEOF
6008#define STDC_HEADERS 1
6009_ACEOF
6010
6011fi
6012
6013
Martin v. Löwis11437992002-04-12 09:54:03 +00006014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
Anthony Baxter8a560de2004-10-13 15:30:56 +00006049
Martin v. Löwisc3001752005-01-23 09:27:24 +00006050
Martin v. Löwis11017b12006-01-14 18:12:57 +00006051
Thomas Wouters477c8d52006-05-27 19:21:47 +00006052
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006053
6054
6055
6056
6057
6058
6059
6060
Thomas Wouters89f507f2006-12-13 04:49:30 +00006061
Christian Heimes043d6f62008-01-07 17:19:16 +00006062
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006063
6064
Christian Heimesbbe741d2008-03-28 10:53:29 +00006065
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006066
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006067for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6068fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006069ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006070shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006071unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006072sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6073sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006074sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006075sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006076sys/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 +00006077sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00006078bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006079do
Antoine Pitroub52ec782009-01-25 16:34:23 +00006080as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006081if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006082 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6083$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006084if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006085 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006086fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006087ac_res=`eval 'as_val=${'$as_ac_Header'}
6088 $as_echo "$as_val"'`
6089 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6090$as_echo "$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006091else
Martin v. Löwis11437992002-04-12 09:54:03 +00006092 # Is the header compilable?
Antoine Pitroub52ec782009-01-25 16:34:23 +00006093{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6094$as_echo_n "checking $ac_header usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006095cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006096/* confdefs.h. */
6097_ACEOF
6098cat confdefs.h >>conftest.$ac_ext
6099cat >>conftest.$ac_ext <<_ACEOF
6100/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006101$ac_includes_default
6102#include <$ac_header>
6103_ACEOF
6104rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006105if { (ac_try="$ac_compile"
6106case "(($ac_try" in
6107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6108 *) ac_try_echo=$ac_try;;
6109esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006110eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6111$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006112 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006113 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006114 grep -v '^ *+' conftest.er1 >conftest.err
6115 rm -f conftest.er1
6116 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006117 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006118 (exit $ac_status); } && {
6119 test -z "$ac_c_werror_flag" ||
6120 test ! -s conftest.err
6121 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006122 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00006123else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006124 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006125sed 's/^/| /' conftest.$ac_ext >&5
6126
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006127 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006128fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006129
6130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +00006131{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6132$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006133
6134# Is the header present?
Antoine Pitroub52ec782009-01-25 16:34:23 +00006135{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6136$as_echo_n "checking $ac_header presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006137cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006138/* confdefs.h. */
6139_ACEOF
6140cat confdefs.h >>conftest.$ac_ext
6141cat >>conftest.$ac_ext <<_ACEOF
6142/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006143#include <$ac_header>
6144_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006145if { (ac_try="$ac_cpp conftest.$ac_ext"
6146case "(($ac_try" in
6147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6148 *) ac_try_echo=$ac_try;;
6149esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006150eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6151$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006152 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006153 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006154 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00006155 rm -f conftest.er1
6156 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006157 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006158 (exit $ac_status); } >/dev/null && {
6159 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6160 test ! -s conftest.err
6161 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006162 ac_header_preproc=yes
6163else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006164 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006165sed 's/^/| /' conftest.$ac_ext >&5
6166
Martin v. Löwis11437992002-04-12 09:54:03 +00006167 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006168fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006169
Martin v. Löwis11437992002-04-12 09:54:03 +00006170rm -f conftest.err conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +00006171{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6172$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006173
6174# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006175case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6176 yes:no: )
Antoine Pitroub52ec782009-01-25 16:34:23 +00006177 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6178$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6179 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6180$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006181 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006182 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006183 no:yes:* )
Antoine Pitroub52ec782009-01-25 16:34:23 +00006184 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6185$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6186 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6187$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6188 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6189$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6190 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6191$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6192 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6193$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6194 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6195$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006196 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006197## ------------------------------------------------ ##
6198## Report this to http://www.python.org/python-bugs ##
6199## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006200_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006201 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006202 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00006203esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006204{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6205$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006206if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006207 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006208else
Skip Montanarof0d5f792004-08-15 14:08:23 +00006209 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006210fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006211ac_res=`eval 'as_val=${'$as_ac_Header'}
6212 $as_echo "$as_val"'`
6213 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6214$as_echo "$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006215
6216fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006217as_val=`eval 'as_val=${'$as_ac_Header'}
6218 $as_echo "$as_val"'`
6219 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006220 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +00006221#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006222_ACEOF
6223
6224fi
6225
Guido van Rossum627b2d71993-12-24 10:39:16 +00006226done
6227
Martin v. Löwis11437992002-04-12 09:54:03 +00006228
6229
6230
6231
6232
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006233ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006234for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Antoine Pitroub52ec782009-01-25 16:34:23 +00006235 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6236{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
6237$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006238if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006239 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006240else
Martin v. Löwis11437992002-04-12 09:54:03 +00006241 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006242/* confdefs.h. */
6243_ACEOF
6244cat confdefs.h >>conftest.$ac_ext
6245cat >>conftest.$ac_ext <<_ACEOF
6246/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006247#include <sys/types.h>
6248#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006249
Martin v. Löwis11437992002-04-12 09:54:03 +00006250int
6251main ()
6252{
6253if ((DIR *) 0)
6254return 0;
6255 ;
6256 return 0;
6257}
6258_ACEOF
6259rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260if { (ac_try="$ac_compile"
6261case "(($ac_try" in
6262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6263 *) ac_try_echo=$ac_try;;
6264esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006265eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6266$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006267 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006269 grep -v '^ *+' conftest.er1 >conftest.err
6270 rm -f conftest.er1
6271 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006272 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006273 (exit $ac_status); } && {
6274 test -z "$ac_c_werror_flag" ||
6275 test ! -s conftest.err
6276 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006277 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006278else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006279 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006280sed 's/^/| /' conftest.$ac_ext >&5
6281
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006282 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006283fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006284
6285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006286fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006287ac_res=`eval 'as_val=${'$as_ac_Header'}
6288 $as_echo "$as_val"'`
6289 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6290$as_echo "$ac_res" >&6; }
6291as_val=`eval 'as_val=${'$as_ac_Header'}
6292 $as_echo "$as_val"'`
6293 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006294 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +00006295#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006296_ACEOF
6297
6298ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006299fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006300
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006301done
6302# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6303if test $ac_header_dirent = dirent.h; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006304 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6305$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006306if test "${ac_cv_search_opendir+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006307 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006308else
Martin v. Löwis11437992002-04-12 09:54:03 +00006309 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006310cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006311/* confdefs.h. */
6312_ACEOF
6313cat confdefs.h >>conftest.$ac_ext
6314cat >>conftest.$ac_ext <<_ACEOF
6315/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006316
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006317/* Override any GCC internal prototype to avoid an error.
6318 Use char because int might match the return type of a GCC
6319 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006320#ifdef __cplusplus
6321extern "C"
6322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006323char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006324int
6325main ()
6326{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006327return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006328 ;
6329 return 0;
6330}
6331_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006332for ac_lib in '' dir; do
6333 if test -z "$ac_lib"; then
6334 ac_res="none required"
6335 else
6336 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006337 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006338 fi
6339 rm -f conftest.$ac_objext conftest$ac_exeext
6340if { (ac_try="$ac_link"
6341case "(($ac_try" in
6342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6343 *) ac_try_echo=$ac_try;;
6344esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006345eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6346$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006347 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006348 ac_status=$?
6349 grep -v '^ *+' conftest.er1 >conftest.err
6350 rm -f conftest.er1
6351 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006352 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006353 (exit $ac_status); } && {
6354 test -z "$ac_c_werror_flag" ||
6355 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +00006356 } && test -s conftest$ac_exeext && {
6357 test "$cross_compiling" = yes ||
6358 $as_test_x conftest$ac_exeext
6359 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006360 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006361else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006362 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006363sed 's/^/| /' conftest.$ac_ext >&5
6364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006365
Thomas Wouters477c8d52006-05-27 19:21:47 +00006366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006367
Antoine Pitroub52ec782009-01-25 16:34:23 +00006368rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6370 conftest$ac_exeext
6371 if test "${ac_cv_search_opendir+set}" = set; then
6372 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006373fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006374done
6375if test "${ac_cv_search_opendir+set}" = set; then
6376 :
6377else
6378 ac_cv_search_opendir=no
6379fi
6380rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006381LIBS=$ac_func_search_save_LIBS
6382fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006383{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6384$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006385ac_res=$ac_cv_search_opendir
6386if test "$ac_res" != no; then
6387 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006388
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006389fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006390
Michael W. Hudson54241132001-12-07 15:38:26 +00006391else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006392 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6393$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006394if test "${ac_cv_search_opendir+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006395 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006396else
6397 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006398cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006399/* confdefs.h. */
6400_ACEOF
6401cat confdefs.h >>conftest.$ac_ext
6402cat >>conftest.$ac_ext <<_ACEOF
6403/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006404
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006405/* Override any GCC internal prototype to avoid an error.
6406 Use char because int might match the return type of a GCC
6407 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006408#ifdef __cplusplus
6409extern "C"
6410#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006411char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006412int
6413main ()
6414{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006415return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006416 ;
6417 return 0;
6418}
6419_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006420for ac_lib in '' x; do
6421 if test -z "$ac_lib"; then
6422 ac_res="none required"
6423 else
6424 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006425 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006426 fi
6427 rm -f conftest.$ac_objext conftest$ac_exeext
6428if { (ac_try="$ac_link"
6429case "(($ac_try" in
6430 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6431 *) ac_try_echo=$ac_try;;
6432esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006433eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6434$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006435 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006436 ac_status=$?
6437 grep -v '^ *+' conftest.er1 >conftest.err
6438 rm -f conftest.er1
6439 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006440 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006441 (exit $ac_status); } && {
6442 test -z "$ac_c_werror_flag" ||
6443 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +00006444 } && test -s conftest$ac_exeext && {
6445 test "$cross_compiling" = yes ||
6446 $as_test_x conftest$ac_exeext
6447 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006448 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006449else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006450 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006451sed 's/^/| /' conftest.$ac_ext >&5
6452
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006453
Thomas Wouters477c8d52006-05-27 19:21:47 +00006454fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006455
Antoine Pitroub52ec782009-01-25 16:34:23 +00006456rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006457rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6458 conftest$ac_exeext
6459 if test "${ac_cv_search_opendir+set}" = set; then
6460 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006461fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006462done
6463if test "${ac_cv_search_opendir+set}" = set; then
6464 :
6465else
6466 ac_cv_search_opendir=no
6467fi
6468rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006469LIBS=$ac_func_search_save_LIBS
6470fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006471{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6472$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006473ac_res=$ac_cv_search_opendir
6474if test "$ac_res" != no; then
6475 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006476
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006477fi
6478
6479fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006480
Antoine Pitroub52ec782009-01-25 16:34:23 +00006481{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6482$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006483if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006484 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006485else
6486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006487/* confdefs.h. */
6488_ACEOF
6489cat confdefs.h >>conftest.$ac_ext
6490cat >>conftest.$ac_ext <<_ACEOF
6491/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006492#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006493int
6494main ()
6495{
6496return makedev(0, 0);
6497 ;
6498 return 0;
6499}
6500_ACEOF
6501rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006502if { (ac_try="$ac_link"
6503case "(($ac_try" in
6504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6505 *) ac_try_echo=$ac_try;;
6506esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006507eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6508$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006509 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006511 grep -v '^ *+' conftest.er1 >conftest.err
6512 rm -f conftest.er1
6513 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006514 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006515 (exit $ac_status); } && {
6516 test -z "$ac_c_werror_flag" ||
6517 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +00006518 } && test -s conftest$ac_exeext && {
6519 test "$cross_compiling" = yes ||
6520 $as_test_x conftest$ac_exeext
6521 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006522 ac_cv_header_sys_types_h_makedev=yes
6523else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006524 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006525sed 's/^/| /' conftest.$ac_ext >&5
6526
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006527 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006529
Antoine Pitroub52ec782009-01-25 16:34:23 +00006530rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006531rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006532 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006533
6534fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006535{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6536$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006537
6538if test $ac_cv_header_sys_types_h_makedev = no; then
6539if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006540 { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6541$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006542if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006543 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006544fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006545{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6546$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006547else
6548 # Is the header compilable?
Antoine Pitroub52ec782009-01-25 16:34:23 +00006549{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6550$as_echo_n "checking sys/mkdev.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006551cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006552/* confdefs.h. */
6553_ACEOF
6554cat confdefs.h >>conftest.$ac_ext
6555cat >>conftest.$ac_ext <<_ACEOF
6556/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006557$ac_includes_default
6558#include <sys/mkdev.h>
6559_ACEOF
6560rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006561if { (ac_try="$ac_compile"
6562case "(($ac_try" in
6563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6564 *) ac_try_echo=$ac_try;;
6565esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006566eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6567$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006570 grep -v '^ *+' conftest.er1 >conftest.err
6571 rm -f conftest.er1
6572 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006573 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006574 (exit $ac_status); } && {
6575 test -z "$ac_c_werror_flag" ||
6576 test ! -s conftest.err
6577 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006578 ac_header_compiler=yes
6579else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006580 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006581sed 's/^/| /' conftest.$ac_ext >&5
6582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006583 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006585
6586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +00006587{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6588$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006589
6590# Is the header present?
Antoine Pitroub52ec782009-01-25 16:34:23 +00006591{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6592$as_echo_n "checking sys/mkdev.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006593cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006594/* confdefs.h. */
6595_ACEOF
6596cat confdefs.h >>conftest.$ac_ext
6597cat >>conftest.$ac_ext <<_ACEOF
6598/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006599#include <sys/mkdev.h>
6600_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006601if { (ac_try="$ac_cpp conftest.$ac_ext"
6602case "(($ac_try" in
6603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6604 *) ac_try_echo=$ac_try;;
6605esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006606eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6607$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006608 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006609 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006610 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006611 rm -f conftest.er1
6612 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006613 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006614 (exit $ac_status); } >/dev/null && {
6615 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6616 test ! -s conftest.err
6617 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006618 ac_header_preproc=yes
6619else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006620 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006621sed 's/^/| /' conftest.$ac_ext >&5
6622
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006623 ac_header_preproc=no
6624fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006625
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006626rm -f conftest.err conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +00006627{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6628$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006629
6630# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006631case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6632 yes:no: )
Antoine Pitroub52ec782009-01-25 16:34:23 +00006633 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6634$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6635 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6636$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006637 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006638 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006639 no:yes:* )
Antoine Pitroub52ec782009-01-25 16:34:23 +00006640 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6641$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6642 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6643$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6644 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6645$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6646 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6647$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6648 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6649$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6650 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6651$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006652 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006653## ------------------------------------------------ ##
6654## Report this to http://www.python.org/python-bugs ##
6655## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006656_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006657 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006658 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006659esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006660{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6661$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006662if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006663 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006664else
6665 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6666fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006667{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6668$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006669
6670fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006671if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006672
6673cat >>confdefs.h <<\_ACEOF
6674#define MAJOR_IN_MKDEV 1
6675_ACEOF
6676
6677fi
6678
6679
6680
6681 if test $ac_cv_header_sys_mkdev_h = no; then
6682 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006683 { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6684$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006685if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006686 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006687fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006688{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6689$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006690else
6691 # Is the header compilable?
Antoine Pitroub52ec782009-01-25 16:34:23 +00006692{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6693$as_echo_n "checking sys/sysmacros.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006694cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006695/* confdefs.h. */
6696_ACEOF
6697cat confdefs.h >>conftest.$ac_ext
6698cat >>conftest.$ac_ext <<_ACEOF
6699/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006700$ac_includes_default
6701#include <sys/sysmacros.h>
6702_ACEOF
6703rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006704if { (ac_try="$ac_compile"
6705case "(($ac_try" in
6706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6707 *) ac_try_echo=$ac_try;;
6708esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006709eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6710$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006713 grep -v '^ *+' conftest.er1 >conftest.err
6714 rm -f conftest.er1
6715 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006716 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006717 (exit $ac_status); } && {
6718 test -z "$ac_c_werror_flag" ||
6719 test ! -s conftest.err
6720 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006721 ac_header_compiler=yes
6722else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006723 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006724sed 's/^/| /' conftest.$ac_ext >&5
6725
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006726 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006727fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006728
6729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +00006730{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6731$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006732
6733# Is the header present?
Antoine Pitroub52ec782009-01-25 16:34:23 +00006734{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6735$as_echo_n "checking sys/sysmacros.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006737/* confdefs.h. */
6738_ACEOF
6739cat confdefs.h >>conftest.$ac_ext
6740cat >>conftest.$ac_ext <<_ACEOF
6741/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006742#include <sys/sysmacros.h>
6743_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006744if { (ac_try="$ac_cpp conftest.$ac_ext"
6745case "(($ac_try" in
6746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6747 *) ac_try_echo=$ac_try;;
6748esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006749eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6750$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006751 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006752 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006753 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006754 rm -f conftest.er1
6755 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006756 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006757 (exit $ac_status); } >/dev/null && {
6758 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6759 test ! -s conftest.err
6760 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006761 ac_header_preproc=yes
6762else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006763 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006764sed 's/^/| /' conftest.$ac_ext >&5
6765
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006766 ac_header_preproc=no
6767fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006768
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006769rm -f conftest.err conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +00006770{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6771$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006772
6773# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006774case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6775 yes:no: )
Antoine Pitroub52ec782009-01-25 16:34:23 +00006776 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6777$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6778 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6779$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006780 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006781 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006782 no:yes:* )
Antoine Pitroub52ec782009-01-25 16:34:23 +00006783 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6784$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6785 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6786$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6787 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6788$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6789 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6790$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6791 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6792$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6793 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6794$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006795 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006796## ------------------------------------------------ ##
6797## Report this to http://www.python.org/python-bugs ##
6798## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006799_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006800 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006801 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006802esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006803{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6804$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006805if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006806 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006807else
6808 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6809fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006810{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6811$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006812
6813fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006814if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006815
6816cat >>confdefs.h <<\_ACEOF
6817#define MAJOR_IN_SYSMACROS 1
6818_ACEOF
6819
6820fi
6821
6822
6823 fi
6824fi
6825
Michael W. Hudson54241132001-12-07 15:38:26 +00006826
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006827# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006828
6829for ac_header in term.h
6830do
Antoine Pitroub52ec782009-01-25 16:34:23 +00006831as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6832{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6833$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006834if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006835 $as_echo_n "(cached) " >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006836else
6837 cat >conftest.$ac_ext <<_ACEOF
6838/* confdefs.h. */
6839_ACEOF
6840cat confdefs.h >>conftest.$ac_ext
6841cat >>conftest.$ac_ext <<_ACEOF
6842/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006843
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006844#ifdef HAVE_CURSES_H
6845#include <curses.h>
6846#endif
6847
6848
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006849#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006850_ACEOF
6851rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006852if { (ac_try="$ac_compile"
6853case "(($ac_try" in
6854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6855 *) ac_try_echo=$ac_try;;
6856esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006857eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6858$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006859 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006860 ac_status=$?
6861 grep -v '^ *+' conftest.er1 >conftest.err
6862 rm -f conftest.er1
6863 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006864 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006865 (exit $ac_status); } && {
6866 test -z "$ac_c_werror_flag" ||
6867 test ! -s conftest.err
6868 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006869 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006870else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006871 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006872sed 's/^/| /' conftest.$ac_ext >&5
6873
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006874 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006876
6877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006878fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006879ac_res=`eval 'as_val=${'$as_ac_Header'}
6880 $as_echo "$as_val"'`
6881 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6882$as_echo "$ac_res" >&6; }
6883as_val=`eval 'as_val=${'$as_ac_Header'}
6884 $as_echo "$as_val"'`
6885 if test "x$as_val" = x""yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006886 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +00006887#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006888_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006889
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006890fi
6891
6892done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006893
6894
Martin v. Löwis11017b12006-01-14 18:12:57 +00006895# On Linux, netlink.h requires asm/types.h
6896
6897for ac_header in linux/netlink.h
6898do
Antoine Pitroub52ec782009-01-25 16:34:23 +00006899as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6900{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6901$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006902if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00006903 $as_echo_n "(cached) " >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006904else
6905 cat >conftest.$ac_ext <<_ACEOF
6906/* confdefs.h. */
6907_ACEOF
6908cat confdefs.h >>conftest.$ac_ext
6909cat >>conftest.$ac_ext <<_ACEOF
6910/* end confdefs.h. */
6911
6912#ifdef HAVE_ASM_TYPES_H
6913#include <asm/types.h>
6914#endif
6915#ifdef HAVE_SYS_SOCKET_H
6916#include <sys/socket.h>
6917#endif
6918
6919
6920#include <$ac_header>
6921_ACEOF
6922rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006923if { (ac_try="$ac_compile"
6924case "(($ac_try" in
6925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6926 *) ac_try_echo=$ac_try;;
6927esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00006928eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6929$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006931 ac_status=$?
6932 grep -v '^ *+' conftest.er1 >conftest.err
6933 rm -f conftest.er1
6934 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00006935 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006936 (exit $ac_status); } && {
6937 test -z "$ac_c_werror_flag" ||
6938 test ! -s conftest.err
6939 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006940 eval "$as_ac_Header=yes"
6941else
Antoine Pitroub52ec782009-01-25 16:34:23 +00006942 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006943sed 's/^/| /' conftest.$ac_ext >&5
6944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006945 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006946fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006947
6948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006949fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00006950ac_res=`eval 'as_val=${'$as_ac_Header'}
6951 $as_echo "$as_val"'`
6952 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6953$as_echo "$ac_res" >&6; }
6954as_val=`eval 'as_val=${'$as_ac_Header'}
6955 $as_echo "$as_val"'`
6956 if test "x$as_val" = x""yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006957 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +00006958#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006959_ACEOF
6960
6961fi
6962
6963done
6964
6965
Guido van Rossum627b2d71993-12-24 10:39:16 +00006966# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00006967was_it_defined=no
Antoine Pitroub52ec782009-01-25 16:34:23 +00006968{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
6969$as_echo_n "checking for clock_t in time.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006970cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006971/* confdefs.h. */
6972_ACEOF
6973cat confdefs.h >>conftest.$ac_ext
6974cat >>conftest.$ac_ext <<_ACEOF
6975/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006976#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006977
6978_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006979if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006980 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00006981 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00006982else
Martin v. Löwis11437992002-04-12 09:54:03 +00006983
6984
6985cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006986#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00006987_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006988
Martin v. Löwisc45929e2002-04-06 10:10:49 +00006989
Guido van Rossum627b2d71993-12-24 10:39:16 +00006990fi
6991rm -f conftest*
6992
Antoine Pitroub52ec782009-01-25 16:34:23 +00006993{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
6994$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00006995
Neal Norwitz11690112002-07-30 01:08:28 +00006996# Check whether using makedev requires defining _OSF_SOURCE
Antoine Pitroub52ec782009-01-25 16:34:23 +00006997{ $as_echo "$as_me:$LINENO: checking for makedev" >&5
6998$as_echo_n "checking for makedev... " >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00006999cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007000/* confdefs.h. */
7001_ACEOF
7002cat confdefs.h >>conftest.$ac_ext
7003cat >>conftest.$ac_ext <<_ACEOF
7004/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007005#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007006int
7007main ()
7008{
7009 makedev(0, 0)
7010 ;
7011 return 0;
7012}
7013_ACEOF
7014rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007015if { (ac_try="$ac_link"
7016case "(($ac_try" in
7017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7018 *) ac_try_echo=$ac_try;;
7019esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007020eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7021$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007022 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007024 grep -v '^ *+' conftest.er1 >conftest.err
7025 rm -f conftest.er1
7026 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007027 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007028 (exit $ac_status); } && {
7029 test -z "$ac_c_werror_flag" ||
7030 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +00007031 } && test -s conftest$ac_exeext && {
7032 test "$cross_compiling" = yes ||
7033 $as_test_x conftest$ac_exeext
7034 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007035 ac_cv_has_makedev=yes
7036else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007037 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007038sed 's/^/| /' conftest.$ac_ext >&5
7039
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007040 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007042
Antoine Pitroub52ec782009-01-25 16:34:23 +00007043rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007044rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007045 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007046if test "$ac_cv_has_makedev" = "no"; then
7047 # we didn't link, try if _OSF_SOURCE will allow us to link
7048 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007049/* confdefs.h. */
7050_ACEOF
7051cat confdefs.h >>conftest.$ac_ext
7052cat >>conftest.$ac_ext <<_ACEOF
7053/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007054
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007055#define _OSF_SOURCE 1
7056#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007057
Neal Norwitz11690112002-07-30 01:08:28 +00007058int
7059main ()
7060{
7061 makedev(0, 0)
7062 ;
7063 return 0;
7064}
7065_ACEOF
7066rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007067if { (ac_try="$ac_link"
7068case "(($ac_try" in
7069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7070 *) ac_try_echo=$ac_try;;
7071esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007072eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7073$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007074 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007075 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007076 grep -v '^ *+' conftest.er1 >conftest.err
7077 rm -f conftest.er1
7078 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007079 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007080 (exit $ac_status); } && {
7081 test -z "$ac_c_werror_flag" ||
7082 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +00007083 } && test -s conftest$ac_exeext && {
7084 test "$cross_compiling" = yes ||
7085 $as_test_x conftest$ac_exeext
7086 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007087 ac_cv_has_makedev=yes
7088else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007089 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007090sed 's/^/| /' conftest.$ac_ext >&5
7091
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007093fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094
Antoine Pitroub52ec782009-01-25 16:34:23 +00007095rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007096rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007097 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007098 if test "$ac_cv_has_makedev" = "yes"; then
7099
7100cat >>confdefs.h <<\_ACEOF
7101#define _OSF_SOURCE 1
7102_ACEOF
7103
7104 fi
7105fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00007106{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
7107$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007108if test "$ac_cv_has_makedev" = "yes"; then
7109
7110cat >>confdefs.h <<\_ACEOF
7111#define HAVE_MAKEDEV 1
7112_ACEOF
7113
7114fi
7115
Martin v. Löwis399a6892002-10-04 10:22:02 +00007116# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7117# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7118# defined, but the compiler does not support pragma redefine_extname,
7119# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7120# structures (such as rlimit64) without declaring them. As a
7121# work-around, disable LFS on such configurations
7122
7123use_lfs=yes
Antoine Pitroub52ec782009-01-25 16:34:23 +00007124{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
7125$as_echo_n "checking Solaris LFS bug... " >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007126cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007127/* confdefs.h. */
7128_ACEOF
7129cat confdefs.h >>conftest.$ac_ext
7130cat >>conftest.$ac_ext <<_ACEOF
7131/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007132
7133#define _LARGEFILE_SOURCE 1
7134#define _FILE_OFFSET_BITS 64
7135#include <sys/resource.h>
7136
Martin v. Löwis399a6892002-10-04 10:22:02 +00007137int
7138main ()
7139{
7140struct rlimit foo;
7141 ;
7142 return 0;
7143}
7144_ACEOF
7145rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007146if { (ac_try="$ac_compile"
7147case "(($ac_try" in
7148 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7149 *) ac_try_echo=$ac_try;;
7150esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007151eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7152$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007153 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00007154 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007155 grep -v '^ *+' conftest.er1 >conftest.err
7156 rm -f conftest.er1
7157 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007158 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007159 (exit $ac_status); } && {
7160 test -z "$ac_c_werror_flag" ||
7161 test ! -s conftest.err
7162 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00007163 sol_lfs_bug=no
7164else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007165 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007166sed 's/^/| /' conftest.$ac_ext >&5
7167
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007168 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007170
7171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +00007172{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
7173$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007174if test "$sol_lfs_bug" = "yes"; then
7175 use_lfs=no
7176fi
7177
7178if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007179# Two defines needed to enable largefile support on various platforms
7180# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00007181
Martin v. Löwis11437992002-04-12 09:54:03 +00007182cat >>confdefs.h <<\_ACEOF
7183#define _LARGEFILE_SOURCE 1
7184_ACEOF
7185
7186
7187cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007188#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00007189_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007190
Martin v. Löwis399a6892002-10-04 10:22:02 +00007191fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007192
Guido van Rossum84e7b241996-08-19 21:59:00 +00007193# Add some code to confdefs.h so that the test for off_t works on SCO
7194cat >> confdefs.h <<\EOF
7195#if defined(SCO_DS)
7196#undef _OFF_T
7197#endif
7198EOF
7199
Guido van Rossumef2255b2000-03-10 22:30:29 +00007200# Type availability checks
Antoine Pitroub52ec782009-01-25 16:34:23 +00007201{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5
7202$as_echo_n "checking for mode_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007203if test "${ac_cv_type_mode_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007204 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007205else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007206 ac_cv_type_mode_t=no
7207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007208/* confdefs.h. */
7209_ACEOF
7210cat confdefs.h >>conftest.$ac_ext
7211cat >>conftest.$ac_ext <<_ACEOF
7212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007213$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007214int
7215main ()
7216{
Antoine Pitroub52ec782009-01-25 16:34:23 +00007217if (sizeof (mode_t))
7218 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007219 ;
7220 return 0;
7221}
7222_ACEOF
7223rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007224if { (ac_try="$ac_compile"
7225case "(($ac_try" in
7226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7227 *) ac_try_echo=$ac_try;;
7228esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007229eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7230$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007233 grep -v '^ *+' conftest.er1 >conftest.err
7234 rm -f conftest.er1
7235 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007236 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007237 (exit $ac_status); } && {
7238 test -z "$ac_c_werror_flag" ||
7239 test ! -s conftest.err
7240 } && test -s conftest.$ac_objext; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007241 cat >conftest.$ac_ext <<_ACEOF
7242/* confdefs.h. */
7243_ACEOF
7244cat confdefs.h >>conftest.$ac_ext
7245cat >>conftest.$ac_ext <<_ACEOF
7246/* end confdefs.h. */
7247$ac_includes_default
7248int
7249main ()
7250{
7251if (sizeof ((mode_t)))
7252 return 0;
7253 ;
7254 return 0;
7255}
7256_ACEOF
7257rm -f conftest.$ac_objext
7258if { (ac_try="$ac_compile"
7259case "(($ac_try" in
7260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7261 *) ac_try_echo=$ac_try;;
7262esac
7263eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7264$as_echo "$ac_try_echo") >&5
7265 (eval "$ac_compile") 2>conftest.er1
7266 ac_status=$?
7267 grep -v '^ *+' conftest.er1 >conftest.err
7268 rm -f conftest.er1
7269 cat conftest.err >&5
7270 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7271 (exit $ac_status); } && {
7272 test -z "$ac_c_werror_flag" ||
7273 test ! -s conftest.err
7274 } && test -s conftest.$ac_objext; then
7275 :
Jack Jansendd19cf82001-12-06 22:36:17 +00007276else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007277 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007278sed 's/^/| /' conftest.$ac_ext >&5
7279
Antoine Pitroub52ec782009-01-25 16:34:23 +00007280 ac_cv_type_mode_t=yes
7281fi
7282
7283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7284else
7285 $as_echo "$as_me: failed program was:" >&5
7286sed 's/^/| /' conftest.$ac_ext >&5
7287
7288
Jack Jansendd19cf82001-12-06 22:36:17 +00007289fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007290
7291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007292fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00007293{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
7294$as_echo "$ac_cv_type_mode_t" >&6; }
7295if test "x$ac_cv_type_mode_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007296 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007297else
Martin v. Löwis11437992002-04-12 09:54:03 +00007298
7299cat >>confdefs.h <<_ACEOF
7300#define mode_t int
7301_ACEOF
7302
7303fi
7304
Antoine Pitroub52ec782009-01-25 16:34:23 +00007305{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
7306$as_echo_n "checking for off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007307if test "${ac_cv_type_off_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007308 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007309else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007310 ac_cv_type_off_t=no
7311cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007312/* confdefs.h. */
7313_ACEOF
7314cat confdefs.h >>conftest.$ac_ext
7315cat >>conftest.$ac_ext <<_ACEOF
7316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007317$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007318int
7319main ()
7320{
Antoine Pitroub52ec782009-01-25 16:34:23 +00007321if (sizeof (off_t))
7322 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007323 ;
7324 return 0;
7325}
7326_ACEOF
7327rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007328if { (ac_try="$ac_compile"
7329case "(($ac_try" in
7330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7331 *) ac_try_echo=$ac_try;;
7332esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007333eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7334$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007335 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007337 grep -v '^ *+' conftest.er1 >conftest.err
7338 rm -f conftest.er1
7339 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007340 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007341 (exit $ac_status); } && {
7342 test -z "$ac_c_werror_flag" ||
7343 test ! -s conftest.err
7344 } && test -s conftest.$ac_objext; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007345 cat >conftest.$ac_ext <<_ACEOF
7346/* confdefs.h. */
7347_ACEOF
7348cat confdefs.h >>conftest.$ac_ext
7349cat >>conftest.$ac_ext <<_ACEOF
7350/* end confdefs.h. */
7351$ac_includes_default
7352int
7353main ()
7354{
7355if (sizeof ((off_t)))
7356 return 0;
7357 ;
7358 return 0;
7359}
7360_ACEOF
7361rm -f conftest.$ac_objext
7362if { (ac_try="$ac_compile"
7363case "(($ac_try" in
7364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7365 *) ac_try_echo=$ac_try;;
7366esac
7367eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7368$as_echo "$ac_try_echo") >&5
7369 (eval "$ac_compile") 2>conftest.er1
7370 ac_status=$?
7371 grep -v '^ *+' conftest.er1 >conftest.err
7372 rm -f conftest.er1
7373 cat conftest.err >&5
7374 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7375 (exit $ac_status); } && {
7376 test -z "$ac_c_werror_flag" ||
7377 test ! -s conftest.err
7378 } && test -s conftest.$ac_objext; then
7379 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007380else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007381 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007382sed 's/^/| /' conftest.$ac_ext >&5
7383
Antoine Pitroub52ec782009-01-25 16:34:23 +00007384 ac_cv_type_off_t=yes
7385fi
7386
7387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7388else
7389 $as_echo "$as_me: failed program was:" >&5
7390sed 's/^/| /' conftest.$ac_ext >&5
7391
7392
Guido van Rossum627b2d71993-12-24 10:39:16 +00007393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007394
7395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007396fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00007397{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7398$as_echo "$ac_cv_type_off_t" >&6; }
7399if test "x$ac_cv_type_off_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007400 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007401else
Martin v. Löwis11437992002-04-12 09:54:03 +00007402
7403cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007404#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007405_ACEOF
7406
7407fi
7408
Antoine Pitroub52ec782009-01-25 16:34:23 +00007409{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
7410$as_echo_n "checking for pid_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007411if test "${ac_cv_type_pid_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007412 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007413else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007414 ac_cv_type_pid_t=no
7415cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007416/* confdefs.h. */
7417_ACEOF
7418cat confdefs.h >>conftest.$ac_ext
7419cat >>conftest.$ac_ext <<_ACEOF
7420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007421$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007422int
7423main ()
7424{
Antoine Pitroub52ec782009-01-25 16:34:23 +00007425if (sizeof (pid_t))
7426 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007427 ;
7428 return 0;
7429}
7430_ACEOF
7431rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007432if { (ac_try="$ac_compile"
7433case "(($ac_try" in
7434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7435 *) ac_try_echo=$ac_try;;
7436esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007437eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7438$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007439 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007441 grep -v '^ *+' conftest.er1 >conftest.err
7442 rm -f conftest.er1
7443 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007444 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007445 (exit $ac_status); } && {
7446 test -z "$ac_c_werror_flag" ||
7447 test ! -s conftest.err
7448 } && test -s conftest.$ac_objext; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007449 cat >conftest.$ac_ext <<_ACEOF
7450/* confdefs.h. */
7451_ACEOF
7452cat confdefs.h >>conftest.$ac_ext
7453cat >>conftest.$ac_ext <<_ACEOF
7454/* end confdefs.h. */
7455$ac_includes_default
7456int
7457main ()
7458{
7459if (sizeof ((pid_t)))
7460 return 0;
7461 ;
7462 return 0;
7463}
7464_ACEOF
7465rm -f conftest.$ac_objext
7466if { (ac_try="$ac_compile"
7467case "(($ac_try" in
7468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7469 *) ac_try_echo=$ac_try;;
7470esac
7471eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7472$as_echo "$ac_try_echo") >&5
7473 (eval "$ac_compile") 2>conftest.er1
7474 ac_status=$?
7475 grep -v '^ *+' conftest.er1 >conftest.err
7476 rm -f conftest.er1
7477 cat conftest.err >&5
7478 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7479 (exit $ac_status); } && {
7480 test -z "$ac_c_werror_flag" ||
7481 test ! -s conftest.err
7482 } && test -s conftest.$ac_objext; then
7483 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007484else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007485 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007486sed 's/^/| /' conftest.$ac_ext >&5
7487
Antoine Pitroub52ec782009-01-25 16:34:23 +00007488 ac_cv_type_pid_t=yes
7489fi
7490
7491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7492else
7493 $as_echo "$as_me: failed program was:" >&5
7494sed 's/^/| /' conftest.$ac_ext >&5
7495
7496
Guido van Rossum627b2d71993-12-24 10:39:16 +00007497fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007498
7499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007500fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00007501{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7502$as_echo "$ac_cv_type_pid_t" >&6; }
7503if test "x$ac_cv_type_pid_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007504 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007505else
Martin v. Löwis11437992002-04-12 09:54:03 +00007506
7507cat >>confdefs.h <<_ACEOF
7508#define pid_t int
7509_ACEOF
7510
7511fi
7512
Antoine Pitroub52ec782009-01-25 16:34:23 +00007513{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7514$as_echo_n "checking return type of signal handlers... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007515if test "${ac_cv_type_signal+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007516 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007517else
7518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007519/* confdefs.h. */
7520_ACEOF
7521cat confdefs.h >>conftest.$ac_ext
7522cat >>conftest.$ac_ext <<_ACEOF
7523/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007524#include <sys/types.h>
7525#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007526
Martin v. Löwis11437992002-04-12 09:54:03 +00007527int
7528main ()
7529{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007530return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007531 ;
7532 return 0;
7533}
7534_ACEOF
7535rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007536if { (ac_try="$ac_compile"
7537case "(($ac_try" in
7538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7539 *) ac_try_echo=$ac_try;;
7540esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007541eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7542$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007543 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007544 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007545 grep -v '^ *+' conftest.er1 >conftest.err
7546 rm -f conftest.er1
7547 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007548 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007549 (exit $ac_status); } && {
7550 test -z "$ac_c_werror_flag" ||
7551 test ! -s conftest.err
7552 } && test -s conftest.$ac_objext; then
7553 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007554else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007555 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007556sed 's/^/| /' conftest.$ac_ext >&5
7557
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007558 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007560
7561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007562fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00007563{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7564$as_echo "$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007565
Martin v. Löwis11437992002-04-12 09:54:03 +00007566cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007567#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007568_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007569
Michael W. Hudson54241132001-12-07 15:38:26 +00007570
Antoine Pitroub52ec782009-01-25 16:34:23 +00007571{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
7572$as_echo_n "checking for size_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007573if test "${ac_cv_type_size_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007574 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007575else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007576 ac_cv_type_size_t=no
7577cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007578/* confdefs.h. */
7579_ACEOF
7580cat confdefs.h >>conftest.$ac_ext
7581cat >>conftest.$ac_ext <<_ACEOF
7582/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007583$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007584int
7585main ()
7586{
Antoine Pitroub52ec782009-01-25 16:34:23 +00007587if (sizeof (size_t))
7588 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007589 ;
7590 return 0;
7591}
7592_ACEOF
7593rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007594if { (ac_try="$ac_compile"
7595case "(($ac_try" in
7596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7597 *) ac_try_echo=$ac_try;;
7598esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007599eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7600$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007602 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007603 grep -v '^ *+' conftest.er1 >conftest.err
7604 rm -f conftest.er1
7605 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007606 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007607 (exit $ac_status); } && {
7608 test -z "$ac_c_werror_flag" ||
7609 test ! -s conftest.err
7610 } && test -s conftest.$ac_objext; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007611 cat >conftest.$ac_ext <<_ACEOF
7612/* confdefs.h. */
7613_ACEOF
7614cat confdefs.h >>conftest.$ac_ext
7615cat >>conftest.$ac_ext <<_ACEOF
7616/* end confdefs.h. */
7617$ac_includes_default
7618int
7619main ()
7620{
7621if (sizeof ((size_t)))
7622 return 0;
7623 ;
7624 return 0;
7625}
7626_ACEOF
7627rm -f conftest.$ac_objext
7628if { (ac_try="$ac_compile"
7629case "(($ac_try" in
7630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7631 *) ac_try_echo=$ac_try;;
7632esac
7633eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7634$as_echo "$ac_try_echo") >&5
7635 (eval "$ac_compile") 2>conftest.er1
7636 ac_status=$?
7637 grep -v '^ *+' conftest.er1 >conftest.err
7638 rm -f conftest.er1
7639 cat conftest.err >&5
7640 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7641 (exit $ac_status); } && {
7642 test -z "$ac_c_werror_flag" ||
7643 test ! -s conftest.err
7644 } && test -s conftest.$ac_objext; then
7645 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007646else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007647 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007648sed 's/^/| /' conftest.$ac_ext >&5
7649
Antoine Pitroub52ec782009-01-25 16:34:23 +00007650 ac_cv_type_size_t=yes
7651fi
7652
7653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7654else
7655 $as_echo "$as_me: failed program was:" >&5
7656sed 's/^/| /' conftest.$ac_ext >&5
7657
7658
Guido van Rossum627b2d71993-12-24 10:39:16 +00007659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007660
7661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007662fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00007663{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7664$as_echo "$ac_cv_type_size_t" >&6; }
7665if test "x$ac_cv_type_size_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007666 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007667else
Martin v. Löwis11437992002-04-12 09:54:03 +00007668
7669cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007670#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007671_ACEOF
7672
7673fi
7674
Antoine Pitroub52ec782009-01-25 16:34:23 +00007675{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7676$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007677if test "${ac_cv_type_uid_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007678 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007679else
7680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007681/* confdefs.h. */
7682_ACEOF
7683cat confdefs.h >>conftest.$ac_ext
7684cat >>conftest.$ac_ext <<_ACEOF
7685/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007686#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007687
7688_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007689if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007690 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007691 ac_cv_type_uid_t=yes
7692else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007693 ac_cv_type_uid_t=no
7694fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007695rm -f conftest*
7696
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007697fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00007698{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7699$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007700if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007701
Martin v. Löwis11437992002-04-12 09:54:03 +00007702cat >>confdefs.h <<\_ACEOF
7703#define uid_t int
7704_ACEOF
7705
7706
7707cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007708#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007709_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007710
7711fi
7712
Antoine Pitroub52ec782009-01-25 16:34:23 +00007713{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
7714$as_echo_n "checking for ssize_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007715if test "${ac_cv_type_ssize_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007716 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007717else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007718 ac_cv_type_ssize_t=no
7719cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00007720/* confdefs.h. */
7721_ACEOF
7722cat confdefs.h >>conftest.$ac_ext
7723cat >>conftest.$ac_ext <<_ACEOF
7724/* end confdefs.h. */
7725$ac_includes_default
7726int
7727main ()
7728{
Antoine Pitroub52ec782009-01-25 16:34:23 +00007729if (sizeof (ssize_t))
7730 return 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007731 ;
7732 return 0;
7733}
7734_ACEOF
7735rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007736if { (ac_try="$ac_compile"
7737case "(($ac_try" in
7738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7739 *) ac_try_echo=$ac_try;;
7740esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007741eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7742$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007743 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007744 ac_status=$?
7745 grep -v '^ *+' conftest.er1 >conftest.err
7746 rm -f conftest.er1
7747 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007748 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007749 (exit $ac_status); } && {
7750 test -z "$ac_c_werror_flag" ||
7751 test ! -s conftest.err
7752 } && test -s conftest.$ac_objext; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007753 cat >conftest.$ac_ext <<_ACEOF
7754/* confdefs.h. */
7755_ACEOF
7756cat confdefs.h >>conftest.$ac_ext
7757cat >>conftest.$ac_ext <<_ACEOF
7758/* end confdefs.h. */
7759$ac_includes_default
7760int
7761main ()
7762{
7763if (sizeof ((ssize_t)))
7764 return 0;
7765 ;
7766 return 0;
7767}
7768_ACEOF
7769rm -f conftest.$ac_objext
7770if { (ac_try="$ac_compile"
7771case "(($ac_try" in
7772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7773 *) ac_try_echo=$ac_try;;
7774esac
7775eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7776$as_echo "$ac_try_echo") >&5
7777 (eval "$ac_compile") 2>conftest.er1
7778 ac_status=$?
7779 grep -v '^ *+' conftest.er1 >conftest.err
7780 rm -f conftest.er1
7781 cat conftest.err >&5
7782 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7783 (exit $ac_status); } && {
7784 test -z "$ac_c_werror_flag" ||
7785 test ! -s conftest.err
7786 } && test -s conftest.$ac_objext; then
7787 :
Martin v. Löwis18e16552006-02-15 17:27:45 +00007788else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007789 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007790sed 's/^/| /' conftest.$ac_ext >&5
7791
Antoine Pitroub52ec782009-01-25 16:34:23 +00007792 ac_cv_type_ssize_t=yes
7793fi
7794
7795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7796else
7797 $as_echo "$as_me: failed program was:" >&5
7798sed 's/^/| /' conftest.$ac_ext >&5
7799
7800
Martin v. Löwis18e16552006-02-15 17:27:45 +00007801fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007802
7803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007804fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00007805{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7806$as_echo "$ac_cv_type_ssize_t" >&6; }
7807if test "x$ac_cv_type_ssize_t" = x""yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007808
7809cat >>confdefs.h <<\_ACEOF
7810#define HAVE_SSIZE_T 1
7811_ACEOF
7812
7813fi
7814
Jack Jansendd19cf82001-12-06 22:36:17 +00007815
Michael W. Hudson54241132001-12-07 15:38:26 +00007816# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007817# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007818# The cast to long int works around a bug in the HP C Compiler
7819# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7820# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7821# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +00007822{ $as_echo "$as_me:$LINENO: checking size of int" >&5
7823$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007824if test "${ac_cv_sizeof_int+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00007825 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007826else
Martin v. Löwis11437992002-04-12 09:54:03 +00007827 if test "$cross_compiling" = yes; then
7828 # Depending upon the size, compute the lo and hi bounds.
7829cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007830/* confdefs.h. */
7831_ACEOF
7832cat confdefs.h >>conftest.$ac_ext
7833cat >>conftest.$ac_ext <<_ACEOF
7834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007835$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007836int
7837main ()
7838{
Antoine Pitroub52ec782009-01-25 16:34:23 +00007839static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007840test_array [0] = 0
7841
7842 ;
7843 return 0;
7844}
7845_ACEOF
7846rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007847if { (ac_try="$ac_compile"
7848case "(($ac_try" in
7849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7850 *) ac_try_echo=$ac_try;;
7851esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007852eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7853$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007854 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007856 grep -v '^ *+' conftest.er1 >conftest.err
7857 rm -f conftest.er1
7858 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007859 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007860 (exit $ac_status); } && {
7861 test -z "$ac_c_werror_flag" ||
7862 test ! -s conftest.err
7863 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007864 ac_lo=0 ac_mid=0
7865 while :; do
7866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007867/* confdefs.h. */
7868_ACEOF
7869cat confdefs.h >>conftest.$ac_ext
7870cat >>conftest.$ac_ext <<_ACEOF
7871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007872$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007873int
7874main ()
7875{
Antoine Pitroub52ec782009-01-25 16:34:23 +00007876static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007877test_array [0] = 0
7878
7879 ;
7880 return 0;
7881}
7882_ACEOF
7883rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007884if { (ac_try="$ac_compile"
7885case "(($ac_try" in
7886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7887 *) ac_try_echo=$ac_try;;
7888esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007889eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7890$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007891 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007892 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007893 grep -v '^ *+' conftest.er1 >conftest.err
7894 rm -f conftest.er1
7895 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007896 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007897 (exit $ac_status); } && {
7898 test -z "$ac_c_werror_flag" ||
7899 test ! -s conftest.err
7900 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007901 ac_hi=$ac_mid; break
7902else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007903 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007904sed 's/^/| /' conftest.$ac_ext >&5
7905
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007906 ac_lo=`expr $ac_mid + 1`
7907 if test $ac_lo -le $ac_mid; then
7908 ac_lo= ac_hi=
7909 break
7910 fi
7911 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00007912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007913
7914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00007915 done
7916else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007917 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007918sed 's/^/| /' conftest.$ac_ext >&5
7919
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007921/* confdefs.h. */
7922_ACEOF
7923cat confdefs.h >>conftest.$ac_ext
7924cat >>conftest.$ac_ext <<_ACEOF
7925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007926$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007927int
7928main ()
7929{
Antoine Pitroub52ec782009-01-25 16:34:23 +00007930static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007931test_array [0] = 0
7932
7933 ;
7934 return 0;
7935}
7936_ACEOF
7937rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007938if { (ac_try="$ac_compile"
7939case "(($ac_try" in
7940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7941 *) ac_try_echo=$ac_try;;
7942esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007943eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7944$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007947 grep -v '^ *+' conftest.er1 >conftest.err
7948 rm -f conftest.er1
7949 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007950 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007951 (exit $ac_status); } && {
7952 test -z "$ac_c_werror_flag" ||
7953 test ! -s conftest.err
7954 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007955 ac_hi=-1 ac_mid=-1
7956 while :; do
7957 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007958/* confdefs.h. */
7959_ACEOF
7960cat confdefs.h >>conftest.$ac_ext
7961cat >>conftest.$ac_ext <<_ACEOF
7962/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007963$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007964int
7965main ()
7966{
Antoine Pitroub52ec782009-01-25 16:34:23 +00007967static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00007968test_array [0] = 0
7969
7970 ;
7971 return 0;
7972}
7973_ACEOF
7974rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007975if { (ac_try="$ac_compile"
7976case "(($ac_try" in
7977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7978 *) ac_try_echo=$ac_try;;
7979esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00007980eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7981$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007982 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007983 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007984 grep -v '^ *+' conftest.er1 >conftest.err
7985 rm -f conftest.er1
7986 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00007987 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007988 (exit $ac_status); } && {
7989 test -z "$ac_c_werror_flag" ||
7990 test ! -s conftest.err
7991 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007992 ac_lo=$ac_mid; break
7993else
Antoine Pitroub52ec782009-01-25 16:34:23 +00007994 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007995sed 's/^/| /' conftest.$ac_ext >&5
7996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007997 ac_hi=`expr '(' $ac_mid ')' - 1`
7998 if test $ac_mid -le $ac_hi; then
7999 ac_lo= ac_hi=
8000 break
8001 fi
8002 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008004
8005rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008006 done
8007else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008008 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008009sed 's/^/| /' conftest.$ac_ext >&5
8010
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008011 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008012fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008013
8014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008016
8017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008018# Binary search between lo and hi bounds.
8019while test "x$ac_lo" != "x$ac_hi"; do
8020 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008022/* confdefs.h. */
8023_ACEOF
8024cat confdefs.h >>conftest.$ac_ext
8025cat >>conftest.$ac_ext <<_ACEOF
8026/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008027$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008028int
8029main ()
8030{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008031static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008032test_array [0] = 0
8033
8034 ;
8035 return 0;
8036}
8037_ACEOF
8038rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008039if { (ac_try="$ac_compile"
8040case "(($ac_try" in
8041 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8042 *) ac_try_echo=$ac_try;;
8043esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008044eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8045$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008046 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008047 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008048 grep -v '^ *+' conftest.er1 >conftest.err
8049 rm -f conftest.er1
8050 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008051 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008052 (exit $ac_status); } && {
8053 test -z "$ac_c_werror_flag" ||
8054 test ! -s conftest.err
8055 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008056 ac_hi=$ac_mid
8057else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008058 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008059sed 's/^/| /' conftest.$ac_ext >&5
8060
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008061 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008062fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008063
8064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008065done
8066case $ac_lo in
8067?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008068'') if test "$ac_cv_type_int" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00008069 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8071{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008072See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008073$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008074See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00008075 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008076 else
8077 ac_cv_sizeof_int=0
8078 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008079esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008080else
Martin v. Löwis11437992002-04-12 09:54:03 +00008081 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008082/* confdefs.h. */
8083_ACEOF
8084cat confdefs.h >>conftest.$ac_ext
8085cat >>conftest.$ac_ext <<_ACEOF
8086/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008087$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +00008088static long int longval () { return (long int) (sizeof (int)); }
8089static unsigned long int ulongval () { return (long int) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008090#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008091#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008092int
8093main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008094{
Martin v. Löwis11437992002-04-12 09:54:03 +00008095
8096 FILE *f = fopen ("conftest.val", "w");
8097 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008098 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00008099 if (((long int) (sizeof (int))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008100 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008101 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00008102 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008103 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00008104 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008105 }
8106 else
8107 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008108 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00008109 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008110 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00008111 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008112 }
Antoine Pitroub52ec782009-01-25 16:34:23 +00008113 /* Do not output a trailing newline, as this causes \r\n confusion
8114 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008115 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008116
8117 ;
8118 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008119}
Martin v. Löwis11437992002-04-12 09:54:03 +00008120_ACEOF
8121rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008122if { (ac_try="$ac_link"
8123case "(($ac_try" in
8124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8125 *) ac_try_echo=$ac_try;;
8126esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008127eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8128$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008129 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008130 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00008131 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008132 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008133 { (case "(($ac_try" in
8134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8135 *) ac_try_echo=$ac_try;;
8136esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008137eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8138$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008139 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008140 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00008141 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008142 (exit $ac_status); }; }; then
8143 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008144else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008145 $as_echo "$as_me: program exited with status $ac_status" >&5
8146$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008147sed 's/^/| /' conftest.$ac_ext >&5
8148
Martin v. Löwis11437992002-04-12 09:54:03 +00008149( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008150if test "$ac_cv_type_int" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00008151 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8152$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8153{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008154See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008155$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008156See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00008157 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008158 else
8159 ac_cv_sizeof_int=0
8160 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008161fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00008162rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008163rm -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 +00008164fi
8165rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008166fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00008167{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8168$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008169
8170
8171
Martin v. Löwis11437992002-04-12 09:54:03 +00008172cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008173#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008174_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008175
8176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008177# The cast to long int works around a bug in the HP C Compiler
8178# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8179# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8180# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +00008181{ $as_echo "$as_me:$LINENO: checking size of long" >&5
8182$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008183if test "${ac_cv_sizeof_long+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00008184 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008185else
Martin v. Löwis11437992002-04-12 09:54:03 +00008186 if test "$cross_compiling" = yes; then
8187 # Depending upon the size, compute the lo and hi bounds.
8188cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008189/* confdefs.h. */
8190_ACEOF
8191cat confdefs.h >>conftest.$ac_ext
8192cat >>conftest.$ac_ext <<_ACEOF
8193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008194$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008195int
8196main ()
8197{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008198static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008199test_array [0] = 0
8200
8201 ;
8202 return 0;
8203}
8204_ACEOF
8205rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008206if { (ac_try="$ac_compile"
8207case "(($ac_try" in
8208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8209 *) ac_try_echo=$ac_try;;
8210esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008211eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8212$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008213 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008215 grep -v '^ *+' conftest.er1 >conftest.err
8216 rm -f conftest.er1
8217 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008218 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008219 (exit $ac_status); } && {
8220 test -z "$ac_c_werror_flag" ||
8221 test ! -s conftest.err
8222 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008223 ac_lo=0 ac_mid=0
8224 while :; do
8225 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008226/* confdefs.h. */
8227_ACEOF
8228cat confdefs.h >>conftest.$ac_ext
8229cat >>conftest.$ac_ext <<_ACEOF
8230/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008231$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008232int
8233main ()
8234{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008235static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008236test_array [0] = 0
8237
8238 ;
8239 return 0;
8240}
8241_ACEOF
8242rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008243if { (ac_try="$ac_compile"
8244case "(($ac_try" in
8245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8246 *) ac_try_echo=$ac_try;;
8247esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008248eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8249$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008252 grep -v '^ *+' conftest.er1 >conftest.err
8253 rm -f conftest.er1
8254 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008255 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008256 (exit $ac_status); } && {
8257 test -z "$ac_c_werror_flag" ||
8258 test ! -s conftest.err
8259 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008260 ac_hi=$ac_mid; break
8261else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008262 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008263sed 's/^/| /' conftest.$ac_ext >&5
8264
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008265 ac_lo=`expr $ac_mid + 1`
8266 if test $ac_lo -le $ac_mid; then
8267 ac_lo= ac_hi=
8268 break
8269 fi
8270 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008271fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008272
8273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008274 done
8275else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008276 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008277sed 's/^/| /' conftest.$ac_ext >&5
8278
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008279 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008280/* confdefs.h. */
8281_ACEOF
8282cat confdefs.h >>conftest.$ac_ext
8283cat >>conftest.$ac_ext <<_ACEOF
8284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008285$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008286int
8287main ()
8288{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008289static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008290test_array [0] = 0
8291
8292 ;
8293 return 0;
8294}
8295_ACEOF
8296rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008297if { (ac_try="$ac_compile"
8298case "(($ac_try" in
8299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8300 *) ac_try_echo=$ac_try;;
8301esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008302eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8303$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008304 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008306 grep -v '^ *+' conftest.er1 >conftest.err
8307 rm -f conftest.er1
8308 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008309 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008310 (exit $ac_status); } && {
8311 test -z "$ac_c_werror_flag" ||
8312 test ! -s conftest.err
8313 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008314 ac_hi=-1 ac_mid=-1
8315 while :; do
8316 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008317/* confdefs.h. */
8318_ACEOF
8319cat confdefs.h >>conftest.$ac_ext
8320cat >>conftest.$ac_ext <<_ACEOF
8321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008322$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008323int
8324main ()
8325{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008326static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008327test_array [0] = 0
8328
8329 ;
8330 return 0;
8331}
8332_ACEOF
8333rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008334if { (ac_try="$ac_compile"
8335case "(($ac_try" in
8336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8337 *) ac_try_echo=$ac_try;;
8338esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008339eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8340$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008341 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008342 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008343 grep -v '^ *+' conftest.er1 >conftest.err
8344 rm -f conftest.er1
8345 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008346 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008347 (exit $ac_status); } && {
8348 test -z "$ac_c_werror_flag" ||
8349 test ! -s conftest.err
8350 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008351 ac_lo=$ac_mid; break
8352else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008353 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008354sed 's/^/| /' conftest.$ac_ext >&5
8355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008356 ac_hi=`expr '(' $ac_mid ')' - 1`
8357 if test $ac_mid -le $ac_hi; then
8358 ac_lo= ac_hi=
8359 break
8360 fi
8361 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008363
8364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008365 done
8366else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008367 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008368sed 's/^/| /' conftest.$ac_ext >&5
8369
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008370 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008372
8373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008375
8376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008377# Binary search between lo and hi bounds.
8378while test "x$ac_lo" != "x$ac_hi"; do
8379 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8380 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008381/* confdefs.h. */
8382_ACEOF
8383cat confdefs.h >>conftest.$ac_ext
8384cat >>conftest.$ac_ext <<_ACEOF
8385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008386$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008387int
8388main ()
8389{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008390static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008391test_array [0] = 0
8392
8393 ;
8394 return 0;
8395}
8396_ACEOF
8397rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008398if { (ac_try="$ac_compile"
8399case "(($ac_try" in
8400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8401 *) ac_try_echo=$ac_try;;
8402esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008403eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8404$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008405 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008407 grep -v '^ *+' conftest.er1 >conftest.err
8408 rm -f conftest.er1
8409 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008410 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411 (exit $ac_status); } && {
8412 test -z "$ac_c_werror_flag" ||
8413 test ! -s conftest.err
8414 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008415 ac_hi=$ac_mid
8416else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008417 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008418sed 's/^/| /' conftest.$ac_ext >&5
8419
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008421fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008422
8423rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008424done
8425case $ac_lo in
8426?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427'') if test "$ac_cv_type_long" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00008428 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8429$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8430{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008431See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008432$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008433See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00008434 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008435 else
8436 ac_cv_sizeof_long=0
8437 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008438esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008439else
Martin v. Löwis11437992002-04-12 09:54:03 +00008440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008441/* confdefs.h. */
8442_ACEOF
8443cat confdefs.h >>conftest.$ac_ext
8444cat >>conftest.$ac_ext <<_ACEOF
8445/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008446$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +00008447static long int longval () { return (long int) (sizeof (long)); }
8448static unsigned long int ulongval () { return (long int) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008449#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008450#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008451int
8452main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008453{
Martin v. Löwis11437992002-04-12 09:54:03 +00008454
8455 FILE *f = fopen ("conftest.val", "w");
8456 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00008458 if (((long int) (sizeof (long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008459 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008460 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00008461 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008462 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00008463 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008464 }
8465 else
8466 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008467 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00008468 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008469 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00008470 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008471 }
Antoine Pitroub52ec782009-01-25 16:34:23 +00008472 /* Do not output a trailing newline, as this causes \r\n confusion
8473 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008474 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008475
8476 ;
8477 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008478}
Martin v. Löwis11437992002-04-12 09:54:03 +00008479_ACEOF
8480rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008481if { (ac_try="$ac_link"
8482case "(($ac_try" in
8483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8484 *) ac_try_echo=$ac_try;;
8485esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008486eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8487$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008489 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00008490 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008491 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008492 { (case "(($ac_try" in
8493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8494 *) ac_try_echo=$ac_try;;
8495esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008496eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8497$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008498 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008499 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00008500 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008501 (exit $ac_status); }; }; then
8502 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008503else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008504 $as_echo "$as_me: program exited with status $ac_status" >&5
8505$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008506sed 's/^/| /' conftest.$ac_ext >&5
8507
Martin v. Löwis11437992002-04-12 09:54:03 +00008508( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509if test "$ac_cv_type_long" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00008510 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8511$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8512{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008513See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008514$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008515See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00008516 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008517 else
8518 ac_cv_sizeof_long=0
8519 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008520fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00008521rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008522rm -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 +00008523fi
8524rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008525fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00008526{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8527$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528
8529
8530
Martin v. Löwis11437992002-04-12 09:54:03 +00008531cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008532#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008533_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008534
8535
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008536# The cast to long int works around a bug in the HP C Compiler
8537# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8538# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8539# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +00008540{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
8541$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008542if test "${ac_cv_sizeof_void_p+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00008543 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008544else
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 if test "$cross_compiling" = yes; then
8546 # Depending upon the size, compute the lo and hi bounds.
8547cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008548/* confdefs.h. */
8549_ACEOF
8550cat confdefs.h >>conftest.$ac_ext
8551cat >>conftest.$ac_ext <<_ACEOF
8552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008553$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008554int
8555main ()
8556{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008557static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008558test_array [0] = 0
8559
8560 ;
8561 return 0;
8562}
8563_ACEOF
8564rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565if { (ac_try="$ac_compile"
8566case "(($ac_try" in
8567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8568 *) ac_try_echo=$ac_try;;
8569esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008570eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8571$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008572 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008574 grep -v '^ *+' conftest.er1 >conftest.err
8575 rm -f conftest.er1
8576 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008577 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578 (exit $ac_status); } && {
8579 test -z "$ac_c_werror_flag" ||
8580 test ! -s conftest.err
8581 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008582 ac_lo=0 ac_mid=0
8583 while :; do
8584 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008585/* confdefs.h. */
8586_ACEOF
8587cat confdefs.h >>conftest.$ac_ext
8588cat >>conftest.$ac_ext <<_ACEOF
8589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008590$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008591int
8592main ()
8593{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008594static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008595test_array [0] = 0
8596
8597 ;
8598 return 0;
8599}
8600_ACEOF
8601rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008602if { (ac_try="$ac_compile"
8603case "(($ac_try" in
8604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8605 *) ac_try_echo=$ac_try;;
8606esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008607eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8608$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008611 grep -v '^ *+' conftest.er1 >conftest.err
8612 rm -f conftest.er1
8613 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008614 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615 (exit $ac_status); } && {
8616 test -z "$ac_c_werror_flag" ||
8617 test ! -s conftest.err
8618 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008619 ac_hi=$ac_mid; break
8620else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008621 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008622sed 's/^/| /' conftest.$ac_ext >&5
8623
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008624 ac_lo=`expr $ac_mid + 1`
8625 if test $ac_lo -le $ac_mid; then
8626 ac_lo= ac_hi=
8627 break
8628 fi
8629 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008631
8632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008633 done
8634else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008635 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008636sed 's/^/| /' conftest.$ac_ext >&5
8637
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008638 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008639/* confdefs.h. */
8640_ACEOF
8641cat confdefs.h >>conftest.$ac_ext
8642cat >>conftest.$ac_ext <<_ACEOF
8643/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008644$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008645int
8646main ()
8647{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008648static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008649test_array [0] = 0
8650
8651 ;
8652 return 0;
8653}
8654_ACEOF
8655rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008656if { (ac_try="$ac_compile"
8657case "(($ac_try" in
8658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8659 *) ac_try_echo=$ac_try;;
8660esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008661eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8662$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008664 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008665 grep -v '^ *+' conftest.er1 >conftest.err
8666 rm -f conftest.er1
8667 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008668 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008669 (exit $ac_status); } && {
8670 test -z "$ac_c_werror_flag" ||
8671 test ! -s conftest.err
8672 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008673 ac_hi=-1 ac_mid=-1
8674 while :; do
8675 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008676/* confdefs.h. */
8677_ACEOF
8678cat confdefs.h >>conftest.$ac_ext
8679cat >>conftest.$ac_ext <<_ACEOF
8680/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008681$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008682int
8683main ()
8684{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008685static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008686test_array [0] = 0
8687
8688 ;
8689 return 0;
8690}
8691_ACEOF
8692rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008693if { (ac_try="$ac_compile"
8694case "(($ac_try" in
8695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8696 *) ac_try_echo=$ac_try;;
8697esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008698eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8699$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008700 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008701 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008702 grep -v '^ *+' conftest.er1 >conftest.err
8703 rm -f conftest.er1
8704 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008705 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008706 (exit $ac_status); } && {
8707 test -z "$ac_c_werror_flag" ||
8708 test ! -s conftest.err
8709 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 ac_lo=$ac_mid; break
8711else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008712 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008713sed 's/^/| /' conftest.$ac_ext >&5
8714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008715 ac_hi=`expr '(' $ac_mid ')' - 1`
8716 if test $ac_mid -le $ac_hi; then
8717 ac_lo= ac_hi=
8718 break
8719 fi
8720 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008722
8723rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008724 done
8725else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008726 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008727sed 's/^/| /' conftest.$ac_ext >&5
8728
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008729 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008730fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731
8732rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008734
8735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008736# Binary search between lo and hi bounds.
8737while test "x$ac_lo" != "x$ac_hi"; do
8738 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008740/* confdefs.h. */
8741_ACEOF
8742cat confdefs.h >>conftest.$ac_ext
8743cat >>conftest.$ac_ext <<_ACEOF
8744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008745$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008746int
8747main ()
8748{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008749static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008750test_array [0] = 0
8751
8752 ;
8753 return 0;
8754}
8755_ACEOF
8756rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008757if { (ac_try="$ac_compile"
8758case "(($ac_try" in
8759 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8760 *) ac_try_echo=$ac_try;;
8761esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008762eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8763$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008764 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008765 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008766 grep -v '^ *+' conftest.er1 >conftest.err
8767 rm -f conftest.er1
8768 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008769 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008770 (exit $ac_status); } && {
8771 test -z "$ac_c_werror_flag" ||
8772 test ! -s conftest.err
8773 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008774 ac_hi=$ac_mid
8775else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008776 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008777sed 's/^/| /' conftest.$ac_ext >&5
8778
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008781
8782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008783done
8784case $ac_lo in
8785?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786'') if test "$ac_cv_type_void_p" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00008787 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8788$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8789{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008790See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008791$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008792See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00008793 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008794 else
8795 ac_cv_sizeof_void_p=0
8796 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008797esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008798else
Martin v. Löwis11437992002-04-12 09:54:03 +00008799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008800/* confdefs.h. */
8801_ACEOF
8802cat confdefs.h >>conftest.$ac_ext
8803cat >>conftest.$ac_ext <<_ACEOF
8804/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008805$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +00008806static long int longval () { return (long int) (sizeof (void *)); }
8807static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008808#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008809#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008810int
8811main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008812{
Martin v. Löwis11437992002-04-12 09:54:03 +00008813
8814 FILE *f = fopen ("conftest.val", "w");
8815 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00008817 if (((long int) (sizeof (void *))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008818 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008819 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00008820 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008821 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00008822 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008823 }
8824 else
8825 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008826 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00008827 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008828 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00008829 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008830 }
Antoine Pitroub52ec782009-01-25 16:34:23 +00008831 /* Do not output a trailing newline, as this causes \r\n confusion
8832 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008833 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008834
8835 ;
8836 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00008837}
Martin v. Löwis11437992002-04-12 09:54:03 +00008838_ACEOF
8839rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008840if { (ac_try="$ac_link"
8841case "(($ac_try" in
8842 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8843 *) ac_try_echo=$ac_try;;
8844esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008845eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8846$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008848 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00008849 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008850 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008851 { (case "(($ac_try" in
8852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8853 *) ac_try_echo=$ac_try;;
8854esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008855eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8856$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008857 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008858 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00008859 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008860 (exit $ac_status); }; }; then
8861 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00008862else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008863 $as_echo "$as_me: program exited with status $ac_status" >&5
8864$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008865sed 's/^/| /' conftest.$ac_ext >&5
8866
Martin v. Löwis11437992002-04-12 09:54:03 +00008867( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868if test "$ac_cv_type_void_p" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00008869 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8870$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8871{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008872See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008873$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008874See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00008875 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008876 else
8877 ac_cv_sizeof_void_p=0
8878 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008879fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00008880rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008881rm -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 +00008882fi
8883rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00008884fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00008885{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
8886$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008887
8888
8889
Martin v. Löwis11437992002-04-12 09:54:03 +00008890cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008891#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00008892_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00008893
8894
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008895# The cast to long int works around a bug in the HP C Compiler
8896# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8897# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8898# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +00008899{ $as_echo "$as_me:$LINENO: checking size of short" >&5
8900$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008901if test "${ac_cv_sizeof_short+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00008902 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008903else
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 if test "$cross_compiling" = yes; then
8905 # Depending upon the size, compute the lo and hi bounds.
8906cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008907/* confdefs.h. */
8908_ACEOF
8909cat confdefs.h >>conftest.$ac_ext
8910cat >>conftest.$ac_ext <<_ACEOF
8911/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008912$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008913int
8914main ()
8915{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008916static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008917test_array [0] = 0
8918
8919 ;
8920 return 0;
8921}
8922_ACEOF
8923rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924if { (ac_try="$ac_compile"
8925case "(($ac_try" in
8926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8927 *) ac_try_echo=$ac_try;;
8928esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008929eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8930$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008931 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008932 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008933 grep -v '^ *+' conftest.er1 >conftest.err
8934 rm -f conftest.er1
8935 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008936 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937 (exit $ac_status); } && {
8938 test -z "$ac_c_werror_flag" ||
8939 test ! -s conftest.err
8940 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008941 ac_lo=0 ac_mid=0
8942 while :; do
8943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008944/* confdefs.h. */
8945_ACEOF
8946cat confdefs.h >>conftest.$ac_ext
8947cat >>conftest.$ac_ext <<_ACEOF
8948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008949$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008950int
8951main ()
8952{
Antoine Pitroub52ec782009-01-25 16:34:23 +00008953static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008954test_array [0] = 0
8955
8956 ;
8957 return 0;
8958}
8959_ACEOF
8960rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008961if { (ac_try="$ac_compile"
8962case "(($ac_try" in
8963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8964 *) ac_try_echo=$ac_try;;
8965esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00008966eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8967$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008970 grep -v '^ *+' conftest.er1 >conftest.err
8971 rm -f conftest.er1
8972 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00008973 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974 (exit $ac_status); } && {
8975 test -z "$ac_c_werror_flag" ||
8976 test ! -s conftest.err
8977 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008978 ac_hi=$ac_mid; break
8979else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008980 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008981sed 's/^/| /' conftest.$ac_ext >&5
8982
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008983 ac_lo=`expr $ac_mid + 1`
8984 if test $ac_lo -le $ac_mid; then
8985 ac_lo= ac_hi=
8986 break
8987 fi
8988 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008989fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008990
8991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008992 done
8993else
Antoine Pitroub52ec782009-01-25 16:34:23 +00008994 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008995sed 's/^/| /' conftest.$ac_ext >&5
8996
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008998/* confdefs.h. */
8999_ACEOF
9000cat confdefs.h >>conftest.$ac_ext
9001cat >>conftest.$ac_ext <<_ACEOF
9002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009003$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009004int
9005main ()
9006{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009007static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009008test_array [0] = 0
9009
9010 ;
9011 return 0;
9012}
9013_ACEOF
9014rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009015if { (ac_try="$ac_compile"
9016case "(($ac_try" in
9017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9018 *) ac_try_echo=$ac_try;;
9019esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009020eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9021$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009024 grep -v '^ *+' conftest.er1 >conftest.err
9025 rm -f conftest.er1
9026 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009027 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009028 (exit $ac_status); } && {
9029 test -z "$ac_c_werror_flag" ||
9030 test ! -s conftest.err
9031 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009032 ac_hi=-1 ac_mid=-1
9033 while :; do
9034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009035/* confdefs.h. */
9036_ACEOF
9037cat confdefs.h >>conftest.$ac_ext
9038cat >>conftest.$ac_ext <<_ACEOF
9039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009040$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009041int
9042main ()
9043{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009044static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009045test_array [0] = 0
9046
9047 ;
9048 return 0;
9049}
9050_ACEOF
9051rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009052if { (ac_try="$ac_compile"
9053case "(($ac_try" in
9054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9055 *) ac_try_echo=$ac_try;;
9056esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009057eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9058$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009061 grep -v '^ *+' conftest.er1 >conftest.err
9062 rm -f conftest.er1
9063 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009064 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009065 (exit $ac_status); } && {
9066 test -z "$ac_c_werror_flag" ||
9067 test ! -s conftest.err
9068 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009069 ac_lo=$ac_mid; break
9070else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009071 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009072sed 's/^/| /' conftest.$ac_ext >&5
9073
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009074 ac_hi=`expr '(' $ac_mid ')' - 1`
9075 if test $ac_mid -le $ac_hi; then
9076 ac_lo= ac_hi=
9077 break
9078 fi
9079 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009081
9082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009083 done
9084else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009085 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009086sed 's/^/| /' conftest.$ac_ext >&5
9087
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009088 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009089fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009090
9091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009092fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009093
9094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009095# Binary search between lo and hi bounds.
9096while test "x$ac_lo" != "x$ac_hi"; do
9097 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009099/* confdefs.h. */
9100_ACEOF
9101cat confdefs.h >>conftest.$ac_ext
9102cat >>conftest.$ac_ext <<_ACEOF
9103/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009104$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009105int
9106main ()
9107{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009108static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009109test_array [0] = 0
9110
9111 ;
9112 return 0;
9113}
9114_ACEOF
9115rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009116if { (ac_try="$ac_compile"
9117case "(($ac_try" in
9118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9119 *) ac_try_echo=$ac_try;;
9120esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009121eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9122$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009125 grep -v '^ *+' conftest.er1 >conftest.err
9126 rm -f conftest.er1
9127 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009128 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009129 (exit $ac_status); } && {
9130 test -z "$ac_c_werror_flag" ||
9131 test ! -s conftest.err
9132 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009133 ac_hi=$ac_mid
9134else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009135 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009136sed 's/^/| /' conftest.$ac_ext >&5
9137
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009139fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009140
9141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009142done
9143case $ac_lo in
9144?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009145'') if test "$ac_cv_type_short" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00009146 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9148{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009149See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009150$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009151See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00009152 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009153 else
9154 ac_cv_sizeof_short=0
9155 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009156esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009157else
Martin v. Löwis11437992002-04-12 09:54:03 +00009158 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009159/* confdefs.h. */
9160_ACEOF
9161cat confdefs.h >>conftest.$ac_ext
9162cat >>conftest.$ac_ext <<_ACEOF
9163/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009164$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +00009165static long int longval () { return (long int) (sizeof (short)); }
9166static unsigned long int ulongval () { return (long int) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009167#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009168#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009169int
9170main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009171{
Martin v. Löwis11437992002-04-12 09:54:03 +00009172
9173 FILE *f = fopen ("conftest.val", "w");
9174 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00009176 if (((long int) (sizeof (short))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009177 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009178 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00009179 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009180 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00009181 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009182 }
9183 else
9184 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009185 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00009186 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009187 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00009188 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009189 }
Antoine Pitroub52ec782009-01-25 16:34:23 +00009190 /* Do not output a trailing newline, as this causes \r\n confusion
9191 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009192 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009193
9194 ;
9195 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009196}
Martin v. Löwis11437992002-04-12 09:54:03 +00009197_ACEOF
9198rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009199if { (ac_try="$ac_link"
9200case "(($ac_try" in
9201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9202 *) ac_try_echo=$ac_try;;
9203esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009204eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9205$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009207 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00009208 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009209 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009210 { (case "(($ac_try" in
9211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9212 *) ac_try_echo=$ac_try;;
9213esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009214eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9215$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009216 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009217 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00009218 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 (exit $ac_status); }; }; then
9220 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009221else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009222 $as_echo "$as_me: program exited with status $ac_status" >&5
9223$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009224sed 's/^/| /' conftest.$ac_ext >&5
9225
Martin v. Löwis11437992002-04-12 09:54:03 +00009226( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227if test "$ac_cv_type_short" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00009228 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9229$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9230{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009231See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009232$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009233See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00009234 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009235 else
9236 ac_cv_sizeof_short=0
9237 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009238fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00009239rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009240rm -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 +00009241fi
9242rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009243fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00009244{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9245$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009246
9247
9248
Martin v. Löwis11437992002-04-12 09:54:03 +00009249cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009250#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009251_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009252
9253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009254# The cast to long int works around a bug in the HP C Compiler
9255# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9256# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9257# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +00009258{ $as_echo "$as_me:$LINENO: checking size of float" >&5
9259$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009260if test "${ac_cv_sizeof_float+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00009261 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009262else
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 if test "$cross_compiling" = yes; then
9264 # Depending upon the size, compute the lo and hi bounds.
9265cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009266/* confdefs.h. */
9267_ACEOF
9268cat confdefs.h >>conftest.$ac_ext
9269cat >>conftest.$ac_ext <<_ACEOF
9270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009271$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009272int
9273main ()
9274{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009275static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009276test_array [0] = 0
9277
9278 ;
9279 return 0;
9280}
9281_ACEOF
9282rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009283if { (ac_try="$ac_compile"
9284case "(($ac_try" in
9285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9286 *) ac_try_echo=$ac_try;;
9287esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009288eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9289$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009290 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009292 grep -v '^ *+' conftest.er1 >conftest.err
9293 rm -f conftest.er1
9294 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009295 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296 (exit $ac_status); } && {
9297 test -z "$ac_c_werror_flag" ||
9298 test ! -s conftest.err
9299 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009300 ac_lo=0 ac_mid=0
9301 while :; do
9302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009303/* confdefs.h. */
9304_ACEOF
9305cat confdefs.h >>conftest.$ac_ext
9306cat >>conftest.$ac_ext <<_ACEOF
9307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009308$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009309int
9310main ()
9311{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009312static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009313test_array [0] = 0
9314
9315 ;
9316 return 0;
9317}
9318_ACEOF
9319rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009320if { (ac_try="$ac_compile"
9321case "(($ac_try" in
9322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9323 *) ac_try_echo=$ac_try;;
9324esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009325eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9326$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009329 grep -v '^ *+' conftest.er1 >conftest.err
9330 rm -f conftest.er1
9331 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009332 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009333 (exit $ac_status); } && {
9334 test -z "$ac_c_werror_flag" ||
9335 test ! -s conftest.err
9336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009337 ac_hi=$ac_mid; break
9338else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009339 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009340sed 's/^/| /' conftest.$ac_ext >&5
9341
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009342 ac_lo=`expr $ac_mid + 1`
9343 if test $ac_lo -le $ac_mid; then
9344 ac_lo= ac_hi=
9345 break
9346 fi
9347 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009349
9350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009351 done
9352else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009353 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009354sed 's/^/| /' conftest.$ac_ext >&5
9355
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009356 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009357/* confdefs.h. */
9358_ACEOF
9359cat confdefs.h >>conftest.$ac_ext
9360cat >>conftest.$ac_ext <<_ACEOF
9361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009362$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009363int
9364main ()
9365{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009366static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009367test_array [0] = 0
9368
9369 ;
9370 return 0;
9371}
9372_ACEOF
9373rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009374if { (ac_try="$ac_compile"
9375case "(($ac_try" in
9376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9377 *) ac_try_echo=$ac_try;;
9378esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009379eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9380$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009381 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009383 grep -v '^ *+' conftest.er1 >conftest.err
9384 rm -f conftest.er1
9385 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009386 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009387 (exit $ac_status); } && {
9388 test -z "$ac_c_werror_flag" ||
9389 test ! -s conftest.err
9390 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009391 ac_hi=-1 ac_mid=-1
9392 while :; do
9393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009394/* confdefs.h. */
9395_ACEOF
9396cat confdefs.h >>conftest.$ac_ext
9397cat >>conftest.$ac_ext <<_ACEOF
9398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009399$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009400int
9401main ()
9402{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009403static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009404test_array [0] = 0
9405
9406 ;
9407 return 0;
9408}
9409_ACEOF
9410rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009411if { (ac_try="$ac_compile"
9412case "(($ac_try" in
9413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9414 *) ac_try_echo=$ac_try;;
9415esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009416eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9417$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009418 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009420 grep -v '^ *+' conftest.er1 >conftest.err
9421 rm -f conftest.er1
9422 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009423 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009424 (exit $ac_status); } && {
9425 test -z "$ac_c_werror_flag" ||
9426 test ! -s conftest.err
9427 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 ac_lo=$ac_mid; break
9429else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009430 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009431sed 's/^/| /' conftest.$ac_ext >&5
9432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009433 ac_hi=`expr '(' $ac_mid ')' - 1`
9434 if test $ac_mid -le $ac_hi; then
9435 ac_lo= ac_hi=
9436 break
9437 fi
9438 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009440
9441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009442 done
9443else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009444 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009445sed 's/^/| /' conftest.$ac_ext >&5
9446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009447 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009449
9450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009452
9453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009454# Binary search between lo and hi bounds.
9455while test "x$ac_lo" != "x$ac_hi"; do
9456 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009458/* confdefs.h. */
9459_ACEOF
9460cat confdefs.h >>conftest.$ac_ext
9461cat >>conftest.$ac_ext <<_ACEOF
9462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009463$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009464int
9465main ()
9466{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009467static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009468test_array [0] = 0
9469
9470 ;
9471 return 0;
9472}
9473_ACEOF
9474rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009475if { (ac_try="$ac_compile"
9476case "(($ac_try" in
9477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9478 *) ac_try_echo=$ac_try;;
9479esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009480eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9481$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009482 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009484 grep -v '^ *+' conftest.er1 >conftest.err
9485 rm -f conftest.er1
9486 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009487 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488 (exit $ac_status); } && {
9489 test -z "$ac_c_werror_flag" ||
9490 test ! -s conftest.err
9491 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009492 ac_hi=$ac_mid
9493else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009494 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009495sed 's/^/| /' conftest.$ac_ext >&5
9496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009497 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009499
9500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009501done
9502case $ac_lo in
9503?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009504'') if test "$ac_cv_type_float" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00009505 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9506$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9507{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009508See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009509$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009510See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00009511 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009512 else
9513 ac_cv_sizeof_float=0
9514 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009515esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009516else
Martin v. Löwis11437992002-04-12 09:54:03 +00009517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009518/* confdefs.h. */
9519_ACEOF
9520cat confdefs.h >>conftest.$ac_ext
9521cat >>conftest.$ac_ext <<_ACEOF
9522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009523$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +00009524static long int longval () { return (long int) (sizeof (float)); }
9525static unsigned long int ulongval () { return (long int) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009526#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009527#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009528int
9529main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009530{
Martin v. Löwis11437992002-04-12 09:54:03 +00009531
9532 FILE *f = fopen ("conftest.val", "w");
9533 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009534 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00009535 if (((long int) (sizeof (float))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009536 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009537 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00009538 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009539 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00009540 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009541 }
9542 else
9543 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009544 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00009545 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009546 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00009547 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009548 }
Antoine Pitroub52ec782009-01-25 16:34:23 +00009549 /* Do not output a trailing newline, as this causes \r\n confusion
9550 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009551 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009552
9553 ;
9554 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009555}
Martin v. Löwis11437992002-04-12 09:54:03 +00009556_ACEOF
9557rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009558if { (ac_try="$ac_link"
9559case "(($ac_try" in
9560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9561 *) ac_try_echo=$ac_try;;
9562esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009563eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9564$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009566 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00009567 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009568 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009569 { (case "(($ac_try" in
9570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9571 *) ac_try_echo=$ac_try;;
9572esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009573eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9574$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009575 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009576 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00009577 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 (exit $ac_status); }; }; then
9579 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009580else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009581 $as_echo "$as_me: program exited with status $ac_status" >&5
9582$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009583sed 's/^/| /' conftest.$ac_ext >&5
9584
Martin v. Löwis11437992002-04-12 09:54:03 +00009585( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586if test "$ac_cv_type_float" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00009587 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9589{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009590See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009591$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009592See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00009593 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009594 else
9595 ac_cv_sizeof_float=0
9596 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009597fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00009598rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009599rm -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 +00009600fi
9601rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009602fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00009603{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9604$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605
9606
9607
Martin v. Löwis11437992002-04-12 09:54:03 +00009608cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009609#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009610_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009611
9612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009613# The cast to long int works around a bug in the HP C Compiler
9614# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9615# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9616# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +00009617{ $as_echo "$as_me:$LINENO: checking size of double" >&5
9618$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009619if test "${ac_cv_sizeof_double+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00009620 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009621else
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 if test "$cross_compiling" = yes; then
9623 # Depending upon the size, compute the lo and hi bounds.
9624cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009625/* confdefs.h. */
9626_ACEOF
9627cat confdefs.h >>conftest.$ac_ext
9628cat >>conftest.$ac_ext <<_ACEOF
9629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009630$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009631int
9632main ()
9633{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009634static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009635test_array [0] = 0
9636
9637 ;
9638 return 0;
9639}
9640_ACEOF
9641rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642if { (ac_try="$ac_compile"
9643case "(($ac_try" in
9644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9645 *) ac_try_echo=$ac_try;;
9646esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009647eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9648$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009651 grep -v '^ *+' conftest.er1 >conftest.err
9652 rm -f conftest.er1
9653 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009655 (exit $ac_status); } && {
9656 test -z "$ac_c_werror_flag" ||
9657 test ! -s conftest.err
9658 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009659 ac_lo=0 ac_mid=0
9660 while :; do
9661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009662/* confdefs.h. */
9663_ACEOF
9664cat confdefs.h >>conftest.$ac_ext
9665cat >>conftest.$ac_ext <<_ACEOF
9666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009667$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009668int
9669main ()
9670{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009671static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009672test_array [0] = 0
9673
9674 ;
9675 return 0;
9676}
9677_ACEOF
9678rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009679if { (ac_try="$ac_compile"
9680case "(($ac_try" in
9681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9682 *) ac_try_echo=$ac_try;;
9683esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009684eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9685$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009688 grep -v '^ *+' conftest.er1 >conftest.err
9689 rm -f conftest.er1
9690 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009691 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692 (exit $ac_status); } && {
9693 test -z "$ac_c_werror_flag" ||
9694 test ! -s conftest.err
9695 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009696 ac_hi=$ac_mid; break
9697else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009698 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009699sed 's/^/| /' conftest.$ac_ext >&5
9700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009701 ac_lo=`expr $ac_mid + 1`
9702 if test $ac_lo -le $ac_mid; then
9703 ac_lo= ac_hi=
9704 break
9705 fi
9706 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009708
9709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009710 done
9711else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009712 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009713sed 's/^/| /' conftest.$ac_ext >&5
9714
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009716/* confdefs.h. */
9717_ACEOF
9718cat confdefs.h >>conftest.$ac_ext
9719cat >>conftest.$ac_ext <<_ACEOF
9720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009721$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009722int
9723main ()
9724{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009725static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009726test_array [0] = 0
9727
9728 ;
9729 return 0;
9730}
9731_ACEOF
9732rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009733if { (ac_try="$ac_compile"
9734case "(($ac_try" in
9735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9736 *) ac_try_echo=$ac_try;;
9737esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009738eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9739$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009742 grep -v '^ *+' conftest.er1 >conftest.err
9743 rm -f conftest.er1
9744 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009745 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009746 (exit $ac_status); } && {
9747 test -z "$ac_c_werror_flag" ||
9748 test ! -s conftest.err
9749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009750 ac_hi=-1 ac_mid=-1
9751 while :; do
9752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009753/* confdefs.h. */
9754_ACEOF
9755cat confdefs.h >>conftest.$ac_ext
9756cat >>conftest.$ac_ext <<_ACEOF
9757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009758$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009759int
9760main ()
9761{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009762static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009763test_array [0] = 0
9764
9765 ;
9766 return 0;
9767}
9768_ACEOF
9769rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009770if { (ac_try="$ac_compile"
9771case "(($ac_try" in
9772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9773 *) ac_try_echo=$ac_try;;
9774esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009775eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9776$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009779 grep -v '^ *+' conftest.er1 >conftest.err
9780 rm -f conftest.er1
9781 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009782 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009783 (exit $ac_status); } && {
9784 test -z "$ac_c_werror_flag" ||
9785 test ! -s conftest.err
9786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 ac_lo=$ac_mid; break
9788else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009789 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009790sed 's/^/| /' conftest.$ac_ext >&5
9791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009792 ac_hi=`expr '(' $ac_mid ')' - 1`
9793 if test $ac_mid -le $ac_hi; then
9794 ac_lo= ac_hi=
9795 break
9796 fi
9797 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009799
9800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009801 done
9802else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009803 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009804sed 's/^/| /' conftest.$ac_ext >&5
9805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009806 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808
9809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009811
9812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009813# Binary search between lo and hi bounds.
9814while test "x$ac_lo" != "x$ac_hi"; do
9815 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009817/* confdefs.h. */
9818_ACEOF
9819cat confdefs.h >>conftest.$ac_ext
9820cat >>conftest.$ac_ext <<_ACEOF
9821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009822$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009823int
9824main ()
9825{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009826static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009827test_array [0] = 0
9828
9829 ;
9830 return 0;
9831}
9832_ACEOF
9833rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009834if { (ac_try="$ac_compile"
9835case "(($ac_try" in
9836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9837 *) ac_try_echo=$ac_try;;
9838esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009839eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9840$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009841 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009843 grep -v '^ *+' conftest.er1 >conftest.err
9844 rm -f conftest.er1
9845 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009846 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847 (exit $ac_status); } && {
9848 test -z "$ac_c_werror_flag" ||
9849 test ! -s conftest.err
9850 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009851 ac_hi=$ac_mid
9852else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009853 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009854sed 's/^/| /' conftest.$ac_ext >&5
9855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009858
9859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009860done
9861case $ac_lo in
9862?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863'') if test "$ac_cv_type_double" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00009864 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9865$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9866{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009867See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009868$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009869See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00009870 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009871 else
9872 ac_cv_sizeof_double=0
9873 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009874esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009875else
Martin v. Löwis11437992002-04-12 09:54:03 +00009876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009877/* confdefs.h. */
9878_ACEOF
9879cat confdefs.h >>conftest.$ac_ext
9880cat >>conftest.$ac_ext <<_ACEOF
9881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009882$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +00009883static long int longval () { return (long int) (sizeof (double)); }
9884static unsigned long int ulongval () { return (long int) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009885#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009886#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009887int
9888main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009889{
Martin v. Löwis11437992002-04-12 09:54:03 +00009890
9891 FILE *f = fopen ("conftest.val", "w");
9892 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00009894 if (((long int) (sizeof (double))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009895 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009896 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00009897 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009898 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00009899 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009900 }
9901 else
9902 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009903 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +00009904 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009905 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +00009906 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009907 }
Antoine Pitroub52ec782009-01-25 16:34:23 +00009908 /* Do not output a trailing newline, as this causes \r\n confusion
9909 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009910 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009911
9912 ;
9913 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009914}
Martin v. Löwis11437992002-04-12 09:54:03 +00009915_ACEOF
9916rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009917if { (ac_try="$ac_link"
9918case "(($ac_try" in
9919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9920 *) ac_try_echo=$ac_try;;
9921esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009922eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9923$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009925 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00009926 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009928 { (case "(($ac_try" in
9929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9930 *) ac_try_echo=$ac_try;;
9931esac
Antoine Pitroub52ec782009-01-25 16:34:23 +00009932eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9933$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009934 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009935 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +00009936 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009937 (exit $ac_status); }; }; then
9938 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009939else
Antoine Pitroub52ec782009-01-25 16:34:23 +00009940 $as_echo "$as_me: program exited with status $ac_status" >&5
9941$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009942sed 's/^/| /' conftest.$ac_ext >&5
9943
Martin v. Löwis11437992002-04-12 09:54:03 +00009944( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009945if test "$ac_cv_type_double" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00009946 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9948{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009949See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +00009950$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +00009951See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +00009952 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009953 else
9954 ac_cv_sizeof_double=0
9955 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009956fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00009957rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009958rm -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 +00009959fi
9960rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009961fi
Antoine Pitroub52ec782009-01-25 16:34:23 +00009962{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
9963$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009964
9965
9966
Martin v. Löwis11437992002-04-12 09:54:03 +00009967cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009968#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +00009969_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009970
9971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009972# The cast to long int works around a bug in the HP C Compiler
9973# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9974# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9975# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +00009976{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5
9977$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009978if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +00009979 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009980else
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 if test "$cross_compiling" = yes; then
9982 # Depending upon the size, compute the lo and hi bounds.
9983cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009984/* confdefs.h. */
9985_ACEOF
9986cat confdefs.h >>conftest.$ac_ext
9987cat >>conftest.$ac_ext <<_ACEOF
9988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009989$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009990int
9991main ()
9992{
Antoine Pitroub52ec782009-01-25 16:34:23 +00009993static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009994test_array [0] = 0
9995
9996 ;
9997 return 0;
9998}
9999_ACEOF
10000rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010001if { (ac_try="$ac_compile"
10002case "(($ac_try" in
10003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10004 *) ac_try_echo=$ac_try;;
10005esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010006eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10007$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010010 grep -v '^ *+' conftest.er1 >conftest.err
10011 rm -f conftest.er1
10012 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010013 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010014 (exit $ac_status); } && {
10015 test -z "$ac_c_werror_flag" ||
10016 test ! -s conftest.err
10017 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010018 ac_lo=0 ac_mid=0
10019 while :; do
10020 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010021/* confdefs.h. */
10022_ACEOF
10023cat confdefs.h >>conftest.$ac_ext
10024cat >>conftest.$ac_ext <<_ACEOF
10025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010026$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010027int
10028main ()
10029{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010030static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010031test_array [0] = 0
10032
10033 ;
10034 return 0;
10035}
10036_ACEOF
10037rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010038if { (ac_try="$ac_compile"
10039case "(($ac_try" in
10040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10041 *) ac_try_echo=$ac_try;;
10042esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010043eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10044$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010047 grep -v '^ *+' conftest.er1 >conftest.err
10048 rm -f conftest.er1
10049 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010050 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010051 (exit $ac_status); } && {
10052 test -z "$ac_c_werror_flag" ||
10053 test ! -s conftest.err
10054 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010055 ac_hi=$ac_mid; break
10056else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010057 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010058sed 's/^/| /' conftest.$ac_ext >&5
10059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010060 ac_lo=`expr $ac_mid + 1`
10061 if test $ac_lo -le $ac_mid; then
10062 ac_lo= ac_hi=
10063 break
10064 fi
10065 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010067
10068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010069 done
10070else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010071 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010072sed 's/^/| /' conftest.$ac_ext >&5
10073
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010074 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010075/* confdefs.h. */
10076_ACEOF
10077cat confdefs.h >>conftest.$ac_ext
10078cat >>conftest.$ac_ext <<_ACEOF
10079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010080$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010081int
10082main ()
10083{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010084static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010085test_array [0] = 0
10086
10087 ;
10088 return 0;
10089}
10090_ACEOF
10091rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010092if { (ac_try="$ac_compile"
10093case "(($ac_try" in
10094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10095 *) ac_try_echo=$ac_try;;
10096esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010097eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10098$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010101 grep -v '^ *+' conftest.er1 >conftest.err
10102 rm -f conftest.er1
10103 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010104 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010105 (exit $ac_status); } && {
10106 test -z "$ac_c_werror_flag" ||
10107 test ! -s conftest.err
10108 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010109 ac_hi=-1 ac_mid=-1
10110 while :; do
10111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010112/* confdefs.h. */
10113_ACEOF
10114cat confdefs.h >>conftest.$ac_ext
10115cat >>conftest.$ac_ext <<_ACEOF
10116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010117$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010118int
10119main ()
10120{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010121static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010122test_array [0] = 0
10123
10124 ;
10125 return 0;
10126}
10127_ACEOF
10128rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010129if { (ac_try="$ac_compile"
10130case "(($ac_try" in
10131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10132 *) ac_try_echo=$ac_try;;
10133esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010134eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10135$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010138 grep -v '^ *+' conftest.er1 >conftest.err
10139 rm -f conftest.er1
10140 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010141 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010142 (exit $ac_status); } && {
10143 test -z "$ac_c_werror_flag" ||
10144 test ! -s conftest.err
10145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 ac_lo=$ac_mid; break
10147else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010148 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010149sed 's/^/| /' conftest.$ac_ext >&5
10150
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010151 ac_hi=`expr '(' $ac_mid ')' - 1`
10152 if test $ac_mid -le $ac_hi; then
10153 ac_lo= ac_hi=
10154 break
10155 fi
10156 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010158
10159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010160 done
10161else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010162 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010163sed 's/^/| /' conftest.$ac_ext >&5
10164
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010165 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167
10168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010170
10171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010172# Binary search between lo and hi bounds.
10173while test "x$ac_lo" != "x$ac_hi"; do
10174 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010176/* confdefs.h. */
10177_ACEOF
10178cat confdefs.h >>conftest.$ac_ext
10179cat >>conftest.$ac_ext <<_ACEOF
10180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010181$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010182int
10183main ()
10184{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010185static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010186test_array [0] = 0
10187
10188 ;
10189 return 0;
10190}
10191_ACEOF
10192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010193if { (ac_try="$ac_compile"
10194case "(($ac_try" in
10195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10196 *) ac_try_echo=$ac_try;;
10197esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010198eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10199$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010202 grep -v '^ *+' conftest.er1 >conftest.err
10203 rm -f conftest.er1
10204 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010205 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206 (exit $ac_status); } && {
10207 test -z "$ac_c_werror_flag" ||
10208 test ! -s conftest.err
10209 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010210 ac_hi=$ac_mid
10211else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010212 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010213sed 's/^/| /' conftest.$ac_ext >&5
10214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010217
10218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010219done
10220case $ac_lo in
10221?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222'') if test "$ac_cv_type_fpos_t" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000010223 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10224$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10225{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010226See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010227$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010228See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000010229 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010230 else
10231 ac_cv_sizeof_fpos_t=0
10232 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010233esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010234else
Martin v. Löwis11437992002-04-12 09:54:03 +000010235 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010236/* confdefs.h. */
10237_ACEOF
10238cat confdefs.h >>conftest.$ac_ext
10239cat >>conftest.$ac_ext <<_ACEOF
10240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010241$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +000010242static long int longval () { return (long int) (sizeof (fpos_t)); }
10243static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010244#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010245#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010246int
10247main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010248{
Martin v. Löwis11437992002-04-12 09:54:03 +000010249
10250 FILE *f = fopen ("conftest.val", "w");
10251 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000010253 if (((long int) (sizeof (fpos_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010254 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010255 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000010256 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010257 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000010258 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010259 }
10260 else
10261 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010262 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000010263 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010264 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000010265 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010266 }
Antoine Pitroub52ec782009-01-25 16:34:23 +000010267 /* Do not output a trailing newline, as this causes \r\n confusion
10268 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010269 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010270
10271 ;
10272 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010273}
Martin v. Löwis11437992002-04-12 09:54:03 +000010274_ACEOF
10275rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010276if { (ac_try="$ac_link"
10277case "(($ac_try" in
10278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10279 *) ac_try_echo=$ac_try;;
10280esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010281eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10282$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010283 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010284 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000010285 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010286 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010287 { (case "(($ac_try" in
10288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10289 *) ac_try_echo=$ac_try;;
10290esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010291eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10292$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010293 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010294 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000010295 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 (exit $ac_status); }; }; then
10297 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010298else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010299 $as_echo "$as_me: program exited with status $ac_status" >&5
10300$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010301sed 's/^/| /' conftest.$ac_ext >&5
10302
Martin v. Löwis11437992002-04-12 09:54:03 +000010303( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304if test "$ac_cv_type_fpos_t" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000010305 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10307{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010308See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010309$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010310See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000010311 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010312 else
10313 ac_cv_sizeof_fpos_t=0
10314 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010315fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000010316rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010317rm -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 +000010318fi
10319rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010320fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000010321{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10322$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010323
10324
10325
Martin v. Löwis11437992002-04-12 09:54:03 +000010326cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010327#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010328_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010329
Michael W. Hudson54241132001-12-07 15:38:26 +000010330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010331# The cast to long int works around a bug in the HP C Compiler
10332# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10333# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10334# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +000010335{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
10336$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010337if test "${ac_cv_sizeof_size_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000010338 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010339else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010340 if test "$cross_compiling" = yes; then
10341 # Depending upon the size, compute the lo and hi bounds.
10342cat >conftest.$ac_ext <<_ACEOF
10343/* confdefs.h. */
10344_ACEOF
10345cat confdefs.h >>conftest.$ac_ext
10346cat >>conftest.$ac_ext <<_ACEOF
10347/* end confdefs.h. */
10348$ac_includes_default
10349int
10350main ()
10351{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010352static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010353test_array [0] = 0
10354
10355 ;
10356 return 0;
10357}
10358_ACEOF
10359rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360if { (ac_try="$ac_compile"
10361case "(($ac_try" in
10362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10363 *) ac_try_echo=$ac_try;;
10364esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010365eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10366$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010368 ac_status=$?
10369 grep -v '^ *+' conftest.er1 >conftest.err
10370 rm -f conftest.er1
10371 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010372 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373 (exit $ac_status); } && {
10374 test -z "$ac_c_werror_flag" ||
10375 test ! -s conftest.err
10376 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010377 ac_lo=0 ac_mid=0
10378 while :; do
10379 cat >conftest.$ac_ext <<_ACEOF
10380/* confdefs.h. */
10381_ACEOF
10382cat confdefs.h >>conftest.$ac_ext
10383cat >>conftest.$ac_ext <<_ACEOF
10384/* end confdefs.h. */
10385$ac_includes_default
10386int
10387main ()
10388{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010389static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010390test_array [0] = 0
10391
10392 ;
10393 return 0;
10394}
10395_ACEOF
10396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010397if { (ac_try="$ac_compile"
10398case "(($ac_try" in
10399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10400 *) ac_try_echo=$ac_try;;
10401esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010402eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10403$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010404 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010405 ac_status=$?
10406 grep -v '^ *+' conftest.er1 >conftest.err
10407 rm -f conftest.er1
10408 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010409 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010410 (exit $ac_status); } && {
10411 test -z "$ac_c_werror_flag" ||
10412 test ! -s conftest.err
10413 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010414 ac_hi=$ac_mid; break
10415else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010416 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010417sed 's/^/| /' conftest.$ac_ext >&5
10418
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010419 ac_lo=`expr $ac_mid + 1`
10420 if test $ac_lo -le $ac_mid; then
10421 ac_lo= ac_hi=
10422 break
10423 fi
10424 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010426
10427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010428 done
10429else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010430 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010431sed 's/^/| /' conftest.$ac_ext >&5
10432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010433 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010434/* confdefs.h. */
10435_ACEOF
10436cat confdefs.h >>conftest.$ac_ext
10437cat >>conftest.$ac_ext <<_ACEOF
10438/* end confdefs.h. */
10439$ac_includes_default
10440int
10441main ()
10442{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010443static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010444test_array [0] = 0
10445
10446 ;
10447 return 0;
10448}
10449_ACEOF
10450rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010451if { (ac_try="$ac_compile"
10452case "(($ac_try" in
10453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10454 *) ac_try_echo=$ac_try;;
10455esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010456eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10457$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010459 ac_status=$?
10460 grep -v '^ *+' conftest.er1 >conftest.err
10461 rm -f conftest.er1
10462 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010463 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010464 (exit $ac_status); } && {
10465 test -z "$ac_c_werror_flag" ||
10466 test ! -s conftest.err
10467 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010468 ac_hi=-1 ac_mid=-1
10469 while :; do
10470 cat >conftest.$ac_ext <<_ACEOF
10471/* confdefs.h. */
10472_ACEOF
10473cat confdefs.h >>conftest.$ac_ext
10474cat >>conftest.$ac_ext <<_ACEOF
10475/* end confdefs.h. */
10476$ac_includes_default
10477int
10478main ()
10479{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010480static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010481test_array [0] = 0
10482
10483 ;
10484 return 0;
10485}
10486_ACEOF
10487rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010488if { (ac_try="$ac_compile"
10489case "(($ac_try" in
10490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10491 *) ac_try_echo=$ac_try;;
10492esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010493eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10494$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010496 ac_status=$?
10497 grep -v '^ *+' conftest.er1 >conftest.err
10498 rm -f conftest.er1
10499 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010500 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010501 (exit $ac_status); } && {
10502 test -z "$ac_c_werror_flag" ||
10503 test ! -s conftest.err
10504 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010505 ac_lo=$ac_mid; break
10506else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010507 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010508sed 's/^/| /' conftest.$ac_ext >&5
10509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510 ac_hi=`expr '(' $ac_mid ')' - 1`
10511 if test $ac_mid -le $ac_hi; then
10512 ac_lo= ac_hi=
10513 break
10514 fi
10515 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010517
10518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010519 done
10520else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010521 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010522sed 's/^/| /' conftest.$ac_ext >&5
10523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010524 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010526
10527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010529
10530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010531# Binary search between lo and hi bounds.
10532while test "x$ac_lo" != "x$ac_hi"; do
10533 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10534 cat >conftest.$ac_ext <<_ACEOF
10535/* confdefs.h. */
10536_ACEOF
10537cat confdefs.h >>conftest.$ac_ext
10538cat >>conftest.$ac_ext <<_ACEOF
10539/* end confdefs.h. */
10540$ac_includes_default
10541int
10542main ()
10543{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010544static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010545test_array [0] = 0
10546
10547 ;
10548 return 0;
10549}
10550_ACEOF
10551rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010552if { (ac_try="$ac_compile"
10553case "(($ac_try" in
10554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10555 *) ac_try_echo=$ac_try;;
10556esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010557eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10558$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010560 ac_status=$?
10561 grep -v '^ *+' conftest.er1 >conftest.err
10562 rm -f conftest.er1
10563 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010564 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565 (exit $ac_status); } && {
10566 test -z "$ac_c_werror_flag" ||
10567 test ! -s conftest.err
10568 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010569 ac_hi=$ac_mid
10570else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010571 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010572sed 's/^/| /' conftest.$ac_ext >&5
10573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010574 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010576
10577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010578done
10579case $ac_lo in
10580?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581'') if test "$ac_cv_type_size_t" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000010582 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10584{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010586$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010587See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000010588 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010589 else
10590 ac_cv_sizeof_size_t=0
10591 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010592esac
10593else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010594 cat >conftest.$ac_ext <<_ACEOF
10595/* confdefs.h. */
10596_ACEOF
10597cat confdefs.h >>conftest.$ac_ext
10598cat >>conftest.$ac_ext <<_ACEOF
10599/* end confdefs.h. */
10600$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +000010601static long int longval () { return (long int) (sizeof (size_t)); }
10602static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010603#include <stdio.h>
10604#include <stdlib.h>
10605int
10606main ()
10607{
10608
10609 FILE *f = fopen ("conftest.val", "w");
10610 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010611 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000010612 if (((long int) (sizeof (size_t))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010613 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010614 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000010615 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010616 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000010617 fprintf (f, "%ld", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010618 }
10619 else
10620 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010621 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000010622 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010623 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000010624 fprintf (f, "%lu", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010625 }
Antoine Pitroub52ec782009-01-25 16:34:23 +000010626 /* Do not output a trailing newline, as this causes \r\n confusion
10627 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010628 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010629
10630 ;
10631 return 0;
10632}
10633_ACEOF
10634rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010635if { (ac_try="$ac_link"
10636case "(($ac_try" in
10637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10638 *) ac_try_echo=$ac_try;;
10639esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010640eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10641$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010643 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000010644 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010645 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010646 { (case "(($ac_try" in
10647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10648 *) ac_try_echo=$ac_try;;
10649esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010650eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10651$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010652 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010653 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000010654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010655 (exit $ac_status); }; }; then
10656 ac_cv_sizeof_size_t=`cat conftest.val`
10657else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010658 $as_echo "$as_me: program exited with status $ac_status" >&5
10659$as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010660sed 's/^/| /' conftest.$ac_ext >&5
10661
10662( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663if test "$ac_cv_type_size_t" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000010664 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10666{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010667See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010668$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010669See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000010670 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010671 else
10672 ac_cv_sizeof_size_t=0
10673 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010674fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000010675rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010676rm -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 +000010677fi
10678rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010679fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000010680{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10681$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682
10683
10684
Martin v. Löwis18e16552006-02-15 17:27:45 +000010685cat >>confdefs.h <<_ACEOF
10686#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10687_ACEOF
10688
10689
Christian Heimes400adb02008-02-01 08:12:03 +000010690# The cast to long int works around a bug in the HP C Compiler
10691# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10692# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10693# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +000010694{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5
10695$as_echo_n "checking size of pid_t... " >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000010696if test "${ac_cv_sizeof_pid_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000010697 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +000010698else
10699 if test "$cross_compiling" = yes; then
10700 # Depending upon the size, compute the lo and hi bounds.
10701cat >conftest.$ac_ext <<_ACEOF
10702/* confdefs.h. */
10703_ACEOF
10704cat confdefs.h >>conftest.$ac_ext
10705cat >>conftest.$ac_ext <<_ACEOF
10706/* end confdefs.h. */
10707$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000010708int
10709main ()
10710{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010711static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010712test_array [0] = 0
10713
10714 ;
10715 return 0;
10716}
10717_ACEOF
10718rm -f conftest.$ac_objext
10719if { (ac_try="$ac_compile"
10720case "(($ac_try" in
10721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10722 *) ac_try_echo=$ac_try;;
10723esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010724eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10725$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010726 (eval "$ac_compile") 2>conftest.er1
10727 ac_status=$?
10728 grep -v '^ *+' conftest.er1 >conftest.err
10729 rm -f conftest.er1
10730 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010731 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010732 (exit $ac_status); } && {
10733 test -z "$ac_c_werror_flag" ||
10734 test ! -s conftest.err
10735 } && test -s conftest.$ac_objext; then
10736 ac_lo=0 ac_mid=0
10737 while :; do
10738 cat >conftest.$ac_ext <<_ACEOF
10739/* confdefs.h. */
10740_ACEOF
10741cat confdefs.h >>conftest.$ac_ext
10742cat >>conftest.$ac_ext <<_ACEOF
10743/* end confdefs.h. */
10744$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000010745int
10746main ()
10747{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010748static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010749test_array [0] = 0
10750
10751 ;
10752 return 0;
10753}
10754_ACEOF
10755rm -f conftest.$ac_objext
10756if { (ac_try="$ac_compile"
10757case "(($ac_try" in
10758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10759 *) ac_try_echo=$ac_try;;
10760esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010761eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10762$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010763 (eval "$ac_compile") 2>conftest.er1
10764 ac_status=$?
10765 grep -v '^ *+' conftest.er1 >conftest.err
10766 rm -f conftest.er1
10767 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010768 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010769 (exit $ac_status); } && {
10770 test -z "$ac_c_werror_flag" ||
10771 test ! -s conftest.err
10772 } && test -s conftest.$ac_objext; then
10773 ac_hi=$ac_mid; break
10774else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010775 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010776sed 's/^/| /' conftest.$ac_ext >&5
10777
10778 ac_lo=`expr $ac_mid + 1`
10779 if test $ac_lo -le $ac_mid; then
10780 ac_lo= ac_hi=
10781 break
10782 fi
10783 ac_mid=`expr 2 '*' $ac_mid + 1`
10784fi
10785
10786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10787 done
10788else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010789 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010790sed 's/^/| /' conftest.$ac_ext >&5
10791
10792 cat >conftest.$ac_ext <<_ACEOF
10793/* confdefs.h. */
10794_ACEOF
10795cat confdefs.h >>conftest.$ac_ext
10796cat >>conftest.$ac_ext <<_ACEOF
10797/* end confdefs.h. */
10798$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000010799int
10800main ()
10801{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010802static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000010803test_array [0] = 0
10804
10805 ;
10806 return 0;
10807}
10808_ACEOF
10809rm -f conftest.$ac_objext
10810if { (ac_try="$ac_compile"
10811case "(($ac_try" in
10812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10813 *) ac_try_echo=$ac_try;;
10814esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010815eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10816$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010817 (eval "$ac_compile") 2>conftest.er1
10818 ac_status=$?
10819 grep -v '^ *+' conftest.er1 >conftest.err
10820 rm -f conftest.er1
10821 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010822 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010823 (exit $ac_status); } && {
10824 test -z "$ac_c_werror_flag" ||
10825 test ! -s conftest.err
10826 } && test -s conftest.$ac_objext; then
10827 ac_hi=-1 ac_mid=-1
10828 while :; do
10829 cat >conftest.$ac_ext <<_ACEOF
10830/* confdefs.h. */
10831_ACEOF
10832cat confdefs.h >>conftest.$ac_ext
10833cat >>conftest.$ac_ext <<_ACEOF
10834/* end confdefs.h. */
10835$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000010836int
10837main ()
10838{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010839static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010840test_array [0] = 0
10841
10842 ;
10843 return 0;
10844}
10845_ACEOF
10846rm -f conftest.$ac_objext
10847if { (ac_try="$ac_compile"
10848case "(($ac_try" in
10849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10850 *) ac_try_echo=$ac_try;;
10851esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010852eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10853$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010854 (eval "$ac_compile") 2>conftest.er1
10855 ac_status=$?
10856 grep -v '^ *+' conftest.er1 >conftest.err
10857 rm -f conftest.er1
10858 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010859 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010860 (exit $ac_status); } && {
10861 test -z "$ac_c_werror_flag" ||
10862 test ! -s conftest.err
10863 } && test -s conftest.$ac_objext; then
10864 ac_lo=$ac_mid; break
10865else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010866 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010867sed 's/^/| /' conftest.$ac_ext >&5
10868
10869 ac_hi=`expr '(' $ac_mid ')' - 1`
10870 if test $ac_mid -le $ac_hi; then
10871 ac_lo= ac_hi=
10872 break
10873 fi
10874 ac_mid=`expr 2 '*' $ac_mid`
10875fi
10876
10877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10878 done
10879else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010880 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010881sed 's/^/| /' conftest.$ac_ext >&5
10882
10883 ac_lo= ac_hi=
10884fi
10885
10886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10887fi
10888
10889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10890# Binary search between lo and hi bounds.
10891while test "x$ac_lo" != "x$ac_hi"; do
10892 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10893 cat >conftest.$ac_ext <<_ACEOF
10894/* confdefs.h. */
10895_ACEOF
10896cat confdefs.h >>conftest.$ac_ext
10897cat >>conftest.$ac_ext <<_ACEOF
10898/* end confdefs.h. */
10899$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000010900int
10901main ()
10902{
Antoine Pitroub52ec782009-01-25 16:34:23 +000010903static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000010904test_array [0] = 0
10905
10906 ;
10907 return 0;
10908}
10909_ACEOF
10910rm -f conftest.$ac_objext
10911if { (ac_try="$ac_compile"
10912case "(($ac_try" in
10913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10914 *) ac_try_echo=$ac_try;;
10915esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010916eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10917$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010918 (eval "$ac_compile") 2>conftest.er1
10919 ac_status=$?
10920 grep -v '^ *+' conftest.er1 >conftest.err
10921 rm -f conftest.er1
10922 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010923 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010924 (exit $ac_status); } && {
10925 test -z "$ac_c_werror_flag" ||
10926 test ! -s conftest.err
10927 } && test -s conftest.$ac_objext; then
10928 ac_hi=$ac_mid
10929else
Antoine Pitroub52ec782009-01-25 16:34:23 +000010930 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000010931sed 's/^/| /' conftest.$ac_ext >&5
10932
10933 ac_lo=`expr '(' $ac_mid ')' + 1`
10934fi
10935
10936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10937done
10938case $ac_lo in
10939?*) ac_cv_sizeof_pid_t=$ac_lo;;
10940'') if test "$ac_cv_type_pid_t" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000010941 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10943{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010944See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000010945$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000010946See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000010947 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000010948 else
10949 ac_cv_sizeof_pid_t=0
10950 fi ;;
10951esac
10952else
10953 cat >conftest.$ac_ext <<_ACEOF
10954/* confdefs.h. */
10955_ACEOF
10956cat confdefs.h >>conftest.$ac_ext
10957cat >>conftest.$ac_ext <<_ACEOF
10958/* end confdefs.h. */
10959$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +000010960static long int longval () { return (long int) (sizeof (pid_t)); }
10961static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); }
Christian Heimes400adb02008-02-01 08:12:03 +000010962#include <stdio.h>
10963#include <stdlib.h>
10964int
10965main ()
10966{
10967
10968 FILE *f = fopen ("conftest.val", "w");
10969 if (! f)
10970 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000010971 if (((long int) (sizeof (pid_t))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000010972 {
10973 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000010974 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000010975 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000010976 fprintf (f, "%ld", i);
Christian Heimes400adb02008-02-01 08:12:03 +000010977 }
10978 else
10979 {
10980 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000010981 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000010982 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000010983 fprintf (f, "%lu", i);
Christian Heimes400adb02008-02-01 08:12:03 +000010984 }
Antoine Pitroub52ec782009-01-25 16:34:23 +000010985 /* Do not output a trailing newline, as this causes \r\n confusion
10986 on some platforms. */
Christian Heimes400adb02008-02-01 08:12:03 +000010987 return ferror (f) || fclose (f) != 0;
10988
10989 ;
10990 return 0;
10991}
10992_ACEOF
10993rm -f conftest$ac_exeext
10994if { (ac_try="$ac_link"
10995case "(($ac_try" in
10996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10997 *) ac_try_echo=$ac_try;;
10998esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000010999eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11000$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011001 (eval "$ac_link") 2>&5
11002 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000011003 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011004 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11005 { (case "(($ac_try" in
11006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11007 *) ac_try_echo=$ac_try;;
11008esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011009eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11010$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011011 (eval "$ac_try") 2>&5
11012 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000011013 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011014 (exit $ac_status); }; }; then
11015 ac_cv_sizeof_pid_t=`cat conftest.val`
11016else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011017 $as_echo "$as_me: program exited with status $ac_status" >&5
11018$as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011019sed 's/^/| /' conftest.$ac_ext >&5
11020
11021( exit $ac_status )
11022if test "$ac_cv_type_pid_t" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000011023 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11025{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011026See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011027$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011028See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000011029 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011030 else
11031 ac_cv_sizeof_pid_t=0
11032 fi
11033fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000011034rm -rf conftest.dSYM
Christian Heimes400adb02008-02-01 08:12:03 +000011035rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11036fi
11037rm -f conftest.val
11038fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000011039{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11040$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011041
11042
11043
11044cat >>confdefs.h <<_ACEOF
11045#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11046_ACEOF
11047
11048
Michael W. Hudson54241132001-12-07 15:38:26 +000011049
Antoine Pitroub52ec782009-01-25 16:34:23 +000011050{ $as_echo "$as_me:$LINENO: checking for long long support" >&5
11051$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011052have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011053cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011054/* confdefs.h. */
11055_ACEOF
11056cat confdefs.h >>conftest.$ac_ext
11057cat >>conftest.$ac_ext <<_ACEOF
11058/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011059
Martin v. Löwis11437992002-04-12 09:54:03 +000011060int
11061main ()
11062{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011063long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011064 ;
11065 return 0;
11066}
11067_ACEOF
11068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011069if { (ac_try="$ac_compile"
11070case "(($ac_try" in
11071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11072 *) ac_try_echo=$ac_try;;
11073esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011074eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11075$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011078 grep -v '^ *+' conftest.er1 >conftest.err
11079 rm -f conftest.er1
11080 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011081 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011082 (exit $ac_status); } && {
11083 test -z "$ac_c_werror_flag" ||
11084 test ! -s conftest.err
11085 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011086
11087
11088cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011089#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011090_ACEOF
11091
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011092 have_long_long=yes
11093
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011094else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011095 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011096sed 's/^/| /' conftest.$ac_ext >&5
11097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011098
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011099fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011100
11101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000011102{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5
11103$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011104if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011105# The cast to long int works around a bug in the HP C Compiler
11106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11108# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +000011109{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
11110$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011111if test "${ac_cv_sizeof_long_long+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000011112 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011113else
Martin v. Löwis11437992002-04-12 09:54:03 +000011114 if test "$cross_compiling" = yes; then
11115 # Depending upon the size, compute the lo and hi bounds.
11116cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011117/* confdefs.h. */
11118_ACEOF
11119cat confdefs.h >>conftest.$ac_ext
11120cat >>conftest.$ac_ext <<_ACEOF
11121/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011122$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011123int
11124main ()
11125{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011126static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011127test_array [0] = 0
11128
11129 ;
11130 return 0;
11131}
11132_ACEOF
11133rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011134if { (ac_try="$ac_compile"
11135case "(($ac_try" in
11136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11137 *) ac_try_echo=$ac_try;;
11138esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011139eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11140$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011142 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011143 grep -v '^ *+' conftest.er1 >conftest.err
11144 rm -f conftest.er1
11145 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011146 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147 (exit $ac_status); } && {
11148 test -z "$ac_c_werror_flag" ||
11149 test ! -s conftest.err
11150 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011151 ac_lo=0 ac_mid=0
11152 while :; do
11153 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011154/* confdefs.h. */
11155_ACEOF
11156cat confdefs.h >>conftest.$ac_ext
11157cat >>conftest.$ac_ext <<_ACEOF
11158/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011159$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011160int
11161main ()
11162{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011163static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011164test_array [0] = 0
11165
11166 ;
11167 return 0;
11168}
11169_ACEOF
11170rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011171if { (ac_try="$ac_compile"
11172case "(($ac_try" in
11173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11174 *) ac_try_echo=$ac_try;;
11175esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011176eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11177$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011180 grep -v '^ *+' conftest.er1 >conftest.err
11181 rm -f conftest.er1
11182 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011183 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011184 (exit $ac_status); } && {
11185 test -z "$ac_c_werror_flag" ||
11186 test ! -s conftest.err
11187 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011188 ac_hi=$ac_mid; break
11189else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011190 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011191sed 's/^/| /' conftest.$ac_ext >&5
11192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011193 ac_lo=`expr $ac_mid + 1`
11194 if test $ac_lo -le $ac_mid; then
11195 ac_lo= ac_hi=
11196 break
11197 fi
11198 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011199fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011200
11201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011202 done
11203else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011204 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011205sed 's/^/| /' conftest.$ac_ext >&5
11206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011207 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011208/* confdefs.h. */
11209_ACEOF
11210cat confdefs.h >>conftest.$ac_ext
11211cat >>conftest.$ac_ext <<_ACEOF
11212/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011213$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011214int
11215main ()
11216{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011217static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011218test_array [0] = 0
11219
11220 ;
11221 return 0;
11222}
11223_ACEOF
11224rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011225if { (ac_try="$ac_compile"
11226case "(($ac_try" in
11227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11228 *) ac_try_echo=$ac_try;;
11229esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011230eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11231$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011233 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011234 grep -v '^ *+' conftest.er1 >conftest.err
11235 rm -f conftest.er1
11236 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011237 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011238 (exit $ac_status); } && {
11239 test -z "$ac_c_werror_flag" ||
11240 test ! -s conftest.err
11241 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011242 ac_hi=-1 ac_mid=-1
11243 while :; do
11244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011245/* confdefs.h. */
11246_ACEOF
11247cat confdefs.h >>conftest.$ac_ext
11248cat >>conftest.$ac_ext <<_ACEOF
11249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011250$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011251int
11252main ()
11253{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011254static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011255test_array [0] = 0
11256
11257 ;
11258 return 0;
11259}
11260_ACEOF
11261rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011262if { (ac_try="$ac_compile"
11263case "(($ac_try" in
11264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11265 *) ac_try_echo=$ac_try;;
11266esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011267eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11268$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011270 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011271 grep -v '^ *+' conftest.er1 >conftest.err
11272 rm -f conftest.er1
11273 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011274 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011275 (exit $ac_status); } && {
11276 test -z "$ac_c_werror_flag" ||
11277 test ! -s conftest.err
11278 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011279 ac_lo=$ac_mid; break
11280else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011281 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011282sed 's/^/| /' conftest.$ac_ext >&5
11283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011284 ac_hi=`expr '(' $ac_mid ')' - 1`
11285 if test $ac_mid -le $ac_hi; then
11286 ac_lo= ac_hi=
11287 break
11288 fi
11289 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011291
11292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011293 done
11294else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011295 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011296sed 's/^/| /' conftest.$ac_ext >&5
11297
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011298 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011299fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011300
11301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011303
11304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011305# Binary search between lo and hi bounds.
11306while test "x$ac_lo" != "x$ac_hi"; do
11307 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11308 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011309/* confdefs.h. */
11310_ACEOF
11311cat confdefs.h >>conftest.$ac_ext
11312cat >>conftest.$ac_ext <<_ACEOF
11313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011314$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011315int
11316main ()
11317{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011318static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011319test_array [0] = 0
11320
11321 ;
11322 return 0;
11323}
11324_ACEOF
11325rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011326if { (ac_try="$ac_compile"
11327case "(($ac_try" in
11328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11329 *) ac_try_echo=$ac_try;;
11330esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011331eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11332$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011335 grep -v '^ *+' conftest.er1 >conftest.err
11336 rm -f conftest.er1
11337 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011338 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011339 (exit $ac_status); } && {
11340 test -z "$ac_c_werror_flag" ||
11341 test ! -s conftest.err
11342 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011343 ac_hi=$ac_mid
11344else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011345 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011346sed 's/^/| /' conftest.$ac_ext >&5
11347
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011348 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011349fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011350
11351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011352done
11353case $ac_lo in
11354?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011355'') if test "$ac_cv_type_long_long" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000011356 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11358{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011359See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011360$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011361See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000011362 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011363 else
11364 ac_cv_sizeof_long_long=0
11365 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011366esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011367else
Martin v. Löwis11437992002-04-12 09:54:03 +000011368 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011369/* confdefs.h. */
11370_ACEOF
11371cat confdefs.h >>conftest.$ac_ext
11372cat >>conftest.$ac_ext <<_ACEOF
11373/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011374$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +000011375static long int longval () { return (long int) (sizeof (long long)); }
11376static unsigned long int ulongval () { return (long int) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011377#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011378#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011379int
11380main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011381{
Martin v. Löwis11437992002-04-12 09:54:03 +000011382
11383 FILE *f = fopen ("conftest.val", "w");
11384 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011385 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000011386 if (((long int) (sizeof (long long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011387 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011388 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000011389 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011390 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000011391 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011392 }
11393 else
11394 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011395 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000011396 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011397 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000011398 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011399 }
Antoine Pitroub52ec782009-01-25 16:34:23 +000011400 /* Do not output a trailing newline, as this causes \r\n confusion
11401 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011402 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011403
11404 ;
11405 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011406}
Martin v. Löwis11437992002-04-12 09:54:03 +000011407_ACEOF
11408rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011409if { (ac_try="$ac_link"
11410case "(($ac_try" in
11411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11412 *) ac_try_echo=$ac_try;;
11413esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011414eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11415$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011416 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011417 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000011418 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011420 { (case "(($ac_try" in
11421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11422 *) ac_try_echo=$ac_try;;
11423esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011424eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11425$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011426 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011427 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000011428 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011429 (exit $ac_status); }; }; then
11430 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011431else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011432 $as_echo "$as_me: program exited with status $ac_status" >&5
11433$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011434sed 's/^/| /' conftest.$ac_ext >&5
11435
Martin v. Löwis11437992002-04-12 09:54:03 +000011436( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011437if test "$ac_cv_type_long_long" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000011438 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11439$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11440{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011441See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011442$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011443See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000011444 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011445 else
11446 ac_cv_sizeof_long_long=0
11447 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011448fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000011449rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011450rm -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 +000011451fi
11452rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011453fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000011454{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11455$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011456
11457
11458
Martin v. Löwis11437992002-04-12 09:54:03 +000011459cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011460#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011461_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011462
Michael W. Hudson54241132001-12-07 15:38:26 +000011463
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011464fi
11465
Antoine Pitroub52ec782009-01-25 16:34:23 +000011466{ $as_echo "$as_me:$LINENO: checking for long double support" >&5
11467$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011468have_long_double=no
11469cat >conftest.$ac_ext <<_ACEOF
11470/* confdefs.h. */
11471_ACEOF
11472cat confdefs.h >>conftest.$ac_ext
11473cat >>conftest.$ac_ext <<_ACEOF
11474/* end confdefs.h. */
11475
11476int
11477main ()
11478{
11479long double x; x = (long double)0;
11480 ;
11481 return 0;
11482}
11483_ACEOF
11484rm -f conftest.$ac_objext
11485if { (ac_try="$ac_compile"
11486case "(($ac_try" in
11487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11488 *) ac_try_echo=$ac_try;;
11489esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011490eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11491$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011492 (eval "$ac_compile") 2>conftest.er1
11493 ac_status=$?
11494 grep -v '^ *+' conftest.er1 >conftest.err
11495 rm -f conftest.er1
11496 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011497 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011498 (exit $ac_status); } && {
11499 test -z "$ac_c_werror_flag" ||
11500 test ! -s conftest.err
11501 } && test -s conftest.$ac_objext; then
11502
11503
11504cat >>confdefs.h <<\_ACEOF
11505#define HAVE_LONG_DOUBLE 1
11506_ACEOF
11507
11508 have_long_double=yes
11509
11510else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011511 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011512sed 's/^/| /' conftest.$ac_ext >&5
11513
11514
11515fi
11516
11517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000011518{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5
11519$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011520if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011521# The cast to long int works around a bug in the HP C Compiler
11522# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11523# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11524# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +000011525{ $as_echo "$as_me:$LINENO: checking size of long double" >&5
11526$as_echo_n "checking size of long double... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011527if test "${ac_cv_sizeof_long_double+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000011528 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011529else
11530 if test "$cross_compiling" = yes; then
11531 # Depending upon the size, compute the lo and hi bounds.
11532cat >conftest.$ac_ext <<_ACEOF
11533/* confdefs.h. */
11534_ACEOF
11535cat confdefs.h >>conftest.$ac_ext
11536cat >>conftest.$ac_ext <<_ACEOF
11537/* end confdefs.h. */
11538$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011539int
11540main ()
11541{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011542static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011543test_array [0] = 0
11544
11545 ;
11546 return 0;
11547}
11548_ACEOF
11549rm -f conftest.$ac_objext
11550if { (ac_try="$ac_compile"
11551case "(($ac_try" in
11552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11553 *) ac_try_echo=$ac_try;;
11554esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011555eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11556$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011557 (eval "$ac_compile") 2>conftest.er1
11558 ac_status=$?
11559 grep -v '^ *+' conftest.er1 >conftest.err
11560 rm -f conftest.er1
11561 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011562 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011563 (exit $ac_status); } && {
11564 test -z "$ac_c_werror_flag" ||
11565 test ! -s conftest.err
11566 } && test -s conftest.$ac_objext; then
11567 ac_lo=0 ac_mid=0
11568 while :; do
11569 cat >conftest.$ac_ext <<_ACEOF
11570/* confdefs.h. */
11571_ACEOF
11572cat confdefs.h >>conftest.$ac_ext
11573cat >>conftest.$ac_ext <<_ACEOF
11574/* end confdefs.h. */
11575$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011576int
11577main ()
11578{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011579static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011580test_array [0] = 0
11581
11582 ;
11583 return 0;
11584}
11585_ACEOF
11586rm -f conftest.$ac_objext
11587if { (ac_try="$ac_compile"
11588case "(($ac_try" in
11589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11590 *) ac_try_echo=$ac_try;;
11591esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011592eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11593$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011594 (eval "$ac_compile") 2>conftest.er1
11595 ac_status=$?
11596 grep -v '^ *+' conftest.er1 >conftest.err
11597 rm -f conftest.er1
11598 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011599 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011600 (exit $ac_status); } && {
11601 test -z "$ac_c_werror_flag" ||
11602 test ! -s conftest.err
11603 } && test -s conftest.$ac_objext; then
11604 ac_hi=$ac_mid; break
11605else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011606 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011607sed 's/^/| /' conftest.$ac_ext >&5
11608
11609 ac_lo=`expr $ac_mid + 1`
11610 if test $ac_lo -le $ac_mid; then
11611 ac_lo= ac_hi=
11612 break
11613 fi
11614 ac_mid=`expr 2 '*' $ac_mid + 1`
11615fi
11616
11617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11618 done
11619else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011620 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011621sed 's/^/| /' conftest.$ac_ext >&5
11622
11623 cat >conftest.$ac_ext <<_ACEOF
11624/* confdefs.h. */
11625_ACEOF
11626cat confdefs.h >>conftest.$ac_ext
11627cat >>conftest.$ac_ext <<_ACEOF
11628/* end confdefs.h. */
11629$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011630int
11631main ()
11632{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011633static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011634test_array [0] = 0
11635
11636 ;
11637 return 0;
11638}
11639_ACEOF
11640rm -f conftest.$ac_objext
11641if { (ac_try="$ac_compile"
11642case "(($ac_try" in
11643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11644 *) ac_try_echo=$ac_try;;
11645esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011646eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11647$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011648 (eval "$ac_compile") 2>conftest.er1
11649 ac_status=$?
11650 grep -v '^ *+' conftest.er1 >conftest.err
11651 rm -f conftest.er1
11652 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011653 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011654 (exit $ac_status); } && {
11655 test -z "$ac_c_werror_flag" ||
11656 test ! -s conftest.err
11657 } && test -s conftest.$ac_objext; then
11658 ac_hi=-1 ac_mid=-1
11659 while :; do
11660 cat >conftest.$ac_ext <<_ACEOF
11661/* confdefs.h. */
11662_ACEOF
11663cat confdefs.h >>conftest.$ac_ext
11664cat >>conftest.$ac_ext <<_ACEOF
11665/* end confdefs.h. */
11666$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011667int
11668main ()
11669{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011670static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011671test_array [0] = 0
11672
11673 ;
11674 return 0;
11675}
11676_ACEOF
11677rm -f conftest.$ac_objext
11678if { (ac_try="$ac_compile"
11679case "(($ac_try" in
11680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11681 *) ac_try_echo=$ac_try;;
11682esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011683eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11684$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011685 (eval "$ac_compile") 2>conftest.er1
11686 ac_status=$?
11687 grep -v '^ *+' conftest.er1 >conftest.err
11688 rm -f conftest.er1
11689 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011690 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011691 (exit $ac_status); } && {
11692 test -z "$ac_c_werror_flag" ||
11693 test ! -s conftest.err
11694 } && test -s conftest.$ac_objext; then
11695 ac_lo=$ac_mid; break
11696else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011697 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011698sed 's/^/| /' conftest.$ac_ext >&5
11699
11700 ac_hi=`expr '(' $ac_mid ')' - 1`
11701 if test $ac_mid -le $ac_hi; then
11702 ac_lo= ac_hi=
11703 break
11704 fi
11705 ac_mid=`expr 2 '*' $ac_mid`
11706fi
11707
11708rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11709 done
11710else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011711 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011712sed 's/^/| /' conftest.$ac_ext >&5
11713
11714 ac_lo= ac_hi=
11715fi
11716
11717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11718fi
11719
11720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11721# Binary search between lo and hi bounds.
11722while test "x$ac_lo" != "x$ac_hi"; do
11723 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11724 cat >conftest.$ac_ext <<_ACEOF
11725/* confdefs.h. */
11726_ACEOF
11727cat confdefs.h >>conftest.$ac_ext
11728cat >>conftest.$ac_ext <<_ACEOF
11729/* end confdefs.h. */
11730$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011731int
11732main ()
11733{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011734static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011735test_array [0] = 0
11736
11737 ;
11738 return 0;
11739}
11740_ACEOF
11741rm -f conftest.$ac_objext
11742if { (ac_try="$ac_compile"
11743case "(($ac_try" in
11744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11745 *) ac_try_echo=$ac_try;;
11746esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011747eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11748$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011749 (eval "$ac_compile") 2>conftest.er1
11750 ac_status=$?
11751 grep -v '^ *+' conftest.er1 >conftest.err
11752 rm -f conftest.er1
11753 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011754 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011755 (exit $ac_status); } && {
11756 test -z "$ac_c_werror_flag" ||
11757 test ! -s conftest.err
11758 } && test -s conftest.$ac_objext; then
11759 ac_hi=$ac_mid
11760else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011761 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011762sed 's/^/| /' conftest.$ac_ext >&5
11763
11764 ac_lo=`expr '(' $ac_mid ')' + 1`
11765fi
11766
11767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11768done
11769case $ac_lo in
11770?*) ac_cv_sizeof_long_double=$ac_lo;;
11771'') if test "$ac_cv_type_long_double" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000011772 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11773$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11774{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011775See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011776$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011777See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000011778 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011779 else
11780 ac_cv_sizeof_long_double=0
11781 fi ;;
11782esac
11783else
11784 cat >conftest.$ac_ext <<_ACEOF
11785/* confdefs.h. */
11786_ACEOF
11787cat confdefs.h >>conftest.$ac_ext
11788cat >>conftest.$ac_ext <<_ACEOF
11789/* end confdefs.h. */
11790$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +000011791static long int longval () { return (long int) (sizeof (long double)); }
11792static unsigned long int ulongval () { return (long int) (sizeof (long double)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011793#include <stdio.h>
11794#include <stdlib.h>
11795int
11796main ()
11797{
11798
11799 FILE *f = fopen ("conftest.val", "w");
11800 if (! f)
11801 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000011802 if (((long int) (sizeof (long double))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011803 {
11804 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000011805 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011806 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000011807 fprintf (f, "%ld", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011808 }
11809 else
11810 {
11811 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000011812 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011813 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000011814 fprintf (f, "%lu", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011815 }
Antoine Pitroub52ec782009-01-25 16:34:23 +000011816 /* Do not output a trailing newline, as this causes \r\n confusion
11817 on some platforms. */
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011818 return ferror (f) || fclose (f) != 0;
11819
11820 ;
11821 return 0;
11822}
11823_ACEOF
11824rm -f conftest$ac_exeext
11825if { (ac_try="$ac_link"
11826case "(($ac_try" in
11827 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11828 *) ac_try_echo=$ac_try;;
11829esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011830eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11831$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011832 (eval "$ac_link") 2>&5
11833 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000011834 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011835 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11836 { (case "(($ac_try" in
11837 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11838 *) ac_try_echo=$ac_try;;
11839esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011840eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11841$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011842 (eval "$ac_try") 2>&5
11843 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000011844 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011845 (exit $ac_status); }; }; then
11846 ac_cv_sizeof_long_double=`cat conftest.val`
11847else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011848 $as_echo "$as_me: program exited with status $ac_status" >&5
11849$as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011850sed 's/^/| /' conftest.$ac_ext >&5
11851
11852( exit $ac_status )
11853if test "$ac_cv_type_long_double" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000011854 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11855$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11856{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011857See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011858$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011859See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000011860 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011861 else
11862 ac_cv_sizeof_long_double=0
11863 fi
11864fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000011865rm -rf conftest.dSYM
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11867fi
11868rm -f conftest.val
11869fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000011870{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
11871$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011872
11873
11874
11875cat >>confdefs.h <<_ACEOF
11876#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
11877_ACEOF
11878
11879
11880fi
11881
11882
Antoine Pitroub52ec782009-01-25 16:34:23 +000011883{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5
11884$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000011885have_c99_bool=no
11886cat >conftest.$ac_ext <<_ACEOF
11887/* confdefs.h. */
11888_ACEOF
11889cat confdefs.h >>conftest.$ac_ext
11890cat >>conftest.$ac_ext <<_ACEOF
11891/* end confdefs.h. */
11892
11893int
11894main ()
11895{
11896_Bool x; x = (_Bool)0;
11897 ;
11898 return 0;
11899}
11900_ACEOF
11901rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011902if { (ac_try="$ac_compile"
11903case "(($ac_try" in
11904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11905 *) ac_try_echo=$ac_try;;
11906esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011907eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11908$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011909 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000011910 ac_status=$?
11911 grep -v '^ *+' conftest.er1 >conftest.err
11912 rm -f conftest.er1
11913 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011914 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011915 (exit $ac_status); } && {
11916 test -z "$ac_c_werror_flag" ||
11917 test ! -s conftest.err
11918 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000011919
11920
11921cat >>confdefs.h <<\_ACEOF
11922#define HAVE_C99_BOOL 1
11923_ACEOF
11924
11925 have_c99_bool=yes
11926
11927else
Antoine Pitroub52ec782009-01-25 16:34:23 +000011928 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000011929sed 's/^/| /' conftest.$ac_ext >&5
11930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011931
Thomas Woutersb2137042007-02-01 18:02:27 +000011932fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011933
11934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000011935{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5
11936$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000011937if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011938# The cast to long int works around a bug in the HP C Compiler
11939# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11940# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11941# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +000011942{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5
11943$as_echo_n "checking size of _Bool... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000011944if test "${ac_cv_sizeof__Bool+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000011945 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000011946else
11947 if test "$cross_compiling" = yes; then
11948 # Depending upon the size, compute the lo and hi bounds.
11949cat >conftest.$ac_ext <<_ACEOF
11950/* confdefs.h. */
11951_ACEOF
11952cat confdefs.h >>conftest.$ac_ext
11953cat >>conftest.$ac_ext <<_ACEOF
11954/* end confdefs.h. */
11955$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000011956int
11957main ()
11958{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011959static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000011960test_array [0] = 0
11961
11962 ;
11963 return 0;
11964}
11965_ACEOF
11966rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011967if { (ac_try="$ac_compile"
11968case "(($ac_try" in
11969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11970 *) ac_try_echo=$ac_try;;
11971esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000011972eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11973$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011974 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000011975 ac_status=$?
11976 grep -v '^ *+' conftest.er1 >conftest.err
11977 rm -f conftest.er1
11978 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000011979 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011980 (exit $ac_status); } && {
11981 test -z "$ac_c_werror_flag" ||
11982 test ! -s conftest.err
11983 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000011984 ac_lo=0 ac_mid=0
11985 while :; do
11986 cat >conftest.$ac_ext <<_ACEOF
11987/* confdefs.h. */
11988_ACEOF
11989cat confdefs.h >>conftest.$ac_ext
11990cat >>conftest.$ac_ext <<_ACEOF
11991/* end confdefs.h. */
11992$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000011993int
11994main ()
11995{
Antoine Pitroub52ec782009-01-25 16:34:23 +000011996static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000011997test_array [0] = 0
11998
11999 ;
12000 return 0;
12001}
12002_ACEOF
12003rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012004if { (ac_try="$ac_compile"
12005case "(($ac_try" in
12006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12007 *) ac_try_echo=$ac_try;;
12008esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012009eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12010$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012011 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012012 ac_status=$?
12013 grep -v '^ *+' conftest.er1 >conftest.err
12014 rm -f conftest.er1
12015 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012016 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012017 (exit $ac_status); } && {
12018 test -z "$ac_c_werror_flag" ||
12019 test ! -s conftest.err
12020 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012021 ac_hi=$ac_mid; break
12022else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012023 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012024sed 's/^/| /' conftest.$ac_ext >&5
12025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012026 ac_lo=`expr $ac_mid + 1`
12027 if test $ac_lo -le $ac_mid; then
12028 ac_lo= ac_hi=
12029 break
12030 fi
12031 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012033
12034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012035 done
12036else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012037 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012038sed 's/^/| /' conftest.$ac_ext >&5
12039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012040 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012041/* confdefs.h. */
12042_ACEOF
12043cat confdefs.h >>conftest.$ac_ext
12044cat >>conftest.$ac_ext <<_ACEOF
12045/* end confdefs.h. */
12046$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012047int
12048main ()
12049{
Antoine Pitroub52ec782009-01-25 16:34:23 +000012050static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012051test_array [0] = 0
12052
12053 ;
12054 return 0;
12055}
12056_ACEOF
12057rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012058if { (ac_try="$ac_compile"
12059case "(($ac_try" in
12060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12061 *) ac_try_echo=$ac_try;;
12062esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012063eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12064$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012065 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012066 ac_status=$?
12067 grep -v '^ *+' conftest.er1 >conftest.err
12068 rm -f conftest.er1
12069 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012070 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012071 (exit $ac_status); } && {
12072 test -z "$ac_c_werror_flag" ||
12073 test ! -s conftest.err
12074 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012075 ac_hi=-1 ac_mid=-1
12076 while :; do
12077 cat >conftest.$ac_ext <<_ACEOF
12078/* confdefs.h. */
12079_ACEOF
12080cat confdefs.h >>conftest.$ac_ext
12081cat >>conftest.$ac_ext <<_ACEOF
12082/* end confdefs.h. */
12083$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012084int
12085main ()
12086{
Antoine Pitroub52ec782009-01-25 16:34:23 +000012087static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012088test_array [0] = 0
12089
12090 ;
12091 return 0;
12092}
12093_ACEOF
12094rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012095if { (ac_try="$ac_compile"
12096case "(($ac_try" in
12097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12098 *) ac_try_echo=$ac_try;;
12099esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012100eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12101$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012102 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012103 ac_status=$?
12104 grep -v '^ *+' conftest.er1 >conftest.err
12105 rm -f conftest.er1
12106 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012107 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012108 (exit $ac_status); } && {
12109 test -z "$ac_c_werror_flag" ||
12110 test ! -s conftest.err
12111 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012112 ac_lo=$ac_mid; break
12113else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012114 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012115sed 's/^/| /' conftest.$ac_ext >&5
12116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012117 ac_hi=`expr '(' $ac_mid ')' - 1`
12118 if test $ac_mid -le $ac_hi; then
12119 ac_lo= ac_hi=
12120 break
12121 fi
12122 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012123fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012124
12125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012126 done
12127else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012128 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012129sed 's/^/| /' conftest.$ac_ext >&5
12130
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012131 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012132fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012133
12134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012135fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012136
12137rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012138# Binary search between lo and hi bounds.
12139while test "x$ac_lo" != "x$ac_hi"; do
12140 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12141 cat >conftest.$ac_ext <<_ACEOF
12142/* confdefs.h. */
12143_ACEOF
12144cat confdefs.h >>conftest.$ac_ext
12145cat >>conftest.$ac_ext <<_ACEOF
12146/* end confdefs.h. */
12147$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012148int
12149main ()
12150{
Antoine Pitroub52ec782009-01-25 16:34:23 +000012151static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012152test_array [0] = 0
12153
12154 ;
12155 return 0;
12156}
12157_ACEOF
12158rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012159if { (ac_try="$ac_compile"
12160case "(($ac_try" in
12161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12162 *) ac_try_echo=$ac_try;;
12163esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012164eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12165$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012166 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012167 ac_status=$?
12168 grep -v '^ *+' conftest.er1 >conftest.err
12169 rm -f conftest.er1
12170 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012171 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012172 (exit $ac_status); } && {
12173 test -z "$ac_c_werror_flag" ||
12174 test ! -s conftest.err
12175 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012176 ac_hi=$ac_mid
12177else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012178 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012179sed 's/^/| /' conftest.$ac_ext >&5
12180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012181 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012182fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012183
12184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012185done
12186case $ac_lo in
12187?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012188'') if test "$ac_cv_type__Bool" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000012189 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12191{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012192See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012193$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012194See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000012195 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012196 else
12197 ac_cv_sizeof__Bool=0
12198 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012199esac
12200else
12201 cat >conftest.$ac_ext <<_ACEOF
12202/* confdefs.h. */
12203_ACEOF
12204cat confdefs.h >>conftest.$ac_ext
12205cat >>conftest.$ac_ext <<_ACEOF
12206/* end confdefs.h. */
12207$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +000012208static long int longval () { return (long int) (sizeof (_Bool)); }
12209static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012210#include <stdio.h>
12211#include <stdlib.h>
12212int
12213main ()
12214{
12215
12216 FILE *f = fopen ("conftest.val", "w");
12217 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012218 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000012219 if (((long int) (sizeof (_Bool))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012220 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012221 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000012222 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012223 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000012224 fprintf (f, "%ld", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012225 }
12226 else
12227 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012228 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000012229 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012230 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000012231 fprintf (f, "%lu", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012232 }
Antoine Pitroub52ec782009-01-25 16:34:23 +000012233 /* Do not output a trailing newline, as this causes \r\n confusion
12234 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012235 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012236
12237 ;
12238 return 0;
12239}
12240_ACEOF
12241rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012242if { (ac_try="$ac_link"
12243case "(($ac_try" in
12244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12245 *) ac_try_echo=$ac_try;;
12246esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012247eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12248$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012249 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012250 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000012251 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012252 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012253 { (case "(($ac_try" in
12254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12255 *) ac_try_echo=$ac_try;;
12256esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012257eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12258$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012259 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012260 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000012261 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012262 (exit $ac_status); }; }; then
12263 ac_cv_sizeof__Bool=`cat conftest.val`
12264else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012265 $as_echo "$as_me: program exited with status $ac_status" >&5
12266$as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012267sed 's/^/| /' conftest.$ac_ext >&5
12268
12269( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012270if test "$ac_cv_type__Bool" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000012271 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12272$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12273{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012274See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012275$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012276See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000012277 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012278 else
12279 ac_cv_sizeof__Bool=0
12280 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012281fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000012282rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012283rm -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 +000012284fi
12285rm -f conftest.val
12286fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000012287{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12288$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012289
12290
12291
Thomas Woutersb2137042007-02-01 18:02:27 +000012292cat >>confdefs.h <<_ACEOF
12293#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12294_ACEOF
12295
12296
12297fi
12298
Antoine Pitroub52ec782009-01-25 16:34:23 +000012299{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
12300$as_echo_n "checking for uintptr_t... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012301if test "${ac_cv_type_uintptr_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000012302 $as_echo_n "(cached) " >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012303else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012304 ac_cv_type_uintptr_t=no
12305cat >conftest.$ac_ext <<_ACEOF
12306/* confdefs.h. */
12307_ACEOF
12308cat confdefs.h >>conftest.$ac_ext
12309cat >>conftest.$ac_ext <<_ACEOF
12310/* end confdefs.h. */
12311#ifdef HAVE_STDINT_H
12312 #include <stdint.h>
12313 #endif
12314
12315int
12316main ()
12317{
12318if (sizeof (uintptr_t))
12319 return 0;
12320 ;
12321 return 0;
12322}
12323_ACEOF
12324rm -f conftest.$ac_objext
12325if { (ac_try="$ac_compile"
12326case "(($ac_try" in
12327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12328 *) ac_try_echo=$ac_try;;
12329esac
12330eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12331$as_echo "$ac_try_echo") >&5
12332 (eval "$ac_compile") 2>conftest.er1
12333 ac_status=$?
12334 grep -v '^ *+' conftest.er1 >conftest.err
12335 rm -f conftest.er1
12336 cat conftest.err >&5
12337 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12338 (exit $ac_status); } && {
12339 test -z "$ac_c_werror_flag" ||
12340 test ! -s conftest.err
12341 } && test -s conftest.$ac_objext; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012342 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012343/* confdefs.h. */
12344_ACEOF
12345cat confdefs.h >>conftest.$ac_ext
12346cat >>conftest.$ac_ext <<_ACEOF
12347/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012348#ifdef HAVE_STDINT_H
12349 #include <stdint.h>
12350 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012351
Martin v. Löwis11437992002-04-12 09:54:03 +000012352int
12353main ()
12354{
Antoine Pitroub52ec782009-01-25 16:34:23 +000012355if (sizeof ((uintptr_t)))
12356 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012357 ;
12358 return 0;
12359}
12360_ACEOF
12361rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012362if { (ac_try="$ac_compile"
12363case "(($ac_try" in
12364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12365 *) ac_try_echo=$ac_try;;
12366esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012367eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12368$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012370 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012371 grep -v '^ *+' conftest.er1 >conftest.err
12372 rm -f conftest.er1
12373 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012374 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012375 (exit $ac_status); } && {
12376 test -z "$ac_c_werror_flag" ||
12377 test ! -s conftest.err
12378 } && test -s conftest.$ac_objext; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000012379 :
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012380else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012381 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012382sed 's/^/| /' conftest.$ac_ext >&5
12383
Antoine Pitroub52ec782009-01-25 16:34:23 +000012384 ac_cv_type_uintptr_t=yes
12385fi
12386
12387rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12388else
12389 $as_echo "$as_me: failed program was:" >&5
12390sed 's/^/| /' conftest.$ac_ext >&5
12391
12392
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012394
12395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012396fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000012397{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12398$as_echo "$ac_cv_type_uintptr_t" >&6; }
12399if test "x$ac_cv_type_uintptr_t" = x""yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012400
12401cat >>confdefs.h <<_ACEOF
12402#define HAVE_UINTPTR_T 1
12403_ACEOF
12404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012405# The cast to long int works around a bug in the HP C Compiler
12406# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12407# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12408# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +000012409{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12410$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012411if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000012412 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012413else
Martin v. Löwis11437992002-04-12 09:54:03 +000012414 if test "$cross_compiling" = yes; then
12415 # Depending upon the size, compute the lo and hi bounds.
12416cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012417/* confdefs.h. */
12418_ACEOF
12419cat confdefs.h >>conftest.$ac_ext
12420cat >>conftest.$ac_ext <<_ACEOF
12421/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012422$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012423int
12424main ()
12425{
Antoine Pitroub52ec782009-01-25 16:34:23 +000012426static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012427test_array [0] = 0
12428
12429 ;
12430 return 0;
12431}
12432_ACEOF
12433rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012434if { (ac_try="$ac_compile"
12435case "(($ac_try" in
12436 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12437 *) ac_try_echo=$ac_try;;
12438esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012439eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12440$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012441 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012442 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012443 grep -v '^ *+' conftest.er1 >conftest.err
12444 rm -f conftest.er1
12445 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012446 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447 (exit $ac_status); } && {
12448 test -z "$ac_c_werror_flag" ||
12449 test ! -s conftest.err
12450 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012451 ac_lo=0 ac_mid=0
12452 while :; do
12453 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012454/* confdefs.h. */
12455_ACEOF
12456cat confdefs.h >>conftest.$ac_ext
12457cat >>conftest.$ac_ext <<_ACEOF
12458/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012459$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012460int
12461main ()
12462{
Antoine Pitroub52ec782009-01-25 16:34:23 +000012463static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012464test_array [0] = 0
12465
12466 ;
12467 return 0;
12468}
12469_ACEOF
12470rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471if { (ac_try="$ac_compile"
12472case "(($ac_try" in
12473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12474 *) ac_try_echo=$ac_try;;
12475esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012476eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12477$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012479 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012480 grep -v '^ *+' conftest.er1 >conftest.err
12481 rm -f conftest.er1
12482 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012483 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012484 (exit $ac_status); } && {
12485 test -z "$ac_c_werror_flag" ||
12486 test ! -s conftest.err
12487 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012488 ac_hi=$ac_mid; break
12489else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012490 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012491sed 's/^/| /' conftest.$ac_ext >&5
12492
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012493 ac_lo=`expr $ac_mid + 1`
12494 if test $ac_lo -le $ac_mid; then
12495 ac_lo= ac_hi=
12496 break
12497 fi
12498 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012500
12501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012502 done
12503else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012504 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012505sed 's/^/| /' conftest.$ac_ext >&5
12506
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012508/* confdefs.h. */
12509_ACEOF
12510cat confdefs.h >>conftest.$ac_ext
12511cat >>conftest.$ac_ext <<_ACEOF
12512/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012513$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012514int
12515main ()
12516{
Antoine Pitroub52ec782009-01-25 16:34:23 +000012517static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012518test_array [0] = 0
12519
12520 ;
12521 return 0;
12522}
12523_ACEOF
12524rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012525if { (ac_try="$ac_compile"
12526case "(($ac_try" in
12527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12528 *) ac_try_echo=$ac_try;;
12529esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012530eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12531$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012532 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012533 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012534 grep -v '^ *+' conftest.er1 >conftest.err
12535 rm -f conftest.er1
12536 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012537 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538 (exit $ac_status); } && {
12539 test -z "$ac_c_werror_flag" ||
12540 test ! -s conftest.err
12541 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012542 ac_hi=-1 ac_mid=-1
12543 while :; do
12544 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012545/* confdefs.h. */
12546_ACEOF
12547cat confdefs.h >>conftest.$ac_ext
12548cat >>conftest.$ac_ext <<_ACEOF
12549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012550$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012551int
12552main ()
12553{
Antoine Pitroub52ec782009-01-25 16:34:23 +000012554static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012555test_array [0] = 0
12556
12557 ;
12558 return 0;
12559}
12560_ACEOF
12561rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562if { (ac_try="$ac_compile"
12563case "(($ac_try" in
12564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12565 *) ac_try_echo=$ac_try;;
12566esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012567eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12568$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012569 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012570 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012571 grep -v '^ *+' conftest.er1 >conftest.err
12572 rm -f conftest.er1
12573 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012574 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012575 (exit $ac_status); } && {
12576 test -z "$ac_c_werror_flag" ||
12577 test ! -s conftest.err
12578 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012579 ac_lo=$ac_mid; break
12580else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012581 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012582sed 's/^/| /' conftest.$ac_ext >&5
12583
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012584 ac_hi=`expr '(' $ac_mid ')' - 1`
12585 if test $ac_mid -le $ac_hi; then
12586 ac_lo= ac_hi=
12587 break
12588 fi
12589 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012591
12592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012593 done
12594else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012595 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012596sed 's/^/| /' conftest.$ac_ext >&5
12597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012598 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012599fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012600
12601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012603
12604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012605# Binary search between lo and hi bounds.
12606while test "x$ac_lo" != "x$ac_hi"; do
12607 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12608 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012609/* confdefs.h. */
12610_ACEOF
12611cat confdefs.h >>conftest.$ac_ext
12612cat >>conftest.$ac_ext <<_ACEOF
12613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012614$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012615int
12616main ()
12617{
Antoine Pitroub52ec782009-01-25 16:34:23 +000012618static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012619test_array [0] = 0
12620
12621 ;
12622 return 0;
12623}
12624_ACEOF
12625rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012626if { (ac_try="$ac_compile"
12627case "(($ac_try" in
12628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12629 *) ac_try_echo=$ac_try;;
12630esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012631eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12632$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012634 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012635 grep -v '^ *+' conftest.er1 >conftest.err
12636 rm -f conftest.er1
12637 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012638 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012639 (exit $ac_status); } && {
12640 test -z "$ac_c_werror_flag" ||
12641 test ! -s conftest.err
12642 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012643 ac_hi=$ac_mid
12644else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012645 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012646sed 's/^/| /' conftest.$ac_ext >&5
12647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012649fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012650
12651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012652done
12653case $ac_lo in
12654?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012655'') if test "$ac_cv_type_uintptr_t" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000012656 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12657$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12658{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012659See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012660$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012661See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000012662 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012663 else
12664 ac_cv_sizeof_uintptr_t=0
12665 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012666esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012667else
Martin v. Löwis11437992002-04-12 09:54:03 +000012668 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012669/* confdefs.h. */
12670_ACEOF
12671cat confdefs.h >>conftest.$ac_ext
12672cat >>conftest.$ac_ext <<_ACEOF
12673/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012674$ac_includes_default
Antoine Pitroub52ec782009-01-25 16:34:23 +000012675static long int longval () { return (long int) (sizeof (uintptr_t)); }
12676static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012677#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012678#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012679int
12680main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012681{
Martin v. Löwis11437992002-04-12 09:54:03 +000012682
12683 FILE *f = fopen ("conftest.val", "w");
12684 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000012686 if (((long int) (sizeof (uintptr_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012687 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012688 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000012689 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012690 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000012691 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012692 }
12693 else
12694 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000012696 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012697 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000012698 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012699 }
Antoine Pitroub52ec782009-01-25 16:34:23 +000012700 /* Do not output a trailing newline, as this causes \r\n confusion
12701 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012702 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012703
12704 ;
12705 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012706}
Martin v. Löwis11437992002-04-12 09:54:03 +000012707_ACEOF
12708rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012709if { (ac_try="$ac_link"
12710case "(($ac_try" in
12711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12712 *) ac_try_echo=$ac_try;;
12713esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012714eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12715$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012716 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012717 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000012718 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012719 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012720 { (case "(($ac_try" in
12721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12722 *) ac_try_echo=$ac_try;;
12723esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012724eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12725$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012726 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012727 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000012728 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012729 (exit $ac_status); }; }; then
12730 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012731else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012732 $as_echo "$as_me: program exited with status $ac_status" >&5
12733$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012734sed 's/^/| /' conftest.$ac_ext >&5
12735
Martin v. Löwis11437992002-04-12 09:54:03 +000012736( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012737if test "$ac_cv_type_uintptr_t" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000012738 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12740{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012741See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012742$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012743See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000012744 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012745 else
12746 ac_cv_sizeof_uintptr_t=0
12747 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012748fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000012749rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012750rm -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 +000012751fi
12752rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012753fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000012754{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12755$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012756
12757
12758
Martin v. Löwis11437992002-04-12 09:54:03 +000012759cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012760#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012761_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012762
Michael W. Hudson54241132001-12-07 15:38:26 +000012763
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012764fi
12765
Thomas Wouters89f507f2006-12-13 04:49:30 +000012766
12767
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012768# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Antoine Pitroub52ec782009-01-25 16:34:23 +000012769{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5
12770$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012771if test "${ac_cv_sizeof_off_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000012772 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012773else
12774 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012775 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012776else
Martin v. Löwis11437992002-04-12 09:54:03 +000012777 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012778/* confdefs.h. */
12779_ACEOF
12780cat confdefs.h >>conftest.$ac_ext
12781cat >>conftest.$ac_ext <<_ACEOF
12782/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012783#include <stdio.h>
12784#include <sys/types.h>
12785main()
12786{
12787 FILE *f=fopen("conftestval", "w");
12788 if (!f) exit(1);
12789 fprintf(f, "%d\n", sizeof(off_t));
12790 exit(0);
12791}
Martin v. Löwis11437992002-04-12 09:54:03 +000012792_ACEOF
12793rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012794if { (ac_try="$ac_link"
12795case "(($ac_try" in
12796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12797 *) ac_try_echo=$ac_try;;
12798esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012799eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12800$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000012803 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012804 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012805 { (case "(($ac_try" in
12806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12807 *) ac_try_echo=$ac_try;;
12808esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012809eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12810$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012811 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012812 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000012813 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012814 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012815 ac_cv_sizeof_off_t=`cat conftestval`
12816else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012817 $as_echo "$as_me: program exited with status $ac_status" >&5
12818$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012819sed 's/^/| /' conftest.$ac_ext >&5
12820
Martin v. Löwis11437992002-04-12 09:54:03 +000012821( exit $ac_status )
12822ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012823fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000012824rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012825rm -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 +000012826fi
12827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012828
12829
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012830fi
12831
Antoine Pitroub52ec782009-01-25 16:34:23 +000012832{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
12833$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012834
12835cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012836#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012837_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012838
Michael W. Hudson54241132001-12-07 15:38:26 +000012839
Antoine Pitroub52ec782009-01-25 16:34:23 +000012840{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5
12841$as_echo_n "checking whether to enable large file support... " >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000012842if test "$have_long_long" = yes -a \
12843 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
12844 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012845
Martin v. Löwis11437992002-04-12 09:54:03 +000012846cat >>confdefs.h <<\_ACEOF
12847#define HAVE_LARGEFILE_SUPPORT 1
12848_ACEOF
12849
Antoine Pitroub52ec782009-01-25 16:34:23 +000012850 { $as_echo "$as_me:$LINENO: result: yes" >&5
12851$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012852else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012853 { $as_echo "$as_me:$LINENO: result: no" >&5
12854$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012855fi
12856
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012857# AC_CHECK_SIZEOF() doesn't include <time.h>.
Antoine Pitroub52ec782009-01-25 16:34:23 +000012858{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5
12859$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012860if test "${ac_cv_sizeof_time_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000012861 $as_echo_n "(cached) " >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012862else
12863 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012864 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012865else
Martin v. Löwis11437992002-04-12 09:54:03 +000012866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012867/* confdefs.h. */
12868_ACEOF
12869cat confdefs.h >>conftest.$ac_ext
12870cat >>conftest.$ac_ext <<_ACEOF
12871/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012872#include <stdio.h>
12873#include <time.h>
12874main()
12875{
12876 FILE *f=fopen("conftestval", "w");
12877 if (!f) exit(1);
12878 fprintf(f, "%d\n", sizeof(time_t));
12879 exit(0);
12880}
Martin v. Löwis11437992002-04-12 09:54:03 +000012881_ACEOF
12882rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883if { (ac_try="$ac_link"
12884case "(($ac_try" in
12885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12886 *) ac_try_echo=$ac_try;;
12887esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012888eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12889$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012890 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012891 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000012892 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012893 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012894 { (case "(($ac_try" in
12895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12896 *) ac_try_echo=$ac_try;;
12897esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012898eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12899$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012900 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012901 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000012902 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012903 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012904 ac_cv_sizeof_time_t=`cat conftestval`
12905else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012906 $as_echo "$as_me: program exited with status $ac_status" >&5
12907$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012908sed 's/^/| /' conftest.$ac_ext >&5
12909
Martin v. Löwis11437992002-04-12 09:54:03 +000012910( exit $ac_status )
12911ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012912fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000012913rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914rm -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 +000012915fi
12916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917
12918
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012919fi
12920
Antoine Pitroub52ec782009-01-25 16:34:23 +000012921{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
12922$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012923
12924cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012925#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012926_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000012927
Michael W. Hudson54241132001-12-07 15:38:26 +000012928
12929
Trent Mick635f6fb2000-08-23 21:33:05 +000012930# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012931ac_save_cc="$CC"
12932if test "$ac_cv_kpthread" = "yes"
12933then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000012934elif test "$ac_cv_kthread" = "yes"
12935then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000012936elif test "$ac_cv_pthread" = "yes"
12937then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000012938fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000012939{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5
12940$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012941have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000012942cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012943/* confdefs.h. */
12944_ACEOF
12945cat confdefs.h >>conftest.$ac_ext
12946cat >>conftest.$ac_ext <<_ACEOF
12947/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000012948#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012949int
12950main ()
12951{
Guido van Rossum12580492000-09-24 16:47:19 +000012952pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012953 ;
12954 return 0;
12955}
12956_ACEOF
12957rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012958if { (ac_try="$ac_compile"
12959case "(($ac_try" in
12960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12961 *) ac_try_echo=$ac_try;;
12962esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000012963eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12964$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012965 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012967 grep -v '^ *+' conftest.er1 >conftest.err
12968 rm -f conftest.er1
12969 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000012970 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012971 (exit $ac_status); } && {
12972 test -z "$ac_c_werror_flag" ||
12973 test ! -s conftest.err
12974 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000012975 have_pthread_t=yes
12976else
Antoine Pitroub52ec782009-01-25 16:34:23 +000012977 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012978sed 's/^/| /' conftest.$ac_ext >&5
12979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012980
Trent Mick635f6fb2000-08-23 21:33:05 +000012981fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012982
12983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000012984{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5
12985$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000012986if test "$have_pthread_t" = yes ; then
12987 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Antoine Pitroub52ec782009-01-25 16:34:23 +000012988 { $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5
12989$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012990 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000012991 $as_echo_n "(cached) " >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000012992else
12993 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012994 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000012995else
Martin v. Löwis11437992002-04-12 09:54:03 +000012996 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012997/* confdefs.h. */
12998_ACEOF
12999cat confdefs.h >>conftest.$ac_ext
13000cat >>conftest.$ac_ext <<_ACEOF
13001/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013002#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013003#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013004 main()
13005 {
13006 FILE *f=fopen("conftestval", "w");
13007 if (!f) exit(1);
13008 fprintf(f, "%d\n", sizeof(pthread_t));
13009 exit(0);
13010 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013011_ACEOF
13012rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013013if { (ac_try="$ac_link"
13014case "(($ac_try" in
13015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13016 *) ac_try_echo=$ac_try;;
13017esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013018eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13019$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013021 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000013022 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013023 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013024 { (case "(($ac_try" in
13025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13026 *) ac_try_echo=$ac_try;;
13027esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013028eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13029$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013030 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013031 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000013032 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013033 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013034 ac_cv_sizeof_pthread_t=`cat conftestval`
13035else
Antoine Pitroub52ec782009-01-25 16:34:23 +000013036 $as_echo "$as_me: program exited with status $ac_status" >&5
13037$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013038sed 's/^/| /' conftest.$ac_ext >&5
13039
Martin v. Löwis11437992002-04-12 09:54:03 +000013040( exit $ac_status )
13041ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013042fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013043rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044rm -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 +000013045fi
13046
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013047
13048
Trent Mick635f6fb2000-08-23 21:33:05 +000013049fi
13050
Antoine Pitroub52ec782009-01-25 16:34:23 +000013051 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13052$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013053
13054cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013055#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013056_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013057
13058fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013059CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013060
Michael W. Hudson54241132001-12-07 15:38:26 +000013061
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013062
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013063
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013064case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013065 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013066 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13067 ;;
13068 Darwin/*)
13069 OTHER_LIBTOOL_OPT=""
13070 ;;
13071esac
13072
13073
13074case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013075 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013076 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13077 if test "${enable_universalsdk}"; then
13078 :
13079 else
13080 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
13081 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013082 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013083 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013084 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013085 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
13086 if test ${gcc_version} '<' 4.0
13087 then
13088 LIBTOOL_CRUFT="-lcc_dynamic"
13089 else
13090 LIBTOOL_CRUFT=""
13091 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000013092 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000013093 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013094 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013095esac
13096
Antoine Pitroub52ec782009-01-25 16:34:23 +000013097{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5
13098$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013099if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013100then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013101 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013102 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013103 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013104
Martin v. Löwis11437992002-04-12 09:54:03 +000013105cat >>confdefs.h <<\_ACEOF
13106#define WITH_NEXT_FRAMEWORK 1
13107_ACEOF
13108
Antoine Pitroub52ec782009-01-25 16:34:23 +000013109 { $as_echo "$as_me:$LINENO: result: yes" >&5
13110$as_echo "yes" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013111else
Antoine Pitroub52ec782009-01-25 16:34:23 +000013112 { $as_echo "$as_me:$LINENO: result: no" >&5
13113$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013114fi
13115
Antoine Pitroub52ec782009-01-25 16:34:23 +000013116{ $as_echo "$as_me:$LINENO: checking for dyld" >&5
13117$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013118case $ac_sys_system/$ac_sys_release in
13119 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013120
Martin v. Löwis11437992002-04-12 09:54:03 +000013121cat >>confdefs.h <<\_ACEOF
13122#define WITH_DYLD 1
13123_ACEOF
13124
Antoine Pitroub52ec782009-01-25 16:34:23 +000013125 { $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5
13126$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013127 ;;
13128 *)
Antoine Pitroub52ec782009-01-25 16:34:23 +000013129 { $as_echo "$as_me:$LINENO: result: no" >&5
13130$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013131 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013132esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013133
Guido van Rossum0a516c91994-09-12 10:58:40 +000013134# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013135
Michael W. Hudson54241132001-12-07 15:38:26 +000013136
13137
13138
13139
Guido van Rossum0a516c91994-09-12 10:58:40 +000013140# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013141# -- usually .so, .sl on HP-UX, .dll on Cygwin
Antoine Pitroub52ec782009-01-25 16:34:23 +000013142{ $as_echo "$as_me:$LINENO: checking SO" >&5
13143$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013144if test -z "$SO"
13145then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013146 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013147 hp*|HP*)
13148 case `uname -m` in
13149 ia64) SO=.so;;
13150 *) SO=.sl;;
13151 esac
13152 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013153 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013154 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013155 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013156else
13157 # this might also be a termcap variable, see #610332
13158 echo
13159 echo '====================================================================='
13160 echo '+ +'
13161 echo '+ WARNING: You have set SO in your environment. +'
13162 echo '+ Do you really mean to change the extension for shared libraries? +'
13163 echo '+ Continuing in 10 seconds to let you to ponder. +'
13164 echo '+ +'
13165 echo '====================================================================='
13166 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013167fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013168{ $as_echo "$as_me:$LINENO: result: $SO" >&5
13169$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013170
Georg Brandlb1441c72009-01-03 22:33:39 +000013171
Thomas Wouters477c8d52006-05-27 19:21:47 +000013172cat >>confdefs.h <<_ACEOF
13173#define SHLIB_EXT "$SO"
13174_ACEOF
13175
Guido van Rossum0a516c91994-09-12 10:58:40 +000013176# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013177# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013178# (Shared libraries in this instance are shared modules to be loaded into
13179# Python, as opposed to building Python itself as a shared library.)
Antoine Pitroub52ec782009-01-25 16:34:23 +000013180{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5
13181$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013182if test -z "$LDSHARED"
13183then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013184 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013185 AIX*)
13186 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013187 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013188 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013189 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013190 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013191 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013192 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013193 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013194 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013195 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013196 hp*|HP*)
13197 if test "$GCC" = "yes"
13198 then LDSHARED='$(CC) -shared'
13199 else LDSHARED='ld -b';
13200 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013201 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013202 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013203 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13204 if test "$enable_framework" ; then
13205 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013206 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13207 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013208 else
13209 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013210 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013211 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013212 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013213 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13214 if test "$enable_framework" ; then
13215 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013216 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13217 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013218 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013219 # No framework, use the Python app as bundle-loader
13220 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013221 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013222 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013223 Darwin/*)
13224 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13225 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013226
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013227 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013228 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013229 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013230 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013231 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013232 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13233 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013234 else
13235 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13236 if test "$enable_framework" ; then
13237 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013238 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13239 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013240 else
13241 # No framework, use the Python app as bundle-loader
13242 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13243 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13244 fi
13245 fi
13246 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013247 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013248 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013249 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013250 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013251 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000013252 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000013253 else
13254 LDSHARED="ld -Bshareable ${LDFLAGS}"
13255 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013256 OpenBSD*)
13257 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13258 then
13259 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13260 else
13261 case `uname -r` in
13262 [01].* | 2.[0-7] | 2.[0-7].*)
13263 LDSHARED="ld -Bshareable ${LDFLAGS}"
13264 ;;
13265 *)
13266 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13267 ;;
13268 esac
13269 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013270 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013271 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013272 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013273 then LDSHARED='$(CC) -shared'
13274 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013275 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013276 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013277 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013278 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013279 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013280 *) LDSHARED="ld";;
13281 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013282fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013283{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5
13284$as_echo "$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013285BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013286# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013287# library (module) -- this is only needed for a few systems
Antoine Pitroub52ec782009-01-25 16:34:23 +000013288{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5
13289$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013290if test -z "$CCSHARED"
13291then
Guido van Rossum07397971997-04-29 21:49:50 +000013292 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013293 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013294 then CCSHARED="-fPIC";
13295 elif test `uname -p` = sparc;
13296 then CCSHARED="-xcode=pic32";
13297 else CCSHARED="-Kpic";
13298 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013299 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013300 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013301 else CCSHARED="+z";
13302 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013303 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013304 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013305 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013306 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013307 if test "$GCC" = "yes"
13308 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013309 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013310 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013311 SCO_SV*)
13312 if test "$GCC" = "yes"
13313 then CCSHARED="-fPIC"
13314 else CCSHARED="-Kpic -belf"
13315 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013316 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013317 IRIX*/6*) case $CC in
13318 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013319 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013320 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013321 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013322 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013323fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013324{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5
13325$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013326# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013327# the python executable -- this is only needed for a few systems
Antoine Pitroub52ec782009-01-25 16:34:23 +000013328{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13329$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013330if test -z "$LINKFORSHARED"
13331then
Guido van Rossum07397971997-04-29 21:49:50 +000013332 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013333 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013334 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013335 LINKFORSHARED="-Wl,-E -Wl,+s";;
13336# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013337 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013338 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013339 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013340 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013341 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13342 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013343 # not used by the core itself but which needs to be in the core so
13344 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013345 # -prebind is no longer used, because it actually seems to give a
13346 # slowdown in stead of a speedup, maybe due to the large number of
13347 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013348
13349 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013350 if test "$enable_framework"
13351 then
Jack Jansenda49e192005-01-07 13:08:22 +000013352 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013353 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013354 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013355 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013356 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013357 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013358 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013359 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13360 then
13361 LINKFORSHARED="-Wl,--export-dynamic"
13362 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013363 SunOS/5*) case $CC in
13364 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013365 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013366 then
13367 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013368 fi;;
13369 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013370 CYGWIN*)
13371 if test $enable_shared = "no"
13372 then
13373 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13374 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013375 QNX*)
13376 # -Wl,-E causes the symbols to be added to the dynamic
13377 # symbol table so that they can be found when a module
13378 # is loaded. -N 2048K causes the stack size to be set
13379 # to 2048 kilobytes so that the stack doesn't overflow
13380 # when running test_compile.py.
13381 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013382 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013383fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013384{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13385$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013386
Michael W. Hudson54241132001-12-07 15:38:26 +000013387
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013388
Antoine Pitroub52ec782009-01-25 16:34:23 +000013389{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13390$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013391if test ! "$LIBRARY" = "$LDLIBRARY"
13392then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013393 case $ac_sys_system in
13394 CYGWIN*)
13395 # Cygwin needs CCSHARED when building extension DLLs
13396 # but not when building the interpreter DLL.
13397 CFLAGSFORSHARED='';;
13398 *)
13399 CFLAGSFORSHARED='$(CCSHARED)'
13400 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013401fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013402{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13403$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013404
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013405# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13406# library (with --enable-shared).
13407# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013408# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13409# if it is not required, since it creates a dependency of the shared library
13410# to LIBS. This, in turn, means that applications linking the shared libpython
13411# don't need to link LIBS explicitly. The default should be only changed
13412# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013413
Antoine Pitroub52ec782009-01-25 16:34:23 +000013414{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5
13415$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013416case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013417 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013418 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013419esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013420{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5
13421$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013422
13423
Guido van Rossum627b2d71993-12-24 10:39:16 +000013424# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013425
Antoine Pitroub52ec782009-01-25 16:34:23 +000013426{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13427$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013428if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000013429 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013430else
Martin v. Löwis11437992002-04-12 09:54:03 +000013431 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013432LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013434/* confdefs.h. */
13435_ACEOF
13436cat confdefs.h >>conftest.$ac_ext
13437cat >>conftest.$ac_ext <<_ACEOF
13438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013440/* Override any GCC internal prototype to avoid an error.
13441 Use char because int might match the return type of a GCC
13442 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013443#ifdef __cplusplus
13444extern "C"
13445#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013446char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013447int
13448main ()
13449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013450return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013451 ;
13452 return 0;
13453}
13454_ACEOF
13455rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013456if { (ac_try="$ac_link"
13457case "(($ac_try" in
13458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13459 *) ac_try_echo=$ac_try;;
13460esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013461eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13462$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013463 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013465 grep -v '^ *+' conftest.er1 >conftest.err
13466 rm -f conftest.er1
13467 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000013468 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013469 (exit $ac_status); } && {
13470 test -z "$ac_c_werror_flag" ||
13471 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000013472 } && test -s conftest$ac_exeext && {
13473 test "$cross_compiling" = yes ||
13474 $as_test_x conftest$ac_exeext
13475 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013476 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013477else
Antoine Pitroub52ec782009-01-25 16:34:23 +000013478 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013479sed 's/^/| /' conftest.$ac_ext >&5
13480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013481 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013483
Antoine Pitroub52ec782009-01-25 16:34:23 +000013484rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013485rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013487LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013488fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013489{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13490$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13491if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013492 cat >>confdefs.h <<_ACEOF
13493#define HAVE_LIBDL 1
13494_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013495
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013496 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013497
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013498fi
13499 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013500
Antoine Pitroub52ec782009-01-25 16:34:23 +000013501{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13502$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013503if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000013504 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013505else
Martin v. Löwis11437992002-04-12 09:54:03 +000013506 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013507LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013508cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013509/* confdefs.h. */
13510_ACEOF
13511cat confdefs.h >>conftest.$ac_ext
13512cat >>conftest.$ac_ext <<_ACEOF
13513/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013514
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013515/* Override any GCC internal prototype to avoid an error.
13516 Use char because int might match the return type of a GCC
13517 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013518#ifdef __cplusplus
13519extern "C"
13520#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013521char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013522int
13523main ()
13524{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013525return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013526 ;
13527 return 0;
13528}
13529_ACEOF
13530rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013531if { (ac_try="$ac_link"
13532case "(($ac_try" in
13533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13534 *) ac_try_echo=$ac_try;;
13535esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013536eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13537$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013538 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013539 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013540 grep -v '^ *+' conftest.er1 >conftest.err
13541 rm -f conftest.er1
13542 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000013543 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544 (exit $ac_status); } && {
13545 test -z "$ac_c_werror_flag" ||
13546 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000013547 } && test -s conftest$ac_exeext && {
13548 test "$cross_compiling" = yes ||
13549 $as_test_x conftest$ac_exeext
13550 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013551 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013552else
Antoine Pitroub52ec782009-01-25 16:34:23 +000013553 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013554sed 's/^/| /' conftest.$ac_ext >&5
13555
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013556 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013558
Antoine Pitroub52ec782009-01-25 16:34:23 +000013559rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013560rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013561 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013562LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013563fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013564{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13565$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13566if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013567 cat >>confdefs.h <<_ACEOF
13568#define HAVE_LIBDLD 1
13569_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013570
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013571 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013572
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013573fi
13574 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013575
Georg Brandlb1441c72009-01-03 22:33:39 +000013576# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013577if test "$with_threads" = "yes" -o -z "$with_threads"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000013578 { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13579$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013580if test "${ac_cv_search_sem_init+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000013581 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013582else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013583 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013584cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013585/* confdefs.h. */
13586_ACEOF
13587cat confdefs.h >>conftest.$ac_ext
13588cat >>conftest.$ac_ext <<_ACEOF
13589/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013590
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013591/* Override any GCC internal prototype to avoid an error.
13592 Use char because int might match the return type of a GCC
13593 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013594#ifdef __cplusplus
13595extern "C"
13596#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013597char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013598int
13599main ()
13600{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013601return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013602 ;
13603 return 0;
13604}
13605_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013606for ac_lib in '' pthread rt posix4; do
13607 if test -z "$ac_lib"; then
13608 ac_res="none required"
13609 else
13610 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013611 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013612 fi
13613 rm -f conftest.$ac_objext conftest$ac_exeext
13614if { (ac_try="$ac_link"
13615case "(($ac_try" in
13616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13617 *) ac_try_echo=$ac_try;;
13618esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013619eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13620$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013621 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013622 ac_status=$?
13623 grep -v '^ *+' conftest.er1 >conftest.err
13624 rm -f conftest.er1
13625 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000013626 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013627 (exit $ac_status); } && {
13628 test -z "$ac_c_werror_flag" ||
13629 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000013630 } && test -s conftest$ac_exeext && {
13631 test "$cross_compiling" = yes ||
13632 $as_test_x conftest$ac_exeext
13633 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013634 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000013635else
Antoine Pitroub52ec782009-01-25 16:34:23 +000013636 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013637sed 's/^/| /' conftest.$ac_ext >&5
13638
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013639
Thomas Wouters477c8d52006-05-27 19:21:47 +000013640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013641
Antoine Pitroub52ec782009-01-25 16:34:23 +000013642rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013643rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13644 conftest$ac_exeext
13645 if test "${ac_cv_search_sem_init+set}" = set; then
13646 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013648done
13649if test "${ac_cv_search_sem_init+set}" = set; then
13650 :
13651else
13652 ac_cv_search_sem_init=no
13653fi
13654rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013655LIBS=$ac_func_search_save_LIBS
13656fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013657{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13658$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013659ac_res=$ac_cv_search_sem_init
13660if test "$ac_res" != no; then
13661 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013662
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013663fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013664 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013665 # posix4 on Solaris 2.6
13666 # pthread (first!) on Linux
13667fi
13668
Martin v. Löwis19d17342003-06-14 21:03:05 +000013669# check if we need libintl for locale functions
Antoine Pitroub52ec782009-01-25 16:34:23 +000013670{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13671$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013672if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000013673 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000013674else
13675 ac_check_lib_save_LIBS=$LIBS
13676LIBS="-lintl $LIBS"
13677cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013678/* confdefs.h. */
13679_ACEOF
13680cat confdefs.h >>conftest.$ac_ext
13681cat >>conftest.$ac_ext <<_ACEOF
13682/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013684/* Override any GCC internal prototype to avoid an error.
13685 Use char because int might match the return type of a GCC
13686 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013687#ifdef __cplusplus
13688extern "C"
13689#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013690char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013691int
13692main ()
13693{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013694return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013695 ;
13696 return 0;
13697}
13698_ACEOF
13699rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013700if { (ac_try="$ac_link"
13701case "(($ac_try" in
13702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13703 *) ac_try_echo=$ac_try;;
13704esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013705eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13706$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013707 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000013708 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013709 grep -v '^ *+' conftest.er1 >conftest.err
13710 rm -f conftest.er1
13711 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000013712 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013713 (exit $ac_status); } && {
13714 test -z "$ac_c_werror_flag" ||
13715 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000013716 } && test -s conftest$ac_exeext && {
13717 test "$cross_compiling" = yes ||
13718 $as_test_x conftest$ac_exeext
13719 }; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013720 ac_cv_lib_intl_textdomain=yes
13721else
Antoine Pitroub52ec782009-01-25 16:34:23 +000013722 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013723sed 's/^/| /' conftest.$ac_ext >&5
13724
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013725 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000013726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013727
Antoine Pitroub52ec782009-01-25 16:34:23 +000013728rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013729rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013730 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000013731LIBS=$ac_check_lib_save_LIBS
13732fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013733{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
13734$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
13735if test "x$ac_cv_lib_intl_textdomain" = x""yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000013736
13737cat >>confdefs.h <<\_ACEOF
13738#define WITH_LIBINTL 1
13739_ACEOF
13740
13741fi
13742
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013743
13744# checks for system dependent C++ extensions support
13745case "$ac_sys_system" in
Antoine Pitroub52ec782009-01-25 16:34:23 +000013746 AIX*) { $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
13747$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013749/* confdefs.h. */
13750_ACEOF
13751cat confdefs.h >>conftest.$ac_ext
13752cat >>conftest.$ac_ext <<_ACEOF
13753/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013754#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000013755int
13756main ()
13757{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013758loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000013759 ;
13760 return 0;
13761}
13762_ACEOF
13763rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013764if { (ac_try="$ac_link"
13765case "(($ac_try" in
13766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13767 *) ac_try_echo=$ac_try;;
13768esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013769eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13770$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013771 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013773 grep -v '^ *+' conftest.er1 >conftest.err
13774 rm -f conftest.er1
13775 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000013776 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013777 (exit $ac_status); } && {
13778 test -z "$ac_c_werror_flag" ||
13779 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000013780 } && test -s conftest$ac_exeext && {
13781 test "$cross_compiling" = yes ||
13782 $as_test_x conftest$ac_exeext
13783 }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013784
Martin v. Löwis11437992002-04-12 09:54:03 +000013785cat >>confdefs.h <<\_ACEOF
13786#define AIX_GENUINE_CPLUSPLUS 1
13787_ACEOF
13788
Antoine Pitroub52ec782009-01-25 16:34:23 +000013789 { $as_echo "$as_me:$LINENO: result: yes" >&5
13790$as_echo "yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013791else
Antoine Pitroub52ec782009-01-25 16:34:23 +000013792 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013793sed 's/^/| /' conftest.$ac_ext >&5
13794
Antoine Pitroub52ec782009-01-25 16:34:23 +000013795 { $as_echo "$as_me:$LINENO: result: no" >&5
13796$as_echo "no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013797fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013798
Antoine Pitroub52ec782009-01-25 16:34:23 +000013799rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013800rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013801 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000013802 *) ;;
13803esac
13804
Guido van Rossum70c7f481998-03-26 18:44:10 +000013805# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Antoine Pitroub52ec782009-01-25 16:34:23 +000013806{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
13807$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013808if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000013809 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013810else
Martin v. Löwis11437992002-04-12 09:54:03 +000013811 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013812LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013813cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013814/* confdefs.h. */
13815_ACEOF
13816cat confdefs.h >>conftest.$ac_ext
13817cat >>conftest.$ac_ext <<_ACEOF
13818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013820/* Override any GCC internal prototype to avoid an error.
13821 Use char because int might match the return type of a GCC
13822 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013823#ifdef __cplusplus
13824extern "C"
13825#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013826char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013827int
13828main ()
13829{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013830return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013831 ;
13832 return 0;
13833}
13834_ACEOF
13835rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013836if { (ac_try="$ac_link"
13837case "(($ac_try" in
13838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13839 *) ac_try_echo=$ac_try;;
13840esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013841eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13842$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013843 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013844 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013845 grep -v '^ *+' conftest.er1 >conftest.err
13846 rm -f conftest.er1
13847 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000013848 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013849 (exit $ac_status); } && {
13850 test -z "$ac_c_werror_flag" ||
13851 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000013852 } && test -s conftest$ac_exeext && {
13853 test "$cross_compiling" = yes ||
13854 $as_test_x conftest$ac_exeext
13855 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013856 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013857else
Antoine Pitroub52ec782009-01-25 16:34:23 +000013858 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013859sed 's/^/| /' conftest.$ac_ext >&5
13860
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013861 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013862fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013863
Antoine Pitroub52ec782009-01-25 16:34:23 +000013864rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013865rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013866 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013867LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013868fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013869{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
13870$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
13871if test "x$ac_cv_lib_nsl_t_open" = x""yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013872 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000013873fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000013874 # SVR4
Antoine Pitroub52ec782009-01-25 16:34:23 +000013875{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
13876$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013877if test "${ac_cv_lib_socket_socket+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000013878 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013879else
Martin v. Löwis11437992002-04-12 09:54:03 +000013880 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013881LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013882cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013883/* confdefs.h. */
13884_ACEOF
13885cat confdefs.h >>conftest.$ac_ext
13886cat >>conftest.$ac_ext <<_ACEOF
13887/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013889/* Override any GCC internal prototype to avoid an error.
13890 Use char because int might match the return type of a GCC
13891 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013892#ifdef __cplusplus
13893extern "C"
13894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013895char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013896int
13897main ()
13898{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013899return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013900 ;
13901 return 0;
13902}
13903_ACEOF
13904rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013905if { (ac_try="$ac_link"
13906case "(($ac_try" in
13907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13908 *) ac_try_echo=$ac_try;;
13909esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000013910eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13911$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013912 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013914 grep -v '^ *+' conftest.er1 >conftest.err
13915 rm -f conftest.er1
13916 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000013917 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013918 (exit $ac_status); } && {
13919 test -z "$ac_c_werror_flag" ||
13920 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000013921 } && test -s conftest$ac_exeext && {
13922 test "$cross_compiling" = yes ||
13923 $as_test_x conftest$ac_exeext
13924 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013925 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013926else
Antoine Pitroub52ec782009-01-25 16:34:23 +000013927 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013928sed 's/^/| /' conftest.$ac_ext >&5
13929
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013930 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013931fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013932
Antoine Pitroub52ec782009-01-25 16:34:23 +000013933rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013934rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013935 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013936LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000013937fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013938{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
13939$as_echo "$ac_cv_lib_socket_socket" >&6; }
13940if test "x$ac_cv_lib_socket_socket" = x""yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000013941 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000013942fi
13943 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000013944
Antoine Pitroub52ec782009-01-25 16:34:23 +000013945{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5
13946$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013947
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013948# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000013949if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013950 withval=$with_libs;
Antoine Pitroub52ec782009-01-25 16:34:23 +000013951{ $as_echo "$as_me:$LINENO: result: $withval" >&5
13952$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000013953LIBS="$withval $LIBS"
13954
13955else
Antoine Pitroub52ec782009-01-25 16:34:23 +000013956 { $as_echo "$as_me:$LINENO: result: no" >&5
13957$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013958fi
13959
Guido van Rossum7f43da71994-08-01 12:15:30 +000013960
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013961# Check for use of the system libffi library
Antoine Pitroub52ec782009-01-25 16:34:23 +000013962{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
13963$as_echo_n "checking for --with-system-ffi... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013965# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013966if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013967 withval=$with_system_ffi;
13968fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013969
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013970
Antoine Pitroub52ec782009-01-25 16:34:23 +000013971{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5
13972$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013973
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000013974# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013975
13976
Antoine Pitroub52ec782009-01-25 16:34:23 +000013977{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5
13978$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013979
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013980# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013981if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982 withval=$with_signal_module;
13983fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013984
13985
13986if test -z "$with_signal_module"
13987then with_signal_module="yes"
13988fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000013989{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5
13990$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000013991
13992if test "${with_signal_module}" = "yes"; then
13993 USE_SIGNAL_MODULE=""
13994 SIGNAL_OBJS=""
13995else
13996 USE_SIGNAL_MODULE="#"
13997 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
13998fi
13999
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014000# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014001
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014002USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014003
Antoine Pitroub52ec782009-01-25 16:34:23 +000014004{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14005$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014006
Guido van Rossumec2f0731997-01-22 20:54:01 +000014007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014008# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014009if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014010 withval=$with_dec_threads;
Antoine Pitroub52ec782009-01-25 16:34:23 +000014011{ $as_echo "$as_me:$LINENO: result: $withval" >&5
14012$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014013LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014014if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014015 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014016fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014017else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014018 { $as_echo "$as_me:$LINENO: result: no" >&5
14019$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014020fi
14021
Martin v. Löwis11437992002-04-12 09:54:03 +000014022
14023# Templates for things AC_DEFINEd more than once.
14024# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014025
14026
Martin v. Löwis11437992002-04-12 09:54:03 +000014027
14028
14029
14030
14031
Antoine Pitroub52ec782009-01-25 16:34:23 +000014032{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5
14033$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014035# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014036if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014037 withval=$with_threads;
14038fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014039
14040
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014041# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014043# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014044if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014045 withval=$with_thread; with_threads=$with_thread
14046fi
14047
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014048
14049if test -z "$with_threads"
14050then with_threads="yes"
14051fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014052{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5
14053$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014054
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014055
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014056if test "$with_threads" = "no"
14057then
14058 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014059elif test "$ac_cv_pthread_is_default" = yes
14060then
Martin v. Löwis11437992002-04-12 09:54:03 +000014061 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014062#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014063_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014064
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014065 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014066 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014067#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014068_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014069
14070 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014071 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014072elif test "$ac_cv_kpthread" = "yes"
14073then
14074 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014075 if test "$ac_cv_cxx_thread" = "yes"; then
14076 CXX="$CXX -Kpthread"
14077 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014078 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014079#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014080_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014081
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014082 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014083 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014084elif test "$ac_cv_kthread" = "yes"
14085then
14086 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014087 if test "$ac_cv_cxx_thread" = "yes"; then
14088 CXX="$CXX -Kthread"
14089 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014090 cat >>confdefs.h <<\_ACEOF
14091#define WITH_THREAD 1
14092_ACEOF
14093
14094 posix_threads=yes
14095 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014096elif test "$ac_cv_pthread" = "yes"
14097then
14098 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014099 if test "$ac_cv_cxx_thread" = "yes"; then
14100 CXX="$CXX -pthread"
14101 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014102 cat >>confdefs.h <<\_ACEOF
14103#define WITH_THREAD 1
14104_ACEOF
14105
14106 posix_threads=yes
14107 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014108else
14109 if test ! -z "$with_threads" -a -d "$with_threads"
14110 then LDFLAGS="$LDFLAGS -L$with_threads"
14111 fi
14112 if test ! -z "$withval" -a -d "$withval"
14113 then LDFLAGS="$LDFLAGS -L$withval"
14114 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014115
14116 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014117 # define _POSIX_THREADS in unistd.h. Some apparently don't
14118 # (e.g. gnu pth with pthread emulation)
Antoine Pitroub52ec782009-01-25 16:34:23 +000014119 { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14120$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014121 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014122/* confdefs.h. */
14123_ACEOF
14124cat confdefs.h >>conftest.$ac_ext
14125cat >>conftest.$ac_ext <<_ACEOF
14126/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014127
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014128#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014129#ifdef _POSIX_THREADS
14130yes
14131#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014132
14133_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014134if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014135 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014136 unistd_defines_pthreads=yes
14137else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014138 unistd_defines_pthreads=no
14139fi
14140rm -f conftest*
14141
Antoine Pitroub52ec782009-01-25 16:34:23 +000014142 { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14143$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014144
Martin v. Löwis11437992002-04-12 09:54:03 +000014145 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014146#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014147_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014148
Martin v. Löwis11437992002-04-12 09:54:03 +000014149 if test "${ac_cv_header_cthreads_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014150 { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
14151$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014152if test "${ac_cv_header_cthreads_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014153 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014154fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014155{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14156$as_echo "$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014157else
Martin v. Löwis11437992002-04-12 09:54:03 +000014158 # Is the header compilable?
Antoine Pitroub52ec782009-01-25 16:34:23 +000014159{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14160$as_echo_n "checking cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014161cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014162/* confdefs.h. */
14163_ACEOF
14164cat confdefs.h >>conftest.$ac_ext
14165cat >>conftest.$ac_ext <<_ACEOF
14166/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014167$ac_includes_default
14168#include <cthreads.h>
14169_ACEOF
14170rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014171if { (ac_try="$ac_compile"
14172case "(($ac_try" in
14173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14174 *) ac_try_echo=$ac_try;;
14175esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014176eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14177$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014180 grep -v '^ *+' conftest.er1 >conftest.err
14181 rm -f conftest.er1
14182 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000014183 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014184 (exit $ac_status); } && {
14185 test -z "$ac_c_werror_flag" ||
14186 test ! -s conftest.err
14187 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014188 ac_header_compiler=yes
14189else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014190 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014191sed 's/^/| /' conftest.$ac_ext >&5
14192
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014193 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014195
14196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000014197{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14198$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014199
14200# Is the header present?
Antoine Pitroub52ec782009-01-25 16:34:23 +000014201{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14202$as_echo_n "checking cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014203cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014204/* confdefs.h. */
14205_ACEOF
14206cat confdefs.h >>conftest.$ac_ext
14207cat >>conftest.$ac_ext <<_ACEOF
14208/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014209#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014210_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014211if { (ac_try="$ac_cpp conftest.$ac_ext"
14212case "(($ac_try" in
14213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14214 *) ac_try_echo=$ac_try;;
14215esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014216eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14217$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014218 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014219 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014220 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014221 rm -f conftest.er1
14222 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000014223 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014224 (exit $ac_status); } >/dev/null && {
14225 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14226 test ! -s conftest.err
14227 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014228 ac_header_preproc=yes
14229else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014230 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014231sed 's/^/| /' conftest.$ac_ext >&5
14232
Martin v. Löwis11437992002-04-12 09:54:03 +000014233 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014235
Martin v. Löwis11437992002-04-12 09:54:03 +000014236rm -f conftest.err conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000014237{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14238$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014239
14240# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014241case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14242 yes:no: )
Antoine Pitroub52ec782009-01-25 16:34:23 +000014243 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14244$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14245 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14246$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014247 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014248 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014249 no:yes:* )
Antoine Pitroub52ec782009-01-25 16:34:23 +000014250 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14251$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14252 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14253$as_echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14254 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14255$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14256 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14257$as_echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14258 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14259$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14260 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14261$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014262 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014263## ------------------------------------------------ ##
14264## Report this to http://www.python.org/python-bugs ##
14265## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014266_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014267 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014268 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014269esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014270{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
14271$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014272if test "${ac_cv_header_cthreads_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014273 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014274else
14275 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014276fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014277{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14278$as_echo "$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014279
14280fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014281if test "x$ac_cv_header_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014282 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014283#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014284_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014285
Martin v. Löwis11437992002-04-12 09:54:03 +000014286 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014287#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014288_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014289
Martin v. Löwis11437992002-04-12 09:54:03 +000014290
14291cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014292#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014293_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014294
14295 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014296 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014297else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014298
Martin v. Löwis11437992002-04-12 09:54:03 +000014299 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014300 { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14301$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014302if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014303 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014304fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014305{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14306$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014307else
Martin v. Löwis11437992002-04-12 09:54:03 +000014308 # Is the header compilable?
Antoine Pitroub52ec782009-01-25 16:34:23 +000014309{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14310$as_echo_n "checking mach/cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014311cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014312/* confdefs.h. */
14313_ACEOF
14314cat confdefs.h >>conftest.$ac_ext
14315cat >>conftest.$ac_ext <<_ACEOF
14316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014317$ac_includes_default
14318#include <mach/cthreads.h>
14319_ACEOF
14320rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014321if { (ac_try="$ac_compile"
14322case "(($ac_try" in
14323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14324 *) ac_try_echo=$ac_try;;
14325esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014326eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14327$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014328 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014329 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014330 grep -v '^ *+' conftest.er1 >conftest.err
14331 rm -f conftest.er1
14332 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000014333 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334 (exit $ac_status); } && {
14335 test -z "$ac_c_werror_flag" ||
14336 test ! -s conftest.err
14337 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014338 ac_header_compiler=yes
14339else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014340 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014341sed 's/^/| /' conftest.$ac_ext >&5
14342
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014343 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014344fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014345
14346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000014347{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14348$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014349
14350# Is the header present?
Antoine Pitroub52ec782009-01-25 16:34:23 +000014351{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14352$as_echo_n "checking mach/cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014353cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014354/* confdefs.h. */
14355_ACEOF
14356cat confdefs.h >>conftest.$ac_ext
14357cat >>conftest.$ac_ext <<_ACEOF
14358/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014359#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014360_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014361if { (ac_try="$ac_cpp conftest.$ac_ext"
14362case "(($ac_try" in
14363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14364 *) ac_try_echo=$ac_try;;
14365esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014366eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14367$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014368 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014369 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014370 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014371 rm -f conftest.er1
14372 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000014373 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014374 (exit $ac_status); } >/dev/null && {
14375 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14376 test ! -s conftest.err
14377 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014378 ac_header_preproc=yes
14379else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014380 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014381sed 's/^/| /' conftest.$ac_ext >&5
14382
Martin v. Löwis11437992002-04-12 09:54:03 +000014383 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014384fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014385
Martin v. Löwis11437992002-04-12 09:54:03 +000014386rm -f conftest.err conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000014387{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14388$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014389
14390# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014391case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14392 yes:no: )
Antoine Pitroub52ec782009-01-25 16:34:23 +000014393 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14394$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14395 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14396$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014397 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014398 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014399 no:yes:* )
Antoine Pitroub52ec782009-01-25 16:34:23 +000014400 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14401$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14402 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14403$as_echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14404 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14405$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14406 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14407$as_echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14408 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14409$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14410 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14411$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014412 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014413## ------------------------------------------------ ##
14414## Report this to http://www.python.org/python-bugs ##
14415## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014416_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014418 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014419esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014420{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14421$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014422if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014423 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014424else
14425 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014426fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014427{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14428$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014429
14430fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014431if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014432 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014433#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014434_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014435
Martin v. Löwis11437992002-04-12 09:54:03 +000014436 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014437#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014438_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014439
Martin v. Löwis11437992002-04-12 09:54:03 +000014440
14441cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014442#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014443_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014444
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014445 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014446else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014447
Antoine Pitroub52ec782009-01-25 16:34:23 +000014448 { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5
14449$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014452if test "${with_pth+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014453 withval=$with_pth; { $as_echo "$as_me:$LINENO: result: $withval" >&5
14454$as_echo "$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014455 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014456#define WITH_THREAD 1
14457_ACEOF
14458
14459
14460cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014461#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014462_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014463
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014464 LIBS="-lpth $LIBS"
14465 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014466else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014467 { $as_echo "$as_me:$LINENO: result: no" >&5
14468$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014469
14470 # Just looking for pthread_create in libpthread is not enough:
14471 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14472 # So we really have to include pthread.h, and then link.
14473 _libs=$LIBS
14474 LIBS="$LIBS -lpthread"
Antoine Pitroub52ec782009-01-25 16:34:23 +000014475 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14476$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014477 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014478/* confdefs.h. */
14479_ACEOF
14480cat confdefs.h >>conftest.$ac_ext
14481cat >>conftest.$ac_ext <<_ACEOF
14482/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014483#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014484
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014485void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014486int
14487main ()
14488{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014489
14490pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014491 ;
14492 return 0;
14493}
14494_ACEOF
14495rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014496if { (ac_try="$ac_link"
14497case "(($ac_try" in
14498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14499 *) ac_try_echo=$ac_try;;
14500esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014501eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14502$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014503 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014505 grep -v '^ *+' conftest.er1 >conftest.err
14506 rm -f conftest.er1
14507 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000014508 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014509 (exit $ac_status); } && {
14510 test -z "$ac_c_werror_flag" ||
14511 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000014512 } && test -s conftest$ac_exeext && {
14513 test "$cross_compiling" = yes ||
14514 $as_test_x conftest$ac_exeext
14515 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014516
Antoine Pitroub52ec782009-01-25 16:34:23 +000014517 { $as_echo "$as_me:$LINENO: result: yes" >&5
14518$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014519 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014520#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014521_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014522
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014523 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014524 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014525else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014526 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014527sed 's/^/| /' conftest.$ac_ext >&5
14528
Martin v. Löwis11437992002-04-12 09:54:03 +000014529
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014530 LIBS=$_libs
Antoine Pitroub52ec782009-01-25 16:34:23 +000014531 { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5
14532$as_echo_n "checking for pthread_detach... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014533if test "${ac_cv_func_pthread_detach+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014534 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014535else
Martin v. Löwis11437992002-04-12 09:54:03 +000014536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014537/* confdefs.h. */
14538_ACEOF
14539cat confdefs.h >>conftest.$ac_ext
14540cat >>conftest.$ac_ext <<_ACEOF
14541/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014542/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14543 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14544#define pthread_detach innocuous_pthread_detach
14545
Guido van Rossumad678af1998-10-02 14:42:15 +000014546/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014547 which can conflict with char pthread_detach (); below.
14548 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014549 <limits.h> exists even on freestanding compilers. */
14550
14551#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014552# include <limits.h>
14553#else
14554# include <assert.h>
14555#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014556
14557#undef pthread_detach
14558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014559/* Override any GCC internal prototype to avoid an error.
14560 Use char because int might match the return type of a GCC
14561 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014562#ifdef __cplusplus
14563extern "C"
14564#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014565char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014566/* The GNU C library defines this for functions which it implements
14567 to always fail with ENOSYS. Some functions are actually named
14568 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014569#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014570choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014571#endif
14572
Skip Montanaro6dead952003-09-25 14:50:04 +000014573int
14574main ()
14575{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014576return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014577 ;
14578 return 0;
14579}
14580_ACEOF
14581rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014582if { (ac_try="$ac_link"
14583case "(($ac_try" in
14584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14585 *) ac_try_echo=$ac_try;;
14586esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014587eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14588$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014589 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014590 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014591 grep -v '^ *+' conftest.er1 >conftest.err
14592 rm -f conftest.er1
14593 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000014594 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014595 (exit $ac_status); } && {
14596 test -z "$ac_c_werror_flag" ||
14597 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000014598 } && test -s conftest$ac_exeext && {
14599 test "$cross_compiling" = yes ||
14600 $as_test_x conftest$ac_exeext
14601 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014603else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014604 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014605sed 's/^/| /' conftest.$ac_ext >&5
14606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014607 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014608fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014609
Antoine Pitroub52ec782009-01-25 16:34:23 +000014610rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014611rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014612 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014613fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014614{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14615$as_echo "$ac_cv_func_pthread_detach" >&6; }
14616if test "x$ac_cv_func_pthread_detach" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014617 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014618#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014619_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000014620
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014621 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014622 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000014623else
Guido van Rossumad678af1998-10-02 14:42:15 +000014624
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014625 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014626 { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14627$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014628if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014629 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014630fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014631{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14632$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014633else
14634 # Is the header compilable?
Antoine Pitroub52ec782009-01-25 16:34:23 +000014635{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
14636$as_echo_n "checking atheos/threads.h usability... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014638/* confdefs.h. */
14639_ACEOF
14640cat confdefs.h >>conftest.$ac_ext
14641cat >>conftest.$ac_ext <<_ACEOF
14642/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014643$ac_includes_default
14644#include <atheos/threads.h>
14645_ACEOF
14646rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014647if { (ac_try="$ac_compile"
14648case "(($ac_try" in
14649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14650 *) ac_try_echo=$ac_try;;
14651esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014652eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14653$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014654 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014655 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014656 grep -v '^ *+' conftest.er1 >conftest.err
14657 rm -f conftest.er1
14658 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000014659 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014660 (exit $ac_status); } && {
14661 test -z "$ac_c_werror_flag" ||
14662 test ! -s conftest.err
14663 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014664 ac_header_compiler=yes
14665else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014666 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014667sed 's/^/| /' conftest.$ac_ext >&5
14668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014669 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014671
14672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000014673{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14674$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014675
14676# Is the header present?
Antoine Pitroub52ec782009-01-25 16:34:23 +000014677{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
14678$as_echo_n "checking atheos/threads.h presence... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014680/* confdefs.h. */
14681_ACEOF
14682cat confdefs.h >>conftest.$ac_ext
14683cat >>conftest.$ac_ext <<_ACEOF
14684/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014685#include <atheos/threads.h>
14686_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014687if { (ac_try="$ac_cpp conftest.$ac_ext"
14688case "(($ac_try" in
14689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14690 *) ac_try_echo=$ac_try;;
14691esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014692eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14693$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014694 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014695 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014696 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014697 rm -f conftest.er1
14698 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000014699 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014700 (exit $ac_status); } >/dev/null && {
14701 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14702 test ! -s conftest.err
14703 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014704 ac_header_preproc=yes
14705else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014706 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014707sed 's/^/| /' conftest.$ac_ext >&5
14708
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014709 ac_header_preproc=no
14710fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014711
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014712rm -f conftest.err conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000014713{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14714$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014715
14716# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014717case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14718 yes:no: )
Antoine Pitroub52ec782009-01-25 16:34:23 +000014719 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14720$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14721 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
14722$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014723 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014724 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014725 no:yes:* )
Antoine Pitroub52ec782009-01-25 16:34:23 +000014726 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
14727$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
14728 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
14729$as_echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
14730 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
14731$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
14732 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
14733$as_echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14734 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
14735$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
14736 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
14737$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014738 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014739## ------------------------------------------------ ##
14740## Report this to http://www.python.org/python-bugs ##
14741## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014742_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014743 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014744 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014745esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014746{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
14747$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014748if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014749 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014750else
14751 ac_cv_header_atheos_threads_h=$ac_header_preproc
14752fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014753{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
14754$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014755
14756fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014757if test "x$ac_cv_header_atheos_threads_h" = x""yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014758 cat >>confdefs.h <<\_ACEOF
14759#define WITH_THREAD 1
14760_ACEOF
14761
14762
14763cat >>confdefs.h <<\_ACEOF
14764#define ATHEOS_THREADS 1
14765_ACEOF
14766
14767 THREADOBJ="Python/thread.o"
14768else
14769
Antoine Pitroub52ec782009-01-25 16:34:23 +000014770 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
14771$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014772if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014773 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014774else
Martin v. Löwis11437992002-04-12 09:54:03 +000014775 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014776LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014778/* confdefs.h. */
14779_ACEOF
14780cat confdefs.h >>conftest.$ac_ext
14781cat >>conftest.$ac_ext <<_ACEOF
14782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014784/* Override any GCC internal prototype to avoid an error.
14785 Use char because int might match the return type of a GCC
14786 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014787#ifdef __cplusplus
14788extern "C"
14789#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014790char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014791int
14792main ()
14793{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014794return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014795 ;
14796 return 0;
14797}
14798_ACEOF
14799rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014800if { (ac_try="$ac_link"
14801case "(($ac_try" in
14802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14803 *) ac_try_echo=$ac_try;;
14804esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014805eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14806$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014807 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014809 grep -v '^ *+' conftest.er1 >conftest.err
14810 rm -f conftest.er1
14811 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000014812 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014813 (exit $ac_status); } && {
14814 test -z "$ac_c_werror_flag" ||
14815 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000014816 } && test -s conftest$ac_exeext && {
14817 test "$cross_compiling" = yes ||
14818 $as_test_x conftest$ac_exeext
14819 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014820 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000014821else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014822 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014823sed 's/^/| /' conftest.$ac_ext >&5
14824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014825 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000014826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014827
Antoine Pitroub52ec782009-01-25 16:34:23 +000014828rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014829rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014830 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014831LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014832fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014833{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
14834$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
14835if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014836 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014837#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014838_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000014839
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014840 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014841 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014842 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000014843else
Greg Steinadf63d62000-07-05 10:38:09 +000014844
Antoine Pitroub52ec782009-01-25 16:34:23 +000014845 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
14846$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014847if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014848 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000014849else
Martin v. Löwis11437992002-04-12 09:54:03 +000014850 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000014851LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014853/* confdefs.h. */
14854_ACEOF
14855cat confdefs.h >>conftest.$ac_ext
14856cat >>conftest.$ac_ext <<_ACEOF
14857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014858
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859/* Override any GCC internal prototype to avoid an error.
14860 Use char because int might match the return type of a GCC
14861 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014862#ifdef __cplusplus
14863extern "C"
14864#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014865char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014866int
14867main ()
14868{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014869return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014870 ;
14871 return 0;
14872}
14873_ACEOF
14874rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014875if { (ac_try="$ac_link"
14876case "(($ac_try" in
14877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14878 *) ac_try_echo=$ac_try;;
14879esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014880eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14881$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014882 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014884 grep -v '^ *+' conftest.er1 >conftest.err
14885 rm -f conftest.er1
14886 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000014887 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888 (exit $ac_status); } && {
14889 test -z "$ac_c_werror_flag" ||
14890 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000014891 } && test -s conftest$ac_exeext && {
14892 test "$cross_compiling" = yes ||
14893 $as_test_x conftest$ac_exeext
14894 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000014896else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014897 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014898sed 's/^/| /' conftest.$ac_ext >&5
14899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000014901fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014902
Antoine Pitroub52ec782009-01-25 16:34:23 +000014903rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014904rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014905 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014906LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000014907fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014908{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
14909$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
14910if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014911 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014912#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014913_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000014914
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014915 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014916 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014917 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014918else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000014919
Antoine Pitroub52ec782009-01-25 16:34:23 +000014920 { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
14921$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014922if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014923 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014924else
Martin v. Löwis11437992002-04-12 09:54:03 +000014925 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014926LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014927cat >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öwis11437992002-04-12 09:54:03 +000014933
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934/* Override any GCC internal prototype to avoid an error.
14935 Use char because int might match the return type of a GCC
14936 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014937#ifdef __cplusplus
14938extern "C"
14939#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014940char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014941int
14942main ()
14943{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014944return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014945 ;
14946 return 0;
14947}
14948_ACEOF
14949rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014950if { (ac_try="$ac_link"
14951case "(($ac_try" in
14952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14953 *) ac_try_echo=$ac_try;;
14954esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000014955eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14956$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014957 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014959 grep -v '^ *+' conftest.er1 >conftest.err
14960 rm -f conftest.er1
14961 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000014962 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963 (exit $ac_status); } && {
14964 test -z "$ac_c_werror_flag" ||
14965 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000014966 } && test -s conftest$ac_exeext && {
14967 test "$cross_compiling" = yes ||
14968 $as_test_x conftest$ac_exeext
14969 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014971else
Antoine Pitroub52ec782009-01-25 16:34:23 +000014972 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014973sed 's/^/| /' conftest.$ac_ext >&5
14974
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014975 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014976fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014977
Antoine Pitroub52ec782009-01-25 16:34:23 +000014978rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014979rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014980 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014981LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014982fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000014983{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
14984$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
14985if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014986 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014987#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014988_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014989
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014990 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000014991 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014992 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014993else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000014994
Antoine Pitroub52ec782009-01-25 16:34:23 +000014995 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
14996$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014997if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000014998 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000014999else
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015001LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015002cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015003/* confdefs.h. */
15004_ACEOF
15005cat confdefs.h >>conftest.$ac_ext
15006cat >>conftest.$ac_ext <<_ACEOF
15007/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015008
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_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015016int
15017main ()
15018{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015019return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015020 ;
15021 return 0;
15022}
15023_ACEOF
15024rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015025if { (ac_try="$ac_link"
15026case "(($ac_try" in
15027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15028 *) ac_try_echo=$ac_try;;
15029esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015030eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15031$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015032 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015033 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015034 grep -v '^ *+' conftest.er1 >conftest.err
15035 rm -f conftest.er1
15036 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000015037 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015038 (exit $ac_status); } && {
15039 test -z "$ac_c_werror_flag" ||
15040 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000015041 } && test -s conftest$ac_exeext && {
15042 test "$cross_compiling" = yes ||
15043 $as_test_x conftest$ac_exeext
15044 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015045 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015046else
Antoine Pitroub52ec782009-01-25 16:34:23 +000015047 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015048sed 's/^/| /' conftest.$ac_ext >&5
15049
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015050 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015051fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015052
Antoine Pitroub52ec782009-01-25 16:34:23 +000015053rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015054rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015055 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015056LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015057fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000015058{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15059$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
15060if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015061 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015062#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015063_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015064
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015065 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015066 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015067 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015068else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015069
Martin v. Löwis130fb172001-07-19 11:00:41 +000015070 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015071fi
15072
Guido van Rossum627b2d71993-12-24 10:39:16 +000015073
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015074fi
15075
Guido van Rossum0be3e491997-05-22 20:33:33 +000015076fi
15077
Guido van Rossum49545951997-12-02 19:28:29 +000015078fi
15079
Guido van Rossumb93a8621998-05-07 13:27:32 +000015080fi
15081
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015082
Michael W. Hudson54241132001-12-07 15:38:26 +000015083fi
15084
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015086
Antoine Pitroub52ec782009-01-25 16:34:23 +000015087rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015088rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015089 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015090fi
15091
Martin v. Löwis11437992002-04-12 09:54:03 +000015092fi
15093
15094
15095fi
15096
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015097
Michael W. Hudson54241132001-12-07 15:38:26 +000015098
Antoine Pitroub52ec782009-01-25 16:34:23 +000015099 { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15100$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015101if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000015102 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015103else
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015105LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015106cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015107/* confdefs.h. */
15108_ACEOF
15109cat confdefs.h >>conftest.$ac_ext
15110cat >>conftest.$ac_ext <<_ACEOF
15111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015112
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015113/* Override any GCC internal prototype to avoid an error.
15114 Use char because int might match the return type of a GCC
15115 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015116#ifdef __cplusplus
15117extern "C"
15118#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015119char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015120int
15121main ()
15122{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 ;
15125 return 0;
15126}
15127_ACEOF
15128rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129if { (ac_try="$ac_link"
15130case "(($ac_try" in
15131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15132 *) ac_try_echo=$ac_try;;
15133esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015134eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15135$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015138 grep -v '^ *+' conftest.er1 >conftest.err
15139 rm -f conftest.er1
15140 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000015141 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142 (exit $ac_status); } && {
15143 test -z "$ac_c_werror_flag" ||
15144 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000015145 } && test -s conftest$ac_exeext && {
15146 test "$cross_compiling" = yes ||
15147 $as_test_x conftest$ac_exeext
15148 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015149 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015150else
Antoine Pitroub52ec782009-01-25 16:34:23 +000015151 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015152sed 's/^/| /' conftest.$ac_ext >&5
15153
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015154 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015155fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015156
Antoine Pitroub52ec782009-01-25 16:34:23 +000015157rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015158rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015159 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015160LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015161fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000015162{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15163$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
15164if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015165 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015166#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015167_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015168
Martin v. Löwis130fb172001-07-19 11:00:41 +000015169 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015170 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015171 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015172fi
15173
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015174
Neal Norwitza978ab02002-11-02 16:58:05 +000015175 if test "$posix_threads" != "yes"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000015176 { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15177$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015178if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000015179 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015180else
Martin v. Löwis11437992002-04-12 09:54:03 +000015181 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015182LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015183cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015184/* confdefs.h. */
15185_ACEOF
15186cat confdefs.h >>conftest.$ac_ext
15187cat >>conftest.$ac_ext <<_ACEOF
15188/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015190/* Override any GCC internal prototype to avoid an error.
15191 Use char because int might match the return type of a GCC
15192 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015193#ifdef __cplusplus
15194extern "C"
15195#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015196char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015197int
15198main ()
15199{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015200return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015201 ;
15202 return 0;
15203}
15204_ACEOF
15205rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015206if { (ac_try="$ac_link"
15207case "(($ac_try" in
15208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15209 *) ac_try_echo=$ac_try;;
15210esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015211eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15212$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015213 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015215 grep -v '^ *+' conftest.er1 >conftest.err
15216 rm -f conftest.er1
15217 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000015218 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015219 (exit $ac_status); } && {
15220 test -z "$ac_c_werror_flag" ||
15221 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000015222 } && test -s conftest$ac_exeext && {
15223 test "$cross_compiling" = yes ||
15224 $as_test_x conftest$ac_exeext
15225 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015226 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015227else
Antoine Pitroub52ec782009-01-25 16:34:23 +000015228 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015229sed 's/^/| /' conftest.$ac_ext >&5
15230
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015232fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015233
Antoine Pitroub52ec782009-01-25 16:34:23 +000015234rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015235rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015236 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015237LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015238fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000015239{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15240$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
15241if test "x$ac_cv_lib_thread_thr_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015242 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015243#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015244_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015245
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015246 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015247 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015248 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015249fi
15250
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015251 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015252
Martin v. Löwis130fb172001-07-19 11:00:41 +000015253 if test "$USE_THREAD_MODULE" != "#"
15254 then
15255 # If the above checks didn't disable threads, (at least) OSF1
15256 # needs this '-threads' argument during linking.
15257 case $ac_sys_system in
15258 OSF1) LDLAST=-threads;;
15259 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015260 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015261fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015262
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015263if test "$posix_threads" = "yes"; then
15264 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015265
15266cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015267#define _POSIX_THREADS 1
15268_ACEOF
15269
15270 fi
15271
15272 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15273 case $ac_sys_system/$ac_sys_release in
15274 SunOS/5.6)
15275cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015276#define HAVE_PTHREAD_DESTRUCTOR 1
15277_ACEOF
15278
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015279 ;;
15280 SunOS/5.8)
15281cat >>confdefs.h <<\_ACEOF
15282#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15283_ACEOF
15284
15285 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015286 AIX/5)
15287cat >>confdefs.h <<\_ACEOF
15288#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15289_ACEOF
15290
15291 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015292 esac
15293
Antoine Pitroub52ec782009-01-25 16:34:23 +000015294 { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15295$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015296 if test "${ac_cv_pthread_system_supported+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000015297 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015298else
15299 if test "$cross_compiling" = yes; then
15300 ac_cv_pthread_system_supported=no
15301else
15302 cat >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öwis4ee6eef2003-05-26 05:37:51 +000015308#include <pthread.h>
15309 void *foo(void *parm) {
15310 return NULL;
15311 }
15312 main() {
15313 pthread_attr_t attr;
15314 pthread_t id;
15315 if (pthread_attr_init(&attr)) exit(-1);
15316 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15317 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15318 exit(0);
15319 }
15320_ACEOF
15321rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015322if { (ac_try="$ac_link"
15323case "(($ac_try" in
15324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15325 *) ac_try_echo=$ac_try;;
15326esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015327eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15328$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015329 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015330 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000015331 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333 { (case "(($ac_try" in
15334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15335 *) ac_try_echo=$ac_try;;
15336esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015337eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15338$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015339 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015340 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000015341 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015342 (exit $ac_status); }; }; then
15343 ac_cv_pthread_system_supported=yes
15344else
Antoine Pitroub52ec782009-01-25 16:34:23 +000015345 $as_echo "$as_me: program exited with status $ac_status" >&5
15346$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015347sed 's/^/| /' conftest.$ac_ext >&5
15348
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015349( exit $ac_status )
15350ac_cv_pthread_system_supported=no
15351fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000015352rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015353rm -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 +000015354fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015355
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015356
15357
Guido van Rossum627b2d71993-12-24 10:39:16 +000015358fi
15359
Antoine Pitroub52ec782009-01-25 16:34:23 +000015360 { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15361$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015362 if test "$ac_cv_pthread_system_supported" = "yes"; then
15363
15364cat >>confdefs.h <<\_ACEOF
15365#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15366_ACEOF
15367
15368 fi
15369
15370for ac_func in pthread_sigmask
15371do
Antoine Pitroub52ec782009-01-25 16:34:23 +000015372as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15373{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
15374$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015375if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000015376 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015377else
15378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015379/* confdefs.h. */
15380_ACEOF
15381cat confdefs.h >>conftest.$ac_ext
15382cat >>conftest.$ac_ext <<_ACEOF
15383/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015384/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15385 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15386#define $ac_func innocuous_$ac_func
15387
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015388/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015389 which can conflict with char $ac_func (); below.
15390 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015391 <limits.h> exists even on freestanding compilers. */
15392
15393#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015394# include <limits.h>
15395#else
15396# include <assert.h>
15397#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015398
15399#undef $ac_func
15400
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015401/* Override any GCC internal prototype to avoid an error.
15402 Use char because int might match the return type of a GCC
15403 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015404#ifdef __cplusplus
15405extern "C"
15406#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015407char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015408/* The GNU C library defines this for functions which it implements
15409 to always fail with ENOSYS. Some functions are actually named
15410 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015411#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015412choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015413#endif
15414
Skip Montanaro6dead952003-09-25 14:50:04 +000015415int
15416main ()
15417{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015418return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015419 ;
15420 return 0;
15421}
15422_ACEOF
15423rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015424if { (ac_try="$ac_link"
15425case "(($ac_try" in
15426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15427 *) ac_try_echo=$ac_try;;
15428esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015429eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15430$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015431 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015432 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015433 grep -v '^ *+' conftest.er1 >conftest.err
15434 rm -f conftest.er1
15435 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000015436 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437 (exit $ac_status); } && {
15438 test -z "$ac_c_werror_flag" ||
15439 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000015440 } && test -s conftest$ac_exeext && {
15441 test "$cross_compiling" = yes ||
15442 $as_test_x conftest$ac_exeext
15443 }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015444 eval "$as_ac_var=yes"
15445else
Antoine Pitroub52ec782009-01-25 16:34:23 +000015446 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015447sed 's/^/| /' conftest.$ac_ext >&5
15448
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015449 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015451
Antoine Pitroub52ec782009-01-25 16:34:23 +000015452rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015453rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015454 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015455fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000015456ac_res=`eval 'as_val=${'$as_ac_var'}
15457 $as_echo "$as_val"'`
15458 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
15459$as_echo "$ac_res" >&6; }
15460as_val=`eval 'as_val=${'$as_ac_var'}
15461 $as_echo "$as_val"'`
15462 if test "x$as_val" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015463 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000015464#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015465_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015466 case $ac_sys_system in
15467 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015468
Jason Tishlerfac083d2003-07-22 15:20:49 +000015469cat >>confdefs.h <<\_ACEOF
15470#define HAVE_BROKEN_PTHREAD_SIGMASK 1
15471_ACEOF
15472
15473 ;;
15474 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015475fi
15476done
15477
15478fi
15479
15480
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015481# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000015482
15483
Antoine Pitroub52ec782009-01-25 16:34:23 +000015484{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
15485$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015486# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015487if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015488 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015489 no)
Antoine Pitroub52ec782009-01-25 16:34:23 +000015490 { $as_echo "$as_me:$LINENO: result: no" >&5
15491$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015492 ipv6=no
15493 ;;
Antoine Pitroub52ec782009-01-25 16:34:23 +000015494 *) { $as_echo "$as_me:$LINENO: result: yes" >&5
15495$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015496 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015497#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015498_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015499
15500 ipv6=yes
15501 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015503else
Martin v. Löwis11437992002-04-12 09:54:03 +000015504
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015505 if test "$cross_compiling" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000015506 { $as_echo "$as_me:$LINENO: result: no" >&5
15507$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015508 ipv6=no
15509
15510else
Martin v. Löwis11437992002-04-12 09:54:03 +000015511 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015512/* confdefs.h. */
15513_ACEOF
15514cat confdefs.h >>conftest.$ac_ext
15515cat >>conftest.$ac_ext <<_ACEOF
15516/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015517 /* AF_INET6 available check */
15518#include <sys/types.h>
15519#include <sys/socket.h>
15520main()
15521{
15522 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
15523 exit(1);
15524 else
15525 exit(0);
15526}
15527
Martin v. Löwis11437992002-04-12 09:54:03 +000015528_ACEOF
15529rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015530if { (ac_try="$ac_link"
15531case "(($ac_try" in
15532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15533 *) ac_try_echo=$ac_try;;
15534esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015535eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15536$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015538 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000015539 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015541 { (case "(($ac_try" in
15542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15543 *) ac_try_echo=$ac_try;;
15544esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015545eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15546$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015547 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015548 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000015549 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000015550 (exit $ac_status); }; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000015551 { $as_echo "$as_me:$LINENO: result: yes" >&5
15552$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015553 ipv6=yes
15554else
Antoine Pitroub52ec782009-01-25 16:34:23 +000015555 $as_echo "$as_me: program exited with status $ac_status" >&5
15556$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015557sed 's/^/| /' conftest.$ac_ext >&5
15558
Martin v. Löwis11437992002-04-12 09:54:03 +000015559( exit $ac_status )
Antoine Pitroub52ec782009-01-25 16:34:23 +000015560{ $as_echo "$as_me:$LINENO: result: no" >&5
15561$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015562 ipv6=no
15563fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000015564rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565rm -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 +000015566fi
15567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015568
15569
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015570if test "$ipv6" = "yes"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000015571 { $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
15572$as_echo_n "checking if RFC2553 API is available... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015573 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015574/* confdefs.h. */
15575_ACEOF
15576cat confdefs.h >>conftest.$ac_ext
15577cat >>conftest.$ac_ext <<_ACEOF
15578/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015579#include <sys/types.h>
15580#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015581int
15582main ()
15583{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015584struct sockaddr_in6 x;
15585x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000015586 ;
15587 return 0;
15588}
15589_ACEOF
15590rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015591if { (ac_try="$ac_compile"
15592case "(($ac_try" in
15593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15594 *) ac_try_echo=$ac_try;;
15595esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015596eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15597$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015600 grep -v '^ *+' conftest.er1 >conftest.err
15601 rm -f conftest.er1
15602 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000015603 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015604 (exit $ac_status); } && {
15605 test -z "$ac_c_werror_flag" ||
15606 test ! -s conftest.err
15607 } && test -s conftest.$ac_objext; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000015608 { $as_echo "$as_me:$LINENO: result: yes" >&5
15609$as_echo "yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015610 ipv6=yes
15611else
Antoine Pitroub52ec782009-01-25 16:34:23 +000015612 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015613sed 's/^/| /' conftest.$ac_ext >&5
15614
Antoine Pitroub52ec782009-01-25 16:34:23 +000015615 { $as_echo "$as_me:$LINENO: result: no" >&5
15616$as_echo "no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015617 ipv6=no
15618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015619
15620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015621fi
15622
15623if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015624 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015625#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015626_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000015627
15628fi
15629
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015630fi
15631
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015632
15633ipv6type=unknown
15634ipv6lib=none
15635ipv6trylibc=no
15636
15637if test "$ipv6" = "yes"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000015638 { $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5
15639$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000015640 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
15641 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015642 case $i in
15643 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000015644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015645/* confdefs.h. */
15646_ACEOF
15647cat confdefs.h >>conftest.$ac_ext
15648cat >>conftest.$ac_ext <<_ACEOF
15649/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015650
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015651#include <netinet/in.h>
15652#ifdef IPV6_INRIA_VERSION
15653yes
15654#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015655_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015656if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015657 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015658 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015659fi
15660rm -f conftest*
15661
15662 ;;
15663 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015665/* confdefs.h. */
15666_ACEOF
15667cat confdefs.h >>conftest.$ac_ext
15668cat >>conftest.$ac_ext <<_ACEOF
15669/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015670
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015671#include <netinet/in.h>
15672#ifdef __KAME__
15673yes
15674#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015675_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015676if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015677 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015678 ipv6type=$i;
15679 ipv6lib=inet6
15680 ipv6libdir=/usr/local/v6/lib
15681 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015682fi
15683rm -f conftest*
15684
15685 ;;
15686 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000015687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015688/* confdefs.h. */
15689_ACEOF
15690cat confdefs.h >>conftest.$ac_ext
15691cat >>conftest.$ac_ext <<_ACEOF
15692/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015693
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015694#include <features.h>
15695#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
15696yes
15697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015698_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015699if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015700 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015701 ipv6type=$i;
15702 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015703fi
15704rm -f conftest*
15705
15706 ;;
15707 linux-inet6)
15708 if test -d /usr/inet6; then
15709 ipv6type=$i
15710 ipv6lib=inet6
15711 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000015712 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015713 fi
15714 ;;
15715 solaris)
15716 if test -f /etc/netconfig; then
15717 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
15718 ipv6type=$i
15719 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015720 fi
15721 fi
15722 ;;
15723 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000015724 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015725/* confdefs.h. */
15726_ACEOF
15727cat confdefs.h >>conftest.$ac_ext
15728cat >>conftest.$ac_ext <<_ACEOF
15729/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015730
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015731#include <sys/param.h>
15732#ifdef _TOSHIBA_INET6
15733yes
15734#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015735_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015736if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015737 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015738 ipv6type=$i;
15739 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015740 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015741fi
15742rm -f conftest*
15743
15744 ;;
15745 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000015746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015747/* confdefs.h. */
15748_ACEOF
15749cat confdefs.h >>conftest.$ac_ext
15750cat >>conftest.$ac_ext <<_ACEOF
15751/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015752
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015753#include </usr/local/v6/include/sys/v6config.h>
15754#ifdef __V6D__
15755yes
15756#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015757_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015758if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015759 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015760 ipv6type=$i;
15761 ipv6lib=v6;
15762 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000015763 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015764fi
15765rm -f conftest*
15766
15767 ;;
15768 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015770/* confdefs.h. */
15771_ACEOF
15772cat confdefs.h >>conftest.$ac_ext
15773cat >>conftest.$ac_ext <<_ACEOF
15774/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015775
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015776#include <sys/param.h>
15777#ifdef _ZETA_MINAMI_INET6
15778yes
15779#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015780_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015781if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015782 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015783 ipv6type=$i;
15784 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000015785 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015786fi
15787rm -f conftest*
15788
15789 ;;
15790 esac
15791 if test "$ipv6type" != "unknown"; then
15792 break
15793 fi
15794 done
Antoine Pitroub52ec782009-01-25 16:34:23 +000015795 { $as_echo "$as_me:$LINENO: result: $ipv6type" >&5
15796$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000015797fi
15798
15799if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
15800 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
15801 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
15802 echo "using lib$ipv6lib"
15803 else
15804 if test $ipv6trylibc = "yes"; then
15805 echo "using libc"
15806 else
15807 echo 'Fatal: no $ipv6lib library found. cannot continue.'
15808 echo "You need to fetch lib$ipv6lib.a from appropriate"
15809 echo 'ipv6 kit and compile beforehand.'
15810 exit 1
15811 fi
15812 fi
15813fi
15814
Antoine Pitroub52ec782009-01-25 16:34:23 +000015815{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
15816$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015817cat >conftest.$ac_ext <<_ACEOF
15818/* confdefs.h. */
15819_ACEOF
15820cat confdefs.h >>conftest.$ac_ext
15821cat >>conftest.$ac_ext <<_ACEOF
15822/* end confdefs.h. */
15823#include <Carbon/Carbon.h>
15824int
15825main ()
15826{
15827FSIORefNum fRef = 0
15828 ;
15829 return 0;
15830}
15831_ACEOF
15832rm -f conftest.$ac_objext
15833if { (ac_try="$ac_compile"
15834case "(($ac_try" in
15835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15836 *) ac_try_echo=$ac_try;;
15837esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000015838eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15839$as_echo "$ac_try_echo") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015840 (eval "$ac_compile") 2>conftest.er1
15841 ac_status=$?
15842 grep -v '^ *+' conftest.er1 >conftest.err
15843 rm -f conftest.er1
15844 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000015845 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015846 (exit $ac_status); } && {
15847 test -z "$ac_c_werror_flag" ||
15848 test ! -s conftest.err
15849 } && test -s conftest.$ac_objext; then
15850
15851cat >>confdefs.h <<\_ACEOF
15852#define HAVE_OSX105_SDK 1
15853_ACEOF
15854
Antoine Pitroub52ec782009-01-25 16:34:23 +000015855 { $as_echo "$as_me:$LINENO: result: yes" >&5
15856$as_echo "yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015857else
Antoine Pitroub52ec782009-01-25 16:34:23 +000015858 $as_echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015859sed 's/^/| /' conftest.$ac_ext >&5
15860
Antoine Pitroub52ec782009-01-25 16:34:23 +000015861 { $as_echo "$as_me:$LINENO: result: no" >&5
15862$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000015863
15864fi
15865
15866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15867
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015868# Check for --with-doc-strings
Antoine Pitroub52ec782009-01-25 16:34:23 +000015869{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
15870$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015871
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015872# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015873if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015874 withval=$with_doc_strings;
15875fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015876
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015877
15878if test -z "$with_doc_strings"
15879then with_doc_strings="yes"
15880fi
15881if test "$with_doc_strings" != "no"
15882then
15883
15884cat >>confdefs.h <<\_ACEOF
15885#define WITH_DOC_STRINGS 1
15886_ACEOF
15887
15888fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000015889{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5
15890$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000015891
Neil Schemenauera35c6882001-02-27 04:45:05 +000015892# Check for Python-specific malloc support
Antoine Pitroub52ec782009-01-25 16:34:23 +000015893{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5
15894$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015896# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015897if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015898 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015899if test "$withval" != no
15900then
15901
15902cat >>confdefs.h <<\_ACEOF
15903#define WITH_TSC 1
15904_ACEOF
15905
Antoine Pitroub52ec782009-01-25 16:34:23 +000015906 { $as_echo "$as_me:$LINENO: result: yes" >&5
15907$as_echo "yes" >&6; }
15908else { $as_echo "$as_me:$LINENO: result: no" >&5
15909$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015910fi
15911else
Antoine Pitroub52ec782009-01-25 16:34:23 +000015912 { $as_echo "$as_me:$LINENO: result: no" >&5
15913$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015914fi
15915
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000015916
15917# Check for Python-specific malloc support
Antoine Pitroub52ec782009-01-25 16:34:23 +000015918{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
15919$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015921# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000015922if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015923 withval=$with_pymalloc;
15924fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015925
Neil Schemenauera35c6882001-02-27 04:45:05 +000015926
Neil Schemenauer16c22972002-03-22 15:34:49 +000015927if test -z "$with_pymalloc"
15928then with_pymalloc="yes"
15929fi
15930if test "$with_pymalloc" != "no"
15931then
Martin v. Löwis11437992002-04-12 09:54:03 +000015932
15933cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015934#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015935_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000015936
15937fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000015938{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5
15939$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000015940
Barry Warsawef82cd72000-06-30 16:21:01 +000015941# Check for --with-wctype-functions
Antoine Pitroub52ec782009-01-25 16:34:23 +000015942{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
15943$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015945# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000015946if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015947 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000015948if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000015949then
15950
15951cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000015952#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015953_ACEOF
15954
Antoine Pitroub52ec782009-01-25 16:34:23 +000015955 { $as_echo "$as_me:$LINENO: result: yes" >&5
15956$as_echo "yes" >&6; }
15957else { $as_echo "$as_me:$LINENO: result: no" >&5
15958$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000015959fi
15960else
Antoine Pitroub52ec782009-01-25 16:34:23 +000015961 { $as_echo "$as_me:$LINENO: result: no" >&5
15962$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015963fi
15964
Barry Warsawef82cd72000-06-30 16:21:01 +000015965
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015966# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000015967
Guido van Rossum98935bf2001-09-05 19:13:16 +000015968DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000015969
Guido van Rossume97ee181999-12-20 21:27:22 +000015970# the dlopen() function means we might want to use dynload_shlib.o. some
15971# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000015972
Thomas Wouters3a584202000-08-05 23:28:51 +000015973for ac_func in dlopen
15974do
Antoine Pitroub52ec782009-01-25 16:34:23 +000015975as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15976{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
15977$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015978if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000015979 $as_echo_n "(cached) " >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000015980else
Martin v. Löwis11437992002-04-12 09:54:03 +000015981 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015982/* confdefs.h. */
15983_ACEOF
15984cat confdefs.h >>conftest.$ac_ext
15985cat >>conftest.$ac_ext <<_ACEOF
15986/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015987/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15988 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15989#define $ac_func innocuous_$ac_func
15990
Guido van Rossume97ee181999-12-20 21:27:22 +000015991/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015992 which can conflict with char $ac_func (); below.
15993 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015994 <limits.h> exists even on freestanding compilers. */
15995
15996#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015997# include <limits.h>
15998#else
15999# include <assert.h>
16000#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016001
16002#undef $ac_func
16003
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016004/* Override any GCC internal prototype to avoid an error.
16005 Use char because int might match the return type of a GCC
16006 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016007#ifdef __cplusplus
16008extern "C"
16009#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016010char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016011/* The GNU C library defines this for functions which it implements
16012 to always fail with ENOSYS. Some functions are actually named
16013 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016014#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016015choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016016#endif
16017
Skip Montanaro6dead952003-09-25 14:50:04 +000016018int
16019main ()
16020{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016021return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016022 ;
16023 return 0;
16024}
16025_ACEOF
16026rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016027if { (ac_try="$ac_link"
16028case "(($ac_try" in
16029 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16030 *) ac_try_echo=$ac_try;;
16031esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016032eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16033$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016034 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016035 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016036 grep -v '^ *+' conftest.er1 >conftest.err
16037 rm -f conftest.er1
16038 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016039 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016040 (exit $ac_status); } && {
16041 test -z "$ac_c_werror_flag" ||
16042 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000016043 } && test -s conftest$ac_exeext && {
16044 test "$cross_compiling" = yes ||
16045 $as_test_x conftest$ac_exeext
16046 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016047 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016048else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016049 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016050sed 's/^/| /' conftest.$ac_ext >&5
16051
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016052 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016053fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016054
Antoine Pitroub52ec782009-01-25 16:34:23 +000016055rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016056rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016057 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016058fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000016059ac_res=`eval 'as_val=${'$as_ac_var'}
16060 $as_echo "$as_val"'`
16061 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16062$as_echo "$ac_res" >&6; }
16063as_val=`eval 'as_val=${'$as_ac_var'}
16064 $as_echo "$as_val"'`
16065 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000016067#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016068_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016069
Guido van Rossume97ee181999-12-20 21:27:22 +000016070fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016071done
Guido van Rossume97ee181999-12-20 21:27:22 +000016072
Michael W. Hudson54241132001-12-07 15:38:26 +000016073
Guido van Rossume97ee181999-12-20 21:27:22 +000016074# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16075# loading of modules.
16076
Antoine Pitroub52ec782009-01-25 16:34:23 +000016077{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16078$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016079if test -z "$DYNLOADFILE"
16080then
16081 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016082 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16083 if test "$ac_cv_func_dlopen" = yes
16084 then DYNLOADFILE="dynload_shlib.o"
16085 else DYNLOADFILE="dynload_aix.o"
16086 fi
16087 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016088 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016089 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16090 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016091 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016092 *)
16093 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16094 # out any dynamic loading
16095 if test "$ac_cv_func_dlopen" = yes
16096 then DYNLOADFILE="dynload_shlib.o"
16097 else DYNLOADFILE="dynload_stub.o"
16098 fi
16099 ;;
16100 esac
16101fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000016102{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16103$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016104if test "$DYNLOADFILE" != "dynload_stub.o"
16105then
Martin v. Löwis11437992002-04-12 09:54:03 +000016106
16107cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016108#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016109_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016110
16111fi
16112
Neil Schemenauer4e425612001-06-19 15:44:15 +000016113# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16114
Michael W. Hudson54241132001-12-07 15:38:26 +000016115
Antoine Pitroub52ec782009-01-25 16:34:23 +000016116{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16117$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016118if test -z "$MACHDEP_OBJS"
16119then
Jack Jansene578a632001-08-15 01:27:14 +000016120 MACHDEP_OBJS=$extra_machdep_objs
16121else
16122 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016123fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000016124{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16125$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016126
Guido van Rossum627b2d71993-12-24 10:39:16 +000016127# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016128
16129
16130
16131
16132
16133
16134
16135
16136
16137
16138
16139
16140
16141
16142
16143
16144
16145
16146
16147
16148
16149
16150
16151
16152
16153
16154
16155
16156
16157
16158
16159
16160
16161
16162
16163
16164
16165
16166
16167
16168
16169
16170
16171
16172
16173
16174
16175
16176
16177
16178
16179
16180
16181
16182
16183
16184
16185
16186
16187
16188
16189
16190
16191
16192
16193
16194
16195
16196
16197
16198
Martin v. Löwisd6320502004-08-12 13:45:08 +000016199
Martin v. Löwisc3001752005-01-23 09:27:24 +000016200
16201
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016202
16203
Thomas Wouterscf297e42007-02-23 15:07:44 +000016204
16205
Gregory P. Smith25523d22007-09-03 16:44:55 +000016206
Christian Heimes4e30a842007-11-30 22:12:06 +000016207
Martin v. Löwis92fab752008-03-08 10:40:41 +000016208
Martin v. Löwis823725e2008-03-24 13:39:54 +000016209
16210
16211for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16212 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016213 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016214 getpriority getpwent getspnam getspent getsid getwd \
Christian Heimesd0764e22007-12-04 15:00:33 +000016215 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016216 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016217 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016218 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016219 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016220 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016221 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis92fab752008-03-08 10:40:41 +000016222 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016223do
Antoine Pitroub52ec782009-01-25 16:34:23 +000016224as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16225{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16226$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016227if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000016228 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016229else
Martin v. Löwis11437992002-04-12 09:54:03 +000016230 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016231/* confdefs.h. */
16232_ACEOF
16233cat confdefs.h >>conftest.$ac_ext
16234cat >>conftest.$ac_ext <<_ACEOF
16235/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016236/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16237 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16238#define $ac_func innocuous_$ac_func
16239
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016240/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016241 which can conflict with char $ac_func (); below.
16242 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016243 <limits.h> exists even on freestanding compilers. */
16244
16245#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016246# include <limits.h>
16247#else
16248# include <assert.h>
16249#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016250
16251#undef $ac_func
16252
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016253/* Override any GCC internal prototype to avoid an error.
16254 Use char because int might match the return type of a GCC
16255 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016256#ifdef __cplusplus
16257extern "C"
16258#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016259char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016260/* The GNU C library defines this for functions which it implements
16261 to always fail with ENOSYS. Some functions are actually named
16262 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016264choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016265#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016266
Skip Montanaro6dead952003-09-25 14:50:04 +000016267int
16268main ()
16269{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016270return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016271 ;
16272 return 0;
16273}
16274_ACEOF
16275rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016276if { (ac_try="$ac_link"
16277case "(($ac_try" in
16278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16279 *) ac_try_echo=$ac_try;;
16280esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016281eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16282$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016283 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016284 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016285 grep -v '^ *+' conftest.er1 >conftest.err
16286 rm -f conftest.er1
16287 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016288 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016289 (exit $ac_status); } && {
16290 test -z "$ac_c_werror_flag" ||
16291 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000016292 } && test -s conftest$ac_exeext && {
16293 test "$cross_compiling" = yes ||
16294 $as_test_x conftest$ac_exeext
16295 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016296 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016297else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016298 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016299sed 's/^/| /' conftest.$ac_ext >&5
16300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016301 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016303
Antoine Pitroub52ec782009-01-25 16:34:23 +000016304rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016305rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016306 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016307fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000016308ac_res=`eval 'as_val=${'$as_ac_var'}
16309 $as_echo "$as_val"'`
16310 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16311$as_echo "$ac_res" >&6; }
16312as_val=`eval 'as_val=${'$as_ac_var'}
16313 $as_echo "$as_val"'`
16314 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016315 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000016316#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016317_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016318
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016319fi
16320done
16321
Michael W. Hudson54241132001-12-07 15:38:26 +000016322
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016323# For some functions, having a definition is not sufficient, since
16324# we want to take their address.
Antoine Pitroub52ec782009-01-25 16:34:23 +000016325{ $as_echo "$as_me:$LINENO: checking for chroot" >&5
16326$as_echo_n "checking for chroot... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016327cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016328/* confdefs.h. */
16329_ACEOF
16330cat confdefs.h >>conftest.$ac_ext
16331cat >>conftest.$ac_ext <<_ACEOF
16332/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016333#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016334int
16335main ()
16336{
16337void *x=chroot
16338 ;
16339 return 0;
16340}
16341_ACEOF
16342rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343if { (ac_try="$ac_compile"
16344case "(($ac_try" in
16345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16346 *) ac_try_echo=$ac_try;;
16347esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016348eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16349$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016350 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016351 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016352 grep -v '^ *+' conftest.er1 >conftest.err
16353 rm -f conftest.er1
16354 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016355 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016356 (exit $ac_status); } && {
16357 test -z "$ac_c_werror_flag" ||
16358 test ! -s conftest.err
16359 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016360
16361cat >>confdefs.h <<\_ACEOF
16362#define HAVE_CHROOT 1
16363_ACEOF
16364
Antoine Pitroub52ec782009-01-25 16:34:23 +000016365 { $as_echo "$as_me:$LINENO: result: yes" >&5
16366$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016367else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016368 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016369sed 's/^/| /' conftest.$ac_ext >&5
16370
Antoine Pitroub52ec782009-01-25 16:34:23 +000016371 { $as_echo "$as_me:$LINENO: result: no" >&5
16372$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016373
16374fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016375
16376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000016377{ $as_echo "$as_me:$LINENO: checking for link" >&5
16378$as_echo_n "checking for link... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016379cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016380/* confdefs.h. */
16381_ACEOF
16382cat confdefs.h >>conftest.$ac_ext
16383cat >>conftest.$ac_ext <<_ACEOF
16384/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016385#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016386int
16387main ()
16388{
16389void *x=link
16390 ;
16391 return 0;
16392}
16393_ACEOF
16394rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016395if { (ac_try="$ac_compile"
16396case "(($ac_try" in
16397 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16398 *) ac_try_echo=$ac_try;;
16399esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016400eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16401$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016402 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016403 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016404 grep -v '^ *+' conftest.er1 >conftest.err
16405 rm -f conftest.er1
16406 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016407 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408 (exit $ac_status); } && {
16409 test -z "$ac_c_werror_flag" ||
16410 test ! -s conftest.err
16411 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016412
16413cat >>confdefs.h <<\_ACEOF
16414#define HAVE_LINK 1
16415_ACEOF
16416
Antoine Pitroub52ec782009-01-25 16:34:23 +000016417 { $as_echo "$as_me:$LINENO: result: yes" >&5
16418$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016419else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016420 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016421sed 's/^/| /' conftest.$ac_ext >&5
16422
Antoine Pitroub52ec782009-01-25 16:34:23 +000016423 { $as_echo "$as_me:$LINENO: result: no" >&5
16424$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016425
16426fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016427
16428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000016429{ $as_echo "$as_me:$LINENO: checking for symlink" >&5
16430$as_echo_n "checking for symlink... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016431cat >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öwisc8ad7cc2002-11-11 13:23:45 +000016437#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016438int
16439main ()
16440{
16441void *x=symlink
16442 ;
16443 return 0;
16444}
16445_ACEOF
16446rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016447if { (ac_try="$ac_compile"
16448case "(($ac_try" in
16449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16450 *) ac_try_echo=$ac_try;;
16451esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016452eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16453$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016455 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016456 grep -v '^ *+' conftest.er1 >conftest.err
16457 rm -f conftest.er1
16458 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016459 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016460 (exit $ac_status); } && {
16461 test -z "$ac_c_werror_flag" ||
16462 test ! -s conftest.err
16463 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016464
16465cat >>confdefs.h <<\_ACEOF
16466#define HAVE_SYMLINK 1
16467_ACEOF
16468
Antoine Pitroub52ec782009-01-25 16:34:23 +000016469 { $as_echo "$as_me:$LINENO: result: yes" >&5
16470$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016471else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016472 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016473sed 's/^/| /' conftest.$ac_ext >&5
16474
Antoine Pitroub52ec782009-01-25 16:34:23 +000016475 { $as_echo "$as_me:$LINENO: result: no" >&5
16476$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016477
16478fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016479
16480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000016481{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5
16482$as_echo_n "checking for fchdir... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016483cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016484/* confdefs.h. */
16485_ACEOF
16486cat confdefs.h >>conftest.$ac_ext
16487cat >>conftest.$ac_ext <<_ACEOF
16488/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016489#include <unistd.h>
16490int
16491main ()
16492{
16493void *x=fchdir
16494 ;
16495 return 0;
16496}
16497_ACEOF
16498rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016499if { (ac_try="$ac_compile"
16500case "(($ac_try" in
16501 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16502 *) ac_try_echo=$ac_try;;
16503esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016504eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16505$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016506 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016507 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016508 grep -v '^ *+' conftest.er1 >conftest.err
16509 rm -f conftest.er1
16510 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016511 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016512 (exit $ac_status); } && {
16513 test -z "$ac_c_werror_flag" ||
16514 test ! -s conftest.err
16515 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016516
16517cat >>confdefs.h <<\_ACEOF
16518#define HAVE_FCHDIR 1
16519_ACEOF
16520
Antoine Pitroub52ec782009-01-25 16:34:23 +000016521 { $as_echo "$as_me:$LINENO: result: yes" >&5
16522$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016523else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016524 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016525sed 's/^/| /' conftest.$ac_ext >&5
16526
Antoine Pitroub52ec782009-01-25 16:34:23 +000016527 { $as_echo "$as_me:$LINENO: result: no" >&5
16528$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016529
16530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531
16532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000016533{ $as_echo "$as_me:$LINENO: checking for fsync" >&5
16534$as_echo_n "checking for fsync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016535cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016536/* confdefs.h. */
16537_ACEOF
16538cat confdefs.h >>conftest.$ac_ext
16539cat >>conftest.$ac_ext <<_ACEOF
16540/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016541#include <unistd.h>
16542int
16543main ()
16544{
16545void *x=fsync
16546 ;
16547 return 0;
16548}
16549_ACEOF
16550rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016551if { (ac_try="$ac_compile"
16552case "(($ac_try" in
16553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16554 *) ac_try_echo=$ac_try;;
16555esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016556eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16557$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016560 grep -v '^ *+' conftest.er1 >conftest.err
16561 rm -f conftest.er1
16562 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016563 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016564 (exit $ac_status); } && {
16565 test -z "$ac_c_werror_flag" ||
16566 test ! -s conftest.err
16567 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016568
16569cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016570#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016571_ACEOF
16572
Antoine Pitroub52ec782009-01-25 16:34:23 +000016573 { $as_echo "$as_me:$LINENO: result: yes" >&5
16574$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016575else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016576 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016577sed 's/^/| /' conftest.$ac_ext >&5
16578
Antoine Pitroub52ec782009-01-25 16:34:23 +000016579 { $as_echo "$as_me:$LINENO: result: no" >&5
16580$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016581
16582fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016583
16584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000016585{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5
16586$as_echo_n "checking for fdatasync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016587cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016588/* confdefs.h. */
16589_ACEOF
16590cat confdefs.h >>conftest.$ac_ext
16591cat >>conftest.$ac_ext <<_ACEOF
16592/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016593#include <unistd.h>
16594int
16595main ()
16596{
16597void *x=fdatasync
16598 ;
16599 return 0;
16600}
16601_ACEOF
16602rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016603if { (ac_try="$ac_compile"
16604case "(($ac_try" in
16605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16606 *) ac_try_echo=$ac_try;;
16607esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016608eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16609$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016610 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016612 grep -v '^ *+' conftest.er1 >conftest.err
16613 rm -f conftest.er1
16614 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016615 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616 (exit $ac_status); } && {
16617 test -z "$ac_c_werror_flag" ||
16618 test ! -s conftest.err
16619 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016620
16621cat >>confdefs.h <<\_ACEOF
16622#define HAVE_FDATASYNC 1
16623_ACEOF
16624
Antoine Pitroub52ec782009-01-25 16:34:23 +000016625 { $as_echo "$as_me:$LINENO: result: yes" >&5
16626$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016627else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016628 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016629sed 's/^/| /' conftest.$ac_ext >&5
16630
Antoine Pitroub52ec782009-01-25 16:34:23 +000016631 { $as_echo "$as_me:$LINENO: result: no" >&5
16632$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000016633
16634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016635
16636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000016637{ $as_echo "$as_me:$LINENO: checking for epoll" >&5
16638$as_echo_n "checking for epoll... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016639cat >conftest.$ac_ext <<_ACEOF
16640/* confdefs.h. */
16641_ACEOF
16642cat confdefs.h >>conftest.$ac_ext
16643cat >>conftest.$ac_ext <<_ACEOF
16644/* end confdefs.h. */
16645#include <sys/epoll.h>
16646int
16647main ()
16648{
16649void *x=epoll_create
16650 ;
16651 return 0;
16652}
16653_ACEOF
16654rm -f conftest.$ac_objext
16655if { (ac_try="$ac_compile"
16656case "(($ac_try" in
16657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16658 *) ac_try_echo=$ac_try;;
16659esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016660eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16661$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016662 (eval "$ac_compile") 2>conftest.er1
16663 ac_status=$?
16664 grep -v '^ *+' conftest.er1 >conftest.err
16665 rm -f conftest.er1
16666 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016667 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016668 (exit $ac_status); } && {
16669 test -z "$ac_c_werror_flag" ||
16670 test ! -s conftest.err
16671 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016672
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016673cat >>confdefs.h <<\_ACEOF
16674#define HAVE_EPOLL 1
16675_ACEOF
16676
Antoine Pitroub52ec782009-01-25 16:34:23 +000016677 { $as_echo "$as_me:$LINENO: result: yes" >&5
16678$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016679else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016680 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016681sed 's/^/| /' conftest.$ac_ext >&5
16682
Antoine Pitroub52ec782009-01-25 16:34:23 +000016683 { $as_echo "$as_me:$LINENO: result: no" >&5
16684$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016685
16686fi
16687
16688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000016689{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5
16690$as_echo_n "checking for kqueue... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016691cat >conftest.$ac_ext <<_ACEOF
16692/* confdefs.h. */
16693_ACEOF
16694cat confdefs.h >>conftest.$ac_ext
16695cat >>conftest.$ac_ext <<_ACEOF
16696/* end confdefs.h. */
16697
16698#include <sys/types.h>
16699#include <sys/event.h>
16700
16701int
16702main ()
16703{
16704int x=kqueue()
16705 ;
16706 return 0;
16707}
16708_ACEOF
16709rm -f conftest.$ac_objext
16710if { (ac_try="$ac_compile"
16711case "(($ac_try" in
16712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16713 *) ac_try_echo=$ac_try;;
16714esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016715eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16716$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016717 (eval "$ac_compile") 2>conftest.er1
16718 ac_status=$?
16719 grep -v '^ *+' conftest.er1 >conftest.err
16720 rm -f conftest.er1
16721 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016722 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016723 (exit $ac_status); } && {
16724 test -z "$ac_c_werror_flag" ||
16725 test ! -s conftest.err
16726 } && test -s conftest.$ac_objext; then
16727
16728cat >>confdefs.h <<\_ACEOF
16729#define HAVE_KQUEUE 1
16730_ACEOF
16731
Antoine Pitroub52ec782009-01-25 16:34:23 +000016732 { $as_echo "$as_me:$LINENO: result: yes" >&5
16733$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016734else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016735 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016736sed 's/^/| /' conftest.$ac_ext >&5
16737
Antoine Pitroub52ec782009-01-25 16:34:23 +000016738 { $as_echo "$as_me:$LINENO: result: no" >&5
16739$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000016740
16741fi
16742
16743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000016744# On some systems (eg. FreeBSD 5), we would find a definition of the
16745# functions ctermid_r, setgroups in the library, but no prototype
16746# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
16747# address to avoid compiler warnings and potential miscompilations
16748# because of the missing prototypes.
16749
Antoine Pitroub52ec782009-01-25 16:34:23 +000016750{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5
16751$as_echo_n "checking for ctermid_r... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016752cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016753/* confdefs.h. */
16754_ACEOF
16755cat confdefs.h >>conftest.$ac_ext
16756cat >>conftest.$ac_ext <<_ACEOF
16757/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000016758
16759#include "confdefs.h"
16760#include <stdio.h>
16761
Martin v. Löwisd5843682002-11-21 20:41:28 +000016762int
16763main ()
16764{
16765void* p = ctermid_r
16766 ;
16767 return 0;
16768}
16769_ACEOF
16770rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016771if { (ac_try="$ac_compile"
16772case "(($ac_try" in
16773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16774 *) ac_try_echo=$ac_try;;
16775esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016776eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16777$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000016779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016780 grep -v '^ *+' conftest.er1 >conftest.err
16781 rm -f conftest.er1
16782 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016783 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016784 (exit $ac_status); } && {
16785 test -z "$ac_c_werror_flag" ||
16786 test ! -s conftest.err
16787 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000016788
16789cat >>confdefs.h <<\_ACEOF
16790#define HAVE_CTERMID_R 1
16791_ACEOF
16792
Antoine Pitroub52ec782009-01-25 16:34:23 +000016793 { $as_echo "$as_me:$LINENO: result: yes" >&5
16794$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016795else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016796 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016797sed 's/^/| /' conftest.$ac_ext >&5
16798
Antoine Pitroub52ec782009-01-25 16:34:23 +000016799 { $as_echo "$as_me:$LINENO: result: no" >&5
16800$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000016801
16802fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16805
Antoine Pitroub52ec782009-01-25 16:34:23 +000016806{ $as_echo "$as_me:$LINENO: checking for flock" >&5
16807$as_echo_n "checking for flock... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016808cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016809/* confdefs.h. */
16810_ACEOF
16811cat confdefs.h >>conftest.$ac_ext
16812cat >>conftest.$ac_ext <<_ACEOF
16813/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016814
16815#include "confdefs.h"
16816#include <sys/file.h>
16817
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016818int
16819main ()
16820{
16821void* p = flock
16822 ;
16823 return 0;
16824}
16825_ACEOF
16826rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016827if { (ac_try="$ac_compile"
16828case "(($ac_try" in
16829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16830 *) ac_try_echo=$ac_try;;
16831esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016832eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16833$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016834 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016835 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016836 grep -v '^ *+' conftest.er1 >conftest.err
16837 rm -f conftest.er1
16838 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016839 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016840 (exit $ac_status); } && {
16841 test -z "$ac_c_werror_flag" ||
16842 test ! -s conftest.err
16843 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016844
16845cat >>confdefs.h <<\_ACEOF
16846#define HAVE_FLOCK 1
16847_ACEOF
16848
Antoine Pitroub52ec782009-01-25 16:34:23 +000016849 { $as_echo "$as_me:$LINENO: result: yes" >&5
16850$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016851else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016852 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016853sed 's/^/| /' conftest.$ac_ext >&5
16854
Antoine Pitroub52ec782009-01-25 16:34:23 +000016855 { $as_echo "$as_me:$LINENO: result: no" >&5
16856$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016857
16858fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000016859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016860rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16861
Antoine Pitroub52ec782009-01-25 16:34:23 +000016862{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5
16863$as_echo_n "checking for getpagesize... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016864cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016865/* confdefs.h. */
16866_ACEOF
16867cat confdefs.h >>conftest.$ac_ext
16868cat >>conftest.$ac_ext <<_ACEOF
16869/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016870
16871#include "confdefs.h"
16872#include <unistd.h>
16873
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016874int
16875main ()
16876{
16877void* p = getpagesize
16878 ;
16879 return 0;
16880}
16881_ACEOF
16882rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883if { (ac_try="$ac_compile"
16884case "(($ac_try" in
16885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16886 *) ac_try_echo=$ac_try;;
16887esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016888eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16889$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016890 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016891 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016892 grep -v '^ *+' conftest.er1 >conftest.err
16893 rm -f conftest.er1
16894 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000016895 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016896 (exit $ac_status); } && {
16897 test -z "$ac_c_werror_flag" ||
16898 test ! -s conftest.err
16899 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016900
16901cat >>confdefs.h <<\_ACEOF
16902#define HAVE_GETPAGESIZE 1
16903_ACEOF
16904
Antoine Pitroub52ec782009-01-25 16:34:23 +000016905 { $as_echo "$as_me:$LINENO: result: yes" >&5
16906$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016907else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016908 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016909sed 's/^/| /' conftest.$ac_ext >&5
16910
Antoine Pitroub52ec782009-01-25 16:34:23 +000016911 { $as_echo "$as_me:$LINENO: result: no" >&5
16912$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016913
16914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016915
16916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000016917
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016918for ac_prog in true
16919do
16920 # Extract the first word of "$ac_prog", so it can be a program name with args.
16921set dummy $ac_prog; ac_word=$2
Antoine Pitroub52ec782009-01-25 16:34:23 +000016922{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
16923$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016924if test "${ac_cv_prog_TRUE+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000016925 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016926else
16927 if test -n "$TRUE"; then
16928 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
16929else
16930as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16931for as_dir in $PATH
16932do
16933 IFS=$as_save_IFS
16934 test -z "$as_dir" && as_dir=.
16935 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016936 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 +000016937 ac_cv_prog_TRUE="$ac_prog"
Antoine Pitroub52ec782009-01-25 16:34:23 +000016938 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016939 break 2
16940 fi
16941done
16942done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016943IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016944
16945fi
16946fi
16947TRUE=$ac_cv_prog_TRUE
16948if test -n "$TRUE"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000016949 { $as_echo "$as_me:$LINENO: result: $TRUE" >&5
16950$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016951else
Antoine Pitroub52ec782009-01-25 16:34:23 +000016952 { $as_echo "$as_me:$LINENO: result: no" >&5
16953$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016954fi
16955
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016956
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016957 test -n "$TRUE" && break
16958done
16959test -n "$TRUE" || TRUE="/bin/true"
16960
16961
Antoine Pitroub52ec782009-01-25 16:34:23 +000016962{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
16963$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016964if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000016965 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016966else
16967 ac_check_lib_save_LIBS=$LIBS
16968LIBS="-lc $LIBS"
16969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016970/* confdefs.h. */
16971_ACEOF
16972cat confdefs.h >>conftest.$ac_ext
16973cat >>conftest.$ac_ext <<_ACEOF
16974/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016976/* Override any GCC internal prototype to avoid an error.
16977 Use char because int might match the return type of a GCC
16978 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016979#ifdef __cplusplus
16980extern "C"
16981#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016982char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016983int
16984main ()
16985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016986return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000016987 ;
16988 return 0;
16989}
16990_ACEOF
16991rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016992if { (ac_try="$ac_link"
16993case "(($ac_try" in
16994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16995 *) ac_try_echo=$ac_try;;
16996esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000016997eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16998$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016999 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017001 grep -v '^ *+' conftest.er1 >conftest.err
17002 rm -f conftest.er1
17003 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017004 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017005 (exit $ac_status); } && {
17006 test -z "$ac_c_werror_flag" ||
17007 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000017008 } && test -s conftest$ac_exeext && {
17009 test "$cross_compiling" = yes ||
17010 $as_test_x conftest$ac_exeext
17011 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017012 ac_cv_lib_c_inet_aton=yes
17013else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017014 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017015sed 's/^/| /' conftest.$ac_ext >&5
17016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017017 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017018fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017019
Antoine Pitroub52ec782009-01-25 16:34:23 +000017020rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017021rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017022 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017023LIBS=$ac_check_lib_save_LIBS
17024fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000017025{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17026$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
17027if test "x$ac_cv_lib_c_inet_aton" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017028 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017029else
17030
Antoine Pitroub52ec782009-01-25 16:34:23 +000017031{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17032$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017033if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000017034 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017035else
17036 ac_check_lib_save_LIBS=$LIBS
17037LIBS="-lresolv $LIBS"
17038cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017039/* confdefs.h. */
17040_ACEOF
17041cat confdefs.h >>conftest.$ac_ext
17042cat >>conftest.$ac_ext <<_ACEOF
17043/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017045/* Override any GCC internal prototype to avoid an error.
17046 Use char because int might match the return type of a GCC
17047 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017048#ifdef __cplusplus
17049extern "C"
17050#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017051char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017052int
17053main ()
17054{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017055return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017056 ;
17057 return 0;
17058}
17059_ACEOF
17060rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017061if { (ac_try="$ac_link"
17062case "(($ac_try" in
17063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17064 *) ac_try_echo=$ac_try;;
17065esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017066eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17067$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017070 grep -v '^ *+' conftest.er1 >conftest.err
17071 rm -f conftest.er1
17072 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017073 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017074 (exit $ac_status); } && {
17075 test -z "$ac_c_werror_flag" ||
17076 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000017077 } && test -s conftest$ac_exeext && {
17078 test "$cross_compiling" = yes ||
17079 $as_test_x conftest$ac_exeext
17080 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017081 ac_cv_lib_resolv_inet_aton=yes
17082else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017083 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017084sed 's/^/| /' conftest.$ac_ext >&5
17085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017086 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088
Antoine Pitroub52ec782009-01-25 16:34:23 +000017089rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017090rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017092LIBS=$ac_check_lib_save_LIBS
17093fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000017094{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17095$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
17096if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017097 cat >>confdefs.h <<_ACEOF
17098#define HAVE_LIBRESOLV 1
17099_ACEOF
17100
17101 LIBS="-lresolv $LIBS"
17102
17103fi
17104
17105
17106fi
17107
17108
Christian Heimesd0764e22007-12-04 15:00:33 +000017109# On Tru64, chflags seems to be present, but calling it will
17110# exit Python
Antoine Pitroub52ec782009-01-25 16:34:23 +000017111{ $as_echo "$as_me:$LINENO: checking for chflags" >&5
17112$as_echo_n "checking for chflags... " >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017113if test "$cross_compiling" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000017114 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
17115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17116{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017117See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017118$as_echo "$as_me: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017119See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000017120 { (exit 1); exit 1; }; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017121else
17122 cat >conftest.$ac_ext <<_ACEOF
17123/* confdefs.h. */
17124_ACEOF
17125cat confdefs.h >>conftest.$ac_ext
17126cat >>conftest.$ac_ext <<_ACEOF
17127/* end confdefs.h. */
17128
17129#include <sys/stat.h>
17130#include <unistd.h>
17131int main(int argc, char*argv[])
17132{
17133 if(chflags(argv[0], 0) != 0)
17134 return 1;
17135 return 0;
17136}
17137
17138_ACEOF
17139rm -f conftest$ac_exeext
17140if { (ac_try="$ac_link"
17141case "(($ac_try" in
17142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17143 *) ac_try_echo=$ac_try;;
17144esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017145eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17146$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017147 (eval "$ac_link") 2>&5
17148 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000017149 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017150 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17151 { (case "(($ac_try" in
17152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17153 *) ac_try_echo=$ac_try;;
17154esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017155eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17156$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017157 (eval "$ac_try") 2>&5
17158 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000017159 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017160 (exit $ac_status); }; }; then
17161
17162cat >>confdefs.h <<\_ACEOF
17163#define HAVE_CHFLAGS 1
17164_ACEOF
17165
Antoine Pitroub52ec782009-01-25 16:34:23 +000017166 { $as_echo "$as_me:$LINENO: result: yes" >&5
17167$as_echo "yes" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017168else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017169 $as_echo "$as_me: program exited with status $ac_status" >&5
17170$as_echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017171sed 's/^/| /' conftest.$ac_ext >&5
17172
17173( exit $ac_status )
Antoine Pitroub52ec782009-01-25 16:34:23 +000017174{ $as_echo "$as_me:$LINENO: result: no" >&5
17175$as_echo "no" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017176
17177fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000017178rm -rf conftest.dSYM
Christian Heimesd0764e22007-12-04 15:00:33 +000017179rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17180fi
17181
17182
17183
Antoine Pitroub52ec782009-01-25 16:34:23 +000017184{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5
17185$as_echo_n "checking for lchflags... " >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017186if test "$cross_compiling" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000017187 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
17188$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
17189{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017190See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017191$as_echo "$as_me: error: cannot run test program while cross compiling
Christian Heimesd0764e22007-12-04 15:00:33 +000017192See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000017193 { (exit 1); exit 1; }; }; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017194else
17195 cat >conftest.$ac_ext <<_ACEOF
17196/* confdefs.h. */
17197_ACEOF
17198cat confdefs.h >>conftest.$ac_ext
17199cat >>conftest.$ac_ext <<_ACEOF
17200/* end confdefs.h. */
17201
17202#include <sys/stat.h>
17203#include <unistd.h>
17204int main(int argc, char*argv[])
17205{
17206 if(lchflags(argv[0], 0) != 0)
17207 return 1;
17208 return 0;
17209}
17210
17211_ACEOF
17212rm -f conftest$ac_exeext
17213if { (ac_try="$ac_link"
17214case "(($ac_try" in
17215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17216 *) ac_try_echo=$ac_try;;
17217esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017218eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17219$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017220 (eval "$ac_link") 2>&5
17221 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000017222 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017223 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17224 { (case "(($ac_try" in
17225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17226 *) ac_try_echo=$ac_try;;
17227esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017228eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17229$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017230 (eval "$ac_try") 2>&5
17231 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000017232 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017233 (exit $ac_status); }; }; then
17234
17235cat >>confdefs.h <<\_ACEOF
17236#define HAVE_LCHFLAGS 1
17237_ACEOF
17238
Antoine Pitroub52ec782009-01-25 16:34:23 +000017239 { $as_echo "$as_me:$LINENO: result: yes" >&5
17240$as_echo "yes" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017241else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017242 $as_echo "$as_me: program exited with status $ac_status" >&5
17243$as_echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017244sed 's/^/| /' conftest.$ac_ext >&5
17245
17246( exit $ac_status )
Antoine Pitroub52ec782009-01-25 16:34:23 +000017247{ $as_echo "$as_me:$LINENO: result: no" >&5
17248$as_echo "no" >&6; }
Christian Heimesd0764e22007-12-04 15:00:33 +000017249
17250fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000017251rm -rf conftest.dSYM
Christian Heimesd0764e22007-12-04 15:00:33 +000017252rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17253fi
17254
17255
17256
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017257case $ac_sys_system/$ac_sys_release in
17258Darwin/*)
17259 _CUR_CFLAGS="${CFLAGS}"
17260 _CUR_LDFLAGS="${LDFLAGS}"
17261 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17262 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17263 ;;
17264esac
17265
Antoine Pitroub52ec782009-01-25 16:34:23 +000017266{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17267$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017268if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000017269 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017270else
17271 ac_check_lib_save_LIBS=$LIBS
17272LIBS="-lz $LIBS"
17273cat >conftest.$ac_ext <<_ACEOF
17274/* confdefs.h. */
17275_ACEOF
17276cat confdefs.h >>conftest.$ac_ext
17277cat >>conftest.$ac_ext <<_ACEOF
17278/* end confdefs.h. */
17279
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017280/* Override any GCC internal prototype to avoid an error.
17281 Use char because int might match the return type of a GCC
17282 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017283#ifdef __cplusplus
17284extern "C"
17285#endif
17286char inflateCopy ();
17287int
17288main ()
17289{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017290return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017291 ;
17292 return 0;
17293}
17294_ACEOF
17295rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017296if { (ac_try="$ac_link"
17297case "(($ac_try" in
17298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17299 *) ac_try_echo=$ac_try;;
17300esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017301eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17302$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017304 ac_status=$?
17305 grep -v '^ *+' conftest.er1 >conftest.err
17306 rm -f conftest.er1
17307 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017308 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017309 (exit $ac_status); } && {
17310 test -z "$ac_c_werror_flag" ||
17311 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000017312 } && test -s conftest$ac_exeext && {
17313 test "$cross_compiling" = yes ||
17314 $as_test_x conftest$ac_exeext
17315 }; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017316 ac_cv_lib_z_inflateCopy=yes
17317else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017318 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017319sed 's/^/| /' conftest.$ac_ext >&5
17320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017321 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017323
Antoine Pitroub52ec782009-01-25 16:34:23 +000017324rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017325rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017326 conftest$ac_exeext conftest.$ac_ext
17327LIBS=$ac_check_lib_save_LIBS
17328fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000017329{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
17330$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
17331if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000017332
17333cat >>confdefs.h <<\_ACEOF
17334#define HAVE_ZLIB_COPY 1
17335_ACEOF
17336
17337fi
17338
17339
17340case $ac_sys_system/$ac_sys_release in
17341Darwin/*)
17342 CFLAGS="${_CUR_CFLAGS}"
17343 LDFLAGS="${_CUR_LDFLAGS}"
17344 ;;
17345esac
17346
Antoine Pitroub52ec782009-01-25 16:34:23 +000017347{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5
17348$as_echo_n "checking for hstrerror... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017349cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017350/* confdefs.h. */
17351_ACEOF
17352cat confdefs.h >>conftest.$ac_ext
17353cat >>conftest.$ac_ext <<_ACEOF
17354/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017355
17356#include "confdefs.h"
17357#include <netdb.h>
17358
Martin v. Löwise9416172003-05-03 10:12:45 +000017359int
17360main ()
17361{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017362void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017363 ;
17364 return 0;
17365}
17366_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017367rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017368if { (ac_try="$ac_link"
17369case "(($ac_try" in
17370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17371 *) ac_try_echo=$ac_try;;
17372esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017373eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17374$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017375 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017376 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017377 grep -v '^ *+' conftest.er1 >conftest.err
17378 rm -f conftest.er1
17379 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017380 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017381 (exit $ac_status); } && {
17382 test -z "$ac_c_werror_flag" ||
17383 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000017384 } && test -s conftest$ac_exeext && {
17385 test "$cross_compiling" = yes ||
17386 $as_test_x conftest$ac_exeext
17387 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017388
17389cat >>confdefs.h <<\_ACEOF
17390#define HAVE_HSTRERROR 1
17391_ACEOF
17392
Antoine Pitroub52ec782009-01-25 16:34:23 +000017393 { $as_echo "$as_me:$LINENO: result: yes" >&5
17394$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017395else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017396 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017397sed 's/^/| /' conftest.$ac_ext >&5
17398
Antoine Pitroub52ec782009-01-25 16:34:23 +000017399 { $as_echo "$as_me:$LINENO: result: no" >&5
17400$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017401
17402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017403
Antoine Pitroub52ec782009-01-25 16:34:23 +000017404rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017405rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017406 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017407
Antoine Pitroub52ec782009-01-25 16:34:23 +000017408{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5
17409$as_echo_n "checking for inet_aton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017410cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017411/* confdefs.h. */
17412_ACEOF
17413cat confdefs.h >>conftest.$ac_ext
17414cat >>conftest.$ac_ext <<_ACEOF
17415/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017416
17417#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000017418#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017419#include <sys/socket.h>
17420#include <netinet/in.h>
17421#include <arpa/inet.h>
17422
Martin v. Löwise9416172003-05-03 10:12:45 +000017423int
17424main ()
17425{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017426void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000017427 ;
17428 return 0;
17429}
17430_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017431rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017432if { (ac_try="$ac_link"
17433case "(($ac_try" in
17434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17435 *) ac_try_echo=$ac_try;;
17436esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017437eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17438$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017439 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017440 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017441 grep -v '^ *+' conftest.er1 >conftest.err
17442 rm -f conftest.er1
17443 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017444 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445 (exit $ac_status); } && {
17446 test -z "$ac_c_werror_flag" ||
17447 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000017448 } && test -s conftest$ac_exeext && {
17449 test "$cross_compiling" = yes ||
17450 $as_test_x conftest$ac_exeext
17451 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017452
17453cat >>confdefs.h <<\_ACEOF
17454#define HAVE_INET_ATON 1
17455_ACEOF
17456
Antoine Pitroub52ec782009-01-25 16:34:23 +000017457 { $as_echo "$as_me:$LINENO: result: yes" >&5
17458$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017459else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017460 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017461sed 's/^/| /' conftest.$ac_ext >&5
17462
Antoine Pitroub52ec782009-01-25 16:34:23 +000017463 { $as_echo "$as_me:$LINENO: result: no" >&5
17464$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017465
17466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017467
Antoine Pitroub52ec782009-01-25 16:34:23 +000017468rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017469rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017470 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017471
Antoine Pitroub52ec782009-01-25 16:34:23 +000017472{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5
17473$as_echo_n "checking for inet_pton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017474cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017475/* confdefs.h. */
17476_ACEOF
17477cat confdefs.h >>conftest.$ac_ext
17478cat >>conftest.$ac_ext <<_ACEOF
17479/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000017480
17481#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017482#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000017483#include <sys/socket.h>
17484#include <netinet/in.h>
17485#include <arpa/inet.h>
17486
Martin v. Löwise9416172003-05-03 10:12:45 +000017487int
17488main ()
17489{
17490void* p = inet_pton
17491 ;
17492 return 0;
17493}
17494_ACEOF
17495rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017496if { (ac_try="$ac_compile"
17497case "(($ac_try" in
17498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17499 *) ac_try_echo=$ac_try;;
17500esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017501eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17502$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017503 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000017504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017505 grep -v '^ *+' conftest.er1 >conftest.err
17506 rm -f conftest.er1
17507 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017508 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017509 (exit $ac_status); } && {
17510 test -z "$ac_c_werror_flag" ||
17511 test ! -s conftest.err
17512 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000017513
17514cat >>confdefs.h <<\_ACEOF
17515#define HAVE_INET_PTON 1
17516_ACEOF
17517
Antoine Pitroub52ec782009-01-25 16:34:23 +000017518 { $as_echo "$as_me:$LINENO: result: yes" >&5
17519$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017520else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017521 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017522sed 's/^/| /' conftest.$ac_ext >&5
17523
Antoine Pitroub52ec782009-01-25 16:34:23 +000017524 { $as_echo "$as_me:$LINENO: result: no" >&5
17525$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000017526
17527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017528
17529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000017530
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017531# On some systems, setgroups is in unistd.h, on others, in grp.h
Antoine Pitroub52ec782009-01-25 16:34:23 +000017532{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5
17533$as_echo_n "checking for setgroups... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017534cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017535/* confdefs.h. */
17536_ACEOF
17537cat confdefs.h >>conftest.$ac_ext
17538cat >>conftest.$ac_ext <<_ACEOF
17539/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017540
17541#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000017542#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000017543#ifdef HAVE_GRP_H
17544#include <grp.h>
17545#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000017546
Martin v. Löwisd5843682002-11-21 20:41:28 +000017547int
17548main ()
17549{
17550void* p = setgroups
17551 ;
17552 return 0;
17553}
17554_ACEOF
17555rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556if { (ac_try="$ac_compile"
17557case "(($ac_try" in
17558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17559 *) ac_try_echo=$ac_try;;
17560esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017561eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17562$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017563 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017564 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017565 grep -v '^ *+' conftest.er1 >conftest.err
17566 rm -f conftest.er1
17567 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017568 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017569 (exit $ac_status); } && {
17570 test -z "$ac_c_werror_flag" ||
17571 test ! -s conftest.err
17572 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017573
17574cat >>confdefs.h <<\_ACEOF
17575#define HAVE_SETGROUPS 1
17576_ACEOF
17577
Antoine Pitroub52ec782009-01-25 16:34:23 +000017578 { $as_echo "$as_me:$LINENO: result: yes" >&5
17579$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017580else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017581 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017582sed 's/^/| /' conftest.$ac_ext >&5
17583
Antoine Pitroub52ec782009-01-25 16:34:23 +000017584 { $as_echo "$as_me:$LINENO: result: no" >&5
17585$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017586
17587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017588
17589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017590
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017591# check for openpty and forkpty
17592
Martin v. Löwis11437992002-04-12 09:54:03 +000017593
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017594for ac_func in openpty
17595do
Antoine Pitroub52ec782009-01-25 16:34:23 +000017596as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17597{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
17598$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017599if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000017600 $as_echo_n "(cached) " >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017601else
Martin v. Löwis11437992002-04-12 09:54:03 +000017602 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017603/* confdefs.h. */
17604_ACEOF
17605cat confdefs.h >>conftest.$ac_ext
17606cat >>conftest.$ac_ext <<_ACEOF
17607/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017608/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17609 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17610#define $ac_func innocuous_$ac_func
17611
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017612/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017613 which can conflict with char $ac_func (); below.
17614 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017615 <limits.h> exists even on freestanding compilers. */
17616
17617#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017618# include <limits.h>
17619#else
17620# include <assert.h>
17621#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017622
17623#undef $ac_func
17624
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017625/* Override any GCC internal prototype to avoid an error.
17626 Use char because int might match the return type of a GCC
17627 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017628#ifdef __cplusplus
17629extern "C"
17630#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017631char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017632/* The GNU C library defines this for functions which it implements
17633 to always fail with ENOSYS. Some functions are actually named
17634 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017635#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017636choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017637#endif
17638
Skip Montanaro6dead952003-09-25 14:50:04 +000017639int
17640main ()
17641{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017642return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017643 ;
17644 return 0;
17645}
17646_ACEOF
17647rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017648if { (ac_try="$ac_link"
17649case "(($ac_try" in
17650 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17651 *) ac_try_echo=$ac_try;;
17652esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017653eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17654$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017655 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017656 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017657 grep -v '^ *+' conftest.er1 >conftest.err
17658 rm -f conftest.er1
17659 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017660 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017661 (exit $ac_status); } && {
17662 test -z "$ac_c_werror_flag" ||
17663 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000017664 } && test -s conftest$ac_exeext && {
17665 test "$cross_compiling" = yes ||
17666 $as_test_x conftest$ac_exeext
17667 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017668 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017669else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017670 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017671sed 's/^/| /' conftest.$ac_ext >&5
17672
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017673 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017675
Antoine Pitroub52ec782009-01-25 16:34:23 +000017676rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017677rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017678 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017679fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000017680ac_res=`eval 'as_val=${'$as_ac_var'}
17681 $as_echo "$as_val"'`
17682 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
17683$as_echo "$ac_res" >&6; }
17684as_val=`eval 'as_val=${'$as_ac_var'}
17685 $as_echo "$as_val"'`
17686 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017687 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000017688#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017689_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017690
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017691else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017692 { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
17693$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017694if test "${ac_cv_lib_util_openpty+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000017695 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017696else
Martin v. Löwis11437992002-04-12 09:54:03 +000017697 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017698LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017699cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017700/* confdefs.h. */
17701_ACEOF
17702cat confdefs.h >>conftest.$ac_ext
17703cat >>conftest.$ac_ext <<_ACEOF
17704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017705
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017706/* Override any GCC internal prototype to avoid an error.
17707 Use char because int might match the return type of a GCC
17708 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017709#ifdef __cplusplus
17710extern "C"
17711#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017712char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017713int
17714main ()
17715{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017716return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017717 ;
17718 return 0;
17719}
17720_ACEOF
17721rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722if { (ac_try="$ac_link"
17723case "(($ac_try" in
17724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17725 *) ac_try_echo=$ac_try;;
17726esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017727eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17728$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017729 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017731 grep -v '^ *+' conftest.er1 >conftest.err
17732 rm -f conftest.er1
17733 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017734 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017735 (exit $ac_status); } && {
17736 test -z "$ac_c_werror_flag" ||
17737 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000017738 } && test -s conftest$ac_exeext && {
17739 test "$cross_compiling" = yes ||
17740 $as_test_x conftest$ac_exeext
17741 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017742 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017743else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017744 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017745sed 's/^/| /' conftest.$ac_ext >&5
17746
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017747 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017748fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017749
Antoine Pitroub52ec782009-01-25 16:34:23 +000017750rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017751rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017752 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000017753LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017754fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000017755{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
17756$as_echo "$ac_cv_lib_util_openpty" >&6; }
17757if test "x$ac_cv_lib_util_openpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017758 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017759#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017760_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017761 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017762else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017763 { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
17764$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017765if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000017766 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017767else
17768 ac_check_lib_save_LIBS=$LIBS
17769LIBS="-lbsd $LIBS"
17770cat >conftest.$ac_ext <<_ACEOF
17771/* confdefs.h. */
17772_ACEOF
17773cat confdefs.h >>conftest.$ac_ext
17774cat >>conftest.$ac_ext <<_ACEOF
17775/* end confdefs.h. */
17776
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017777/* Override any GCC internal prototype to avoid an error.
17778 Use char because int might match the return type of a GCC
17779 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017780#ifdef __cplusplus
17781extern "C"
17782#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017783char openpty ();
17784int
17785main ()
17786{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017787return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017788 ;
17789 return 0;
17790}
17791_ACEOF
17792rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017793if { (ac_try="$ac_link"
17794case "(($ac_try" in
17795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17796 *) ac_try_echo=$ac_try;;
17797esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017798eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17799$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017800 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017801 ac_status=$?
17802 grep -v '^ *+' conftest.er1 >conftest.err
17803 rm -f conftest.er1
17804 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017805 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017806 (exit $ac_status); } && {
17807 test -z "$ac_c_werror_flag" ||
17808 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000017809 } && test -s conftest$ac_exeext && {
17810 test "$cross_compiling" = yes ||
17811 $as_test_x conftest$ac_exeext
17812 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017813 ac_cv_lib_bsd_openpty=yes
17814else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017815 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017816sed 's/^/| /' conftest.$ac_ext >&5
17817
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017818 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017820
Antoine Pitroub52ec782009-01-25 16:34:23 +000017821rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017822rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017823 conftest$ac_exeext conftest.$ac_ext
17824LIBS=$ac_check_lib_save_LIBS
17825fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000017826{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
17827$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
17828if test "x$ac_cv_lib_bsd_openpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000017829 cat >>confdefs.h <<\_ACEOF
17830#define HAVE_OPENPTY 1
17831_ACEOF
17832 LIBS="$LIBS -lbsd"
17833fi
17834
17835
17836fi
17837
Fred Drake8cef4cf2000-06-28 16:40:38 +000017838
17839fi
17840done
17841
Martin v. Löwis11437992002-04-12 09:54:03 +000017842
Fred Drake8cef4cf2000-06-28 16:40:38 +000017843for ac_func in forkpty
17844do
Antoine Pitroub52ec782009-01-25 16:34:23 +000017845as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17846{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
17847$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017848if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000017849 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017850else
Martin v. Löwis11437992002-04-12 09:54:03 +000017851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017852/* confdefs.h. */
17853_ACEOF
17854cat confdefs.h >>conftest.$ac_ext
17855cat >>conftest.$ac_ext <<_ACEOF
17856/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017857/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17858 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17859#define $ac_func innocuous_$ac_func
17860
Fred Drake8cef4cf2000-06-28 16:40:38 +000017861/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017862 which can conflict with char $ac_func (); below.
17863 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017864 <limits.h> exists even on freestanding compilers. */
17865
17866#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017867# include <limits.h>
17868#else
17869# include <assert.h>
17870#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017871
17872#undef $ac_func
17873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017874/* Override any GCC internal prototype to avoid an error.
17875 Use char because int might match the return type of a GCC
17876 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017877#ifdef __cplusplus
17878extern "C"
17879#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017880char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000017881/* The GNU C library defines this for functions which it implements
17882 to always fail with ENOSYS. Some functions are actually named
17883 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017884#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000017885choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000017886#endif
17887
Skip Montanaro6dead952003-09-25 14:50:04 +000017888int
17889main ()
17890{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017891return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017892 ;
17893 return 0;
17894}
17895_ACEOF
17896rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017897if { (ac_try="$ac_link"
17898case "(($ac_try" in
17899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17900 *) ac_try_echo=$ac_try;;
17901esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017902eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17903$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017904 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017905 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017906 grep -v '^ *+' conftest.er1 >conftest.err
17907 rm -f conftest.er1
17908 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017909 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017910 (exit $ac_status); } && {
17911 test -z "$ac_c_werror_flag" ||
17912 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000017913 } && test -s conftest$ac_exeext && {
17914 test "$cross_compiling" = yes ||
17915 $as_test_x conftest$ac_exeext
17916 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017917 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017918else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017919 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017920sed 's/^/| /' conftest.$ac_ext >&5
17921
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017922 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017923fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017924
Antoine Pitroub52ec782009-01-25 16:34:23 +000017925rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017926rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017927 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017928fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000017929ac_res=`eval 'as_val=${'$as_ac_var'}
17930 $as_echo "$as_val"'`
17931 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
17932$as_echo "$ac_res" >&6; }
17933as_val=`eval 'as_val=${'$as_ac_var'}
17934 $as_echo "$as_val"'`
17935 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017936 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000017937#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017938_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017939
Fred Drake8cef4cf2000-06-28 16:40:38 +000017940else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017941 { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
17942$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017943if test "${ac_cv_lib_util_forkpty+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000017944 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000017945else
Martin v. Löwis11437992002-04-12 09:54:03 +000017946 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000017947LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000017948cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017949/* confdefs.h. */
17950_ACEOF
17951cat confdefs.h >>conftest.$ac_ext
17952cat >>conftest.$ac_ext <<_ACEOF
17953/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017955/* Override any GCC internal prototype to avoid an error.
17956 Use char because int might match the return type of a GCC
17957 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017958#ifdef __cplusplus
17959extern "C"
17960#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017961char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017962int
17963main ()
17964{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017966 ;
17967 return 0;
17968}
17969_ACEOF
17970rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017971if { (ac_try="$ac_link"
17972case "(($ac_try" in
17973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17974 *) ac_try_echo=$ac_try;;
17975esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000017976eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17977$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017978 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017979 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017980 grep -v '^ *+' conftest.er1 >conftest.err
17981 rm -f conftest.er1
17982 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000017983 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017984 (exit $ac_status); } && {
17985 test -z "$ac_c_werror_flag" ||
17986 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000017987 } && test -s conftest$ac_exeext && {
17988 test "$cross_compiling" = yes ||
17989 $as_test_x conftest$ac_exeext
17990 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017991 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000017992else
Antoine Pitroub52ec782009-01-25 16:34:23 +000017993 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017994sed 's/^/| /' conftest.$ac_ext >&5
17995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017996 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000017997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998
Antoine Pitroub52ec782009-01-25 16:34:23 +000017999rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018000rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018001 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018002LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018003fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000018004{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18005$as_echo "$ac_cv_lib_util_forkpty" >&6; }
18006if test "x$ac_cv_lib_util_forkpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018007 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018008#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018009_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018010 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018011else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018012 { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18013$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018014if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000018015 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018016else
18017 ac_check_lib_save_LIBS=$LIBS
18018LIBS="-lbsd $LIBS"
18019cat >conftest.$ac_ext <<_ACEOF
18020/* confdefs.h. */
18021_ACEOF
18022cat confdefs.h >>conftest.$ac_ext
18023cat >>conftest.$ac_ext <<_ACEOF
18024/* end confdefs.h. */
18025
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018026/* Override any GCC internal prototype to avoid an error.
18027 Use char because int might match the return type of a GCC
18028 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018029#ifdef __cplusplus
18030extern "C"
18031#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018032char forkpty ();
18033int
18034main ()
18035{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018036return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018037 ;
18038 return 0;
18039}
18040_ACEOF
18041rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018042if { (ac_try="$ac_link"
18043case "(($ac_try" in
18044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18045 *) ac_try_echo=$ac_try;;
18046esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018047eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18048$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018049 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018050 ac_status=$?
18051 grep -v '^ *+' conftest.er1 >conftest.err
18052 rm -f conftest.er1
18053 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018054 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018055 (exit $ac_status); } && {
18056 test -z "$ac_c_werror_flag" ||
18057 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000018058 } && test -s conftest$ac_exeext && {
18059 test "$cross_compiling" = yes ||
18060 $as_test_x conftest$ac_exeext
18061 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018062 ac_cv_lib_bsd_forkpty=yes
18063else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018064 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018065sed 's/^/| /' conftest.$ac_ext >&5
18066
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018067 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069
Antoine Pitroub52ec782009-01-25 16:34:23 +000018070rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018072 conftest$ac_exeext conftest.$ac_ext
18073LIBS=$ac_check_lib_save_LIBS
18074fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000018075{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18076$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
18077if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018078 cat >>confdefs.h <<\_ACEOF
18079#define HAVE_FORKPTY 1
18080_ACEOF
18081 LIBS="$LIBS -lbsd"
18082fi
18083
18084
18085fi
18086
Fred Drake8cef4cf2000-06-28 16:40:38 +000018087
18088fi
18089done
18090
Jack Jansendd19cf82001-12-06 22:36:17 +000018091
Christian Heimesb186d002008-03-18 15:15:01 +000018092# Stuff for expat.
18093
18094for ac_func in memmove
18095do
Antoine Pitroub52ec782009-01-25 16:34:23 +000018096as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18097{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18098$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018099if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000018100 $as_echo_n "(cached) " >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018101else
18102 cat >conftest.$ac_ext <<_ACEOF
18103/* confdefs.h. */
18104_ACEOF
18105cat confdefs.h >>conftest.$ac_ext
18106cat >>conftest.$ac_ext <<_ACEOF
18107/* end confdefs.h. */
18108/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18109 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18110#define $ac_func innocuous_$ac_func
18111
18112/* System header to define __stub macros and hopefully few prototypes,
18113 which can conflict with char $ac_func (); below.
18114 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18115 <limits.h> exists even on freestanding compilers. */
18116
18117#ifdef __STDC__
18118# include <limits.h>
18119#else
18120# include <assert.h>
18121#endif
18122
18123#undef $ac_func
18124
18125/* Override any GCC internal prototype to avoid an error.
18126 Use char because int might match the return type of a GCC
18127 builtin and then its argument prototype would still apply. */
18128#ifdef __cplusplus
18129extern "C"
18130#endif
18131char $ac_func ();
18132/* The GNU C library defines this for functions which it implements
18133 to always fail with ENOSYS. Some functions are actually named
18134 something starting with __ and the normal name is an alias. */
18135#if defined __stub_$ac_func || defined __stub___$ac_func
18136choke me
18137#endif
18138
18139int
18140main ()
18141{
18142return $ac_func ();
18143 ;
18144 return 0;
18145}
18146_ACEOF
18147rm -f conftest.$ac_objext conftest$ac_exeext
18148if { (ac_try="$ac_link"
18149case "(($ac_try" in
18150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18151 *) ac_try_echo=$ac_try;;
18152esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018153eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18154$as_echo "$ac_try_echo") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018155 (eval "$ac_link") 2>conftest.er1
18156 ac_status=$?
18157 grep -v '^ *+' conftest.er1 >conftest.err
18158 rm -f conftest.er1
18159 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018160 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018161 (exit $ac_status); } && {
18162 test -z "$ac_c_werror_flag" ||
18163 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000018164 } && test -s conftest$ac_exeext && {
18165 test "$cross_compiling" = yes ||
18166 $as_test_x conftest$ac_exeext
18167 }; then
Christian Heimesb186d002008-03-18 15:15:01 +000018168 eval "$as_ac_var=yes"
18169else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018170 $as_echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018171sed 's/^/| /' conftest.$ac_ext >&5
18172
18173 eval "$as_ac_var=no"
18174fi
18175
Antoine Pitroub52ec782009-01-25 16:34:23 +000018176rm -rf conftest.dSYM
Christian Heimesb186d002008-03-18 15:15:01 +000018177rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18178 conftest$ac_exeext conftest.$ac_ext
18179fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000018180ac_res=`eval 'as_val=${'$as_ac_var'}
18181 $as_echo "$as_val"'`
18182 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18183$as_echo "$ac_res" >&6; }
18184as_val=`eval 'as_val=${'$as_ac_var'}
18185 $as_echo "$as_val"'`
18186 if test "x$as_val" = x""yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000018187 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000018188#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000018189_ACEOF
18190
18191fi
18192done
18193
18194
Michael W. Hudson54241132001-12-07 15:38:26 +000018195# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018196
18197
18198
18199
18200
18201
Fred Drake8cef4cf2000-06-28 16:40:38 +000018202for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18203do
Antoine Pitroub52ec782009-01-25 16:34:23 +000018204as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18205{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18206$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018207if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000018208 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018209else
Martin v. Löwis11437992002-04-12 09:54:03 +000018210 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018211/* confdefs.h. */
18212_ACEOF
18213cat confdefs.h >>conftest.$ac_ext
18214cat >>conftest.$ac_ext <<_ACEOF
18215/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018216/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18217 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18218#define $ac_func innocuous_$ac_func
18219
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018220/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018221 which can conflict with char $ac_func (); below.
18222 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018223 <limits.h> exists even on freestanding compilers. */
18224
18225#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018226# include <limits.h>
18227#else
18228# include <assert.h>
18229#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018230
18231#undef $ac_func
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öwis11437992002-04-12 09:54:03 +000018236#ifdef __cplusplus
18237extern "C"
18238#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018239char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018240/* The GNU C library defines this for functions which it implements
18241 to always fail with ENOSYS. Some functions are actually named
18242 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018243#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018244choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018245#endif
18246
Skip Montanaro6dead952003-09-25 14:50:04 +000018247int
18248main ()
18249{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018250return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018251 ;
18252 return 0;
18253}
18254_ACEOF
18255rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018256if { (ac_try="$ac_link"
18257case "(($ac_try" in
18258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18259 *) ac_try_echo=$ac_try;;
18260esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018261eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18262$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018263 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018264 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018265 grep -v '^ *+' conftest.er1 >conftest.err
18266 rm -f conftest.er1
18267 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018268 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018269 (exit $ac_status); } && {
18270 test -z "$ac_c_werror_flag" ||
18271 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000018272 } && test -s conftest$ac_exeext && {
18273 test "$cross_compiling" = yes ||
18274 $as_test_x conftest$ac_exeext
18275 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018276 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018277else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018278 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018279sed 's/^/| /' conftest.$ac_ext >&5
18280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018281 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018282fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018283
Antoine Pitroub52ec782009-01-25 16:34:23 +000018284rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018285rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018286 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018287fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000018288ac_res=`eval 'as_val=${'$as_ac_var'}
18289 $as_echo "$as_val"'`
18290 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18291$as_echo "$ac_res" >&6; }
18292as_val=`eval 'as_val=${'$as_ac_var'}
18293 $as_echo "$as_val"'`
18294 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018295 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000018296#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018297_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000018298
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018299fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000018300done
18301
Michael W. Hudson54241132001-12-07 15:38:26 +000018302
Martin v. Löwis11437992002-04-12 09:54:03 +000018303
18304
18305
Christian Heimesb186d002008-03-18 15:15:01 +000018306for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000018307do
Antoine Pitroub52ec782009-01-25 16:34:23 +000018308as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18309{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18310$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018311if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000018312 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018313else
Martin v. Löwis11437992002-04-12 09:54:03 +000018314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018315/* confdefs.h. */
18316_ACEOF
18317cat confdefs.h >>conftest.$ac_ext
18318cat >>conftest.$ac_ext <<_ACEOF
18319/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018320/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18321 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18322#define $ac_func innocuous_$ac_func
18323
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018324/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018325 which can conflict with char $ac_func (); below.
18326 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018327 <limits.h> exists even on freestanding compilers. */
18328
18329#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018330# include <limits.h>
18331#else
18332# include <assert.h>
18333#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018334
18335#undef $ac_func
18336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018337/* Override any GCC internal prototype to avoid an error.
18338 Use char because int might match the return type of a GCC
18339 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018340#ifdef __cplusplus
18341extern "C"
18342#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018343char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000018344/* The GNU C library defines this for functions which it implements
18345 to always fail with ENOSYS. Some functions are actually named
18346 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018347#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000018348choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000018349#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018350
Skip Montanaro6dead952003-09-25 14:50:04 +000018351int
18352main ()
18353{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018354return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018355 ;
18356 return 0;
18357}
18358_ACEOF
18359rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018360if { (ac_try="$ac_link"
18361case "(($ac_try" in
18362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18363 *) ac_try_echo=$ac_try;;
18364esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018365eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18366$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018367 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018369 grep -v '^ *+' conftest.er1 >conftest.err
18370 rm -f conftest.er1
18371 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018372 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018373 (exit $ac_status); } && {
18374 test -z "$ac_c_werror_flag" ||
18375 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000018376 } && test -s conftest$ac_exeext && {
18377 test "$cross_compiling" = yes ||
18378 $as_test_x conftest$ac_exeext
18379 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018380 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018381else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018382 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018383sed 's/^/| /' conftest.$ac_ext >&5
18384
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018385 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000018386fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018387
Antoine Pitroub52ec782009-01-25 16:34:23 +000018388rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018389rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018390 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000018391fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000018392ac_res=`eval 'as_val=${'$as_ac_var'}
18393 $as_echo "$as_val"'`
18394 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18395$as_echo "$ac_res" >&6; }
18396as_val=`eval 'as_val=${'$as_ac_var'}
18397 $as_echo "$as_val"'`
18398 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018399 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000018400#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018401_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000018402
Martin v. Löwis1142de32002-03-29 16:28:31 +000018403else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018404 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000018405 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018406 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
18407 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000018408esac
18409
Martin v. Löwis1142de32002-03-29 16:28:31 +000018410fi
18411done
18412
18413
Martin v. Löwis11437992002-04-12 09:54:03 +000018414
Martin v. Löwis1142de32002-03-29 16:28:31 +000018415for ac_func in getpgrp
18416do
Antoine Pitroub52ec782009-01-25 16:34:23 +000018417as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18418{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18419$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018420if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000018421 $as_echo_n "(cached) " >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000018422else
Martin v. Löwis11437992002-04-12 09:54:03 +000018423 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018424/* confdefs.h. */
18425_ACEOF
18426cat confdefs.h >>conftest.$ac_ext
18427cat >>conftest.$ac_ext <<_ACEOF
18428/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018429/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18430 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18431#define $ac_func innocuous_$ac_func
18432
Martin v. Löwis1142de32002-03-29 16:28:31 +000018433/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018434 which can conflict with char $ac_func (); below.
18435 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018436 <limits.h> exists even on freestanding compilers. */
18437
18438#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018439# include <limits.h>
18440#else
18441# include <assert.h>
18442#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018443
18444#undef $ac_func
18445
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018446/* Override any GCC internal prototype to avoid an error.
18447 Use char because int might match the return type of a GCC
18448 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018449#ifdef __cplusplus
18450extern "C"
18451#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018452char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000018453/* The GNU C library defines this for functions which it implements
18454 to always fail with ENOSYS. Some functions are actually named
18455 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018456#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000018457choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000018458#endif
18459
Skip Montanaro6dead952003-09-25 14:50:04 +000018460int
18461main ()
18462{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018463return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018464 ;
18465 return 0;
18466}
18467_ACEOF
18468rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018469if { (ac_try="$ac_link"
18470case "(($ac_try" in
18471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18472 *) ac_try_echo=$ac_try;;
18473esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018474eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18475$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018476 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018478 grep -v '^ *+' conftest.er1 >conftest.err
18479 rm -f conftest.er1
18480 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018481 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018482 (exit $ac_status); } && {
18483 test -z "$ac_c_werror_flag" ||
18484 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000018485 } && test -s conftest$ac_exeext && {
18486 test "$cross_compiling" = yes ||
18487 $as_test_x conftest$ac_exeext
18488 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018489 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018490else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018491 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018492sed 's/^/| /' conftest.$ac_ext >&5
18493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018495fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018496
Antoine Pitroub52ec782009-01-25 16:34:23 +000018497rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018498rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018499 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018500fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000018501ac_res=`eval 'as_val=${'$as_ac_var'}
18502 $as_echo "$as_val"'`
18503 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18504$as_echo "$ac_res" >&6; }
18505as_val=`eval 'as_val=${'$as_ac_var'}
18506 $as_echo "$as_val"'`
18507 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018508 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000018509#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018510_ACEOF
18511 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018512/* confdefs.h. */
18513_ACEOF
18514cat confdefs.h >>conftest.$ac_ext
18515cat >>conftest.$ac_ext <<_ACEOF
18516/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018517#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018518int
18519main ()
18520{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018521getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018522 ;
18523 return 0;
18524}
18525_ACEOF
18526rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527if { (ac_try="$ac_compile"
18528case "(($ac_try" in
18529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18530 *) ac_try_echo=$ac_try;;
18531esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018532eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18533$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018536 grep -v '^ *+' conftest.er1 >conftest.err
18537 rm -f conftest.er1
18538 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018539 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018540 (exit $ac_status); } && {
18541 test -z "$ac_c_werror_flag" ||
18542 test ! -s conftest.err
18543 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018544
18545cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018546#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018547_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018548
Martin v. Löwis11437992002-04-12 09:54:03 +000018549
Guido van Rossumf78abae1997-01-21 22:02:36 +000018550else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018551 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018552sed 's/^/| /' conftest.$ac_ext >&5
18553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018554
Guido van Rossum627b2d71993-12-24 10:39:16 +000018555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018556
18557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018558
Guido van Rossum627b2d71993-12-24 10:39:16 +000018559fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018560done
Guido van Rossum627b2d71993-12-24 10:39:16 +000018561
Jack Jansen150753c2003-03-29 22:07:47 +000018562
18563for ac_func in setpgrp
18564do
Antoine Pitroub52ec782009-01-25 16:34:23 +000018565as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18566{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18567$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018568if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000018569 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018570else
Martin v. Löwis11437992002-04-12 09:54:03 +000018571 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018572/* confdefs.h. */
18573_ACEOF
18574cat confdefs.h >>conftest.$ac_ext
18575cat >>conftest.$ac_ext <<_ACEOF
18576/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018577/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18578 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18579#define $ac_func innocuous_$ac_func
18580
Jack Jansen150753c2003-03-29 22:07:47 +000018581/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018582 which can conflict with char $ac_func (); below.
18583 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018584 <limits.h> exists even on freestanding compilers. */
18585
18586#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018587# include <limits.h>
18588#else
18589# include <assert.h>
18590#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018591
18592#undef $ac_func
18593
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018594/* Override any GCC internal prototype to avoid an error.
18595 Use char because int might match the return type of a GCC
18596 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000018597#ifdef __cplusplus
18598extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000018599#endif
Jack Jansen150753c2003-03-29 22:07:47 +000018600char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000018601/* The GNU C library defines this for functions which it implements
18602 to always fail with ENOSYS. Some functions are actually named
18603 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018604#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000018605choke me
Jack Jansen150753c2003-03-29 22:07:47 +000018606#endif
18607
Skip Montanaro6dead952003-09-25 14:50:04 +000018608int
18609main ()
18610{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018611return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018612 ;
18613 return 0;
18614}
18615_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018616rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018617if { (ac_try="$ac_link"
18618case "(($ac_try" in
18619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18620 *) ac_try_echo=$ac_try;;
18621esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018622eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18623$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018624 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018625 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018626 grep -v '^ *+' conftest.er1 >conftest.err
18627 rm -f conftest.er1
18628 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018629 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018630 (exit $ac_status); } && {
18631 test -z "$ac_c_werror_flag" ||
18632 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000018633 } && test -s conftest$ac_exeext && {
18634 test "$cross_compiling" = yes ||
18635 $as_test_x conftest$ac_exeext
18636 }; then
Jack Jansen150753c2003-03-29 22:07:47 +000018637 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018638else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018639 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018640sed 's/^/| /' conftest.$ac_ext >&5
18641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018642 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018644
Antoine Pitroub52ec782009-01-25 16:34:23 +000018645rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018646rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018647 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018648fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000018649ac_res=`eval 'as_val=${'$as_ac_var'}
18650 $as_echo "$as_val"'`
18651 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18652$as_echo "$ac_res" >&6; }
18653as_val=`eval 'as_val=${'$as_ac_var'}
18654 $as_echo "$as_val"'`
18655 if test "x$as_val" = x""yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000018656 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000018657#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000018658_ACEOF
18659 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018660/* confdefs.h. */
18661_ACEOF
18662cat confdefs.h >>conftest.$ac_ext
18663cat >>conftest.$ac_ext <<_ACEOF
18664/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000018665#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000018666int
18667main ()
18668{
18669setpgrp(0,0);
18670 ;
18671 return 0;
18672}
18673_ACEOF
18674rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018675if { (ac_try="$ac_compile"
18676case "(($ac_try" in
18677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18678 *) ac_try_echo=$ac_try;;
18679esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018680eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18681$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018682 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000018683 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018684 grep -v '^ *+' conftest.er1 >conftest.err
18685 rm -f conftest.er1
18686 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018687 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018688 (exit $ac_status); } && {
18689 test -z "$ac_c_werror_flag" ||
18690 test ! -s conftest.err
18691 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018692
18693cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000018694#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018695_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018696
Jack Jansen150753c2003-03-29 22:07:47 +000018697
18698else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018699 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018700sed 's/^/| /' conftest.$ac_ext >&5
18701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018702
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018704
18705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000018706
18707fi
18708done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000018709
Martin v. Löwis11437992002-04-12 09:54:03 +000018710
Thomas Wouters3a584202000-08-05 23:28:51 +000018711for ac_func in gettimeofday
18712do
Antoine Pitroub52ec782009-01-25 16:34:23 +000018713as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18714{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18715$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018716if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000018717 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018718else
Martin v. Löwis11437992002-04-12 09:54:03 +000018719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018720/* confdefs.h. */
18721_ACEOF
18722cat confdefs.h >>conftest.$ac_ext
18723cat >>conftest.$ac_ext <<_ACEOF
18724/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018725/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18726 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18727#define $ac_func innocuous_$ac_func
18728
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000018729/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018730 which can conflict with char $ac_func (); below.
18731 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018732 <limits.h> exists even on freestanding compilers. */
18733
18734#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018735# include <limits.h>
18736#else
18737# include <assert.h>
18738#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018739
18740#undef $ac_func
18741
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018742/* Override any GCC internal prototype to avoid an error.
18743 Use char because int might match the return type of a GCC
18744 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018745#ifdef __cplusplus
18746extern "C"
18747#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018748char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018749/* The GNU C library defines this for functions which it implements
18750 to always fail with ENOSYS. Some functions are actually named
18751 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018752#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018753choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018754#endif
18755
Skip Montanaro6dead952003-09-25 14:50:04 +000018756int
18757main ()
18758{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018759return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018760 ;
18761 return 0;
18762}
18763_ACEOF
18764rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018765if { (ac_try="$ac_link"
18766case "(($ac_try" in
18767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18768 *) ac_try_echo=$ac_try;;
18769esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018770eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18771$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018772 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018774 grep -v '^ *+' conftest.er1 >conftest.err
18775 rm -f conftest.er1
18776 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018777 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018778 (exit $ac_status); } && {
18779 test -z "$ac_c_werror_flag" ||
18780 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000018781 } && test -s conftest$ac_exeext && {
18782 test "$cross_compiling" = yes ||
18783 $as_test_x conftest$ac_exeext
18784 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018785 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018786else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018787 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018788sed 's/^/| /' conftest.$ac_ext >&5
18789
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018790 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018791fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018792
Antoine Pitroub52ec782009-01-25 16:34:23 +000018793rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018794rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018795 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018796fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000018797ac_res=`eval 'as_val=${'$as_ac_var'}
18798 $as_echo "$as_val"'`
18799 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18800$as_echo "$ac_res" >&6; }
18801as_val=`eval 'as_val=${'$as_ac_var'}
18802 $as_echo "$as_val"'`
18803 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018804 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000018805#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018806_ACEOF
18807 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018808/* confdefs.h. */
18809_ACEOF
18810cat confdefs.h >>conftest.$ac_ext
18811cat >>conftest.$ac_ext <<_ACEOF
18812/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000018813#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000018814int
18815main ()
18816{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018817gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000018818 ;
18819 return 0;
18820}
18821_ACEOF
18822rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018823if { (ac_try="$ac_compile"
18824case "(($ac_try" in
18825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18826 *) ac_try_echo=$ac_try;;
18827esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018828eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18829$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018832 grep -v '^ *+' conftest.er1 >conftest.err
18833 rm -f conftest.er1
18834 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018835 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018836 (exit $ac_status); } && {
18837 test -z "$ac_c_werror_flag" ||
18838 test ! -s conftest.err
18839 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000018840 :
18841else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018842 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018843sed 's/^/| /' conftest.$ac_ext >&5
18844
Martin v. Löwis11437992002-04-12 09:54:03 +000018845
18846cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018847#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018848_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000018849
Martin v. Löwis11437992002-04-12 09:54:03 +000018850
Guido van Rossum627b2d71993-12-24 10:39:16 +000018851fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018852
18853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000018854
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018855fi
Thomas Wouters3a584202000-08-05 23:28:51 +000018856done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018857
Michael W. Hudson54241132001-12-07 15:38:26 +000018858
Antoine Pitroub52ec782009-01-25 16:34:23 +000018859{ $as_echo "$as_me:$LINENO: checking for major" >&5
18860$as_echo_n "checking for major... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018862/* confdefs.h. */
18863_ACEOF
18864cat confdefs.h >>conftest.$ac_ext
18865cat >>conftest.$ac_ext <<_ACEOF
18866/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018867
Neal Norwitz6eb37f02003-02-23 23:28:15 +000018868#if defined(MAJOR_IN_MKDEV)
18869#include <sys/mkdev.h>
18870#elif defined(MAJOR_IN_SYSMACROS)
18871#include <sys/sysmacros.h>
18872#else
18873#include <sys/types.h>
18874#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018875
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018876int
18877main ()
18878{
18879
18880 makedev(major(0),minor(0));
18881
18882 ;
18883 return 0;
18884}
18885_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000018886rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018887if { (ac_try="$ac_link"
18888case "(($ac_try" in
18889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18890 *) ac_try_echo=$ac_try;;
18891esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018892eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18893$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018894 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018895 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018896 grep -v '^ *+' conftest.er1 >conftest.err
18897 rm -f conftest.er1
18898 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018899 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018900 (exit $ac_status); } && {
18901 test -z "$ac_c_werror_flag" ||
18902 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000018903 } && test -s conftest$ac_exeext && {
18904 test "$cross_compiling" = yes ||
18905 $as_test_x conftest$ac_exeext
18906 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018907
18908
18909cat >>confdefs.h <<\_ACEOF
18910#define HAVE_DEVICE_MACROS 1
18911_ACEOF
18912
Antoine Pitroub52ec782009-01-25 16:34:23 +000018913 { $as_echo "$as_me:$LINENO: result: yes" >&5
18914$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018915
18916else
Antoine Pitroub52ec782009-01-25 16:34:23 +000018917 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018918sed 's/^/| /' conftest.$ac_ext >&5
18919
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018920
Antoine Pitroub52ec782009-01-25 16:34:23 +000018921 { $as_echo "$as_me:$LINENO: result: no" >&5
18922$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000018923
18924fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018925
Antoine Pitroub52ec782009-01-25 16:34:23 +000018926rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018927rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018928 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018929
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018930# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000018931# for [no]getaddrinfo in netdb.h.
Antoine Pitroub52ec782009-01-25 16:34:23 +000018932{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
18933$as_echo_n "checking for getaddrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018934cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018935/* confdefs.h. */
18936_ACEOF
18937cat confdefs.h >>conftest.$ac_ext
18938cat >>conftest.$ac_ext <<_ACEOF
18939/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018940
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018941#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018942#include <sys/socket.h>
18943#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000018944#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018945
Martin v. Löwis11437992002-04-12 09:54:03 +000018946int
18947main ()
18948{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018949
Martin v. Löwis861a65b2001-10-24 14:36:00 +000018950getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018951
Martin v. Löwis11437992002-04-12 09:54:03 +000018952 ;
18953 return 0;
18954}
18955_ACEOF
18956rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018957if { (ac_try="$ac_link"
18958case "(($ac_try" in
18959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18960 *) ac_try_echo=$ac_try;;
18961esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000018962eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18963$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018964 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018965 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018966 grep -v '^ *+' conftest.er1 >conftest.err
18967 rm -f conftest.er1
18968 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000018969 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018970 (exit $ac_status); } && {
18971 test -z "$ac_c_werror_flag" ||
18972 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000018973 } && test -s conftest$ac_exeext && {
18974 test "$cross_compiling" = yes ||
18975 $as_test_x conftest$ac_exeext
18976 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018977
Antoine Pitroub52ec782009-01-25 16:34:23 +000018978{ $as_echo "$as_me:$LINENO: result: yes" >&5
18979$as_echo "yes" >&6; }
18980{ $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
18981$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018982if test "$cross_compiling" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000018983 { $as_echo "$as_me:$LINENO: result: buggy" >&5
18984$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018985buggygetaddrinfo=yes
18986else
Martin v. Löwis11437992002-04-12 09:54:03 +000018987 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018988/* confdefs.h. */
18989_ACEOF
18990cat confdefs.h >>conftest.$ac_ext
18991cat >>conftest.$ac_ext <<_ACEOF
18992/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000018993
18994#include <sys/types.h>
18995#include <netdb.h>
18996#include <string.h>
18997#include <sys/socket.h>
18998#include <netinet/in.h>
18999
19000main()
19001{
19002 int passive, gaierr, inet4 = 0, inet6 = 0;
19003 struct addrinfo hints, *ai, *aitop;
19004 char straddr[INET6_ADDRSTRLEN], strport[16];
19005
19006 for (passive = 0; passive <= 1; passive++) {
19007 memset(&hints, 0, sizeof(hints));
19008 hints.ai_family = AF_UNSPEC;
19009 hints.ai_flags = passive ? AI_PASSIVE : 0;
19010 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019011 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019012 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19013 (void)gai_strerror(gaierr);
19014 goto bad;
19015 }
19016 for (ai = aitop; ai; ai = ai->ai_next) {
19017 if (ai->ai_addr == NULL ||
19018 ai->ai_addrlen == 0 ||
19019 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19020 straddr, sizeof(straddr), strport, sizeof(strport),
19021 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19022 goto bad;
19023 }
19024 switch (ai->ai_family) {
19025 case AF_INET:
19026 if (strcmp(strport, "54321") != 0) {
19027 goto bad;
19028 }
19029 if (passive) {
19030 if (strcmp(straddr, "0.0.0.0") != 0) {
19031 goto bad;
19032 }
19033 } else {
19034 if (strcmp(straddr, "127.0.0.1") != 0) {
19035 goto bad;
19036 }
19037 }
19038 inet4++;
19039 break;
19040 case AF_INET6:
19041 if (strcmp(strport, "54321") != 0) {
19042 goto bad;
19043 }
19044 if (passive) {
19045 if (strcmp(straddr, "::") != 0) {
19046 goto bad;
19047 }
19048 } else {
19049 if (strcmp(straddr, "::1") != 0) {
19050 goto bad;
19051 }
19052 }
19053 inet6++;
19054 break;
19055 case AF_UNSPEC:
19056 goto bad;
19057 break;
19058 default:
19059 /* another family support? */
19060 break;
19061 }
19062 }
19063 }
19064
19065 if (!(inet4 == 0 || inet4 == 2))
19066 goto bad;
19067 if (!(inet6 == 0 || inet6 == 2))
19068 goto bad;
19069
19070 if (aitop)
19071 freeaddrinfo(aitop);
19072 exit(0);
19073
19074 bad:
19075 if (aitop)
19076 freeaddrinfo(aitop);
19077 exit(1);
19078}
19079
Martin v. Löwis11437992002-04-12 09:54:03 +000019080_ACEOF
19081rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019082if { (ac_try="$ac_link"
19083case "(($ac_try" in
19084 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19085 *) ac_try_echo=$ac_try;;
19086esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019087eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19088$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019089 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019090 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000019091 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019092 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019093 { (case "(($ac_try" in
19094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19095 *) ac_try_echo=$ac_try;;
19096esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019097eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19098$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019099 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019100 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000019101 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019102 (exit $ac_status); }; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000019103 { $as_echo "$as_me:$LINENO: result: good" >&5
19104$as_echo "good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019105buggygetaddrinfo=no
19106else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019107 $as_echo "$as_me: program exited with status $ac_status" >&5
19108$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019109sed 's/^/| /' conftest.$ac_ext >&5
19110
Martin v. Löwis11437992002-04-12 09:54:03 +000019111( exit $ac_status )
Antoine Pitroub52ec782009-01-25 16:34:23 +000019112{ $as_echo "$as_me:$LINENO: result: buggy" >&5
19113$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019114buggygetaddrinfo=yes
19115fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000019116rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019117rm -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 +000019118fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019119
19120
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019121else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019122 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019123sed 's/^/| /' conftest.$ac_ext >&5
19124
Martin v. Löwis11437992002-04-12 09:54:03 +000019125
Antoine Pitroub52ec782009-01-25 16:34:23 +000019126{ $as_echo "$as_me:$LINENO: result: no" >&5
19127$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019128buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019129
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019130fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019131
Antoine Pitroub52ec782009-01-25 16:34:23 +000019132rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019133rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019134 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019135
19136if test "$buggygetaddrinfo" = "yes"; then
19137 if test "$ipv6" = "yes"; then
19138 echo 'Fatal: You must get working getaddrinfo() function.'
19139 echo ' or you can specify "--disable-ipv6"'.
19140 exit 1
19141 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019142else
Martin v. Löwis11437992002-04-12 09:54:03 +000019143
19144cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019145#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019146_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019147
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019148fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019149
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019150for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019151do
Antoine Pitroub52ec782009-01-25 16:34:23 +000019152as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19153{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19154$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019155if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000019156 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019157else
Martin v. Löwis11437992002-04-12 09:54:03 +000019158 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019159/* confdefs.h. */
19160_ACEOF
19161cat confdefs.h >>conftest.$ac_ext
19162cat >>conftest.$ac_ext <<_ACEOF
19163/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019164/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19165 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19166#define $ac_func innocuous_$ac_func
19167
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019168/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019169 which can conflict with char $ac_func (); below.
19170 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019171 <limits.h> exists even on freestanding compilers. */
19172
19173#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019174# include <limits.h>
19175#else
19176# include <assert.h>
19177#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019178
19179#undef $ac_func
19180
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019181/* Override any GCC internal prototype to avoid an error.
19182 Use char because int might match the return type of a GCC
19183 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019184#ifdef __cplusplus
19185extern "C"
19186#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019187char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019188/* The GNU C library defines this for functions which it implements
19189 to always fail with ENOSYS. Some functions are actually named
19190 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019191#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019192choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019193#endif
19194
Skip Montanaro6dead952003-09-25 14:50:04 +000019195int
19196main ()
19197{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019198return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019199 ;
19200 return 0;
19201}
19202_ACEOF
19203rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019204if { (ac_try="$ac_link"
19205case "(($ac_try" in
19206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19207 *) ac_try_echo=$ac_try;;
19208esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019209eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19210$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019211 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019212 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019213 grep -v '^ *+' conftest.er1 >conftest.err
19214 rm -f conftest.er1
19215 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019216 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019217 (exit $ac_status); } && {
19218 test -z "$ac_c_werror_flag" ||
19219 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000019220 } && test -s conftest$ac_exeext && {
19221 test "$cross_compiling" = yes ||
19222 $as_test_x conftest$ac_exeext
19223 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019224 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019225else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019226 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019227sed 's/^/| /' conftest.$ac_ext >&5
19228
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019229 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019230fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019231
Antoine Pitroub52ec782009-01-25 16:34:23 +000019232rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019233rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019234 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019235fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000019236ac_res=`eval 'as_val=${'$as_ac_var'}
19237 $as_echo "$as_val"'`
19238 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19239$as_echo "$ac_res" >&6; }
19240as_val=`eval 'as_val=${'$as_ac_var'}
19241 $as_echo "$as_val"'`
19242 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019243 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000019244#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019245_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019246
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019247fi
19248done
19249
Michael W. Hudson54241132001-12-07 15:38:26 +000019250
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019251# checks for structures
Antoine Pitroub52ec782009-01-25 16:34:23 +000019252{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19253$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 +000019254if test "${ac_cv_header_time+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000019255 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019256else
Martin v. Löwis11437992002-04-12 09:54:03 +000019257 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019258/* confdefs.h. */
19259_ACEOF
19260cat confdefs.h >>conftest.$ac_ext
19261cat >>conftest.$ac_ext <<_ACEOF
19262/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019263#include <sys/types.h>
19264#include <sys/time.h>
19265#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019266
Martin v. Löwis11437992002-04-12 09:54:03 +000019267int
19268main ()
19269{
19270if ((struct tm *) 0)
19271return 0;
19272 ;
19273 return 0;
19274}
19275_ACEOF
19276rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019277if { (ac_try="$ac_compile"
19278case "(($ac_try" in
19279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19280 *) ac_try_echo=$ac_try;;
19281esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019282eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19283$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019284 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019285 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019286 grep -v '^ *+' conftest.er1 >conftest.err
19287 rm -f conftest.er1
19288 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019289 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019290 (exit $ac_status); } && {
19291 test -z "$ac_c_werror_flag" ||
19292 test ! -s conftest.err
19293 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019294 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000019295else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019296 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019297sed 's/^/| /' conftest.$ac_ext >&5
19298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019299 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019301
19302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019303fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000019304{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
19305$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019306if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019307
19308cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019309#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019310_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019311
19312fi
19313
Antoine Pitroub52ec782009-01-25 16:34:23 +000019314{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
19315$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 +000019316if test "${ac_cv_struct_tm+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000019317 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019318else
Martin v. Löwis11437992002-04-12 09:54:03 +000019319 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019320/* confdefs.h. */
19321_ACEOF
19322cat confdefs.h >>conftest.$ac_ext
19323cat >>conftest.$ac_ext <<_ACEOF
19324/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019325#include <sys/types.h>
19326#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019327
Martin v. Löwis11437992002-04-12 09:54:03 +000019328int
19329main ()
19330{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019331struct tm tm;
19332 int *p = &tm.tm_sec;
Antoine Pitroub52ec782009-01-25 16:34:23 +000019333 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000019334 ;
19335 return 0;
19336}
19337_ACEOF
19338rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019339if { (ac_try="$ac_compile"
19340case "(($ac_try" in
19341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19342 *) ac_try_echo=$ac_try;;
19343esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019344eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19345$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019348 grep -v '^ *+' conftest.er1 >conftest.err
19349 rm -f conftest.er1
19350 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019351 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019352 (exit $ac_status); } && {
19353 test -z "$ac_c_werror_flag" ||
19354 test ! -s conftest.err
19355 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019356 ac_cv_struct_tm=time.h
19357else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019358 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019359sed 's/^/| /' conftest.$ac_ext >&5
19360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019361 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019362fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019363
19364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019365fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000019366{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
19367$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019368if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019369
19370cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019371#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019372_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019373
19374fi
19375
Antoine Pitroub52ec782009-01-25 16:34:23 +000019376{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
19377$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019378if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000019379 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019380else
Martin v. Löwis11437992002-04-12 09:54:03 +000019381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019382/* confdefs.h. */
19383_ACEOF
19384cat confdefs.h >>conftest.$ac_ext
19385cat >>conftest.$ac_ext <<_ACEOF
19386/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019387#include <sys/types.h>
19388#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000019389
19390
Martin v. Löwis11437992002-04-12 09:54:03 +000019391int
19392main ()
19393{
19394static struct tm ac_aggr;
19395if (ac_aggr.tm_zone)
19396return 0;
19397 ;
19398 return 0;
19399}
19400_ACEOF
19401rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019402if { (ac_try="$ac_compile"
19403case "(($ac_try" in
19404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19405 *) ac_try_echo=$ac_try;;
19406esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019407eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19408$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019409 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019410 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019411 grep -v '^ *+' conftest.er1 >conftest.err
19412 rm -f conftest.er1
19413 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019414 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019415 (exit $ac_status); } && {
19416 test -z "$ac_c_werror_flag" ||
19417 test ! -s conftest.err
19418 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019419 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019420else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019421 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019422sed 's/^/| /' conftest.$ac_ext >&5
19423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019424 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019425/* confdefs.h. */
19426_ACEOF
19427cat confdefs.h >>conftest.$ac_ext
19428cat >>conftest.$ac_ext <<_ACEOF
19429/* end confdefs.h. */
19430#include <sys/types.h>
19431#include <$ac_cv_struct_tm>
19432
19433
19434int
19435main ()
19436{
19437static struct tm ac_aggr;
19438if (sizeof ac_aggr.tm_zone)
19439return 0;
19440 ;
19441 return 0;
19442}
19443_ACEOF
19444rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019445if { (ac_try="$ac_compile"
19446case "(($ac_try" in
19447 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19448 *) ac_try_echo=$ac_try;;
19449esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019450eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19451$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019452 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019453 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019454 grep -v '^ *+' conftest.er1 >conftest.err
19455 rm -f conftest.er1
19456 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019457 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019458 (exit $ac_status); } && {
19459 test -z "$ac_c_werror_flag" ||
19460 test ! -s conftest.err
19461 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019462 ac_cv_member_struct_tm_tm_zone=yes
19463else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019464 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019465sed 's/^/| /' conftest.$ac_ext >&5
19466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019467 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019469
19470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019471fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019472
19473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019474fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000019475{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
19476$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
19477if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019478
19479cat >>confdefs.h <<_ACEOF
19480#define HAVE_STRUCT_TM_TM_ZONE 1
19481_ACEOF
19482
19483
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019484fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000019485
Martin v. Löwis11437992002-04-12 09:54:03 +000019486if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
19487
19488cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019489#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019490_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019491
19492else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019493 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
19494$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019495if test "${ac_cv_have_decl_tzname+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000019496 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019497else
19498 cat >conftest.$ac_ext <<_ACEOF
19499/* confdefs.h. */
19500_ACEOF
19501cat confdefs.h >>conftest.$ac_ext
19502cat >>conftest.$ac_ext <<_ACEOF
19503/* end confdefs.h. */
19504#include <time.h>
19505
19506int
19507main ()
19508{
19509#ifndef tzname
19510 (void) tzname;
19511#endif
19512
19513 ;
19514 return 0;
19515}
19516_ACEOF
19517rm -f conftest.$ac_objext
19518if { (ac_try="$ac_compile"
19519case "(($ac_try" in
19520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19521 *) ac_try_echo=$ac_try;;
19522esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019523eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19524$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019525 (eval "$ac_compile") 2>conftest.er1
19526 ac_status=$?
19527 grep -v '^ *+' conftest.er1 >conftest.err
19528 rm -f conftest.er1
19529 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019530 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019531 (exit $ac_status); } && {
19532 test -z "$ac_c_werror_flag" ||
19533 test ! -s conftest.err
19534 } && test -s conftest.$ac_objext; then
19535 ac_cv_have_decl_tzname=yes
19536else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019537 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019538sed 's/^/| /' conftest.$ac_ext >&5
19539
19540 ac_cv_have_decl_tzname=no
19541fi
19542
19543rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19544fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000019545{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
19546$as_echo "$ac_cv_have_decl_tzname" >&6; }
19547if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019548
19549cat >>confdefs.h <<_ACEOF
19550#define HAVE_DECL_TZNAME 1
19551_ACEOF
19552
19553
19554else
19555 cat >>confdefs.h <<_ACEOF
19556#define HAVE_DECL_TZNAME 0
19557_ACEOF
19558
19559
19560fi
19561
19562
Antoine Pitroub52ec782009-01-25 16:34:23 +000019563 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
19564$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019565if test "${ac_cv_var_tzname+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000019566 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019567else
Martin v. Löwis11437992002-04-12 09:54:03 +000019568 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019569/* confdefs.h. */
19570_ACEOF
19571cat confdefs.h >>conftest.$ac_ext
19572cat >>conftest.$ac_ext <<_ACEOF
19573/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019574#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019575#if !HAVE_DECL_TZNAME
19576extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000019577#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019578
Martin v. Löwis11437992002-04-12 09:54:03 +000019579int
19580main ()
19581{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019582return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000019583 ;
19584 return 0;
19585}
19586_ACEOF
19587rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019588if { (ac_try="$ac_link"
19589case "(($ac_try" in
19590 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19591 *) ac_try_echo=$ac_try;;
19592esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019593eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19594$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019595 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019596 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019597 grep -v '^ *+' conftest.er1 >conftest.err
19598 rm -f conftest.er1
19599 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019600 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019601 (exit $ac_status); } && {
19602 test -z "$ac_c_werror_flag" ||
19603 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000019604 } && test -s conftest$ac_exeext && {
19605 test "$cross_compiling" = yes ||
19606 $as_test_x conftest$ac_exeext
19607 }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019608 ac_cv_var_tzname=yes
19609else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019610 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019611sed 's/^/| /' conftest.$ac_ext >&5
19612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019613 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000019614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019615
Antoine Pitroub52ec782009-01-25 16:34:23 +000019616rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019617rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019618 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000019619fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000019620{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
19621$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000019622 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019623
19624cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019625#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019626_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019627
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019628 fi
19629fi
19630
Antoine Pitroub52ec782009-01-25 16:34:23 +000019631{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
19632$as_echo_n "checking for struct stat.st_rdev... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019633if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000019634 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000019635else
19636 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019637/* confdefs.h. */
19638_ACEOF
19639cat confdefs.h >>conftest.$ac_ext
19640cat >>conftest.$ac_ext <<_ACEOF
19641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019642$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019643int
19644main ()
19645{
19646static struct stat ac_aggr;
19647if (ac_aggr.st_rdev)
19648return 0;
19649 ;
19650 return 0;
19651}
19652_ACEOF
19653rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019654if { (ac_try="$ac_compile"
19655case "(($ac_try" in
19656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19657 *) ac_try_echo=$ac_try;;
19658esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019659eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19660$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019661 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019663 grep -v '^ *+' conftest.er1 >conftest.err
19664 rm -f conftest.er1
19665 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019666 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019667 (exit $ac_status); } && {
19668 test -z "$ac_c_werror_flag" ||
19669 test ! -s conftest.err
19670 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019671 ac_cv_member_struct_stat_st_rdev=yes
19672else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019673 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019674sed 's/^/| /' conftest.$ac_ext >&5
19675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019676 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019677/* confdefs.h. */
19678_ACEOF
19679cat confdefs.h >>conftest.$ac_ext
19680cat >>conftest.$ac_ext <<_ACEOF
19681/* end confdefs.h. */
19682$ac_includes_default
19683int
19684main ()
19685{
19686static struct stat ac_aggr;
19687if (sizeof ac_aggr.st_rdev)
19688return 0;
19689 ;
19690 return 0;
19691}
19692_ACEOF
19693rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019694if { (ac_try="$ac_compile"
19695case "(($ac_try" in
19696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19697 *) ac_try_echo=$ac_try;;
19698esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019699eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19700$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019701 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019703 grep -v '^ *+' conftest.er1 >conftest.err
19704 rm -f conftest.er1
19705 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019706 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019707 (exit $ac_status); } && {
19708 test -z "$ac_c_werror_flag" ||
19709 test ! -s conftest.err
19710 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019711 ac_cv_member_struct_stat_st_rdev=yes
19712else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019713 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019714sed 's/^/| /' conftest.$ac_ext >&5
19715
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019716 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000019717fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019718
19719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019720fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019721
19722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019723fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000019724{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
19725$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; }
19726if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019727
19728cat >>confdefs.h <<_ACEOF
19729#define HAVE_STRUCT_STAT_ST_RDEV 1
19730_ACEOF
19731
19732
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019733fi
19734
Antoine Pitroub52ec782009-01-25 16:34:23 +000019735{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
19736$as_echo_n "checking for struct stat.st_blksize... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019737if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000019738 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019739else
Martin v. Löwis11437992002-04-12 09:54:03 +000019740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019741/* confdefs.h. */
19742_ACEOF
19743cat confdefs.h >>conftest.$ac_ext
19744cat >>conftest.$ac_ext <<_ACEOF
19745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019746$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000019747int
19748main ()
19749{
19750static struct stat ac_aggr;
19751if (ac_aggr.st_blksize)
19752return 0;
19753 ;
19754 return 0;
19755}
19756_ACEOF
19757rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019758if { (ac_try="$ac_compile"
19759case "(($ac_try" in
19760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19761 *) ac_try_echo=$ac_try;;
19762esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019763eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19764$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019765 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019766 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019767 grep -v '^ *+' conftest.er1 >conftest.err
19768 rm -f conftest.er1
19769 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019770 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019771 (exit $ac_status); } && {
19772 test -z "$ac_c_werror_flag" ||
19773 test ! -s conftest.err
19774 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019775 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000019776else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019777 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019778sed 's/^/| /' conftest.$ac_ext >&5
19779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019781/* confdefs.h. */
19782_ACEOF
19783cat confdefs.h >>conftest.$ac_ext
19784cat >>conftest.$ac_ext <<_ACEOF
19785/* end confdefs.h. */
19786$ac_includes_default
19787int
19788main ()
19789{
19790static struct stat ac_aggr;
19791if (sizeof ac_aggr.st_blksize)
19792return 0;
19793 ;
19794 return 0;
19795}
19796_ACEOF
19797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019798if { (ac_try="$ac_compile"
19799case "(($ac_try" in
19800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19801 *) ac_try_echo=$ac_try;;
19802esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019803eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19804$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019805 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000019806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019807 grep -v '^ *+' conftest.er1 >conftest.err
19808 rm -f conftest.er1
19809 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019810 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019811 (exit $ac_status); } && {
19812 test -z "$ac_c_werror_flag" ||
19813 test ! -s conftest.err
19814 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000019815 ac_cv_member_struct_stat_st_blksize=yes
19816else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019817 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019818sed 's/^/| /' conftest.$ac_ext >&5
19819
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019820 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000019821fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019822
19823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019825
19826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000019827fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000019828{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
19829$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; }
19830if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000019831
Martin v. Löwis11437992002-04-12 09:54:03 +000019832cat >>confdefs.h <<_ACEOF
19833#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
19834_ACEOF
19835
19836
Guido van Rossum98bf58f2001-10-18 20:34:25 +000019837fi
19838
Antoine Pitroub52ec782009-01-25 16:34:23 +000019839{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
19840$as_echo_n "checking for struct stat.st_flags... " >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019841if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000019842 $as_echo_n "(cached) " >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019843else
19844 cat >conftest.$ac_ext <<_ACEOF
19845/* confdefs.h. */
19846_ACEOF
19847cat confdefs.h >>conftest.$ac_ext
19848cat >>conftest.$ac_ext <<_ACEOF
19849/* end confdefs.h. */
19850$ac_includes_default
19851int
19852main ()
19853{
19854static struct stat ac_aggr;
19855if (ac_aggr.st_flags)
19856return 0;
19857 ;
19858 return 0;
19859}
19860_ACEOF
19861rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019862if { (ac_try="$ac_compile"
19863case "(($ac_try" in
19864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19865 *) ac_try_echo=$ac_try;;
19866esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019867eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19868$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019869 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019870 ac_status=$?
19871 grep -v '^ *+' conftest.er1 >conftest.err
19872 rm -f conftest.er1
19873 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019874 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019875 (exit $ac_status); } && {
19876 test -z "$ac_c_werror_flag" ||
19877 test ! -s conftest.err
19878 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019879 ac_cv_member_struct_stat_st_flags=yes
19880else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019881 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019882sed 's/^/| /' conftest.$ac_ext >&5
19883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019884 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019885/* confdefs.h. */
19886_ACEOF
19887cat confdefs.h >>conftest.$ac_ext
19888cat >>conftest.$ac_ext <<_ACEOF
19889/* end confdefs.h. */
19890$ac_includes_default
19891int
19892main ()
19893{
19894static struct stat ac_aggr;
19895if (sizeof ac_aggr.st_flags)
19896return 0;
19897 ;
19898 return 0;
19899}
19900_ACEOF
19901rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019902if { (ac_try="$ac_compile"
19903case "(($ac_try" in
19904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19905 *) ac_try_echo=$ac_try;;
19906esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019907eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19908$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019909 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019910 ac_status=$?
19911 grep -v '^ *+' conftest.er1 >conftest.err
19912 rm -f conftest.er1
19913 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019914 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019915 (exit $ac_status); } && {
19916 test -z "$ac_c_werror_flag" ||
19917 test ! -s conftest.err
19918 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019919 ac_cv_member_struct_stat_st_flags=yes
19920else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019921 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019922sed 's/^/| /' conftest.$ac_ext >&5
19923
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019924 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019926
19927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019929
19930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019931fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000019932{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
19933$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; }
19934if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000019935
19936cat >>confdefs.h <<_ACEOF
19937#define HAVE_STRUCT_STAT_ST_FLAGS 1
19938_ACEOF
19939
19940
19941fi
19942
Antoine Pitroub52ec782009-01-25 16:34:23 +000019943{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
19944$as_echo_n "checking for struct stat.st_gen... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019945if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000019946 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019947else
19948 cat >conftest.$ac_ext <<_ACEOF
19949/* confdefs.h. */
19950_ACEOF
19951cat confdefs.h >>conftest.$ac_ext
19952cat >>conftest.$ac_ext <<_ACEOF
19953/* end confdefs.h. */
19954$ac_includes_default
19955int
19956main ()
19957{
19958static struct stat ac_aggr;
19959if (ac_aggr.st_gen)
19960return 0;
19961 ;
19962 return 0;
19963}
19964_ACEOF
19965rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019966if { (ac_try="$ac_compile"
19967case "(($ac_try" in
19968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19969 *) ac_try_echo=$ac_try;;
19970esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000019971eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19972$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019973 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019974 ac_status=$?
19975 grep -v '^ *+' conftest.er1 >conftest.err
19976 rm -f conftest.er1
19977 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000019978 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019979 (exit $ac_status); } && {
19980 test -z "$ac_c_werror_flag" ||
19981 test ! -s conftest.err
19982 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019983 ac_cv_member_struct_stat_st_gen=yes
19984else
Antoine Pitroub52ec782009-01-25 16:34:23 +000019985 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019986sed 's/^/| /' conftest.$ac_ext >&5
19987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019988 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000019989/* confdefs.h. */
19990_ACEOF
19991cat confdefs.h >>conftest.$ac_ext
19992cat >>conftest.$ac_ext <<_ACEOF
19993/* end confdefs.h. */
19994$ac_includes_default
19995int
19996main ()
19997{
19998static struct stat ac_aggr;
19999if (sizeof ac_aggr.st_gen)
20000return 0;
20001 ;
20002 return 0;
20003}
20004_ACEOF
20005rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020006if { (ac_try="$ac_compile"
20007case "(($ac_try" in
20008 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20009 *) ac_try_echo=$ac_try;;
20010esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020011eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20012$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020013 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020014 ac_status=$?
20015 grep -v '^ *+' conftest.er1 >conftest.err
20016 rm -f conftest.er1
20017 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020018 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020019 (exit $ac_status); } && {
20020 test -z "$ac_c_werror_flag" ||
20021 test ! -s conftest.err
20022 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020023 ac_cv_member_struct_stat_st_gen=yes
20024else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020025 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020026sed 's/^/| /' conftest.$ac_ext >&5
20027
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020028 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020029fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020030
20031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020032fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020033
20034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020035fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000020036{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20037$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; }
20038if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020039
20040cat >>confdefs.h <<_ACEOF
20041#define HAVE_STRUCT_STAT_ST_GEN 1
20042_ACEOF
20043
20044
20045fi
20046
Antoine Pitroub52ec782009-01-25 16:34:23 +000020047{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20048$as_echo_n "checking for struct stat.st_birthtime... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020049if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000020050 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020051else
20052 cat >conftest.$ac_ext <<_ACEOF
20053/* confdefs.h. */
20054_ACEOF
20055cat confdefs.h >>conftest.$ac_ext
20056cat >>conftest.$ac_ext <<_ACEOF
20057/* end confdefs.h. */
20058$ac_includes_default
20059int
20060main ()
20061{
20062static struct stat ac_aggr;
20063if (ac_aggr.st_birthtime)
20064return 0;
20065 ;
20066 return 0;
20067}
20068_ACEOF
20069rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020070if { (ac_try="$ac_compile"
20071case "(($ac_try" in
20072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20073 *) ac_try_echo=$ac_try;;
20074esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020075eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20076$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020077 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020078 ac_status=$?
20079 grep -v '^ *+' conftest.er1 >conftest.err
20080 rm -f conftest.er1
20081 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020082 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020083 (exit $ac_status); } && {
20084 test -z "$ac_c_werror_flag" ||
20085 test ! -s conftest.err
20086 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020087 ac_cv_member_struct_stat_st_birthtime=yes
20088else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020089 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020090sed 's/^/| /' conftest.$ac_ext >&5
20091
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020092 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020093/* confdefs.h. */
20094_ACEOF
20095cat confdefs.h >>conftest.$ac_ext
20096cat >>conftest.$ac_ext <<_ACEOF
20097/* end confdefs.h. */
20098$ac_includes_default
20099int
20100main ()
20101{
20102static struct stat ac_aggr;
20103if (sizeof ac_aggr.st_birthtime)
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 Pitroub52ec782009-01-25 16:34:23 +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öwisebd9d5b2005-08-09 15:00:59 +000020118 ac_status=$?
20119 grep -v '^ *+' conftest.er1 >conftest.err
20120 rm -f conftest.er1
20121 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +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öwisebd9d5b2005-08-09 15:00:59 +000020127 ac_cv_member_struct_stat_st_birthtime=yes
20128else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020129 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020130sed 's/^/| /' conftest.$ac_ext >&5
20131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020132 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020134
20135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020136fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020137
20138rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020139fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000020140{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20141$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; }
20142if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020143
20144cat >>confdefs.h <<_ACEOF
20145#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20146_ACEOF
20147
20148
20149fi
20150
Antoine Pitroub52ec782009-01-25 16:34:23 +000020151{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20152$as_echo_n "checking for struct stat.st_blocks... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020153if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000020154 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020155else
Martin v. Löwis11437992002-04-12 09:54:03 +000020156 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020157/* confdefs.h. */
20158_ACEOF
20159cat confdefs.h >>conftest.$ac_ext
20160cat >>conftest.$ac_ext <<_ACEOF
20161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020162$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020163int
20164main ()
20165{
20166static struct stat ac_aggr;
20167if (ac_aggr.st_blocks)
20168return 0;
20169 ;
20170 return 0;
20171}
20172_ACEOF
20173rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020174if { (ac_try="$ac_compile"
20175case "(($ac_try" in
20176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20177 *) ac_try_echo=$ac_try;;
20178esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020179eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20180$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020181 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020182 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020183 grep -v '^ *+' conftest.er1 >conftest.err
20184 rm -f conftest.er1
20185 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020186 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020187 (exit $ac_status); } && {
20188 test -z "$ac_c_werror_flag" ||
20189 test ! -s conftest.err
20190 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020191 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020192else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020193 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020194sed 's/^/| /' conftest.$ac_ext >&5
20195
Thomas Wouters47b49bf2007-08-30 22:15:33 +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. */
20202$ac_includes_default
20203int
20204main ()
20205{
20206static struct stat ac_aggr;
20207if (sizeof ac_aggr.st_blocks)
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 Pitroub52ec782009-01-25 16:34:23 +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
Skip Montanaro6dead952003-09-25 14:50:04 +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 Pitroub52ec782009-01-25 16:34:23 +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
Skip Montanaro6dead952003-09-25 14:50:04 +000020231 ac_cv_member_struct_stat_st_blocks=yes
20232else
Antoine Pitroub52ec782009-01-25 16:34:23 +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 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020238
20239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020241
20242rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020243fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000020244{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20245$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; }
20246if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020247
Martin v. Löwis11437992002-04-12 09:54:03 +000020248cat >>confdefs.h <<_ACEOF
20249#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20250_ACEOF
20251
20252
20253cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020254#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020255_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020256
20257else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020258 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020259 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020260 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20261 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020262esac
20263
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020264fi
20265
Michael W. Hudson54241132001-12-07 15:38:26 +000020266
Martin v. Löwis11437992002-04-12 09:54:03 +000020267
Antoine Pitroub52ec782009-01-25 16:34:23 +000020268{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20269$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020270if test "${ac_cv_header_time_altzone+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000020271 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020272else
Martin v. Löwis11437992002-04-12 09:54:03 +000020273 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020274/* confdefs.h. */
20275_ACEOF
20276cat confdefs.h >>conftest.$ac_ext
20277cat >>conftest.$ac_ext <<_ACEOF
20278/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020279#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020280int
20281main ()
20282{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020283return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000020284 ;
20285 return 0;
20286}
20287_ACEOF
20288rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020289if { (ac_try="$ac_compile"
20290case "(($ac_try" in
20291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20292 *) ac_try_echo=$ac_try;;
20293esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020294eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20295$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020298 grep -v '^ *+' conftest.er1 >conftest.err
20299 rm -f conftest.er1
20300 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020301 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020302 (exit $ac_status); } && {
20303 test -z "$ac_c_werror_flag" ||
20304 test ! -s conftest.err
20305 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020306 ac_cv_header_time_altzone=yes
20307else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020308 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020309sed 's/^/| /' conftest.$ac_ext >&5
20310
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020311 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000020312fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20315fi
20316
Antoine Pitroub52ec782009-01-25 16:34:23 +000020317{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
20318$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020319if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020320
20321cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020322#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020323_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020324
20325fi
20326
Guido van Rossumda88dad1995-01-26 00:46:29 +000020327was_it_defined=no
Antoine Pitroub52ec782009-01-25 16:34:23 +000020328{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
20329$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 +000020330cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020331/* confdefs.h. */
20332_ACEOF
20333cat confdefs.h >>conftest.$ac_ext
20334cat >>conftest.$ac_ext <<_ACEOF
20335/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020336
20337#include <sys/types.h>
20338#include <sys/select.h>
20339#include <sys/time.h>
20340
Martin v. Löwis11437992002-04-12 09:54:03 +000020341int
20342main ()
20343{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020344;
Martin v. Löwis11437992002-04-12 09:54:03 +000020345 ;
20346 return 0;
20347}
20348_ACEOF
20349rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020350if { (ac_try="$ac_compile"
20351case "(($ac_try" in
20352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20353 *) ac_try_echo=$ac_try;;
20354esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020355eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20356$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020357 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020358 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020359 grep -v '^ *+' conftest.er1 >conftest.err
20360 rm -f conftest.er1
20361 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020362 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020363 (exit $ac_status); } && {
20364 test -z "$ac_c_werror_flag" ||
20365 test ! -s conftest.err
20366 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020367
20368
20369cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020370#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020371_ACEOF
20372
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020373 was_it_defined=yes
20374
Guido van Rossumf78abae1997-01-21 22:02:36 +000020375else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020376 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020377sed 's/^/| /' conftest.$ac_ext >&5
20378
Thomas Wouters477c8d52006-05-27 19:21:47 +000020379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020380fi
20381
20382rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000020383{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
20384$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020385
Antoine Pitroub52ec782009-01-25 16:34:23 +000020386{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5
20387$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020388if test "${ac_cv_struct_addrinfo+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000020389 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020390else
Martin v. Löwis11437992002-04-12 09:54:03 +000020391 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020392/* confdefs.h. */
20393_ACEOF
20394cat confdefs.h >>conftest.$ac_ext
20395cat >>conftest.$ac_ext <<_ACEOF
20396/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020397
20398# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020399int
20400main ()
20401{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020402struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000020403 ;
20404 return 0;
20405}
20406_ACEOF
20407rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020408if { (ac_try="$ac_compile"
20409case "(($ac_try" in
20410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20411 *) ac_try_echo=$ac_try;;
20412esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020413eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20414$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020415 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020417 grep -v '^ *+' conftest.er1 >conftest.err
20418 rm -f conftest.er1
20419 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020420 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020421 (exit $ac_status); } && {
20422 test -z "$ac_c_werror_flag" ||
20423 test ! -s conftest.err
20424 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020425 ac_cv_struct_addrinfo=yes
20426else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020427 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020428sed 's/^/| /' conftest.$ac_ext >&5
20429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020430 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020431fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20434fi
20435
Antoine Pitroub52ec782009-01-25 16:34:23 +000020436{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
20437$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020438if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020439
20440cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020441#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020442_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020443
20444fi
20445
Antoine Pitroub52ec782009-01-25 16:34:23 +000020446{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
20447$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020448if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000020449 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020450else
Martin v. Löwis11437992002-04-12 09:54:03 +000020451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020452/* confdefs.h. */
20453_ACEOF
20454cat confdefs.h >>conftest.$ac_ext
20455cat >>conftest.$ac_ext <<_ACEOF
20456/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020457
20458# include <sys/types.h>
20459# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020460int
20461main ()
20462{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020463struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000020464 ;
20465 return 0;
20466}
20467_ACEOF
20468rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020469if { (ac_try="$ac_compile"
20470case "(($ac_try" in
20471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20472 *) ac_try_echo=$ac_try;;
20473esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020474eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20475$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020476 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020477 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020478 grep -v '^ *+' conftest.er1 >conftest.err
20479 rm -f conftest.er1
20480 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020481 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020482 (exit $ac_status); } && {
20483 test -z "$ac_c_werror_flag" ||
20484 test ! -s conftest.err
20485 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020486 ac_cv_struct_sockaddr_storage=yes
20487else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020488 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020489sed 's/^/| /' conftest.$ac_ext >&5
20490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020491 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020492fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000020493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020494rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20495fi
20496
Antoine Pitroub52ec782009-01-25 16:34:23 +000020497{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
20498$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020499if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020500
20501cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020502#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020503_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020504
20505fi
20506
Guido van Rossum627b2d71993-12-24 10:39:16 +000020507# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000020508
Michael W. Hudson54241132001-12-07 15:38:26 +000020509
Antoine Pitroub52ec782009-01-25 16:34:23 +000020510{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
20511$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020512if test "${ac_cv_c_char_unsigned+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000020513 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000020514else
Martin v. Löwis11437992002-04-12 09:54:03 +000020515 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020516/* confdefs.h. */
20517_ACEOF
20518cat confdefs.h >>conftest.$ac_ext
20519cat >>conftest.$ac_ext <<_ACEOF
20520/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020521$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020522int
20523main ()
20524{
20525static int test_array [1 - 2 * !(((char) -1) < 0)];
20526test_array [0] = 0
20527
20528 ;
20529 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000020530}
Martin v. Löwis11437992002-04-12 09:54:03 +000020531_ACEOF
20532rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020533if { (ac_try="$ac_compile"
20534case "(($ac_try" in
20535 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20536 *) ac_try_echo=$ac_try;;
20537esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020538eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20539$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020540 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020541 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020542 grep -v '^ *+' conftest.er1 >conftest.err
20543 rm -f conftest.er1
20544 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020545 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020546 (exit $ac_status); } && {
20547 test -z "$ac_c_werror_flag" ||
20548 test ! -s conftest.err
20549 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000020550 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020551else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020552 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020553sed 's/^/| /' conftest.$ac_ext >&5
20554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020555 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020557
20558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020559fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000020560{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
20561$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020562if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020563 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020564#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020565_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020566
20567fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000020568
Antoine Pitroub52ec782009-01-25 16:34:23 +000020569{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
20570$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020571if test "${ac_cv_c_const+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000020572 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020573else
20574 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020575/* confdefs.h. */
20576_ACEOF
20577cat confdefs.h >>conftest.$ac_ext
20578cat >>conftest.$ac_ext <<_ACEOF
20579/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020580
Martin v. Löwis11437992002-04-12 09:54:03 +000020581int
20582main ()
20583{
20584/* FIXME: Include the comments suggested by Paul. */
20585#ifndef __cplusplus
20586 /* Ultrix mips cc rejects this. */
20587 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020588 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000020589 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020590 char const *const *pcpcc;
20591 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020592 /* NEC SVR4.0.2 mips cc rejects this. */
20593 struct point {int x, y;};
20594 static struct point const zero = {0,0};
20595 /* AIX XL C 1.02.0.0 rejects this.
20596 It does not let you subtract one const X* pointer from another in
20597 an arm of an if-expression whose if-part is not a constant
20598 expression */
20599 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020600 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020601 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020602 ++pcpcc;
20603 ppc = (char**) pcpcc;
20604 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000020605 { /* SCO 3.2v4 cc rejects this. */
20606 char *t;
20607 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020608
Martin v. Löwis11437992002-04-12 09:54:03 +000020609 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020610 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020611 }
20612 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
20613 int x[] = {25, 17};
20614 const int *foo = &x[0];
20615 ++foo;
20616 }
20617 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20618 typedef const int *iptr;
20619 iptr p = 0;
20620 ++p;
20621 }
20622 { /* AIX XL C 1.02.0.0 rejects this saying
20623 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20624 struct s { int j; const int *ap[3]; };
20625 struct s *b; b->j = 5;
20626 }
20627 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20628 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020629 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020630 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020631 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000020632#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000020633
Martin v. Löwis11437992002-04-12 09:54:03 +000020634 ;
20635 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000020636}
Martin v. Löwis11437992002-04-12 09:54:03 +000020637_ACEOF
20638rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020639if { (ac_try="$ac_compile"
20640case "(($ac_try" in
20641 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20642 *) ac_try_echo=$ac_try;;
20643esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020644eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20645$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020646 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020647 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020648 grep -v '^ *+' conftest.er1 >conftest.err
20649 rm -f conftest.er1
20650 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020651 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020652 (exit $ac_status); } && {
20653 test -z "$ac_c_werror_flag" ||
20654 test ! -s conftest.err
20655 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020656 ac_cv_c_const=yes
20657else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020658 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020659sed 's/^/| /' conftest.$ac_ext >&5
20660
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020661 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020662fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020663
20664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020665fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000020666{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
20667$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020668if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020669
20670cat >>confdefs.h <<\_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000020671#define const /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000020672_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020673
20674fi
20675
Michael W. Hudson54241132001-12-07 15:38:26 +000020676
Guido van Rossumda88dad1995-01-26 00:46:29 +000020677works=no
Antoine Pitroub52ec782009-01-25 16:34:23 +000020678{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
20679$as_echo_n "checking for working volatile... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020680cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020681/* confdefs.h. */
20682_ACEOF
20683cat confdefs.h >>conftest.$ac_ext
20684cat >>conftest.$ac_ext <<_ACEOF
20685/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020686
Martin v. Löwis11437992002-04-12 09:54:03 +000020687int
20688main ()
20689{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020690volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020691 ;
20692 return 0;
20693}
20694_ACEOF
20695rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020696if { (ac_try="$ac_compile"
20697case "(($ac_try" in
20698 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20699 *) ac_try_echo=$ac_try;;
20700esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020701eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20702$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020703 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020704 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020705 grep -v '^ *+' conftest.er1 >conftest.err
20706 rm -f conftest.er1
20707 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020708 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020709 (exit $ac_status); } && {
20710 test -z "$ac_c_werror_flag" ||
20711 test ! -s conftest.err
20712 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020713 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020714else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020715 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020716sed 's/^/| /' conftest.$ac_ext >&5
20717
Martin v. Löwis11437992002-04-12 09:54:03 +000020718
20719cat >>confdefs.h <<\_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000020720#define volatile /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000020721_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020722
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020723
Guido van Rossum627b2d71993-12-24 10:39:16 +000020724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020725
20726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000020727{ $as_echo "$as_me:$LINENO: result: $works" >&5
20728$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020729
Guido van Rossumda88dad1995-01-26 00:46:29 +000020730works=no
Antoine Pitroub52ec782009-01-25 16:34:23 +000020731{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5
20732$as_echo_n "checking for working signed char... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020734/* confdefs.h. */
20735_ACEOF
20736cat confdefs.h >>conftest.$ac_ext
20737cat >>conftest.$ac_ext <<_ACEOF
20738/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020739
Martin v. Löwis11437992002-04-12 09:54:03 +000020740int
20741main ()
20742{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020743signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000020744 ;
20745 return 0;
20746}
20747_ACEOF
20748rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020749if { (ac_try="$ac_compile"
20750case "(($ac_try" in
20751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20752 *) ac_try_echo=$ac_try;;
20753esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020754eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20755$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020756 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020757 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020758 grep -v '^ *+' conftest.er1 >conftest.err
20759 rm -f conftest.er1
20760 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020761 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020762 (exit $ac_status); } && {
20763 test -z "$ac_c_werror_flag" ||
20764 test ! -s conftest.err
20765 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000020766 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000020767else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020768 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020769sed 's/^/| /' conftest.$ac_ext >&5
20770
Martin v. Löwis11437992002-04-12 09:54:03 +000020771
20772cat >>confdefs.h <<\_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000020773#define signed /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000020774_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000020775
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020776
Guido van Rossum7f43da71994-08-01 12:15:30 +000020777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020778
20779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000020780{ $as_echo "$as_me:$LINENO: result: $works" >&5
20781$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000020782
Guido van Rossumda88dad1995-01-26 00:46:29 +000020783have_prototypes=no
Antoine Pitroub52ec782009-01-25 16:34:23 +000020784{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5
20785$as_echo_n "checking for prototypes... " >&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 +000020792int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020793int
20794main ()
20795{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020796return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000020797 ;
20798 return 0;
20799}
20800_ACEOF
20801rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020802if { (ac_try="$ac_compile"
20803case "(($ac_try" in
20804 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20805 *) ac_try_echo=$ac_try;;
20806esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020807eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20808$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020809 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020810 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020811 grep -v '^ *+' conftest.er1 >conftest.err
20812 rm -f conftest.er1
20813 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020814 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020815 (exit $ac_status); } && {
20816 test -z "$ac_c_werror_flag" ||
20817 test ! -s conftest.err
20818 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020819
20820
20821cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020822#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020823_ACEOF
20824
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020825 have_prototypes=yes
20826
Guido van Rossumf78abae1997-01-21 22:02:36 +000020827else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020828 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020829sed 's/^/| /' conftest.$ac_ext >&5
20830
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020831
Guido van Rossum7f43da71994-08-01 12:15:30 +000020832fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020833
20834rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000020835{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5
20836$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020837
Guido van Rossumda88dad1995-01-26 00:46:29 +000020838works=no
Antoine Pitroub52ec782009-01-25 16:34:23 +000020839{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
20840$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020841cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020842/* confdefs.h. */
20843_ACEOF
20844cat confdefs.h >>conftest.$ac_ext
20845cat >>conftest.$ac_ext <<_ACEOF
20846/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020847
20848#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000020849int foo(int x, ...) {
20850 va_list va;
20851 va_start(va, x);
20852 va_arg(va, int);
20853 va_arg(va, char *);
20854 va_arg(va, double);
20855 return 0;
20856}
Guido van Rossum7f43da71994-08-01 12:15:30 +000020857
Martin v. Löwis11437992002-04-12 09:54:03 +000020858int
20859main ()
20860{
Guido van Rossum90eea071996-08-30 20:58:57 +000020861return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000020862 ;
20863 return 0;
20864}
20865_ACEOF
20866rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020867if { (ac_try="$ac_compile"
20868case "(($ac_try" in
20869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20870 *) ac_try_echo=$ac_try;;
20871esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020872eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20873$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020876 grep -v '^ *+' conftest.er1 >conftest.err
20877 rm -f conftest.er1
20878 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020879 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020880 (exit $ac_status); } && {
20881 test -z "$ac_c_werror_flag" ||
20882 test ! -s conftest.err
20883 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020884
20885
20886cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020887#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020888_ACEOF
20889
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020890 works=yes
20891
Guido van Rossumf78abae1997-01-21 22:02:36 +000020892else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020893 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020894sed 's/^/| /' conftest.$ac_ext >&5
20895
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020896
Guido van Rossum627b2d71993-12-24 10:39:16 +000020897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020898
20899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000020900{ $as_echo "$as_me:$LINENO: result: $works" >&5
20901$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020902
Martin v. Löwisd6320502004-08-12 13:45:08 +000020903# check for socketpair
Antoine Pitroub52ec782009-01-25 16:34:23 +000020904{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5
20905$as_echo_n "checking for socketpair... " >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020906cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000020907/* confdefs.h. */
20908_ACEOF
20909cat confdefs.h >>conftest.$ac_ext
20910cat >>conftest.$ac_ext <<_ACEOF
20911/* end confdefs.h. */
20912
20913#include <sys/types.h>
20914#include <sys/socket.h>
20915
20916int
20917main ()
20918{
20919void *x=socketpair
20920 ;
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 Pitroub52ec782009-01-25 16:34:23 +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öwisd6320502004-08-12 13:45:08 +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 Pitroub52ec782009-01-25 16:34:23 +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öwisd6320502004-08-12 13:45:08 +000020942
20943cat >>confdefs.h <<\_ACEOF
20944#define HAVE_SOCKETPAIR 1
20945_ACEOF
20946
Antoine Pitroub52ec782009-01-25 16:34:23 +000020947 { $as_echo "$as_me:$LINENO: result: yes" >&5
20948$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020949else
Antoine Pitroub52ec782009-01-25 16:34:23 +000020950 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000020951sed 's/^/| /' conftest.$ac_ext >&5
20952
Antoine Pitroub52ec782009-01-25 16:34:23 +000020953 { $as_echo "$as_me:$LINENO: result: no" >&5
20954$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000020955
20956fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020957
20958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000020959
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020960# check if sockaddr has sa_len member
Antoine Pitroub52ec782009-01-25 16:34:23 +000020961{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
20962$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020963cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020964/* confdefs.h. */
20965_ACEOF
20966cat confdefs.h >>conftest.$ac_ext
20967cat >>conftest.$ac_ext <<_ACEOF
20968/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020969#include <sys/types.h>
20970#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020971int
20972main ()
20973{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020974struct sockaddr x;
20975x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000020976 ;
20977 return 0;
20978}
20979_ACEOF
20980rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020981if { (ac_try="$ac_compile"
20982case "(($ac_try" in
20983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20984 *) ac_try_echo=$ac_try;;
20985esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000020986eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20987$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020988 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020989 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020990 grep -v '^ *+' conftest.er1 >conftest.err
20991 rm -f conftest.er1
20992 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000020993 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020994 (exit $ac_status); } && {
20995 test -z "$ac_c_werror_flag" ||
20996 test ! -s conftest.err
20997 } && test -s conftest.$ac_objext; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000020998 { $as_echo "$as_me:$LINENO: result: yes" >&5
20999$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021000
21001cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021002#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021003_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021004
21005else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021006 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021007sed 's/^/| /' conftest.$ac_ext >&5
21008
Antoine Pitroub52ec782009-01-25 16:34:23 +000021009 { $as_echo "$as_me:$LINENO: result: no" >&5
21010$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021012
21013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021014
Guido van Rossumda88dad1995-01-26 00:46:29 +000021015va_list_is_array=no
Antoine Pitroub52ec782009-01-25 16:34:23 +000021016{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21017$as_echo_n "checking whether va_list is an array... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021018cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021019/* confdefs.h. */
21020_ACEOF
21021cat confdefs.h >>conftest.$ac_ext
21022cat >>conftest.$ac_ext <<_ACEOF
21023/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021024
21025#ifdef HAVE_STDARG_PROTOTYPES
21026#include <stdarg.h>
21027#else
21028#include <varargs.h>
21029#endif
21030
Martin v. Löwis11437992002-04-12 09:54:03 +000021031int
21032main ()
21033{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021034va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021035 ;
21036 return 0;
21037}
21038_ACEOF
21039rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021040if { (ac_try="$ac_compile"
21041case "(($ac_try" in
21042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21043 *) ac_try_echo=$ac_try;;
21044esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021045eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21046$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021047 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021048 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021049 grep -v '^ *+' conftest.er1 >conftest.err
21050 rm -f conftest.er1
21051 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000021052 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021053 (exit $ac_status); } && {
21054 test -z "$ac_c_werror_flag" ||
21055 test ! -s conftest.err
21056 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021057 :
21058else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021059 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021060sed 's/^/| /' conftest.$ac_ext >&5
21061
Martin v. Löwis11437992002-04-12 09:54:03 +000021062
21063
21064cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021065#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021066_ACEOF
21067
Guido van Rossumda88dad1995-01-26 00:46:29 +000021068 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021069
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021071
21072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000021073{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21074$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021075
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021076# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021077
21078
21079
Antoine Pitroub52ec782009-01-25 16:34:23 +000021080{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21081$as_echo_n "checking for gethostbyname_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021082if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000021083 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021084else
Martin v. Löwis11437992002-04-12 09:54:03 +000021085 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021086/* confdefs.h. */
21087_ACEOF
21088cat confdefs.h >>conftest.$ac_ext
21089cat >>conftest.$ac_ext <<_ACEOF
21090/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021091/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21092 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21093#define gethostbyname_r innocuous_gethostbyname_r
21094
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021095/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021096 which can conflict with char gethostbyname_r (); below.
21097 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021098 <limits.h> exists even on freestanding compilers. */
21099
21100#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021101# include <limits.h>
21102#else
21103# include <assert.h>
21104#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021105
21106#undef gethostbyname_r
21107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021108/* Override any GCC internal prototype to avoid an error.
21109 Use char because int might match the return type of a GCC
21110 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021111#ifdef __cplusplus
21112extern "C"
21113#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021114char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021115/* The GNU C library defines this for functions which it implements
21116 to always fail with ENOSYS. Some functions are actually named
21117 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021118#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021119choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021120#endif
21121
Skip Montanaro6dead952003-09-25 14:50:04 +000021122int
21123main ()
21124{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021125return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021126 ;
21127 return 0;
21128}
21129_ACEOF
21130rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021131if { (ac_try="$ac_link"
21132case "(($ac_try" in
21133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21134 *) ac_try_echo=$ac_try;;
21135esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021136eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21137$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021138 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021139 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021140 grep -v '^ *+' conftest.er1 >conftest.err
21141 rm -f conftest.er1
21142 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000021143 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021144 (exit $ac_status); } && {
21145 test -z "$ac_c_werror_flag" ||
21146 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000021147 } && test -s conftest$ac_exeext && {
21148 test "$cross_compiling" = yes ||
21149 $as_test_x conftest$ac_exeext
21150 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021151 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021152else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021153 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021154sed 's/^/| /' conftest.$ac_ext >&5
21155
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021156 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021158
Antoine Pitroub52ec782009-01-25 16:34:23 +000021159rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021160rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021161 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021162fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000021163{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21164$as_echo "$ac_cv_func_gethostbyname_r" >&6; }
21165if test "x$ac_cv_func_gethostbyname_r" = x""yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021166
Martin v. Löwis11437992002-04-12 09:54:03 +000021167 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021168#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021169_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021170
Antoine Pitroub52ec782009-01-25 16:34:23 +000021171 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21172$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021173 OLD_CFLAGS=$CFLAGS
21174 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021176/* confdefs.h. */
21177_ACEOF
21178cat confdefs.h >>conftest.$ac_ext
21179cat >>conftest.$ac_ext <<_ACEOF
21180/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021181
21182# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021183
Martin v. Löwis11437992002-04-12 09:54:03 +000021184int
21185main ()
21186{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021187
21188 char *name;
21189 struct hostent *he, *res;
21190 char buffer[2048];
21191 int buflen = 2048;
21192 int h_errnop;
21193
21194 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021195
21196 ;
21197 return 0;
21198}
21199_ACEOF
21200rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021201if { (ac_try="$ac_compile"
21202case "(($ac_try" in
21203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21204 *) ac_try_echo=$ac_try;;
21205esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021206eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21207$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021208 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021209 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021210 grep -v '^ *+' conftest.er1 >conftest.err
21211 rm -f conftest.er1
21212 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000021213 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021214 (exit $ac_status); } && {
21215 test -z "$ac_c_werror_flag" ||
21216 test ! -s conftest.err
21217 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021218
21219 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021220#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021221_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021222
Martin v. Löwis11437992002-04-12 09:54:03 +000021223
21224cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021225#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021226_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021227
Antoine Pitroub52ec782009-01-25 16:34:23 +000021228 { $as_echo "$as_me:$LINENO: result: yes" >&5
21229$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021230
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021231else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021232 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021233sed 's/^/| /' conftest.$ac_ext >&5
21234
Martin v. Löwis11437992002-04-12 09:54:03 +000021235
Antoine Pitroub52ec782009-01-25 16:34:23 +000021236 { $as_echo "$as_me:$LINENO: result: no" >&5
21237$as_echo "no" >&6; }
21238 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21239$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021240 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021241/* confdefs.h. */
21242_ACEOF
21243cat confdefs.h >>conftest.$ac_ext
21244cat >>conftest.$ac_ext <<_ACEOF
21245/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021246
21247# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021248
Martin v. Löwis11437992002-04-12 09:54:03 +000021249int
21250main ()
21251{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021252
21253 char *name;
21254 struct hostent *he;
21255 char buffer[2048];
21256 int buflen = 2048;
21257 int h_errnop;
21258
21259 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021260
21261 ;
21262 return 0;
21263}
21264_ACEOF
21265rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021266if { (ac_try="$ac_compile"
21267case "(($ac_try" in
21268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21269 *) ac_try_echo=$ac_try;;
21270esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021271eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21272$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021275 grep -v '^ *+' conftest.er1 >conftest.err
21276 rm -f conftest.er1
21277 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000021278 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021279 (exit $ac_status); } && {
21280 test -z "$ac_c_werror_flag" ||
21281 test ! -s conftest.err
21282 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021283
21284 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021285#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021286_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021287
Martin v. Löwis11437992002-04-12 09:54:03 +000021288
21289cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021290#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021291_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021292
Antoine Pitroub52ec782009-01-25 16:34:23 +000021293 { $as_echo "$as_me:$LINENO: result: yes" >&5
21294$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021295
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021296else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021297 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021298sed 's/^/| /' conftest.$ac_ext >&5
21299
Martin v. Löwis11437992002-04-12 09:54:03 +000021300
Antoine Pitroub52ec782009-01-25 16:34:23 +000021301 { $as_echo "$as_me:$LINENO: result: no" >&5
21302$as_echo "no" >&6; }
21303 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
21304$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021306/* confdefs.h. */
21307_ACEOF
21308cat confdefs.h >>conftest.$ac_ext
21309cat >>conftest.$ac_ext <<_ACEOF
21310/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021311
21312# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021313
Martin v. Löwis11437992002-04-12 09:54:03 +000021314int
21315main ()
21316{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021317
21318 char *name;
21319 struct hostent *he;
21320 struct hostent_data data;
21321
21322 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000021323
21324 ;
21325 return 0;
21326}
21327_ACEOF
21328rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021329if { (ac_try="$ac_compile"
21330case "(($ac_try" in
21331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21332 *) ac_try_echo=$ac_try;;
21333esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021334eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21335$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021336 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021338 grep -v '^ *+' conftest.er1 >conftest.err
21339 rm -f conftest.er1
21340 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000021341 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021342 (exit $ac_status); } && {
21343 test -z "$ac_c_werror_flag" ||
21344 test ! -s conftest.err
21345 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021346
21347 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021348#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021349_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021350
Martin v. Löwis11437992002-04-12 09:54:03 +000021351
21352cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021353#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021354_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021355
Antoine Pitroub52ec782009-01-25 16:34:23 +000021356 { $as_echo "$as_me:$LINENO: result: yes" >&5
21357$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021358
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021359else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021360 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021361sed 's/^/| /' conftest.$ac_ext >&5
21362
Martin v. Löwis11437992002-04-12 09:54:03 +000021363
Antoine Pitroub52ec782009-01-25 16:34:23 +000021364 { $as_echo "$as_me:$LINENO: result: no" >&5
21365$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021366
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021368
21369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021370
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021371fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021372
21373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021374
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021375fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021376
21377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021378 CFLAGS=$OLD_CFLAGS
21379
21380else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021381
Martin v. Löwis11437992002-04-12 09:54:03 +000021382
21383for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000021384do
Antoine Pitroub52ec782009-01-25 16:34:23 +000021385as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21386{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21387$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021388if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000021389 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021390else
Martin v. Löwis11437992002-04-12 09:54:03 +000021391 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021392/* confdefs.h. */
21393_ACEOF
21394cat confdefs.h >>conftest.$ac_ext
21395cat >>conftest.$ac_ext <<_ACEOF
21396/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021397/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21398 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21399#define $ac_func innocuous_$ac_func
21400
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021401/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021402 which can conflict with char $ac_func (); below.
21403 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021404 <limits.h> exists even on freestanding compilers. */
21405
21406#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021407# include <limits.h>
21408#else
21409# include <assert.h>
21410#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021411
21412#undef $ac_func
21413
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021414/* Override any GCC internal prototype to avoid an error.
21415 Use char because int might match the return type of a GCC
21416 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021417#ifdef __cplusplus
21418extern "C"
21419#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021420char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021421/* The GNU C library defines this for functions which it implements
21422 to always fail with ENOSYS. Some functions are actually named
21423 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021424#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021425choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021426#endif
21427
Skip Montanaro6dead952003-09-25 14:50:04 +000021428int
21429main ()
21430{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021431return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021432 ;
21433 return 0;
21434}
21435_ACEOF
21436rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021437if { (ac_try="$ac_link"
21438case "(($ac_try" in
21439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21440 *) ac_try_echo=$ac_try;;
21441esac
Antoine Pitroub52ec782009-01-25 16:34:23 +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_link") 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 Pitroub52ec782009-01-25 16:34:23 +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
Antoine Pitroub52ec782009-01-25 16:34:23 +000021453 } && test -s conftest$ac_exeext && {
21454 test "$cross_compiling" = yes ||
21455 $as_test_x conftest$ac_exeext
21456 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021457 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000021458else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021459 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021460sed 's/^/| /' conftest.$ac_ext >&5
21461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021462 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000021463fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021464
Antoine Pitroub52ec782009-01-25 16:34:23 +000021465rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021466rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021467 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021468fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000021469ac_res=`eval 'as_val=${'$as_ac_var'}
21470 $as_echo "$as_val"'`
21471 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
21472$as_echo "$ac_res" >&6; }
21473as_val=`eval 'as_val=${'$as_ac_var'}
21474 $as_echo "$as_val"'`
21475 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021476 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000021477#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021478_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021479
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021480fi
Thomas Wouters3a584202000-08-05 23:28:51 +000021481done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021482
Michael W. Hudson54241132001-12-07 15:38:26 +000021483
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021484fi
21485
Michael W. Hudson54241132001-12-07 15:38:26 +000021486
21487
21488
21489
21490
21491
Guido van Rossum627b2d71993-12-24 10:39:16 +000021492# checks for system services
21493# (none yet)
21494
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021495# Linux requires this for correct f.p. operations
Antoine Pitroub52ec782009-01-25 16:34:23 +000021496{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5
21497$as_echo_n "checking for __fpu_control... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021498if test "${ac_cv_func___fpu_control+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000021499 $as_echo_n "(cached) " >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021500else
Martin v. Löwis11437992002-04-12 09:54:03 +000021501 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021502/* confdefs.h. */
21503_ACEOF
21504cat confdefs.h >>conftest.$ac_ext
21505cat >>conftest.$ac_ext <<_ACEOF
21506/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021507/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
21508 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21509#define __fpu_control innocuous___fpu_control
21510
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021511/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021512 which can conflict with char __fpu_control (); below.
21513 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021514 <limits.h> exists even on freestanding compilers. */
21515
21516#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021517# include <limits.h>
21518#else
21519# include <assert.h>
21520#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021521
21522#undef __fpu_control
21523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021524/* Override any GCC internal prototype to avoid an error.
21525 Use char because int might match the return type of a GCC
21526 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021527#ifdef __cplusplus
21528extern "C"
21529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021530char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021531/* The GNU C library defines this for functions which it implements
21532 to always fail with ENOSYS. Some functions are actually named
21533 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021534#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021535choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021536#endif
21537
Skip Montanaro6dead952003-09-25 14:50:04 +000021538int
21539main ()
21540{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021541return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021542 ;
21543 return 0;
21544}
21545_ACEOF
21546rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021547if { (ac_try="$ac_link"
21548case "(($ac_try" in
21549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21550 *) ac_try_echo=$ac_try;;
21551esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021552eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21553$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021554 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021555 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021556 grep -v '^ *+' conftest.er1 >conftest.err
21557 rm -f conftest.er1
21558 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000021559 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021560 (exit $ac_status); } && {
21561 test -z "$ac_c_werror_flag" ||
21562 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000021563 } && test -s conftest$ac_exeext && {
21564 test "$cross_compiling" = yes ||
21565 $as_test_x conftest$ac_exeext
21566 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021567 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021568else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021569 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021570sed 's/^/| /' conftest.$ac_ext >&5
21571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021572 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021574
Antoine Pitroub52ec782009-01-25 16:34:23 +000021575rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021577 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021578fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000021579{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
21580$as_echo "$ac_cv_func___fpu_control" >&6; }
21581if test "x$ac_cv_func___fpu_control" = x""yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021582 :
21583else
Martin v. Löwis11437992002-04-12 09:54:03 +000021584
Antoine Pitroub52ec782009-01-25 16:34:23 +000021585{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
21586$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021587if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000021588 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021589else
Martin v. Löwis11437992002-04-12 09:54:03 +000021590 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021591LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021592cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021593/* confdefs.h. */
21594_ACEOF
21595cat confdefs.h >>conftest.$ac_ext
21596cat >>conftest.$ac_ext <<_ACEOF
21597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021598
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021599/* Override any GCC internal prototype to avoid an error.
21600 Use char because int might match the return type of a GCC
21601 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021602#ifdef __cplusplus
21603extern "C"
21604#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021605char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021606int
21607main ()
21608{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021609return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021610 ;
21611 return 0;
21612}
21613_ACEOF
21614rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021615if { (ac_try="$ac_link"
21616case "(($ac_try" in
21617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21618 *) ac_try_echo=$ac_try;;
21619esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021620eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21621$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021622 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021624 grep -v '^ *+' conftest.er1 >conftest.err
21625 rm -f conftest.er1
21626 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000021627 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021628 (exit $ac_status); } && {
21629 test -z "$ac_c_werror_flag" ||
21630 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000021631 } && test -s conftest$ac_exeext && {
21632 test "$cross_compiling" = yes ||
21633 $as_test_x conftest$ac_exeext
21634 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021635 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021636else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021637 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021638sed 's/^/| /' conftest.$ac_ext >&5
21639
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021640 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021641fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021642
Antoine Pitroub52ec782009-01-25 16:34:23 +000021643rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021644rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021645 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021646LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021647fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000021648{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
21649$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
21650if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021651 cat >>confdefs.h <<_ACEOF
21652#define HAVE_LIBIEEE 1
21653_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021654
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000021655 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021656
Guido van Rossum627b2d71993-12-24 10:39:16 +000021657fi
21658
Michael W. Hudson54241132001-12-07 15:38:26 +000021659
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000021660fi
21661
Michael W. Hudson54241132001-12-07 15:38:26 +000021662
Guido van Rossum7f253911997-05-09 02:42:48 +000021663# Check for --with-fpectl
Antoine Pitroub52ec782009-01-25 16:34:23 +000021664{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5
21665$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021667# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000021668if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021669 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000021670if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000021671then
21672
21673cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000021674#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021675_ACEOF
21676
Antoine Pitroub52ec782009-01-25 16:34:23 +000021677 { $as_echo "$as_me:$LINENO: result: yes" >&5
21678$as_echo "yes" >&6; }
21679else { $as_echo "$as_me:$LINENO: result: no" >&5
21680$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021681fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000021682else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021683 { $as_echo "$as_me:$LINENO: result: no" >&5
21684$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021685fi
21686
Guido van Rossum7f253911997-05-09 02:42:48 +000021687
Guido van Rossum7f43da71994-08-01 12:15:30 +000021688# check for --with-libm=...
21689
Guido van Rossum563e7081996-09-10 18:20:48 +000021690case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000021691Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000021692*) LIBM=-lm
21693esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021694{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
21695$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021696
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021697# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021698if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021699 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000021700if test "$withval" = no
21701then LIBM=
Antoine Pitroub52ec782009-01-25 16:34:23 +000021702 { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5
21703$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021704elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021705then LIBM=$withval
Antoine Pitroub52ec782009-01-25 16:34:23 +000021706 { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
21707$as_echo "set LIBM=\"$withval\"" >&6; }
21708else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
21709$as_echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021710 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021711fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021712else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021713 { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
21714$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021715fi
21716
Guido van Rossum7f43da71994-08-01 12:15:30 +000021717
21718# check for --with-libc=...
21719
Antoine Pitroub52ec782009-01-25 16:34:23 +000021720{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
21721$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021723# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021724if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021725 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000021726if test "$withval" = no
21727then LIBC=
Antoine Pitroub52ec782009-01-25 16:34:23 +000021728 { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5
21729$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000021730elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000021731then LIBC=$withval
Antoine Pitroub52ec782009-01-25 16:34:23 +000021732 { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
21733$as_echo "set LIBC=\"$withval\"" >&6; }
21734else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
21735$as_echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000021736 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021737fi
Guido van Rossum7f253911997-05-09 02:42:48 +000021738else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021739 { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
21740$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021741fi
21742
Guido van Rossum7f43da71994-08-01 12:15:30 +000021743
Christian Heimes99170a52007-12-19 02:07:34 +000021744# ************************************
21745# * Check for mathematical functions *
21746# ************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021747
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000021748LIBS_SAVE=$LIBS
21749LIBS="$LIBS $LIBM"
Martin v. Löwis11437992002-04-12 09:54:03 +000021750
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021751# Detect whether system arithmetic is subject to x87-style double
21752# rounding issues. The result of this test has little meaning on non
21753# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
21754# mode is round-to-nearest and double rounding issues are present, and
21755# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Antoine Pitroub52ec782009-01-25 16:34:23 +000021756{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
21757$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021758if test "${ac_cv_x87_double_rounding+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000021759 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021760else
21761
21762if test "$cross_compiling" = yes; then
21763 ac_cv_x87_double_rounding=no
21764else
21765 cat >conftest.$ac_ext <<_ACEOF
21766/* confdefs.h. */
21767_ACEOF
21768cat confdefs.h >>conftest.$ac_ext
21769cat >>conftest.$ac_ext <<_ACEOF
21770/* end confdefs.h. */
21771
21772#include <stdlib.h>
21773#include <math.h>
21774int main() {
21775 volatile double x, y, z;
21776 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
21777 x = 0.99999999999999989; /* 1-2**-53 */
21778 y = 1./x;
21779 if (y != 1.)
21780 exit(0);
21781 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
21782 x = 1e16;
21783 y = 2.99999;
21784 z = x + y;
21785 if (z != 1e16+4.)
21786 exit(0);
21787 /* both tests show evidence of double rounding */
21788 exit(1);
21789}
21790
21791_ACEOF
21792rm -f conftest$ac_exeext
21793if { (ac_try="$ac_link"
21794case "(($ac_try" in
21795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21796 *) ac_try_echo=$ac_try;;
21797esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021798eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21799$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021800 (eval "$ac_link") 2>&5
21801 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000021802 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21804 { (case "(($ac_try" in
21805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21806 *) ac_try_echo=$ac_try;;
21807esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021808eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21809$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021810 (eval "$ac_try") 2>&5
21811 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000021812 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021813 (exit $ac_status); }; }; then
21814 ac_cv_x87_double_rounding=no
21815else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021816 $as_echo "$as_me: program exited with status $ac_status" >&5
21817$as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021818sed 's/^/| /' conftest.$ac_ext >&5
21819
21820( exit $ac_status )
21821ac_cv_x87_double_rounding=yes
21822fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000021823rm -rf conftest.dSYM
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021824rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21825fi
21826
21827
21828fi
21829
Antoine Pitroub52ec782009-01-25 16:34:23 +000021830{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
21831$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000021832if test "$ac_cv_x87_double_rounding" = yes
21833then
21834
21835cat >>confdefs.h <<\_ACEOF
21836#define X87_DOUBLE_ROUNDING 1
21837_ACEOF
21838
21839fi
21840
21841
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021842# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
21843# -0. on some architectures.
Antoine Pitroub52ec782009-01-25 16:34:23 +000021844{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
21845$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021846if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000021847 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021848else
21849
21850if test "$cross_compiling" = yes; then
21851 ac_cv_tanh_preserves_zero_sign=no
21852else
21853 cat >conftest.$ac_ext <<_ACEOF
21854/* confdefs.h. */
21855_ACEOF
21856cat confdefs.h >>conftest.$ac_ext
21857cat >>conftest.$ac_ext <<_ACEOF
21858/* end confdefs.h. */
21859
21860#include <math.h>
21861#include <stdlib.h>
21862int main() {
21863 /* return 0 if either negative zeros don't exist
21864 on this platform or if negative zeros exist
21865 and tanh(-0.) == -0. */
21866 if (atan2(0., -1.) == atan2(-0., -1.) ||
21867 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
21868 else exit(1);
21869}
21870
21871_ACEOF
21872rm -f conftest$ac_exeext
21873if { (ac_try="$ac_link"
21874case "(($ac_try" in
21875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21876 *) ac_try_echo=$ac_try;;
21877esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021878eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21879$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021880 (eval "$ac_link") 2>&5
21881 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000021882 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021883 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21884 { (case "(($ac_try" in
21885 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21886 *) ac_try_echo=$ac_try;;
21887esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021888eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21889$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021890 (eval "$ac_try") 2>&5
21891 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000021892 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021893 (exit $ac_status); }; }; then
21894 ac_cv_tanh_preserves_zero_sign=yes
21895else
Antoine Pitroub52ec782009-01-25 16:34:23 +000021896 $as_echo "$as_me: program exited with status $ac_status" >&5
21897$as_echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021898sed 's/^/| /' conftest.$ac_ext >&5
21899
21900( exit $ac_status )
21901ac_cv_tanh_preserves_zero_sign=no
21902fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000021903rm -rf conftest.dSYM
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21905fi
21906
21907
21908fi
21909
Antoine Pitroub52ec782009-01-25 16:34:23 +000021910{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
21911$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000021912if test "$ac_cv_tanh_preserves_zero_sign" = yes
21913then
21914
21915cat >>confdefs.h <<\_ACEOF
21916#define TANH_PRESERVES_ZERO_SIGN 1
21917_ACEOF
21918
21919fi
21920
21921
Guido van Rossum2b3ac691996-08-30 15:18:41 +000021922
Michael W. Hudson54241132001-12-07 15:38:26 +000021923
Christian Heimes99170a52007-12-19 02:07:34 +000021924
21925
21926
21927
21928
Mark Dickinson0f632572009-01-05 17:10:09 +000021929for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
Christian Heimes99170a52007-12-19 02:07:34 +000021930do
Antoine Pitroub52ec782009-01-25 16:34:23 +000021931as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21932{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
21933$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000021934if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000021935 $as_echo_n "(cached) " >&6
Christian Heimes99170a52007-12-19 02:07:34 +000021936else
21937 cat >conftest.$ac_ext <<_ACEOF
21938/* confdefs.h. */
21939_ACEOF
21940cat confdefs.h >>conftest.$ac_ext
21941cat >>conftest.$ac_ext <<_ACEOF
21942/* end confdefs.h. */
21943/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
21944 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21945#define $ac_func innocuous_$ac_func
21946
21947/* System header to define __stub macros and hopefully few prototypes,
21948 which can conflict with char $ac_func (); below.
21949 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
21950 <limits.h> exists even on freestanding compilers. */
21951
21952#ifdef __STDC__
21953# include <limits.h>
21954#else
21955# include <assert.h>
21956#endif
21957
21958#undef $ac_func
21959
21960/* Override any GCC internal prototype to avoid an error.
21961 Use char because int might match the return type of a GCC
21962 builtin and then its argument prototype would still apply. */
21963#ifdef __cplusplus
21964extern "C"
21965#endif
21966char $ac_func ();
21967/* The GNU C library defines this for functions which it implements
21968 to always fail with ENOSYS. Some functions are actually named
21969 something starting with __ and the normal name is an alias. */
21970#if defined __stub_$ac_func || defined __stub___$ac_func
21971choke me
21972#endif
21973
21974int
21975main ()
21976{
21977return $ac_func ();
21978 ;
21979 return 0;
21980}
21981_ACEOF
21982rm -f conftest.$ac_objext conftest$ac_exeext
21983if { (ac_try="$ac_link"
21984case "(($ac_try" in
21985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21986 *) ac_try_echo=$ac_try;;
21987esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000021988eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21989$as_echo "$ac_try_echo") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000021990 (eval "$ac_link") 2>conftest.er1
21991 ac_status=$?
21992 grep -v '^ *+' conftest.er1 >conftest.err
21993 rm -f conftest.er1
21994 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000021995 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000021996 (exit $ac_status); } && {
21997 test -z "$ac_c_werror_flag" ||
21998 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000021999 } && test -s conftest$ac_exeext && {
22000 test "$cross_compiling" = yes ||
22001 $as_test_x conftest$ac_exeext
22002 }; then
Christian Heimes99170a52007-12-19 02:07:34 +000022003 eval "$as_ac_var=yes"
22004else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022005 $as_echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000022006sed 's/^/| /' conftest.$ac_ext >&5
22007
22008 eval "$as_ac_var=no"
22009fi
22010
Antoine Pitroub52ec782009-01-25 16:34:23 +000022011rm -rf conftest.dSYM
Christian Heimes99170a52007-12-19 02:07:34 +000022012rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22013 conftest$ac_exeext conftest.$ac_ext
22014fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022015ac_res=`eval 'as_val=${'$as_ac_var'}
22016 $as_echo "$as_val"'`
22017 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22018$as_echo "$ac_res" >&6; }
22019as_val=`eval 'as_val=${'$as_ac_var'}
22020 $as_echo "$as_val"'`
22021 if test "x$as_val" = x""yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000022022 cat >>confdefs.h <<_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000022023#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000022024_ACEOF
22025
22026fi
22027done
22028
Antoine Pitroub52ec782009-01-25 16:34:23 +000022029{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22030$as_echo_n "checking whether isinf is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022031if test "${ac_cv_have_decl_isinf+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022032 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022033else
22034 cat >conftest.$ac_ext <<_ACEOF
22035/* confdefs.h. */
22036_ACEOF
22037cat confdefs.h >>conftest.$ac_ext
22038cat >>conftest.$ac_ext <<_ACEOF
22039/* end confdefs.h. */
22040#include <math.h>
22041
22042int
22043main ()
22044{
22045#ifndef isinf
22046 (void) isinf;
22047#endif
22048
22049 ;
22050 return 0;
22051}
22052_ACEOF
22053rm -f conftest.$ac_objext
22054if { (ac_try="$ac_compile"
22055case "(($ac_try" in
22056 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22057 *) ac_try_echo=$ac_try;;
22058esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022059eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22060$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022061 (eval "$ac_compile") 2>conftest.er1
22062 ac_status=$?
22063 grep -v '^ *+' conftest.er1 >conftest.err
22064 rm -f conftest.er1
22065 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022066 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022067 (exit $ac_status); } && {
22068 test -z "$ac_c_werror_flag" ||
22069 test ! -s conftest.err
22070 } && test -s conftest.$ac_objext; then
22071 ac_cv_have_decl_isinf=yes
22072else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022073 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022074sed 's/^/| /' conftest.$ac_ext >&5
22075
22076 ac_cv_have_decl_isinf=no
22077fi
22078
22079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22080fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022081{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22082$as_echo "$ac_cv_have_decl_isinf" >&6; }
22083if test "x$ac_cv_have_decl_isinf" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022084
22085cat >>confdefs.h <<_ACEOF
22086#define HAVE_DECL_ISINF 1
22087_ACEOF
22088
22089
22090else
22091 cat >>confdefs.h <<_ACEOF
22092#define HAVE_DECL_ISINF 0
22093_ACEOF
22094
22095
22096fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022097{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22098$as_echo_n "checking whether isnan is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022099if test "${ac_cv_have_decl_isnan+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022100 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022101else
22102 cat >conftest.$ac_ext <<_ACEOF
22103/* confdefs.h. */
22104_ACEOF
22105cat confdefs.h >>conftest.$ac_ext
22106cat >>conftest.$ac_ext <<_ACEOF
22107/* end confdefs.h. */
22108#include <math.h>
22109
22110int
22111main ()
22112{
22113#ifndef isnan
22114 (void) isnan;
22115#endif
22116
22117 ;
22118 return 0;
22119}
22120_ACEOF
22121rm -f conftest.$ac_objext
22122if { (ac_try="$ac_compile"
22123case "(($ac_try" in
22124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22125 *) ac_try_echo=$ac_try;;
22126esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022127eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22128$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022129 (eval "$ac_compile") 2>conftest.er1
22130 ac_status=$?
22131 grep -v '^ *+' conftest.er1 >conftest.err
22132 rm -f conftest.er1
22133 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022134 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022135 (exit $ac_status); } && {
22136 test -z "$ac_c_werror_flag" ||
22137 test ! -s conftest.err
22138 } && test -s conftest.$ac_objext; then
22139 ac_cv_have_decl_isnan=yes
22140else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022141 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022142sed 's/^/| /' conftest.$ac_ext >&5
22143
22144 ac_cv_have_decl_isnan=no
22145fi
22146
22147rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22148fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022149{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22150$as_echo "$ac_cv_have_decl_isnan" >&6; }
22151if test "x$ac_cv_have_decl_isnan" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022152
22153cat >>confdefs.h <<_ACEOF
22154#define HAVE_DECL_ISNAN 1
22155_ACEOF
22156
22157
22158else
22159 cat >>confdefs.h <<_ACEOF
22160#define HAVE_DECL_ISNAN 0
22161_ACEOF
22162
22163
22164fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022165{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22166$as_echo_n "checking whether isfinite is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022167if test "${ac_cv_have_decl_isfinite+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022168 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022169else
22170 cat >conftest.$ac_ext <<_ACEOF
22171/* confdefs.h. */
22172_ACEOF
22173cat confdefs.h >>conftest.$ac_ext
22174cat >>conftest.$ac_ext <<_ACEOF
22175/* end confdefs.h. */
22176#include <math.h>
22177
22178int
22179main ()
22180{
22181#ifndef isfinite
22182 (void) isfinite;
22183#endif
22184
22185 ;
22186 return 0;
22187}
22188_ACEOF
22189rm -f conftest.$ac_objext
22190if { (ac_try="$ac_compile"
22191case "(($ac_try" in
22192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22193 *) ac_try_echo=$ac_try;;
22194esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022195eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22196$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022197 (eval "$ac_compile") 2>conftest.er1
22198 ac_status=$?
22199 grep -v '^ *+' conftest.er1 >conftest.err
22200 rm -f conftest.er1
22201 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022202 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022203 (exit $ac_status); } && {
22204 test -z "$ac_c_werror_flag" ||
22205 test ! -s conftest.err
22206 } && test -s conftest.$ac_objext; then
22207 ac_cv_have_decl_isfinite=yes
22208else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022209 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022210sed 's/^/| /' conftest.$ac_ext >&5
22211
22212 ac_cv_have_decl_isfinite=no
22213fi
22214
22215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22216fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022217{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22218$as_echo "$ac_cv_have_decl_isfinite" >&6; }
22219if test "x$ac_cv_have_decl_isfinite" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022220
22221cat >>confdefs.h <<_ACEOF
22222#define HAVE_DECL_ISFINITE 1
22223_ACEOF
22224
22225
22226else
22227 cat >>confdefs.h <<_ACEOF
22228#define HAVE_DECL_ISFINITE 0
22229_ACEOF
22230
22231
22232fi
22233
22234
Christian Heimes99170a52007-12-19 02:07:34 +000022235
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022236LIBS=$LIBS_SAVE
22237
Guido van Rossumef2255b2000-03-10 22:30:29 +000022238# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022239if test "${ac_cv_header_wchar_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022240 { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
22241$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022242if test "${ac_cv_header_wchar_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022243 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022244fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022245{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22246$as_echo "$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022247else
Martin v. Löwis11437992002-04-12 09:54:03 +000022248 # Is the header compilable?
Antoine Pitroub52ec782009-01-25 16:34:23 +000022249{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5
22250$as_echo_n "checking wchar.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022251cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022252/* confdefs.h. */
22253_ACEOF
22254cat confdefs.h >>conftest.$ac_ext
22255cat >>conftest.$ac_ext <<_ACEOF
22256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022257$ac_includes_default
22258#include <wchar.h>
22259_ACEOF
22260rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022261if { (ac_try="$ac_compile"
22262case "(($ac_try" in
22263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22264 *) ac_try_echo=$ac_try;;
22265esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022266eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22267$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022268 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022269 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022270 grep -v '^ *+' conftest.er1 >conftest.err
22271 rm -f conftest.er1
22272 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022273 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022274 (exit $ac_status); } && {
22275 test -z "$ac_c_werror_flag" ||
22276 test ! -s conftest.err
22277 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022278 ac_header_compiler=yes
22279else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022280 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022281sed 's/^/| /' conftest.$ac_ext >&5
22282
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022283 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022284fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022285
22286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000022287{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
22288$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022289
22290# Is the header present?
Antoine Pitroub52ec782009-01-25 16:34:23 +000022291{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5
22292$as_echo_n "checking wchar.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022293cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022294/* confdefs.h. */
22295_ACEOF
22296cat confdefs.h >>conftest.$ac_ext
22297cat >>conftest.$ac_ext <<_ACEOF
22298/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000022299#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022300_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022301if { (ac_try="$ac_cpp conftest.$ac_ext"
22302case "(($ac_try" in
22303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22304 *) ac_try_echo=$ac_try;;
22305esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022306eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22307$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022308 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022309 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000022310 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000022311 rm -f conftest.er1
22312 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022313 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022314 (exit $ac_status); } >/dev/null && {
22315 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
22316 test ! -s conftest.err
22317 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022318 ac_header_preproc=yes
22319else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022320 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022321sed 's/^/| /' conftest.$ac_ext >&5
22322
Martin v. Löwis11437992002-04-12 09:54:03 +000022323 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000022324fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022325
Martin v. Löwis11437992002-04-12 09:54:03 +000022326rm -f conftest.err conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000022327{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
22328$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022329
22330# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022331case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
22332 yes:no: )
Antoine Pitroub52ec782009-01-25 16:34:23 +000022333 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
22334$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
22335 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
22336$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000022337 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000022338 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000022339 no:yes:* )
Antoine Pitroub52ec782009-01-25 16:34:23 +000022340 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
22341$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
22342 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
22343$as_echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
22344 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
22345$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
22346 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
22347$as_echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
22348 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
22349$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
22350 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
22351$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022352 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000022353## ------------------------------------------------ ##
22354## Report this to http://www.python.org/python-bugs ##
22355## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000022356_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022357 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000022358 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022359esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022360{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
22361$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022362if test "${ac_cv_header_wchar_h+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022363 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022364else
22365 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000022366fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022367{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22368$as_echo "$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022369
22370fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022371if test "x$ac_cv_header_wchar_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022372
22373
22374cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000022375#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022376_ACEOF
22377
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022378 wchar_h="yes"
22379
Guido van Rossumef2255b2000-03-10 22:30:29 +000022380else
Martin v. Löwis11437992002-04-12 09:54:03 +000022381 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000022382
22383fi
22384
Michael W. Hudson54241132001-12-07 15:38:26 +000022385
Martin v. Löwis11437992002-04-12 09:54:03 +000022386
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022387# determine wchar_t size
22388if test "$wchar_h" = yes
22389then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022390 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022391# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22392# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22393# This bug is HP SR number 8606223364.
Antoine Pitroub52ec782009-01-25 16:34:23 +000022394{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5
22395$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022396if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022397 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022398else
Martin v. Löwis11437992002-04-12 09:54:03 +000022399 if test "$cross_compiling" = yes; then
22400 # Depending upon the size, compute the lo and hi bounds.
22401cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022402/* confdefs.h. */
22403_ACEOF
22404cat confdefs.h >>conftest.$ac_ext
22405cat >>conftest.$ac_ext <<_ACEOF
22406/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022407#include <wchar.h>
22408
Martin v. Löwis11437992002-04-12 09:54:03 +000022409int
22410main ()
22411{
Antoine Pitroub52ec782009-01-25 16:34:23 +000022412static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022413test_array [0] = 0
22414
22415 ;
22416 return 0;
22417}
22418_ACEOF
22419rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022420if { (ac_try="$ac_compile"
22421case "(($ac_try" in
22422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22423 *) ac_try_echo=$ac_try;;
22424esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022425eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22426$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022429 grep -v '^ *+' conftest.er1 >conftest.err
22430 rm -f conftest.er1
22431 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022432 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022433 (exit $ac_status); } && {
22434 test -z "$ac_c_werror_flag" ||
22435 test ! -s conftest.err
22436 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022437 ac_lo=0 ac_mid=0
22438 while :; do
22439 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022440/* confdefs.h. */
22441_ACEOF
22442cat confdefs.h >>conftest.$ac_ext
22443cat >>conftest.$ac_ext <<_ACEOF
22444/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022445#include <wchar.h>
22446
Martin v. Löwis11437992002-04-12 09:54:03 +000022447int
22448main ()
22449{
Antoine Pitroub52ec782009-01-25 16:34:23 +000022450static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022451test_array [0] = 0
22452
22453 ;
22454 return 0;
22455}
22456_ACEOF
22457rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022458if { (ac_try="$ac_compile"
22459case "(($ac_try" in
22460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22461 *) ac_try_echo=$ac_try;;
22462esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022463eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22464$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022465 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022467 grep -v '^ *+' conftest.er1 >conftest.err
22468 rm -f conftest.er1
22469 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022470 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022471 (exit $ac_status); } && {
22472 test -z "$ac_c_werror_flag" ||
22473 test ! -s conftest.err
22474 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022475 ac_hi=$ac_mid; break
22476else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022477 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022478sed 's/^/| /' conftest.$ac_ext >&5
22479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022480 ac_lo=`expr $ac_mid + 1`
22481 if test $ac_lo -le $ac_mid; then
22482 ac_lo= ac_hi=
22483 break
22484 fi
22485 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022486fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022487
22488rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022489 done
22490else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022491 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022492sed 's/^/| /' conftest.$ac_ext >&5
22493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022494 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022495/* confdefs.h. */
22496_ACEOF
22497cat confdefs.h >>conftest.$ac_ext
22498cat >>conftest.$ac_ext <<_ACEOF
22499/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022500#include <wchar.h>
22501
Martin v. Löwis11437992002-04-12 09:54:03 +000022502int
22503main ()
22504{
Antoine Pitroub52ec782009-01-25 16:34:23 +000022505static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022506test_array [0] = 0
22507
22508 ;
22509 return 0;
22510}
22511_ACEOF
22512rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022513if { (ac_try="$ac_compile"
22514case "(($ac_try" in
22515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22516 *) ac_try_echo=$ac_try;;
22517esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022518eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22519$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022522 grep -v '^ *+' conftest.er1 >conftest.err
22523 rm -f conftest.er1
22524 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022525 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022526 (exit $ac_status); } && {
22527 test -z "$ac_c_werror_flag" ||
22528 test ! -s conftest.err
22529 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022530 ac_hi=-1 ac_mid=-1
22531 while :; do
22532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022533/* confdefs.h. */
22534_ACEOF
22535cat confdefs.h >>conftest.$ac_ext
22536cat >>conftest.$ac_ext <<_ACEOF
22537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022538#include <wchar.h>
22539
Martin v. Löwis11437992002-04-12 09:54:03 +000022540int
22541main ()
22542{
Antoine Pitroub52ec782009-01-25 16:34:23 +000022543static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022544test_array [0] = 0
22545
22546 ;
22547 return 0;
22548}
22549_ACEOF
22550rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022551if { (ac_try="$ac_compile"
22552case "(($ac_try" in
22553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22554 *) ac_try_echo=$ac_try;;
22555esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022556eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22557$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022560 grep -v '^ *+' conftest.er1 >conftest.err
22561 rm -f conftest.er1
22562 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022563 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022564 (exit $ac_status); } && {
22565 test -z "$ac_c_werror_flag" ||
22566 test ! -s conftest.err
22567 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022568 ac_lo=$ac_mid; break
22569else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022570 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022571sed 's/^/| /' conftest.$ac_ext >&5
22572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022573 ac_hi=`expr '(' $ac_mid ')' - 1`
22574 if test $ac_mid -le $ac_hi; then
22575 ac_lo= ac_hi=
22576 break
22577 fi
22578 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000022579fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022580
22581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022582 done
22583else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022584 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022585sed 's/^/| /' conftest.$ac_ext >&5
22586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022587 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000022588fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022589
22590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022591fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022592
22593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022594# Binary search between lo and hi bounds.
22595while test "x$ac_lo" != "x$ac_hi"; do
22596 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022598/* confdefs.h. */
22599_ACEOF
22600cat confdefs.h >>conftest.$ac_ext
22601cat >>conftest.$ac_ext <<_ACEOF
22602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022603#include <wchar.h>
22604
Martin v. Löwis11437992002-04-12 09:54:03 +000022605int
22606main ()
22607{
Antoine Pitroub52ec782009-01-25 16:34:23 +000022608static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000022609test_array [0] = 0
22610
22611 ;
22612 return 0;
22613}
22614_ACEOF
22615rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022616if { (ac_try="$ac_compile"
22617case "(($ac_try" in
22618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22619 *) ac_try_echo=$ac_try;;
22620esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022621eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22622$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022623 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022625 grep -v '^ *+' conftest.er1 >conftest.err
22626 rm -f conftest.er1
22627 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022628 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022629 (exit $ac_status); } && {
22630 test -z "$ac_c_werror_flag" ||
22631 test ! -s conftest.err
22632 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022633 ac_hi=$ac_mid
22634else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022635 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022636sed 's/^/| /' conftest.$ac_ext >&5
22637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022638 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000022639fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022640
22641rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022642done
22643case $ac_lo in
22644?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022645'') if test "$ac_cv_type_wchar_t" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022646 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
22647$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22648{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022649See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022650$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022651See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000022652 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022653 else
22654 ac_cv_sizeof_wchar_t=0
22655 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000022656esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022657else
Martin v. Löwis11437992002-04-12 09:54:03 +000022658 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022659/* confdefs.h. */
22660_ACEOF
22661cat confdefs.h >>conftest.$ac_ext
22662cat >>conftest.$ac_ext <<_ACEOF
22663/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022664#include <wchar.h>
22665
Antoine Pitroub52ec782009-01-25 16:34:23 +000022666static long int longval () { return (long int) (sizeof (wchar_t)); }
22667static unsigned long int ulongval () { return (long int) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000022668#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022669#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022670int
22671main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022672{
Martin v. Löwis11437992002-04-12 09:54:03 +000022673
22674 FILE *f = fopen ("conftest.val", "w");
22675 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022676 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000022677 if (((long int) (sizeof (wchar_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000022678 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022679 long int i = longval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000022680 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022681 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000022682 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000022683 }
22684 else
22685 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022686 unsigned long int i = ulongval ();
Antoine Pitroub52ec782009-01-25 16:34:23 +000022687 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022688 return 1;
Antoine Pitroub52ec782009-01-25 16:34:23 +000022689 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000022690 }
Antoine Pitroub52ec782009-01-25 16:34:23 +000022691 /* Do not output a trailing newline, as this causes \r\n confusion
22692 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022693 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022694
22695 ;
22696 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000022697}
Martin v. Löwis11437992002-04-12 09:54:03 +000022698_ACEOF
22699rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022700if { (ac_try="$ac_link"
22701case "(($ac_try" in
22702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22703 *) ac_try_echo=$ac_try;;
22704esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022705eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22706$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022707 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022708 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000022709 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022710 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022711 { (case "(($ac_try" in
22712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22713 *) ac_try_echo=$ac_try;;
22714esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022715eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22716$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022717 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022718 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000022719 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000022720 (exit $ac_status); }; }; then
22721 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000022722else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022723 $as_echo "$as_me: program exited with status $ac_status" >&5
22724$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022725sed 's/^/| /' conftest.$ac_ext >&5
22726
Martin v. Löwis11437992002-04-12 09:54:03 +000022727( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022728if test "$ac_cv_type_wchar_t" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022729 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
22730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22731{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022732See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022733$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000022734See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000022735 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022736 else
22737 ac_cv_sizeof_wchar_t=0
22738 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022739fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022740rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022741rm -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 +000022742fi
22743rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000022744fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022745{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
22746$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022747
22748
22749
Martin v. Löwis11437992002-04-12 09:54:03 +000022750cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022751#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022752_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022753
Michael W. Hudson54241132001-12-07 15:38:26 +000022754
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022755fi
22756
Antoine Pitroub52ec782009-01-25 16:34:23 +000022757{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
22758$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022759have_ucs4_tcl=no
22760cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022761/* confdefs.h. */
22762_ACEOF
22763cat confdefs.h >>conftest.$ac_ext
22764cat >>conftest.$ac_ext <<_ACEOF
22765/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022766
22767#include <tcl.h>
22768#if TCL_UTF_MAX != 6
22769# error "NOT UCS4_TCL"
22770#endif
22771int
22772main ()
22773{
22774
22775 ;
22776 return 0;
22777}
22778_ACEOF
22779rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022780if { (ac_try="$ac_compile"
22781case "(($ac_try" in
22782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22783 *) ac_try_echo=$ac_try;;
22784esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022785eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22786$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022789 grep -v '^ *+' conftest.er1 >conftest.err
22790 rm -f conftest.er1
22791 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000022792 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022793 (exit $ac_status); } && {
22794 test -z "$ac_c_werror_flag" ||
22795 test ! -s conftest.err
22796 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022797
22798
22799cat >>confdefs.h <<\_ACEOF
22800#define HAVE_UCS4_TCL 1
22801_ACEOF
22802
22803 have_ucs4_tcl=yes
22804
22805else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022806 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022807sed 's/^/| /' conftest.$ac_ext >&5
22808
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022809
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022811
22812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Antoine Pitroub52ec782009-01-25 16:34:23 +000022813{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
22814$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000022815
Skip Montanaro6dead952003-09-25 14:50:04 +000022816# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022817if test "$wchar_h" = yes
22818then
22819 # check whether wchar_t is signed or not
Antoine Pitroub52ec782009-01-25 16:34:23 +000022820 { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
22821$as_echo_n "checking whether wchar_t is signed... " >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022822 if test "${ac_cv_wchar_t_signed+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022823 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022824else
22825
22826 if test "$cross_compiling" = yes; then
22827 ac_cv_wchar_t_signed=yes
22828else
22829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022830/* confdefs.h. */
22831_ACEOF
22832cat confdefs.h >>conftest.$ac_ext
22833cat >>conftest.$ac_ext <<_ACEOF
22834/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022835
22836 #include <wchar.h>
22837 int main()
22838 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000022839 /* Success: exit code 0 */
22840 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022841 }
22842
22843_ACEOF
22844rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022845if { (ac_try="$ac_link"
22846case "(($ac_try" in
22847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22848 *) ac_try_echo=$ac_try;;
22849esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022850eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22851$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022852 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022853 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000022854 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022855 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022856 { (case "(($ac_try" in
22857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22858 *) ac_try_echo=$ac_try;;
22859esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000022860eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22861$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022862 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022863 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000022864 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022865 (exit $ac_status); }; }; then
22866 ac_cv_wchar_t_signed=yes
22867else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022868 $as_echo "$as_me: program exited with status $ac_status" >&5
22869$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022870sed 's/^/| /' conftest.$ac_ext >&5
22871
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022872( exit $ac_status )
22873ac_cv_wchar_t_signed=no
22874fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022875rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022876rm -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 +000022877fi
22878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022879
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000022880fi
22881
Antoine Pitroub52ec782009-01-25 16:34:23 +000022882 { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
22883$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022884fi
22885
Antoine Pitroub52ec782009-01-25 16:34:23 +000022886{ $as_echo "$as_me:$LINENO: checking what type to use for str" >&5
22887$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000022888
22889# Check whether --with-wide-unicode was given.
22890if test "${with_wide_unicode+set}" = set; then
22891 withval=$with_wide_unicode;
22892if test "$withval" != no
22893then unicode_size="4"
22894else unicode_size="2"
22895fi
22896
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022897else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022898
Georg Brandl52d168a2008-01-07 18:10:24 +000022899case "$have_ucs4_tcl" in
22900 yes) unicode_size="4" ;;
22901 *) unicode_size="2" ;;
22902esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022903
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022904fi
22905
Martin v. Löwis0036cba2002-04-12 09:58:45 +000022906
22907
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022908
Georg Brandl52d168a2008-01-07 18:10:24 +000022909case "$unicode_size" in
22910 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022911#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000022912_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000022913 ;;
22914 *) cat >>confdefs.h <<\_ACEOF
22915#define Py_UNICODE_SIZE 2
22916_ACEOF
22917 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022918esac
22919
Michael W. Hudson54241132001-12-07 15:38:26 +000022920
Martin v. Löwis11437992002-04-12 09:54:03 +000022921
22922
Georg Brandl52d168a2008-01-07 18:10:24 +000022923# wchar_t is only usable if it maps to an unsigned type
22924if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000022925 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000022926then
22927 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022928
Martin v. Löwis11437992002-04-12 09:54:03 +000022929cat >>confdefs.h <<\_ACEOF
22930#define HAVE_USABLE_WCHAR_T 1
22931_ACEOF
22932
Georg Brandl52d168a2008-01-07 18:10:24 +000022933 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022934#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000022935_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022936
Georg Brandl52d168a2008-01-07 18:10:24 +000022937elif test "$ac_cv_sizeof_short" = "$unicode_size"
22938then
22939 PY_UNICODE_TYPE="unsigned short"
22940 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022941#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000022942_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022943
Georg Brandl52d168a2008-01-07 18:10:24 +000022944elif test "$ac_cv_sizeof_long" = "$unicode_size"
22945then
22946 PY_UNICODE_TYPE="unsigned long"
22947 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022948#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000022949_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022950
Georg Brandl52d168a2008-01-07 18:10:24 +000022951else
22952 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000022953fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000022954{ $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
22955$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022956
22957# check for endianness
Antoine Pitroub52ec782009-01-25 16:34:23 +000022958
22959 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
22960$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022961if test "${ac_cv_c_bigendian+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000022962 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000022963else
Antoine Pitroub52ec782009-01-25 16:34:23 +000022964 ac_cv_c_bigendian=unknown
22965 # See if we're dealing with a universal compiler.
22966 cat >conftest.$ac_ext <<_ACEOF
22967/* confdefs.h. */
22968_ACEOF
22969cat confdefs.h >>conftest.$ac_ext
22970cat >>conftest.$ac_ext <<_ACEOF
22971/* end confdefs.h. */
22972#ifndef __APPLE_CC__
22973 not a universal capable compiler
22974 #endif
22975 typedef int dummy;
22976
22977_ACEOF
22978rm -f conftest.$ac_objext
22979if { (ac_try="$ac_compile"
22980case "(($ac_try" in
22981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22982 *) ac_try_echo=$ac_try;;
22983esac
22984eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22985$as_echo "$ac_try_echo") >&5
22986 (eval "$ac_compile") 2>conftest.er1
22987 ac_status=$?
22988 grep -v '^ *+' conftest.er1 >conftest.err
22989 rm -f conftest.er1
22990 cat conftest.err >&5
22991 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
22992 (exit $ac_status); } && {
22993 test -z "$ac_c_werror_flag" ||
22994 test ! -s conftest.err
22995 } && test -s conftest.$ac_objext; then
22996
22997 # Check for potential -arch flags. It is not universal unless
22998 # there are some -arch flags. Note that *ppc* also matches
22999 # ppc64. This check is also rather less than ideal.
23000 case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
23001 *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
23002 esac
23003else
23004 $as_echo "$as_me: failed program was:" >&5
23005sed 's/^/| /' conftest.$ac_ext >&5
23006
23007
23008fi
23009
23010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23011 if test $ac_cv_c_bigendian = unknown; then
23012 # See if sys/param.h defines the BYTE_ORDER macro.
23013 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023014/* confdefs.h. */
23015_ACEOF
23016cat confdefs.h >>conftest.$ac_ext
23017cat >>conftest.$ac_ext <<_ACEOF
23018/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023019#include <sys/types.h>
Antoine Pitroub52ec782009-01-25 16:34:23 +000023020 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023021
Martin v. Löwis11437992002-04-12 09:54:03 +000023022int
23023main ()
23024{
Antoine Pitroub52ec782009-01-25 16:34:23 +000023025#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23026 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23027 && LITTLE_ENDIAN)
23028 bogus endian macros
23029 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023030
23031 ;
23032 return 0;
23033}
23034_ACEOF
23035rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023036if { (ac_try="$ac_compile"
23037case "(($ac_try" in
23038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23039 *) ac_try_echo=$ac_try;;
23040esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023041eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23042$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023045 grep -v '^ *+' conftest.er1 >conftest.err
23046 rm -f conftest.er1
23047 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000023048 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023049 (exit $ac_status); } && {
23050 test -z "$ac_c_werror_flag" ||
23051 test ! -s conftest.err
23052 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023053 # It does; now see whether it defined to BIG_ENDIAN or not.
Antoine Pitroub52ec782009-01-25 16:34:23 +000023054 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023055/* confdefs.h. */
23056_ACEOF
23057cat confdefs.h >>conftest.$ac_ext
23058cat >>conftest.$ac_ext <<_ACEOF
23059/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023060#include <sys/types.h>
Antoine Pitroub52ec782009-01-25 16:34:23 +000023061 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023062
Martin v. Löwis11437992002-04-12 09:54:03 +000023063int
23064main ()
23065{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023066#if BYTE_ORDER != BIG_ENDIAN
Antoine Pitroub52ec782009-01-25 16:34:23 +000023067 not big endian
23068 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023069
23070 ;
23071 return 0;
23072}
23073_ACEOF
23074rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023075if { (ac_try="$ac_compile"
23076case "(($ac_try" in
23077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23078 *) ac_try_echo=$ac_try;;
23079esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023080eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23081$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023082 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023083 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023084 grep -v '^ *+' conftest.er1 >conftest.err
23085 rm -f conftest.er1
23086 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000023087 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023088 (exit $ac_status); } && {
23089 test -z "$ac_c_werror_flag" ||
23090 test ! -s conftest.err
23091 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023092 ac_cv_c_bigendian=yes
23093else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023094 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023095sed 's/^/| /' conftest.$ac_ext >&5
23096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023097 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023098fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023099
23100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023101else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023102 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023103sed 's/^/| /' conftest.$ac_ext >&5
23104
Antoine Pitroub52ec782009-01-25 16:34:23 +000023105
23106fi
23107
23108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23109 fi
23110 if test $ac_cv_c_bigendian = unknown; then
23111 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23112 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023113/* confdefs.h. */
23114_ACEOF
23115cat confdefs.h >>conftest.$ac_ext
23116cat >>conftest.$ac_ext <<_ACEOF
23117/* end confdefs.h. */
Antoine Pitroub52ec782009-01-25 16:34:23 +000023118#include <limits.h>
23119
Martin v. Löwis11437992002-04-12 09:54:03 +000023120int
23121main ()
23122{
Antoine Pitroub52ec782009-01-25 16:34:23 +000023123#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23124 bogus endian macros
23125 #endif
23126
Martin v. Löwis11437992002-04-12 09:54:03 +000023127 ;
23128 return 0;
23129}
23130_ACEOF
23131rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023132if { (ac_try="$ac_compile"
23133case "(($ac_try" in
23134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23135 *) ac_try_echo=$ac_try;;
23136esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023137eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23138$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023139 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023140 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023141 grep -v '^ *+' conftest.er1 >conftest.err
23142 rm -f conftest.er1
23143 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000023144 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023145 (exit $ac_status); } && {
23146 test -z "$ac_c_werror_flag" ||
23147 test ! -s conftest.err
23148 } && test -s conftest.$ac_objext; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000023149 # It does; now see whether it defined to _BIG_ENDIAN or not.
23150 cat >conftest.$ac_ext <<_ACEOF
23151/* confdefs.h. */
23152_ACEOF
23153cat confdefs.h >>conftest.$ac_ext
23154cat >>conftest.$ac_ext <<_ACEOF
23155/* end confdefs.h. */
23156#include <limits.h>
23157
23158int
23159main ()
23160{
23161#ifndef _BIG_ENDIAN
23162 not big endian
23163 #endif
23164
23165 ;
23166 return 0;
23167}
23168_ACEOF
23169rm -f conftest.$ac_objext
23170if { (ac_try="$ac_compile"
23171case "(($ac_try" in
23172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23173 *) ac_try_echo=$ac_try;;
23174esac
23175eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23176$as_echo "$ac_try_echo") >&5
23177 (eval "$ac_compile") 2>conftest.er1
23178 ac_status=$?
23179 grep -v '^ *+' conftest.er1 >conftest.err
23180 rm -f conftest.er1
23181 cat conftest.err >&5
23182 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23183 (exit $ac_status); } && {
23184 test -z "$ac_c_werror_flag" ||
23185 test ! -s conftest.err
23186 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023187 ac_cv_c_bigendian=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000023188else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023189 $as_echo "$as_me: failed program was:" >&5
23190sed 's/^/| /' conftest.$ac_ext >&5
23191
23192 ac_cv_c_bigendian=no
23193fi
23194
23195rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23196else
23197 $as_echo "$as_me: failed program was:" >&5
23198sed 's/^/| /' conftest.$ac_ext >&5
23199
23200
23201fi
23202
23203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23204 fi
23205 if test $ac_cv_c_bigendian = unknown; then
23206 # Compile a test program.
23207 if test "$cross_compiling" = yes; then
23208 # Try to guess by grepping values from an object file.
23209 cat >conftest.$ac_ext <<_ACEOF
23210/* confdefs.h. */
23211_ACEOF
23212cat confdefs.h >>conftest.$ac_ext
23213cat >>conftest.$ac_ext <<_ACEOF
23214/* end confdefs.h. */
23215short int ascii_mm[] =
23216 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23217 short int ascii_ii[] =
23218 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23219 int use_ascii (int i) {
23220 return ascii_mm[i] + ascii_ii[i];
23221 }
23222 short int ebcdic_ii[] =
23223 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23224 short int ebcdic_mm[] =
23225 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23226 int use_ebcdic (int i) {
23227 return ebcdic_mm[i] + ebcdic_ii[i];
23228 }
23229 extern int foo;
23230
23231int
23232main ()
23233{
23234return use_ascii (foo) == use_ebcdic (foo);
23235 ;
23236 return 0;
23237}
23238_ACEOF
23239rm -f conftest.$ac_objext
23240if { (ac_try="$ac_compile"
23241case "(($ac_try" in
23242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23243 *) ac_try_echo=$ac_try;;
23244esac
23245eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23246$as_echo "$ac_try_echo") >&5
23247 (eval "$ac_compile") 2>conftest.er1
23248 ac_status=$?
23249 grep -v '^ *+' conftest.er1 >conftest.err
23250 rm -f conftest.er1
23251 cat conftest.err >&5
23252 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23253 (exit $ac_status); } && {
23254 test -z "$ac_c_werror_flag" ||
23255 test ! -s conftest.err
23256 } && test -s conftest.$ac_objext; then
23257 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23258 ac_cv_c_bigendian=yes
23259 fi
23260 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
23261 if test "$ac_cv_c_bigendian" = unknown; then
23262 ac_cv_c_bigendian=no
23263 else
23264 # finding both strings is unlikely to happen, but who knows?
23265 ac_cv_c_bigendian=unknown
23266 fi
23267 fi
23268else
23269 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023270sed 's/^/| /' conftest.$ac_ext >&5
23271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023272
Martin v. Löwis11437992002-04-12 09:54:03 +000023273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023274
23275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023276else
23277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023278/* confdefs.h. */
23279_ACEOF
23280cat confdefs.h >>conftest.$ac_ext
23281cat >>conftest.$ac_ext <<_ACEOF
23282/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023283$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000023284int
23285main ()
23286{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023287
Antoine Pitroub52ec782009-01-25 16:34:23 +000023288 /* Are we little or big endian? From Harbison&Steele. */
23289 union
23290 {
23291 long int l;
23292 char c[sizeof (long int)];
23293 } u;
23294 u.l = 1;
23295 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023296
23297 ;
23298 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023299}
Martin v. Löwis11437992002-04-12 09:54:03 +000023300_ACEOF
23301rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023302if { (ac_try="$ac_link"
23303case "(($ac_try" in
23304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23305 *) ac_try_echo=$ac_try;;
23306esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023307eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23308$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023309 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023310 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000023311 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023312 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023313 { (case "(($ac_try" in
23314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23315 *) ac_try_echo=$ac_try;;
23316esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023317eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23318$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023319 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023320 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000023321 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023322 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023323 ac_cv_c_bigendian=no
23324else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023325 $as_echo "$as_me: program exited with status $ac_status" >&5
23326$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023327sed 's/^/| /' conftest.$ac_ext >&5
23328
Martin v. Löwis11437992002-04-12 09:54:03 +000023329( exit $ac_status )
23330ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000023331fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000023332rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023333rm -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 +000023334fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023335
23336
Antoine Pitroub52ec782009-01-25 16:34:23 +000023337 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023338fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000023339{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
23340$as_echo "$ac_cv_c_bigendian" >&6; }
23341 case $ac_cv_c_bigendian in #(
23342 yes)
23343 cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023344#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023345_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000023346;; #(
23347 no)
23348 ;; #(
23349 universal)
23350
23351cat >>confdefs.h <<\_ACEOF
23352#define AC_APPLE_UNIVERSAL_BUILD 1
23353_ACEOF
23354
23355 ;; #(
23356 *)
23357 { { $as_echo "$as_me:$LINENO: error: unknown endianness
23358 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
23359$as_echo "$as_me: error: unknown endianness
23360 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023361 { (exit 1); exit 1; }; } ;;
Antoine Pitroub52ec782009-01-25 16:34:23 +000023362 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000023363
Michael W. Hudson54241132001-12-07 15:38:26 +000023364
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023365# Check whether right shifting a negative integer extends the sign bit
23366# or fills with zeros (like the Cray J90, according to Tim Peters).
Antoine Pitroub52ec782009-01-25 16:34:23 +000023367{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
23368$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023369if test "${ac_cv_rshift_extends_sign+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000023370 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000023371else
Martin v. Löwis11437992002-04-12 09:54:03 +000023372
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023373if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000023374 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023375else
Martin v. Löwis11437992002-04-12 09:54:03 +000023376 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023377/* confdefs.h. */
23378_ACEOF
23379cat confdefs.h >>conftest.$ac_ext
23380cat >>conftest.$ac_ext <<_ACEOF
23381/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023382
23383int main()
23384{
Vladimir Marangozova6180282000-07-12 05:05:06 +000023385 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023386}
23387
Martin v. Löwis11437992002-04-12 09:54:03 +000023388_ACEOF
23389rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023390if { (ac_try="$ac_link"
23391case "(($ac_try" in
23392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23393 *) ac_try_echo=$ac_try;;
23394esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023395eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23396$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023397 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023398 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000023399 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023400 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023401 { (case "(($ac_try" in
23402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23403 *) ac_try_echo=$ac_try;;
23404esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023405eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23406$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023407 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023408 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000023409 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023410 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000023411 ac_cv_rshift_extends_sign=yes
23412else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023413 $as_echo "$as_me: program exited with status $ac_status" >&5
23414$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023415sed 's/^/| /' conftest.$ac_ext >&5
23416
Martin v. Löwis11437992002-04-12 09:54:03 +000023417( exit $ac_status )
23418ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000023419fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000023420rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023421rm -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 +000023422fi
23423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023424
23425fi
23426
Antoine Pitroub52ec782009-01-25 16:34:23 +000023427{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
23428$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000023429if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023430then
Martin v. Löwis11437992002-04-12 09:54:03 +000023431
23432cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023433#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023434_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023435
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023436fi
23437
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023438# check for getc_unlocked and related locking functions
Antoine Pitroub52ec782009-01-25 16:34:23 +000023439{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
23440$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023441if test "${ac_cv_have_getc_unlocked+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000023442 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023443else
Martin v. Löwis11437992002-04-12 09:54:03 +000023444
23445cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023446/* confdefs.h. */
23447_ACEOF
23448cat confdefs.h >>conftest.$ac_ext
23449cat >>conftest.$ac_ext <<_ACEOF
23450/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023451#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023452int
23453main ()
23454{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023455
23456 FILE *f = fopen("/dev/null", "r");
23457 flockfile(f);
23458 getc_unlocked(f);
23459 funlockfile(f);
23460
Martin v. Löwis11437992002-04-12 09:54:03 +000023461 ;
23462 return 0;
23463}
23464_ACEOF
23465rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023466if { (ac_try="$ac_link"
23467case "(($ac_try" in
23468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23469 *) ac_try_echo=$ac_try;;
23470esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023471eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23472$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023473 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023475 grep -v '^ *+' conftest.er1 >conftest.err
23476 rm -f conftest.er1
23477 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000023478 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023479 (exit $ac_status); } && {
23480 test -z "$ac_c_werror_flag" ||
23481 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000023482 } && test -s conftest$ac_exeext && {
23483 test "$cross_compiling" = yes ||
23484 $as_test_x conftest$ac_exeext
23485 }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023486 ac_cv_have_getc_unlocked=yes
23487else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023488 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023489sed 's/^/| /' conftest.$ac_ext >&5
23490
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023491 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023493
Antoine Pitroub52ec782009-01-25 16:34:23 +000023494rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023495rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023496 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023497fi
23498
Antoine Pitroub52ec782009-01-25 16:34:23 +000023499{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
23500$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023501if test "$ac_cv_have_getc_unlocked" = yes
23502then
Martin v. Löwis11437992002-04-12 09:54:03 +000023503
23504cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023505#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023506_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000023507
23508fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000023509
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023510# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000023511# save the value of LIBS so we don't actually link Python with readline
23512LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023513
Gregory P. Smith18820942008-09-07 06:24:49 +000023514# On some systems we need to link readline to a termcap compatible
23515# library. NOTE: Keep the precedence of listed libraries synchronised
23516# with setup.py.
23517py_cv_lib_readline=no
Antoine Pitroub52ec782009-01-25 16:34:23 +000023518{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5
23519$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023520for py_libtermcap in "" ncursesw ncurses curses termcap; do
23521 if test -z "$py_libtermcap"; then
23522 READLINE_LIBS="-lreadline"
23523 else
23524 READLINE_LIBS="-lreadline -l$py_libtermcap"
23525 fi
23526 LIBS="$READLINE_LIBS $LIBS_no_readline"
23527 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023528/* confdefs.h. */
23529_ACEOF
23530cat confdefs.h >>conftest.$ac_ext
23531cat >>conftest.$ac_ext <<_ACEOF
23532/* end confdefs.h. */
23533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023534/* Override any GCC internal prototype to avoid an error.
23535 Use char because int might match the return type of a GCC
23536 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023537#ifdef __cplusplus
23538extern "C"
23539#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023540char readline ();
23541int
23542main ()
23543{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023544return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023545 ;
23546 return 0;
23547}
23548_ACEOF
23549rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023550if { (ac_try="$ac_link"
23551case "(($ac_try" in
23552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23553 *) ac_try_echo=$ac_try;;
23554esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023555eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23556$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023557 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023558 ac_status=$?
23559 grep -v '^ *+' conftest.er1 >conftest.err
23560 rm -f conftest.er1
23561 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000023562 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023563 (exit $ac_status); } && {
23564 test -z "$ac_c_werror_flag" ||
23565 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000023566 } && test -s conftest$ac_exeext && {
23567 test "$cross_compiling" = yes ||
23568 $as_test_x conftest$ac_exeext
23569 }; then
Gregory P. Smith18820942008-09-07 06:24:49 +000023570 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023571else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023572 $as_echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023573sed 's/^/| /' conftest.$ac_ext >&5
23574
Gregory P. Smith18820942008-09-07 06:24:49 +000023575
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023576fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023577
Antoine Pitroub52ec782009-01-25 16:34:23 +000023578rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023579rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023580 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000023581 if test $py_cv_lib_readline = yes; then
23582 break
23583 fi
23584done
23585# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
23586#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000023587if test $py_cv_lib_readline = no; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000023588 { $as_echo "$as_me:$LINENO: result: none" >&5
23589$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023590else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023591 { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
23592$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000023593
23594cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023595#define HAVE_LIBREADLINE 1
23596_ACEOF
23597
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000023598fi
23599
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023600# check for readline 2.1
Antoine Pitroub52ec782009-01-25 16:34:23 +000023601{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
23602$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023603if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000023604 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023605else
23606 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000023607LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023608cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023609/* confdefs.h. */
23610_ACEOF
23611cat confdefs.h >>conftest.$ac_ext
23612cat >>conftest.$ac_ext <<_ACEOF
23613/* end confdefs.h. */
23614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023615/* Override any GCC internal prototype to avoid an error.
23616 Use char because int might match the return type of a GCC
23617 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023618#ifdef __cplusplus
23619extern "C"
23620#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023621char rl_callback_handler_install ();
23622int
23623main ()
23624{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023625return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023626 ;
23627 return 0;
23628}
23629_ACEOF
23630rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023631if { (ac_try="$ac_link"
23632case "(($ac_try" in
23633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23634 *) ac_try_echo=$ac_try;;
23635esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023636eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23637$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023638 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023639 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023640 grep -v '^ *+' conftest.er1 >conftest.err
23641 rm -f conftest.er1
23642 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000023643 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023644 (exit $ac_status); } && {
23645 test -z "$ac_c_werror_flag" ||
23646 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000023647 } && test -s conftest$ac_exeext && {
23648 test "$cross_compiling" = yes ||
23649 $as_test_x conftest$ac_exeext
23650 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023651 ac_cv_lib_readline_rl_callback_handler_install=yes
23652else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023653 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023654sed 's/^/| /' conftest.$ac_ext >&5
23655
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023656 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023657fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023658
Antoine Pitroub52ec782009-01-25 16:34:23 +000023659rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023660rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023661 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023662LIBS=$ac_check_lib_save_LIBS
23663fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000023664{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
23665$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
23666if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023667
23668cat >>confdefs.h <<\_ACEOF
23669#define HAVE_RL_CALLBACK 1
23670_ACEOF
23671
23672fi
23673
23674
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023675# check for readline 2.2
23676cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023677/* confdefs.h. */
23678_ACEOF
23679cat confdefs.h >>conftest.$ac_ext
23680cat >>conftest.$ac_ext <<_ACEOF
23681/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023682#include <readline/readline.h>
23683_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023684if { (ac_try="$ac_cpp conftest.$ac_ext"
23685case "(($ac_try" in
23686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23687 *) ac_try_echo=$ac_try;;
23688esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023689eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23690$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023691 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023692 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023693 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023694 rm -f conftest.er1
23695 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000023696 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023697 (exit $ac_status); } >/dev/null && {
23698 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23699 test ! -s conftest.err
23700 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023701 have_readline=yes
23702else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023703 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023704sed 's/^/| /' conftest.$ac_ext >&5
23705
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023706 have_readline=no
23707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023708
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023709rm -f conftest.err conftest.$ac_ext
23710if test $have_readline = yes
23711then
23712 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023713/* confdefs.h. */
23714_ACEOF
23715cat confdefs.h >>conftest.$ac_ext
23716cat >>conftest.$ac_ext <<_ACEOF
23717/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023718#include <readline/readline.h>
23719
23720_ACEOF
23721if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000023722 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000023723
23724cat >>confdefs.h <<\_ACEOF
23725#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
23726_ACEOF
23727
23728fi
23729rm -f conftest*
23730
23731fi
23732
Martin v. Löwis0daad592001-09-30 21:09:59 +000023733# check for readline 4.0
Antoine Pitroub52ec782009-01-25 16:34:23 +000023734{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
23735$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023736if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000023737 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000023738else
Martin v. Löwis11437992002-04-12 09:54:03 +000023739 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000023740LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023742/* confdefs.h. */
23743_ACEOF
23744cat confdefs.h >>conftest.$ac_ext
23745cat >>conftest.$ac_ext <<_ACEOF
23746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023747
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023748/* Override any GCC internal prototype to avoid an error.
23749 Use char because int might match the return type of a GCC
23750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023751#ifdef __cplusplus
23752extern "C"
23753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023754char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023755int
23756main ()
23757{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023758return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023759 ;
23760 return 0;
23761}
23762_ACEOF
23763rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023764if { (ac_try="$ac_link"
23765case "(($ac_try" in
23766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23767 *) ac_try_echo=$ac_try;;
23768esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023769eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23770$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023771 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023773 grep -v '^ *+' conftest.er1 >conftest.err
23774 rm -f conftest.er1
23775 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000023776 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023777 (exit $ac_status); } && {
23778 test -z "$ac_c_werror_flag" ||
23779 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000023780 } && test -s conftest$ac_exeext && {
23781 test "$cross_compiling" = yes ||
23782 $as_test_x conftest$ac_exeext
23783 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023784 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000023785else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023786 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023787sed 's/^/| /' conftest.$ac_ext >&5
23788
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023789 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000023790fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023791
Antoine Pitroub52ec782009-01-25 16:34:23 +000023792rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023793rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023795LIBS=$ac_check_lib_save_LIBS
23796fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000023797{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
23798$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
23799if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023800
Martin v. Löwis11437992002-04-12 09:54:03 +000023801cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023802#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023803_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000023804
Martin v. Löwis0daad592001-09-30 21:09:59 +000023805fi
23806
Michael W. Hudson54241132001-12-07 15:38:26 +000023807
Thomas Wouters89d996e2007-09-08 17:39:28 +000023808# also in 4.0
Antoine Pitroub52ec782009-01-25 16:34:23 +000023809{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
23810$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000023811if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000023812 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000023813else
23814 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000023815LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000023816cat >conftest.$ac_ext <<_ACEOF
23817/* confdefs.h. */
23818_ACEOF
23819cat confdefs.h >>conftest.$ac_ext
23820cat >>conftest.$ac_ext <<_ACEOF
23821/* end confdefs.h. */
23822
23823/* Override any GCC internal prototype to avoid an error.
23824 Use char because int might match the return type of a GCC
23825 builtin and then its argument prototype would still apply. */
23826#ifdef __cplusplus
23827extern "C"
23828#endif
23829char rl_completion_display_matches_hook ();
23830int
23831main ()
23832{
23833return rl_completion_display_matches_hook ();
23834 ;
23835 return 0;
23836}
23837_ACEOF
23838rm -f conftest.$ac_objext conftest$ac_exeext
23839if { (ac_try="$ac_link"
23840case "(($ac_try" in
23841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23842 *) ac_try_echo=$ac_try;;
23843esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023844eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23845$as_echo "$ac_try_echo") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000023846 (eval "$ac_link") 2>conftest.er1
23847 ac_status=$?
23848 grep -v '^ *+' conftest.er1 >conftest.err
23849 rm -f conftest.er1
23850 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000023851 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000023852 (exit $ac_status); } && {
23853 test -z "$ac_c_werror_flag" ||
23854 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000023855 } && test -s conftest$ac_exeext && {
23856 test "$cross_compiling" = yes ||
23857 $as_test_x conftest$ac_exeext
23858 }; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000023859 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
23860else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023861 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000023862sed 's/^/| /' conftest.$ac_ext >&5
23863
23864 ac_cv_lib_readline_rl_completion_display_matches_hook=no
23865fi
23866
Antoine Pitroub52ec782009-01-25 16:34:23 +000023867rm -rf conftest.dSYM
Thomas Wouters89d996e2007-09-08 17:39:28 +000023868rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23869 conftest$ac_exeext conftest.$ac_ext
23870LIBS=$ac_check_lib_save_LIBS
23871fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000023872{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
23873$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
23874if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000023875
23876cat >>confdefs.h <<\_ACEOF
23877#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
23878_ACEOF
23879
23880fi
23881
23882
Martin v. Löwis0daad592001-09-30 21:09:59 +000023883# check for readline 4.2
Antoine Pitroub52ec782009-01-25 16:34:23 +000023884{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
23885$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023886if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000023887 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000023888else
Martin v. Löwis11437992002-04-12 09:54:03 +000023889 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000023890LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023892/* confdefs.h. */
23893_ACEOF
23894cat confdefs.h >>conftest.$ac_ext
23895cat >>conftest.$ac_ext <<_ACEOF
23896/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023897
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023898/* Override any GCC internal prototype to avoid an error.
23899 Use char because int might match the return type of a GCC
23900 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023901#ifdef __cplusplus
23902extern "C"
23903#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023904char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023905int
23906main ()
23907{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023908return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023909 ;
23910 return 0;
23911}
23912_ACEOF
23913rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023914if { (ac_try="$ac_link"
23915case "(($ac_try" in
23916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23917 *) ac_try_echo=$ac_try;;
23918esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023919eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23920$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023921 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023922 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023923 grep -v '^ *+' conftest.er1 >conftest.err
23924 rm -f conftest.er1
23925 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000023926 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023927 (exit $ac_status); } && {
23928 test -z "$ac_c_werror_flag" ||
23929 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000023930 } && test -s conftest$ac_exeext && {
23931 test "$cross_compiling" = yes ||
23932 $as_test_x conftest$ac_exeext
23933 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023934 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000023935else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023936 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023937sed 's/^/| /' conftest.$ac_ext >&5
23938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023939 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000023940fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023941
Antoine Pitroub52ec782009-01-25 16:34:23 +000023942rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023943rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023944 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023945LIBS=$ac_check_lib_save_LIBS
23946fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000023947{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
23948$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
23949if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000023950
Martin v. Löwis11437992002-04-12 09:54:03 +000023951cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023952#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023953_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000023954
Guido van Rossum353ae582001-07-10 16:45:32 +000023955fi
23956
Jack Jansendd19cf82001-12-06 22:36:17 +000023957
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023958# also in readline 4.2
23959cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023960/* confdefs.h. */
23961_ACEOF
23962cat confdefs.h >>conftest.$ac_ext
23963cat >>conftest.$ac_ext <<_ACEOF
23964/* end confdefs.h. */
23965#include <readline/readline.h>
23966_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023967if { (ac_try="$ac_cpp conftest.$ac_ext"
23968case "(($ac_try" in
23969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23970 *) ac_try_echo=$ac_try;;
23971esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000023972eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23973$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023974 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023975 ac_status=$?
23976 grep -v '^ *+' conftest.er1 >conftest.err
23977 rm -f conftest.er1
23978 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000023979 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023980 (exit $ac_status); } >/dev/null && {
23981 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23982 test ! -s conftest.err
23983 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023984 have_readline=yes
23985else
Antoine Pitroub52ec782009-01-25 16:34:23 +000023986 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023987sed 's/^/| /' conftest.$ac_ext >&5
23988
23989 have_readline=no
23990fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023991
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023992rm -f conftest.err conftest.$ac_ext
23993if test $have_readline = yes
23994then
23995 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023996/* confdefs.h. */
23997_ACEOF
23998cat confdefs.h >>conftest.$ac_ext
23999cat >>conftest.$ac_ext <<_ACEOF
24000/* end confdefs.h. */
24001#include <readline/readline.h>
24002
24003_ACEOF
24004if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24005 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24006
24007cat >>confdefs.h <<\_ACEOF
24008#define HAVE_RL_CATCH_SIGNAL 1
24009_ACEOF
24010
24011fi
24012rm -f conftest*
24013
24014fi
24015
Martin v. Löwis82bca632006-02-10 20:49:30 +000024016# End of readline checks: restore LIBS
24017LIBS=$LIBS_no_readline
24018
Antoine Pitroub52ec782009-01-25 16:34:23 +000024019{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5
24020$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024021if test "${ac_cv_broken_nice+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000024022 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024023else
Martin v. Löwis11437992002-04-12 09:54:03 +000024024
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024025if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024026 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024027else
Martin v. Löwis11437992002-04-12 09:54:03 +000024028 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024029/* confdefs.h. */
24030_ACEOF
24031cat confdefs.h >>conftest.$ac_ext
24032cat >>conftest.$ac_ext <<_ACEOF
24033/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024034
24035int main()
24036{
24037 int val1 = nice(1);
24038 if (val1 != -1 && val1 == nice(2))
24039 exit(0);
24040 exit(1);
24041}
24042
Martin v. Löwis11437992002-04-12 09:54:03 +000024043_ACEOF
24044rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024045if { (ac_try="$ac_link"
24046case "(($ac_try" in
24047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24048 *) ac_try_echo=$ac_try;;
24049esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024050eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24051$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024052 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024053 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000024054 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024055 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024056 { (case "(($ac_try" in
24057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24058 *) ac_try_echo=$ac_try;;
24059esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024060eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24061$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024062 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024063 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000024064 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024065 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024066 ac_cv_broken_nice=yes
24067else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024068 $as_echo "$as_me: program exited with status $ac_status" >&5
24069$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024070sed 's/^/| /' conftest.$ac_ext >&5
24071
Martin v. Löwis11437992002-04-12 09:54:03 +000024072( exit $ac_status )
24073ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024074fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000024075rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024076rm -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 +000024077fi
24078
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024079
24080fi
24081
Antoine Pitroub52ec782009-01-25 16:34:23 +000024082{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24083$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024084if test "$ac_cv_broken_nice" = yes
24085then
Martin v. Löwis11437992002-04-12 09:54:03 +000024086
24087cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024088#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024089_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024090
24091fi
24092
Antoine Pitroub52ec782009-01-25 16:34:23 +000024093{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5
24094$as_echo_n "checking for broken poll()... " >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024095if test "$cross_compiling" = yes; then
24096 ac_cv_broken_poll=no
24097else
24098 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024099/* confdefs.h. */
24100_ACEOF
24101cat confdefs.h >>conftest.$ac_ext
24102cat >>conftest.$ac_ext <<_ACEOF
24103/* end confdefs.h. */
24104
24105#include <poll.h>
24106
24107int main (void)
24108 {
24109 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24110
24111 close (42);
24112
24113 int poll_test = poll (&poll_struct, 1, 0);
24114
24115 if (poll_test < 0)
24116 {
24117 exit(0);
24118 }
24119 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24120 {
24121 exit(0);
24122 }
24123 else
24124 {
24125 exit(1);
24126 }
24127 }
24128
24129_ACEOF
24130rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024131if { (ac_try="$ac_link"
24132case "(($ac_try" in
24133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24134 *) ac_try_echo=$ac_try;;
24135esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024136eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24137$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024138 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024139 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000024140 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024141 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024142 { (case "(($ac_try" in
24143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24144 *) ac_try_echo=$ac_try;;
24145esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024146eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24147$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024148 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024149 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000024150 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024151 (exit $ac_status); }; }; then
24152 ac_cv_broken_poll=yes
24153else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024154 $as_echo "$as_me: program exited with status $ac_status" >&5
24155$as_echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024156sed 's/^/| /' conftest.$ac_ext >&5
24157
24158( exit $ac_status )
24159ac_cv_broken_poll=no
24160fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000024161rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024162rm -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 +000024163fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024164
24165
Antoine Pitroub52ec782009-01-25 16:34:23 +000024166{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24167$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024168if test "$ac_cv_broken_poll" = yes
24169then
24170
24171cat >>confdefs.h <<\_ACEOF
24172#define HAVE_BROKEN_POLL 1
24173_ACEOF
24174
24175fi
24176
Brett Cannon43802422005-02-10 20:48:03 +000024177# 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 +000024178# (which is not required by ISO C or UNIX spec) and/or if we support
24179# tzname[]
Antoine Pitroub52ec782009-01-25 16:34:23 +000024180{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24181$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024182if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000024183 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000024184else
24185 cat >conftest.$ac_ext <<_ACEOF
24186/* confdefs.h. */
24187_ACEOF
24188cat confdefs.h >>conftest.$ac_ext
24189cat >>conftest.$ac_ext <<_ACEOF
24190/* end confdefs.h. */
24191#include <sys/types.h>
24192#include <$ac_cv_struct_tm>
24193
24194
24195int
24196main ()
24197{
24198static struct tm ac_aggr;
24199if (ac_aggr.tm_zone)
24200return 0;
24201 ;
24202 return 0;
24203}
24204_ACEOF
24205rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024206if { (ac_try="$ac_compile"
24207case "(($ac_try" in
24208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24209 *) ac_try_echo=$ac_try;;
24210esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024211eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24212$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024213 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024214 ac_status=$?
24215 grep -v '^ *+' conftest.er1 >conftest.err
24216 rm -f conftest.er1
24217 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000024218 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024219 (exit $ac_status); } && {
24220 test -z "$ac_c_werror_flag" ||
24221 test ! -s conftest.err
24222 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024223 ac_cv_member_struct_tm_tm_zone=yes
24224else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024225 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024226sed 's/^/| /' conftest.$ac_ext >&5
24227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024228 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024229/* confdefs.h. */
24230_ACEOF
24231cat confdefs.h >>conftest.$ac_ext
24232cat >>conftest.$ac_ext <<_ACEOF
24233/* end confdefs.h. */
24234#include <sys/types.h>
24235#include <$ac_cv_struct_tm>
24236
24237
24238int
24239main ()
24240{
24241static struct tm ac_aggr;
24242if (sizeof ac_aggr.tm_zone)
24243return 0;
24244 ;
24245 return 0;
24246}
24247_ACEOF
24248rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024249if { (ac_try="$ac_compile"
24250case "(($ac_try" in
24251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24252 *) ac_try_echo=$ac_try;;
24253esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024254eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24255$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024256 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024257 ac_status=$?
24258 grep -v '^ *+' conftest.er1 >conftest.err
24259 rm -f conftest.er1
24260 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000024261 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024262 (exit $ac_status); } && {
24263 test -z "$ac_c_werror_flag" ||
24264 test ! -s conftest.err
24265 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024266 ac_cv_member_struct_tm_tm_zone=yes
24267else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024268 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024269sed 's/^/| /' conftest.$ac_ext >&5
24270
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024271 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000024272fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024273
24274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024276
24277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000024278fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000024279{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
24280$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
24281if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Brett Cannon43802422005-02-10 20:48:03 +000024282
24283cat >>confdefs.h <<_ACEOF
24284#define HAVE_STRUCT_TM_TM_ZONE 1
24285_ACEOF
24286
24287
24288fi
24289
24290if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
24291
24292cat >>confdefs.h <<\_ACEOF
24293#define HAVE_TM_ZONE 1
24294_ACEOF
24295
24296else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024297 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
24298$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024299if test "${ac_cv_have_decl_tzname+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000024300 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024301else
24302 cat >conftest.$ac_ext <<_ACEOF
24303/* confdefs.h. */
24304_ACEOF
24305cat confdefs.h >>conftest.$ac_ext
24306cat >>conftest.$ac_ext <<_ACEOF
24307/* end confdefs.h. */
24308#include <time.h>
24309
24310int
24311main ()
24312{
24313#ifndef tzname
24314 (void) tzname;
24315#endif
24316
24317 ;
24318 return 0;
24319}
24320_ACEOF
24321rm -f conftest.$ac_objext
24322if { (ac_try="$ac_compile"
24323case "(($ac_try" in
24324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24325 *) ac_try_echo=$ac_try;;
24326esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024327eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24328$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024329 (eval "$ac_compile") 2>conftest.er1
24330 ac_status=$?
24331 grep -v '^ *+' conftest.er1 >conftest.err
24332 rm -f conftest.er1
24333 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000024334 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024335 (exit $ac_status); } && {
24336 test -z "$ac_c_werror_flag" ||
24337 test ! -s conftest.err
24338 } && test -s conftest.$ac_objext; then
24339 ac_cv_have_decl_tzname=yes
24340else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024341 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024342sed 's/^/| /' conftest.$ac_ext >&5
24343
24344 ac_cv_have_decl_tzname=no
24345fi
24346
24347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24348fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000024349{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
24350$as_echo "$ac_cv_have_decl_tzname" >&6; }
24351if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024352
24353cat >>confdefs.h <<_ACEOF
24354#define HAVE_DECL_TZNAME 1
24355_ACEOF
24356
24357
24358else
24359 cat >>confdefs.h <<_ACEOF
24360#define HAVE_DECL_TZNAME 0
24361_ACEOF
24362
24363
24364fi
24365
24366
Antoine Pitroub52ec782009-01-25 16:34:23 +000024367 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
24368$as_echo_n "checking for tzname... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024369if test "${ac_cv_var_tzname+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000024370 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000024371else
24372 cat >conftest.$ac_ext <<_ACEOF
24373/* confdefs.h. */
24374_ACEOF
24375cat confdefs.h >>conftest.$ac_ext
24376cat >>conftest.$ac_ext <<_ACEOF
24377/* end confdefs.h. */
24378#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024379#if !HAVE_DECL_TZNAME
24380extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000024381#endif
24382
24383int
24384main ()
24385{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024386return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000024387 ;
24388 return 0;
24389}
24390_ACEOF
24391rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024392if { (ac_try="$ac_link"
24393case "(($ac_try" in
24394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24395 *) ac_try_echo=$ac_try;;
24396esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024397eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24398$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024399 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024400 ac_status=$?
24401 grep -v '^ *+' conftest.er1 >conftest.err
24402 rm -f conftest.er1
24403 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000024404 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024405 (exit $ac_status); } && {
24406 test -z "$ac_c_werror_flag" ||
24407 test ! -s conftest.err
Antoine Pitroub52ec782009-01-25 16:34:23 +000024408 } && test -s conftest$ac_exeext && {
24409 test "$cross_compiling" = yes ||
24410 $as_test_x conftest$ac_exeext
24411 }; then
Brett Cannon43802422005-02-10 20:48:03 +000024412 ac_cv_var_tzname=yes
24413else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024414 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024415sed 's/^/| /' conftest.$ac_ext >&5
24416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024417 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000024418fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024419
Antoine Pitroub52ec782009-01-25 16:34:23 +000024420rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024421rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000024422 conftest$ac_exeext conftest.$ac_ext
24423fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000024424{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
24425$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024426 if test $ac_cv_var_tzname = yes; then
24427
24428cat >>confdefs.h <<\_ACEOF
24429#define HAVE_TZNAME 1
24430_ACEOF
24431
24432 fi
24433fi
24434
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024435
Martin v. Löwis1d459062005-03-14 21:23:33 +000024436# check tzset(3) exists and works like we expect it to
Antoine Pitroub52ec782009-01-25 16:34:23 +000024437{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5
24438$as_echo_n "checking for working tzset()... " >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024439if test "${ac_cv_working_tzset+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000024440 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024441else
24442
24443if test "$cross_compiling" = yes; then
24444 ac_cv_working_tzset=no
24445else
24446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024447/* confdefs.h. */
24448_ACEOF
24449cat confdefs.h >>conftest.$ac_ext
24450cat >>conftest.$ac_ext <<_ACEOF
24451/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024452
24453#include <stdlib.h>
24454#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000024455#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000024456
24457#if HAVE_TZNAME
24458extern char *tzname[];
24459#endif
24460
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024461int main()
24462{
Brett Cannon18367812003-09-19 00:59:16 +000024463 /* Note that we need to ensure that not only does tzset(3)
24464 do 'something' with localtime, but it works as documented
24465 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000024466 This includes making sure that tzname is set properly if
24467 tm->tm_zone does not exist since it is the alternative way
24468 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000024469
24470 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000024471 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000024472 */
24473
Martin v. Löwis1d459062005-03-14 21:23:33 +000024474 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000024475 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
24476
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024477 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024478 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024479 if (localtime(&groundhogday)->tm_hour != 0)
24480 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024481#if HAVE_TZNAME
24482 /* For UTC, tzname[1] is sometimes "", sometimes " " */
24483 if (strcmp(tzname[0], "UTC") ||
24484 (tzname[1][0] != 0 && tzname[1][0] != ' '))
24485 exit(1);
24486#endif
Brett Cannon18367812003-09-19 00:59:16 +000024487
Neal Norwitz7f2588c2003-04-11 15:35:53 +000024488 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024489 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000024490 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024491 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024492#if HAVE_TZNAME
24493 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
24494 exit(1);
24495#endif
Brett Cannon18367812003-09-19 00:59:16 +000024496
24497 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
24498 tzset();
24499 if (localtime(&groundhogday)->tm_hour != 11)
24500 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024501#if HAVE_TZNAME
24502 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
24503 exit(1);
24504#endif
24505
24506#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000024507 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
24508 exit(1);
24509 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
24510 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000024511#endif
Brett Cannon18367812003-09-19 00:59:16 +000024512
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024513 exit(0);
24514}
24515
24516_ACEOF
24517rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024518if { (ac_try="$ac_link"
24519case "(($ac_try" in
24520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24521 *) ac_try_echo=$ac_try;;
24522esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024523eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24524$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024525 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024526 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000024527 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024528 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024529 { (case "(($ac_try" in
24530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24531 *) ac_try_echo=$ac_try;;
24532esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024533eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24534$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024535 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024536 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000024537 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024538 (exit $ac_status); }; }; then
24539 ac_cv_working_tzset=yes
24540else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024541 $as_echo "$as_me: program exited with status $ac_status" >&5
24542$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024543sed 's/^/| /' conftest.$ac_ext >&5
24544
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024545( exit $ac_status )
24546ac_cv_working_tzset=no
24547fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000024548rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024549rm -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 +000024550fi
24551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024552
24553fi
24554
Antoine Pitroub52ec782009-01-25 16:34:23 +000024555{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
24556$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000024557if test "$ac_cv_working_tzset" = yes
24558then
24559
24560cat >>confdefs.h <<\_ACEOF
24561#define HAVE_WORKING_TZSET 1
24562_ACEOF
24563
24564fi
24565
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024566# Look for subsecond timestamps in struct stat
Antoine Pitroub52ec782009-01-25 16:34:23 +000024567{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
24568$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024569if test "${ac_cv_stat_tv_nsec+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000024570 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024571else
24572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024573/* confdefs.h. */
24574_ACEOF
24575cat confdefs.h >>conftest.$ac_ext
24576cat >>conftest.$ac_ext <<_ACEOF
24577/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024578#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024579int
24580main ()
24581{
24582
24583struct stat st;
24584st.st_mtim.tv_nsec = 1;
24585
24586 ;
24587 return 0;
24588}
24589_ACEOF
24590rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024591if { (ac_try="$ac_compile"
24592case "(($ac_try" in
24593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24594 *) ac_try_echo=$ac_try;;
24595esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024596eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24597$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024598 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024600 grep -v '^ *+' conftest.er1 >conftest.err
24601 rm -f conftest.er1
24602 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000024603 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024604 (exit $ac_status); } && {
24605 test -z "$ac_c_werror_flag" ||
24606 test ! -s conftest.err
24607 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000024608 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024609else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024610 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024611sed 's/^/| /' conftest.$ac_ext >&5
24612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024613 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024614fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024615
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24617fi
24618
Antoine Pitroub52ec782009-01-25 16:34:23 +000024619{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
24620$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000024621if test "$ac_cv_stat_tv_nsec" = yes
24622then
24623
24624cat >>confdefs.h <<\_ACEOF
24625#define HAVE_STAT_TV_NSEC 1
24626_ACEOF
24627
24628fi
24629
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024630# Look for BSD style subsecond timestamps in struct stat
Antoine Pitroub52ec782009-01-25 16:34:23 +000024631{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
24632$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024633if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000024634 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024635else
24636 cat >conftest.$ac_ext <<_ACEOF
24637/* confdefs.h. */
24638_ACEOF
24639cat confdefs.h >>conftest.$ac_ext
24640cat >>conftest.$ac_ext <<_ACEOF
24641/* end confdefs.h. */
24642#include <sys/stat.h>
24643int
24644main ()
24645{
24646
24647struct stat st;
24648st.st_mtimespec.tv_nsec = 1;
24649
24650 ;
24651 return 0;
24652}
24653_ACEOF
24654rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024655if { (ac_try="$ac_compile"
24656case "(($ac_try" in
24657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24658 *) ac_try_echo=$ac_try;;
24659esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024660eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24661$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024662 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024663 ac_status=$?
24664 grep -v '^ *+' conftest.er1 >conftest.err
24665 rm -f conftest.er1
24666 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000024667 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024668 (exit $ac_status); } && {
24669 test -z "$ac_c_werror_flag" ||
24670 test ! -s conftest.err
24671 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024672 ac_cv_stat_tv_nsec2=yes
24673else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024674 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024675sed 's/^/| /' conftest.$ac_ext >&5
24676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024677 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024678fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024679
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24681fi
24682
Antoine Pitroub52ec782009-01-25 16:34:23 +000024683{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
24684$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000024685if test "$ac_cv_stat_tv_nsec2" = yes
24686then
24687
24688cat >>confdefs.h <<\_ACEOF
24689#define HAVE_STAT_TV_NSEC2 1
24690_ACEOF
24691
24692fi
24693
Jack Jansen666b1e72001-10-31 12:11:48 +000024694# On HP/UX 11.0, mvwdelch is a block with a return statement
Antoine Pitroub52ec782009-01-25 16:34:23 +000024695{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
24696$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024697if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000024698 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024699else
Martin v. Löwis11437992002-04-12 09:54:03 +000024700 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024701/* confdefs.h. */
24702_ACEOF
24703cat confdefs.h >>conftest.$ac_ext
24704cat >>conftest.$ac_ext <<_ACEOF
24705/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024706#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024707int
24708main ()
24709{
Jack Jansen666b1e72001-10-31 12:11:48 +000024710
24711 int rtn;
24712 rtn = mvwdelch(0,0,0);
24713
Martin v. Löwis11437992002-04-12 09:54:03 +000024714 ;
24715 return 0;
24716}
24717_ACEOF
24718rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024719if { (ac_try="$ac_compile"
24720case "(($ac_try" in
24721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24722 *) ac_try_echo=$ac_try;;
24723esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024724eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24725$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024728 grep -v '^ *+' conftest.er1 >conftest.err
24729 rm -f conftest.er1
24730 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000024731 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024732 (exit $ac_status); } && {
24733 test -z "$ac_c_werror_flag" ||
24734 test ! -s conftest.err
24735 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024736 ac_cv_mvwdelch_is_expression=yes
24737else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024738 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024739sed 's/^/| /' conftest.$ac_ext >&5
24740
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024741 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024742fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024743
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24745fi
24746
Antoine Pitroub52ec782009-01-25 16:34:23 +000024747{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
24748$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000024749
24750if test "$ac_cv_mvwdelch_is_expression" = yes
24751then
Martin v. Löwis11437992002-04-12 09:54:03 +000024752
24753cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024754#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024755_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024756
24757fi
24758
Antoine Pitroub52ec782009-01-25 16:34:23 +000024759{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
24760$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024761if test "${ac_cv_window_has_flags+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000024762 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000024763else
Martin v. Löwis11437992002-04-12 09:54:03 +000024764 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024765/* confdefs.h. */
24766_ACEOF
24767cat confdefs.h >>conftest.$ac_ext
24768cat >>conftest.$ac_ext <<_ACEOF
24769/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000024770#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024771int
24772main ()
24773{
Jack Jansen666b1e72001-10-31 12:11:48 +000024774
24775 WINDOW *w;
24776 w->_flags = 0;
24777
Martin v. Löwis11437992002-04-12 09:54:03 +000024778 ;
24779 return 0;
24780}
24781_ACEOF
24782rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024783if { (ac_try="$ac_compile"
24784case "(($ac_try" in
24785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24786 *) ac_try_echo=$ac_try;;
24787esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024788eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24789$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024790 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024791 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024792 grep -v '^ *+' conftest.er1 >conftest.err
24793 rm -f conftest.er1
24794 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000024795 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024796 (exit $ac_status); } && {
24797 test -z "$ac_c_werror_flag" ||
24798 test ! -s conftest.err
24799 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000024800 ac_cv_window_has_flags=yes
24801else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024802 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024803sed 's/^/| /' conftest.$ac_ext >&5
24804
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024805 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000024806fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000024807
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24809fi
24810
Antoine Pitroub52ec782009-01-25 16:34:23 +000024811{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
24812$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000024813
Jack Jansen666b1e72001-10-31 12:11:48 +000024814
24815if test "$ac_cv_window_has_flags" = yes
24816then
Martin v. Löwis11437992002-04-12 09:54:03 +000024817
24818cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024819#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024820_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000024821
24822fi
24823
Antoine Pitroub52ec782009-01-25 16:34:23 +000024824{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5
24825$as_echo_n "checking for is_term_resized... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024826cat >conftest.$ac_ext <<_ACEOF
24827/* confdefs.h. */
24828_ACEOF
24829cat confdefs.h >>conftest.$ac_ext
24830cat >>conftest.$ac_ext <<_ACEOF
24831/* end confdefs.h. */
24832#include <curses.h>
24833int
24834main ()
24835{
24836void *x=is_term_resized
24837 ;
24838 return 0;
24839}
24840_ACEOF
24841rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024842if { (ac_try="$ac_compile"
24843case "(($ac_try" in
24844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24845 *) ac_try_echo=$ac_try;;
24846esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024847eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24848$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024849 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024850 ac_status=$?
24851 grep -v '^ *+' conftest.er1 >conftest.err
24852 rm -f conftest.er1
24853 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000024854 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024855 (exit $ac_status); } && {
24856 test -z "$ac_c_werror_flag" ||
24857 test ! -s conftest.err
24858 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024859
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024860cat >>confdefs.h <<\_ACEOF
24861#define HAVE_CURSES_IS_TERM_RESIZED 1
24862_ACEOF
24863
Antoine Pitroub52ec782009-01-25 16:34:23 +000024864 { $as_echo "$as_me:$LINENO: result: yes" >&5
24865$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024866else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024867 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024868sed 's/^/| /' conftest.$ac_ext >&5
24869
Antoine Pitroub52ec782009-01-25 16:34:23 +000024870 { $as_echo "$as_me:$LINENO: result: no" >&5
24871$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024872
24873fi
24874
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024875rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24876
Antoine Pitroub52ec782009-01-25 16:34:23 +000024877{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5
24878$as_echo_n "checking for resize_term... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024879cat >conftest.$ac_ext <<_ACEOF
24880/* confdefs.h. */
24881_ACEOF
24882cat confdefs.h >>conftest.$ac_ext
24883cat >>conftest.$ac_ext <<_ACEOF
24884/* end confdefs.h. */
24885#include <curses.h>
24886int
24887main ()
24888{
24889void *x=resize_term
24890 ;
24891 return 0;
24892}
24893_ACEOF
24894rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024895if { (ac_try="$ac_compile"
24896case "(($ac_try" in
24897 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24898 *) ac_try_echo=$ac_try;;
24899esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024900eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24901$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024902 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024903 ac_status=$?
24904 grep -v '^ *+' conftest.er1 >conftest.err
24905 rm -f conftest.er1
24906 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000024907 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024908 (exit $ac_status); } && {
24909 test -z "$ac_c_werror_flag" ||
24910 test ! -s conftest.err
24911 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024912
24913cat >>confdefs.h <<\_ACEOF
24914#define HAVE_CURSES_RESIZE_TERM 1
24915_ACEOF
24916
Antoine Pitroub52ec782009-01-25 16:34:23 +000024917 { $as_echo "$as_me:$LINENO: result: yes" >&5
24918$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024919else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024920 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024921sed 's/^/| /' conftest.$ac_ext >&5
24922
Antoine Pitroub52ec782009-01-25 16:34:23 +000024923 { $as_echo "$as_me:$LINENO: result: no" >&5
24924$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024925
24926fi
24927
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024928rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24929
Antoine Pitroub52ec782009-01-25 16:34:23 +000024930{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5
24931$as_echo_n "checking for resizeterm... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024932cat >conftest.$ac_ext <<_ACEOF
24933/* confdefs.h. */
24934_ACEOF
24935cat confdefs.h >>conftest.$ac_ext
24936cat >>conftest.$ac_ext <<_ACEOF
24937/* end confdefs.h. */
24938#include <curses.h>
24939int
24940main ()
24941{
24942void *x=resizeterm
24943 ;
24944 return 0;
24945}
24946_ACEOF
24947rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024948if { (ac_try="$ac_compile"
24949case "(($ac_try" in
24950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24951 *) ac_try_echo=$ac_try;;
24952esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000024953eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24954$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024955 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024956 ac_status=$?
24957 grep -v '^ *+' conftest.er1 >conftest.err
24958 rm -f conftest.er1
24959 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000024960 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024961 (exit $ac_status); } && {
24962 test -z "$ac_c_werror_flag" ||
24963 test ! -s conftest.err
24964 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024965
24966cat >>confdefs.h <<\_ACEOF
24967#define HAVE_CURSES_RESIZETERM 1
24968_ACEOF
24969
Antoine Pitroub52ec782009-01-25 16:34:23 +000024970 { $as_echo "$as_me:$LINENO: result: yes" >&5
24971$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024972else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024973 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024974sed 's/^/| /' conftest.$ac_ext >&5
24975
Antoine Pitroub52ec782009-01-25 16:34:23 +000024976 { $as_echo "$as_me:$LINENO: result: no" >&5
24977$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000024978
24979fi
24980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024981rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24982
Antoine Pitroub52ec782009-01-25 16:34:23 +000024983{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
24984$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000024985
24986if test -r /dev/ptmx
24987then
Antoine Pitroub52ec782009-01-25 16:34:23 +000024988 { $as_echo "$as_me:$LINENO: result: yes" >&5
24989$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024990
24991cat >>confdefs.h <<\_ACEOF
24992#define HAVE_DEV_PTMX 1
24993_ACEOF
24994
Thomas Wouters89f507f2006-12-13 04:49:30 +000024995else
Antoine Pitroub52ec782009-01-25 16:34:23 +000024996 { $as_echo "$as_me:$LINENO: result: no" >&5
24997$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000024998fi
24999
Antoine Pitroub52ec782009-01-25 16:34:23 +000025000{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25001$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000025002
25003if test -r /dev/ptc
25004then
Antoine Pitroub52ec782009-01-25 16:34:23 +000025005 { $as_echo "$as_me:$LINENO: result: yes" >&5
25006$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025007
25008cat >>confdefs.h <<\_ACEOF
25009#define HAVE_DEV_PTC 1
25010_ACEOF
25011
Thomas Wouters89f507f2006-12-13 04:49:30 +000025012else
Antoine Pitroub52ec782009-01-25 16:34:23 +000025013 { $as_echo "$as_me:$LINENO: result: no" >&5
25014$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025015fi
25016
Antoine Pitroub52ec782009-01-25 16:34:23 +000025017{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25018$as_echo_n "checking for %zd printf() format support... " >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025019if test "$cross_compiling" = yes; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000025020 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25021$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25022{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025023See \`config.log' for more details." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000025024$as_echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000025025See \`config.log' for more details." >&2;}
Antoine Pitroub52ec782009-01-25 16:34:23 +000025026 { (exit 1); exit 1; }; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025027else
25028 cat >conftest.$ac_ext <<_ACEOF
25029/* confdefs.h. */
25030_ACEOF
25031cat confdefs.h >>conftest.$ac_ext
25032cat >>conftest.$ac_ext <<_ACEOF
25033/* end confdefs.h. */
25034#include <stdio.h>
25035#include <stddef.h>
25036#include <string.h>
25037
Christian Heimes2c181612007-12-17 20:04:13 +000025038#ifdef HAVE_SYS_TYPES_H
25039#include <sys/types.h>
25040#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000025041
25042#ifdef HAVE_SSIZE_T
25043typedef ssize_t Py_ssize_t;
25044#elif SIZEOF_VOID_P == SIZEOF_LONG
25045typedef long Py_ssize_t;
25046#else
25047typedef int Py_ssize_t;
25048#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000025049
Christian Heimes2c181612007-12-17 20:04:13 +000025050int main()
25051{
25052 char buffer[256];
25053
Thomas Wouters477c8d52006-05-27 19:21:47 +000025054 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25055 return 1;
25056
Thomas Wouters89f507f2006-12-13 04:49:30 +000025057 if (strcmp(buffer, "123"))
25058 return 1;
25059
25060 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25061 return 1;
25062
25063 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000025064 return 1;
25065
25066 return 0;
25067}
25068_ACEOF
25069rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025070if { (ac_try="$ac_link"
25071case "(($ac_try" in
25072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25073 *) ac_try_echo=$ac_try;;
25074esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000025075eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25076$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025077 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025078 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000025079 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025081 { (case "(($ac_try" in
25082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25083 *) ac_try_echo=$ac_try;;
25084esac
Antoine Pitroub52ec782009-01-25 16:34:23 +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_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025088 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000025089 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025090 (exit $ac_status); }; }; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000025091 { $as_echo "$as_me:$LINENO: result: yes" >&5
25092$as_echo "yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025093
25094cat >>confdefs.h <<\_ACEOF
25095#define PY_FORMAT_SIZE_T "z"
25096_ACEOF
25097
25098else
Antoine Pitroub52ec782009-01-25 16:34:23 +000025099 $as_echo "$as_me: program exited with status $ac_status" >&5
25100$as_echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000025101sed 's/^/| /' conftest.$ac_ext >&5
25102
25103( exit $ac_status )
Antoine Pitroub52ec782009-01-25 16:34:23 +000025104{ $as_echo "$as_me:$LINENO: result: no" >&5
25105$as_echo "no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000025106fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000025107rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025108rm -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 +000025109fi
25110
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025111
25112
Antoine Pitroub52ec782009-01-25 16:34:23 +000025113{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
25114$as_echo_n "checking for socklen_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025115if test "${ac_cv_type_socklen_t+set}" = set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000025116 $as_echo_n "(cached) " >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025117else
Antoine Pitroub52ec782009-01-25 16:34:23 +000025118 ac_cv_type_socklen_t=no
25119cat >conftest.$ac_ext <<_ACEOF
25120/* confdefs.h. */
25121_ACEOF
25122cat confdefs.h >>conftest.$ac_ext
25123cat >>conftest.$ac_ext <<_ACEOF
25124/* end confdefs.h. */
25125
25126#ifdef HAVE_SYS_TYPES_H
25127#include <sys/types.h>
25128#endif
25129#ifdef HAVE_SYS_SOCKET_H
25130#include <sys/socket.h>
25131#endif
25132
25133
25134int
25135main ()
25136{
25137if (sizeof (socklen_t))
25138 return 0;
25139 ;
25140 return 0;
25141}
25142_ACEOF
25143rm -f conftest.$ac_objext
25144if { (ac_try="$ac_compile"
25145case "(($ac_try" in
25146 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25147 *) ac_try_echo=$ac_try;;
25148esac
25149eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25150$as_echo "$ac_try_echo") >&5
25151 (eval "$ac_compile") 2>conftest.er1
25152 ac_status=$?
25153 grep -v '^ *+' conftest.er1 >conftest.err
25154 rm -f conftest.er1
25155 cat conftest.err >&5
25156 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25157 (exit $ac_status); } && {
25158 test -z "$ac_c_werror_flag" ||
25159 test ! -s conftest.err
25160 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025161 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025162/* confdefs.h. */
25163_ACEOF
25164cat confdefs.h >>conftest.$ac_ext
25165cat >>conftest.$ac_ext <<_ACEOF
25166/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025167
25168#ifdef HAVE_SYS_TYPES_H
25169#include <sys/types.h>
25170#endif
25171#ifdef HAVE_SYS_SOCKET_H
25172#include <sys/socket.h>
25173#endif
25174
25175
Martin v. Löwis11437992002-04-12 09:54:03 +000025176int
25177main ()
25178{
Antoine Pitroub52ec782009-01-25 16:34:23 +000025179if (sizeof ((socklen_t)))
25180 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025181 ;
25182 return 0;
25183}
25184_ACEOF
25185rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025186if { (ac_try="$ac_compile"
25187case "(($ac_try" in
25188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25189 *) ac_try_echo=$ac_try;;
25190esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000025191eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25192$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025193 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025194 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025195 grep -v '^ *+' conftest.er1 >conftest.err
25196 rm -f conftest.er1
25197 cat conftest.err >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000025198 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025199 (exit $ac_status); } && {
25200 test -z "$ac_c_werror_flag" ||
25201 test ! -s conftest.err
25202 } && test -s conftest.$ac_objext; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000025203 :
Guido van Rossum95713eb2000-05-18 20:53:31 +000025204else
Antoine Pitroub52ec782009-01-25 16:34:23 +000025205 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025206sed 's/^/| /' conftest.$ac_ext >&5
25207
Antoine Pitroub52ec782009-01-25 16:34:23 +000025208 ac_cv_type_socklen_t=yes
25209fi
25210
25211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25212else
25213 $as_echo "$as_me: failed program was:" >&5
25214sed 's/^/| /' conftest.$ac_ext >&5
25215
25216
Guido van Rossum95713eb2000-05-18 20:53:31 +000025217fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025218
25219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025220fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000025221{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25222$as_echo "$ac_cv_type_socklen_t" >&6; }
25223if test "x$ac_cv_type_socklen_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025224 :
25225else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025226
Martin v. Löwis01c04012002-11-11 14:58:44 +000025227cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025228#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025229_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025230
25231fi
25232
Michael W. Hudson54241132001-12-07 15:38:26 +000025233
Antoine Pitroub52ec782009-01-25 16:34:23 +000025234{ $as_echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
25235$as_echo_n "checking for broken mbstowcs... " >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025236if test "$cross_compiling" = yes; then
25237 ac_cv_broken_mbstowcs=no
25238else
25239 cat >conftest.$ac_ext <<_ACEOF
25240/* confdefs.h. */
25241_ACEOF
25242cat confdefs.h >>conftest.$ac_ext
25243cat >>conftest.$ac_ext <<_ACEOF
25244/* end confdefs.h. */
25245
25246#include<stdlib.h>
25247int main() {
25248 size_t len = -1;
25249 const char *str = "text";
25250 len = mbstowcs(NULL, str, 0);
25251 return (len != 4);
25252}
25253
25254_ACEOF
25255rm -f conftest$ac_exeext
25256if { (ac_try="$ac_link"
25257case "(($ac_try" in
25258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25259 *) ac_try_echo=$ac_try;;
25260esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000025261eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25262$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025263 (eval "$ac_link") 2>&5
25264 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000025265 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025266 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25267 { (case "(($ac_try" in
25268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25269 *) ac_try_echo=$ac_try;;
25270esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000025271eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25272$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025273 (eval "$ac_try") 2>&5
25274 ac_status=$?
Antoine Pitroub52ec782009-01-25 16:34:23 +000025275 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025276 (exit $ac_status); }; }; then
25277 ac_cv_broken_mbstowcs=no
25278else
Antoine Pitroub52ec782009-01-25 16:34:23 +000025279 $as_echo "$as_me: program exited with status $ac_status" >&5
25280$as_echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000025281sed 's/^/| /' conftest.$ac_ext >&5
25282
25283( exit $ac_status )
25284ac_cv_broken_mbstowcs=yes
25285fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000025286rm -rf conftest.dSYM
Antoine Pitroufff95302008-09-03 18:58:51 +000025287rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25288fi
25289
25290
Antoine Pitroub52ec782009-01-25 16:34:23 +000025291{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
25292$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000025293if test "$ac_cv_broken_mbstowcs" = yes
25294then
25295
25296cat >>confdefs.h <<\_ACEOF
25297#define HAVE_BROKEN_MBSTOWCS 1
25298_ACEOF
25299
25300fi
25301
Antoine Pitroub52ec782009-01-25 16:34:23 +000025302# Check for --with-computed-gotos
25303{ $as_echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
25304$as_echo_n "checking for --with-computed-gotos... " >&6; }
25305
25306# Check whether --with-computed-gotos was given.
25307if test "${with_computed_gotos+set}" = set; then
25308 withval=$with_computed_gotos;
25309if test "$withval" != no
25310then
25311
25312cat >>confdefs.h <<\_ACEOF
25313#define USE_COMPUTED_GOTOS 1
25314_ACEOF
25315
25316 { $as_echo "$as_me:$LINENO: result: yes" >&5
25317$as_echo "yes" >&6; }
25318else { $as_echo "$as_me:$LINENO: result: no" >&5
25319$as_echo "no" >&6; }
25320fi
25321else
25322 { $as_echo "$as_me:$LINENO: result: no" >&5
25323$as_echo "no" >&6; }
25324fi
25325
25326
25327
Michael W. Hudson54241132001-12-07 15:38:26 +000025328
25329
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025330for h in `(cd $srcdir;echo Python/thread_*.h)`
25331do
25332 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25333done
25334
Michael W. Hudson54241132001-12-07 15:38:26 +000025335
Neal Norwitzd24499d2005-12-18 21:36:39 +000025336SRCDIRS="Parser Grammar Objects Python Modules Mac"
Antoine Pitroub52ec782009-01-25 16:34:23 +000025337{ $as_echo "$as_me:$LINENO: checking for build directories" >&5
25338$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025339for dir in $SRCDIRS; do
25340 if test ! -d $dir; then
25341 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000025342 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000025343done
Antoine Pitroub52ec782009-01-25 16:34:23 +000025344{ $as_echo "$as_me:$LINENO: result: done" >&5
25345$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000025346
Guido van Rossum627b2d71993-12-24 10:39:16 +000025347# generate output files
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025348ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000025349
Martin v. Löwis11437992002-04-12 09:54:03 +000025350cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025351# This file is a shell script that caches the results of configure
25352# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000025353# scripts and configure runs, see configure's option --config-cache.
25354# It is not useful on other systems. If it contains results you don't
25355# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025356#
Martin v. Löwis11437992002-04-12 09:54:03 +000025357# config.status only pays attention to the cache file if you give it
25358# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025359#
Skip Montanaro6dead952003-09-25 14:50:04 +000025360# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000025361# loading this file, other *unset* `ac_cv_foo' will be assigned the
25362# following values.
25363
25364_ACEOF
25365
Guido van Rossumf78abae1997-01-21 22:02:36 +000025366# The following way of writing the cache mishandles newlines in values,
25367# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025368# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025369# Ultrix sh set writes to stderr and can't be redirected directly,
25370# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025371(
25372 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
25373 eval ac_val=\$$ac_var
25374 case $ac_val in #(
25375 *${as_nl}*)
25376 case $ac_var in #(
Antoine Pitroub52ec782009-01-25 16:34:23 +000025377 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
25378$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025379 esac
25380 case $ac_var in #(
25381 _ | IFS | as_nl) ;; #(
Antoine Pitroub52ec782009-01-25 16:34:23 +000025382 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025383 *) $as_unset $ac_var ;;
25384 esac ;;
25385 esac
25386 done
25387
Martin v. Löwis11437992002-04-12 09:54:03 +000025388 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025389 case $as_nl`(ac_space=' '; set) 2>&1` in #(
25390 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000025391 # `set' does not quote correctly, so add quotes (double-quote
25392 # substitution turns \\\\ into \\, and sed turns \\ into \).
25393 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025394 "s/'/'\\\\''/g;
25395 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025396 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000025397 *)
25398 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025399 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000025400 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025401 esac |
25402 sort
25403) |
Martin v. Löwis11437992002-04-12 09:54:03 +000025404 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025405 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000025406 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025407 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000025408 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
25409 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025410 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
25411 :end' >>confcache
25412if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
25413 if test -w "$cache_file"; then
25414 test "x$cache_file" != "x/dev/null" &&
Antoine Pitroub52ec782009-01-25 16:34:23 +000025415 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
25416$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025417 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025418 else
Antoine Pitroub52ec782009-01-25 16:34:23 +000025419 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
25420$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025421 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025422fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000025423rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000025424
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025425test "x$prefix" = xNONE && prefix=$ac_default_prefix
25426# Let make expand exec_prefix.
25427test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000025428
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025429DEFS=-DHAVE_CONFIG_H
25430
Skip Montanaro6dead952003-09-25 14:50:04 +000025431ac_libobjs=
25432ac_ltlibobjs=
25433for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
25434 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025435 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Antoine Pitroub52ec782009-01-25 16:34:23 +000025436 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025437 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
25438 # will be set to the directory where LIBOBJS objects are built.
25439 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
25440 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000025441done
25442LIBOBJS=$ac_libobjs
25443
25444LTLIBOBJS=$ac_ltlibobjs
25445
25446
Martin v. Löwis11437992002-04-12 09:54:03 +000025447
Antoine Pitroub52ec782009-01-25 16:34:23 +000025448
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025449: ${CONFIG_STATUS=./config.status}
Antoine Pitroub52ec782009-01-25 16:34:23 +000025450ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000025451ac_clean_files_save=$ac_clean_files
25452ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Antoine Pitroub52ec782009-01-25 16:34:23 +000025453{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
25454$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
25455cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000025456#! $SHELL
25457# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025458# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000025459# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000025460# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000025461
Martin v. Löwis11437992002-04-12 09:54:03 +000025462debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000025463ac_cs_recheck=false
25464ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000025465SHELL=\${CONFIG_SHELL-$SHELL}
25466_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000025467
Antoine Pitroub52ec782009-01-25 16:34:23 +000025468cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000025469## --------------------- ##
25470## M4sh Initialization. ##
25471## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000025472
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025473# Be more Bourne compatible
25474DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000025475if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25476 emulate sh
25477 NULLCMD=:
Antoine Pitroub52ec782009-01-25 16:34:23 +000025478 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000025479 # is contrary to our usage. Disable this feature.
25480 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025481 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025482else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025483 case `(set -o) 2>/dev/null` in
25484 *posix*) set -o posix ;;
25485esac
25486
Michael W. Hudson54241132001-12-07 15:38:26 +000025487fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000025488
25489
Michael W. Hudson54241132001-12-07 15:38:26 +000025490
Michael W. Hudson54241132001-12-07 15:38:26 +000025491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025492# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000025493# Avoid depending upon Character Ranges.
25494as_cr_letters='abcdefghijklmnopqrstuvwxyz'
25495as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
25496as_cr_Letters=$as_cr_letters$as_cr_LETTERS
25497as_cr_digits='0123456789'
25498as_cr_alnum=$as_cr_Letters$as_cr_digits
25499
Antoine Pitroub52ec782009-01-25 16:34:23 +000025500as_nl='
25501'
25502export as_nl
25503# Printing a long string crashes Solaris 7 /usr/bin/printf.
25504as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25505as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
25506as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
25507if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
25508 as_echo='printf %s\n'
25509 as_echo_n='printf %s'
25510else
25511 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
25512 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
25513 as_echo_n='/usr/ucb/echo -n'
25514 else
25515 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
25516 as_echo_n_body='eval
25517 arg=$1;
25518 case $arg in
25519 *"$as_nl"*)
25520 expr "X$arg" : "X\\(.*\\)$as_nl";
25521 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
25522 esac;
25523 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
25524 '
25525 export as_echo_n_body
25526 as_echo_n='sh -c $as_echo_n_body as_echo'
25527 fi
25528 export as_echo_body
25529 as_echo='sh -c $as_echo_body as_echo'
25530fi
25531
Martin v. Löwis11437992002-04-12 09:54:03 +000025532# The user is always right.
25533if test "${PATH_SEPARATOR+set}" != set; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000025534 PATH_SEPARATOR=:
25535 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
25536 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
25537 PATH_SEPARATOR=';'
25538 }
Martin v. Löwis11437992002-04-12 09:54:03 +000025539fi
25540
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025541# Support unset when possible.
25542if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
25543 as_unset=unset
25544else
25545 as_unset=false
25546fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025547
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025548
25549# IFS
25550# We need space, tab and new line, in precisely that order. Quoting is
25551# there to prevent editors from complaining about space-tab.
25552# (If _AS_PATH_WALK were called with IFS unset, it would disable word
25553# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025554IFS=" "" $as_nl"
25555
25556# Find who we are. Look in the path if we contain no directory separator.
25557case $0 in
25558 *[\\/]* ) as_myself=$0 ;;
25559 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000025560for as_dir in $PATH
25561do
25562 IFS=$as_save_IFS
25563 test -z "$as_dir" && as_dir=.
25564 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
25565done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025566IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000025567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025568 ;;
25569esac
25570# We did not find ourselves, most probably we were run as `sh COMMAND'
25571# in which case we are not to be found in the path.
25572if test "x$as_myself" = x; then
25573 as_myself=$0
25574fi
25575if test ! -f "$as_myself"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000025576 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025577 { (exit 1); exit 1; }
25578fi
25579
25580# Work around bugs in pre-3.0 UWIN ksh.
25581for as_var in ENV MAIL MAILPATH
25582do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
25583done
25584PS1='$ '
25585PS2='> '
25586PS4='+ '
25587
25588# NLS nuisances.
Antoine Pitroub52ec782009-01-25 16:34:23 +000025589LC_ALL=C
25590export LC_ALL
25591LANGUAGE=C
25592export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025593
25594# Required to use basename.
25595if expr a : '\(a\)' >/dev/null 2>&1 &&
25596 test "X`expr 00001 : '.*\(...\)'`" = X001; then
25597 as_expr=expr
25598else
25599 as_expr=false
25600fi
25601
25602if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
25603 as_basename=basename
25604else
25605 as_basename=false
25606fi
25607
25608
25609# Name of the executable.
25610as_me=`$as_basename -- "$0" ||
25611$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
25612 X"$0" : 'X\(//\)$' \| \
25613 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Antoine Pitroub52ec782009-01-25 16:34:23 +000025614$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025615 sed '/^.*\/\([^/][^/]*\)\/*$/{
25616 s//\1/
25617 q
25618 }
25619 /^X\/\(\/\/\)$/{
25620 s//\1/
25621 q
25622 }
25623 /^X\/\(\/\).*/{
25624 s//\1/
25625 q
25626 }
25627 s/.*/./; q'`
25628
25629# CDPATH.
25630$as_unset CDPATH
25631
25632
25633
Martin v. Löwis11437992002-04-12 09:54:03 +000025634 as_lineno_1=$LINENO
25635 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000025636 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025637 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000025638
Martin v. Löwis11437992002-04-12 09:54:03 +000025639 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
25640 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025641 # line-number line after each line using $LINENO; the second 'sed'
25642 # does the real work. The second script uses 'N' to pair each
25643 # line-number line with the line containing $LINENO, and appends
25644 # trailing '-' during substitution so that $LINENO is not a special
25645 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000025646 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025647 # scripts with optimization help from Paolo Bonzini. Blame Lee
25648 # E. McMahon (1931-1989) for sed's syntax. :-)
25649 sed -n '
25650 p
25651 /[$]LINENO/=
25652 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000025653 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025654 s/[$]LINENO.*/&-/
25655 t lineno
25656 b
25657 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000025658 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025659 :loop
25660 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000025661 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025662 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000025663 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025664 chmod +x "$as_me.lineno" ||
Antoine Pitroub52ec782009-01-25 16:34:23 +000025665 { $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 +000025666 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025667
Martin v. Löwis11437992002-04-12 09:54:03 +000025668 # Don't try to exec as it changes $[0], causing all sort of problems
25669 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025670 # original and so on. Autoconf is especially sensitive to this).
25671 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000025672 # Exit status is that of the last command.
25673 exit
25674}
25675
25676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025677if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
25678 as_dirname=dirname
25679else
25680 as_dirname=false
25681fi
25682
25683ECHO_C= ECHO_N= ECHO_T=
25684case `echo -n x` in
25685-n*)
25686 case `echo 'x\c'` in
25687 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
25688 *) ECHO_C='\c';;
25689 esac;;
25690*)
25691 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000025692esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025693if expr a : '\(a\)' >/dev/null 2>&1 &&
25694 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025695 as_expr=expr
25696else
25697 as_expr=false
25698fi
25699
25700rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025701if test -d conf$$.dir; then
25702 rm -f conf$$.dir/conf$$.file
25703else
25704 rm -f conf$$.dir
Antoine Pitroub52ec782009-01-25 16:34:23 +000025705 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025706fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000025707if (echo >conf$$.file) 2>/dev/null; then
25708 if ln -s conf$$.file conf$$ 2>/dev/null; then
25709 as_ln_s='ln -s'
25710 # ... but there are two gotchas:
25711 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
25712 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
25713 # In both cases, we have to default to `cp -p'.
25714 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
25715 as_ln_s='cp -p'
25716 elif ln conf$$.file conf$$ 2>/dev/null; then
25717 as_ln_s=ln
25718 else
Martin v. Löwis11437992002-04-12 09:54:03 +000025719 as_ln_s='cp -p'
Antoine Pitroub52ec782009-01-25 16:34:23 +000025720 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025721else
25722 as_ln_s='cp -p'
25723fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025724rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
25725rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000025726
Skip Montanaro6dead952003-09-25 14:50:04 +000025727if mkdir -p . 2>/dev/null; then
25728 as_mkdir_p=:
25729else
Skip Montanarof0d5f792004-08-15 14:08:23 +000025730 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000025731 as_mkdir_p=false
25732fi
25733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025734if test -x / >/dev/null 2>&1; then
25735 as_test_x='test -x'
25736else
25737 if ls -dL / >/dev/null 2>&1; then
25738 as_ls_L_option=L
25739 else
25740 as_ls_L_option=
25741 fi
25742 as_test_x='
25743 eval sh -c '\''
25744 if test -d "$1"; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000025745 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025746 else
25747 case $1 in
Antoine Pitroub52ec782009-01-25 16:34:23 +000025748 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025749 esac;
25750 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
25751 ???[sx]*):;;*)false;;esac;fi
25752 '\'' sh
25753 '
25754fi
25755as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000025756
25757# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025758as_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 +000025759
25760# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000025761as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025762
25763
Martin v. Löwis11437992002-04-12 09:54:03 +000025764exec 6>&1
25765
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025766# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000025767# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025768# values after options handling.
25769ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000025770This file was extended by python $as_me 3.1, which was
Antoine Pitroub52ec782009-01-25 16:34:23 +000025771generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000025772
25773 CONFIG_FILES = $CONFIG_FILES
25774 CONFIG_HEADERS = $CONFIG_HEADERS
25775 CONFIG_LINKS = $CONFIG_LINKS
25776 CONFIG_COMMANDS = $CONFIG_COMMANDS
25777 $ $0 $@
25778
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025779on `(hostname || uname -n) 2>/dev/null | sed 1q`
25780"
25781
Martin v. Löwis11437992002-04-12 09:54:03 +000025782_ACEOF
25783
Antoine Pitroub52ec782009-01-25 16:34:23 +000025784case $ac_config_files in *"
25785"*) set x $ac_config_files; shift; ac_config_files=$*;;
25786esac
25787
25788case $ac_config_headers in *"
25789"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
25790esac
25791
25792
25793cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000025794# Files that config.status was made for.
Antoine Pitroub52ec782009-01-25 16:34:23 +000025795config_files="`echo $ac_config_files`"
25796config_headers="`echo $ac_config_headers`"
Martin v. Löwis11437992002-04-12 09:54:03 +000025797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025798_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025799
Antoine Pitroub52ec782009-01-25 16:34:23 +000025800cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000025801ac_cs_usage="\
25802\`$as_me' instantiates files from templates according to the
25803current configuration.
25804
Antoine Pitroub52ec782009-01-25 16:34:23 +000025805Usage: $0 [OPTION]... [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000025806
25807 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025808 -V, --version print version number and configuration settings, then exit
Antoine Pitroub52ec782009-01-25 16:34:23 +000025809 -q, --quiet, --silent
25810 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000025811 -d, --debug don't remove temporary files
25812 --recheck update $as_me by reconfiguring in the same conditions
Antoine Pitroub52ec782009-01-25 16:34:23 +000025813 --file=FILE[:TEMPLATE]
25814 instantiate the configuration file FILE
25815 --header=FILE[:TEMPLATE]
25816 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000025817
25818Configuration files:
25819$config_files
25820
25821Configuration headers:
25822$config_headers
25823
25824Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025826_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000025827cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000025828ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000025829python config.status 3.1
Antoine Pitroub52ec782009-01-25 16:34:23 +000025830configured by $0, generated by GNU Autoconf 2.63,
25831 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000025832
Antoine Pitroub52ec782009-01-25 16:34:23 +000025833Copyright (C) 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000025834This config.status script is free software; the Free Software Foundation
25835gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025836
25837ac_pwd='$ac_pwd'
25838srcdir='$srcdir'
25839INSTALL='$INSTALL'
Antoine Pitroub52ec782009-01-25 16:34:23 +000025840test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000025841_ACEOF
25842
Antoine Pitroub52ec782009-01-25 16:34:23 +000025843cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
25844# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000025845ac_need_defaults=:
25846while test $# != 0
25847do
25848 case $1 in
25849 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025850 ac_option=`expr "X$1" : 'X\([^=]*\)='`
25851 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000025852 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000025853 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025854 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000025855 ac_option=$1
25856 ac_optarg=$2
25857 ac_shift=shift
25858 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025859 esac
25860
Skip Montanaro6dead952003-09-25 14:50:04 +000025861 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000025862 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000025863 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25864 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025865 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Antoine Pitroub52ec782009-01-25 16:34:23 +000025866 $as_echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025867 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000025868 debug=: ;;
25869 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000025870 $ac_shift
Antoine Pitroub52ec782009-01-25 16:34:23 +000025871 case $ac_optarg in
25872 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25873 esac
25874 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025875 ac_need_defaults=false;;
25876 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000025877 $ac_shift
Antoine Pitroub52ec782009-01-25 16:34:23 +000025878 case $ac_optarg in
25879 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
25880 esac
25881 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000025882 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025883 --he | --h)
25884 # Conflict between --help and --header
Antoine Pitroub52ec782009-01-25 16:34:23 +000025885 { $as_echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025886Try \`$0 --help' for more information." >&2
25887 { (exit 1); exit 1; }; };;
25888 --help | --hel | -h )
Antoine Pitroub52ec782009-01-25 16:34:23 +000025889 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000025890 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
25891 | -silent | --silent | --silen | --sile | --sil | --si | --s)
25892 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025893
25894 # This is an error.
Antoine Pitroub52ec782009-01-25 16:34:23 +000025895 -*) { $as_echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025896Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025897 { (exit 1); exit 1; }; } ;;
25898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025899 *) ac_config_targets="$ac_config_targets $1"
25900 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000025901
25902 esac
25903 shift
25904done
25905
Skip Montanaro6dead952003-09-25 14:50:04 +000025906ac_configure_extra_args=
25907
25908if $ac_cs_silent; then
25909 exec 6>/dev/null
25910 ac_configure_extra_args="$ac_configure_extra_args --silent"
25911fi
25912
25913_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000025914cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000025915if \$ac_cs_recheck; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000025916 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
25917 shift
25918 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
25919 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025920 export CONFIG_SHELL
Antoine Pitroub52ec782009-01-25 16:34:23 +000025921 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000025922fi
25923
Martin v. Löwis11437992002-04-12 09:54:03 +000025924_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000025925cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025926exec 5>>config.log
25927{
25928 echo
25929 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
25930## Running $as_me. ##
25931_ASBOX
Antoine Pitroub52ec782009-01-25 16:34:23 +000025932 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025933} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025935_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000025936cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025937_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000025938
Antoine Pitroub52ec782009-01-25 16:34:23 +000025939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025940
25941# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000025942for ac_config_target in $ac_config_targets
25943do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025944 case $ac_config_target in
25945 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
25946 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
25947 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000025948 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
25949 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025950 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
25951 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
25952
Antoine Pitroub52ec782009-01-25 16:34:23 +000025953 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
25954$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025955 { (exit 1); exit 1; }; };;
25956 esac
25957done
25958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025959
Martin v. Löwis11437992002-04-12 09:54:03 +000025960# If the user did not use the arguments to specify the items to instantiate,
25961# then the envvar interface is used. Set only those that are not.
25962# We use the long form for the default assignment because of an extremely
25963# bizarre bug on SunOS 4.1.3.
25964if $ac_need_defaults; then
25965 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25966 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25967fi
25968
Skip Montanaro6dead952003-09-25 14:50:04 +000025969# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025970# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000025971# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025972# Hook for its removal unless debugging.
25973# Note that there is a small window in which the directory will not be cleaned:
25974# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000025975$debug ||
25976{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025977 tmp=
25978 trap 'exit_status=$?
25979 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
25980' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000025981 trap '{ (exit 1); exit 1; }' 1 2 13 15
25982}
Martin v. Löwis11437992002-04-12 09:54:03 +000025983# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000025984
Martin v. Löwis11437992002-04-12 09:54:03 +000025985{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025986 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000025987 test -n "$tmp" && test -d "$tmp"
25988} ||
25989{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025990 tmp=./conf$$-$RANDOM
25991 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000025992} ||
25993{
Antoine Pitroub52ec782009-01-25 16:34:23 +000025994 $as_echo "$as_me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000025995 { (exit 1); exit 1; }
25996}
25997
Antoine Pitroub52ec782009-01-25 16:34:23 +000025998# Set up the scripts for CONFIG_FILES section.
25999# No need to generate them if there are no CONFIG_FILES.
26000# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026001if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026002
Antoine Pitroub52ec782009-01-25 16:34:23 +000026003
26004ac_cr='
26005'
26006ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26007if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
26008 ac_cs_awk_cr='\\r'
26009else
26010 ac_cs_awk_cr=$ac_cr
26011fi
26012
26013echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026014_ACEOF
26015
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026016
Antoine Pitroub52ec782009-01-25 16:34:23 +000026017{
26018 echo "cat >conf$$subs.awk <<_ACEOF" &&
26019 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26020 echo "_ACEOF"
26021} >conf$$subs.sh ||
26022 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26023$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26024 { (exit 1); exit 1; }; }
26025ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026026ac_delim='%!_!# '
26027for ac_last_try in false false false false false :; do
Antoine Pitroub52ec782009-01-25 16:34:23 +000026028 . ./conf$$subs.sh ||
26029 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26030$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26031 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026032
Antoine Pitroub52ec782009-01-25 16:34:23 +000026033 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26034 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026035 break
26036 elif $ac_last_try; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000026037 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26038$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026039 { (exit 1); exit 1; }; }
26040 else
26041 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026042 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026043done
Antoine Pitroub52ec782009-01-25 16:34:23 +000026044rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026045
Antoine Pitroub52ec782009-01-25 16:34:23 +000026046cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26047cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026048_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000026049sed -n '
26050h
26051s/^/S["/; s/!.*/"]=/
26052p
26053g
26054s/^[^!]*!//
26055:repl
26056t repl
26057s/'"$ac_delim"'$//
26058t delim
26059:nl
26060h
26061s/\(.\{148\}\).*/\1/
26062t more1
26063s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26064p
26065n
26066b repl
26067:more1
26068s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26069p
26070g
26071s/.\{148\}//
26072t nl
26073:delim
26074h
26075s/\(.\{148\}\).*/\1/
26076t more2
26077s/["\\]/\\&/g; s/^/"/; s/$/"/
26078p
26079b
26080:more2
26081s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26082p
26083g
26084s/.\{148\}//
26085t delim
26086' <conf$$subs.awk | sed '
26087/^[^""]/{
26088 N
26089 s/\n//
26090}
26091' >>$CONFIG_STATUS || ac_write_fail=1
26092rm -f conf$$subs.awk
26093cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26094_ACAWK
26095cat >>"\$tmp/subs1.awk" <<_ACAWK &&
26096 for (key in S) S_is_set[key] = 1
26097 FS = ""
26098
26099}
26100{
26101 line = $ 0
26102 nfields = split(line, field, "@")
26103 substed = 0
26104 len = length(field[1])
26105 for (i = 2; i < nfields; i++) {
26106 key = field[i]
26107 keylen = length(key)
26108 if (S_is_set[key]) {
26109 value = S[key]
26110 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26111 len += length(value) + length(field[++i])
26112 substed = 1
26113 } else
26114 len += 1 + keylen
26115 }
26116
26117 print line
26118}
26119
26120_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026121_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000026122cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26123if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26124 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26125else
26126 cat
26127fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
26128 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
26129$as_echo "$as_me: error: could not setup config files machinery" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026130 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026131_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026132
26133# VPATH may cause trouble with some makes, so we remove $(srcdir),
26134# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26135# trailing colons and then remove the whole line if VPATH becomes empty
26136# (actually we leave an empty line to preserve line numbers).
26137if test "x$srcdir" = x.; then
26138 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26139s/:*\$(srcdir):*/:/
26140s/:*\${srcdir}:*/:/
26141s/:*@srcdir@:*/:/
26142s/^\([^=]*=[ ]*\):*/\1/
26143s/:*$//
26144s/^[^=]*=[ ]*$//
26145}'
26146fi
26147
Antoine Pitroub52ec782009-01-25 16:34:23 +000026148cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026149fi # test -n "$CONFIG_FILES"
26150
Antoine Pitroub52ec782009-01-25 16:34:23 +000026151# Set up the scripts for CONFIG_HEADERS section.
26152# No need to generate them if there are no CONFIG_HEADERS.
26153# This happens for instance with `./config.status Makefile'.
26154if test -n "$CONFIG_HEADERS"; then
26155cat >"$tmp/defines.awk" <<\_ACAWK ||
26156BEGIN {
26157_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026158
Antoine Pitroub52ec782009-01-25 16:34:23 +000026159# Transform confdefs.h into an awk script `defines.awk', embedded as
26160# here-document in config.status, that substitutes the proper values into
26161# config.h.in to produce config.h.
26162
26163# Create a delimiter string that does not exist in confdefs.h, to ease
26164# handling of long lines.
26165ac_delim='%!_!# '
26166for ac_last_try in false false :; do
26167 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
26168 if test -z "$ac_t"; then
26169 break
26170 elif $ac_last_try; then
26171 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
26172$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
26173 { (exit 1); exit 1; }; }
26174 else
26175 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26176 fi
26177done
26178
26179# For the awk script, D is an array of macro values keyed by name,
26180# likewise P contains macro parameters if any. Preserve backslash
26181# newline sequences.
26182
26183ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26184sed -n '
26185s/.\{148\}/&'"$ac_delim"'/g
26186t rset
26187:rset
26188s/^[ ]*#[ ]*define[ ][ ]*/ /
26189t def
26190d
26191:def
26192s/\\$//
26193t bsnl
26194s/["\\]/\\&/g
26195s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26196D["\1"]=" \3"/p
26197s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
26198d
26199:bsnl
26200s/["\\]/\\&/g
26201s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26202D["\1"]=" \3\\\\\\n"\\/p
26203t cont
26204s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26205t cont
26206d
26207:cont
26208n
26209s/.\{148\}/&'"$ac_delim"'/g
26210t clear
26211:clear
26212s/\\$//
26213t bsnlc
26214s/["\\]/\\&/g; s/^/"/; s/$/"/p
26215d
26216:bsnlc
26217s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26218b cont
26219' <confdefs.h | sed '
26220s/'"$ac_delim"'/"\\\
26221"/g' >>$CONFIG_STATUS || ac_write_fail=1
26222
26223cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26224 for (key in D) D_is_set[key] = 1
26225 FS = ""
26226}
26227/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26228 line = \$ 0
26229 split(line, arg, " ")
26230 if (arg[1] == "#") {
26231 defundef = arg[2]
26232 mac1 = arg[3]
26233 } else {
26234 defundef = substr(arg[1], 2)
26235 mac1 = arg[2]
26236 }
26237 split(mac1, mac2, "(") #)
26238 macro = mac2[1]
26239 prefix = substr(line, 1, index(line, defundef) - 1)
26240 if (D_is_set[macro]) {
26241 # Preserve the white space surrounding the "#".
26242 print prefix "define", macro P[macro] D[macro]
26243 next
26244 } else {
26245 # Replace #undef with comments. This is necessary, for example,
26246 # in the case of _POSIX_SOURCE, which is predefined and required
26247 # on some systems where configure will not decide to define it.
26248 if (defundef == "undef") {
26249 print "/*", prefix defundef, macro, "*/"
26250 next
26251 }
26252 }
26253}
26254{ print }
26255_ACAWK
26256_ACEOF
26257cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26258 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
26259$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
26260 { (exit 1); exit 1; }; }
26261fi # test -n "$CONFIG_HEADERS"
26262
26263
26264eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
26265shift
26266for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026267do
26268 case $ac_tag in
26269 :[FHLC]) ac_mode=$ac_tag; continue;;
26270 esac
26271 case $ac_mode$ac_tag in
26272 :[FHL]*:*);;
Antoine Pitroub52ec782009-01-25 16:34:23 +000026273 :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
26274$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026275 { (exit 1); exit 1; }; };;
26276 :[FH]-) ac_tag=-:-;;
26277 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26278 esac
26279 ac_save_IFS=$IFS
26280 IFS=:
26281 set x $ac_tag
26282 IFS=$ac_save_IFS
26283 shift
26284 ac_file=$1
26285 shift
26286
26287 case $ac_mode in
26288 :L) ac_source=$1;;
26289 :[FH])
26290 ac_file_inputs=
26291 for ac_f
26292 do
26293 case $ac_f in
26294 -) ac_f="$tmp/stdin";;
26295 *) # Look for the file first in the build tree, then in the source tree
26296 # (if the path is not absolute). The absolute path cannot be DOS-style,
26297 # because $ac_f cannot contain `:'.
26298 test -f "$ac_f" ||
26299 case $ac_f in
26300 [\\/$]*) false;;
26301 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26302 esac ||
Antoine Pitroub52ec782009-01-25 16:34:23 +000026303 { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26304$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026305 { (exit 1); exit 1; }; };;
26306 esac
Antoine Pitroub52ec782009-01-25 16:34:23 +000026307 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26308 ac_file_inputs="$ac_file_inputs '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026309 done
26310
26311 # Let's still pretend it is `configure' which instantiates (i.e., don't
26312 # use $as_me), people would be surprised to read:
26313 # /* config.h. Generated by config.status. */
Antoine Pitroub52ec782009-01-25 16:34:23 +000026314 configure_input='Generated from '`
26315 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26316 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026317 if test x"$ac_file" != x-; then
26318 configure_input="$ac_file. $configure_input"
Antoine Pitroub52ec782009-01-25 16:34:23 +000026319 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
26320$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026321 fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000026322 # Neutralize special characters interpreted by sed in replacement strings.
26323 case $configure_input in #(
26324 *\&* | *\|* | *\\* )
26325 ac_sed_conf_input=`$as_echo "$configure_input" |
26326 sed 's/[\\\\&|]/\\\\&/g'`;; #(
26327 *) ac_sed_conf_input=$configure_input;;
26328 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026329
26330 case $ac_tag in
Antoine Pitroub52ec782009-01-25 16:34:23 +000026331 *:-:* | *:-) cat >"$tmp/stdin" \
26332 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
26333$as_echo "$as_me: error: could not create $ac_file" >&2;}
26334 { (exit 1); exit 1; }; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026335 esac
26336 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026337 esac
26338
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026339 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000026340$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026341 X"$ac_file" : 'X\(//\)[^/]' \| \
26342 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026343 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Antoine Pitroub52ec782009-01-25 16:34:23 +000026344$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26346 s//\1/
26347 q
26348 }
26349 /^X\(\/\/\)[^/].*/{
26350 s//\1/
26351 q
26352 }
26353 /^X\(\/\/\)$/{
26354 s//\1/
26355 q
26356 }
26357 /^X\(\/\).*/{
26358 s//\1/
26359 q
26360 }
26361 s/.*/./; q'`
26362 { as_dir="$ac_dir"
26363 case $as_dir in #(
26364 -*) as_dir=./$as_dir;;
26365 esac
26366 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000026367 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026368 while :; do
26369 case $as_dir in #(
Antoine Pitroub52ec782009-01-25 16:34:23 +000026370 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026371 *) as_qdir=$as_dir;;
26372 esac
26373 as_dirs="'$as_qdir' $as_dirs"
26374 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000026375$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026376 X"$as_dir" : 'X\(//\)[^/]' \| \
26377 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026378 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Antoine Pitroub52ec782009-01-25 16:34:23 +000026379$as_echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026380 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
26381 s//\1/
26382 q
26383 }
26384 /^X\(\/\/\)[^/].*/{
26385 s//\1/
26386 q
26387 }
26388 /^X\(\/\/\)$/{
26389 s//\1/
26390 q
26391 }
26392 /^X\(\/\).*/{
26393 s//\1/
26394 q
26395 }
26396 s/.*/./; q'`
26397 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000026398 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026399 test -z "$as_dirs" || eval "mkdir $as_dirs"
Antoine Pitroub52ec782009-01-25 16:34:23 +000026400 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
26401$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000026402 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026403 ac_builddir=.
26404
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026405case "$ac_dir" in
26406.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
26407*)
Antoine Pitroub52ec782009-01-25 16:34:23 +000026408 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026409 # A ".." for each directory in $ac_dir_suffix.
Antoine Pitroub52ec782009-01-25 16:34:23 +000026410 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026411 case $ac_top_builddir_sub in
26412 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
26413 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
26414 esac ;;
26415esac
26416ac_abs_top_builddir=$ac_pwd
26417ac_abs_builddir=$ac_pwd$ac_dir_suffix
26418# for backward compatibility:
26419ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000026420
26421case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026422 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000026423 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026424 ac_top_srcdir=$ac_top_builddir_sub
26425 ac_abs_top_srcdir=$ac_pwd ;;
26426 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000026427 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026428 ac_top_srcdir=$srcdir
26429 ac_abs_top_srcdir=$srcdir ;;
26430 *) # Relative name.
26431 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
26432 ac_top_srcdir=$ac_top_build_prefix$srcdir
26433 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026434esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026435ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000026436
Martin v. Löwis11437992002-04-12 09:54:03 +000026437
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026438 case $ac_mode in
26439 :F)
26440 #
26441 # CONFIG_FILE
26442 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026443
26444 case $INSTALL in
26445 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026446 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026447 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000026448_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026449
Antoine Pitroub52ec782009-01-25 16:34:23 +000026450cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026451# If the template does not know about datarootdir, expand it.
26452# FIXME: This hack should be removed a few years after 2.60.
26453ac_datarootdir_hack=; ac_datarootdir_seen=
26454
Antoine Pitroub52ec782009-01-25 16:34:23 +000026455ac_sed_dataroot='
26456/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026457 p
26458 q
26459}
26460/@datadir@/p
26461/@docdir@/p
26462/@infodir@/p
26463/@localedir@/p
26464/@mandir@/p
Antoine Pitroub52ec782009-01-25 16:34:23 +000026465'
26466case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026467*datarootdir*) ac_datarootdir_seen=yes;;
26468*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Antoine Pitroub52ec782009-01-25 16:34:23 +000026469 { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
26470$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026471_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000026472cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026473 ac_datarootdir_hack='
26474 s&@datadir@&$datadir&g
26475 s&@docdir@&$docdir&g
26476 s&@infodir@&$infodir&g
26477 s&@localedir@&$localedir&g
26478 s&@mandir@&$mandir&g
26479 s&\\\${datarootdir}&$datarootdir&g' ;;
26480esac
26481_ACEOF
26482
26483# Neutralize VPATH when `$srcdir' = `.'.
26484# Shell code in configure.ac might set extrasub.
26485# FIXME: do we really want to maintain this feature?
Antoine Pitroub52ec782009-01-25 16:34:23 +000026486cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26487ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000026488$extrasub
26489_ACEOF
Antoine Pitroub52ec782009-01-25 16:34:23 +000026490cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026491:t
26492/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Antoine Pitroub52ec782009-01-25 16:34:23 +000026493s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026494s&@top_builddir@&$ac_top_builddir_sub&;t t
Antoine Pitroub52ec782009-01-25 16:34:23 +000026495s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026496s&@srcdir@&$ac_srcdir&;t t
26497s&@abs_srcdir@&$ac_abs_srcdir&;t t
26498s&@top_srcdir@&$ac_top_srcdir&;t t
26499s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
26500s&@builddir@&$ac_builddir&;t t
26501s&@abs_builddir@&$ac_abs_builddir&;t t
26502s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
26503s&@INSTALL@&$ac_INSTALL&;t t
26504$ac_datarootdir_hack
Antoine Pitroub52ec782009-01-25 16:34:23 +000026505"
26506eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
26507 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
26508$as_echo "$as_me: error: could not create $ac_file" >&2;}
26509 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026510
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026511test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
26512 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
26513 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Antoine Pitroub52ec782009-01-25 16:34:23 +000026514 { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026515which seems to be undefined. Please make sure it is defined." >&5
Antoine Pitroub52ec782009-01-25 16:34:23 +000026516$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026517which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000026518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026519 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000026520 case $ac_file in
Antoine Pitroub52ec782009-01-25 16:34:23 +000026521 -) cat "$tmp/out" && rm -f "$tmp/out";;
26522 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
26523 esac \
26524 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
26525$as_echo "$as_me: error: could not create $ac_file" >&2;}
26526 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026527 ;;
26528 :H)
26529 #
26530 # CONFIG_HEADER
26531 #
Martin v. Löwis11437992002-04-12 09:54:03 +000026532 if test x"$ac_file" != x-; then
Antoine Pitroub52ec782009-01-25 16:34:23 +000026533 {
26534 $as_echo "/* $configure_input */" \
26535 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
26536 } >"$tmp/config.h" \
26537 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
26538$as_echo "$as_me: error: could not create $ac_file" >&2;}
26539 { (exit 1); exit 1; }; }
26540 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
26541 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
26542$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026543 else
Antoine Pitroub52ec782009-01-25 16:34:23 +000026544 rm -f "$ac_file"
26545 mv "$tmp/config.h" "$ac_file" \
26546 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
26547$as_echo "$as_me: error: could not create $ac_file" >&2;}
26548 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026549 fi
26550 else
Antoine Pitroub52ec782009-01-25 16:34:23 +000026551 $as_echo "/* $configure_input */" \
26552 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
26553 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
26554$as_echo "$as_me: error: could not create -" >&2;}
26555 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026556 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026557 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000026558
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026559
26560 esac
26561
26562done # for ac_tag
26563
Guido van Rossum627b2d71993-12-24 10:39:16 +000026564
Martin v. Löwis11437992002-04-12 09:54:03 +000026565{ (exit 0); exit 0; }
26566_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026567chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000026568ac_clean_files=$ac_clean_files_save
26569
Antoine Pitroub52ec782009-01-25 16:34:23 +000026570test $ac_write_fail = 0 ||
26571 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
26572$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
26573 { (exit 1); exit 1; }; }
26574
Martin v. Löwis11437992002-04-12 09:54:03 +000026575
26576# configure is writing to config.log, and then calls config.status.
26577# config.status does its own redirection, appending to config.log.
26578# Unfortunately, on DOS this fails, as config.log is still kept open
26579# by configure, so config.status won't be able to write to it; its
26580# output is simply discarded. So we exec the FD to /dev/null,
26581# effectively closing config.log, so it can be properly (re)opened and
26582# appended to by config.status. When coming back to configure, we
26583# need to make the FD available again.
26584if test "$no_create" != yes; then
26585 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000026586 ac_config_status_args=
26587 test "$silent" = yes &&
26588 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000026589 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000026590 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026591 exec 5>>config.log
26592 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
26593 # would make configure fail if this is the last instruction.
26594 $ac_cs_success || { (exit 1); exit 1; }
26595fi
Antoine Pitroub52ec782009-01-25 16:34:23 +000026596if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
26597 { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
26598$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
26599fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000026600
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026601
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026602echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026603if test ! -f Modules/Setup
26604then
26605 cp $srcdir/Modules/Setup.dist Modules/Setup
26606fi
26607
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000026608echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000026609if test ! -f Modules/Setup.local
26610then
26611 echo "# Edit this file for local setup changes" >Modules/Setup.local
26612fi
26613
26614echo "creating Makefile"
26615$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
26616 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000026617 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000026618mv config.c Modules