blob: ba6df336db033505cd58475a0d9f2de7fd60c93e [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002# From configure.in Revision: 74045 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004# Generated by GNU Autoconf 2.63 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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=:
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 ||
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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=:
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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=:
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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" ||
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000517 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000557 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000558 else
559 case $1 in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000600PACKAGE_VERSION='3.2'
601PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000602PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000603
604ac_unique_file="Include/object.h"
605# Factoring default headers for most tests.
606ac_includes_default="\
607#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000608#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <sys/types.h>
610#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000611#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000612# include <sys/stat.h>
613#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000614#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000615# include <stdlib.h>
616# include <stddef.h>
617#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000619# include <stdlib.h>
620# endif
621#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000622#ifdef HAVE_STRING_H
623# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000624# include <memory.h>
625# endif
626# include <string.h>
627#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000628#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000629# include <strings.h>
630#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000631#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000632# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000633#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000634#ifdef HAVE_STDINT_H
635# include <stdint.h>
636#endif
637#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000638# include <unistd.h>
639#endif"
640
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000641ac_subst_vars='LTLIBOBJS
Martin v. Löwis113a0852009-05-29 17:25:39 +0000642SRCDIRS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000643THREADHEADERS
644LIBC
645LIBM
646HAVE_GETHOSTBYNAME
647HAVE_GETHOSTBYNAME_R
648HAVE_GETHOSTBYNAME_R_3_ARG
649HAVE_GETHOSTBYNAME_R_5_ARG
650HAVE_GETHOSTBYNAME_R_6_ARG
651LIBOBJS
652TRUE
653MACHDEP_OBJS
654DYNLOADFILE
655DLINCLDIR
656THREADOBJ
657LDLAST
658USE_THREAD_MODULE
659SIGNAL_OBJS
660USE_SIGNAL_MODULE
661SHLIBS
662CFLAGSFORSHARED
663LINKFORSHARED
664CCSHARED
665BLDSHARED
666LDSHARED
667SO
668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
671BASECFLAGS
672OPT
673LN
674INSTALL_DATA
675INSTALL_SCRIPT
676INSTALL_PROGRAM
677SVNVERSION
678ARFLAGS
679AR
680RANLIB
681GNULD
682LINKCC
683RUNSHARED
684INSTSONAME
685LDLIBRARYDIR
686BLDLIBRARY
687DLLLIBRARY
688LDLIBRARY
689LIBRARY
690BUILDEXEEXT
691EGREP
692GREP
693CPP
694MAINCC
695CXX
696OBJEXT
697EXEEXT
698ac_ct_CC
699CPPFLAGS
700LDFLAGS
701CFLAGS
702CC
703EXPORT_MACOSX_DEPLOYMENT_TARGET
704CONFIGURE_MACOSX_DEPLOYMENT_TARGET
705SGI_ABI
706MACHDEP
707FRAMEWORKUNIXTOOLSPREFIX
708FRAMEWORKALTINSTALLLAST
709FRAMEWORKALTINSTALLFIRST
710FRAMEWORKINSTALLLAST
711FRAMEWORKINSTALLFIRST
712PYTHONFRAMEWORKINSTALLDIR
713PYTHONFRAMEWORKPREFIX
714PYTHONFRAMEWORKDIR
715PYTHONFRAMEWORKIDENTIFIER
716PYTHONFRAMEWORK
717ARCH_RUN_32BIT
718UNIVERSALSDK
719CONFIG_ARGS
720SOVERSION
721VERSION
722target_alias
723host_alias
724build_alias
725LIBS
726ECHO_T
727ECHO_N
728ECHO_C
729DEFS
730mandir
731localedir
732libdir
733psdir
734pdfdir
735dvidir
736htmldir
737infodir
738docdir
739oldincludedir
740includedir
741localstatedir
742sharedstatedir
743sysconfdir
744datadir
745datarootdir
746libexecdir
747sbindir
748bindir
749program_transform_name
750prefix
751exec_prefix
752PACKAGE_BUGREPORT
753PACKAGE_STRING
754PACKAGE_VERSION
755PACKAGE_TARNAME
756PACKAGE_NAME
757PATH_SEPARATOR
758SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000759ac_subst_files=''
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000760ac_user_opts='
761enable_option_checking
762enable_universalsdk
763with_universal_archs
764with_framework_name
765enable_framework
766with_gcc
767with_cxx_main
768with_suffix
769enable_shared
770enable_profiling
771with_pydebug
772with_libs
773with_system_ffi
774with_dbmliborder
775with_signal_module
776with_dec_threads
777with_threads
778with_thread
779with_pth
780enable_ipv6
781with_doc_strings
782with_tsc
783with_pymalloc
784with_wctype_functions
785with_fpectl
786with_libm
787with_libc
788enable_big_digits
789with_wide_unicode
790with_computed_gotos
791'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000792 ac_precious_vars='build_alias
793host_alias
794target_alias
795CC
796CFLAGS
797LDFLAGS
798LIBS
799CPPFLAGS
800CPP'
801
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000804ac_init_help=
805ac_init_version=false
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000806ac_unrecognized_opts=
807ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808# The variables have the same names as the options, with
809# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000810cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813no_recursion=
814prefix=NONE
815program_prefix=NONE
816program_suffix=NONE
817program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000822x_includes=NONE
823x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000824
825# Installation directory options.
826# These are left unexpanded so users can "make install exec_prefix=/foo"
827# and all the variables that are supposed to be based on exec_prefix
828# by default will actually change.
829# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000831bindir='${exec_prefix}/bin'
832sbindir='${exec_prefix}/sbin'
833libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834datarootdir='${prefix}/share'
835datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836sysconfdir='${prefix}/etc'
837sharedstatedir='${prefix}/com'
838localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839includedir='${prefix}/include'
840oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
842infodir='${datarootdir}/info'
843htmldir='${docdir}'
844dvidir='${docdir}'
845pdfdir='${docdir}'
846psdir='${docdir}'
847libdir='${exec_prefix}/lib'
848localedir='${datarootdir}/locale'
849mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855 # If the previous option needs an argument, assign it.
856 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858 ac_prev=
859 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 case $ac_option in
863 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
864 *) ac_optarg=yes ;;
865 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867 # Accept the important Cygnus configure options, so we can diagnose typos.
868
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869 case $ac_dashdash$ac_option in
870 --)
871 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000873 -bindir | --bindir | --bindi | --bind | --bin | --bi)
874 ac_prev=bindir ;;
875 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877
878 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000881 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883 -cache-file | --cache-file | --cache-fil | --cache-fi \
884 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
885 ac_prev=cache_file ;;
886 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
887 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 cache_file=$ac_optarg ;;
889
890 --config-cache | -C)
891 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
899 | --dataroo | --dataro | --datar)
900 ac_prev=datarootdir ;;
901 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
902 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
903 datarootdir=$ac_optarg ;;
904
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 -disable-* | --disable-*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000906 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907 # Reject names that are not valid shell variable names.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000908 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
909 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 { (exit 1); exit 1; }; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000911 ac_useropt_orig=$ac_useropt
912 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
913 case $ac_user_opts in
914 *"
915"enable_$ac_useropt"
916"*) ;;
917 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
918 ac_unrecognized_sep=', ';;
919 esac
920 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921
922 -docdir | --docdir | --docdi | --doc | --do)
923 ac_prev=docdir ;;
924 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
925 docdir=$ac_optarg ;;
926
927 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
928 ac_prev=dvidir ;;
929 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
930 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
932 -enable-* | --enable-*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000933 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Reject names that are not valid shell variable names.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000935 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
936 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 { (exit 1); exit 1; }; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +0000938 ac_useropt_orig=$ac_useropt
939 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
940 case $ac_user_opts in
941 *"
942"enable_$ac_useropt"
943"*) ;;
944 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
945 ac_unrecognized_sep=', ';;
946 esac
947 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
950 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
951 | --exec | --exe | --ex)
952 ac_prev=exec_prefix ;;
953 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
954 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
955 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
958 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 # Obsolete; use --with-gas.
960 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 -help | --help | --hel | --he | -h)
963 ac_init_help=long ;;
964 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
965 ac_init_help=recursive ;;
966 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
967 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968
969 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
975 ac_prev=htmldir ;;
976 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
977 | --ht=*)
978 htmldir=$ac_optarg ;;
979
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980 -includedir | --includedir | --includedi | --included | --include \
981 | --includ | --inclu | --incl | --inc)
982 ac_prev=includedir ;;
983 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
984 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
987 -infodir | --infodir | --infodi | --infod | --info | --inf)
988 ac_prev=infodir ;;
989 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
992 -libdir | --libdir | --libdi | --libd)
993 ac_prev=libdir ;;
994 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996
997 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
998 | --libexe | --libex | --libe)
999 ac_prev=libexecdir ;;
1000 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1001 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001004 -localedir | --localedir | --localedi | --localed | --locale)
1005 ac_prev=localedir ;;
1006 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1007 localedir=$ac_optarg ;;
1008
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001010 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011 ac_prev=localstatedir ;;
1012 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001013 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015
1016 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1017 ac_prev=mandir ;;
1018 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022 # Obsolete; use --without-fp.
1023 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027 no_create=yes ;;
1028
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001029 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1030 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1031 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1034 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1035 | --oldin | --oldi | --old | --ol | --o)
1036 ac_prev=oldincludedir ;;
1037 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1038 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1039 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1043 ac_prev=prefix ;;
1044 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
1047 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1048 | --program-pre | --program-pr | --program-p)
1049 ac_prev=program_prefix ;;
1050 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1051 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
1054 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1055 | --program-suf | --program-su | --program-s)
1056 ac_prev=program_suffix ;;
1057 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1058 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -program-transform-name | --program-transform-name \
1062 | --program-transform-nam | --program-transform-na \
1063 | --program-transform-n | --program-transform- \
1064 | --program-transform | --program-transfor \
1065 | --program-transfo | --program-transf \
1066 | --program-trans | --program-tran \
1067 | --progr-tra | --program-tr | --program-t)
1068 ac_prev=program_transform_name ;;
1069 -program-transform-name=* | --program-transform-name=* \
1070 | --program-transform-nam=* | --program-transform-na=* \
1071 | --program-transform-n=* | --program-transform-=* \
1072 | --program-transform=* | --program-transfor=* \
1073 | --program-transfo=* | --program-transf=* \
1074 | --program-trans=* | --program-tran=* \
1075 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001078 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1079 ac_prev=pdfdir ;;
1080 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1081 pdfdir=$ac_optarg ;;
1082
1083 -psdir | --psdir | --psdi | --psd | --ps)
1084 ac_prev=psdir ;;
1085 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1086 psdir=$ac_optarg ;;
1087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1089 | -silent | --silent | --silen | --sile | --sil)
1090 silent=yes ;;
1091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1093 ac_prev=sbindir ;;
1094 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1095 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
1098 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1099 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1100 | --sharedst | --shareds | --shared | --share | --shar \
1101 | --sha | --sh)
1102 ac_prev=sharedstatedir ;;
1103 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1104 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1105 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1106 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001109 -site | --site | --sit)
1110 ac_prev=site ;;
1111 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001113
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1115 ac_prev=srcdir ;;
1116 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1120 | --syscon | --sysco | --sysc | --sys | --sy)
1121 ac_prev=sysconfdir ;;
1122 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1123 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
1131 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1132 verbose=yes ;;
1133
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 -version | --version | --versio | --versi | --vers | -V)
1135 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
1137 -with-* | --with-*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001138 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139 # Reject names that are not valid shell variable names.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001140 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1141 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 { (exit 1); exit 1; }; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001143 ac_useropt_orig=$ac_useropt
1144 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145 case $ac_user_opts in
1146 *"
1147"with_$ac_useropt"
1148"*) ;;
1149 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1150 ac_unrecognized_sep=', ';;
1151 esac
1152 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
1154 -without-* | --without-*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001155 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156 # Reject names that are not valid shell variable names.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001157 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1158 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 { (exit 1); exit 1; }; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001160 ac_useropt_orig=$ac_useropt
1161 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162 case $ac_user_opts in
1163 *"
1164"with_$ac_useropt"
1165"*) ;;
1166 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1167 ac_unrecognized_sep=', ';;
1168 esac
1169 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 --x)
1172 # Obsolete; use --with-x.
1173 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
1175 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1176 | --x-incl | --x-inc | --x-in | --x-i)
1177 ac_prev=x_includes ;;
1178 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1179 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
1182 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1183 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1184 ac_prev=x_libraries ;;
1185 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1186 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001189 -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001190Try \`$0 --help' for more information." >&2
1191 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 ;;
1193
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 *=*)
1195 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1196 # Reject names that are not valid shell variable names.
1197 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001198 { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001200 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 export $ac_envvar ;;
1202
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001203 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 # FIXME: should be removed in autoconf 3.0.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001205 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001207 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 ;;
1210
1211 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212done
1213
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001216 { $as_echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218fi
1219
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001220if test -n "$ac_unrecognized_opts"; then
1221 case $enable_option_checking in
1222 no) ;;
1223 fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1224 { (exit 1); exit 1; }; } ;;
1225 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1226 esac
1227fi
1228
1229# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001230for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1231 datadir sysconfdir sharedstatedir localstatedir includedir \
1232 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1233 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235 eval ac_val=\$$ac_var
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001236 # Remove trailing slashes.
1237 case $ac_val in
1238 */ )
1239 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1240 eval $ac_var=\$ac_val;;
1241 esac
1242 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244 [\\/$]* | ?:[\\/]* ) continue;;
1245 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001247 { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001249done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251# There might be people who depend on the old broken behavior: `$host'
1252# used to hold the argument of --host etc.
1253# FIXME: To remove some day.
1254build=$build_alias
1255host=$host_alias
1256target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258# FIXME: To remove some day.
1259if test "x$host_alias" != x; then
1260 if test "x$build_alias" = x; then
1261 cross_compiling=maybe
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001262 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 If a cross compiler is detected then cross compile mode will be used." >&2
1264 elif test "x$build_alias" != "x$host_alias"; then
1265 cross_compiling=yes
1266 fi
1267fi
1268
1269ac_tool_prefix=
1270test -n "$host_alias" && ac_tool_prefix=$host_alias-
1271
1272test "$silent" = yes && exec 6>/dev/null
1273
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275ac_pwd=`pwd` && test -n "$ac_pwd" &&
1276ac_ls_di=`ls -di .` &&
1277ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001278 { $as_echo "$as_me: error: working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 { (exit 1); exit 1; }; }
1280test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001281 { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282 { (exit 1); exit 1; }; }
1283
1284
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285# Find the source files, if location was not specified.
1286if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 # Try the directory containing this script, then the parent directory.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001289 ac_confdir=`$as_dirname -- "$as_myself" ||
1290$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1291 X"$as_myself" : 'X\(//\)[^/]' \| \
1292 X"$as_myself" : 'X\(//\)$' \| \
1293 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1294$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\/\)[^/].*/{
1300 s//\1/
1301 q
1302 }
1303 /^X\(\/\/\)$/{
1304 s//\1/
1305 q
1306 }
1307 /^X\(\/\).*/{
1308 s//\1/
1309 q
1310 }
1311 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314 srcdir=..
1315 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316else
1317 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319if test ! -r "$srcdir/$ac_unique_file"; then
1320 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001321 { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001322 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1325ac_abs_confdir=`(
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001326 cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001327 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328 pwd)`
1329# When building in place, set srcdir=.
1330if test "$ac_abs_confdir" = "$ac_pwd"; then
1331 srcdir=.
1332fi
1333# Remove unnecessary trailing slashes from srcdir.
1334# Double slashes in file names in object file debugging info
1335# mess up M-x gdb in Emacs.
1336case $srcdir in
1337*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1338esac
1339for ac_var in $ac_precious_vars; do
1340 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1341 eval ac_env_${ac_var}_value=\$${ac_var}
1342 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1343 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1344done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001345
Martin v. Löwis11437992002-04-12 09:54:03 +00001346#
1347# Report the --help message.
1348#
1349if test "$ac_init_help" = "long"; then
1350 # Omit some internal or obsolete options to make the list less imposing.
1351 # This message is too long to be a string in the A/UX 3.1 sh.
1352 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001353\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001354
1355Usage: $0 [OPTION]... [VAR=VALUE]...
1356
1357To assign environment variables (e.g., CC, CFLAGS...), specify them as
1358VAR=VALUE. See below for descriptions of some of the useful variables.
1359
1360Defaults for the options are specified in brackets.
1361
1362Configuration:
1363 -h, --help display this help and exit
1364 --help=short display options specific to this package
1365 --help=recursive display the short help of all the included packages
1366 -V, --version display version information and exit
1367 -q, --quiet, --silent do not print \`checking...' messages
1368 --cache-file=FILE cache test results in FILE [disabled]
1369 -C, --config-cache alias for \`--cache-file=config.cache'
1370 -n, --no-create do not create output files
1371 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1372
Martin v. Löwis11437992002-04-12 09:54:03 +00001373Installation directories:
1374 --prefix=PREFIX install architecture-independent files in PREFIX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001375 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001377 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001378
1379By default, \`make install' will install all the files in
1380\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1381an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1382for instance \`--prefix=\$HOME'.
1383
1384For better control, use the options below.
1385
1386Fine tuning of the installation directories:
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001387 --bindir=DIR user executables [EPREFIX/bin]
1388 --sbindir=DIR system admin executables [EPREFIX/sbin]
1389 --libexecdir=DIR program executables [EPREFIX/libexec]
1390 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1391 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1392 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1393 --libdir=DIR object code libraries [EPREFIX/lib]
1394 --includedir=DIR C header files [PREFIX/include]
1395 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1396 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1397 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1398 --infodir=DIR info documentation [DATAROOTDIR/info]
1399 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1400 --mandir=DIR man documentation [DATAROOTDIR/man]
1401 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1402 --htmldir=DIR html documentation [DOCDIR]
1403 --dvidir=DIR dvi documentation [DOCDIR]
1404 --pdfdir=DIR pdf documentation [DOCDIR]
1405 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001406_ACEOF
1407
1408 cat <<\_ACEOF
1409_ACEOF
1410fi
1411
1412if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001413 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001414 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001415 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 cat <<\_ACEOF
1417
1418Optional Features:
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001419 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1421 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001422 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001423 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --enable-framework[=INSTALLDIR]
1425 Build (MacOSX|Darwin) framework
1426 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001427 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --enable-ipv6 Enable ipv6 (with ipv4) support
1429 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001430 --enable-big-digits[=BITS]
1431 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432
1433Optional Packages:
1434 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1435 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001436 --with-universal-archs=ARCH
1437 select architectures for universal build ("32-bit",
1438 "64-bit" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001439 --with-framework-name=FRAMEWORK
1440 specify an alternate name of the framework built
1441 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001443 --with-cxx-main=<compiler>
1444 compile main() and link python executable with C++
1445 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --with-suffix=.exe set executable suffix
1447 --with-pydebug build with Py_DEBUG defined
1448 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001449 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001450 --with-dbmliborder=db1:db2:...
1451 order to check db backends for dbm. Valid value is a
1452 colon separated string with the backend names
1453 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --with-signal-module disable/enable signal module
1455 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1456 --with(out)-threads[=DIRECTORY]
1457 disable/enable thread support
1458 --with(out)-thread[=DIRECTORY]
1459 deprecated; use --with(out)-threads
1460 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001462 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --with(out)-pymalloc disable/enable specialized mallocs
1464 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001465 --with-fpectl enable SIGFPE catching
1466 --with-libm=STRING math library
1467 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001468 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001469 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1470 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001471
1472Some influential environment variables:
1473 CC C compiler command
1474 CFLAGS C compiler flags
1475 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1476 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 LIBS libraries to pass to the linker, e.g. -l<library>
1478 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1479 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 CPP C preprocessor
1481
1482Use these variables to override the choices made by `configure' or to help
1483it to find libraries and programs with nonstandard names/locations.
1484
Georg Brandle2e15612009-05-20 18:25:10 +00001485Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001488fi
1489
1490if test "$ac_init_help" = "recursive"; then
1491 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001493 test -d "$ac_dir" ||
1494 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1495 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 ac_builddir=.
1497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498case "$ac_dir" in
1499.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1500*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001501 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001503 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 case $ac_top_builddir_sub in
1505 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1506 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1507 esac ;;
1508esac
1509ac_abs_top_builddir=$ac_pwd
1510ac_abs_builddir=$ac_pwd$ac_dir_suffix
1511# for backward compatibility:
1512ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001513
1514case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 ac_top_srcdir=$ac_top_builddir_sub
1518 ac_abs_top_srcdir=$ac_pwd ;;
1519 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 ac_top_srcdir=$srcdir
1522 ac_abs_top_srcdir=$srcdir ;;
1523 *) # Relative name.
1524 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1525 ac_top_srcdir=$ac_top_build_prefix$srcdir
1526 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001527esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 cd "$ac_dir" || { ac_status=$?; continue; }
1531 # Check for guested configure.
1532 if test -f "$ac_srcdir/configure.gnu"; then
1533 echo &&
1534 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1535 elif test -f "$ac_srcdir/configure"; then
1536 echo &&
1537 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001539 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540 fi || ac_status=$?
1541 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001542 done
1543fi
1544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001546if $ac_init_version; then
1547 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001548python configure 3.2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001549generated by GNU Autoconf 2.63
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015522002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001553This configure script is free software; the Free Software Foundation
1554gives unlimited permission to copy, distribute and modify it.
1555_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001559This file contains any messages produced by compilers while
1560running configure, to aid debugging if configure makes a mistake.
1561
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001562It was created by python $as_me 3.2, which was
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001563generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565 $ $0 $@
1566
1567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001569{
1570cat <<_ASUNAME
1571## --------- ##
1572## Platform. ##
1573## --------- ##
1574
1575hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1576uname -m = `(uname -m) 2>/dev/null || echo unknown`
1577uname -r = `(uname -r) 2>/dev/null || echo unknown`
1578uname -s = `(uname -s) 2>/dev/null || echo unknown`
1579uname -v = `(uname -v) 2>/dev/null || echo unknown`
1580
1581/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1582/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1583
1584/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1585/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1586/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001588/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1589/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1590/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1591
1592_ASUNAME
1593
1594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1595for as_dir in $PATH
1596do
1597 IFS=$as_save_IFS
1598 test -z "$as_dir" && as_dir=.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001599 $as_echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001600done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001602
1603} >&5
1604
1605cat >&5 <<_ACEOF
1606
1607
1608## ----------- ##
1609## Core tests. ##
1610## ----------- ##
1611
1612_ACEOF
1613
1614
1615# Keep a trace of the command line.
1616# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001617# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001618# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001619# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001620ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001621ac_configure_args0=
1622ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001623ac_must_keep_next=false
1624for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001625do
Skip Montanaro6dead952003-09-25 14:50:04 +00001626 for ac_arg
1627 do
1628 case $ac_arg in
1629 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1630 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1631 | -silent | --silent | --silen | --sile | --sil)
1632 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 *\'*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001634 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001635 esac
1636 case $ac_pass in
1637 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1638 2)
1639 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1640 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001641 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001642 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001643 case $ac_arg in
1644 *=* | --config-cache | -C | -disable-* | --disable-* \
1645 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1646 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1647 | -with-* | --with-* | -without-* | --without-* | --x)
1648 case "$ac_configure_args0 " in
1649 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1650 esac
1651 ;;
1652 -* ) ac_must_keep_next=true ;;
1653 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001654 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001656 ;;
1657 esac
1658 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001659done
Skip Montanaro6dead952003-09-25 14:50:04 +00001660$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1661$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001662
1663# When interrupted or exit'd, cleanup temporary files, and complete
1664# config.log. We remove comments because anyway the quotes in there
1665# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666# WARNING: Use '\'' to represent an apostrophe within the trap.
1667# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001668trap 'exit_status=$?
1669 # Save into config.log some information that might help in debugging.
1670 {
1671 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001672
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 cat <<\_ASBOX
1674## ---------------- ##
1675## Cache variables. ##
1676## ---------------- ##
1677_ASBOX
1678 echo
1679 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001680(
1681 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1682 eval ac_val=\$$ac_var
1683 case $ac_val in #(
1684 *${as_nl}*)
1685 case $ac_var in #(
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001686 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1687$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001688 esac
1689 case $ac_var in #(
1690 _ | IFS | as_nl) ;; #(
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001691 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692 *) $as_unset $ac_var ;;
1693 esac ;;
1694 esac
1695 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001696 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1698 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001700 "s/'\''/'\''\\\\'\'''\''/g;
1701 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1702 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001703 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001704 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001705 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001706 esac |
1707 sort
1708)
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001710
1711 cat <<\_ASBOX
1712## ----------------- ##
1713## Output variables. ##
1714## ----------------- ##
1715_ASBOX
1716 echo
1717 for ac_var in $ac_subst_vars
1718 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001719 eval ac_val=\$$ac_var
1720 case $ac_val in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001721 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001722 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001723 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001724 done | sort
1725 echo
1726
1727 if test -n "$ac_subst_files"; then
1728 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001729## ------------------- ##
1730## File substitutions. ##
1731## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001732_ASBOX
1733 echo
1734 for ac_var in $ac_subst_files
1735 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736 eval ac_val=\$$ac_var
1737 case $ac_val in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001738 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001740 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001741 done | sort
1742 echo
1743 fi
1744
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 if test -s confdefs.h; then
1746 cat <<\_ASBOX
1747## ----------- ##
1748## confdefs.h. ##
1749## ----------- ##
1750_ASBOX
1751 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001752 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001753 echo
1754 fi
1755 test "$ac_signal" != 0 &&
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001756 $as_echo "$as_me: caught signal $ac_signal"
1757 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001759 rm -f core *.core core.conftest.* &&
1760 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001762' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001763for ac_signal in 1 2 13 15; do
1764 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1765done
1766ac_signal=0
1767
1768# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001769rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001770
1771# Predefined preprocessor variables.
1772
1773cat >>confdefs.h <<_ACEOF
1774#define PACKAGE_NAME "$PACKAGE_NAME"
1775_ACEOF
1776
1777
1778cat >>confdefs.h <<_ACEOF
1779#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1780_ACEOF
1781
1782
1783cat >>confdefs.h <<_ACEOF
1784#define PACKAGE_VERSION "$PACKAGE_VERSION"
1785_ACEOF
1786
1787
1788cat >>confdefs.h <<_ACEOF
1789#define PACKAGE_STRING "$PACKAGE_STRING"
1790_ACEOF
1791
1792
1793cat >>confdefs.h <<_ACEOF
1794#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1795_ACEOF
1796
1797
1798# Let the site file select an alternate cache file if it wants to.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001799# Prefer an explicitly selected file to automatically selected ones.
1800ac_site_file1=NONE
1801ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001802if test -n "$CONFIG_SITE"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001803 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001804elif test "x$prefix" != xNONE; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001805 ac_site_file1=$prefix/share/config.site
1806 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001807else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001808 ac_site_file1=$ac_default_prefix/share/config.site
1809 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001810fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001811for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001812do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001813 test "x$ac_site_file" = xNONE && continue
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001814 if test -r "$ac_site_file"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001815 { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1816$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001818 . "$ac_site_file"
1819 fi
1820done
1821
1822if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 # Some versions of bash will fail to source /dev/null (special
1824 # files actually), so we avoid doing that.
1825 if test -f "$cache_file"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001826 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1827$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001828 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001829 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1830 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001831 esac
1832 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001833else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001834 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1835$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001836 >$cache_file
1837fi
1838
1839# Check that the precious variables saved in the cache have kept the same
1840# value.
1841ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001842for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001843 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1844 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001845 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1846 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001847 case $ac_old_set,$ac_new_set in
1848 set,)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001849 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1850$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001851 ac_cache_corrupted=: ;;
1852 ,set)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001853 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1854$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001855 ac_cache_corrupted=: ;;
1856 ,);;
1857 *)
1858 if test "x$ac_old_val" != "x$ac_new_val"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001859 # differences in whitespace do not lead to failure.
1860 ac_old_val_w=`echo x $ac_old_val`
1861 ac_new_val_w=`echo x $ac_new_val`
1862 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1863 { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1864$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1865 ac_cache_corrupted=:
1866 else
1867 { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1868$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1869 eval $ac_var=\$ac_old_val
1870 fi
1871 { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1872$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1873 { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1874$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001875 fi;;
1876 esac
1877 # Pass precious variables to config.status.
1878 if test "$ac_new_set" = set; then
1879 case $ac_new_val in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001880 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001881 *) ac_arg=$ac_var=$ac_new_val ;;
1882 esac
1883 case " $ac_configure_args " in
1884 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1885 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1886 esac
1887 fi
1888done
1889if $ac_cache_corrupted; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00001890 { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1892 { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1893$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1894 { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1895$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001897fi
1898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
Guido van Rossum7f43da71994-08-01 12:15:30 +00001923ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001925ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1926ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1927ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928
Guido van Rossum627b2d71993-12-24 10:39:16 +00001929
Michael W. Hudson54241132001-12-07 15:38:26 +00001930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001931ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001932
1933
Martin v. Löwis11437992002-04-12 09:54:03 +00001934
Benjamin Petersond23f8222009-04-05 19:13:16 +00001935if test "$prefix" != "/"; then
1936 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1937fi
1938
1939
Martin v. Löwis11437992002-04-12 09:54:03 +00001940
1941
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001942
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001943
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001944# We don't use PACKAGE_ variables, and they cause conflicts
1945# with other autoconf-based packages that include Python.h
1946grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1947rm confdefs.h
1948mv confdefs.h.new confdefs.h
1949
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001950
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001951VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001952
Martin v. Löwis1142de32002-03-29 16:28:31 +00001953
1954SOVERSION=1.0
1955
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001956# The later defininition of _XOPEN_SOURCE disables certain features
1957# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1958
1959cat >>confdefs.h <<\_ACEOF
1960#define _GNU_SOURCE 1
1961_ACEOF
1962
1963
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001964# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1965# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1966# them.
1967
1968cat >>confdefs.h <<\_ACEOF
1969#define _NETBSD_SOURCE 1
1970_ACEOF
1971
1972
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001973# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1974# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1975# them.
1976
1977cat >>confdefs.h <<\_ACEOF
1978#define __BSD_VISIBLE 1
1979_ACEOF
1980
1981
Martin v. Löwisd6320502004-08-12 13:45:08 +00001982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1983# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1984
1985cat >>confdefs.h <<\_ACEOF
1986#define _BSD_TYPES 1
1987_ACEOF
1988
1989
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1991# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1992# them.
1993
1994cat >>confdefs.h <<\_ACEOF
1995#define _DARWIN_C_SOURCE 1
1996_ACEOF
1997
1998
1999
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002000define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002001
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002002# Arguments passed to configure.
2003
2004CONFIG_ARGS="$ac_configure_args"
2005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002006# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002007if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002008 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002009 case $enableval in
2010 yes)
2011 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2012 ;;
2013 esac
2014 case $enableval in
2015 no)
2016 UNIVERSALSDK=
2017 enable_universalsdk=
2018 ;;
2019 *)
2020 UNIVERSALSDK=$enableval
2021 ;;
2022 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002023
Thomas Wouters477c8d52006-05-27 19:21:47 +00002024else
2025
2026 UNIVERSALSDK=
2027 enable_universalsdk=
2028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002029fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002030
2031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002032
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002033ARCH_RUN_32BIT=
2034
2035
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002036UNIVERSAL_ARCHS="32-bit"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002037{ $as_echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
2038$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002039
2040# Check whether --with-universal-archs was given.
2041if test "${with_universal_archs+set}" = set; then
2042 withval=$with_universal_archs;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002043 { $as_echo "$as_me:$LINENO: result: $withval" >&5
2044$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002045 UNIVERSAL_ARCHS="$withval"
2046
2047else
2048
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002049 { $as_echo "$as_me:$LINENO: result: 32-bit" >&5
2050$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002051
2052fi
2053
2054
2055
2056
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002057
2058# Check whether --with-framework-name was given.
2059if test "${with_framework_name+set}" = set; then
2060 withval=$with_framework_name;
2061 PYTHONFRAMEWORK=${withval}
2062 PYTHONFRAMEWORKDIR=${withval}.framework
2063 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2064
2065else
2066
2067 PYTHONFRAMEWORK=Python
2068 PYTHONFRAMEWORKDIR=Python.framework
2069 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2070
2071fi
2072
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002073# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002074if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002075 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002076 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002077 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002078 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002079 esac
2080 case $enableval in
2081 no)
2082 PYTHONFRAMEWORK=
2083 PYTHONFRAMEWORKDIR=no-framework
2084 PYTHONFRAMEWORKPREFIX=
2085 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002086 FRAMEWORKINSTALLFIRST=
2087 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002088 FRAMEWORKALTINSTALLFIRST=
2089 FRAMEWORKALTINSTALLLAST=
2090 if test "x${prefix}" = "xNONE"; then
2091 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2092 else
2093 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2094 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002095 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002096 ;;
2097 *)
2098 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002099 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002100 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002101 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002102 if test "$UNIVERSAL_ARCHS" = "all"
2103 then
2104 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00002105 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002106 else
Ronald Oussorene3918352009-03-30 18:00:28 +00002107 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002108 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2109 fi
2110
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002111 if test "x${prefix}" = "xNONE" ; then
2112 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2113 else
2114 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2115 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002116 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002117
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002118 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002119 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002120 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002121
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002122 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002123
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002124 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2125
2126 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2127
Jack Jansene578a632001-08-15 01:27:14 +00002128 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002129
Guido van Rossum563e7081996-09-10 18:20:48 +00002130else
Martin v. Löwis11437992002-04-12 09:54:03 +00002131
Jack Jansene578a632001-08-15 01:27:14 +00002132 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002133 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002134 PYTHONFRAMEWORKPREFIX=
2135 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002136 FRAMEWORKINSTALLFIRST=
2137 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002138 FRAMEWORKALTINSTALLFIRST=
2139 FRAMEWORKALTINSTALLLAST=
2140 if test "x${prefix}" = "xNONE" ; then
2141 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2142 else
2143 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2144 fi
Jack Jansene578a632001-08-15 01:27:14 +00002145 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002146
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002147 if test "$UNIVERSAL_ARCHS" = "all"
2148 then
2149 FRAMEWORKINSTALLLAST=update4wayuniversal
2150 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2151 fi
2152
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002153fi
2154
Thomas Wouters477c8d52006-05-27 19:21:47 +00002155
2156
Michael W. Hudson54241132001-12-07 15:38:26 +00002157
2158
2159
2160
Jack Jansene578a632001-08-15 01:27:14 +00002161
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002162
2163
2164
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002165
Jack Jansene578a632001-08-15 01:27:14 +00002166##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002167## AC_HELP_STRING(--with-dyld,
2168## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002169##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002170# Set name for machine-dependent library files
2171
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002172{ $as_echo "$as_me:$LINENO: checking MACHDEP" >&5
2173$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002174if test -z "$MACHDEP"
2175then
Guido van Rossum563e7081996-09-10 18:20:48 +00002176 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002177 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2178 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002179 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002180 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002181 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002182 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002183 ac_md_system=`echo $ac_sys_system |
2184 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2185 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002186 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002187 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002188
Guido van Rossum07397971997-04-29 21:49:50 +00002189 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002190 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002191 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002192 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002193 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002194 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002195 esac
2196fi
Guido van Rossum91922671997-10-09 20:24:13 +00002197
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002198# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2199# disable features if it is defined, without any means to access these
2200# features as extensions. For these systems, we skip the definition of
2201# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2202# some feature, make sure there is no alternative way to access this
2203# feature. Also, when using wildcards, make sure you have verified the
2204# need for not defining _XOPEN_SOURCE on all systems matching the
2205# wildcard, and that the wildcard does not include future systems
2206# (which may remove their limitations).
2207case $ac_sys_system/$ac_sys_release in
2208 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2209 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002210 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002211 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002212 define_xopen_source=no
2213 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2214 # also defined. This can be overridden by defining _BSD_SOURCE
2215 # As this has a different meaning on Linux, only define it on OpenBSD
2216
2217cat >>confdefs.h <<\_ACEOF
2218#define _BSD_SOURCE 1
2219_ACEOF
2220
2221 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002222 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2223 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2224 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002225 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002226 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002227 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2228 # of union __?sigval. Reported by Stuart Bishop.
2229 SunOS/5.6)
2230 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002231 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2232 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002233 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002234 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002235 define_xopen_source=no;;
2236 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002237 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002238 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002239 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002240 # On FreeBSD 4, the math functions C89 does not cover are never defined
2241 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2242 FreeBSD/4.*)
2243 define_xopen_source=no;;
2244 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2245 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2246 # identifies itself as Darwin/7.*
2247 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2248 # disables platform specific features beyond repair.
2249 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2250 # has no effect, don't bother defining them
2251 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002252 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002253 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2254 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2255 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002256 AIX/4)
2257 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002258 AIX/5)
2259 if test `uname -r` -eq 1; then
2260 define_xopen_source=no
2261 fi
2262 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002263 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2264 # defining NI_NUMERICHOST.
2265 QNX/6.3.2)
2266 define_xopen_source=no
2267 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002268
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002269esac
2270
2271if test $define_xopen_source = yes
2272then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002273 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2274 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002275 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2276 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002277 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002278 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002279
2280cat >>confdefs.h <<\_ACEOF
2281#define _XOPEN_SOURCE 500
2282_ACEOF
2283
2284 ;;
2285 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002286
2287cat >>confdefs.h <<\_ACEOF
2288#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002289_ACEOF
2290
Skip Montanarof0d5f792004-08-15 14:08:23 +00002291 ;;
2292 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002293
2294 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2295 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2296 # several APIs are not declared. Since this is also needed in some
2297 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002298 # except for Solaris 10, where it must not be defined,
2299 # as it implies XPG4.2
2300 case $ac_sys_system/$ac_sys_release in
2301 SunOS/5.10)
2302 ;;
2303 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002304
2305cat >>confdefs.h <<\_ACEOF
2306#define _XOPEN_SOURCE_EXTENDED 1
2307_ACEOF
2308
Martin v. Löwis7dece662005-11-26 11:38:24 +00002309 ;;
2310 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002311
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002312
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002313cat >>confdefs.h <<\_ACEOF
2314#define _POSIX_C_SOURCE 200112L
2315_ACEOF
2316
2317
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002318fi
2319
Guido van Rossum91922671997-10-09 20:24:13 +00002320#
2321# SGI compilers allow the specification of the both the ABI and the
2322# ISA on the command line. Depending on the values of these switches,
2323# different and often incompatable code will be generated.
2324#
2325# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2326# thus supply support for various ABI/ISA combinations. The MACHDEP
2327# variable is also adjusted.
2328#
2329
2330if test ! -z "$SGI_ABI"
2331then
2332 CC="cc $SGI_ABI"
2333 LDFLAGS="$SGI_ABI $LDFLAGS"
2334 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2335fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002336{ $as_echo "$as_me:$LINENO: result: $MACHDEP" >&5
2337$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002338
Jack Jansen6b08a402004-06-03 12:41:45 +00002339# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2340# it may influence the way we can build extensions, so distutils
2341# needs to check it
2342
Thomas Wouters477c8d52006-05-27 19:21:47 +00002343
Jack Jansen6b08a402004-06-03 12:41:45 +00002344CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002345EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002346
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002347{ $as_echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2348$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002349ac_sys_machine=`uname -m`
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002350{ $as_echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2351$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002352
Guido van Rossum627b2d71993-12-24 10:39:16 +00002353# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002354
2355# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2356# for debug/optimization stuff. BASECFLAGS is for flags that are required
2357# just to get things to compile and link. Users are free to override OPT
2358# when running configure or make. The build should not break if they do.
2359# BASECFLAGS should generally not be messed with, however.
2360
2361# XXX shouldn't some/most/all of this code be merged with the stuff later
2362# on that fiddles with OPT and BASECFLAGS?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002363{ $as_echo "$as_me:$LINENO: checking for --without-gcc" >&5
2364$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002365
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002366# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002367if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002368 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002369 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002370 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002371 without_gcc=yes;;
2372 yes) CC=gcc
2373 without_gcc=no;;
2374 *) CC=$withval
2375 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002376 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002377else
Martin v. Löwis11437992002-04-12 09:54:03 +00002378
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002379 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002380 AIX*) CC=cc_r
2381 without_gcc=;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002382 Monterey*)
2383 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002384 without_gcc=;;
2385 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002386 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002387fi
2388
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002389{ $as_echo "$as_me:$LINENO: result: $without_gcc" >&5
2390$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002391
Guido van Rossum8b131c51995-03-09 14:10:13 +00002392# If the user switches compilers, we can't believe the cache
2393if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2394then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002395 { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002396(it is also a good idea to do 'make clean' before compiling)" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002397$as_echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002398(it is also a good idea to do 'make clean' before compiling)" >&2;}
2399 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002400fi
2401
Martin v. Löwis11437992002-04-12 09:54:03 +00002402ac_ext=c
2403ac_cpp='$CPP $CPPFLAGS'
2404ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2405ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2406ac_compiler_gnu=$ac_cv_c_compiler_gnu
2407if test -n "$ac_tool_prefix"; then
2408 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2409set dummy ${ac_tool_prefix}gcc; ac_word=$2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002410{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2411$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002412if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002413 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002414else
2415 if test -n "$CC"; then
2416 ac_cv_prog_CC="$CC" # Let the user override the test.
2417else
Martin v. Löwis11437992002-04-12 09:54:03 +00002418as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2419for as_dir in $PATH
2420do
2421 IFS=$as_save_IFS
2422 test -z "$as_dir" && as_dir=.
2423 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002425 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002426 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002427 break 2
2428 fi
2429done
2430done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002431IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002432
Jack Jansendd19cf82001-12-06 22:36:17 +00002433fi
2434fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002435CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002436if test -n "$CC"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002437 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2438$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002439else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002440 { $as_echo "$as_me:$LINENO: result: no" >&5
2441$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002442fi
2443
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002444
Martin v. Löwis11437992002-04-12 09:54:03 +00002445fi
2446if test -z "$ac_cv_prog_CC"; then
2447 ac_ct_CC=$CC
2448 # Extract the first word of "gcc", so it can be a program name with args.
2449set dummy gcc; ac_word=$2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002450{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2451$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002452if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002453 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002454else
2455 if test -n "$ac_ct_CC"; then
2456 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2457else
2458as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2459for as_dir in $PATH
2460do
2461 IFS=$as_save_IFS
2462 test -z "$as_dir" && as_dir=.
2463 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002464 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002465 ac_cv_prog_ac_ct_CC="gcc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002466 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002467 break 2
2468 fi
2469done
2470done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002471IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002472
2473fi
2474fi
2475ac_ct_CC=$ac_cv_prog_ac_ct_CC
2476if test -n "$ac_ct_CC"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002477 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2478$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002479else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002480 { $as_echo "$as_me:$LINENO: result: no" >&5
2481$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002482fi
2483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002484 if test "x$ac_ct_CC" = x; then
2485 CC=""
2486 else
2487 case $cross_compiling:$ac_tool_warned in
2488yes:)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002489{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2490$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002491ac_tool_warned=yes ;;
2492esac
2493 CC=$ac_ct_CC
2494 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002495else
2496 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002497fi
2498
Jack Jansendd19cf82001-12-06 22:36:17 +00002499if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002500 if test -n "$ac_tool_prefix"; then
2501 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
Martin v. Löwis11437992002-04-12 09:54:03 +00002502set dummy ${ac_tool_prefix}cc; ac_word=$2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002503{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2504$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002505if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002506 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002507else
2508 if test -n "$CC"; then
2509 ac_cv_prog_CC="$CC" # Let the user override the test.
2510else
Martin v. Löwis11437992002-04-12 09:54:03 +00002511as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2512for as_dir in $PATH
2513do
2514 IFS=$as_save_IFS
2515 test -z "$as_dir" && as_dir=.
2516 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002517 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002518 ac_cv_prog_CC="${ac_tool_prefix}cc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002519 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002520 break 2
2521 fi
2522done
2523done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002524IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002525
2526fi
2527fi
2528CC=$ac_cv_prog_CC
2529if test -n "$CC"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002530 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2531$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002532else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002533 { $as_echo "$as_me:$LINENO: result: no" >&5
2534$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002535fi
2536
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537
Martin v. Löwis11437992002-04-12 09:54:03 +00002538 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002539fi
2540if test -z "$CC"; then
2541 # Extract the first word of "cc", so it can be a program name with args.
2542set dummy cc; ac_word=$2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002543{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2544$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002545if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002546 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002547else
2548 if test -n "$CC"; then
2549 ac_cv_prog_CC="$CC" # Let the user override the test.
2550else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002551 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2553for as_dir in $PATH
2554do
2555 IFS=$as_save_IFS
2556 test -z "$as_dir" && as_dir=.
2557 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002558 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002559 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2560 ac_prog_rejected=yes
2561 continue
2562 fi
2563 ac_cv_prog_CC="cc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002564 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002565 break 2
2566 fi
2567done
2568done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002569IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002570
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002571if test $ac_prog_rejected = yes; then
2572 # We found a bogon in the path, so make sure we never use it.
2573 set dummy $ac_cv_prog_CC
2574 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002575 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002576 # We chose a different compiler from the bogus one.
2577 # However, it has the same basename, so the bogon will be chosen
2578 # first if we set CC to just the basename; use the full file name.
2579 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002580 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002581 fi
2582fi
2583fi
2584fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002585CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002586if test -n "$CC"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002587 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2588$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002589else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002590 { $as_echo "$as_me:$LINENO: result: no" >&5
2591$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002592fi
2593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594
Martin v. Löwis11437992002-04-12 09:54:03 +00002595fi
2596if test -z "$CC"; then
2597 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002598 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002599 do
2600 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2601set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002602{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2603$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002604if test "${ac_cv_prog_CC+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002605 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002606else
2607 if test -n "$CC"; then
2608 ac_cv_prog_CC="$CC" # Let the user override the test.
2609else
Martin v. Löwis11437992002-04-12 09:54:03 +00002610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2611for as_dir in $PATH
2612do
2613 IFS=$as_save_IFS
2614 test -z "$as_dir" && as_dir=.
2615 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002616 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002617 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002618 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002619 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002620 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002621done
2622done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002623IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002624
2625fi
2626fi
2627CC=$ac_cv_prog_CC
2628if test -n "$CC"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002629 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2630$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002631else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002632 { $as_echo "$as_me:$LINENO: result: no" >&5
2633$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002634fi
2635
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002636
Martin v. Löwis11437992002-04-12 09:54:03 +00002637 test -n "$CC" && break
2638 done
2639fi
2640if test -z "$CC"; then
2641 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002642 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002643do
2644 # Extract the first word of "$ac_prog", so it can be a program name with args.
2645set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002646{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2647$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002648if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002649 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002650else
2651 if test -n "$ac_ct_CC"; then
2652 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2653else
2654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2655for as_dir in $PATH
2656do
2657 IFS=$as_save_IFS
2658 test -z "$as_dir" && as_dir=.
2659 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002660 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002661 ac_cv_prog_ac_ct_CC="$ac_prog"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002662 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 break 2
2664 fi
2665done
2666done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002667IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002668
Martin v. Löwis11437992002-04-12 09:54:03 +00002669fi
2670fi
2671ac_ct_CC=$ac_cv_prog_ac_ct_CC
2672if test -n "$ac_ct_CC"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002673 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2674$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002675else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002676 { $as_echo "$as_me:$LINENO: result: no" >&5
2677$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002678fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680
Martin v. Löwis11437992002-04-12 09:54:03 +00002681 test -n "$ac_ct_CC" && break
2682done
Michael W. Hudson54241132001-12-07 15:38:26 +00002683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002684 if test "x$ac_ct_CC" = x; then
2685 CC=""
2686 else
2687 case $cross_compiling:$ac_tool_warned in
2688yes:)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002689{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2690$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002691ac_tool_warned=yes ;;
2692esac
2693 CC=$ac_ct_CC
2694 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002695fi
2696
2697fi
2698
2699
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002700test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2701$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2702{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002703See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002704$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002705See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002706 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002707
2708# Provide some information about the compiler.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002709$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2710set X $ac_compile
2711ac_compiler=$2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002712{ (ac_try="$ac_compiler --version >&5"
2713case "(($ac_try" in
2714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2715 *) ac_try_echo=$ac_try;;
2716esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002717eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2718$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002719 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002720 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002721 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002722 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002723{ (ac_try="$ac_compiler -v >&5"
2724case "(($ac_try" in
2725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2726 *) ac_try_echo=$ac_try;;
2727esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002728eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2729$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002730 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002731 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002732 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002733 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002734{ (ac_try="$ac_compiler -V >&5"
2735case "(($ac_try" in
2736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2737 *) ac_try_echo=$ac_try;;
2738esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002739eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2740$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002741 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002742 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002743 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002744 (exit $ac_status); }
2745
2746cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002747/* confdefs.h. */
2748_ACEOF
2749cat confdefs.h >>conftest.$ac_ext
2750cat >>conftest.$ac_ext <<_ACEOF
2751/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002752
Martin v. Löwis11437992002-04-12 09:54:03 +00002753int
2754main ()
2755{
2756
2757 ;
2758 return 0;
2759}
2760_ACEOF
2761ac_clean_files_save=$ac_clean_files
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002762ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002763# Try to create an executable without -o first, disregard a.out.
2764# It will help us diagnose broken compilers, and finding out an intuition
2765# of exeext.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002766{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2767$as_echo_n "checking for C compiler default output file name... " >&6; }
2768ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2769
2770# The possible output files:
2771ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2772
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002773ac_rmfiles=
2774for ac_file in $ac_files
2775do
2776 case $ac_file in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002777 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002778 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2779 esac
2780done
2781rm -f $ac_rmfiles
2782
2783if { (ac_try="$ac_link_default"
2784case "(($ac_try" in
2785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2786 *) ac_try_echo=$ac_try;;
2787esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002788eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2789$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002790 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002791 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002792 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002793 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002794 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2795# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2796# in a Makefile. We should not override ac_cv_exeext if it was cached,
2797# so that the user can short-circuit this test for compilers unknown to
2798# Autoconf.
2799for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002800do
2801 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002802 case $ac_file in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002803 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002804 ;;
2805 [ab].out )
2806 # We found the default executable, but exeext='' is most
2807 # certainly right.
2808 break;;
2809 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002810 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2811 then :; else
2812 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2813 fi
2814 # We set ac_cv_exeext here because the later test for it is not
2815 # safe: cross compilers may not add the suffix if given an `-o'
2816 # argument, so we may need to know it at that point already.
2817 # Even if this section looks crufty: it has the advantage of
2818 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002819 break;;
2820 * )
2821 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002822 esac
2823done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002824test "$ac_cv_exeext" = no && ac_cv_exeext=
2825
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002826else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827 ac_file=''
2828fi
2829
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002830{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2831$as_echo "$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002832if test -z "$ac_file"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002833 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002834sed 's/^/| /' conftest.$ac_ext >&5
2835
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002836{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2837$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2838{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002839See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002840$as_echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002841See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002842 { (exit 77); exit 77; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002843fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002844
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002845ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002846
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002847# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002848# the compiler is broken, or we cross compile.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002849{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2850$as_echo_n "checking whether the C compiler works... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002851# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2852# If not cross compiling, check that we can run a simple program.
2853if test "$cross_compiling" != yes; then
2854 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002855 { (case "(($ac_try" in
2856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2857 *) ac_try_echo=$ac_try;;
2858esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002859eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2860$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002861 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002862 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002863 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002864 (exit $ac_status); }; }; then
2865 cross_compiling=no
2866 else
2867 if test "$cross_compiling" = maybe; then
2868 cross_compiling=yes
2869 else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002870 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2872{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002873If you meant to cross compile, use \`--host'.
2874See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002875$as_echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002876If you meant to cross compile, use \`--host'.
2877See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002878 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002879 fi
2880 fi
2881fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002882{ $as_echo "$as_me:$LINENO: result: yes" >&5
2883$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002884
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002885rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002886ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002887# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002888# the compiler is broken, or we cross compile.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002889{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2890$as_echo_n "checking whether we are cross compiling... " >&6; }
2891{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
2892$as_echo "$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002893
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002894{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
2895$as_echo_n "checking for suffix of executables... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002896if { (ac_try="$ac_link"
2897case "(($ac_try" in
2898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2899 *) ac_try_echo=$ac_try;;
2900esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002901eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2902$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002903 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002904 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002905 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002906 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002907 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2908# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2909# work properly (i.e., refer to `conftest.exe'), while it won't with
2910# `rm'.
2911for ac_file in conftest.exe conftest conftest.*; do
2912 test -f "$ac_file" || continue
2913 case $ac_file in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002914 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002915 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2916 break;;
2917 * ) break;;
2918 esac
2919done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002920else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002921 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2922$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2923{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002924See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002925$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002926See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002927 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002928fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002929
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002930rm -f conftest$ac_cv_exeext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002931{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2932$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002933
2934rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002935EXEEXT=$ac_cv_exeext
2936ac_exeext=$EXEEXT
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002937{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
2938$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002939if test "${ac_cv_objext+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002940 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002941else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002942 cat >conftest.$ac_ext <<_ACEOF
2943/* confdefs.h. */
2944_ACEOF
2945cat confdefs.h >>conftest.$ac_ext
2946cat >>conftest.$ac_ext <<_ACEOF
2947/* end confdefs.h. */
2948
2949int
2950main ()
2951{
2952
2953 ;
2954 return 0;
2955}
2956_ACEOF
2957rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002958if { (ac_try="$ac_compile"
2959case "(($ac_try" in
2960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2961 *) ac_try_echo=$ac_try;;
2962esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002963eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2964$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002965 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002966 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002967 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002968 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002969 for ac_file in conftest.o conftest.obj conftest.*; do
2970 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002971 case $ac_file in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002972 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002973 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2974 break;;
2975 esac
2976done
2977else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002978 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002979sed 's/^/| /' conftest.$ac_ext >&5
2980
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002981{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2982$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2983{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002984See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002985$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002986See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002987 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002988fi
2989
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002990rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002991fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002992{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2993$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002994OBJEXT=$ac_cv_objext
2995ac_objext=$OBJEXT
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002996{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2997$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002998if test "${ac_cv_c_compiler_gnu+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00002999 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003000else
3001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003002/* confdefs.h. */
3003_ACEOF
3004cat confdefs.h >>conftest.$ac_ext
3005cat >>conftest.$ac_ext <<_ACEOF
3006/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003007
Martin v. Löwis11437992002-04-12 09:54:03 +00003008int
3009main ()
3010{
3011#ifndef __GNUC__
3012 choke me
3013#endif
3014
3015 ;
3016 return 0;
3017}
3018_ACEOF
3019rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003020if { (ac_try="$ac_compile"
3021case "(($ac_try" in
3022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3023 *) ac_try_echo=$ac_try;;
3024esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003025eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3026$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003027 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003028 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003029 grep -v '^ *+' conftest.er1 >conftest.err
3030 rm -f conftest.er1
3031 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003032 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003033 (exit $ac_status); } && {
3034 test -z "$ac_c_werror_flag" ||
3035 test ! -s conftest.err
3036 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003037 ac_compiler_gnu=yes
3038else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003039 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003040sed 's/^/| /' conftest.$ac_ext >&5
3041
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003042 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003044
3045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003046ac_cv_c_compiler_gnu=$ac_compiler_gnu
3047
3048fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003049{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3050$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3051if test $ac_compiler_gnu = yes; then
3052 GCC=yes
3053else
3054 GCC=
3055fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003056ac_test_CFLAGS=${CFLAGS+set}
3057ac_save_CFLAGS=$CFLAGS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003058{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3059$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003060if test "${ac_cv_prog_cc_g+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003061 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003062else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003063 ac_save_c_werror_flag=$ac_c_werror_flag
3064 ac_c_werror_flag=yes
3065 ac_cv_prog_cc_g=no
3066 CFLAGS="-g"
3067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003068/* confdefs.h. */
3069_ACEOF
3070cat confdefs.h >>conftest.$ac_ext
3071cat >>conftest.$ac_ext <<_ACEOF
3072/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003073
Martin v. Löwis11437992002-04-12 09:54:03 +00003074int
3075main ()
3076{
3077
3078 ;
3079 return 0;
3080}
3081_ACEOF
3082rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003083if { (ac_try="$ac_compile"
3084case "(($ac_try" in
3085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3086 *) ac_try_echo=$ac_try;;
3087esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003088eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3089$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003090 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003092 grep -v '^ *+' conftest.er1 >conftest.err
3093 rm -f conftest.er1
3094 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003095 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003096 (exit $ac_status); } && {
3097 test -z "$ac_c_werror_flag" ||
3098 test ! -s conftest.err
3099 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003100 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003101else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003102 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003103sed 's/^/| /' conftest.$ac_ext >&5
3104
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003105 CFLAGS=""
3106 cat >conftest.$ac_ext <<_ACEOF
3107/* confdefs.h. */
3108_ACEOF
3109cat confdefs.h >>conftest.$ac_ext
3110cat >>conftest.$ac_ext <<_ACEOF
3111/* end confdefs.h. */
3112
3113int
3114main ()
3115{
3116
3117 ;
3118 return 0;
3119}
3120_ACEOF
3121rm -f conftest.$ac_objext
3122if { (ac_try="$ac_compile"
3123case "(($ac_try" in
3124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3125 *) ac_try_echo=$ac_try;;
3126esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003127eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3128$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003129 (eval "$ac_compile") 2>conftest.er1
3130 ac_status=$?
3131 grep -v '^ *+' conftest.er1 >conftest.err
3132 rm -f conftest.er1
3133 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003134 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003135 (exit $ac_status); } && {
3136 test -z "$ac_c_werror_flag" ||
3137 test ! -s conftest.err
3138 } && test -s conftest.$ac_objext; then
3139 :
3140else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003141 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142sed 's/^/| /' conftest.$ac_ext >&5
3143
3144 ac_c_werror_flag=$ac_save_c_werror_flag
3145 CFLAGS="-g"
3146 cat >conftest.$ac_ext <<_ACEOF
3147/* confdefs.h. */
3148_ACEOF
3149cat confdefs.h >>conftest.$ac_ext
3150cat >>conftest.$ac_ext <<_ACEOF
3151/* end confdefs.h. */
3152
3153int
3154main ()
3155{
3156
3157 ;
3158 return 0;
3159}
3160_ACEOF
3161rm -f conftest.$ac_objext
3162if { (ac_try="$ac_compile"
3163case "(($ac_try" in
3164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3165 *) ac_try_echo=$ac_try;;
3166esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003167eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3168$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003169 (eval "$ac_compile") 2>conftest.er1
3170 ac_status=$?
3171 grep -v '^ *+' conftest.er1 >conftest.err
3172 rm -f conftest.er1
3173 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003174 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003175 (exit $ac_status); } && {
3176 test -z "$ac_c_werror_flag" ||
3177 test ! -s conftest.err
3178 } && test -s conftest.$ac_objext; then
3179 ac_cv_prog_cc_g=yes
3180else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003181 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182sed 's/^/| /' conftest.$ac_ext >&5
3183
3184
Guido van Rossum627b2d71993-12-24 10:39:16 +00003185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003186
3187rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003188fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003189
3190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3191fi
3192
3193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3194 ac_c_werror_flag=$ac_save_c_werror_flag
3195fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003196{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3197$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003198if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003199 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003200elif test $ac_cv_prog_cc_g = yes; then
3201 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003202 CFLAGS="-g -O2"
3203 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003204 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003205 fi
3206else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003207 if test "$GCC" = yes; then
3208 CFLAGS="-O2"
3209 else
3210 CFLAGS=
3211 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003212fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003213{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3214$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003215if test "${ac_cv_prog_cc_c89+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003216 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003217else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003218 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003219ac_save_CC=$CC
3220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003221/* confdefs.h. */
3222_ACEOF
3223cat confdefs.h >>conftest.$ac_ext
3224cat >>conftest.$ac_ext <<_ACEOF
3225/* end confdefs.h. */
3226#include <stdarg.h>
3227#include <stdio.h>
3228#include <sys/types.h>
3229#include <sys/stat.h>
3230/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3231struct buf { int x; };
3232FILE * (*rcsopen) (struct buf *, struct stat *, int);
3233static char *e (p, i)
3234 char **p;
3235 int i;
3236{
3237 return p[i];
3238}
3239static char *f (char * (*g) (char **, int), char **p, ...)
3240{
3241 char *s;
3242 va_list v;
3243 va_start (v,p);
3244 s = g (p, va_arg (v,int));
3245 va_end (v);
3246 return s;
3247}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003248
3249/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3250 function prototypes and stuff, but not '\xHH' hex character constants.
3251 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003252 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003253 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3254 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003255 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003256int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3257
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003258/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3259 inside strings and character constants. */
3260#define FOO(x) 'x'
3261int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3262
Skip Montanaro6dead952003-09-25 14:50:04 +00003263int test (int i, double x);
3264struct s1 {int (*f) (int a);};
3265struct s2 {int (*f) (double a);};
3266int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3267int argc;
3268char **argv;
3269int
3270main ()
3271{
3272return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3273 ;
3274 return 0;
3275}
3276_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003277for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3278 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003279do
3280 CC="$ac_save_CC $ac_arg"
3281 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003282if { (ac_try="$ac_compile"
3283case "(($ac_try" in
3284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3285 *) ac_try_echo=$ac_try;;
3286esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003287eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3288$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003291 grep -v '^ *+' conftest.er1 >conftest.err
3292 rm -f conftest.er1
3293 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003294 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295 (exit $ac_status); } && {
3296 test -z "$ac_c_werror_flag" ||
3297 test ! -s conftest.err
3298 } && test -s conftest.$ac_objext; then
3299 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003300else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003301 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003302sed 's/^/| /' conftest.$ac_ext >&5
3303
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003304
Skip Montanaro6dead952003-09-25 14:50:04 +00003305fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306
3307rm -f core conftest.err conftest.$ac_objext
3308 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003309done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003311CC=$ac_save_CC
3312
3313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003314# AC_CACHE_VAL
3315case "x$ac_cv_prog_cc_c89" in
3316 x)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003317 { $as_echo "$as_me:$LINENO: result: none needed" >&5
3318$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319 xno)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003320 { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3321$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003322 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003323 CC="$CC $ac_cv_prog_cc_c89"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003324 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3325$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003326esac
3327
Skip Montanaro6dead952003-09-25 14:50:04 +00003328
Martin v. Löwis11437992002-04-12 09:54:03 +00003329ac_ext=c
3330ac_cpp='$CPP $CPPFLAGS'
3331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3333ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003334
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003335
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003336
3337
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003338{ $as_echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3339$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003340
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003341# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003342if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003344
3345 case $withval in
3346 no) with_cxx_main=no
3347 MAINCC='$(CC)';;
3348 yes) with_cxx_main=yes
3349 MAINCC='$(CXX)';;
3350 *) with_cxx_main=yes
3351 MAINCC=$withval
3352 if test -z "$CXX"
3353 then
3354 CXX=$withval
3355 fi;;
3356 esac
3357else
3358
3359 with_cxx_main=no
3360 MAINCC='$(CC)'
3361
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003362fi
3363
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003364{ $as_echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3365$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003366
3367preset_cxx="$CXX"
3368if test -z "$CXX"
3369then
3370 case "$CC" in
3371 gcc) # Extract the first word of "g++", so it can be a program name with args.
3372set dummy g++; ac_word=$2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003373{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3374$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003375if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003376 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003377else
3378 case $CXX in
3379 [\\/]* | ?:[\\/]*)
3380 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3381 ;;
3382 *)
3383 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3384for as_dir in notfound
3385do
3386 IFS=$as_save_IFS
3387 test -z "$as_dir" && as_dir=.
3388 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003389 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003390 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003391 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003392 break 2
3393 fi
3394done
3395done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003396IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003397
3398 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3399 ;;
3400esac
3401fi
3402CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003403if test -n "$CXX"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003404 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3405$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003406else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003407 { $as_echo "$as_me:$LINENO: result: no" >&5
3408$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003409fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003410
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003411 ;;
3412 cc) # Extract the first word of "c++", so it can be a program name with args.
3413set dummy c++; ac_word=$2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003414{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3415$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003416if test "${ac_cv_path_CXX+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003417 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003418else
3419 case $CXX in
3420 [\\/]* | ?:[\\/]*)
3421 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3422 ;;
3423 *)
3424 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3425for as_dir in notfound
3426do
3427 IFS=$as_save_IFS
3428 test -z "$as_dir" && as_dir=.
3429 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003430 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003431 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003432 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003433 break 2
3434 fi
3435done
3436done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003437IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003438
3439 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3440 ;;
3441esac
3442fi
3443CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003444if test -n "$CXX"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003445 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3446$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003447else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003448 { $as_echo "$as_me:$LINENO: result: no" >&5
3449$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003450fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003451
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003452 ;;
3453 esac
3454 if test "$CXX" = "notfound"
3455 then
3456 CXX=""
3457 fi
3458fi
3459if test -z "$CXX"
3460then
3461 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3462do
3463 # Extract the first word of "$ac_prog", so it can be a program name with args.
3464set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003465{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3466$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003467if test "${ac_cv_prog_CXX+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003468 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003469else
3470 if test -n "$CXX"; then
3471 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3472else
3473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3474for as_dir in $PATH
3475do
3476 IFS=$as_save_IFS
3477 test -z "$as_dir" && as_dir=.
3478 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003479 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003480 ac_cv_prog_CXX="$ac_prog"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003481 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003482 break 2
3483 fi
3484done
3485done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003486IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003487
3488fi
3489fi
3490CXX=$ac_cv_prog_CXX
3491if test -n "$CXX"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003492 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3493$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003494else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003495 { $as_echo "$as_me:$LINENO: result: no" >&5
3496$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003497fi
3498
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003499
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003500 test -n "$CXX" && break
3501done
3502test -n "$CXX" || CXX="notfound"
3503
3504 if test "$CXX" = "notfound"
3505 then
3506 CXX=""
3507 fi
3508fi
3509if test "$preset_cxx" != "$CXX"
3510then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003511 { $as_echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003512
3513 By default, distutils will build C++ extension modules with \"$CXX\".
3514 If this is not intended, then set CXX on the configure command line.
3515 " >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003516$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003517
3518 By default, distutils will build C++ extension modules with \"$CXX\".
3519 If this is not intended, then set CXX on the configure command line.
3520 " >&2;}
3521fi
3522
3523
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003524# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003525
3526ac_ext=c
3527ac_cpp='$CPP $CPPFLAGS'
3528ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3529ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3530ac_compiler_gnu=$ac_cv_c_compiler_gnu
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003531{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3532$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003533# On Suns, sometimes $CPP names a directory.
3534if test -n "$CPP" && test -d "$CPP"; then
3535 CPP=
3536fi
3537if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003538 if test "${ac_cv_prog_CPP+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003539 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003540else
Martin v. Löwis11437992002-04-12 09:54:03 +00003541 # Double quotes because CPP needs to be expanded
3542 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3543 do
3544 ac_preproc_ok=false
3545for ac_c_preproc_warn_flag in '' yes
3546do
3547 # Use a header file that comes with gcc, so configuring glibc
3548 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003549 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3550 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003551 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003552 # not just through cpp. "Syntax error" is here to catch this case.
3553 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003554/* confdefs.h. */
3555_ACEOF
3556cat confdefs.h >>conftest.$ac_ext
3557cat >>conftest.$ac_ext <<_ACEOF
3558/* end confdefs.h. */
3559#ifdef __STDC__
3560# include <limits.h>
3561#else
3562# include <assert.h>
3563#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003564 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003565_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003566if { (ac_try="$ac_cpp conftest.$ac_ext"
3567case "(($ac_try" in
3568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3569 *) ac_try_echo=$ac_try;;
3570esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003571eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3572$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003573 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003574 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003575 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003576 rm -f conftest.er1
3577 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003578 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003579 (exit $ac_status); } >/dev/null && {
3580 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3581 test ! -s conftest.err
3582 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003583 :
3584else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003585 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003586sed 's/^/| /' conftest.$ac_ext >&5
3587
Martin v. Löwis11437992002-04-12 09:54:03 +00003588 # Broken: fails on valid input.
3589continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003590fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003591
Martin v. Löwis11437992002-04-12 09:54:03 +00003592rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003593
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003594 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003595 # can be detected and how.
3596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003597/* confdefs.h. */
3598_ACEOF
3599cat confdefs.h >>conftest.$ac_ext
3600cat >>conftest.$ac_ext <<_ACEOF
3601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003602#include <ac_nonexistent.h>
3603_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003604if { (ac_try="$ac_cpp conftest.$ac_ext"
3605case "(($ac_try" in
3606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3607 *) ac_try_echo=$ac_try;;
3608esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003609eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3610$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003611 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003612 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003613 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003614 rm -f conftest.er1
3615 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003616 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003617 (exit $ac_status); } >/dev/null && {
3618 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3619 test ! -s conftest.err
3620 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003621 # Broken: success on invalid input.
3622continue
3623else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003624 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003625sed 's/^/| /' conftest.$ac_ext >&5
3626
Martin v. Löwis11437992002-04-12 09:54:03 +00003627 # Passes both tests.
3628ac_preproc_ok=:
3629break
3630fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631
Martin v. Löwis11437992002-04-12 09:54:03 +00003632rm -f conftest.err conftest.$ac_ext
3633
3634done
3635# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3636rm -f conftest.err conftest.$ac_ext
3637if $ac_preproc_ok; then
3638 break
3639fi
3640
3641 done
3642 ac_cv_prog_CPP=$CPP
3643
3644fi
3645 CPP=$ac_cv_prog_CPP
3646else
3647 ac_cv_prog_CPP=$CPP
3648fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003649{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
3650$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003651ac_preproc_ok=false
3652for ac_c_preproc_warn_flag in '' yes
3653do
3654 # Use a header file that comes with gcc, so configuring glibc
3655 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003656 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3657 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 # On the NeXT, cc -E runs the code through the compiler's parser,
3659 # not just through cpp. "Syntax error" is here to catch this case.
3660 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003661/* confdefs.h. */
3662_ACEOF
3663cat confdefs.h >>conftest.$ac_ext
3664cat >>conftest.$ac_ext <<_ACEOF
3665/* end confdefs.h. */
3666#ifdef __STDC__
3667# include <limits.h>
3668#else
3669# include <assert.h>
3670#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003671 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003672_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003673if { (ac_try="$ac_cpp conftest.$ac_ext"
3674case "(($ac_try" in
3675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3676 *) ac_try_echo=$ac_try;;
3677esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003678eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3679$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003680 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003681 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003682 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 rm -f conftest.er1
3684 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003685 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003686 (exit $ac_status); } >/dev/null && {
3687 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3688 test ! -s conftest.err
3689 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003690 :
3691else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003692 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003693sed 's/^/| /' conftest.$ac_ext >&5
3694
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 # Broken: fails on valid input.
3696continue
3697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003698
Martin v. Löwis11437992002-04-12 09:54:03 +00003699rm -f conftest.err conftest.$ac_ext
3700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003701 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 # can be detected and how.
3703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003704/* confdefs.h. */
3705_ACEOF
3706cat confdefs.h >>conftest.$ac_ext
3707cat >>conftest.$ac_ext <<_ACEOF
3708/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003709#include <ac_nonexistent.h>
3710_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003711if { (ac_try="$ac_cpp conftest.$ac_ext"
3712case "(($ac_try" in
3713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3714 *) ac_try_echo=$ac_try;;
3715esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003716eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3717$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003718 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003719 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003720 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003721 rm -f conftest.er1
3722 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003723 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003724 (exit $ac_status); } >/dev/null && {
3725 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3726 test ! -s conftest.err
3727 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003728 # Broken: success on invalid input.
3729continue
3730else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003731 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003732sed 's/^/| /' conftest.$ac_ext >&5
3733
Martin v. Löwis11437992002-04-12 09:54:03 +00003734 # Passes both tests.
3735ac_preproc_ok=:
3736break
3737fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738
Martin v. Löwis11437992002-04-12 09:54:03 +00003739rm -f conftest.err conftest.$ac_ext
3740
3741done
3742# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3743rm -f conftest.err conftest.$ac_ext
3744if $ac_preproc_ok; then
3745 :
3746else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003747 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3748$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3749{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003750See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003751$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003752See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003753 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003754fi
3755
3756ac_ext=c
3757ac_cpp='$CPP $CPPFLAGS'
3758ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3759ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3760ac_compiler_gnu=$ac_cv_c_compiler_gnu
3761
3762
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003763{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3764$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765if test "${ac_cv_path_GREP+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003766 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003767else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003768 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003769 ac_path_GREP_found=false
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003770 # Loop through the user's path and test for each of PROGNAME-LIST
3771 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003772for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3773do
3774 IFS=$as_save_IFS
3775 test -z "$as_dir" && as_dir=.
3776 for ac_prog in grep ggrep; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003777 for ac_exec_ext in '' $ac_executable_extensions; do
3778 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3779 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3780# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003781 # Check for GNU $ac_path_GREP
3782case `"$ac_path_GREP" --version 2>&1` in
3783*GNU*)
3784 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3785*)
3786 ac_count=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003787 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003788 while :
3789 do
3790 cat "conftest.in" "conftest.in" >"conftest.tmp"
3791 mv "conftest.tmp" "conftest.in"
3792 cp "conftest.in" "conftest.nl"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003793 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003794 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3795 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3796 ac_count=`expr $ac_count + 1`
3797 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3798 # Best one so far, save it but keep looking for a better one
3799 ac_cv_path_GREP="$ac_path_GREP"
3800 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003801 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802 # 10*(2^10) chars as input seems more than enough
3803 test $ac_count -gt 10 && break
3804 done
3805 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3806esac
3807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003808 $ac_path_GREP_found && break 3
3809 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003810 done
3811done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812IFS=$as_save_IFS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003813 if test -z "$ac_cv_path_GREP"; then
3814 { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3815$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003816 { (exit 1); exit 1; }; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003817 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818else
3819 ac_cv_path_GREP=$GREP
3820fi
3821
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003822fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003823{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3824$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825 GREP="$ac_cv_path_GREP"
3826
3827
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003828{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
3829$as_echo_n "checking for egrep... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003830if test "${ac_cv_path_EGREP+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003831 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003832else
3833 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3834 then ac_cv_path_EGREP="$GREP -E"
3835 else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003836 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003837 ac_path_EGREP_found=false
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003838 # Loop through the user's path and test for each of PROGNAME-LIST
3839 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003840for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3841do
3842 IFS=$as_save_IFS
3843 test -z "$as_dir" && as_dir=.
3844 for ac_prog in egrep; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003845 for ac_exec_ext in '' $ac_executable_extensions; do
3846 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3847 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3848# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849 # Check for GNU $ac_path_EGREP
3850case `"$ac_path_EGREP" --version 2>&1` in
3851*GNU*)
3852 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3853*)
3854 ac_count=0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003855 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003856 while :
3857 do
3858 cat "conftest.in" "conftest.in" >"conftest.tmp"
3859 mv "conftest.tmp" "conftest.in"
3860 cp "conftest.in" "conftest.nl"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003861 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3863 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3864 ac_count=`expr $ac_count + 1`
3865 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3866 # Best one so far, save it but keep looking for a better one
3867 ac_cv_path_EGREP="$ac_path_EGREP"
3868 ac_path_EGREP_max=$ac_count
3869 fi
3870 # 10*(2^10) chars as input seems more than enough
3871 test $ac_count -gt 10 && break
3872 done
3873 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3874esac
3875
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003876 $ac_path_EGREP_found && break 3
3877 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003878 done
3879done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880IFS=$as_save_IFS
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003881 if test -z "$ac_cv_path_EGREP"; then
3882 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3883$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003884 { (exit 1); exit 1; }; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003885 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886else
3887 ac_cv_path_EGREP=$EGREP
3888fi
3889
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 fi
3891fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003892{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3893$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003894 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003895
3896
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003897{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3898$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00003899if test "${ac_cv_header_stdc+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003900 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00003901else
3902 cat >conftest.$ac_ext <<_ACEOF
3903/* confdefs.h. */
3904_ACEOF
3905cat confdefs.h >>conftest.$ac_ext
3906cat >>conftest.$ac_ext <<_ACEOF
3907/* end confdefs.h. */
3908#include <stdlib.h>
3909#include <stdarg.h>
3910#include <string.h>
3911#include <float.h>
3912
3913int
3914main ()
3915{
3916
3917 ;
3918 return 0;
3919}
3920_ACEOF
3921rm -f conftest.$ac_objext
3922if { (ac_try="$ac_compile"
3923case "(($ac_try" in
3924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3925 *) ac_try_echo=$ac_try;;
3926esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003927eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3928$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003929 (eval "$ac_compile") 2>conftest.er1
3930 ac_status=$?
3931 grep -v '^ *+' conftest.er1 >conftest.err
3932 rm -f conftest.er1
3933 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003934 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003935 (exit $ac_status); } && {
3936 test -z "$ac_c_werror_flag" ||
3937 test ! -s conftest.err
3938 } && test -s conftest.$ac_objext; then
3939 ac_cv_header_stdc=yes
3940else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00003941 $as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00003942sed 's/^/| /' conftest.$ac_ext >&5
3943
3944 ac_cv_header_stdc=no
3945fi
3946
3947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3948
3949if test $ac_cv_header_stdc = yes; then
3950 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3951 cat >conftest.$ac_ext <<_ACEOF
3952/* confdefs.h. */
3953_ACEOF
3954cat confdefs.h >>conftest.$ac_ext
3955cat >>conftest.$ac_ext <<_ACEOF
3956/* end confdefs.h. */
3957#include <string.h>
3958
3959_ACEOF
3960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3961 $EGREP "memchr" >/dev/null 2>&1; then
3962 :
3963else
3964 ac_cv_header_stdc=no
3965fi
3966rm -f conftest*
3967
3968fi
3969
3970if test $ac_cv_header_stdc = yes; then
3971 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3972 cat >conftest.$ac_ext <<_ACEOF
3973/* confdefs.h. */
3974_ACEOF
3975cat confdefs.h >>conftest.$ac_ext
3976cat >>conftest.$ac_ext <<_ACEOF
3977/* end confdefs.h. */
3978#include <stdlib.h>
3979
3980_ACEOF
3981if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3982 $EGREP "free" >/dev/null 2>&1; then
3983 :
3984else
3985 ac_cv_header_stdc=no
3986fi
3987rm -f conftest*
3988
3989fi
3990
3991if test $ac_cv_header_stdc = yes; then
3992 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3993 if test "$cross_compiling" = yes; then
3994 :
3995else
3996 cat >conftest.$ac_ext <<_ACEOF
3997/* confdefs.h. */
3998_ACEOF
3999cat confdefs.h >>conftest.$ac_ext
4000cat >>conftest.$ac_ext <<_ACEOF
4001/* end confdefs.h. */
4002#include <ctype.h>
4003#include <stdlib.h>
4004#if ((' ' & 0x0FF) == 0x020)
4005# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4006# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4007#else
4008# define ISLOWER(c) \
4009 (('a' <= (c) && (c) <= 'i') \
4010 || ('j' <= (c) && (c) <= 'r') \
4011 || ('s' <= (c) && (c) <= 'z'))
4012# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4013#endif
4014
4015#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4016int
4017main ()
4018{
4019 int i;
4020 for (i = 0; i < 256; i++)
4021 if (XOR (islower (i), ISLOWER (i))
4022 || toupper (i) != TOUPPER (i))
4023 return 2;
4024 return 0;
4025}
4026_ACEOF
4027rm -f conftest$ac_exeext
4028if { (ac_try="$ac_link"
4029case "(($ac_try" in
4030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4031 *) ac_try_echo=$ac_try;;
4032esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004033eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4034$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004035 (eval "$ac_link") 2>&5
4036 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004037 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004038 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4039 { (case "(($ac_try" in
4040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4041 *) ac_try_echo=$ac_try;;
4042esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004043eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4044$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004045 (eval "$ac_try") 2>&5
4046 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004047 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004048 (exit $ac_status); }; }; then
4049 :
4050else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004051 $as_echo "$as_me: program exited with status $ac_status" >&5
4052$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004053sed 's/^/| /' conftest.$ac_ext >&5
4054
4055( exit $ac_status )
4056ac_cv_header_stdc=no
4057fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004058rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00004059rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4060fi
4061
4062
4063fi
4064fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004065{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4066$as_echo "$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004067if test $ac_cv_header_stdc = yes; then
4068
4069cat >>confdefs.h <<\_ACEOF
4070#define STDC_HEADERS 1
4071_ACEOF
4072
4073fi
4074
Martin v. Löwis113a0852009-05-29 17:25:39 +00004075# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4086 inttypes.h stdint.h unistd.h
4087do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004088as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4089{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4090$as_echo_n "checking for $ac_header... " >&6; }
Martin v. Löwis113a0852009-05-29 17:25:39 +00004091if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004092 $as_echo_n "(cached) " >&6
Martin v. Löwis113a0852009-05-29 17:25:39 +00004093else
4094 cat >conftest.$ac_ext <<_ACEOF
4095/* confdefs.h. */
4096_ACEOF
4097cat confdefs.h >>conftest.$ac_ext
4098cat >>conftest.$ac_ext <<_ACEOF
4099/* end confdefs.h. */
4100$ac_includes_default
4101
4102#include <$ac_header>
4103_ACEOF
4104rm -f conftest.$ac_objext
4105if { (ac_try="$ac_compile"
4106case "(($ac_try" in
4107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4108 *) ac_try_echo=$ac_try;;
4109esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004110eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4111$as_echo "$ac_try_echo") >&5
Martin v. Löwis113a0852009-05-29 17:25:39 +00004112 (eval "$ac_compile") 2>conftest.er1
4113 ac_status=$?
4114 grep -v '^ *+' conftest.er1 >conftest.err
4115 rm -f conftest.er1
4116 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004117 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis113a0852009-05-29 17:25:39 +00004118 (exit $ac_status); } && {
4119 test -z "$ac_c_werror_flag" ||
4120 test ! -s conftest.err
4121 } && test -s conftest.$ac_objext; then
4122 eval "$as_ac_Header=yes"
4123else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004124 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis113a0852009-05-29 17:25:39 +00004125sed 's/^/| /' conftest.$ac_ext >&5
4126
4127 eval "$as_ac_Header=no"
4128fi
4129
4130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4131fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004132ac_res=`eval 'as_val=${'$as_ac_Header'}
4133 $as_echo "$as_val"'`
4134 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4135$as_echo "$ac_res" >&6; }
4136as_val=`eval 'as_val=${'$as_ac_Header'}
4137 $as_echo "$as_val"'`
4138 if test "x$as_val" = x""yes; then
Martin v. Löwis113a0852009-05-29 17:25:39 +00004139 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004140#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis113a0852009-05-29 17:25:39 +00004141_ACEOF
4142
4143fi
4144
4145done
4146
4147
Antoine Pitrou20327222009-05-24 20:39:11 +00004148
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004149 if test "${ac_cv_header_minix_config_h+set}" = set; then
4150 { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4151$as_echo_n "checking for minix/config.h... " >&6; }
4152if test "${ac_cv_header_minix_config_h+set}" = set; then
4153 $as_echo_n "(cached) " >&6
4154fi
4155{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4156$as_echo "$ac_cv_header_minix_config_h" >&6; }
4157else
4158 # Is the header compilable?
4159{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4160$as_echo_n "checking minix/config.h usability... " >&6; }
4161cat >conftest.$ac_ext <<_ACEOF
4162/* confdefs.h. */
4163_ACEOF
4164cat confdefs.h >>conftest.$ac_ext
4165cat >>conftest.$ac_ext <<_ACEOF
4166/* end confdefs.h. */
4167$ac_includes_default
4168#include <minix/config.h>
4169_ACEOF
4170rm -f conftest.$ac_objext
4171if { (ac_try="$ac_compile"
4172case "(($ac_try" in
4173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4174 *) ac_try_echo=$ac_try;;
4175esac
4176eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4177$as_echo "$ac_try_echo") >&5
4178 (eval "$ac_compile") 2>conftest.er1
4179 ac_status=$?
4180 grep -v '^ *+' conftest.er1 >conftest.err
4181 rm -f conftest.er1
4182 cat conftest.err >&5
4183 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4184 (exit $ac_status); } && {
4185 test -z "$ac_c_werror_flag" ||
4186 test ! -s conftest.err
4187 } && test -s conftest.$ac_objext; then
4188 ac_header_compiler=yes
4189else
4190 $as_echo "$as_me: failed program was:" >&5
4191sed 's/^/| /' conftest.$ac_ext >&5
4192
4193 ac_header_compiler=no
4194fi
4195
4196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4197{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4198$as_echo "$ac_header_compiler" >&6; }
4199
4200# Is the header present?
4201{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4202$as_echo_n "checking minix/config.h presence... " >&6; }
4203cat >conftest.$ac_ext <<_ACEOF
4204/* confdefs.h. */
4205_ACEOF
4206cat confdefs.h >>conftest.$ac_ext
4207cat >>conftest.$ac_ext <<_ACEOF
4208/* end confdefs.h. */
4209#include <minix/config.h>
4210_ACEOF
4211if { (ac_try="$ac_cpp conftest.$ac_ext"
4212case "(($ac_try" in
4213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4214 *) ac_try_echo=$ac_try;;
4215esac
4216eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4217$as_echo "$ac_try_echo") >&5
4218 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4219 ac_status=$?
4220 grep -v '^ *+' conftest.er1 >conftest.err
4221 rm -f conftest.er1
4222 cat conftest.err >&5
4223 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4224 (exit $ac_status); } >/dev/null && {
4225 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4226 test ! -s conftest.err
4227 }; then
4228 ac_header_preproc=yes
4229else
4230 $as_echo "$as_me: failed program was:" >&5
4231sed 's/^/| /' conftest.$ac_ext >&5
4232
4233 ac_header_preproc=no
4234fi
4235
4236rm -f conftest.err conftest.$ac_ext
4237{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4238$as_echo "$ac_header_preproc" >&6; }
4239
4240# So? What about this header?
4241case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4242 yes:no: )
4243 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4244$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4245 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4246$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4247 ac_header_preproc=yes
4248 ;;
4249 no:yes:* )
4250 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4251$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4252 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4253$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4254 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4255$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4256 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4257$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4258 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4259$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4260 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4261$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4262 ( cat <<\_ASBOX
4263## -------------------------------------- ##
4264## Report this to http://bugs.python.org/ ##
4265## -------------------------------------- ##
4266_ASBOX
4267 ) | sed "s/^/$as_me: WARNING: /" >&2
4268 ;;
4269esac
4270{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4271$as_echo_n "checking for minix/config.h... " >&6; }
4272if test "${ac_cv_header_minix_config_h+set}" = set; then
4273 $as_echo_n "(cached) " >&6
4274else
4275 ac_cv_header_minix_config_h=$ac_header_preproc
4276fi
4277{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4278$as_echo "$ac_cv_header_minix_config_h" >&6; }
4279
4280fi
4281if test "x$ac_cv_header_minix_config_h" = x""yes; then
4282 MINIX=yes
4283else
4284 MINIX=
4285fi
4286
4287
4288 if test "$MINIX" = yes; then
4289
4290cat >>confdefs.h <<\_ACEOF
4291#define _POSIX_SOURCE 1
4292_ACEOF
4293
4294
4295cat >>confdefs.h <<\_ACEOF
4296#define _POSIX_1_SOURCE 2
4297_ACEOF
4298
4299
4300cat >>confdefs.h <<\_ACEOF
4301#define _MINIX 1
4302_ACEOF
4303
4304 fi
4305
4306
4307
4308 { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4309$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4310if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4311 $as_echo_n "(cached) " >&6
4312else
4313 cat >conftest.$ac_ext <<_ACEOF
4314/* confdefs.h. */
4315_ACEOF
4316cat confdefs.h >>conftest.$ac_ext
4317cat >>conftest.$ac_ext <<_ACEOF
4318/* end confdefs.h. */
4319
4320# define __EXTENSIONS__ 1
4321 $ac_includes_default
4322int
4323main ()
4324{
4325
4326 ;
4327 return 0;
4328}
4329_ACEOF
4330rm -f conftest.$ac_objext
4331if { (ac_try="$ac_compile"
4332case "(($ac_try" in
4333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4334 *) ac_try_echo=$ac_try;;
4335esac
4336eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4337$as_echo "$ac_try_echo") >&5
4338 (eval "$ac_compile") 2>conftest.er1
4339 ac_status=$?
4340 grep -v '^ *+' conftest.er1 >conftest.err
4341 rm -f conftest.er1
4342 cat conftest.err >&5
4343 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4344 (exit $ac_status); } && {
4345 test -z "$ac_c_werror_flag" ||
4346 test ! -s conftest.err
4347 } && test -s conftest.$ac_objext; then
4348 ac_cv_safe_to_define___extensions__=yes
4349else
4350 $as_echo "$as_me: failed program was:" >&5
4351sed 's/^/| /' conftest.$ac_ext >&5
4352
4353 ac_cv_safe_to_define___extensions__=no
4354fi
4355
4356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4357fi
4358{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4359$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4360 test $ac_cv_safe_to_define___extensions__ = yes &&
4361 cat >>confdefs.h <<\_ACEOF
4362#define __EXTENSIONS__ 1
4363_ACEOF
4364
4365 cat >>confdefs.h <<\_ACEOF
4366#define _ALL_SOURCE 1
4367_ACEOF
4368
4369 cat >>confdefs.h <<\_ACEOF
4370#define _GNU_SOURCE 1
4371_ACEOF
4372
4373 cat >>confdefs.h <<\_ACEOF
4374#define _POSIX_PTHREAD_SEMANTICS 1
4375_ACEOF
4376
4377 cat >>confdefs.h <<\_ACEOF
4378#define _TANDEM_SOURCE 1
4379_ACEOF
4380
4381
4382
4383# Check for unsupported systems
4384case $ac_sys_system/$ac_sys_release in
4385atheos*|Linux*/1*)
4386 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4387 echo See README for details.
4388 exit 1;;
4389esac
4390
4391
4392{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5
4393$as_echo_n "checking for --with-suffix... " >&6; }
4394
4395# Check whether --with-suffix was given.
4396if test "${with_suffix+set}" = set; then
4397 withval=$with_suffix;
4398 case $withval in
4399 no) EXEEXT=;;
4400 yes) EXEEXT=.exe;;
4401 *) EXEEXT=$withval;;
4402 esac
4403fi
4404
4405{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5
4406$as_echo "$EXEEXT" >&6; }
4407
4408# Test whether we're running on a non-case-sensitive system, in which
4409# case we give a warning if no ext is given
4410
4411{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
4412$as_echo_n "checking for case-insensitive build directory... " >&6; }
4413if test ! -d CaseSensitiveTestDir; then
4414mkdir CaseSensitiveTestDir
4415fi
4416
4417if test -d casesensitivetestdir
4418then
4419 { $as_echo "$as_me:$LINENO: result: yes" >&5
4420$as_echo "yes" >&6; }
4421 BUILDEXEEXT=.exe
4422else
4423 { $as_echo "$as_me:$LINENO: result: no" >&5
4424$as_echo "no" >&6; }
4425 BUILDEXEEXT=$EXEEXT
4426fi
4427rmdir CaseSensitiveTestDir
4428
4429case $MACHDEP in
4430bsdos*)
4431 case $CC in
4432 gcc) CC="$CC -D_HAVE_BSDI";;
4433 esac;;
4434esac
4435
4436case $ac_sys_system in
4437hp*|HP*)
4438 case $CC in
4439 cc|*/cc) CC="$CC -Ae";;
4440 esac;;
4441Monterey*)
4442 case $CC in
4443 cc) CC="$CC -Wl,-Bexport";;
4444 esac;;
4445SunOS*)
4446 # Some functions have a prototype only with that define, e.g. confstr
4447
4448cat >>confdefs.h <<\_ACEOF
4449#define __EXTENSIONS__ 1
4450_ACEOF
4451
4452 ;;
4453esac
4454
4455
4456
4457{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5
4458$as_echo_n "checking LIBRARY... " >&6; }
4459if test -z "$LIBRARY"
4460then
4461 LIBRARY='libpython$(VERSION).a'
4462fi
4463{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5
4464$as_echo "$LIBRARY" >&6; }
4465
4466# LDLIBRARY is the name of the library to link against (as opposed to the
4467# name of the library into which to insert object files). BLDLIBRARY is also
4468# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4469# is blank as the main program is not linked directly against LDLIBRARY.
4470# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4471# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4472# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4473# DLLLIBRARY is the shared (i.e., DLL) library.
4474#
4475# RUNSHARED is used to run shared python without installed libraries
4476#
4477# INSTSONAME is the name of the shared library that will be use to install
4478# on the system - some systems like version suffix, others don't
4479
4480
4481
4482
4483
4484
4485LDLIBRARY="$LIBRARY"
4486BLDLIBRARY='$(LDLIBRARY)'
4487INSTSONAME='$(LDLIBRARY)'
4488DLLLIBRARY=''
4489LDLIBRARYDIR=''
4490RUNSHARED=''
4491
4492# LINKCC is the command that links the python executable -- default is $(CC).
4493# If CXX is set, and if it is needed to link a main function that was
4494# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4495# python might then depend on the C++ runtime
4496# This is altered for AIX in order to build the export list before
4497# linking.
4498
4499{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5
4500$as_echo_n "checking LINKCC... " >&6; }
4501if test -z "$LINKCC"
4502then
4503 LINKCC='$(PURIFY) $(MAINCC)'
4504 case $ac_sys_system in
4505 AIX*)
4506 exp_extra="\"\""
4507 if test $ac_sys_release -ge 5 -o \
4508 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4509 exp_extra="."
4510 fi
4511 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
4512 Monterey64*)
4513 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
4514 QNX*)
4515 # qcc must be used because the other compilers do not
4516 # support -N.
4517 LINKCC=qcc;;
4518 esac
4519fi
4520{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5
4521$as_echo "$LINKCC" >&6; }
4522
4523# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4524# make sure we default having it set to "no": this is used by
4525# distutils.unixccompiler to know if it should add --enable-new-dtags
4526# to linker command lines, and failing to detect GNU ld simply results
4527# in the same bahaviour as before.
4528
4529{ $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
4530$as_echo_n "checking for GNU ld... " >&6; }
4531ac_prog=ld
4532if test "$GCC" = yes; then
4533 ac_prog=`$CC -print-prog-name=ld`
4534fi
4535case `"$ac_prog" -V 2>&1 < /dev/null` in
4536 *GNU*)
4537 GNULD=yes;;
4538 *)
4539 GNULD=no;;
4540esac
4541{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5
4542$as_echo "$GNULD" >&6; }
4543
4544{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5
4545$as_echo_n "checking for --enable-shared... " >&6; }
4546# Check whether --enable-shared was given.
4547if test "${enable_shared+set}" = set; then
4548 enableval=$enable_shared;
4549fi
4550
4551
4552if test -z "$enable_shared"
4553then
4554 case $ac_sys_system in
4555 CYGWIN* | atheos*)
4556 enable_shared="yes";;
4557 *)
4558 enable_shared="no";;
4559 esac
4560fi
4561{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
4562$as_echo "$enable_shared" >&6; }
4563
4564{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4565$as_echo_n "checking for --enable-profiling... " >&6; }
4566# Check whether --enable-profiling was given.
4567if test "${enable_profiling+set}" = set; then
4568 enableval=$enable_profiling; ac_save_cc="$CC"
4569 CC="$CC -pg"
4570 if test "$cross_compiling" = yes; then
4571 ac_enable_profiling="no"
4572else
4573 cat >conftest.$ac_ext <<_ACEOF
4574/* confdefs.h. */
4575_ACEOF
4576cat confdefs.h >>conftest.$ac_ext
4577cat >>conftest.$ac_ext <<_ACEOF
4578/* end confdefs.h. */
4579int main() { return 0; }
4580_ACEOF
4581rm -f conftest$ac_exeext
4582if { (ac_try="$ac_link"
4583case "(($ac_try" in
4584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4585 *) ac_try_echo=$ac_try;;
4586esac
4587eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4588$as_echo "$ac_try_echo") >&5
4589 (eval "$ac_link") 2>&5
4590 ac_status=$?
4591 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4592 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4593 { (case "(($ac_try" in
4594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4595 *) ac_try_echo=$ac_try;;
4596esac
4597eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4598$as_echo "$ac_try_echo") >&5
4599 (eval "$ac_try") 2>&5
4600 ac_status=$?
4601 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4602 (exit $ac_status); }; }; then
4603 ac_enable_profiling="yes"
4604else
4605 $as_echo "$as_me: program exited with status $ac_status" >&5
4606$as_echo "$as_me: failed program was:" >&5
4607sed 's/^/| /' conftest.$ac_ext >&5
4608
4609( exit $ac_status )
4610ac_enable_profiling="no"
4611fi
4612rm -rf conftest.dSYM
4613rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4614fi
4615
4616
4617 CC="$ac_save_cc"
4618fi
4619
4620{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4621$as_echo "$ac_enable_profiling" >&6; }
4622
4623case "$ac_enable_profiling" in
4624 "yes")
4625 BASECFLAGS="-pg $BASECFLAGS"
4626 LDFLAGS="-pg $LDFLAGS"
4627 ;;
4628esac
4629
4630{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4631$as_echo_n "checking LDLIBRARY... " >&6; }
4632
4633# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4634# library that we build, but we do not want to link against it (we
4635# will find it with a -framework option). For this reason there is an
4636# extra variable BLDLIBRARY against which Python and the extension
4637# modules are linked, BLDLIBRARY. This is normally the same as
4638# LDLIBRARY, but empty for MacOSX framework builds.
4639if test "$enable_framework"
4640then
4641 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4642 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4643 BLDLIBRARY=''
4644else
4645 BLDLIBRARY='$(LDLIBRARY)'
4646fi
4647
4648# Other platforms follow
4649if test $enable_shared = "yes"; then
4650
4651cat >>confdefs.h <<\_ACEOF
4652#define Py_ENABLE_SHARED 1
4653_ACEOF
4654
4655 case $ac_sys_system in
4656 CYGWIN*)
4657 LDLIBRARY='libpython$(VERSION).dll.a'
4658 DLLLIBRARY='libpython$(VERSION).dll'
4659 ;;
4660 SunOS*)
4661 LDLIBRARY='libpython$(VERSION).so'
4662 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4663 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4664 INSTSONAME="$LDLIBRARY".$SOVERSION
4665 ;;
4666 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4667 LDLIBRARY='libpython$(VERSION).so'
4668 BLDLIBRARY='-L. -lpython$(VERSION)'
4669 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4670 case $ac_sys_system in
4671 FreeBSD*)
4672 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4673 ;;
4674 esac
4675 INSTSONAME="$LDLIBRARY".$SOVERSION
4676 ;;
4677 hp*|HP*)
4678 case `uname -m` in
4679 ia64)
4680 LDLIBRARY='libpython$(VERSION).so'
4681 ;;
4682 *)
4683 LDLIBRARY='libpython$(VERSION).sl'
4684 ;;
4685 esac
4686 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4687 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4688 ;;
4689 OSF*)
4690 LDLIBRARY='libpython$(VERSION).so'
4691 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4692 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4693 ;;
4694 atheos*)
4695 LDLIBRARY='libpython$(VERSION).so'
4696 BLDLIBRARY='-L. -lpython$(VERSION)'
4697 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4698 ;;
4699 Darwin*)
4700 LDLIBRARY='libpython$(VERSION).dylib'
4701 BLDLIBRARY='-L. -lpython$(VERSION)'
4702 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4703 ;;
4704
4705 esac
4706else # shared is disabled
4707 case $ac_sys_system in
4708 CYGWIN*)
4709 BLDLIBRARY='$(LIBRARY)'
4710 LDLIBRARY='libpython$(VERSION).dll.a'
4711 ;;
4712 esac
4713fi
4714
4715{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4716$as_echo "$LDLIBRARY" >&6; }
4717
4718if test -n "$ac_tool_prefix"; then
4719 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4720set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4721{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4722$as_echo_n "checking for $ac_word... " >&6; }
4723if test "${ac_cv_prog_RANLIB+set}" = set; then
4724 $as_echo_n "(cached) " >&6
4725else
4726 if test -n "$RANLIB"; then
4727 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4728else
4729as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4730for as_dir in $PATH
4731do
4732 IFS=$as_save_IFS
4733 test -z "$as_dir" && as_dir=.
4734 for ac_exec_ext in '' $ac_executable_extensions; do
4735 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4736 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4737 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4738 break 2
4739 fi
4740done
4741done
4742IFS=$as_save_IFS
4743
4744fi
4745fi
4746RANLIB=$ac_cv_prog_RANLIB
4747if test -n "$RANLIB"; then
4748 { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
4749$as_echo "$RANLIB" >&6; }
4750else
4751 { $as_echo "$as_me:$LINENO: result: no" >&5
4752$as_echo "no" >&6; }
4753fi
4754
4755
4756fi
4757if test -z "$ac_cv_prog_RANLIB"; then
4758 ac_ct_RANLIB=$RANLIB
4759 # Extract the first word of "ranlib", so it can be a program name with args.
4760set dummy ranlib; ac_word=$2
4761{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4762$as_echo_n "checking for $ac_word... " >&6; }
4763if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
4764 $as_echo_n "(cached) " >&6
4765else
4766 if test -n "$ac_ct_RANLIB"; then
4767 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4768else
4769as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4770for as_dir in $PATH
4771do
4772 IFS=$as_save_IFS
4773 test -z "$as_dir" && as_dir=.
4774 for ac_exec_ext in '' $ac_executable_extensions; do
4775 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4776 ac_cv_prog_ac_ct_RANLIB="ranlib"
4777 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4778 break 2
4779 fi
4780done
4781done
4782IFS=$as_save_IFS
4783
4784fi
4785fi
4786ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4787if test -n "$ac_ct_RANLIB"; then
4788 { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4789$as_echo "$ac_ct_RANLIB" >&6; }
4790else
4791 { $as_echo "$as_me:$LINENO: result: no" >&5
4792$as_echo "no" >&6; }
4793fi
4794
4795 if test "x$ac_ct_RANLIB" = x; then
4796 RANLIB=":"
4797 else
4798 case $cross_compiling:$ac_tool_warned in
4799yes:)
4800{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
4801$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4802ac_tool_warned=yes ;;
4803esac
4804 RANLIB=$ac_ct_RANLIB
4805 fi
4806else
4807 RANLIB="$ac_cv_prog_RANLIB"
4808fi
4809
4810
4811for ac_prog in ar aal
4812do
4813 # Extract the first word of "$ac_prog", so it can be a program name with args.
4814set dummy $ac_prog; ac_word=$2
4815{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
4817if test "${ac_cv_prog_AR+set}" = set; then
4818 $as_echo_n "(cached) " >&6
4819else
4820 if test -n "$AR"; then
4821 ac_cv_prog_AR="$AR" # Let the user override the test.
4822else
4823as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4824for as_dir in $PATH
4825do
4826 IFS=$as_save_IFS
4827 test -z "$as_dir" && as_dir=.
4828 for ac_exec_ext in '' $ac_executable_extensions; do
4829 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4830 ac_cv_prog_AR="$ac_prog"
4831 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4832 break 2
4833 fi
4834done
4835done
4836IFS=$as_save_IFS
4837
4838fi
4839fi
4840AR=$ac_cv_prog_AR
4841if test -n "$AR"; then
4842 { $as_echo "$as_me:$LINENO: result: $AR" >&5
4843$as_echo "$AR" >&6; }
4844else
4845 { $as_echo "$as_me:$LINENO: result: no" >&5
4846$as_echo "no" >&6; }
4847fi
4848
4849
4850 test -n "$AR" && break
4851done
4852test -n "$AR" || AR="ar"
4853
4854
4855# tweak ARFLAGS only if the user didn't set it on the command line
4856
4857if test -z "$ARFLAGS"
4858then
4859 ARFLAGS="rc"
4860fi
4861
4862
4863# Extract the first word of "svnversion", so it can be a program name with args.
4864set dummy svnversion; ac_word=$2
4865{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4866$as_echo_n "checking for $ac_word... " >&6; }
4867if test "${ac_cv_prog_SVNVERSION+set}" = set; then
4868 $as_echo_n "(cached) " >&6
4869else
4870 if test -n "$SVNVERSION"; then
4871 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4872else
4873as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4874for as_dir in $PATH
4875do
4876 IFS=$as_save_IFS
4877 test -z "$as_dir" && as_dir=.
4878 for ac_exec_ext in '' $ac_executable_extensions; do
4879 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4880 ac_cv_prog_SVNVERSION="found"
4881 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
4882 break 2
4883 fi
4884done
4885done
4886IFS=$as_save_IFS
4887
4888 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4889fi
4890fi
4891SVNVERSION=$ac_cv_prog_SVNVERSION
4892if test -n "$SVNVERSION"; then
4893 { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4894$as_echo "$SVNVERSION" >&6; }
4895else
4896 { $as_echo "$as_me:$LINENO: result: no" >&5
4897$as_echo "no" >&6; }
4898fi
4899
4900
4901if test $SVNVERSION = found
4902then
4903 SVNVERSION="svnversion \$(srcdir)"
4904else
4905 SVNVERSION="echo Unversioned directory"
4906fi
4907
4908case $MACHDEP in
4909bsdos*|hp*|HP*)
4910 # install -d does not work on BSDI or HP-UX
4911 if test -z "$INSTALL"
4912 then
4913 INSTALL="${srcdir}/install-sh -c"
4914 fi
4915esac
4916ac_aux_dir=
4917for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4918 if test -f "$ac_dir/install-sh"; then
4919 ac_aux_dir=$ac_dir
4920 ac_install_sh="$ac_aux_dir/install-sh -c"
4921 break
4922 elif test -f "$ac_dir/install.sh"; then
4923 ac_aux_dir=$ac_dir
4924 ac_install_sh="$ac_aux_dir/install.sh -c"
4925 break
4926 elif test -f "$ac_dir/shtool"; then
4927 ac_aux_dir=$ac_dir
4928 ac_install_sh="$ac_aux_dir/shtool install -c"
4929 break
4930 fi
4931done
4932if test -z "$ac_aux_dir"; then
4933 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4934$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
4935 { (exit 1); exit 1; }; }
4936fi
4937
4938# These three variables are undocumented and unsupported,
4939# and are intended to be withdrawn in a future Autoconf release.
4940# They can cause serious problems if a builder's source tree is in a directory
4941# whose full name contains unusual characters.
4942ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4943ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4944ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4945
4946
4947# Find a good install program. We prefer a C program (faster),
4948# so one script is as good as another. But avoid the broken or
4949# incompatible versions:
4950# SysV /etc/install, /usr/sbin/install
4951# SunOS /usr/etc/install
4952# IRIX /sbin/install
4953# AIX /bin/install
4954# AmigaOS /C/install, which installs bootblocks on floppy discs
4955# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4956# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4957# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4958# OS/2's system install, which has a completely different semantic
4959# ./install, which can be erroneously created by make from ./install.sh.
4960# Reject install programs that cannot install multiple files.
4961{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4962$as_echo_n "checking for a BSD-compatible install... " >&6; }
4963if test -z "$INSTALL"; then
4964if test "${ac_cv_path_install+set}" = set; then
4965 $as_echo_n "(cached) " >&6
4966else
4967 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4968for as_dir in $PATH
4969do
4970 IFS=$as_save_IFS
4971 test -z "$as_dir" && as_dir=.
4972 # Account for people who put trailing slashes in PATH elements.
4973case $as_dir/ in
4974 ./ | .// | /cC/* | \
4975 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4976 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4977 /usr/ucb/* ) ;;
4978 *)
4979 # OSF1 and SCO ODT 3.0 have their own names for install.
4980 # Don't use installbsd from OSF since it installs stuff as root
4981 # by default.
4982 for ac_prog in ginstall scoinst install; do
4983 for ac_exec_ext in '' $ac_executable_extensions; do
4984 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4985 if test $ac_prog = install &&
4986 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4987 # AIX install. It has an incompatible calling convention.
4988 :
4989 elif test $ac_prog = install &&
4990 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4991 # program-specific install script used by HP pwplus--don't use.
4992 :
4993 else
4994 rm -rf conftest.one conftest.two conftest.dir
4995 echo one > conftest.one
4996 echo two > conftest.two
4997 mkdir conftest.dir
4998 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4999 test -s conftest.one && test -s conftest.two &&
5000 test -s conftest.dir/conftest.one &&
5001 test -s conftest.dir/conftest.two
5002 then
5003 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5004 break 3
5005 fi
5006 fi
5007 fi
5008 done
5009 done
5010 ;;
5011esac
5012
5013done
5014IFS=$as_save_IFS
5015
5016rm -rf conftest.one conftest.two conftest.dir
5017
5018fi
5019 if test "${ac_cv_path_install+set}" = set; then
5020 INSTALL=$ac_cv_path_install
5021 else
5022 # As a last resort, use the slow shell script. Don't cache a
5023 # value for INSTALL within a source directory, because that will
5024 # break other packages using the cache if that directory is
5025 # removed, or if the value is a relative name.
5026 INSTALL=$ac_install_sh
5027 fi
5028fi
5029{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
5030$as_echo "$INSTALL" >&6; }
5031
5032# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5033# It thinks the first close brace ends the variable substitution.
5034test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5035
5036test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5037
5038test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5039
5040
5041# Not every filesystem supports hard links
5042
5043if test -z "$LN" ; then
5044 case $ac_sys_system in
5045 CYGWIN*) LN="ln -s";;
5046 atheos*) LN="ln -s";;
5047 *) LN=ln;;
5048 esac
5049fi
5050
5051# Check for --with-pydebug
5052{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5
5053$as_echo_n "checking for --with-pydebug... " >&6; }
5054
5055# Check whether --with-pydebug was given.
5056if test "${with_pydebug+set}" = set; then
5057 withval=$with_pydebug;
5058if test "$withval" != no
5059then
5060
5061cat >>confdefs.h <<\_ACEOF
5062#define Py_DEBUG 1
5063_ACEOF
5064
5065 { $as_echo "$as_me:$LINENO: result: yes" >&5
5066$as_echo "yes" >&6; };
5067 Py_DEBUG='true'
5068else { $as_echo "$as_me:$LINENO: result: no" >&5
5069$as_echo "no" >&6; }; Py_DEBUG='false'
5070fi
5071else
5072 { $as_echo "$as_me:$LINENO: result: no" >&5
5073$as_echo "no" >&6; }
5074fi
5075
5076
5077# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5078# merged with this chunk of code?
5079
5080# Optimizer/debugger flags
5081# ------------------------
5082# (The following bit of code is complicated enough - please keep things
5083# indented properly. Just pretend you're editing Python code. ;-)
5084
5085# There are two parallel sets of case statements below, one that checks to
5086# see if OPT was set and one that does BASECFLAGS setting based upon
5087# compiler and platform. BASECFLAGS tweaks need to be made even if the
5088# user set OPT.
5089
5090# tweak OPT based on compiler and platform, only if the user didn't set
5091# it on the command line
5092
5093if test -z "$OPT"
5094then
5095 case $GCC in
5096 yes)
5097 if test "$CC" != 'g++' ; then
5098 STRICT_PROTO="-Wstrict-prototypes"
5099 fi
5100 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5101 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5102 WRAP="-fwrapv"
5103 fi
5104 case $ac_cv_prog_cc_g in
5105 yes)
5106 if test "$Py_DEBUG" = 'true' ; then
5107 # Optimization messes up debuggers, so turn it off for
5108 # debug builds.
5109 OPT="-g -Wall $STRICT_PROTO"
5110 else
5111 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5112 fi
5113 ;;
5114 *)
5115 OPT="-O3 -Wall $STRICT_PROTO"
5116 ;;
5117 esac
5118 case $ac_sys_system in
5119 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5120 ;;
5121 esac
5122 ;;
5123
5124 *)
5125 OPT="-O"
5126 ;;
5127 esac
5128
5129 # The current (beta) Monterey compiler dies with optimizations
5130 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
5131 case $ac_sys_system in
5132 Monterey*)
5133 OPT=""
5134 ;;
5135 esac
5136
5137fi
5138
5139
5140
5141# The -arch flags for universal builds on OSX
5142UNIVERSAL_ARCH_FLAGS=
5143
5144
5145# tweak BASECFLAGS based on compiler and platform
5146case $GCC in
5147yes)
5148 # Python violates C99 rules, by casting between incompatible
5149 # pointer types. GCC may generate bad code as a result of that,
5150 # so use -fno-strict-aliasing if supported.
5151 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
5152$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
5153 ac_save_cc="$CC"
5154 CC="$CC -fno-strict-aliasing"
5155 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
5156 $as_echo_n "(cached) " >&6
5157else
5158 if test "$cross_compiling" = yes; then
5159 ac_cv_no_strict_aliasing_ok=no
5160else
5161 cat >conftest.$ac_ext <<_ACEOF
5162/* confdefs.h. */
5163_ACEOF
5164cat confdefs.h >>conftest.$ac_ext
5165cat >>conftest.$ac_ext <<_ACEOF
5166/* end confdefs.h. */
5167int main() { return 0; }
5168_ACEOF
5169rm -f conftest$ac_exeext
5170if { (ac_try="$ac_link"
5171case "(($ac_try" in
5172 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5173 *) ac_try_echo=$ac_try;;
5174esac
5175eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5176$as_echo "$ac_try_echo") >&5
5177 (eval "$ac_link") 2>&5
5178 ac_status=$?
5179 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5180 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5181 { (case "(($ac_try" in
5182 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5183 *) ac_try_echo=$ac_try;;
5184esac
5185eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5186$as_echo "$ac_try_echo") >&5
5187 (eval "$ac_try") 2>&5
5188 ac_status=$?
5189 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5190 (exit $ac_status); }; }; then
5191 ac_cv_no_strict_aliasing_ok=yes
5192else
5193 $as_echo "$as_me: program exited with status $ac_status" >&5
5194$as_echo "$as_me: failed program was:" >&5
5195sed 's/^/| /' conftest.$ac_ext >&5
5196
5197( exit $ac_status )
5198ac_cv_no_strict_aliasing_ok=no
5199fi
5200rm -rf conftest.dSYM
5201rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5202fi
5203
5204
5205fi
5206
5207 CC="$ac_save_cc"
5208 { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
5209$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
5210 if test $ac_cv_no_strict_aliasing_ok = yes
5211 then
5212 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5213 fi
5214
5215 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5216 # support. Without this, treatment of subnormals doesn't follow
5217 # the standard.
5218 case $ac_sys_machine in
5219 alpha*)
5220 BASECFLAGS="$BASECFLAGS -mieee"
5221 ;;
5222 esac
5223
5224 case $ac_sys_system in
5225 SCO_SV*)
5226 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5227 ;;
5228 # is there any other compiler on Darwin besides gcc?
5229 Darwin*)
5230 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5231 # used to be here, but non-Apple gcc doesn't accept them.
5232
5233
5234 if test "${enable_universalsdk}"; then
5235 UNIVERSAL_ARCH_FLAGS=""
5236 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5237 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5238 ARCH_RUN_32BIT=""
5239
5240 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5241 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
5242
5243 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5244 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5245 ARCH_RUN_32BIT="arch -i386 -ppc"
5246
5247 else
5248 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
5249$as_echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
5250 { (exit 1); exit 1; }; }
5251
5252 fi
5253
5254
5255 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
5256 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5257 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
5258 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5259 fi
5260 fi
5261
5262 # Calculate the right deployment target for this build.
5263 #
5264 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5265 if test ${cur_target} '>' 10.2; then
5266 cur_target=10.3
5267 fi
5268 if test "${UNIVERSAL_ARCHS}" = "all"; then
5269 # Ensure that the default platform for a 4-way
5270 # universal build is OSX 10.5, that's the first
5271 # OS release where 4-way builds make sense.
5272 cur_target='10.5'
5273 fi
5274 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5275
5276 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5277 # environment with a value that is the same as what we'll use
5278 # in the Makefile to ensure that we'll get the same compiler
5279 # environment during configure and build time.
5280 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5281 export MACOSX_DEPLOYMENT_TARGET
5282 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5283
5284 ;;
5285 OSF*)
5286 BASECFLAGS="$BASECFLAGS -mieee"
5287 ;;
5288 esac
5289 ;;
5290
5291*)
5292 case $ac_sys_system in
5293 OpenUNIX*|UnixWare*)
5294 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5295 ;;
5296 OSF*)
5297 BASECFLAGS="$BASECFLAGS -ieee -std"
5298 ;;
5299 SCO_SV*)
5300 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5301 ;;
5302 esac
5303 ;;
5304esac
5305
5306if test "$Py_DEBUG" = 'true'; then
5307 :
5308else
5309 OPT="-DNDEBUG $OPT"
5310fi
5311
5312if test "$ac_arch_flags"
5313then
5314 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5315fi
5316
5317# disable check for icc since it seems to pass, but generates a warning
5318if test "$CC" = icc
5319then
5320 ac_cv_opt_olimit_ok=no
5321fi
5322
5323{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
5324$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
5325if test "${ac_cv_opt_olimit_ok+set}" = set; then
5326 $as_echo_n "(cached) " >&6
5327else
5328 ac_save_cc="$CC"
5329CC="$CC -OPT:Olimit=0"
5330if test "$cross_compiling" = yes; then
5331 ac_cv_opt_olimit_ok=no
5332else
5333 cat >conftest.$ac_ext <<_ACEOF
5334/* confdefs.h. */
5335_ACEOF
5336cat confdefs.h >>conftest.$ac_ext
5337cat >>conftest.$ac_ext <<_ACEOF
5338/* end confdefs.h. */
5339int main() { return 0; }
5340_ACEOF
5341rm -f conftest$ac_exeext
5342if { (ac_try="$ac_link"
5343case "(($ac_try" in
5344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5345 *) ac_try_echo=$ac_try;;
5346esac
5347eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5348$as_echo "$ac_try_echo") >&5
5349 (eval "$ac_link") 2>&5
5350 ac_status=$?
5351 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5352 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5353 { (case "(($ac_try" in
5354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5355 *) ac_try_echo=$ac_try;;
5356esac
5357eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5358$as_echo "$ac_try_echo") >&5
5359 (eval "$ac_try") 2>&5
5360 ac_status=$?
5361 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5362 (exit $ac_status); }; }; then
5363 ac_cv_opt_olimit_ok=yes
5364else
5365 $as_echo "$as_me: program exited with status $ac_status" >&5
5366$as_echo "$as_me: failed program was:" >&5
5367sed 's/^/| /' conftest.$ac_ext >&5
5368
5369( exit $ac_status )
5370ac_cv_opt_olimit_ok=no
5371fi
5372rm -rf conftest.dSYM
5373rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5374fi
5375
5376
5377CC="$ac_save_cc"
5378fi
5379
5380{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
5381$as_echo "$ac_cv_opt_olimit_ok" >&6; }
5382if test $ac_cv_opt_olimit_ok = yes; then
5383 case $ac_sys_system in
5384 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5385 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5386 # environment?
5387 Darwin*)
5388 ;;
5389 *)
5390 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5391 ;;
5392 esac
5393else
5394 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
5395$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
5396 if test "${ac_cv_olimit_ok+set}" = set; then
5397 $as_echo_n "(cached) " >&6
5398else
5399 ac_save_cc="$CC"
5400 CC="$CC -Olimit 1500"
5401 if test "$cross_compiling" = yes; then
5402 ac_cv_olimit_ok=no
5403else
5404 cat >conftest.$ac_ext <<_ACEOF
5405/* confdefs.h. */
5406_ACEOF
5407cat confdefs.h >>conftest.$ac_ext
5408cat >>conftest.$ac_ext <<_ACEOF
5409/* end confdefs.h. */
5410int main() { return 0; }
5411_ACEOF
5412rm -f conftest$ac_exeext
5413if { (ac_try="$ac_link"
5414case "(($ac_try" in
5415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5416 *) ac_try_echo=$ac_try;;
5417esac
5418eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5419$as_echo "$ac_try_echo") >&5
5420 (eval "$ac_link") 2>&5
5421 ac_status=$?
5422 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5423 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5424 { (case "(($ac_try" in
5425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5426 *) ac_try_echo=$ac_try;;
5427esac
5428eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5429$as_echo "$ac_try_echo") >&5
5430 (eval "$ac_try") 2>&5
5431 ac_status=$?
5432 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5433 (exit $ac_status); }; }; then
5434 ac_cv_olimit_ok=yes
5435else
5436 $as_echo "$as_me: program exited with status $ac_status" >&5
5437$as_echo "$as_me: failed program was:" >&5
5438sed 's/^/| /' conftest.$ac_ext >&5
5439
5440( exit $ac_status )
5441ac_cv_olimit_ok=no
5442fi
5443rm -rf conftest.dSYM
5444rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5445fi
5446
5447
5448 CC="$ac_save_cc"
5449fi
5450
5451 { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5452$as_echo "$ac_cv_olimit_ok" >&6; }
5453 if test $ac_cv_olimit_ok = yes; then
5454 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5455 fi
5456fi
5457
5458# Check whether GCC supports PyArg_ParseTuple format
5459if test "$GCC" = "yes"
5460then
5461 { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5462$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
5463 save_CFLAGS=$CFLAGS
5464 CFLAGS="$CFLAGS -Werror"
5465 cat >conftest.$ac_ext <<_ACEOF
5466/* confdefs.h. */
5467_ACEOF
5468cat confdefs.h >>conftest.$ac_ext
5469cat >>conftest.$ac_ext <<_ACEOF
5470/* end confdefs.h. */
5471
5472 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5473
5474int
5475main ()
5476{
5477
5478 ;
5479 return 0;
5480}
5481_ACEOF
5482rm -f conftest.$ac_objext
5483if { (ac_try="$ac_compile"
5484case "(($ac_try" in
5485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5486 *) ac_try_echo=$ac_try;;
5487esac
5488eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5489$as_echo "$ac_try_echo") >&5
5490 (eval "$ac_compile") 2>conftest.er1
5491 ac_status=$?
5492 grep -v '^ *+' conftest.er1 >conftest.err
5493 rm -f conftest.er1
5494 cat conftest.err >&5
5495 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5496 (exit $ac_status); } && {
5497 test -z "$ac_c_werror_flag" ||
5498 test ! -s conftest.err
5499 } && test -s conftest.$ac_objext; then
5500
5501cat >>confdefs.h <<\_ACEOF
5502#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5503_ACEOF
5504
5505 { $as_echo "$as_me:$LINENO: result: yes" >&5
5506$as_echo "yes" >&6; }
5507else
5508 $as_echo "$as_me: failed program was:" >&5
5509sed 's/^/| /' conftest.$ac_ext >&5
5510
5511 { $as_echo "$as_me:$LINENO: result: no" >&5
5512$as_echo "no" >&6; }
5513
5514fi
5515
5516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5517 CFLAGS=$save_CFLAGS
5518fi
5519
5520# On some compilers, pthreads are available without further options
5521# (e.g. MacOS X). On some of these systems, the compiler will not
5522# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5523# So we have to see first whether pthreads are available without
5524# options before we can check whether -Kpthread improves anything.
5525{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5526$as_echo_n "checking whether pthreads are available without options... " >&6; }
5527if test "${ac_cv_pthread_is_default+set}" = set; then
5528 $as_echo_n "(cached) " >&6
5529else
5530 if test "$cross_compiling" = yes; then
5531 ac_cv_pthread_is_default=no
5532else
5533 cat >conftest.$ac_ext <<_ACEOF
5534/* confdefs.h. */
5535_ACEOF
5536cat confdefs.h >>conftest.$ac_ext
5537cat >>conftest.$ac_ext <<_ACEOF
5538/* end confdefs.h. */
5539
5540#include <pthread.h>
5541
5542void* routine(void* p){return NULL;}
5543
5544int main(){
5545 pthread_t p;
5546 if(pthread_create(&p,NULL,routine,NULL)!=0)
5547 return 1;
5548 (void)pthread_detach(p);
5549 return 0;
5550}
5551
5552_ACEOF
5553rm -f conftest$ac_exeext
5554if { (ac_try="$ac_link"
5555case "(($ac_try" in
5556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5557 *) ac_try_echo=$ac_try;;
5558esac
5559eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5560$as_echo "$ac_try_echo") >&5
5561 (eval "$ac_link") 2>&5
5562 ac_status=$?
5563 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5564 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5565 { (case "(($ac_try" in
5566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5567 *) ac_try_echo=$ac_try;;
5568esac
5569eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5570$as_echo "$ac_try_echo") >&5
5571 (eval "$ac_try") 2>&5
5572 ac_status=$?
5573 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5574 (exit $ac_status); }; }; then
5575
5576 ac_cv_pthread_is_default=yes
5577 ac_cv_kthread=no
5578 ac_cv_pthread=no
5579
5580else
5581 $as_echo "$as_me: program exited with status $ac_status" >&5
5582$as_echo "$as_me: failed program was:" >&5
5583sed 's/^/| /' conftest.$ac_ext >&5
5584
5585( exit $ac_status )
5586ac_cv_pthread_is_default=no
5587fi
5588rm -rf conftest.dSYM
5589rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5590fi
5591
5592
5593
5594fi
5595
5596{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5597$as_echo "$ac_cv_pthread_is_default" >&6; }
5598
5599
5600if test $ac_cv_pthread_is_default = yes
5601then
5602 ac_cv_kpthread=no
5603else
5604# -Kpthread, if available, provides the right #defines
5605# and linker options to make pthread_create available
5606# Some compilers won't report that they do not support -Kpthread,
5607# so we need to run a program to see whether it really made the
5608# function available.
5609{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5610$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
5611if test "${ac_cv_kpthread+set}" = set; then
5612 $as_echo_n "(cached) " >&6
5613else
5614 ac_save_cc="$CC"
5615CC="$CC -Kpthread"
5616if test "$cross_compiling" = yes; then
5617 ac_cv_kpthread=no
5618else
5619 cat >conftest.$ac_ext <<_ACEOF
5620/* confdefs.h. */
5621_ACEOF
5622cat confdefs.h >>conftest.$ac_ext
5623cat >>conftest.$ac_ext <<_ACEOF
5624/* end confdefs.h. */
5625
5626#include <pthread.h>
5627
5628void* routine(void* p){return NULL;}
5629
5630int main(){
5631 pthread_t p;
5632 if(pthread_create(&p,NULL,routine,NULL)!=0)
5633 return 1;
5634 (void)pthread_detach(p);
5635 return 0;
5636}
5637
5638_ACEOF
5639rm -f conftest$ac_exeext
5640if { (ac_try="$ac_link"
5641case "(($ac_try" in
5642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5643 *) ac_try_echo=$ac_try;;
5644esac
5645eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5646$as_echo "$ac_try_echo") >&5
5647 (eval "$ac_link") 2>&5
5648 ac_status=$?
5649 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5650 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5651 { (case "(($ac_try" in
5652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5653 *) ac_try_echo=$ac_try;;
5654esac
5655eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5656$as_echo "$ac_try_echo") >&5
5657 (eval "$ac_try") 2>&5
5658 ac_status=$?
5659 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5660 (exit $ac_status); }; }; then
5661 ac_cv_kpthread=yes
5662else
5663 $as_echo "$as_me: program exited with status $ac_status" >&5
5664$as_echo "$as_me: failed program was:" >&5
5665sed 's/^/| /' conftest.$ac_ext >&5
5666
5667( exit $ac_status )
5668ac_cv_kpthread=no
5669fi
5670rm -rf conftest.dSYM
5671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5672fi
5673
5674
5675CC="$ac_save_cc"
5676fi
5677
5678{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5679$as_echo "$ac_cv_kpthread" >&6; }
5680fi
5681
5682if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5683then
5684# -Kthread, if available, provides the right #defines
5685# and linker options to make pthread_create available
5686# Some compilers won't report that they do not support -Kthread,
5687# so we need to run a program to see whether it really made the
5688# function available.
5689{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5690$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
5691if test "${ac_cv_kthread+set}" = set; then
5692 $as_echo_n "(cached) " >&6
5693else
5694 ac_save_cc="$CC"
5695CC="$CC -Kthread"
5696if test "$cross_compiling" = yes; then
5697 ac_cv_kthread=no
5698else
5699 cat >conftest.$ac_ext <<_ACEOF
5700/* confdefs.h. */
5701_ACEOF
5702cat confdefs.h >>conftest.$ac_ext
5703cat >>conftest.$ac_ext <<_ACEOF
5704/* end confdefs.h. */
5705
5706#include <pthread.h>
5707
5708void* routine(void* p){return NULL;}
5709
5710int main(){
5711 pthread_t p;
5712 if(pthread_create(&p,NULL,routine,NULL)!=0)
5713 return 1;
5714 (void)pthread_detach(p);
5715 return 0;
5716}
5717
5718_ACEOF
5719rm -f conftest$ac_exeext
5720if { (ac_try="$ac_link"
5721case "(($ac_try" in
5722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5723 *) ac_try_echo=$ac_try;;
5724esac
5725eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5726$as_echo "$ac_try_echo") >&5
5727 (eval "$ac_link") 2>&5
5728 ac_status=$?
5729 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5730 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5731 { (case "(($ac_try" in
5732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5733 *) ac_try_echo=$ac_try;;
5734esac
5735eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5736$as_echo "$ac_try_echo") >&5
5737 (eval "$ac_try") 2>&5
5738 ac_status=$?
5739 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5740 (exit $ac_status); }; }; then
5741 ac_cv_kthread=yes
5742else
5743 $as_echo "$as_me: program exited with status $ac_status" >&5
5744$as_echo "$as_me: failed program was:" >&5
5745sed 's/^/| /' conftest.$ac_ext >&5
5746
5747( exit $ac_status )
5748ac_cv_kthread=no
5749fi
5750rm -rf conftest.dSYM
5751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5752fi
5753
5754
5755CC="$ac_save_cc"
5756fi
5757
5758{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5759$as_echo "$ac_cv_kthread" >&6; }
5760fi
5761
5762if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5763then
5764# -pthread, if available, provides the right #defines
5765# and linker options to make pthread_create available
5766# Some compilers won't report that they do not support -pthread,
5767# so we need to run a program to see whether it really made the
5768# function available.
5769{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5770$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
5771if test "${ac_cv_thread+set}" = set; then
5772 $as_echo_n "(cached) " >&6
5773else
5774 ac_save_cc="$CC"
5775CC="$CC -pthread"
5776if test "$cross_compiling" = yes; then
5777 ac_cv_pthread=no
5778else
5779 cat >conftest.$ac_ext <<_ACEOF
5780/* confdefs.h. */
5781_ACEOF
5782cat confdefs.h >>conftest.$ac_ext
5783cat >>conftest.$ac_ext <<_ACEOF
5784/* end confdefs.h. */
5785
5786#include <pthread.h>
5787
5788void* routine(void* p){return NULL;}
5789
5790int main(){
5791 pthread_t p;
5792 if(pthread_create(&p,NULL,routine,NULL)!=0)
5793 return 1;
5794 (void)pthread_detach(p);
5795 return 0;
5796}
5797
5798_ACEOF
5799rm -f conftest$ac_exeext
5800if { (ac_try="$ac_link"
5801case "(($ac_try" in
5802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5803 *) ac_try_echo=$ac_try;;
5804esac
5805eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5806$as_echo "$ac_try_echo") >&5
5807 (eval "$ac_link") 2>&5
5808 ac_status=$?
5809 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5810 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5811 { (case "(($ac_try" in
5812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5813 *) ac_try_echo=$ac_try;;
5814esac
5815eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5816$as_echo "$ac_try_echo") >&5
5817 (eval "$ac_try") 2>&5
5818 ac_status=$?
5819 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5820 (exit $ac_status); }; }; then
5821 ac_cv_pthread=yes
5822else
5823 $as_echo "$as_me: program exited with status $ac_status" >&5
5824$as_echo "$as_me: failed program was:" >&5
5825sed 's/^/| /' conftest.$ac_ext >&5
5826
5827( exit $ac_status )
5828ac_cv_pthread=no
5829fi
5830rm -rf conftest.dSYM
5831rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5832fi
5833
5834
5835CC="$ac_save_cc"
5836fi
5837
5838{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5839$as_echo "$ac_cv_pthread" >&6; }
5840fi
5841
5842# If we have set a CC compiler flag for thread support then
5843# check if it works for CXX, too.
5844ac_cv_cxx_thread=no
5845if test ! -z "$CXX"
5846then
5847{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5848$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
5849ac_save_cxx="$CXX"
5850
5851if test "$ac_cv_kpthread" = "yes"
5852then
5853 CXX="$CXX -Kpthread"
5854 ac_cv_cxx_thread=yes
5855elif test "$ac_cv_kthread" = "yes"
5856then
5857 CXX="$CXX -Kthread"
5858 ac_cv_cxx_thread=yes
5859elif test "$ac_cv_pthread" = "yes"
5860then
5861 CXX="$CXX -pthread"
5862 ac_cv_cxx_thread=yes
5863fi
5864
5865if test $ac_cv_cxx_thread = yes
5866then
5867 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5868 $CXX -c conftest.$ac_ext 2>&5
5869 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5870 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5871 then
5872 ac_cv_cxx_thread=yes
5873 else
5874 ac_cv_cxx_thread=no
5875 fi
5876 rm -fr conftest*
5877fi
5878{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5879$as_echo "$ac_cv_cxx_thread" >&6; }
5880fi
5881CXX="$ac_save_cxx"
5882
5883
5884# checks for header files
5885{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5886$as_echo_n "checking for ANSI C header files... " >&6; }
5887if test "${ac_cv_header_stdc+set}" = set; then
5888 $as_echo_n "(cached) " >&6
5889else
5890 cat >conftest.$ac_ext <<_ACEOF
5891/* confdefs.h. */
5892_ACEOF
5893cat confdefs.h >>conftest.$ac_ext
5894cat >>conftest.$ac_ext <<_ACEOF
5895/* end confdefs.h. */
5896#include <stdlib.h>
5897#include <stdarg.h>
5898#include <string.h>
5899#include <float.h>
5900
5901int
5902main ()
5903{
5904
5905 ;
5906 return 0;
5907}
5908_ACEOF
5909rm -f conftest.$ac_objext
5910if { (ac_try="$ac_compile"
5911case "(($ac_try" in
5912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5913 *) ac_try_echo=$ac_try;;
5914esac
5915eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5916$as_echo "$ac_try_echo") >&5
5917 (eval "$ac_compile") 2>conftest.er1
5918 ac_status=$?
5919 grep -v '^ *+' conftest.er1 >conftest.err
5920 rm -f conftest.er1
5921 cat conftest.err >&5
5922 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
5923 (exit $ac_status); } && {
5924 test -z "$ac_c_werror_flag" ||
5925 test ! -s conftest.err
5926 } && test -s conftest.$ac_objext; then
5927 ac_cv_header_stdc=yes
5928else
5929 $as_echo "$as_me: failed program was:" >&5
5930sed 's/^/| /' conftest.$ac_ext >&5
5931
5932 ac_cv_header_stdc=no
5933fi
5934
5935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5936
5937if test $ac_cv_header_stdc = yes; then
5938 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5939 cat >conftest.$ac_ext <<_ACEOF
5940/* confdefs.h. */
5941_ACEOF
5942cat confdefs.h >>conftest.$ac_ext
5943cat >>conftest.$ac_ext <<_ACEOF
5944/* end confdefs.h. */
5945#include <string.h>
5946
5947_ACEOF
5948if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5949 $EGREP "memchr" >/dev/null 2>&1; then
5950 :
5951else
5952 ac_cv_header_stdc=no
5953fi
5954rm -f conftest*
5955
5956fi
5957
5958if test $ac_cv_header_stdc = yes; then
5959 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5960 cat >conftest.$ac_ext <<_ACEOF
5961/* confdefs.h. */
5962_ACEOF
5963cat confdefs.h >>conftest.$ac_ext
5964cat >>conftest.$ac_ext <<_ACEOF
5965/* end confdefs.h. */
5966#include <stdlib.h>
5967
5968_ACEOF
5969if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5970 $EGREP "free" >/dev/null 2>&1; then
5971 :
5972else
5973 ac_cv_header_stdc=no
5974fi
5975rm -f conftest*
5976
5977fi
5978
5979if test $ac_cv_header_stdc = yes; then
5980 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5981 if test "$cross_compiling" = yes; then
5982 :
5983else
5984 cat >conftest.$ac_ext <<_ACEOF
5985/* confdefs.h. */
5986_ACEOF
5987cat confdefs.h >>conftest.$ac_ext
5988cat >>conftest.$ac_ext <<_ACEOF
5989/* end confdefs.h. */
5990#include <ctype.h>
5991#include <stdlib.h>
5992#if ((' ' & 0x0FF) == 0x020)
5993# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5994# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5995#else
5996# define ISLOWER(c) \
5997 (('a' <= (c) && (c) <= 'i') \
5998 || ('j' <= (c) && (c) <= 'r') \
5999 || ('s' <= (c) && (c) <= 'z'))
6000# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6001#endif
6002
6003#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6004int
6005main ()
6006{
6007 int i;
6008 for (i = 0; i < 256; i++)
6009 if (XOR (islower (i), ISLOWER (i))
6010 || toupper (i) != TOUPPER (i))
6011 return 2;
6012 return 0;
6013}
6014_ACEOF
6015rm -f conftest$ac_exeext
6016if { (ac_try="$ac_link"
6017case "(($ac_try" in
6018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6019 *) ac_try_echo=$ac_try;;
6020esac
6021eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6022$as_echo "$ac_try_echo") >&5
6023 (eval "$ac_link") 2>&5
6024 ac_status=$?
6025 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6026 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6027 { (case "(($ac_try" in
6028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6029 *) ac_try_echo=$ac_try;;
6030esac
6031eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6032$as_echo "$ac_try_echo") >&5
6033 (eval "$ac_try") 2>&5
6034 ac_status=$?
6035 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
6036 (exit $ac_status); }; }; then
6037 :
6038else
6039 $as_echo "$as_me: program exited with status $ac_status" >&5
6040$as_echo "$as_me: failed program was:" >&5
6041sed 's/^/| /' conftest.$ac_ext >&5
6042
6043( exit $ac_status )
6044ac_cv_header_stdc=no
6045fi
6046rm -rf conftest.dSYM
6047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6048fi
6049
6050
6051fi
6052fi
6053{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6054$as_echo "$ac_cv_header_stdc" >&6; }
6055if test $ac_cv_header_stdc = yes; then
6056
6057cat >>confdefs.h <<\_ACEOF
6058#define STDC_HEADERS 1
6059_ACEOF
6060
6061fi
6062
6063
Martin v. Löwis11437992002-04-12 09:54:03 +00006064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
Anthony Baxter8a560de2004-10-13 15:30:56 +00006099
Martin v. Löwisc3001752005-01-23 09:27:24 +00006100
Martin v. Löwis11017b12006-01-14 18:12:57 +00006101
Thomas Wouters477c8d52006-05-27 19:21:47 +00006102
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006103
6104
6105
6106
6107
6108
6109
6110
Thomas Wouters89f507f2006-12-13 04:49:30 +00006111
Christian Heimes043d6f62008-01-07 17:19:16 +00006112
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006113
6114
Christian Heimesbbe741d2008-03-28 10:53:29 +00006115
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006116
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006117for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6118fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006119ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006120shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006121unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006122sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6123sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006124sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006125sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006126sys/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 +00006127sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00006128bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006129do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006130as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006131if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006132 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6133$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006134if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006135 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006136fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006137ac_res=`eval 'as_val=${'$as_ac_Header'}
6138 $as_echo "$as_val"'`
6139 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6140$as_echo "$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006141else
Martin v. Löwis11437992002-04-12 09:54:03 +00006142 # Is the header compilable?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006143{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6144$as_echo_n "checking $ac_header usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006145cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006146/* confdefs.h. */
6147_ACEOF
6148cat confdefs.h >>conftest.$ac_ext
6149cat >>conftest.$ac_ext <<_ACEOF
6150/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006151$ac_includes_default
6152#include <$ac_header>
6153_ACEOF
6154rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006155if { (ac_try="$ac_compile"
6156case "(($ac_try" in
6157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6158 *) ac_try_echo=$ac_try;;
6159esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006160eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6161$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006162 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006164 grep -v '^ *+' conftest.er1 >conftest.err
6165 rm -f conftest.er1
6166 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006167 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006168 (exit $ac_status); } && {
6169 test -z "$ac_c_werror_flag" ||
6170 test ! -s conftest.err
6171 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006172 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00006173else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006174 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006175sed 's/^/| /' conftest.$ac_ext >&5
6176
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006177 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006179
6180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006181{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6182$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006183
6184# Is the header present?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006185{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6186$as_echo_n "checking $ac_header presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006187cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006188/* confdefs.h. */
6189_ACEOF
6190cat confdefs.h >>conftest.$ac_ext
6191cat >>conftest.$ac_ext <<_ACEOF
6192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006193#include <$ac_header>
6194_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006195if { (ac_try="$ac_cpp conftest.$ac_ext"
6196case "(($ac_try" in
6197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6198 *) ac_try_echo=$ac_try;;
6199esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006200eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6201$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006202 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006203 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006204 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00006205 rm -f conftest.er1
6206 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006207 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006208 (exit $ac_status); } >/dev/null && {
6209 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6210 test ! -s conftest.err
6211 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006212 ac_header_preproc=yes
6213else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006214 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006215sed 's/^/| /' conftest.$ac_ext >&5
6216
Martin v. Löwis11437992002-04-12 09:54:03 +00006217 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006219
Martin v. Löwis11437992002-04-12 09:54:03 +00006220rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006221{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6222$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006223
6224# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006225case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6226 yes:no: )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006227 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6228$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6229 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6230$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006231 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006232 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006233 no:yes:* )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006234 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6235$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6236 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6237$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6238 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6239$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6240 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6241$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6242 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6243$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6244 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6245$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006247## -------------------------------------- ##
6248## Report this to http://bugs.python.org/ ##
6249## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006250_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006251 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006252 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00006253esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006254{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6255$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006256if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006257 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006258else
Skip Montanarof0d5f792004-08-15 14:08:23 +00006259 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006260fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006261ac_res=`eval 'as_val=${'$as_ac_Header'}
6262 $as_echo "$as_val"'`
6263 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6264$as_echo "$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006265
6266fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006267as_val=`eval 'as_val=${'$as_ac_Header'}
6268 $as_echo "$as_val"'`
6269 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006270 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006271#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006272_ACEOF
6273
6274fi
6275
Guido van Rossum627b2d71993-12-24 10:39:16 +00006276done
6277
Martin v. Löwis11437992002-04-12 09:54:03 +00006278
6279
6280
6281
6282
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006283ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006284for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006285 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6286{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
6287$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006288if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006289 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006290else
Martin v. Löwis11437992002-04-12 09:54:03 +00006291 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006292/* confdefs.h. */
6293_ACEOF
6294cat confdefs.h >>conftest.$ac_ext
6295cat >>conftest.$ac_ext <<_ACEOF
6296/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006297#include <sys/types.h>
6298#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006299
Martin v. Löwis11437992002-04-12 09:54:03 +00006300int
6301main ()
6302{
6303if ((DIR *) 0)
6304return 0;
6305 ;
6306 return 0;
6307}
6308_ACEOF
6309rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006310if { (ac_try="$ac_compile"
6311case "(($ac_try" in
6312 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6313 *) ac_try_echo=$ac_try;;
6314esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006315eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6316$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006317 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006318 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006319 grep -v '^ *+' conftest.er1 >conftest.err
6320 rm -f conftest.er1
6321 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006322 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006323 (exit $ac_status); } && {
6324 test -z "$ac_c_werror_flag" ||
6325 test ! -s conftest.err
6326 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006327 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006328else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006329 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006330sed 's/^/| /' conftest.$ac_ext >&5
6331
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006332 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006334
6335rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006336fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006337ac_res=`eval 'as_val=${'$as_ac_Header'}
6338 $as_echo "$as_val"'`
6339 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6340$as_echo "$ac_res" >&6; }
6341as_val=`eval 'as_val=${'$as_ac_Header'}
6342 $as_echo "$as_val"'`
6343 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006344 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006345#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006346_ACEOF
6347
6348ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006349fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006350
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006351done
6352# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6353if test $ac_header_dirent = dirent.h; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006354 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6355$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006356if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006357 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006358else
Martin v. Löwis11437992002-04-12 09:54:03 +00006359 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006360cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006361/* confdefs.h. */
6362_ACEOF
6363cat confdefs.h >>conftest.$ac_ext
6364cat >>conftest.$ac_ext <<_ACEOF
6365/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006366
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006367/* Override any GCC internal prototype to avoid an error.
6368 Use char because int might match the return type of a GCC
6369 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006370#ifdef __cplusplus
6371extern "C"
6372#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006373char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006374int
6375main ()
6376{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006377return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006378 ;
6379 return 0;
6380}
6381_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006382for ac_lib in '' dir; do
6383 if test -z "$ac_lib"; then
6384 ac_res="none required"
6385 else
6386 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006387 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006388 fi
6389 rm -f conftest.$ac_objext conftest$ac_exeext
6390if { (ac_try="$ac_link"
6391case "(($ac_try" in
6392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6393 *) ac_try_echo=$ac_try;;
6394esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006395eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6396$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006398 ac_status=$?
6399 grep -v '^ *+' conftest.er1 >conftest.err
6400 rm -f conftest.er1
6401 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006402 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006403 (exit $ac_status); } && {
6404 test -z "$ac_c_werror_flag" ||
6405 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006406 } && test -s conftest$ac_exeext && {
6407 test "$cross_compiling" = yes ||
6408 $as_test_x conftest$ac_exeext
6409 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006410 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006411else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006412 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006413sed 's/^/| /' conftest.$ac_ext >&5
6414
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006415
Thomas Wouters477c8d52006-05-27 19:21:47 +00006416fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006417
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006418rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006419rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6420 conftest$ac_exeext
6421 if test "${ac_cv_search_opendir+set}" = set; then
6422 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006423fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006424done
6425if test "${ac_cv_search_opendir+set}" = set; then
6426 :
6427else
6428 ac_cv_search_opendir=no
6429fi
6430rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006431LIBS=$ac_func_search_save_LIBS
6432fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006433{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6434$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006435ac_res=$ac_cv_search_opendir
6436if test "$ac_res" != no; then
6437 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006438
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006439fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006440
Michael W. Hudson54241132001-12-07 15:38:26 +00006441else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006442 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6443$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006444if test "${ac_cv_search_opendir+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006445 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006446else
6447 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006448cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006449/* confdefs.h. */
6450_ACEOF
6451cat confdefs.h >>conftest.$ac_ext
6452cat >>conftest.$ac_ext <<_ACEOF
6453/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006454
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006455/* Override any GCC internal prototype to avoid an error.
6456 Use char because int might match the return type of a GCC
6457 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006458#ifdef __cplusplus
6459extern "C"
6460#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006461char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006462int
6463main ()
6464{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006465return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006466 ;
6467 return 0;
6468}
6469_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006470for ac_lib in '' x; do
6471 if test -z "$ac_lib"; then
6472 ac_res="none required"
6473 else
6474 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006475 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006476 fi
6477 rm -f conftest.$ac_objext conftest$ac_exeext
6478if { (ac_try="$ac_link"
6479case "(($ac_try" in
6480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6481 *) ac_try_echo=$ac_try;;
6482esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006483eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6484$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006485 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006486 ac_status=$?
6487 grep -v '^ *+' conftest.er1 >conftest.err
6488 rm -f conftest.er1
6489 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006490 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006491 (exit $ac_status); } && {
6492 test -z "$ac_c_werror_flag" ||
6493 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006494 } && test -s conftest$ac_exeext && {
6495 test "$cross_compiling" = yes ||
6496 $as_test_x conftest$ac_exeext
6497 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006498 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006499else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006500 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006501sed 's/^/| /' conftest.$ac_ext >&5
6502
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006503
Thomas Wouters477c8d52006-05-27 19:21:47 +00006504fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006505
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006506rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006507rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6508 conftest$ac_exeext
6509 if test "${ac_cv_search_opendir+set}" = set; then
6510 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006512done
6513if test "${ac_cv_search_opendir+set}" = set; then
6514 :
6515else
6516 ac_cv_search_opendir=no
6517fi
6518rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006519LIBS=$ac_func_search_save_LIBS
6520fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006521{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6522$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006523ac_res=$ac_cv_search_opendir
6524if test "$ac_res" != no; then
6525 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006526
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006527fi
6528
6529fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006530
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006531{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6532$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006533if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006534 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006535else
6536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006537/* confdefs.h. */
6538_ACEOF
6539cat confdefs.h >>conftest.$ac_ext
6540cat >>conftest.$ac_ext <<_ACEOF
6541/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006542#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006543int
6544main ()
6545{
6546return makedev(0, 0);
6547 ;
6548 return 0;
6549}
6550_ACEOF
6551rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006552if { (ac_try="$ac_link"
6553case "(($ac_try" in
6554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6555 *) ac_try_echo=$ac_try;;
6556esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006557eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6558$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006559 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006561 grep -v '^ *+' conftest.er1 >conftest.err
6562 rm -f conftest.er1
6563 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006564 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006565 (exit $ac_status); } && {
6566 test -z "$ac_c_werror_flag" ||
6567 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006568 } && test -s conftest$ac_exeext && {
6569 test "$cross_compiling" = yes ||
6570 $as_test_x conftest$ac_exeext
6571 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006572 ac_cv_header_sys_types_h_makedev=yes
6573else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006574 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006575sed 's/^/| /' conftest.$ac_ext >&5
6576
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006577 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006579
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006580rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006582 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006583
6584fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006585{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6586$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006587
6588if test $ac_cv_header_sys_types_h_makedev = no; then
6589if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006590 { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6591$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006592if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006593 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006594fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006595{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6596$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006597else
6598 # Is the header compilable?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006599{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6600$as_echo_n "checking sys/mkdev.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006601cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006602/* confdefs.h. */
6603_ACEOF
6604cat confdefs.h >>conftest.$ac_ext
6605cat >>conftest.$ac_ext <<_ACEOF
6606/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006607$ac_includes_default
6608#include <sys/mkdev.h>
6609_ACEOF
6610rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006611if { (ac_try="$ac_compile"
6612case "(($ac_try" in
6613 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6614 *) ac_try_echo=$ac_try;;
6615esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006616eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6617$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006618 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006619 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006620 grep -v '^ *+' conftest.er1 >conftest.err
6621 rm -f conftest.er1
6622 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006623 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006624 (exit $ac_status); } && {
6625 test -z "$ac_c_werror_flag" ||
6626 test ! -s conftest.err
6627 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006628 ac_header_compiler=yes
6629else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006630 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006631sed 's/^/| /' conftest.$ac_ext >&5
6632
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006633 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006634fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006635
6636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006637{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6638$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006639
6640# Is the header present?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006641{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6642$as_echo_n "checking sys/mkdev.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006643cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006644/* confdefs.h. */
6645_ACEOF
6646cat confdefs.h >>conftest.$ac_ext
6647cat >>conftest.$ac_ext <<_ACEOF
6648/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006649#include <sys/mkdev.h>
6650_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006651if { (ac_try="$ac_cpp conftest.$ac_ext"
6652case "(($ac_try" in
6653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6654 *) ac_try_echo=$ac_try;;
6655esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006656eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6657$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006658 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006659 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006660 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006661 rm -f conftest.er1
6662 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006663 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006664 (exit $ac_status); } >/dev/null && {
6665 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6666 test ! -s conftest.err
6667 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006668 ac_header_preproc=yes
6669else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006670 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006671sed 's/^/| /' conftest.$ac_ext >&5
6672
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006673 ac_header_preproc=no
6674fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006675
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006676rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006677{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6678$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006679
6680# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006681case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6682 yes:no: )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006683 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6684$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6685 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6686$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006687 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006688 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006689 no:yes:* )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006690 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6691$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6692 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6693$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6694 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6695$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6696 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6697$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6698 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6699$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6700 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6701$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006702 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006703## -------------------------------------- ##
6704## Report this to http://bugs.python.org/ ##
6705## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006706_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006707 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006708 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006709esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006710{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6711$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006712if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006713 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006714else
6715 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6716fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006717{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6718$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006719
6720fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006721if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006722
6723cat >>confdefs.h <<\_ACEOF
6724#define MAJOR_IN_MKDEV 1
6725_ACEOF
6726
6727fi
6728
6729
6730
6731 if test $ac_cv_header_sys_mkdev_h = no; then
6732 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006733 { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6734$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006735if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006736 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006737fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006738{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6739$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006740else
6741 # Is the header compilable?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006742{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6743$as_echo_n "checking sys/sysmacros.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006744cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006745/* confdefs.h. */
6746_ACEOF
6747cat confdefs.h >>conftest.$ac_ext
6748cat >>conftest.$ac_ext <<_ACEOF
6749/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006750$ac_includes_default
6751#include <sys/sysmacros.h>
6752_ACEOF
6753rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006754if { (ac_try="$ac_compile"
6755case "(($ac_try" in
6756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6757 *) ac_try_echo=$ac_try;;
6758esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006759eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6760$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006763 grep -v '^ *+' conftest.er1 >conftest.err
6764 rm -f conftest.er1
6765 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006766 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006767 (exit $ac_status); } && {
6768 test -z "$ac_c_werror_flag" ||
6769 test ! -s conftest.err
6770 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006771 ac_header_compiler=yes
6772else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006773 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006774sed 's/^/| /' conftest.$ac_ext >&5
6775
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006776 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006778
6779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006780{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6781$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006782
6783# Is the header present?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006784{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6785$as_echo_n "checking sys/sysmacros.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006786cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006787/* confdefs.h. */
6788_ACEOF
6789cat confdefs.h >>conftest.$ac_ext
6790cat >>conftest.$ac_ext <<_ACEOF
6791/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006792#include <sys/sysmacros.h>
6793_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006794if { (ac_try="$ac_cpp conftest.$ac_ext"
6795case "(($ac_try" in
6796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6797 *) ac_try_echo=$ac_try;;
6798esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006799eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6800$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006801 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006802 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006803 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006804 rm -f conftest.er1
6805 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006806 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006807 (exit $ac_status); } >/dev/null && {
6808 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6809 test ! -s conftest.err
6810 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006811 ac_header_preproc=yes
6812else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006813 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006814sed 's/^/| /' conftest.$ac_ext >&5
6815
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006816 ac_header_preproc=no
6817fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006818
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006819rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006820{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6821$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006822
6823# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006824case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6825 yes:no: )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006826 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6827$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6828 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6829$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006830 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006831 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006832 no:yes:* )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006833 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6834$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6835 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6836$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6837 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6838$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6839 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6840$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6841 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6842$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6843 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6844$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006845 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006846## -------------------------------------- ##
6847## Report this to http://bugs.python.org/ ##
6848## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006849_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006850 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006851 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006852esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006853{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6854$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006855if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006856 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006857else
6858 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6859fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006860{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6861$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006862
6863fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006864if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006865
6866cat >>confdefs.h <<\_ACEOF
6867#define MAJOR_IN_SYSMACROS 1
6868_ACEOF
6869
6870fi
6871
6872
6873 fi
6874fi
6875
Michael W. Hudson54241132001-12-07 15:38:26 +00006876
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006877# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006878
6879for ac_header in term.h
6880do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006881as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6882{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6883$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006884if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006885 $as_echo_n "(cached) " >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006886else
6887 cat >conftest.$ac_ext <<_ACEOF
6888/* confdefs.h. */
6889_ACEOF
6890cat confdefs.h >>conftest.$ac_ext
6891cat >>conftest.$ac_ext <<_ACEOF
6892/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006893
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006894#ifdef HAVE_CURSES_H
6895#include <curses.h>
6896#endif
6897
6898
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006899#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006900_ACEOF
6901rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006902if { (ac_try="$ac_compile"
6903case "(($ac_try" in
6904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6905 *) ac_try_echo=$ac_try;;
6906esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006907eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6908$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006909 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006910 ac_status=$?
6911 grep -v '^ *+' conftest.er1 >conftest.err
6912 rm -f conftest.er1
6913 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006914 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006915 (exit $ac_status); } && {
6916 test -z "$ac_c_werror_flag" ||
6917 test ! -s conftest.err
6918 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006919 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006920else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006921 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006922sed 's/^/| /' conftest.$ac_ext >&5
6923
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006924 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006926
6927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006928fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006929ac_res=`eval 'as_val=${'$as_ac_Header'}
6930 $as_echo "$as_val"'`
6931 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6932$as_echo "$ac_res" >&6; }
6933as_val=`eval 'as_val=${'$as_ac_Header'}
6934 $as_echo "$as_val"'`
6935 if test "x$as_val" = x""yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006936 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006937#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006938_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006939
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006940fi
6941
6942done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006943
6944
Martin v. Löwis11017b12006-01-14 18:12:57 +00006945# On Linux, netlink.h requires asm/types.h
6946
6947for ac_header in linux/netlink.h
6948do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006949as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6950{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6951$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006952if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006953 $as_echo_n "(cached) " >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006954else
6955 cat >conftest.$ac_ext <<_ACEOF
6956/* confdefs.h. */
6957_ACEOF
6958cat confdefs.h >>conftest.$ac_ext
6959cat >>conftest.$ac_ext <<_ACEOF
6960/* end confdefs.h. */
6961
6962#ifdef HAVE_ASM_TYPES_H
6963#include <asm/types.h>
6964#endif
6965#ifdef HAVE_SYS_SOCKET_H
6966#include <sys/socket.h>
6967#endif
6968
6969
6970#include <$ac_header>
6971_ACEOF
6972rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006973if { (ac_try="$ac_compile"
6974case "(($ac_try" in
6975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6976 *) ac_try_echo=$ac_try;;
6977esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006978eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6979$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006980 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006981 ac_status=$?
6982 grep -v '^ *+' conftest.er1 >conftest.err
6983 rm -f conftest.er1
6984 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006985 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006986 (exit $ac_status); } && {
6987 test -z "$ac_c_werror_flag" ||
6988 test ! -s conftest.err
6989 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006990 eval "$as_ac_Header=yes"
6991else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006992 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00006993sed 's/^/| /' conftest.$ac_ext >&5
6994
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006995 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00006996fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006997
6998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00006999fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007000ac_res=`eval 'as_val=${'$as_ac_Header'}
7001 $as_echo "$as_val"'`
7002 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7003$as_echo "$ac_res" >&6; }
7004as_val=`eval 'as_val=${'$as_ac_Header'}
7005 $as_echo "$as_val"'`
7006 if test "x$as_val" = x""yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00007007 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007008#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007009_ACEOF
7010
7011fi
7012
7013done
7014
7015
Guido van Rossum627b2d71993-12-24 10:39:16 +00007016# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007017was_it_defined=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007018{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
7019$as_echo_n "checking for clock_t in time.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007021/* confdefs.h. */
7022_ACEOF
7023cat confdefs.h >>conftest.$ac_ext
7024cat >>conftest.$ac_ext <<_ACEOF
7025/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007026#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007027
7028_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007030 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00007031 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007032else
Martin v. Löwis11437992002-04-12 09:54:03 +00007033
7034
7035cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007036#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00007037_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007038
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007039
Guido van Rossum627b2d71993-12-24 10:39:16 +00007040fi
7041rm -f conftest*
7042
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007043{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
7044$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007045
Neal Norwitz11690112002-07-30 01:08:28 +00007046# Check whether using makedev requires defining _OSF_SOURCE
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007047{ $as_echo "$as_me:$LINENO: checking for makedev" >&5
7048$as_echo_n "checking for makedev... " >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007049cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007050/* confdefs.h. */
7051_ACEOF
7052cat confdefs.h >>conftest.$ac_ext
7053cat >>conftest.$ac_ext <<_ACEOF
7054/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007055#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007056int
7057main ()
7058{
7059 makedev(0, 0)
7060 ;
7061 return 0;
7062}
7063_ACEOF
7064rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007065if { (ac_try="$ac_link"
7066case "(($ac_try" in
7067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7068 *) ac_try_echo=$ac_try;;
7069esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007070eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7071$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007072 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007073 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007074 grep -v '^ *+' conftest.er1 >conftest.err
7075 rm -f conftest.er1
7076 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007077 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007078 (exit $ac_status); } && {
7079 test -z "$ac_c_werror_flag" ||
7080 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007081 } && test -s conftest$ac_exeext && {
7082 test "$cross_compiling" = yes ||
7083 $as_test_x conftest$ac_exeext
7084 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007085 ac_cv_has_makedev=yes
7086else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007087 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007088sed 's/^/| /' conftest.$ac_ext >&5
7089
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007090 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007091fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007092
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007093rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007094rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007095 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007096if test "$ac_cv_has_makedev" = "no"; then
7097 # we didn't link, try if _OSF_SOURCE will allow us to link
7098 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007099/* confdefs.h. */
7100_ACEOF
7101cat confdefs.h >>conftest.$ac_ext
7102cat >>conftest.$ac_ext <<_ACEOF
7103/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007104
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007105#define _OSF_SOURCE 1
7106#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007107
Neal Norwitz11690112002-07-30 01:08:28 +00007108int
7109main ()
7110{
7111 makedev(0, 0)
7112 ;
7113 return 0;
7114}
7115_ACEOF
7116rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007117if { (ac_try="$ac_link"
7118case "(($ac_try" in
7119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7120 *) ac_try_echo=$ac_try;;
7121esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007122eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7123$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007124 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007126 grep -v '^ *+' conftest.er1 >conftest.err
7127 rm -f conftest.er1
7128 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007129 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007130 (exit $ac_status); } && {
7131 test -z "$ac_c_werror_flag" ||
7132 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007133 } && test -s conftest$ac_exeext && {
7134 test "$cross_compiling" = yes ||
7135 $as_test_x conftest$ac_exeext
7136 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007137 ac_cv_has_makedev=yes
7138else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007139 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007140sed 's/^/| /' conftest.$ac_ext >&5
7141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007142 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007144
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007145rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007146rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007147 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007148 if test "$ac_cv_has_makedev" = "yes"; then
7149
7150cat >>confdefs.h <<\_ACEOF
7151#define _OSF_SOURCE 1
7152_ACEOF
7153
7154 fi
7155fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007156{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
7157$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007158if test "$ac_cv_has_makedev" = "yes"; then
7159
7160cat >>confdefs.h <<\_ACEOF
7161#define HAVE_MAKEDEV 1
7162_ACEOF
7163
7164fi
7165
Martin v. Löwis399a6892002-10-04 10:22:02 +00007166# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7167# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7168# defined, but the compiler does not support pragma redefine_extname,
7169# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7170# structures (such as rlimit64) without declaring them. As a
7171# work-around, disable LFS on such configurations
7172
7173use_lfs=yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007174{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
7175$as_echo_n "checking Solaris LFS bug... " >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007177/* confdefs.h. */
7178_ACEOF
7179cat confdefs.h >>conftest.$ac_ext
7180cat >>conftest.$ac_ext <<_ACEOF
7181/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007182
7183#define _LARGEFILE_SOURCE 1
7184#define _FILE_OFFSET_BITS 64
7185#include <sys/resource.h>
7186
Martin v. Löwis399a6892002-10-04 10:22:02 +00007187int
7188main ()
7189{
7190struct rlimit foo;
7191 ;
7192 return 0;
7193}
7194_ACEOF
7195rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007196if { (ac_try="$ac_compile"
7197case "(($ac_try" in
7198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7199 *) ac_try_echo=$ac_try;;
7200esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007201eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7202$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007203 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00007204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007205 grep -v '^ *+' conftest.er1 >conftest.err
7206 rm -f conftest.er1
7207 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007208 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007209 (exit $ac_status); } && {
7210 test -z "$ac_c_werror_flag" ||
7211 test ! -s conftest.err
7212 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00007213 sol_lfs_bug=no
7214else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007215 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007216sed 's/^/| /' conftest.$ac_ext >&5
7217
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007218 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007220
7221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007222{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
7223$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007224if test "$sol_lfs_bug" = "yes"; then
7225 use_lfs=no
7226fi
7227
7228if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007229# Two defines needed to enable largefile support on various platforms
7230# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00007231
Martin v. Löwis11437992002-04-12 09:54:03 +00007232cat >>confdefs.h <<\_ACEOF
7233#define _LARGEFILE_SOURCE 1
7234_ACEOF
7235
7236
7237cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007238#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00007239_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007240
Martin v. Löwis399a6892002-10-04 10:22:02 +00007241fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007242
Guido van Rossum84e7b241996-08-19 21:59:00 +00007243# Add some code to confdefs.h so that the test for off_t works on SCO
7244cat >> confdefs.h <<\EOF
7245#if defined(SCO_DS)
7246#undef _OFF_T
7247#endif
7248EOF
7249
Guido van Rossumef2255b2000-03-10 22:30:29 +00007250# Type availability checks
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007251{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5
7252$as_echo_n "checking for mode_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007253if test "${ac_cv_type_mode_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007254 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007255else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007256 ac_cv_type_mode_t=no
7257cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00007258/* confdefs.h. */
7259_ACEOF
7260cat confdefs.h >>conftest.$ac_ext
7261cat >>conftest.$ac_ext <<_ACEOF
7262/* end confdefs.h. */
7263$ac_includes_default
7264int
7265main ()
7266{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007267if (sizeof (mode_t))
7268 return 0;
Antoine Pitrou20327222009-05-24 20:39:11 +00007269 ;
7270 return 0;
7271}
7272_ACEOF
7273rm -f conftest.$ac_objext
7274if { (ac_try="$ac_compile"
7275case "(($ac_try" in
7276 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7277 *) ac_try_echo=$ac_try;;
7278esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007279eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7280$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007281 (eval "$ac_compile") 2>conftest.er1
7282 ac_status=$?
7283 grep -v '^ *+' conftest.er1 >conftest.err
7284 rm -f conftest.er1
7285 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007286 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007287 (exit $ac_status); } && {
7288 test -z "$ac_c_werror_flag" ||
7289 test ! -s conftest.err
7290 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007291 cat >conftest.$ac_ext <<_ACEOF
7292/* confdefs.h. */
7293_ACEOF
7294cat confdefs.h >>conftest.$ac_ext
7295cat >>conftest.$ac_ext <<_ACEOF
7296/* end confdefs.h. */
7297$ac_includes_default
7298int
7299main ()
7300{
7301if (sizeof ((mode_t)))
7302 return 0;
7303 ;
7304 return 0;
7305}
7306_ACEOF
7307rm -f conftest.$ac_objext
7308if { (ac_try="$ac_compile"
7309case "(($ac_try" in
7310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7311 *) ac_try_echo=$ac_try;;
7312esac
7313eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7314$as_echo "$ac_try_echo") >&5
7315 (eval "$ac_compile") 2>conftest.er1
7316 ac_status=$?
7317 grep -v '^ *+' conftest.er1 >conftest.err
7318 rm -f conftest.er1
7319 cat conftest.err >&5
7320 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7321 (exit $ac_status); } && {
7322 test -z "$ac_c_werror_flag" ||
7323 test ! -s conftest.err
7324 } && test -s conftest.$ac_objext; then
7325 :
Jack Jansendd19cf82001-12-06 22:36:17 +00007326else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007327 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007328sed 's/^/| /' conftest.$ac_ext >&5
7329
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007330 ac_cv_type_mode_t=yes
7331fi
7332
7333rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7334else
7335 $as_echo "$as_me: failed program was:" >&5
7336sed 's/^/| /' conftest.$ac_ext >&5
7337
7338
Jack Jansendd19cf82001-12-06 22:36:17 +00007339fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007340
7341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007342fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007343{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
7344$as_echo "$ac_cv_type_mode_t" >&6; }
7345if test "x$ac_cv_type_mode_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007346 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007347else
Martin v. Löwis11437992002-04-12 09:54:03 +00007348
7349cat >>confdefs.h <<_ACEOF
7350#define mode_t int
7351_ACEOF
7352
7353fi
7354
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007355{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
7356$as_echo_n "checking for off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007357if test "${ac_cv_type_off_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007358 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007359else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007360 ac_cv_type_off_t=no
7361cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00007362/* confdefs.h. */
7363_ACEOF
7364cat confdefs.h >>conftest.$ac_ext
7365cat >>conftest.$ac_ext <<_ACEOF
7366/* end confdefs.h. */
7367$ac_includes_default
7368int
7369main ()
7370{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007371if (sizeof (off_t))
7372 return 0;
Antoine Pitrou20327222009-05-24 20:39:11 +00007373 ;
7374 return 0;
7375}
7376_ACEOF
7377rm -f conftest.$ac_objext
7378if { (ac_try="$ac_compile"
7379case "(($ac_try" in
7380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7381 *) ac_try_echo=$ac_try;;
7382esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007383eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7384$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007385 (eval "$ac_compile") 2>conftest.er1
7386 ac_status=$?
7387 grep -v '^ *+' conftest.er1 >conftest.err
7388 rm -f conftest.er1
7389 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007390 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007391 (exit $ac_status); } && {
7392 test -z "$ac_c_werror_flag" ||
7393 test ! -s conftest.err
7394 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007395 cat >conftest.$ac_ext <<_ACEOF
7396/* confdefs.h. */
7397_ACEOF
7398cat confdefs.h >>conftest.$ac_ext
7399cat >>conftest.$ac_ext <<_ACEOF
7400/* end confdefs.h. */
7401$ac_includes_default
7402int
7403main ()
7404{
7405if (sizeof ((off_t)))
7406 return 0;
7407 ;
7408 return 0;
7409}
7410_ACEOF
7411rm -f conftest.$ac_objext
7412if { (ac_try="$ac_compile"
7413case "(($ac_try" in
7414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7415 *) ac_try_echo=$ac_try;;
7416esac
7417eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7418$as_echo "$ac_try_echo") >&5
7419 (eval "$ac_compile") 2>conftest.er1
7420 ac_status=$?
7421 grep -v '^ *+' conftest.er1 >conftest.err
7422 rm -f conftest.er1
7423 cat conftest.err >&5
7424 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7425 (exit $ac_status); } && {
7426 test -z "$ac_c_werror_flag" ||
7427 test ! -s conftest.err
7428 } && test -s conftest.$ac_objext; then
7429 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007430else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007431 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007432sed 's/^/| /' conftest.$ac_ext >&5
7433
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007434 ac_cv_type_off_t=yes
7435fi
7436
7437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7438else
7439 $as_echo "$as_me: failed program was:" >&5
7440sed 's/^/| /' conftest.$ac_ext >&5
7441
7442
Guido van Rossum627b2d71993-12-24 10:39:16 +00007443fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007444
7445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007446fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007447{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7448$as_echo "$ac_cv_type_off_t" >&6; }
7449if test "x$ac_cv_type_off_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007450 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007451else
Martin v. Löwis11437992002-04-12 09:54:03 +00007452
7453cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007454#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007455_ACEOF
7456
7457fi
7458
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007459{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
7460$as_echo_n "checking for pid_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007461if test "${ac_cv_type_pid_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007462 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007463else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007464 ac_cv_type_pid_t=no
7465cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00007466/* confdefs.h. */
7467_ACEOF
7468cat confdefs.h >>conftest.$ac_ext
7469cat >>conftest.$ac_ext <<_ACEOF
7470/* end confdefs.h. */
7471$ac_includes_default
7472int
7473main ()
7474{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475if (sizeof (pid_t))
7476 return 0;
Antoine Pitrou20327222009-05-24 20:39:11 +00007477 ;
7478 return 0;
7479}
7480_ACEOF
7481rm -f conftest.$ac_objext
7482if { (ac_try="$ac_compile"
7483case "(($ac_try" in
7484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7485 *) ac_try_echo=$ac_try;;
7486esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007487eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7488$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007489 (eval "$ac_compile") 2>conftest.er1
7490 ac_status=$?
7491 grep -v '^ *+' conftest.er1 >conftest.err
7492 rm -f conftest.er1
7493 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007494 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007495 (exit $ac_status); } && {
7496 test -z "$ac_c_werror_flag" ||
7497 test ! -s conftest.err
7498 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007499 cat >conftest.$ac_ext <<_ACEOF
7500/* confdefs.h. */
7501_ACEOF
7502cat confdefs.h >>conftest.$ac_ext
7503cat >>conftest.$ac_ext <<_ACEOF
7504/* end confdefs.h. */
7505$ac_includes_default
7506int
7507main ()
7508{
7509if (sizeof ((pid_t)))
7510 return 0;
7511 ;
7512 return 0;
7513}
7514_ACEOF
7515rm -f conftest.$ac_objext
7516if { (ac_try="$ac_compile"
7517case "(($ac_try" in
7518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7519 *) ac_try_echo=$ac_try;;
7520esac
7521eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7522$as_echo "$ac_try_echo") >&5
7523 (eval "$ac_compile") 2>conftest.er1
7524 ac_status=$?
7525 grep -v '^ *+' conftest.er1 >conftest.err
7526 rm -f conftest.er1
7527 cat conftest.err >&5
7528 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7529 (exit $ac_status); } && {
7530 test -z "$ac_c_werror_flag" ||
7531 test ! -s conftest.err
7532 } && test -s conftest.$ac_objext; then
7533 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007534else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007535 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007536sed 's/^/| /' conftest.$ac_ext >&5
7537
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007538 ac_cv_type_pid_t=yes
7539fi
7540
7541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7542else
7543 $as_echo "$as_me: failed program was:" >&5
7544sed 's/^/| /' conftest.$ac_ext >&5
7545
7546
Guido van Rossum627b2d71993-12-24 10:39:16 +00007547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007548
7549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007550fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007551{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7552$as_echo "$ac_cv_type_pid_t" >&6; }
7553if test "x$ac_cv_type_pid_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007554 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007555else
Martin v. Löwis11437992002-04-12 09:54:03 +00007556
7557cat >>confdefs.h <<_ACEOF
7558#define pid_t int
7559_ACEOF
7560
7561fi
7562
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007563{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7564$as_echo_n "checking return type of signal handlers... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007565if test "${ac_cv_type_signal+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007566 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007567else
7568 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007569/* confdefs.h. */
7570_ACEOF
7571cat confdefs.h >>conftest.$ac_ext
7572cat >>conftest.$ac_ext <<_ACEOF
7573/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007574#include <sys/types.h>
7575#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007576
Martin v. Löwis11437992002-04-12 09:54:03 +00007577int
7578main ()
7579{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007580return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007581 ;
7582 return 0;
7583}
7584_ACEOF
7585rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007586if { (ac_try="$ac_compile"
7587case "(($ac_try" in
7588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7589 *) ac_try_echo=$ac_try;;
7590esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007591eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7592$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007593 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007594 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007595 grep -v '^ *+' conftest.er1 >conftest.err
7596 rm -f conftest.er1
7597 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007598 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007599 (exit $ac_status); } && {
7600 test -z "$ac_c_werror_flag" ||
7601 test ! -s conftest.err
7602 } && test -s conftest.$ac_objext; then
7603 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007604else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007605 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007606sed 's/^/| /' conftest.$ac_ext >&5
7607
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007610
7611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007612fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007613{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7614$as_echo "$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007615
Martin v. Löwis11437992002-04-12 09:54:03 +00007616cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007617#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007618_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007619
Michael W. Hudson54241132001-12-07 15:38:26 +00007620
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007621{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
7622$as_echo_n "checking for size_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007623if test "${ac_cv_type_size_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007624 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007625else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007626 ac_cv_type_size_t=no
7627cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00007628/* confdefs.h. */
7629_ACEOF
7630cat confdefs.h >>conftest.$ac_ext
7631cat >>conftest.$ac_ext <<_ACEOF
7632/* end confdefs.h. */
7633$ac_includes_default
7634int
7635main ()
7636{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637if (sizeof (size_t))
7638 return 0;
Antoine Pitrou20327222009-05-24 20:39:11 +00007639 ;
7640 return 0;
7641}
7642_ACEOF
7643rm -f conftest.$ac_objext
7644if { (ac_try="$ac_compile"
7645case "(($ac_try" in
7646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7647 *) ac_try_echo=$ac_try;;
7648esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007649eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7650$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007651 (eval "$ac_compile") 2>conftest.er1
7652 ac_status=$?
7653 grep -v '^ *+' conftest.er1 >conftest.err
7654 rm -f conftest.er1
7655 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007656 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00007657 (exit $ac_status); } && {
7658 test -z "$ac_c_werror_flag" ||
7659 test ! -s conftest.err
7660 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007661 cat >conftest.$ac_ext <<_ACEOF
7662/* confdefs.h. */
7663_ACEOF
7664cat confdefs.h >>conftest.$ac_ext
7665cat >>conftest.$ac_ext <<_ACEOF
7666/* end confdefs.h. */
7667$ac_includes_default
7668int
7669main ()
7670{
7671if (sizeof ((size_t)))
7672 return 0;
7673 ;
7674 return 0;
7675}
7676_ACEOF
7677rm -f conftest.$ac_objext
7678if { (ac_try="$ac_compile"
7679case "(($ac_try" in
7680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7681 *) ac_try_echo=$ac_try;;
7682esac
7683eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7684$as_echo "$ac_try_echo") >&5
7685 (eval "$ac_compile") 2>conftest.er1
7686 ac_status=$?
7687 grep -v '^ *+' conftest.er1 >conftest.err
7688 rm -f conftest.er1
7689 cat conftest.err >&5
7690 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7691 (exit $ac_status); } && {
7692 test -z "$ac_c_werror_flag" ||
7693 test ! -s conftest.err
7694 } && test -s conftest.$ac_objext; then
7695 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007696else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007697 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007698sed 's/^/| /' conftest.$ac_ext >&5
7699
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007700 ac_cv_type_size_t=yes
7701fi
7702
7703rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7704else
7705 $as_echo "$as_me: failed program was:" >&5
7706sed 's/^/| /' conftest.$ac_ext >&5
7707
7708
Guido van Rossum627b2d71993-12-24 10:39:16 +00007709fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007710
7711rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007712fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007713{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7714$as_echo "$ac_cv_type_size_t" >&6; }
7715if test "x$ac_cv_type_size_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007716 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007717else
Martin v. Löwis11437992002-04-12 09:54:03 +00007718
7719cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007720#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007721_ACEOF
7722
7723fi
7724
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007725{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7726$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007727if test "${ac_cv_type_uid_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007728 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007729else
7730 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007731/* confdefs.h. */
7732_ACEOF
7733cat confdefs.h >>conftest.$ac_ext
7734cat >>conftest.$ac_ext <<_ACEOF
7735/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007736#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007737
7738_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007739if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007740 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007741 ac_cv_type_uid_t=yes
7742else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007743 ac_cv_type_uid_t=no
7744fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00007745rm -f conftest*
7746
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007747fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007748{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7749$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007750if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007751
Martin v. Löwis11437992002-04-12 09:54:03 +00007752cat >>confdefs.h <<\_ACEOF
7753#define uid_t int
7754_ACEOF
7755
7756
7757cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007758#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007759_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007760
7761fi
7762
Mark Dickinsonbd792642009-03-18 20:06:12 +00007763
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007764 { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
7765$as_echo_n "checking for uint32_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007766if test "${ac_cv_c_uint32_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007767 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007768else
7769 ac_cv_c_uint32_t=no
7770 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7771 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7772 cat >conftest.$ac_ext <<_ACEOF
7773/* confdefs.h. */
7774_ACEOF
7775cat confdefs.h >>conftest.$ac_ext
7776cat >>conftest.$ac_ext <<_ACEOF
7777/* end confdefs.h. */
7778$ac_includes_default
7779int
7780main ()
7781{
7782static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7783test_array [0] = 0
7784
7785 ;
7786 return 0;
7787}
7788_ACEOF
7789rm -f conftest.$ac_objext
7790if { (ac_try="$ac_compile"
7791case "(($ac_try" in
7792 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7793 *) ac_try_echo=$ac_try;;
7794esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007795eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7796$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007797 (eval "$ac_compile") 2>conftest.er1
7798 ac_status=$?
7799 grep -v '^ *+' conftest.er1 >conftest.err
7800 rm -f conftest.er1
7801 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007802 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007803 (exit $ac_status); } && {
7804 test -z "$ac_c_werror_flag" ||
7805 test ! -s conftest.err
7806 } && test -s conftest.$ac_objext; then
7807 case $ac_type in
7808 uint32_t) ac_cv_c_uint32_t=yes ;;
7809 *) ac_cv_c_uint32_t=$ac_type ;;
7810esac
7811
7812else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007813 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007814sed 's/^/| /' conftest.$ac_ext >&5
7815
7816
7817fi
7818
7819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7820 test "$ac_cv_c_uint32_t" != no && break
7821 done
7822fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007823{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7824$as_echo "$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007825 case $ac_cv_c_uint32_t in #(
7826 no|yes) ;; #(
7827 *)
7828
7829cat >>confdefs.h <<\_ACEOF
7830#define _UINT32_T 1
7831_ACEOF
7832
7833
7834cat >>confdefs.h <<_ACEOF
7835#define uint32_t $ac_cv_c_uint32_t
7836_ACEOF
7837;;
7838 esac
7839
7840
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007841 { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5
7842$as_echo_n "checking for uint64_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007843if test "${ac_cv_c_uint64_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007844 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007845else
7846 ac_cv_c_uint64_t=no
7847 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7848 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7849 cat >conftest.$ac_ext <<_ACEOF
7850/* confdefs.h. */
7851_ACEOF
7852cat confdefs.h >>conftest.$ac_ext
7853cat >>conftest.$ac_ext <<_ACEOF
7854/* end confdefs.h. */
7855$ac_includes_default
7856int
7857main ()
7858{
7859static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7860test_array [0] = 0
7861
7862 ;
7863 return 0;
7864}
7865_ACEOF
7866rm -f conftest.$ac_objext
7867if { (ac_try="$ac_compile"
7868case "(($ac_try" in
7869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7870 *) ac_try_echo=$ac_try;;
7871esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007872eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7873$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007874 (eval "$ac_compile") 2>conftest.er1
7875 ac_status=$?
7876 grep -v '^ *+' conftest.er1 >conftest.err
7877 rm -f conftest.er1
7878 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007879 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007880 (exit $ac_status); } && {
7881 test -z "$ac_c_werror_flag" ||
7882 test ! -s conftest.err
7883 } && test -s conftest.$ac_objext; then
7884 case $ac_type in
7885 uint64_t) ac_cv_c_uint64_t=yes ;;
7886 *) ac_cv_c_uint64_t=$ac_type ;;
7887esac
7888
7889else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007890 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007891sed 's/^/| /' conftest.$ac_ext >&5
7892
7893
7894fi
7895
7896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7897 test "$ac_cv_c_uint64_t" != no && break
7898 done
7899fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007900{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7901$as_echo "$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007902 case $ac_cv_c_uint64_t in #(
7903 no|yes) ;; #(
7904 *)
7905
7906cat >>confdefs.h <<\_ACEOF
7907#define _UINT64_T 1
7908_ACEOF
7909
7910
7911cat >>confdefs.h <<_ACEOF
7912#define uint64_t $ac_cv_c_uint64_t
7913_ACEOF
7914;;
7915 esac
7916
7917
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007918 { $as_echo "$as_me:$LINENO: checking for int32_t" >&5
7919$as_echo_n "checking for int32_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007920if test "${ac_cv_c_int32_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007921 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007922else
7923 ac_cv_c_int32_t=no
7924 for ac_type in 'int32_t' 'int' 'long int' \
7925 'long long int' 'short int' 'signed char'; do
7926 cat >conftest.$ac_ext <<_ACEOF
7927/* confdefs.h. */
7928_ACEOF
7929cat confdefs.h >>conftest.$ac_ext
7930cat >>conftest.$ac_ext <<_ACEOF
7931/* end confdefs.h. */
7932$ac_includes_default
7933int
7934main ()
7935{
7936static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7937test_array [0] = 0
7938
7939 ;
7940 return 0;
7941}
7942_ACEOF
7943rm -f conftest.$ac_objext
7944if { (ac_try="$ac_compile"
7945case "(($ac_try" in
7946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7947 *) ac_try_echo=$ac_try;;
7948esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007949eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7950$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007951 (eval "$ac_compile") 2>conftest.er1
7952 ac_status=$?
7953 grep -v '^ *+' conftest.er1 >conftest.err
7954 rm -f conftest.er1
7955 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007956 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007957 (exit $ac_status); } && {
7958 test -z "$ac_c_werror_flag" ||
7959 test ! -s conftest.err
7960 } && test -s conftest.$ac_objext; then
7961 cat >conftest.$ac_ext <<_ACEOF
7962/* confdefs.h. */
7963_ACEOF
7964cat confdefs.h >>conftest.$ac_ext
7965cat >>conftest.$ac_ext <<_ACEOF
7966/* end confdefs.h. */
7967$ac_includes_default
7968int
7969main ()
7970{
7971static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007972 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007973test_array [0] = 0
7974
7975 ;
7976 return 0;
7977}
7978_ACEOF
7979rm -f conftest.$ac_objext
7980if { (ac_try="$ac_compile"
7981case "(($ac_try" in
7982 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7983 *) ac_try_echo=$ac_try;;
7984esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007985eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7986$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007987 (eval "$ac_compile") 2>conftest.er1
7988 ac_status=$?
7989 grep -v '^ *+' conftest.er1 >conftest.err
7990 rm -f conftest.er1
7991 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007992 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007993 (exit $ac_status); } && {
7994 test -z "$ac_c_werror_flag" ||
7995 test ! -s conftest.err
7996 } && test -s conftest.$ac_objext; then
7997 :
7998else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007999 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008000sed 's/^/| /' conftest.$ac_ext >&5
8001
8002 case $ac_type in
8003 int32_t) ac_cv_c_int32_t=yes ;;
8004 *) ac_cv_c_int32_t=$ac_type ;;
8005esac
8006
8007fi
8008
8009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8010else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008011 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008012sed 's/^/| /' conftest.$ac_ext >&5
8013
8014
8015fi
8016
8017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8018 test "$ac_cv_c_int32_t" != no && break
8019 done
8020fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008021{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
8022$as_echo "$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008023 case $ac_cv_c_int32_t in #(
8024 no|yes) ;; #(
8025 *)
8026
8027cat >>confdefs.h <<_ACEOF
8028#define int32_t $ac_cv_c_int32_t
8029_ACEOF
8030;;
8031 esac
8032
8033
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008034 { $as_echo "$as_me:$LINENO: checking for int64_t" >&5
8035$as_echo_n "checking for int64_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008036if test "${ac_cv_c_int64_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008037 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00008038else
8039 ac_cv_c_int64_t=no
8040 for ac_type in 'int64_t' 'int' 'long int' \
8041 'long long int' 'short int' 'signed char'; do
8042 cat >conftest.$ac_ext <<_ACEOF
8043/* confdefs.h. */
8044_ACEOF
8045cat confdefs.h >>conftest.$ac_ext
8046cat >>conftest.$ac_ext <<_ACEOF
8047/* end confdefs.h. */
8048$ac_includes_default
8049int
8050main ()
8051{
8052static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
8053test_array [0] = 0
8054
8055 ;
8056 return 0;
8057}
8058_ACEOF
8059rm -f conftest.$ac_objext
8060if { (ac_try="$ac_compile"
8061case "(($ac_try" in
8062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8063 *) ac_try_echo=$ac_try;;
8064esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008065eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8066$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008067 (eval "$ac_compile") 2>conftest.er1
8068 ac_status=$?
8069 grep -v '^ *+' conftest.er1 >conftest.err
8070 rm -f conftest.er1
8071 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008072 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008073 (exit $ac_status); } && {
8074 test -z "$ac_c_werror_flag" ||
8075 test ! -s conftest.err
8076 } && test -s conftest.$ac_objext; then
8077 cat >conftest.$ac_ext <<_ACEOF
8078/* confdefs.h. */
8079_ACEOF
8080cat confdefs.h >>conftest.$ac_ext
8081cat >>conftest.$ac_ext <<_ACEOF
8082/* end confdefs.h. */
8083$ac_includes_default
8084int
8085main ()
8086{
8087static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008088 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00008089test_array [0] = 0
8090
8091 ;
8092 return 0;
8093}
8094_ACEOF
8095rm -f conftest.$ac_objext
8096if { (ac_try="$ac_compile"
8097case "(($ac_try" in
8098 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8099 *) ac_try_echo=$ac_try;;
8100esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008101eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8102$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008103 (eval "$ac_compile") 2>conftest.er1
8104 ac_status=$?
8105 grep -v '^ *+' conftest.er1 >conftest.err
8106 rm -f conftest.er1
8107 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008108 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008109 (exit $ac_status); } && {
8110 test -z "$ac_c_werror_flag" ||
8111 test ! -s conftest.err
8112 } && test -s conftest.$ac_objext; then
8113 :
8114else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008115 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008116sed 's/^/| /' conftest.$ac_ext >&5
8117
8118 case $ac_type in
8119 int64_t) ac_cv_c_int64_t=yes ;;
8120 *) ac_cv_c_int64_t=$ac_type ;;
8121esac
8122
8123fi
8124
8125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8126else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008127 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008128sed 's/^/| /' conftest.$ac_ext >&5
8129
8130
8131fi
8132
8133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8134 test "$ac_cv_c_int64_t" != no && break
8135 done
8136fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008137{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
8138$as_echo "$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008139 case $ac_cv_c_int64_t in #(
8140 no|yes) ;; #(
8141 *)
8142
8143cat >>confdefs.h <<_ACEOF
8144#define int64_t $ac_cv_c_int64_t
8145_ACEOF
8146;;
8147 esac
8148
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008149{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
8150$as_echo_n "checking for ssize_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00008151if test "${ac_cv_type_ssize_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008152 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008153else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008154 ac_cv_type_ssize_t=no
8155cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00008156/* confdefs.h. */
8157_ACEOF
8158cat confdefs.h >>conftest.$ac_ext
8159cat >>conftest.$ac_ext <<_ACEOF
8160/* end confdefs.h. */
8161$ac_includes_default
8162int
8163main ()
8164{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008165if (sizeof (ssize_t))
8166 return 0;
Antoine Pitrou20327222009-05-24 20:39:11 +00008167 ;
8168 return 0;
8169}
8170_ACEOF
8171rm -f conftest.$ac_objext
8172if { (ac_try="$ac_compile"
8173case "(($ac_try" in
8174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8175 *) ac_try_echo=$ac_try;;
8176esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008177eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8178$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008179 (eval "$ac_compile") 2>conftest.er1
8180 ac_status=$?
8181 grep -v '^ *+' conftest.er1 >conftest.err
8182 rm -f conftest.er1
8183 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008184 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00008185 (exit $ac_status); } && {
8186 test -z "$ac_c_werror_flag" ||
8187 test ! -s conftest.err
8188 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008189 cat >conftest.$ac_ext <<_ACEOF
8190/* confdefs.h. */
8191_ACEOF
8192cat confdefs.h >>conftest.$ac_ext
8193cat >>conftest.$ac_ext <<_ACEOF
8194/* end confdefs.h. */
8195$ac_includes_default
8196int
8197main ()
8198{
8199if (sizeof ((ssize_t)))
8200 return 0;
8201 ;
8202 return 0;
8203}
8204_ACEOF
8205rm -f conftest.$ac_objext
8206if { (ac_try="$ac_compile"
8207case "(($ac_try" in
8208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8209 *) ac_try_echo=$ac_try;;
8210esac
8211eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8212$as_echo "$ac_try_echo") >&5
8213 (eval "$ac_compile") 2>conftest.er1
8214 ac_status=$?
8215 grep -v '^ *+' conftest.er1 >conftest.err
8216 rm -f conftest.er1
8217 cat conftest.err >&5
8218 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8219 (exit $ac_status); } && {
8220 test -z "$ac_c_werror_flag" ||
8221 test ! -s conftest.err
8222 } && test -s conftest.$ac_objext; then
8223 :
Martin v. Löwis18e16552006-02-15 17:27:45 +00008224else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008225 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00008226sed 's/^/| /' conftest.$ac_ext >&5
8227
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008228 ac_cv_type_ssize_t=yes
8229fi
8230
8231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8232else
8233 $as_echo "$as_me: failed program was:" >&5
8234sed 's/^/| /' conftest.$ac_ext >&5
8235
8236
Martin v. Löwis18e16552006-02-15 17:27:45 +00008237fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008238
8239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00008240fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008241{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
8242$as_echo "$ac_cv_type_ssize_t" >&6; }
8243if test "x$ac_cv_type_ssize_t" = x""yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00008244
8245cat >>confdefs.h <<\_ACEOF
8246#define HAVE_SSIZE_T 1
8247_ACEOF
8248
8249fi
8250
Jack Jansendd19cf82001-12-06 22:36:17 +00008251
Michael W. Hudson54241132001-12-07 15:38:26 +00008252# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008253# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008254# The cast to long int works around a bug in the HP C Compiler
8255# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8256# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8257# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008258{ $as_echo "$as_me:$LINENO: checking size of int" >&5
8259$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008260if test "${ac_cv_sizeof_int+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008261 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008262else
Martin v. Löwis11437992002-04-12 09:54:03 +00008263 if test "$cross_compiling" = yes; then
8264 # Depending upon the size, compute the lo and hi bounds.
8265cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008266/* confdefs.h. */
8267_ACEOF
8268cat confdefs.h >>conftest.$ac_ext
8269cat >>conftest.$ac_ext <<_ACEOF
8270/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008271$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008272int
8273main ()
8274{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008275static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008276test_array [0] = 0
8277
8278 ;
8279 return 0;
8280}
8281_ACEOF
8282rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008283if { (ac_try="$ac_compile"
8284case "(($ac_try" in
8285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8286 *) ac_try_echo=$ac_try;;
8287esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008288eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8289$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008290 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008291 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008292 grep -v '^ *+' conftest.er1 >conftest.err
8293 rm -f conftest.er1
8294 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008295 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008296 (exit $ac_status); } && {
8297 test -z "$ac_c_werror_flag" ||
8298 test ! -s conftest.err
8299 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 ac_lo=0 ac_mid=0
8301 while :; do
8302 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008303/* confdefs.h. */
8304_ACEOF
8305cat confdefs.h >>conftest.$ac_ext
8306cat >>conftest.$ac_ext <<_ACEOF
8307/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008308$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008309int
8310main ()
8311{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008312static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008313test_array [0] = 0
8314
8315 ;
8316 return 0;
8317}
8318_ACEOF
8319rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008320if { (ac_try="$ac_compile"
8321case "(($ac_try" in
8322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8323 *) ac_try_echo=$ac_try;;
8324esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008325eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8326$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008327 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008328 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008329 grep -v '^ *+' conftest.er1 >conftest.err
8330 rm -f conftest.er1
8331 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008332 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008333 (exit $ac_status); } && {
8334 test -z "$ac_c_werror_flag" ||
8335 test ! -s conftest.err
8336 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008337 ac_hi=$ac_mid; break
8338else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008339 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008340sed 's/^/| /' conftest.$ac_ext >&5
8341
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008342 ac_lo=`expr $ac_mid + 1`
8343 if test $ac_lo -le $ac_mid; then
8344 ac_lo= ac_hi=
8345 break
8346 fi
8347 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008349
8350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008351 done
8352else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008357/* confdefs.h. */
8358_ACEOF
8359cat confdefs.h >>conftest.$ac_ext
8360cat >>conftest.$ac_ext <<_ACEOF
8361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008362$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008363int
8364main ()
8365{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008366static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008367test_array [0] = 0
8368
8369 ;
8370 return 0;
8371}
8372_ACEOF
8373rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008374if { (ac_try="$ac_compile"
8375case "(($ac_try" in
8376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8377 *) ac_try_echo=$ac_try;;
8378esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008379eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8380$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008381 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008383 grep -v '^ *+' conftest.er1 >conftest.err
8384 rm -f conftest.er1
8385 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008386 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008387 (exit $ac_status); } && {
8388 test -z "$ac_c_werror_flag" ||
8389 test ! -s conftest.err
8390 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 ac_hi=-1 ac_mid=-1
8392 while :; do
8393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008394/* confdefs.h. */
8395_ACEOF
8396cat confdefs.h >>conftest.$ac_ext
8397cat >>conftest.$ac_ext <<_ACEOF
8398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008399$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008400int
8401main ()
8402{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008403static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008404test_array [0] = 0
8405
8406 ;
8407 return 0;
8408}
8409_ACEOF
8410rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008411if { (ac_try="$ac_compile"
8412case "(($ac_try" in
8413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8414 *) ac_try_echo=$ac_try;;
8415esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008416eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8417$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008420 grep -v '^ *+' conftest.er1 >conftest.err
8421 rm -f conftest.er1
8422 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008423 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008424 (exit $ac_status); } && {
8425 test -z "$ac_c_werror_flag" ||
8426 test ! -s conftest.err
8427 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 ac_lo=$ac_mid; break
8429else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008430 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008431sed 's/^/| /' conftest.$ac_ext >&5
8432
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433 ac_hi=`expr '(' $ac_mid ')' - 1`
8434 if test $ac_mid -le $ac_hi; then
8435 ac_lo= ac_hi=
8436 break
8437 fi
8438 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008440
8441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 done
8443else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008444 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008445sed 's/^/| /' conftest.$ac_ext >&5
8446
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008447 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449
8450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008452
8453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008454# Binary search between lo and hi bounds.
8455while test "x$ac_lo" != "x$ac_hi"; do
8456 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008458/* confdefs.h. */
8459_ACEOF
8460cat confdefs.h >>conftest.$ac_ext
8461cat >>conftest.$ac_ext <<_ACEOF
8462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008463$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008464int
8465main ()
8466{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008467static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008468test_array [0] = 0
8469
8470 ;
8471 return 0;
8472}
8473_ACEOF
8474rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008475if { (ac_try="$ac_compile"
8476case "(($ac_try" in
8477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8478 *) ac_try_echo=$ac_try;;
8479esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008480eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8481$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008482 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008484 grep -v '^ *+' conftest.er1 >conftest.err
8485 rm -f conftest.er1
8486 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008487 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008488 (exit $ac_status); } && {
8489 test -z "$ac_c_werror_flag" ||
8490 test ! -s conftest.err
8491 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008492 ac_hi=$ac_mid
8493else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008494 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008495sed 's/^/| /' conftest.$ac_ext >&5
8496
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008499
8500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008501done
8502case $ac_lo in
8503?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008504'') if test "$ac_cv_type_int" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008505 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8506$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8507{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008508See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008509$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008510See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008511 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008512 else
8513 ac_cv_sizeof_int=0
8514 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008515esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008516else
Martin v. Löwis11437992002-04-12 09:54:03 +00008517 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008518/* confdefs.h. */
8519_ACEOF
8520cat confdefs.h >>conftest.$ac_ext
8521cat >>conftest.$ac_ext <<_ACEOF
8522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008523$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008524static long int longval () { return (long int) (sizeof (int)); }
8525static unsigned long int ulongval () { return (long int) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008526#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008527#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008528int
8529main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008530{
Martin v. Löwis11437992002-04-12 09:54:03 +00008531
8532 FILE *f = fopen ("conftest.val", "w");
8533 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008534 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008535 if (((long int) (sizeof (int))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008536 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008537 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008538 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008539 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008540 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008541 }
8542 else
8543 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008544 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008545 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008547 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008548 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008549 /* Do not output a trailing newline, as this causes \r\n confusion
8550 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008552
8553 ;
8554 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008555}
Martin v. Löwis11437992002-04-12 09:54:03 +00008556_ACEOF
8557rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558if { (ac_try="$ac_link"
8559case "(($ac_try" in
8560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8561 *) ac_try_echo=$ac_try;;
8562esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008563eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8564$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008565 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008566 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008567 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008569 { (case "(($ac_try" in
8570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8571 *) ac_try_echo=$ac_try;;
8572esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008573eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8574$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008576 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008577 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008578 (exit $ac_status); }; }; then
8579 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008580else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008581 $as_echo "$as_me: program exited with status $ac_status" >&5
8582$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008583sed 's/^/| /' conftest.$ac_ext >&5
8584
Martin v. Löwis11437992002-04-12 09:54:03 +00008585( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008586if test "$ac_cv_type_int" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008587 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8588$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8589{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008590See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008591$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008592See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008593 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008594 else
8595 ac_cv_sizeof_int=0
8596 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008597fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008598rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008599rm -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 +00008600fi
8601rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008602fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008603{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8604$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008605
8606
8607
Martin v. Löwis11437992002-04-12 09:54:03 +00008608cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008609#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008610_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008611
8612
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613# The cast to long int works around a bug in the HP C Compiler
8614# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8615# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8616# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008617{ $as_echo "$as_me:$LINENO: checking size of long" >&5
8618$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008619if test "${ac_cv_sizeof_long+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008620 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008621else
Martin v. Löwis11437992002-04-12 09:54:03 +00008622 if test "$cross_compiling" = yes; then
8623 # Depending upon the size, compute the lo and hi bounds.
8624cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008625/* confdefs.h. */
8626_ACEOF
8627cat confdefs.h >>conftest.$ac_ext
8628cat >>conftest.$ac_ext <<_ACEOF
8629/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008630$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008631int
8632main ()
8633{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008634static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008635test_array [0] = 0
8636
8637 ;
8638 return 0;
8639}
8640_ACEOF
8641rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008642if { (ac_try="$ac_compile"
8643case "(($ac_try" in
8644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8645 *) ac_try_echo=$ac_try;;
8646esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008647eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8648$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008651 grep -v '^ *+' conftest.er1 >conftest.err
8652 rm -f conftest.er1
8653 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008655 (exit $ac_status); } && {
8656 test -z "$ac_c_werror_flag" ||
8657 test ! -s conftest.err
8658 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_lo=0 ac_mid=0
8660 while :; do
8661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008662/* confdefs.h. */
8663_ACEOF
8664cat confdefs.h >>conftest.$ac_ext
8665cat >>conftest.$ac_ext <<_ACEOF
8666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008667$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008668int
8669main ()
8670{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008671static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008672test_array [0] = 0
8673
8674 ;
8675 return 0;
8676}
8677_ACEOF
8678rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008679if { (ac_try="$ac_compile"
8680case "(($ac_try" in
8681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8682 *) ac_try_echo=$ac_try;;
8683esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008684eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8685$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008686 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008687 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008688 grep -v '^ *+' conftest.er1 >conftest.err
8689 rm -f conftest.er1
8690 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008691 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008692 (exit $ac_status); } && {
8693 test -z "$ac_c_werror_flag" ||
8694 test ! -s conftest.err
8695 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ac_hi=$ac_mid; break
8697else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008698 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008699sed 's/^/| /' conftest.$ac_ext >&5
8700
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701 ac_lo=`expr $ac_mid + 1`
8702 if test $ac_lo -le $ac_mid; then
8703 ac_lo= ac_hi=
8704 break
8705 fi
8706 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008707fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008708
8709rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008710 done
8711else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008716/* confdefs.h. */
8717_ACEOF
8718cat confdefs.h >>conftest.$ac_ext
8719cat >>conftest.$ac_ext <<_ACEOF
8720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008721$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008722int
8723main ()
8724{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008725static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008726test_array [0] = 0
8727
8728 ;
8729 return 0;
8730}
8731_ACEOF
8732rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008733if { (ac_try="$ac_compile"
8734case "(($ac_try" in
8735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8736 *) ac_try_echo=$ac_try;;
8737esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008738eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8739$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008742 grep -v '^ *+' conftest.er1 >conftest.err
8743 rm -f conftest.er1
8744 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008745 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008746 (exit $ac_status); } && {
8747 test -z "$ac_c_werror_flag" ||
8748 test ! -s conftest.err
8749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 ac_hi=-1 ac_mid=-1
8751 while :; do
8752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008753/* confdefs.h. */
8754_ACEOF
8755cat confdefs.h >>conftest.$ac_ext
8756cat >>conftest.$ac_ext <<_ACEOF
8757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008758$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008759int
8760main ()
8761{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008762static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008763test_array [0] = 0
8764
8765 ;
8766 return 0;
8767}
8768_ACEOF
8769rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008770if { (ac_try="$ac_compile"
8771case "(($ac_try" in
8772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8773 *) ac_try_echo=$ac_try;;
8774esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008775eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8776$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008779 grep -v '^ *+' conftest.er1 >conftest.err
8780 rm -f conftest.er1
8781 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008782 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008783 (exit $ac_status); } && {
8784 test -z "$ac_c_werror_flag" ||
8785 test ! -s conftest.err
8786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 ac_lo=$ac_mid; break
8788else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008789 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008790sed 's/^/| /' conftest.$ac_ext >&5
8791
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008792 ac_hi=`expr '(' $ac_mid ')' - 1`
8793 if test $ac_mid -le $ac_hi; then
8794 ac_lo= ac_hi=
8795 break
8796 fi
8797 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008798fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008799
8800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 done
8802else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008803 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008804sed 's/^/| /' conftest.$ac_ext >&5
8805
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008806 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808
8809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008810fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008811
8812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008813# Binary search between lo and hi bounds.
8814while test "x$ac_lo" != "x$ac_hi"; do
8815 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8816 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008817/* confdefs.h. */
8818_ACEOF
8819cat confdefs.h >>conftest.$ac_ext
8820cat >>conftest.$ac_ext <<_ACEOF
8821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008822$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008823int
8824main ()
8825{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008826static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008827test_array [0] = 0
8828
8829 ;
8830 return 0;
8831}
8832_ACEOF
8833rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008834if { (ac_try="$ac_compile"
8835case "(($ac_try" in
8836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8837 *) ac_try_echo=$ac_try;;
8838esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008839eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8840$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008841 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008843 grep -v '^ *+' conftest.er1 >conftest.err
8844 rm -f conftest.er1
8845 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008846 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008847 (exit $ac_status); } && {
8848 test -z "$ac_c_werror_flag" ||
8849 test ! -s conftest.err
8850 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ac_hi=$ac_mid
8852else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008853 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008854sed 's/^/| /' conftest.$ac_ext >&5
8855
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008857fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008858
8859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008860done
8861case $ac_lo in
8862?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008863'') if test "$ac_cv_type_long" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008864 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8865$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8866{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008867See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008868$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008869See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008870 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008871 else
8872 ac_cv_sizeof_long=0
8873 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008874esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008875else
Martin v. Löwis11437992002-04-12 09:54:03 +00008876 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008877/* confdefs.h. */
8878_ACEOF
8879cat confdefs.h >>conftest.$ac_ext
8880cat >>conftest.$ac_ext <<_ACEOF
8881/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008882$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008883static long int longval () { return (long int) (sizeof (long)); }
8884static unsigned long int ulongval () { return (long int) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008885#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008886#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008887int
8888main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008889{
Martin v. Löwis11437992002-04-12 09:54:03 +00008890
8891 FILE *f = fopen ("conftest.val", "w");
8892 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008893 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008894 if (((long int) (sizeof (long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008895 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008896 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008897 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008898 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008899 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008900 }
8901 else
8902 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008903 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008904 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008905 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008906 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008907 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008908 /* Do not output a trailing newline, as this causes \r\n confusion
8909 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008911
8912 ;
8913 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008914}
Martin v. Löwis11437992002-04-12 09:54:03 +00008915_ACEOF
8916rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917if { (ac_try="$ac_link"
8918case "(($ac_try" in
8919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8920 *) ac_try_echo=$ac_try;;
8921esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008922eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8923$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008924 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008925 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008926 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008928 { (case "(($ac_try" in
8929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8930 *) ac_try_echo=$ac_try;;
8931esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008932eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8933$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008934 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008935 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008936 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008937 (exit $ac_status); }; }; then
8938 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008939else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008940 $as_echo "$as_me: program exited with status $ac_status" >&5
8941$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008942sed 's/^/| /' conftest.$ac_ext >&5
8943
Martin v. Löwis11437992002-04-12 09:54:03 +00008944( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008945if test "$ac_cv_type_long" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008946 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8947$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8948{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008949See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008950$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008951See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008952 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008953 else
8954 ac_cv_sizeof_long=0
8955 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008956fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008957rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008958rm -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 +00008959fi
8960rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008961fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008962{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8963$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008964
8965
8966
Martin v. Löwis11437992002-04-12 09:54:03 +00008967cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008968#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008969_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008970
8971
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972# The cast to long int works around a bug in the HP C Compiler
8973# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8974# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8975# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008976{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
8977$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008978if test "${ac_cv_sizeof_void_p+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008979 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008980else
Martin v. Löwis11437992002-04-12 09:54:03 +00008981 if test "$cross_compiling" = yes; then
8982 # Depending upon the size, compute the lo and hi bounds.
8983cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008984/* confdefs.h. */
8985_ACEOF
8986cat confdefs.h >>conftest.$ac_ext
8987cat >>conftest.$ac_ext <<_ACEOF
8988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008989$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008990int
8991main ()
8992{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008993static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008994test_array [0] = 0
8995
8996 ;
8997 return 0;
8998}
8999_ACEOF
9000rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009001if { (ac_try="$ac_compile"
9002case "(($ac_try" in
9003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9004 *) ac_try_echo=$ac_try;;
9005esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009006eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9007$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009010 grep -v '^ *+' conftest.er1 >conftest.err
9011 rm -f conftest.er1
9012 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009013 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009014 (exit $ac_status); } && {
9015 test -z "$ac_c_werror_flag" ||
9016 test ! -s conftest.err
9017 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009018 ac_lo=0 ac_mid=0
9019 while :; do
9020 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009021/* confdefs.h. */
9022_ACEOF
9023cat confdefs.h >>conftest.$ac_ext
9024cat >>conftest.$ac_ext <<_ACEOF
9025/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009026$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009027int
9028main ()
9029{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009030static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009031test_array [0] = 0
9032
9033 ;
9034 return 0;
9035}
9036_ACEOF
9037rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009038if { (ac_try="$ac_compile"
9039case "(($ac_try" in
9040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9041 *) ac_try_echo=$ac_try;;
9042esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009043eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9044$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009047 grep -v '^ *+' conftest.er1 >conftest.err
9048 rm -f conftest.er1
9049 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009050 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009051 (exit $ac_status); } && {
9052 test -z "$ac_c_werror_flag" ||
9053 test ! -s conftest.err
9054 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009055 ac_hi=$ac_mid; break
9056else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009057 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009058sed 's/^/| /' conftest.$ac_ext >&5
9059
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009060 ac_lo=`expr $ac_mid + 1`
9061 if test $ac_lo -le $ac_mid; then
9062 ac_lo= ac_hi=
9063 break
9064 fi
9065 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009066fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009067
9068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009069 done
9070else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009075/* confdefs.h. */
9076_ACEOF
9077cat confdefs.h >>conftest.$ac_ext
9078cat >>conftest.$ac_ext <<_ACEOF
9079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009080$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009081int
9082main ()
9083{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009084static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009085test_array [0] = 0
9086
9087 ;
9088 return 0;
9089}
9090_ACEOF
9091rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009092if { (ac_try="$ac_compile"
9093case "(($ac_try" in
9094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9095 *) ac_try_echo=$ac_try;;
9096esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009097eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9098$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009101 grep -v '^ *+' conftest.er1 >conftest.err
9102 rm -f conftest.er1
9103 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009104 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009105 (exit $ac_status); } && {
9106 test -z "$ac_c_werror_flag" ||
9107 test ! -s conftest.err
9108 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009109 ac_hi=-1 ac_mid=-1
9110 while :; do
9111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009112/* confdefs.h. */
9113_ACEOF
9114cat confdefs.h >>conftest.$ac_ext
9115cat >>conftest.$ac_ext <<_ACEOF
9116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009117$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009118int
9119main ()
9120{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009121static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009122test_array [0] = 0
9123
9124 ;
9125 return 0;
9126}
9127_ACEOF
9128rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009129if { (ac_try="$ac_compile"
9130case "(($ac_try" in
9131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9132 *) ac_try_echo=$ac_try;;
9133esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009134eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9135$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009138 grep -v '^ *+' conftest.er1 >conftest.err
9139 rm -f conftest.er1
9140 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009141 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009142 (exit $ac_status); } && {
9143 test -z "$ac_c_werror_flag" ||
9144 test ! -s conftest.err
9145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 ac_lo=$ac_mid; break
9147else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009148 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009149sed 's/^/| /' conftest.$ac_ext >&5
9150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009151 ac_hi=`expr '(' $ac_mid ')' - 1`
9152 if test $ac_mid -le $ac_hi; then
9153 ac_lo= ac_hi=
9154 break
9155 fi
9156 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009157fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009158
9159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 done
9161else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009162 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009163sed 's/^/| /' conftest.$ac_ext >&5
9164
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009165 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167
9168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009169fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009170
9171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009172# Binary search between lo and hi bounds.
9173while test "x$ac_lo" != "x$ac_hi"; do
9174 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009176/* confdefs.h. */
9177_ACEOF
9178cat confdefs.h >>conftest.$ac_ext
9179cat >>conftest.$ac_ext <<_ACEOF
9180/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009181$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009182int
9183main ()
9184{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009185static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009186test_array [0] = 0
9187
9188 ;
9189 return 0;
9190}
9191_ACEOF
9192rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009193if { (ac_try="$ac_compile"
9194case "(($ac_try" in
9195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9196 *) ac_try_echo=$ac_try;;
9197esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009198eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9199$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009200 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009202 grep -v '^ *+' conftest.er1 >conftest.err
9203 rm -f conftest.er1
9204 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009205 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009206 (exit $ac_status); } && {
9207 test -z "$ac_c_werror_flag" ||
9208 test ! -s conftest.err
9209 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 ac_hi=$ac_mid
9211else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009212 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009213sed 's/^/| /' conftest.$ac_ext >&5
9214
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009217
9218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009219done
9220case $ac_lo in
9221?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009222'') if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009223 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9224$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9225{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009226See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009227$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009228See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009229 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009230 else
9231 ac_cv_sizeof_void_p=0
9232 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009233esac
Guido van Rossumad678af1998-10-02 14:42:15 +00009234else
Martin v. Löwis11437992002-04-12 09:54:03 +00009235 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009236/* confdefs.h. */
9237_ACEOF
9238cat confdefs.h >>conftest.$ac_ext
9239cat >>conftest.$ac_ext <<_ACEOF
9240/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009241$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009242static long int longval () { return (long int) (sizeof (void *)); }
9243static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009244#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009245#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009246int
9247main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00009248{
Martin v. Löwis11437992002-04-12 09:54:03 +00009249
9250 FILE *f = fopen ("conftest.val", "w");
9251 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009252 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009253 if (((long int) (sizeof (void *))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009254 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009255 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009256 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009257 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009258 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009259 }
9260 else
9261 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009262 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009263 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009265 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009266 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009267 /* Do not output a trailing newline, as this causes \r\n confusion
9268 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009269 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009270
9271 ;
9272 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00009273}
Martin v. Löwis11437992002-04-12 09:54:03 +00009274_ACEOF
9275rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009276if { (ac_try="$ac_link"
9277case "(($ac_try" in
9278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9279 *) ac_try_echo=$ac_try;;
9280esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009281eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9282$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009283 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009284 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009285 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009286 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009287 { (case "(($ac_try" in
9288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9289 *) ac_try_echo=$ac_try;;
9290esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009291eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9292$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009294 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009295 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009296 (exit $ac_status); }; }; then
9297 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00009298else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009299 $as_echo "$as_me: program exited with status $ac_status" >&5
9300$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009301sed 's/^/| /' conftest.$ac_ext >&5
9302
Martin v. Löwis11437992002-04-12 09:54:03 +00009303( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009304if test "$ac_cv_type_void_p" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009305 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9306$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9307{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009308See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009309$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009310See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009311 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009312 else
9313 ac_cv_sizeof_void_p=0
9314 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009315fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009316rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009317rm -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 +00009318fi
9319rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00009320fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009321{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
9322$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009323
9324
9325
Martin v. Löwis11437992002-04-12 09:54:03 +00009326cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009327#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00009328_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009329
9330
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331# The cast to long int works around a bug in the HP C Compiler
9332# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9333# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9334# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009335{ $as_echo "$as_me:$LINENO: checking size of short" >&5
9336$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009337if test "${ac_cv_sizeof_short+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009338 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009339else
Martin v. Löwis11437992002-04-12 09:54:03 +00009340 if test "$cross_compiling" = yes; then
9341 # Depending upon the size, compute the lo and hi bounds.
9342cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009343/* confdefs.h. */
9344_ACEOF
9345cat confdefs.h >>conftest.$ac_ext
9346cat >>conftest.$ac_ext <<_ACEOF
9347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009348$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009349int
9350main ()
9351{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009352static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009353test_array [0] = 0
9354
9355 ;
9356 return 0;
9357}
9358_ACEOF
9359rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009360if { (ac_try="$ac_compile"
9361case "(($ac_try" in
9362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9363 *) ac_try_echo=$ac_try;;
9364esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009365eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9366$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009369 grep -v '^ *+' conftest.er1 >conftest.err
9370 rm -f conftest.er1
9371 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009372 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009373 (exit $ac_status); } && {
9374 test -z "$ac_c_werror_flag" ||
9375 test ! -s conftest.err
9376 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 ac_lo=0 ac_mid=0
9378 while :; do
9379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009380/* confdefs.h. */
9381_ACEOF
9382cat confdefs.h >>conftest.$ac_ext
9383cat >>conftest.$ac_ext <<_ACEOF
9384/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009385$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009386int
9387main ()
9388{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009389static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009390test_array [0] = 0
9391
9392 ;
9393 return 0;
9394}
9395_ACEOF
9396rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009397if { (ac_try="$ac_compile"
9398case "(($ac_try" in
9399 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9400 *) ac_try_echo=$ac_try;;
9401esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009402eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9403$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009404 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009405 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009406 grep -v '^ *+' conftest.er1 >conftest.err
9407 rm -f conftest.er1
9408 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009409 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009410 (exit $ac_status); } && {
9411 test -z "$ac_c_werror_flag" ||
9412 test ! -s conftest.err
9413 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 ac_hi=$ac_mid; break
9415else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009416 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009417sed 's/^/| /' conftest.$ac_ext >&5
9418
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419 ac_lo=`expr $ac_mid + 1`
9420 if test $ac_lo -le $ac_mid; then
9421 ac_lo= ac_hi=
9422 break
9423 fi
9424 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009426
9427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009428 done
9429else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009434/* confdefs.h. */
9435_ACEOF
9436cat confdefs.h >>conftest.$ac_ext
9437cat >>conftest.$ac_ext <<_ACEOF
9438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009439$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009440int
9441main ()
9442{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009443static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009444test_array [0] = 0
9445
9446 ;
9447 return 0;
9448}
9449_ACEOF
9450rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009451if { (ac_try="$ac_compile"
9452case "(($ac_try" in
9453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9454 *) ac_try_echo=$ac_try;;
9455esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009456eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9457$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009460 grep -v '^ *+' conftest.er1 >conftest.err
9461 rm -f conftest.er1
9462 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009463 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009464 (exit $ac_status); } && {
9465 test -z "$ac_c_werror_flag" ||
9466 test ! -s conftest.err
9467 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_hi=-1 ac_mid=-1
9469 while :; do
9470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009471/* confdefs.h. */
9472_ACEOF
9473cat confdefs.h >>conftest.$ac_ext
9474cat >>conftest.$ac_ext <<_ACEOF
9475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009476$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009477int
9478main ()
9479{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009480static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009481test_array [0] = 0
9482
9483 ;
9484 return 0;
9485}
9486_ACEOF
9487rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009488if { (ac_try="$ac_compile"
9489case "(($ac_try" in
9490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9491 *) ac_try_echo=$ac_try;;
9492esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009493eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9494$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009497 grep -v '^ *+' conftest.er1 >conftest.err
9498 rm -f conftest.er1
9499 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009500 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009501 (exit $ac_status); } && {
9502 test -z "$ac_c_werror_flag" ||
9503 test ! -s conftest.err
9504 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 ac_lo=$ac_mid; break
9506else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009507 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009508sed 's/^/| /' conftest.$ac_ext >&5
9509
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510 ac_hi=`expr '(' $ac_mid ')' - 1`
9511 if test $ac_mid -le $ac_hi; then
9512 ac_lo= ac_hi=
9513 break
9514 fi
9515 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009517
9518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 done
9520else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009521 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009522sed 's/^/| /' conftest.$ac_ext >&5
9523
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009524 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526
9527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009528fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009529
9530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009531# Binary search between lo and hi bounds.
9532while test "x$ac_lo" != "x$ac_hi"; do
9533 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9534 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009535/* confdefs.h. */
9536_ACEOF
9537cat confdefs.h >>conftest.$ac_ext
9538cat >>conftest.$ac_ext <<_ACEOF
9539/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009540$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009541int
9542main ()
9543{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009544static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009545test_array [0] = 0
9546
9547 ;
9548 return 0;
9549}
9550_ACEOF
9551rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009552if { (ac_try="$ac_compile"
9553case "(($ac_try" in
9554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9555 *) ac_try_echo=$ac_try;;
9556esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009557eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9558$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009559 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009560 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009561 grep -v '^ *+' conftest.er1 >conftest.err
9562 rm -f conftest.er1
9563 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009564 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009565 (exit $ac_status); } && {
9566 test -z "$ac_c_werror_flag" ||
9567 test ! -s conftest.err
9568 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_hi=$ac_mid
9570else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009571 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009572sed 's/^/| /' conftest.$ac_ext >&5
9573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009576
9577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009578done
9579case $ac_lo in
9580?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009581'') if test "$ac_cv_type_short" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009582 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9583$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9584{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009585See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009586$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009587See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009588 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009589 else
9590 ac_cv_sizeof_short=0
9591 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009592esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009593else
Martin v. Löwis11437992002-04-12 09:54:03 +00009594 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009595/* confdefs.h. */
9596_ACEOF
9597cat confdefs.h >>conftest.$ac_ext
9598cat >>conftest.$ac_ext <<_ACEOF
9599/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009600$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009601static long int longval () { return (long int) (sizeof (short)); }
9602static unsigned long int ulongval () { return (long int) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009603#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009604#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009605int
9606main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009607{
Martin v. Löwis11437992002-04-12 09:54:03 +00009608
9609 FILE *f = fopen ("conftest.val", "w");
9610 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009611 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009612 if (((long int) (sizeof (short))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009613 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009614 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009615 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009616 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009617 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009618 }
9619 else
9620 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009621 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009622 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009623 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009624 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009625 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009626 /* Do not output a trailing newline, as this causes \r\n confusion
9627 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009629
9630 ;
9631 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009632}
Martin v. Löwis11437992002-04-12 09:54:03 +00009633_ACEOF
9634rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009635if { (ac_try="$ac_link"
9636case "(($ac_try" in
9637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9638 *) ac_try_echo=$ac_try;;
9639esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009640eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9641$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009642 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009643 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009644 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009646 { (case "(($ac_try" in
9647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9648 *) ac_try_echo=$ac_try;;
9649esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009650eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9651$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009653 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009655 (exit $ac_status); }; }; then
9656 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009657else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009658 $as_echo "$as_me: program exited with status $ac_status" >&5
9659$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009660sed 's/^/| /' conftest.$ac_ext >&5
9661
Martin v. Löwis11437992002-04-12 09:54:03 +00009662( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009663if test "$ac_cv_type_short" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009664 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9665$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9666{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009667See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009668$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009669See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009670 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009671 else
9672 ac_cv_sizeof_short=0
9673 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009674fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009675rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009676rm -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 +00009677fi
9678rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009679fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009680{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9681$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009682
9683
9684
Martin v. Löwis11437992002-04-12 09:54:03 +00009685cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009686#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009687_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009688
9689
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690# The cast to long int works around a bug in the HP C Compiler
9691# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9692# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9693# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009694{ $as_echo "$as_me:$LINENO: checking size of float" >&5
9695$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009696if test "${ac_cv_sizeof_float+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009697 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009698else
Martin v. Löwis11437992002-04-12 09:54:03 +00009699 if test "$cross_compiling" = yes; then
9700 # Depending upon the size, compute the lo and hi bounds.
9701cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009702/* confdefs.h. */
9703_ACEOF
9704cat confdefs.h >>conftest.$ac_ext
9705cat >>conftest.$ac_ext <<_ACEOF
9706/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009707$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009708int
9709main ()
9710{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009711static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009712test_array [0] = 0
9713
9714 ;
9715 return 0;
9716}
9717_ACEOF
9718rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009719if { (ac_try="$ac_compile"
9720case "(($ac_try" in
9721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9722 *) ac_try_echo=$ac_try;;
9723esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009724eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9725$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009726 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009727 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009728 grep -v '^ *+' conftest.er1 >conftest.err
9729 rm -f conftest.er1
9730 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009731 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009732 (exit $ac_status); } && {
9733 test -z "$ac_c_werror_flag" ||
9734 test ! -s conftest.err
9735 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 ac_lo=0 ac_mid=0
9737 while :; do
9738 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009739/* confdefs.h. */
9740_ACEOF
9741cat confdefs.h >>conftest.$ac_ext
9742cat >>conftest.$ac_ext <<_ACEOF
9743/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009744$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009745int
9746main ()
9747{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009748static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009749test_array [0] = 0
9750
9751 ;
9752 return 0;
9753}
9754_ACEOF
9755rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009756if { (ac_try="$ac_compile"
9757case "(($ac_try" in
9758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9759 *) ac_try_echo=$ac_try;;
9760esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009761eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9762$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009765 grep -v '^ *+' conftest.er1 >conftest.err
9766 rm -f conftest.er1
9767 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009768 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009769 (exit $ac_status); } && {
9770 test -z "$ac_c_werror_flag" ||
9771 test ! -s conftest.err
9772 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009773 ac_hi=$ac_mid; break
9774else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009775 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009776sed 's/^/| /' conftest.$ac_ext >&5
9777
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009778 ac_lo=`expr $ac_mid + 1`
9779 if test $ac_lo -le $ac_mid; then
9780 ac_lo= ac_hi=
9781 break
9782 fi
9783 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009784fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009785
9786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009787 done
9788else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009793/* confdefs.h. */
9794_ACEOF
9795cat confdefs.h >>conftest.$ac_ext
9796cat >>conftest.$ac_ext <<_ACEOF
9797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009798$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009799int
9800main ()
9801{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009802static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009803test_array [0] = 0
9804
9805 ;
9806 return 0;
9807}
9808_ACEOF
9809rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009810if { (ac_try="$ac_compile"
9811case "(($ac_try" in
9812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9813 *) ac_try_echo=$ac_try;;
9814esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009815eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9816$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009817 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009819 grep -v '^ *+' conftest.er1 >conftest.err
9820 rm -f conftest.er1
9821 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009822 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009823 (exit $ac_status); } && {
9824 test -z "$ac_c_werror_flag" ||
9825 test ! -s conftest.err
9826 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 ac_hi=-1 ac_mid=-1
9828 while :; do
9829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009830/* confdefs.h. */
9831_ACEOF
9832cat confdefs.h >>conftest.$ac_ext
9833cat >>conftest.$ac_ext <<_ACEOF
9834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009835$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009836int
9837main ()
9838{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009839static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009840test_array [0] = 0
9841
9842 ;
9843 return 0;
9844}
9845_ACEOF
9846rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009847if { (ac_try="$ac_compile"
9848case "(($ac_try" in
9849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9850 *) ac_try_echo=$ac_try;;
9851esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009852eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9853$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009856 grep -v '^ *+' conftest.er1 >conftest.err
9857 rm -f conftest.er1
9858 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009859 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009860 (exit $ac_status); } && {
9861 test -z "$ac_c_werror_flag" ||
9862 test ! -s conftest.err
9863 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 ac_lo=$ac_mid; break
9865else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009866 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009867sed 's/^/| /' conftest.$ac_ext >&5
9868
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869 ac_hi=`expr '(' $ac_mid ')' - 1`
9870 if test $ac_mid -le $ac_hi; then
9871 ac_lo= ac_hi=
9872 break
9873 fi
9874 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009875fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009876
9877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 done
9879else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009880 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009881sed 's/^/| /' conftest.$ac_ext >&5
9882
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009883 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885
9886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009887fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009888
9889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009890# Binary search between lo and hi bounds.
9891while test "x$ac_lo" != "x$ac_hi"; do
9892 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009894/* confdefs.h. */
9895_ACEOF
9896cat confdefs.h >>conftest.$ac_ext
9897cat >>conftest.$ac_ext <<_ACEOF
9898/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009899$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009900int
9901main ()
9902{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009903static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009904test_array [0] = 0
9905
9906 ;
9907 return 0;
9908}
9909_ACEOF
9910rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009911if { (ac_try="$ac_compile"
9912case "(($ac_try" in
9913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9914 *) ac_try_echo=$ac_try;;
9915esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009916eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9917$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009919 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009920 grep -v '^ *+' conftest.er1 >conftest.err
9921 rm -f conftest.er1
9922 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009923 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009924 (exit $ac_status); } && {
9925 test -z "$ac_c_werror_flag" ||
9926 test ! -s conftest.err
9927 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009928 ac_hi=$ac_mid
9929else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009930 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009931sed 's/^/| /' conftest.$ac_ext >&5
9932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009933 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009935
9936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009937done
9938case $ac_lo in
9939?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009940'') if test "$ac_cv_type_float" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009941 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9942$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9943{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009944See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009945$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009946See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009947 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009948 else
9949 ac_cv_sizeof_float=0
9950 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009951esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009952else
Martin v. Löwis11437992002-04-12 09:54:03 +00009953 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009954/* confdefs.h. */
9955_ACEOF
9956cat confdefs.h >>conftest.$ac_ext
9957cat >>conftest.$ac_ext <<_ACEOF
9958/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009959$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009960static long int longval () { return (long int) (sizeof (float)); }
9961static unsigned long int ulongval () { return (long int) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009962#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009963#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009964int
9965main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009966{
Martin v. Löwis11437992002-04-12 09:54:03 +00009967
9968 FILE *f = fopen ("conftest.val", "w");
9969 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009970 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009971 if (((long int) (sizeof (float))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009972 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009973 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009974 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009975 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009976 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009977 }
9978 else
9979 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009980 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009981 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009982 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009983 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009984 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009985 /* Do not output a trailing newline, as this causes \r\n confusion
9986 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009987 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009988
9989 ;
9990 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009991}
Martin v. Löwis11437992002-04-12 09:54:03 +00009992_ACEOF
9993rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009994if { (ac_try="$ac_link"
9995case "(($ac_try" in
9996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9997 *) ac_try_echo=$ac_try;;
9998esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00009999eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10000$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010001 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010002 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010003 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010005 { (case "(($ac_try" in
10006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10007 *) ac_try_echo=$ac_try;;
10008esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010009eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10010$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010011 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010012 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010013 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010014 (exit $ac_status); }; }; then
10015 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010016else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010017 $as_echo "$as_me: program exited with status $ac_status" >&5
10018$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010019sed 's/^/| /' conftest.$ac_ext >&5
10020
Martin v. Löwis11437992002-04-12 09:54:03 +000010021( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010022if test "$ac_cv_type_float" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010023 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10025{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010026See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010027$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010028See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010029 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010030 else
10031 ac_cv_sizeof_float=0
10032 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010033fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010034rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010035rm -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 +000010036fi
10037rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010038fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010039{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
10040$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010041
10042
10043
Martin v. Löwis11437992002-04-12 09:54:03 +000010044cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010045#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +000010046_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010047
10048
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010049# The cast to long int works around a bug in the HP C Compiler
10050# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10051# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10052# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010053{ $as_echo "$as_me:$LINENO: checking size of double" >&5
10054$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010055if test "${ac_cv_sizeof_double+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010056 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010057else
Martin v. Löwis11437992002-04-12 09:54:03 +000010058 if test "$cross_compiling" = yes; then
10059 # Depending upon the size, compute the lo and hi bounds.
10060cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010061/* confdefs.h. */
10062_ACEOF
10063cat confdefs.h >>conftest.$ac_ext
10064cat >>conftest.$ac_ext <<_ACEOF
10065/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010066$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010067int
10068main ()
10069{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010070static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010071test_array [0] = 0
10072
10073 ;
10074 return 0;
10075}
10076_ACEOF
10077rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010078if { (ac_try="$ac_compile"
10079case "(($ac_try" in
10080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10081 *) ac_try_echo=$ac_try;;
10082esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010083eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10084$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010087 grep -v '^ *+' conftest.er1 >conftest.err
10088 rm -f conftest.er1
10089 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010090 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010091 (exit $ac_status); } && {
10092 test -z "$ac_c_werror_flag" ||
10093 test ! -s conftest.err
10094 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ac_lo=0 ac_mid=0
10096 while :; do
10097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010098/* confdefs.h. */
10099_ACEOF
10100cat confdefs.h >>conftest.$ac_ext
10101cat >>conftest.$ac_ext <<_ACEOF
10102/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010103$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010104int
10105main ()
10106{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010107static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010108test_array [0] = 0
10109
10110 ;
10111 return 0;
10112}
10113_ACEOF
10114rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010115if { (ac_try="$ac_compile"
10116case "(($ac_try" in
10117 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10118 *) ac_try_echo=$ac_try;;
10119esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010120eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10121$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010122 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010123 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010124 grep -v '^ *+' conftest.er1 >conftest.err
10125 rm -f conftest.er1
10126 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010127 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010128 (exit $ac_status); } && {
10129 test -z "$ac_c_werror_flag" ||
10130 test ! -s conftest.err
10131 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 ac_hi=$ac_mid; break
10133else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010134 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010135sed 's/^/| /' conftest.$ac_ext >&5
10136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010137 ac_lo=`expr $ac_mid + 1`
10138 if test $ac_lo -le $ac_mid; then
10139 ac_lo= ac_hi=
10140 break
10141 fi
10142 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010144
10145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010146 done
10147else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010152/* confdefs.h. */
10153_ACEOF
10154cat confdefs.h >>conftest.$ac_ext
10155cat >>conftest.$ac_ext <<_ACEOF
10156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010157$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010158int
10159main ()
10160{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010161static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010162test_array [0] = 0
10163
10164 ;
10165 return 0;
10166}
10167_ACEOF
10168rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010169if { (ac_try="$ac_compile"
10170case "(($ac_try" in
10171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10172 *) ac_try_echo=$ac_try;;
10173esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010174eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10175$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010178 grep -v '^ *+' conftest.er1 >conftest.err
10179 rm -f conftest.er1
10180 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010181 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010182 (exit $ac_status); } && {
10183 test -z "$ac_c_werror_flag" ||
10184 test ! -s conftest.err
10185 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_hi=-1 ac_mid=-1
10187 while :; do
10188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010189/* confdefs.h. */
10190_ACEOF
10191cat confdefs.h >>conftest.$ac_ext
10192cat >>conftest.$ac_ext <<_ACEOF
10193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010194$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010195int
10196main ()
10197{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010198static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010199test_array [0] = 0
10200
10201 ;
10202 return 0;
10203}
10204_ACEOF
10205rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010206if { (ac_try="$ac_compile"
10207case "(($ac_try" in
10208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10209 *) ac_try_echo=$ac_try;;
10210esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010211eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10212$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010213 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010215 grep -v '^ *+' conftest.er1 >conftest.err
10216 rm -f conftest.er1
10217 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010218 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010219 (exit $ac_status); } && {
10220 test -z "$ac_c_werror_flag" ||
10221 test ! -s conftest.err
10222 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 ac_lo=$ac_mid; break
10224else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010225 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010226sed 's/^/| /' conftest.$ac_ext >&5
10227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228 ac_hi=`expr '(' $ac_mid ')' - 1`
10229 if test $ac_mid -le $ac_hi; then
10230 ac_lo= ac_hi=
10231 break
10232 fi
10233 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010235
10236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 done
10238else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010239 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010240sed 's/^/| /' conftest.$ac_ext >&5
10241
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010242 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010244
10245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010247
10248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010249# Binary search between lo and hi bounds.
10250while test "x$ac_lo" != "x$ac_hi"; do
10251 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10252 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010253/* confdefs.h. */
10254_ACEOF
10255cat confdefs.h >>conftest.$ac_ext
10256cat >>conftest.$ac_ext <<_ACEOF
10257/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010258$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010259int
10260main ()
10261{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010262static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010263test_array [0] = 0
10264
10265 ;
10266 return 0;
10267}
10268_ACEOF
10269rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010270if { (ac_try="$ac_compile"
10271case "(($ac_try" in
10272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10273 *) ac_try_echo=$ac_try;;
10274esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010275eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10276$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010277 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010278 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010279 grep -v '^ *+' conftest.er1 >conftest.err
10280 rm -f conftest.er1
10281 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010282 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010283 (exit $ac_status); } && {
10284 test -z "$ac_c_werror_flag" ||
10285 test ! -s conftest.err
10286 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ac_hi=$ac_mid
10288else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010289 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010290sed 's/^/| /' conftest.$ac_ext >&5
10291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010292 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010294
10295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010296done
10297case $ac_lo in
10298?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010299'') if test "$ac_cv_type_double" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010300 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10301$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10302{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010303See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010304$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010305See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010306 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010307 else
10308 ac_cv_sizeof_double=0
10309 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010310esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000010311else
Martin v. Löwis11437992002-04-12 09:54:03 +000010312 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010313/* confdefs.h. */
10314_ACEOF
10315cat confdefs.h >>conftest.$ac_ext
10316cat >>conftest.$ac_ext <<_ACEOF
10317/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010318$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010319static long int longval () { return (long int) (sizeof (double)); }
10320static unsigned long int ulongval () { return (long int) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010321#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010322#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010323int
10324main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +000010325{
Martin v. Löwis11437992002-04-12 09:54:03 +000010326
10327 FILE *f = fopen ("conftest.val", "w");
10328 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010329 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010330 if (((long int) (sizeof (double))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010331 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010332 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010333 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010334 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010335 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010336 }
10337 else
10338 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010339 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010340 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010342 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010343 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010344 /* Do not output a trailing newline, as this causes \r\n confusion
10345 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010347
10348 ;
10349 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010350}
Martin v. Löwis11437992002-04-12 09:54:03 +000010351_ACEOF
10352rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353if { (ac_try="$ac_link"
10354case "(($ac_try" in
10355 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10356 *) ac_try_echo=$ac_try;;
10357esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010358eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10359$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010360 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010361 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010362 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010364 { (case "(($ac_try" in
10365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10366 *) ac_try_echo=$ac_try;;
10367esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010368eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10369$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010371 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010372 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010373 (exit $ac_status); }; }; then
10374 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010375else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010376 $as_echo "$as_me: program exited with status $ac_status" >&5
10377$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010378sed 's/^/| /' conftest.$ac_ext >&5
10379
Martin v. Löwis11437992002-04-12 09:54:03 +000010380( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010381if test "$ac_cv_type_double" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010382 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10383$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10384{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010385See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010386$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010387See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010388 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010389 else
10390 ac_cv_sizeof_double=0
10391 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010392fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010393rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010394rm -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 +000010395fi
10396rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010397fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010398{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10399$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010400
10401
10402
Martin v. Löwis11437992002-04-12 09:54:03 +000010403cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010404#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010405_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010406
10407
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408# The cast to long int works around a bug in the HP C Compiler
10409# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10410# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10411# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010412{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5
10413$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010414if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010415 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010416else
Martin v. Löwis11437992002-04-12 09:54:03 +000010417 if test "$cross_compiling" = yes; then
10418 # Depending upon the size, compute the lo and hi bounds.
10419cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010420/* confdefs.h. */
10421_ACEOF
10422cat confdefs.h >>conftest.$ac_ext
10423cat >>conftest.$ac_ext <<_ACEOF
10424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010425$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010426int
10427main ()
10428{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010429static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010430test_array [0] = 0
10431
10432 ;
10433 return 0;
10434}
10435_ACEOF
10436rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010437if { (ac_try="$ac_compile"
10438case "(($ac_try" in
10439 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10440 *) ac_try_echo=$ac_try;;
10441esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010442eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10443$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010444 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010445 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010446 grep -v '^ *+' conftest.er1 >conftest.err
10447 rm -f conftest.er1
10448 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010449 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010450 (exit $ac_status); } && {
10451 test -z "$ac_c_werror_flag" ||
10452 test ! -s conftest.err
10453 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ac_lo=0 ac_mid=0
10455 while :; do
10456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010457/* confdefs.h. */
10458_ACEOF
10459cat confdefs.h >>conftest.$ac_ext
10460cat >>conftest.$ac_ext <<_ACEOF
10461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010462$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010463int
10464main ()
10465{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010466static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010467test_array [0] = 0
10468
10469 ;
10470 return 0;
10471}
10472_ACEOF
10473rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010474if { (ac_try="$ac_compile"
10475case "(($ac_try" in
10476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10477 *) ac_try_echo=$ac_try;;
10478esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010479eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10480$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010483 grep -v '^ *+' conftest.er1 >conftest.err
10484 rm -f conftest.er1
10485 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010486 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010487 (exit $ac_status); } && {
10488 test -z "$ac_c_werror_flag" ||
10489 test ! -s conftest.err
10490 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010491 ac_hi=$ac_mid; break
10492else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010493 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010494sed 's/^/| /' conftest.$ac_ext >&5
10495
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496 ac_lo=`expr $ac_mid + 1`
10497 if test $ac_lo -le $ac_mid; then
10498 ac_lo= ac_hi=
10499 break
10500 fi
10501 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010502fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010503
10504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010505 done
10506else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010507 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010508sed 's/^/| /' conftest.$ac_ext >&5
10509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010510 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010511/* confdefs.h. */
10512_ACEOF
10513cat confdefs.h >>conftest.$ac_ext
10514cat >>conftest.$ac_ext <<_ACEOF
10515/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010516$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010517int
10518main ()
10519{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010520static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010521test_array [0] = 0
10522
10523 ;
10524 return 0;
10525}
10526_ACEOF
10527rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010528if { (ac_try="$ac_compile"
10529case "(($ac_try" in
10530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10531 *) ac_try_echo=$ac_try;;
10532esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010533eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10534$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010536 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010537 grep -v '^ *+' conftest.er1 >conftest.err
10538 rm -f conftest.er1
10539 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010540 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010541 (exit $ac_status); } && {
10542 test -z "$ac_c_werror_flag" ||
10543 test ! -s conftest.err
10544 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 ac_hi=-1 ac_mid=-1
10546 while :; do
10547 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010548/* confdefs.h. */
10549_ACEOF
10550cat confdefs.h >>conftest.$ac_ext
10551cat >>conftest.$ac_ext <<_ACEOF
10552/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010553$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010554int
10555main ()
10556{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010557static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010558test_array [0] = 0
10559
10560 ;
10561 return 0;
10562}
10563_ACEOF
10564rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010565if { (ac_try="$ac_compile"
10566case "(($ac_try" in
10567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10568 *) ac_try_echo=$ac_try;;
10569esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010570eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10571$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010573 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010574 grep -v '^ *+' conftest.er1 >conftest.err
10575 rm -f conftest.er1
10576 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010577 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010578 (exit $ac_status); } && {
10579 test -z "$ac_c_werror_flag" ||
10580 test ! -s conftest.err
10581 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 ac_lo=$ac_mid; break
10583else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010584 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010585sed 's/^/| /' conftest.$ac_ext >&5
10586
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587 ac_hi=`expr '(' $ac_mid ')' - 1`
10588 if test $ac_mid -le $ac_hi; then
10589 ac_lo= ac_hi=
10590 break
10591 fi
10592 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010593fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010594
10595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010596 done
10597else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010598 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010599sed 's/^/| /' conftest.$ac_ext >&5
10600
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010601 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010603
10604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010605fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010606
10607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010608# Binary search between lo and hi bounds.
10609while test "x$ac_lo" != "x$ac_hi"; do
10610 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010612/* confdefs.h. */
10613_ACEOF
10614cat confdefs.h >>conftest.$ac_ext
10615cat >>conftest.$ac_ext <<_ACEOF
10616/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010617$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010618int
10619main ()
10620{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010621static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010622test_array [0] = 0
10623
10624 ;
10625 return 0;
10626}
10627_ACEOF
10628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010629if { (ac_try="$ac_compile"
10630case "(($ac_try" in
10631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10632 *) ac_try_echo=$ac_try;;
10633esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010634eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10635$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010638 grep -v '^ *+' conftest.er1 >conftest.err
10639 rm -f conftest.er1
10640 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010641 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010642 (exit $ac_status); } && {
10643 test -z "$ac_c_werror_flag" ||
10644 test ! -s conftest.err
10645 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 ac_hi=$ac_mid
10647else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010648 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010649sed 's/^/| /' conftest.$ac_ext >&5
10650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010653
10654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010655done
10656case $ac_lo in
10657?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010658'') if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010659 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10660$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10661{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010662See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010663$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010664See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010665 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010666 else
10667 ac_cv_sizeof_fpos_t=0
10668 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010669esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010670else
Martin v. Löwis11437992002-04-12 09:54:03 +000010671 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010672/* confdefs.h. */
10673_ACEOF
10674cat confdefs.h >>conftest.$ac_ext
10675cat >>conftest.$ac_ext <<_ACEOF
10676/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010677$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010678static long int longval () { return (long int) (sizeof (fpos_t)); }
10679static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010680#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010681#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010682int
10683main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010684{
Martin v. Löwis11437992002-04-12 09:54:03 +000010685
10686 FILE *f = fopen ("conftest.val", "w");
10687 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010688 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010689 if (((long int) (sizeof (fpos_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010690 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010691 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010692 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010693 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010694 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010695 }
10696 else
10697 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010698 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010699 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010701 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010702 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010703 /* Do not output a trailing newline, as this causes \r\n confusion
10704 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010706
10707 ;
10708 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010709}
Martin v. Löwis11437992002-04-12 09:54:03 +000010710_ACEOF
10711rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712if { (ac_try="$ac_link"
10713case "(($ac_try" in
10714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10715 *) ac_try_echo=$ac_try;;
10716esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010717eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10718$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010719 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010720 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010721 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010723 { (case "(($ac_try" in
10724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10725 *) ac_try_echo=$ac_try;;
10726esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010727eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10728$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010730 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010731 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010732 (exit $ac_status); }; }; then
10733 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010734else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010735 $as_echo "$as_me: program exited with status $ac_status" >&5
10736$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010737sed 's/^/| /' conftest.$ac_ext >&5
10738
Martin v. Löwis11437992002-04-12 09:54:03 +000010739( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010740if test "$ac_cv_type_fpos_t" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010741 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10742$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10743{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010744See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010745$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010746See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010747 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010748 else
10749 ac_cv_sizeof_fpos_t=0
10750 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010751fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010752rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010753rm -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 +000010754fi
10755rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010756fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010757{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10758$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010759
10760
10761
Martin v. Löwis11437992002-04-12 09:54:03 +000010762cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010763#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010764_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010765
Michael W. Hudson54241132001-12-07 15:38:26 +000010766
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767# The cast to long int works around a bug in the HP C Compiler
10768# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10769# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10770# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010771{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
10772$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010773if test "${ac_cv_sizeof_size_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010774 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010775else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010776 if test "$cross_compiling" = yes; then
10777 # Depending upon the size, compute the lo and hi bounds.
10778cat >conftest.$ac_ext <<_ACEOF
10779/* confdefs.h. */
10780_ACEOF
10781cat confdefs.h >>conftest.$ac_ext
10782cat >>conftest.$ac_ext <<_ACEOF
10783/* end confdefs.h. */
10784$ac_includes_default
10785int
10786main ()
10787{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010788static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010789test_array [0] = 0
10790
10791 ;
10792 return 0;
10793}
10794_ACEOF
10795rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010796if { (ac_try="$ac_compile"
10797case "(($ac_try" in
10798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10799 *) ac_try_echo=$ac_try;;
10800esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010801eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10802$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010803 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010804 ac_status=$?
10805 grep -v '^ *+' conftest.er1 >conftest.err
10806 rm -f conftest.er1
10807 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010808 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010809 (exit $ac_status); } && {
10810 test -z "$ac_c_werror_flag" ||
10811 test ! -s conftest.err
10812 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010813 ac_lo=0 ac_mid=0
10814 while :; do
10815 cat >conftest.$ac_ext <<_ACEOF
10816/* confdefs.h. */
10817_ACEOF
10818cat confdefs.h >>conftest.$ac_ext
10819cat >>conftest.$ac_ext <<_ACEOF
10820/* end confdefs.h. */
10821$ac_includes_default
10822int
10823main ()
10824{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010825static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010826test_array [0] = 0
10827
10828 ;
10829 return 0;
10830}
10831_ACEOF
10832rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010833if { (ac_try="$ac_compile"
10834case "(($ac_try" in
10835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10836 *) ac_try_echo=$ac_try;;
10837esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010838eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10839$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010841 ac_status=$?
10842 grep -v '^ *+' conftest.er1 >conftest.err
10843 rm -f conftest.er1
10844 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010845 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010846 (exit $ac_status); } && {
10847 test -z "$ac_c_werror_flag" ||
10848 test ! -s conftest.err
10849 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010850 ac_hi=$ac_mid; break
10851else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010852 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010853sed 's/^/| /' conftest.$ac_ext >&5
10854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010855 ac_lo=`expr $ac_mid + 1`
10856 if test $ac_lo -le $ac_mid; then
10857 ac_lo= ac_hi=
10858 break
10859 fi
10860 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010862
10863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010864 done
10865else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010866 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010867sed 's/^/| /' conftest.$ac_ext >&5
10868
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010869 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010870/* confdefs.h. */
10871_ACEOF
10872cat confdefs.h >>conftest.$ac_ext
10873cat >>conftest.$ac_ext <<_ACEOF
10874/* end confdefs.h. */
10875$ac_includes_default
10876int
10877main ()
10878{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010879static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010880test_array [0] = 0
10881
10882 ;
10883 return 0;
10884}
10885_ACEOF
10886rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010887if { (ac_try="$ac_compile"
10888case "(($ac_try" in
10889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10890 *) ac_try_echo=$ac_try;;
10891esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010892eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10893$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010894 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010895 ac_status=$?
10896 grep -v '^ *+' conftest.er1 >conftest.err
10897 rm -f conftest.er1
10898 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010899 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010900 (exit $ac_status); } && {
10901 test -z "$ac_c_werror_flag" ||
10902 test ! -s conftest.err
10903 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010904 ac_hi=-1 ac_mid=-1
10905 while :; do
10906 cat >conftest.$ac_ext <<_ACEOF
10907/* confdefs.h. */
10908_ACEOF
10909cat confdefs.h >>conftest.$ac_ext
10910cat >>conftest.$ac_ext <<_ACEOF
10911/* end confdefs.h. */
10912$ac_includes_default
10913int
10914main ()
10915{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010916static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010917test_array [0] = 0
10918
10919 ;
10920 return 0;
10921}
10922_ACEOF
10923rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010924if { (ac_try="$ac_compile"
10925case "(($ac_try" in
10926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10927 *) ac_try_echo=$ac_try;;
10928esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010929eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10930$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010931 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010932 ac_status=$?
10933 grep -v '^ *+' conftest.er1 >conftest.err
10934 rm -f conftest.er1
10935 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010936 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010937 (exit $ac_status); } && {
10938 test -z "$ac_c_werror_flag" ||
10939 test ! -s conftest.err
10940 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010941 ac_lo=$ac_mid; break
10942else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010943 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010944sed 's/^/| /' conftest.$ac_ext >&5
10945
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010946 ac_hi=`expr '(' $ac_mid ')' - 1`
10947 if test $ac_mid -le $ac_hi; then
10948 ac_lo= ac_hi=
10949 break
10950 fi
10951 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010952fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010953
10954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010955 done
10956else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010957 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010958sed 's/^/| /' conftest.$ac_ext >&5
10959
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010960 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962
10963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010965
10966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010967# Binary search between lo and hi bounds.
10968while test "x$ac_lo" != "x$ac_hi"; do
10969 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10970 cat >conftest.$ac_ext <<_ACEOF
10971/* confdefs.h. */
10972_ACEOF
10973cat confdefs.h >>conftest.$ac_ext
10974cat >>conftest.$ac_ext <<_ACEOF
10975/* end confdefs.h. */
10976$ac_includes_default
10977int
10978main ()
10979{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010980static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010981test_array [0] = 0
10982
10983 ;
10984 return 0;
10985}
10986_ACEOF
10987rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010988if { (ac_try="$ac_compile"
10989case "(($ac_try" in
10990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10991 *) ac_try_echo=$ac_try;;
10992esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000010993eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10994$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010995 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010996 ac_status=$?
10997 grep -v '^ *+' conftest.er1 >conftest.err
10998 rm -f conftest.er1
10999 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011000 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011001 (exit $ac_status); } && {
11002 test -z "$ac_c_werror_flag" ||
11003 test ! -s conftest.err
11004 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000011005 ac_hi=$ac_mid
11006else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011007 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011008sed 's/^/| /' conftest.$ac_ext >&5
11009
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011012
11013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011014done
11015case $ac_lo in
11016?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011017'') if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011018 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11020{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011021See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011022$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011023See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011024 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011025 else
11026 ac_cv_sizeof_size_t=0
11027 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011028esac
11029else
Martin v. Löwis18e16552006-02-15 17:27:45 +000011030 cat >conftest.$ac_ext <<_ACEOF
11031/* confdefs.h. */
11032_ACEOF
11033cat confdefs.h >>conftest.$ac_ext
11034cat >>conftest.$ac_ext <<_ACEOF
11035/* end confdefs.h. */
11036$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011037static long int longval () { return (long int) (sizeof (size_t)); }
11038static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011039#include <stdio.h>
11040#include <stdlib.h>
11041int
11042main ()
11043{
11044
11045 FILE *f = fopen ("conftest.val", "w");
11046 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011047 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011048 if (((long int) (sizeof (size_t))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011049 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011050 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011051 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011052 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011053 fprintf (f, "%ld", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000011054 }
11055 else
11056 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011057 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011058 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011059 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011060 fprintf (f, "%lu", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000011061 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011062 /* Do not output a trailing newline, as this causes \r\n confusion
11063 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011064 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011065
11066 ;
11067 return 0;
11068}
11069_ACEOF
11070rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011071if { (ac_try="$ac_link"
11072case "(($ac_try" in
11073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11074 *) ac_try_echo=$ac_try;;
11075esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011076eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11077$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011078 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011079 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011080 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011081 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011082 { (case "(($ac_try" in
11083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11084 *) ac_try_echo=$ac_try;;
11085esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011086eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11087$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011088 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011089 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011090 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011091 (exit $ac_status); }; }; then
11092 ac_cv_sizeof_size_t=`cat conftest.val`
11093else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011094 $as_echo "$as_me: program exited with status $ac_status" >&5
11095$as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011096sed 's/^/| /' conftest.$ac_ext >&5
11097
11098( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011099if test "$ac_cv_type_size_t" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011100 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11101$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11102{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011103See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011104$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011105See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011106 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011107 else
11108 ac_cv_sizeof_size_t=0
11109 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000011110fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011111rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011112rm -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 +000011113fi
11114rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000011115fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011116{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
11117$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011118
11119
11120
Martin v. Löwis18e16552006-02-15 17:27:45 +000011121cat >>confdefs.h <<_ACEOF
11122#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
11123_ACEOF
11124
11125
Christian Heimes400adb02008-02-01 08:12:03 +000011126# The cast to long int works around a bug in the HP C Compiler
11127# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11128# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11129# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011130{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5
11131$as_echo_n "checking size of pid_t... " >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011132if test "${ac_cv_sizeof_pid_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011133 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +000011134else
11135 if test "$cross_compiling" = yes; then
11136 # Depending upon the size, compute the lo and hi bounds.
11137cat >conftest.$ac_ext <<_ACEOF
11138/* confdefs.h. */
11139_ACEOF
11140cat confdefs.h >>conftest.$ac_ext
11141cat >>conftest.$ac_ext <<_ACEOF
11142/* end confdefs.h. */
11143$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011144int
11145main ()
11146{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011147static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000011148test_array [0] = 0
11149
11150 ;
11151 return 0;
11152}
11153_ACEOF
11154rm -f conftest.$ac_objext
11155if { (ac_try="$ac_compile"
11156case "(($ac_try" in
11157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11158 *) ac_try_echo=$ac_try;;
11159esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011160eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11161$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011162 (eval "$ac_compile") 2>conftest.er1
11163 ac_status=$?
11164 grep -v '^ *+' conftest.er1 >conftest.err
11165 rm -f conftest.er1
11166 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011167 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011168 (exit $ac_status); } && {
11169 test -z "$ac_c_werror_flag" ||
11170 test ! -s conftest.err
11171 } && test -s conftest.$ac_objext; then
11172 ac_lo=0 ac_mid=0
11173 while :; do
11174 cat >conftest.$ac_ext <<_ACEOF
11175/* confdefs.h. */
11176_ACEOF
11177cat confdefs.h >>conftest.$ac_ext
11178cat >>conftest.$ac_ext <<_ACEOF
11179/* end confdefs.h. */
11180$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011181int
11182main ()
11183{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011184static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011185test_array [0] = 0
11186
11187 ;
11188 return 0;
11189}
11190_ACEOF
11191rm -f conftest.$ac_objext
11192if { (ac_try="$ac_compile"
11193case "(($ac_try" in
11194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11195 *) ac_try_echo=$ac_try;;
11196esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011197eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11198$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011199 (eval "$ac_compile") 2>conftest.er1
11200 ac_status=$?
11201 grep -v '^ *+' conftest.er1 >conftest.err
11202 rm -f conftest.er1
11203 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011204 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011205 (exit $ac_status); } && {
11206 test -z "$ac_c_werror_flag" ||
11207 test ! -s conftest.err
11208 } && test -s conftest.$ac_objext; then
11209 ac_hi=$ac_mid; break
11210else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011211 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011212sed 's/^/| /' conftest.$ac_ext >&5
11213
11214 ac_lo=`expr $ac_mid + 1`
11215 if test $ac_lo -le $ac_mid; then
11216 ac_lo= ac_hi=
11217 break
11218 fi
11219 ac_mid=`expr 2 '*' $ac_mid + 1`
11220fi
11221
11222rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11223 done
11224else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011225 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011226sed 's/^/| /' conftest.$ac_ext >&5
11227
11228 cat >conftest.$ac_ext <<_ACEOF
11229/* confdefs.h. */
11230_ACEOF
11231cat confdefs.h >>conftest.$ac_ext
11232cat >>conftest.$ac_ext <<_ACEOF
11233/* end confdefs.h. */
11234$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011235int
11236main ()
11237{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011238static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000011239test_array [0] = 0
11240
11241 ;
11242 return 0;
11243}
11244_ACEOF
11245rm -f conftest.$ac_objext
11246if { (ac_try="$ac_compile"
11247case "(($ac_try" in
11248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11249 *) ac_try_echo=$ac_try;;
11250esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011251eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11252$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011253 (eval "$ac_compile") 2>conftest.er1
11254 ac_status=$?
11255 grep -v '^ *+' conftest.er1 >conftest.err
11256 rm -f conftest.er1
11257 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011258 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011259 (exit $ac_status); } && {
11260 test -z "$ac_c_werror_flag" ||
11261 test ! -s conftest.err
11262 } && test -s conftest.$ac_objext; then
11263 ac_hi=-1 ac_mid=-1
11264 while :; do
11265 cat >conftest.$ac_ext <<_ACEOF
11266/* confdefs.h. */
11267_ACEOF
11268cat confdefs.h >>conftest.$ac_ext
11269cat >>conftest.$ac_ext <<_ACEOF
11270/* end confdefs.h. */
11271$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011272int
11273main ()
11274{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011275static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011276test_array [0] = 0
11277
11278 ;
11279 return 0;
11280}
11281_ACEOF
11282rm -f conftest.$ac_objext
11283if { (ac_try="$ac_compile"
11284case "(($ac_try" in
11285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11286 *) ac_try_echo=$ac_try;;
11287esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011288eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11289$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011290 (eval "$ac_compile") 2>conftest.er1
11291 ac_status=$?
11292 grep -v '^ *+' conftest.er1 >conftest.err
11293 rm -f conftest.er1
11294 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011295 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011296 (exit $ac_status); } && {
11297 test -z "$ac_c_werror_flag" ||
11298 test ! -s conftest.err
11299 } && test -s conftest.$ac_objext; then
11300 ac_lo=$ac_mid; break
11301else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011302 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011303sed 's/^/| /' conftest.$ac_ext >&5
11304
11305 ac_hi=`expr '(' $ac_mid ')' - 1`
11306 if test $ac_mid -le $ac_hi; then
11307 ac_lo= ac_hi=
11308 break
11309 fi
11310 ac_mid=`expr 2 '*' $ac_mid`
11311fi
11312
11313rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11314 done
11315else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011316 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011317sed 's/^/| /' conftest.$ac_ext >&5
11318
11319 ac_lo= ac_hi=
11320fi
11321
11322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11323fi
11324
11325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11326# Binary search between lo and hi bounds.
11327while test "x$ac_lo" != "x$ac_hi"; do
11328 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11329 cat >conftest.$ac_ext <<_ACEOF
11330/* confdefs.h. */
11331_ACEOF
11332cat confdefs.h >>conftest.$ac_ext
11333cat >>conftest.$ac_ext <<_ACEOF
11334/* end confdefs.h. */
11335$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011336int
11337main ()
11338{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011339static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011340test_array [0] = 0
11341
11342 ;
11343 return 0;
11344}
11345_ACEOF
11346rm -f conftest.$ac_objext
11347if { (ac_try="$ac_compile"
11348case "(($ac_try" in
11349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11350 *) ac_try_echo=$ac_try;;
11351esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011352eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11353$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011354 (eval "$ac_compile") 2>conftest.er1
11355 ac_status=$?
11356 grep -v '^ *+' conftest.er1 >conftest.err
11357 rm -f conftest.er1
11358 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011359 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011360 (exit $ac_status); } && {
11361 test -z "$ac_c_werror_flag" ||
11362 test ! -s conftest.err
11363 } && test -s conftest.$ac_objext; then
11364 ac_hi=$ac_mid
11365else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011366 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011367sed 's/^/| /' conftest.$ac_ext >&5
11368
11369 ac_lo=`expr '(' $ac_mid ')' + 1`
11370fi
11371
11372rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11373done
11374case $ac_lo in
11375?*) ac_cv_sizeof_pid_t=$ac_lo;;
11376'') if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011377 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11378$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11379{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011380See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011381$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011382See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011383 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011384 else
11385 ac_cv_sizeof_pid_t=0
11386 fi ;;
11387esac
11388else
11389 cat >conftest.$ac_ext <<_ACEOF
11390/* confdefs.h. */
11391_ACEOF
11392cat confdefs.h >>conftest.$ac_ext
11393cat >>conftest.$ac_ext <<_ACEOF
11394/* end confdefs.h. */
11395$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011396static long int longval () { return (long int) (sizeof (pid_t)); }
11397static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011398#include <stdio.h>
11399#include <stdlib.h>
11400int
11401main ()
11402{
11403
11404 FILE *f = fopen ("conftest.val", "w");
11405 if (! f)
11406 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011407 if (((long int) (sizeof (pid_t))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011408 {
11409 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011410 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000011411 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011412 fprintf (f, "%ld", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011413 }
11414 else
11415 {
11416 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011417 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000011418 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011419 fprintf (f, "%lu", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011420 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011421 /* Do not output a trailing newline, as this causes \r\n confusion
11422 on some platforms. */
Christian Heimes400adb02008-02-01 08:12:03 +000011423 return ferror (f) || fclose (f) != 0;
11424
11425 ;
11426 return 0;
11427}
11428_ACEOF
11429rm -f conftest$ac_exeext
11430if { (ac_try="$ac_link"
11431case "(($ac_try" in
11432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11433 *) ac_try_echo=$ac_try;;
11434esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011435eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11436$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011437 (eval "$ac_link") 2>&5
11438 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011439 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011440 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11441 { (case "(($ac_try" in
11442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11443 *) ac_try_echo=$ac_try;;
11444esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011445eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11446$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011447 (eval "$ac_try") 2>&5
11448 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011449 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011450 (exit $ac_status); }; }; then
11451 ac_cv_sizeof_pid_t=`cat conftest.val`
11452else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011453 $as_echo "$as_me: program exited with status $ac_status" >&5
11454$as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011455sed 's/^/| /' conftest.$ac_ext >&5
11456
11457( exit $ac_status )
11458if test "$ac_cv_type_pid_t" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011459 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11460$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11461{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011462See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011463$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011464See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011465 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011466 else
11467 ac_cv_sizeof_pid_t=0
11468 fi
11469fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011470rm -rf conftest.dSYM
Christian Heimes400adb02008-02-01 08:12:03 +000011471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11472fi
11473rm -f conftest.val
11474fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011475{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11476$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011477
11478
11479
11480cat >>confdefs.h <<_ACEOF
11481#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11482_ACEOF
11483
11484
Michael W. Hudson54241132001-12-07 15:38:26 +000011485
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011486{ $as_echo "$as_me:$LINENO: checking for long long support" >&5
11487$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011488have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011489cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011490/* confdefs.h. */
11491_ACEOF
11492cat confdefs.h >>conftest.$ac_ext
11493cat >>conftest.$ac_ext <<_ACEOF
11494/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011495
Martin v. Löwis11437992002-04-12 09:54:03 +000011496int
11497main ()
11498{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011499long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011500 ;
11501 return 0;
11502}
11503_ACEOF
11504rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011505if { (ac_try="$ac_compile"
11506case "(($ac_try" in
11507 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11508 *) ac_try_echo=$ac_try;;
11509esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011510eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11511$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011512 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011513 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011514 grep -v '^ *+' conftest.er1 >conftest.err
11515 rm -f conftest.er1
11516 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011517 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011518 (exit $ac_status); } && {
11519 test -z "$ac_c_werror_flag" ||
11520 test ! -s conftest.err
11521 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011522
11523
11524cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011525#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011526_ACEOF
11527
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011528 have_long_long=yes
11529
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011530else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011531 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011532sed 's/^/| /' conftest.$ac_ext >&5
11533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011534
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011536
11537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011538{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5
11539$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011540if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011541# The cast to long int works around a bug in the HP C Compiler
11542# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11543# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11544# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011545{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
11546$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011547if test "${ac_cv_sizeof_long_long+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011548 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011549else
Martin v. Löwis11437992002-04-12 09:54:03 +000011550 if test "$cross_compiling" = yes; then
11551 # Depending upon the size, compute the lo and hi bounds.
11552cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011553/* confdefs.h. */
11554_ACEOF
11555cat confdefs.h >>conftest.$ac_ext
11556cat >>conftest.$ac_ext <<_ACEOF
11557/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011558$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011559int
11560main ()
11561{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011562static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011563test_array [0] = 0
11564
11565 ;
11566 return 0;
11567}
11568_ACEOF
11569rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011570if { (ac_try="$ac_compile"
11571case "(($ac_try" in
11572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11573 *) ac_try_echo=$ac_try;;
11574esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011575eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11576$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011577 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011578 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011579 grep -v '^ *+' conftest.er1 >conftest.err
11580 rm -f conftest.er1
11581 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011582 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011583 (exit $ac_status); } && {
11584 test -z "$ac_c_werror_flag" ||
11585 test ! -s conftest.err
11586 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011587 ac_lo=0 ac_mid=0
11588 while :; do
11589 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011590/* confdefs.h. */
11591_ACEOF
11592cat confdefs.h >>conftest.$ac_ext
11593cat >>conftest.$ac_ext <<_ACEOF
11594/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011595$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011596int
11597main ()
11598{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011599static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011600test_array [0] = 0
11601
11602 ;
11603 return 0;
11604}
11605_ACEOF
11606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011607if { (ac_try="$ac_compile"
11608case "(($ac_try" in
11609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11610 *) ac_try_echo=$ac_try;;
11611esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011612eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11613$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011614 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011615 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011616 grep -v '^ *+' conftest.er1 >conftest.err
11617 rm -f conftest.er1
11618 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011619 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011620 (exit $ac_status); } && {
11621 test -z "$ac_c_werror_flag" ||
11622 test ! -s conftest.err
11623 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011624 ac_hi=$ac_mid; break
11625else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011626 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011627sed 's/^/| /' conftest.$ac_ext >&5
11628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629 ac_lo=`expr $ac_mid + 1`
11630 if test $ac_lo -le $ac_mid; then
11631 ac_lo= ac_hi=
11632 break
11633 fi
11634 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011636
11637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011638 done
11639else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011640 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011641sed 's/^/| /' conftest.$ac_ext >&5
11642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011643 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011644/* confdefs.h. */
11645_ACEOF
11646cat confdefs.h >>conftest.$ac_ext
11647cat >>conftest.$ac_ext <<_ACEOF
11648/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011649$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011650int
11651main ()
11652{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011653static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011654test_array [0] = 0
11655
11656 ;
11657 return 0;
11658}
11659_ACEOF
11660rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011661if { (ac_try="$ac_compile"
11662case "(($ac_try" in
11663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11664 *) ac_try_echo=$ac_try;;
11665esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011666eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11667$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011668 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011669 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011670 grep -v '^ *+' conftest.er1 >conftest.err
11671 rm -f conftest.er1
11672 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011673 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011674 (exit $ac_status); } && {
11675 test -z "$ac_c_werror_flag" ||
11676 test ! -s conftest.err
11677 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011678 ac_hi=-1 ac_mid=-1
11679 while :; do
11680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011681/* confdefs.h. */
11682_ACEOF
11683cat confdefs.h >>conftest.$ac_ext
11684cat >>conftest.$ac_ext <<_ACEOF
11685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011686$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011687int
11688main ()
11689{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011690static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011691test_array [0] = 0
11692
11693 ;
11694 return 0;
11695}
11696_ACEOF
11697rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011698if { (ac_try="$ac_compile"
11699case "(($ac_try" in
11700 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11701 *) ac_try_echo=$ac_try;;
11702esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011703eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11704$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011705 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011706 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011707 grep -v '^ *+' conftest.er1 >conftest.err
11708 rm -f conftest.er1
11709 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011710 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011711 (exit $ac_status); } && {
11712 test -z "$ac_c_werror_flag" ||
11713 test ! -s conftest.err
11714 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011715 ac_lo=$ac_mid; break
11716else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011717 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011718sed 's/^/| /' conftest.$ac_ext >&5
11719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011720 ac_hi=`expr '(' $ac_mid ')' - 1`
11721 if test $ac_mid -le $ac_hi; then
11722 ac_lo= ac_hi=
11723 break
11724 fi
11725 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011726fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011727
11728rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011729 done
11730else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011731 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011732sed 's/^/| /' conftest.$ac_ext >&5
11733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011734 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011736
11737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011738fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011739
11740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011741# Binary search between lo and hi bounds.
11742while test "x$ac_lo" != "x$ac_hi"; do
11743 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11744 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011745/* confdefs.h. */
11746_ACEOF
11747cat confdefs.h >>conftest.$ac_ext
11748cat >>conftest.$ac_ext <<_ACEOF
11749/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011750$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011751int
11752main ()
11753{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011754static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011755test_array [0] = 0
11756
11757 ;
11758 return 0;
11759}
11760_ACEOF
11761rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011762if { (ac_try="$ac_compile"
11763case "(($ac_try" in
11764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11765 *) ac_try_echo=$ac_try;;
11766esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011767eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11768$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011771 grep -v '^ *+' conftest.er1 >conftest.err
11772 rm -f conftest.er1
11773 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011774 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011775 (exit $ac_status); } && {
11776 test -z "$ac_c_werror_flag" ||
11777 test ! -s conftest.err
11778 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 ac_hi=$ac_mid
11780else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011781 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011782sed 's/^/| /' conftest.$ac_ext >&5
11783
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011784 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011786
11787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011788done
11789case $ac_lo in
11790?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011791'') if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011792 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11793$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11794{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011795See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011796$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011797See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011798 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011799 else
11800 ac_cv_sizeof_long_long=0
11801 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011802esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011803else
Martin v. Löwis11437992002-04-12 09:54:03 +000011804 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011805/* confdefs.h. */
11806_ACEOF
11807cat confdefs.h >>conftest.$ac_ext
11808cat >>conftest.$ac_ext <<_ACEOF
11809/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011810$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011811static long int longval () { return (long int) (sizeof (long long)); }
11812static unsigned long int ulongval () { return (long int) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011813#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011814#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011815int
11816main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011817{
Martin v. Löwis11437992002-04-12 09:54:03 +000011818
11819 FILE *f = fopen ("conftest.val", "w");
11820 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011821 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011822 if (((long int) (sizeof (long long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011823 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011824 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011825 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011826 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011827 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011828 }
11829 else
11830 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011831 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011832 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011833 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011834 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011835 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011836 /* Do not output a trailing newline, as this causes \r\n confusion
11837 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011838 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011839
11840 ;
11841 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011842}
Martin v. Löwis11437992002-04-12 09:54:03 +000011843_ACEOF
11844rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011845if { (ac_try="$ac_link"
11846case "(($ac_try" in
11847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11848 *) ac_try_echo=$ac_try;;
11849esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011850eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11851$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011852 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011853 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011854 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011855 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011856 { (case "(($ac_try" in
11857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11858 *) ac_try_echo=$ac_try;;
11859esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011860eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11861$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011862 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011863 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011864 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011865 (exit $ac_status); }; }; then
11866 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011867else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011868 $as_echo "$as_me: program exited with status $ac_status" >&5
11869$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011870sed 's/^/| /' conftest.$ac_ext >&5
11871
Martin v. Löwis11437992002-04-12 09:54:03 +000011872( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011873if test "$ac_cv_type_long_long" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011874 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11875$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11876{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011877See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011878$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011879See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011880 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011881 else
11882 ac_cv_sizeof_long_long=0
11883 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011884fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011885rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011886rm -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 +000011887fi
11888rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011889fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011890{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11891$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011892
11893
11894
Martin v. Löwis11437992002-04-12 09:54:03 +000011895cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011896#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011897_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011898
Michael W. Hudson54241132001-12-07 15:38:26 +000011899
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011900fi
11901
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011902{ $as_echo "$as_me:$LINENO: checking for long double support" >&5
11903$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011904have_long_double=no
11905cat >conftest.$ac_ext <<_ACEOF
11906/* confdefs.h. */
11907_ACEOF
11908cat confdefs.h >>conftest.$ac_ext
11909cat >>conftest.$ac_ext <<_ACEOF
11910/* end confdefs.h. */
11911
11912int
11913main ()
11914{
11915long double x; x = (long double)0;
11916 ;
11917 return 0;
11918}
11919_ACEOF
11920rm -f conftest.$ac_objext
11921if { (ac_try="$ac_compile"
11922case "(($ac_try" in
11923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11924 *) ac_try_echo=$ac_try;;
11925esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011926eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11927$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011928 (eval "$ac_compile") 2>conftest.er1
11929 ac_status=$?
11930 grep -v '^ *+' conftest.er1 >conftest.err
11931 rm -f conftest.er1
11932 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011933 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011934 (exit $ac_status); } && {
11935 test -z "$ac_c_werror_flag" ||
11936 test ! -s conftest.err
11937 } && test -s conftest.$ac_objext; then
11938
11939
11940cat >>confdefs.h <<\_ACEOF
11941#define HAVE_LONG_DOUBLE 1
11942_ACEOF
11943
11944 have_long_double=yes
11945
11946else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011947 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011948sed 's/^/| /' conftest.$ac_ext >&5
11949
11950
11951fi
11952
11953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011954{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5
11955$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011956if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011957# The cast to long int works around a bug in the HP C Compiler
11958# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11959# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11960# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011961{ $as_echo "$as_me:$LINENO: checking size of long double" >&5
11962$as_echo_n "checking size of long double... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011963if test "${ac_cv_sizeof_long_double+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011964 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011965else
11966 if test "$cross_compiling" = yes; then
11967 # Depending upon the size, compute the lo and hi bounds.
11968cat >conftest.$ac_ext <<_ACEOF
11969/* confdefs.h. */
11970_ACEOF
11971cat confdefs.h >>conftest.$ac_ext
11972cat >>conftest.$ac_ext <<_ACEOF
11973/* end confdefs.h. */
11974$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011975int
11976main ()
11977{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011978static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011979test_array [0] = 0
11980
11981 ;
11982 return 0;
11983}
11984_ACEOF
11985rm -f conftest.$ac_objext
11986if { (ac_try="$ac_compile"
11987case "(($ac_try" in
11988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11989 *) ac_try_echo=$ac_try;;
11990esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011991eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11992$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011993 (eval "$ac_compile") 2>conftest.er1
11994 ac_status=$?
11995 grep -v '^ *+' conftest.er1 >conftest.err
11996 rm -f conftest.er1
11997 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000011998 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011999 (exit $ac_status); } && {
12000 test -z "$ac_c_werror_flag" ||
12001 test ! -s conftest.err
12002 } && test -s conftest.$ac_objext; then
12003 ac_lo=0 ac_mid=0
12004 while :; do
12005 cat >conftest.$ac_ext <<_ACEOF
12006/* confdefs.h. */
12007_ACEOF
12008cat confdefs.h >>conftest.$ac_ext
12009cat >>conftest.$ac_ext <<_ACEOF
12010/* end confdefs.h. */
12011$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012012int
12013main ()
12014{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012015static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012016test_array [0] = 0
12017
12018 ;
12019 return 0;
12020}
12021_ACEOF
12022rm -f conftest.$ac_objext
12023if { (ac_try="$ac_compile"
12024case "(($ac_try" in
12025 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12026 *) ac_try_echo=$ac_try;;
12027esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012028eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12029$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012030 (eval "$ac_compile") 2>conftest.er1
12031 ac_status=$?
12032 grep -v '^ *+' conftest.er1 >conftest.err
12033 rm -f conftest.er1
12034 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012035 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012036 (exit $ac_status); } && {
12037 test -z "$ac_c_werror_flag" ||
12038 test ! -s conftest.err
12039 } && test -s conftest.$ac_objext; then
12040 ac_hi=$ac_mid; break
12041else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012042 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012043sed 's/^/| /' conftest.$ac_ext >&5
12044
12045 ac_lo=`expr $ac_mid + 1`
12046 if test $ac_lo -le $ac_mid; then
12047 ac_lo= ac_hi=
12048 break
12049 fi
12050 ac_mid=`expr 2 '*' $ac_mid + 1`
12051fi
12052
12053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12054 done
12055else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012056 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012057sed 's/^/| /' conftest.$ac_ext >&5
12058
12059 cat >conftest.$ac_ext <<_ACEOF
12060/* confdefs.h. */
12061_ACEOF
12062cat confdefs.h >>conftest.$ac_ext
12063cat >>conftest.$ac_ext <<_ACEOF
12064/* end confdefs.h. */
12065$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012066int
12067main ()
12068{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012069static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012070test_array [0] = 0
12071
12072 ;
12073 return 0;
12074}
12075_ACEOF
12076rm -f conftest.$ac_objext
12077if { (ac_try="$ac_compile"
12078case "(($ac_try" in
12079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12080 *) ac_try_echo=$ac_try;;
12081esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012082eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12083$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012084 (eval "$ac_compile") 2>conftest.er1
12085 ac_status=$?
12086 grep -v '^ *+' conftest.er1 >conftest.err
12087 rm -f conftest.er1
12088 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012089 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012090 (exit $ac_status); } && {
12091 test -z "$ac_c_werror_flag" ||
12092 test ! -s conftest.err
12093 } && test -s conftest.$ac_objext; then
12094 ac_hi=-1 ac_mid=-1
12095 while :; do
12096 cat >conftest.$ac_ext <<_ACEOF
12097/* confdefs.h. */
12098_ACEOF
12099cat confdefs.h >>conftest.$ac_ext
12100cat >>conftest.$ac_ext <<_ACEOF
12101/* end confdefs.h. */
12102$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012103int
12104main ()
12105{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012106static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012107test_array [0] = 0
12108
12109 ;
12110 return 0;
12111}
12112_ACEOF
12113rm -f conftest.$ac_objext
12114if { (ac_try="$ac_compile"
12115case "(($ac_try" in
12116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12117 *) ac_try_echo=$ac_try;;
12118esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012119eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12120$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012121 (eval "$ac_compile") 2>conftest.er1
12122 ac_status=$?
12123 grep -v '^ *+' conftest.er1 >conftest.err
12124 rm -f conftest.er1
12125 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012126 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012127 (exit $ac_status); } && {
12128 test -z "$ac_c_werror_flag" ||
12129 test ! -s conftest.err
12130 } && test -s conftest.$ac_objext; then
12131 ac_lo=$ac_mid; break
12132else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012133 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012134sed 's/^/| /' conftest.$ac_ext >&5
12135
12136 ac_hi=`expr '(' $ac_mid ')' - 1`
12137 if test $ac_mid -le $ac_hi; then
12138 ac_lo= ac_hi=
12139 break
12140 fi
12141 ac_mid=`expr 2 '*' $ac_mid`
12142fi
12143
12144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12145 done
12146else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012147 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012148sed 's/^/| /' conftest.$ac_ext >&5
12149
12150 ac_lo= ac_hi=
12151fi
12152
12153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12154fi
12155
12156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12157# Binary search between lo and hi bounds.
12158while test "x$ac_lo" != "x$ac_hi"; do
12159 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12160 cat >conftest.$ac_ext <<_ACEOF
12161/* confdefs.h. */
12162_ACEOF
12163cat confdefs.h >>conftest.$ac_ext
12164cat >>conftest.$ac_ext <<_ACEOF
12165/* end confdefs.h. */
12166$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012167int
12168main ()
12169{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012170static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012171test_array [0] = 0
12172
12173 ;
12174 return 0;
12175}
12176_ACEOF
12177rm -f conftest.$ac_objext
12178if { (ac_try="$ac_compile"
12179case "(($ac_try" in
12180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12181 *) ac_try_echo=$ac_try;;
12182esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012183eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12184$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012185 (eval "$ac_compile") 2>conftest.er1
12186 ac_status=$?
12187 grep -v '^ *+' conftest.er1 >conftest.err
12188 rm -f conftest.er1
12189 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012190 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012191 (exit $ac_status); } && {
12192 test -z "$ac_c_werror_flag" ||
12193 test ! -s conftest.err
12194 } && test -s conftest.$ac_objext; then
12195 ac_hi=$ac_mid
12196else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012197 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012198sed 's/^/| /' conftest.$ac_ext >&5
12199
12200 ac_lo=`expr '(' $ac_mid ')' + 1`
12201fi
12202
12203rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12204done
12205case $ac_lo in
12206?*) ac_cv_sizeof_long_double=$ac_lo;;
12207'') if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012208 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12209$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12210{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012211See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012212$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012213See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012214 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012215 else
12216 ac_cv_sizeof_long_double=0
12217 fi ;;
12218esac
12219else
12220 cat >conftest.$ac_ext <<_ACEOF
12221/* confdefs.h. */
12222_ACEOF
12223cat confdefs.h >>conftest.$ac_ext
12224cat >>conftest.$ac_ext <<_ACEOF
12225/* end confdefs.h. */
12226$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012227static long int longval () { return (long int) (sizeof (long double)); }
12228static unsigned long int ulongval () { return (long int) (sizeof (long double)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012229#include <stdio.h>
12230#include <stdlib.h>
12231int
12232main ()
12233{
12234
12235 FILE *f = fopen ("conftest.val", "w");
12236 if (! f)
12237 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012238 if (((long int) (sizeof (long double))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012239 {
12240 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012241 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012242 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012243 fprintf (f, "%ld", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012244 }
12245 else
12246 {
12247 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012248 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012249 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012250 fprintf (f, "%lu", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012251 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012252 /* Do not output a trailing newline, as this causes \r\n confusion
12253 on some platforms. */
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012254 return ferror (f) || fclose (f) != 0;
12255
12256 ;
12257 return 0;
12258}
12259_ACEOF
12260rm -f conftest$ac_exeext
12261if { (ac_try="$ac_link"
12262case "(($ac_try" in
12263 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12264 *) ac_try_echo=$ac_try;;
12265esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012266eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12267$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012268 (eval "$ac_link") 2>&5
12269 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012270 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012271 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12272 { (case "(($ac_try" in
12273 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12274 *) ac_try_echo=$ac_try;;
12275esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012276eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12277$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012278 (eval "$ac_try") 2>&5
12279 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012280 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012281 (exit $ac_status); }; }; then
12282 ac_cv_sizeof_long_double=`cat conftest.val`
12283else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012284 $as_echo "$as_me: program exited with status $ac_status" >&5
12285$as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012286sed 's/^/| /' conftest.$ac_ext >&5
12287
12288( exit $ac_status )
12289if test "$ac_cv_type_long_double" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012290 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12291$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12292{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012293See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012294$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012295See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012296 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012297 else
12298 ac_cv_sizeof_long_double=0
12299 fi
12300fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012301rm -rf conftest.dSYM
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012302rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12303fi
12304rm -f conftest.val
12305fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012306{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12307$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012308
12309
12310
12311cat >>confdefs.h <<_ACEOF
12312#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12313_ACEOF
12314
12315
12316fi
12317
12318
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012319{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5
12320$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012321have_c99_bool=no
12322cat >conftest.$ac_ext <<_ACEOF
12323/* confdefs.h. */
12324_ACEOF
12325cat confdefs.h >>conftest.$ac_ext
12326cat >>conftest.$ac_ext <<_ACEOF
12327/* end confdefs.h. */
12328
12329int
12330main ()
12331{
12332_Bool x; x = (_Bool)0;
12333 ;
12334 return 0;
12335}
12336_ACEOF
12337rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012338if { (ac_try="$ac_compile"
12339case "(($ac_try" in
12340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12341 *) ac_try_echo=$ac_try;;
12342esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012343eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12344$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012345 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012346 ac_status=$?
12347 grep -v '^ *+' conftest.er1 >conftest.err
12348 rm -f conftest.er1
12349 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012350 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012351 (exit $ac_status); } && {
12352 test -z "$ac_c_werror_flag" ||
12353 test ! -s conftest.err
12354 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012355
12356
12357cat >>confdefs.h <<\_ACEOF
12358#define HAVE_C99_BOOL 1
12359_ACEOF
12360
12361 have_c99_bool=yes
12362
12363else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012364 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012365sed 's/^/| /' conftest.$ac_ext >&5
12366
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012367
Thomas Woutersb2137042007-02-01 18:02:27 +000012368fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012369
12370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012371{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12372$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012373if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012374# The cast to long int works around a bug in the HP C Compiler
12375# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12376# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12377# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012378{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5
12379$as_echo_n "checking size of _Bool... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012380if test "${ac_cv_sizeof__Bool+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012381 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012382else
12383 if test "$cross_compiling" = yes; then
12384 # Depending upon the size, compute the lo and hi bounds.
12385cat >conftest.$ac_ext <<_ACEOF
12386/* confdefs.h. */
12387_ACEOF
12388cat confdefs.h >>conftest.$ac_ext
12389cat >>conftest.$ac_ext <<_ACEOF
12390/* end confdefs.h. */
12391$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012392int
12393main ()
12394{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012395static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012396test_array [0] = 0
12397
12398 ;
12399 return 0;
12400}
12401_ACEOF
12402rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012403if { (ac_try="$ac_compile"
12404case "(($ac_try" in
12405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12406 *) ac_try_echo=$ac_try;;
12407esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012408eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12409$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012410 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012411 ac_status=$?
12412 grep -v '^ *+' conftest.er1 >conftest.err
12413 rm -f conftest.er1
12414 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012415 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012416 (exit $ac_status); } && {
12417 test -z "$ac_c_werror_flag" ||
12418 test ! -s conftest.err
12419 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012420 ac_lo=0 ac_mid=0
12421 while :; do
12422 cat >conftest.$ac_ext <<_ACEOF
12423/* confdefs.h. */
12424_ACEOF
12425cat confdefs.h >>conftest.$ac_ext
12426cat >>conftest.$ac_ext <<_ACEOF
12427/* end confdefs.h. */
12428$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012429int
12430main ()
12431{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012432static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012433test_array [0] = 0
12434
12435 ;
12436 return 0;
12437}
12438_ACEOF
12439rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012440if { (ac_try="$ac_compile"
12441case "(($ac_try" in
12442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12443 *) ac_try_echo=$ac_try;;
12444esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012445eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12446$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012447 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012448 ac_status=$?
12449 grep -v '^ *+' conftest.er1 >conftest.err
12450 rm -f conftest.er1
12451 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012452 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012453 (exit $ac_status); } && {
12454 test -z "$ac_c_werror_flag" ||
12455 test ! -s conftest.err
12456 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012457 ac_hi=$ac_mid; break
12458else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012459 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012460sed 's/^/| /' conftest.$ac_ext >&5
12461
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462 ac_lo=`expr $ac_mid + 1`
12463 if test $ac_lo -le $ac_mid; then
12464 ac_lo= ac_hi=
12465 break
12466 fi
12467 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012469
12470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012471 done
12472else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012473 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012474sed 's/^/| /' conftest.$ac_ext >&5
12475
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012476 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012477/* confdefs.h. */
12478_ACEOF
12479cat confdefs.h >>conftest.$ac_ext
12480cat >>conftest.$ac_ext <<_ACEOF
12481/* end confdefs.h. */
12482$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012483int
12484main ()
12485{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012486static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012487test_array [0] = 0
12488
12489 ;
12490 return 0;
12491}
12492_ACEOF
12493rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012494if { (ac_try="$ac_compile"
12495case "(($ac_try" in
12496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12497 *) ac_try_echo=$ac_try;;
12498esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012499eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12500$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012501 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012502 ac_status=$?
12503 grep -v '^ *+' conftest.er1 >conftest.err
12504 rm -f conftest.er1
12505 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012506 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012507 (exit $ac_status); } && {
12508 test -z "$ac_c_werror_flag" ||
12509 test ! -s conftest.err
12510 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012511 ac_hi=-1 ac_mid=-1
12512 while :; do
12513 cat >conftest.$ac_ext <<_ACEOF
12514/* confdefs.h. */
12515_ACEOF
12516cat confdefs.h >>conftest.$ac_ext
12517cat >>conftest.$ac_ext <<_ACEOF
12518/* end confdefs.h. */
12519$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012520int
12521main ()
12522{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012523static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012524test_array [0] = 0
12525
12526 ;
12527 return 0;
12528}
12529_ACEOF
12530rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012531if { (ac_try="$ac_compile"
12532case "(($ac_try" in
12533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12534 *) ac_try_echo=$ac_try;;
12535esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012536eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12537$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012539 ac_status=$?
12540 grep -v '^ *+' conftest.er1 >conftest.err
12541 rm -f conftest.er1
12542 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012543 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012544 (exit $ac_status); } && {
12545 test -z "$ac_c_werror_flag" ||
12546 test ! -s conftest.err
12547 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012548 ac_lo=$ac_mid; break
12549else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012550 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012551sed 's/^/| /' conftest.$ac_ext >&5
12552
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012553 ac_hi=`expr '(' $ac_mid ')' - 1`
12554 if test $ac_mid -le $ac_hi; then
12555 ac_lo= ac_hi=
12556 break
12557 fi
12558 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012560
12561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012562 done
12563else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012564 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012565sed 's/^/| /' conftest.$ac_ext >&5
12566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012567 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012569
12570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012571fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012572
12573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012574# Binary search between lo and hi bounds.
12575while test "x$ac_lo" != "x$ac_hi"; do
12576 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12577 cat >conftest.$ac_ext <<_ACEOF
12578/* confdefs.h. */
12579_ACEOF
12580cat confdefs.h >>conftest.$ac_ext
12581cat >>conftest.$ac_ext <<_ACEOF
12582/* end confdefs.h. */
12583$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012584int
12585main ()
12586{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012587static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012588test_array [0] = 0
12589
12590 ;
12591 return 0;
12592}
12593_ACEOF
12594rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012595if { (ac_try="$ac_compile"
12596case "(($ac_try" in
12597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12598 *) ac_try_echo=$ac_try;;
12599esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012600eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12601$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012602 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012603 ac_status=$?
12604 grep -v '^ *+' conftest.er1 >conftest.err
12605 rm -f conftest.er1
12606 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012607 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012608 (exit $ac_status); } && {
12609 test -z "$ac_c_werror_flag" ||
12610 test ! -s conftest.err
12611 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012612 ac_hi=$ac_mid
12613else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012614 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012615sed 's/^/| /' conftest.$ac_ext >&5
12616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012617 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012619
12620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012621done
12622case $ac_lo in
12623?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012624'') if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012625 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12626$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12627{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012628See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012629$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012630See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012631 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012632 else
12633 ac_cv_sizeof__Bool=0
12634 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012635esac
12636else
12637 cat >conftest.$ac_ext <<_ACEOF
12638/* confdefs.h. */
12639_ACEOF
12640cat confdefs.h >>conftest.$ac_ext
12641cat >>conftest.$ac_ext <<_ACEOF
12642/* end confdefs.h. */
12643$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012644static long int longval () { return (long int) (sizeof (_Bool)); }
12645static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012646#include <stdio.h>
12647#include <stdlib.h>
12648int
12649main ()
12650{
12651
12652 FILE *f = fopen ("conftest.val", "w");
12653 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012654 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012655 if (((long int) (sizeof (_Bool))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012656 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012657 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012658 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012659 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012660 fprintf (f, "%ld", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012661 }
12662 else
12663 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012664 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012665 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012667 fprintf (f, "%lu", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012668 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012669 /* Do not output a trailing newline, as this causes \r\n confusion
12670 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012672
12673 ;
12674 return 0;
12675}
12676_ACEOF
12677rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678if { (ac_try="$ac_link"
12679case "(($ac_try" in
12680 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12681 *) ac_try_echo=$ac_try;;
12682esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012683eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12684$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012685 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012686 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012687 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012688 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012689 { (case "(($ac_try" in
12690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12691 *) ac_try_echo=$ac_try;;
12692esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012693eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12694$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012696 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012697 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012698 (exit $ac_status); }; }; then
12699 ac_cv_sizeof__Bool=`cat conftest.val`
12700else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012701 $as_echo "$as_me: program exited with status $ac_status" >&5
12702$as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012703sed 's/^/| /' conftest.$ac_ext >&5
12704
12705( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012706if test "$ac_cv_type__Bool" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012707 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12708$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12709{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012710See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012711$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012712See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012713 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012714 else
12715 ac_cv_sizeof__Bool=0
12716 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012717fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012718rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012719rm -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 +000012720fi
12721rm -f conftest.val
12722fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012723{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12724$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012725
12726
12727
Thomas Woutersb2137042007-02-01 18:02:27 +000012728cat >>confdefs.h <<_ACEOF
12729#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12730_ACEOF
12731
12732
12733fi
12734
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012735{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
12736$as_echo_n "checking for uintptr_t... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012737if test "${ac_cv_type_uintptr_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012738 $as_echo_n "(cached) " >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012739else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012740 ac_cv_type_uintptr_t=no
12741cat >conftest.$ac_ext <<_ACEOF
12742/* confdefs.h. */
12743_ACEOF
12744cat confdefs.h >>conftest.$ac_ext
12745cat >>conftest.$ac_ext <<_ACEOF
12746/* end confdefs.h. */
12747#ifdef HAVE_STDINT_H
12748 #include <stdint.h>
12749 #endif
12750
12751int
12752main ()
12753{
12754if (sizeof (uintptr_t))
12755 return 0;
12756 ;
12757 return 0;
12758}
12759_ACEOF
12760rm -f conftest.$ac_objext
12761if { (ac_try="$ac_compile"
12762case "(($ac_try" in
12763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12764 *) ac_try_echo=$ac_try;;
12765esac
12766eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12767$as_echo "$ac_try_echo") >&5
12768 (eval "$ac_compile") 2>conftest.er1
12769 ac_status=$?
12770 grep -v '^ *+' conftest.er1 >conftest.err
12771 rm -f conftest.er1
12772 cat conftest.err >&5
12773 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12774 (exit $ac_status); } && {
12775 test -z "$ac_c_werror_flag" ||
12776 test ! -s conftest.err
12777 } && test -s conftest.$ac_objext; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012778 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012779/* confdefs.h. */
12780_ACEOF
12781cat confdefs.h >>conftest.$ac_ext
12782cat >>conftest.$ac_ext <<_ACEOF
12783/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012784#ifdef HAVE_STDINT_H
12785 #include <stdint.h>
12786 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012787
Martin v. Löwis11437992002-04-12 09:54:03 +000012788int
12789main ()
12790{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012791if (sizeof ((uintptr_t)))
12792 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012793 ;
12794 return 0;
12795}
12796_ACEOF
12797rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012798if { (ac_try="$ac_compile"
12799case "(($ac_try" in
12800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12801 *) ac_try_echo=$ac_try;;
12802esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012803eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12804$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012805 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012807 grep -v '^ *+' conftest.er1 >conftest.err
12808 rm -f conftest.er1
12809 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012810 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012811 (exit $ac_status); } && {
12812 test -z "$ac_c_werror_flag" ||
12813 test ! -s conftest.err
12814 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012815 :
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012816else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012817 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012818sed 's/^/| /' conftest.$ac_ext >&5
12819
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012820 ac_cv_type_uintptr_t=yes
12821fi
12822
12823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12824else
12825 $as_echo "$as_me: failed program was:" >&5
12826sed 's/^/| /' conftest.$ac_ext >&5
12827
12828
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012830
12831rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012832fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012833{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12834$as_echo "$ac_cv_type_uintptr_t" >&6; }
12835if test "x$ac_cv_type_uintptr_t" = x""yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012836
12837cat >>confdefs.h <<_ACEOF
12838#define HAVE_UINTPTR_T 1
12839_ACEOF
12840
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012841# The cast to long int works around a bug in the HP C Compiler
12842# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12843# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12844# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012845{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12846$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012847if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012848 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012849else
Martin v. Löwis11437992002-04-12 09:54:03 +000012850 if test "$cross_compiling" = yes; then
12851 # Depending upon the size, compute the lo and hi bounds.
12852cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012853/* confdefs.h. */
12854_ACEOF
12855cat confdefs.h >>conftest.$ac_ext
12856cat >>conftest.$ac_ext <<_ACEOF
12857/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012858$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012859int
12860main ()
12861{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012862static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012863test_array [0] = 0
12864
12865 ;
12866 return 0;
12867}
12868_ACEOF
12869rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012870if { (ac_try="$ac_compile"
12871case "(($ac_try" in
12872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12873 *) ac_try_echo=$ac_try;;
12874esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012875eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12876$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012877 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012878 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012879 grep -v '^ *+' conftest.er1 >conftest.err
12880 rm -f conftest.er1
12881 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012882 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012883 (exit $ac_status); } && {
12884 test -z "$ac_c_werror_flag" ||
12885 test ! -s conftest.err
12886 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012887 ac_lo=0 ac_mid=0
12888 while :; do
12889 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012890/* confdefs.h. */
12891_ACEOF
12892cat confdefs.h >>conftest.$ac_ext
12893cat >>conftest.$ac_ext <<_ACEOF
12894/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012895$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012896int
12897main ()
12898{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012899static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012900test_array [0] = 0
12901
12902 ;
12903 return 0;
12904}
12905_ACEOF
12906rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012907if { (ac_try="$ac_compile"
12908case "(($ac_try" in
12909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12910 *) ac_try_echo=$ac_try;;
12911esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012912eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12913$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012914 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012915 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012916 grep -v '^ *+' conftest.er1 >conftest.err
12917 rm -f conftest.er1
12918 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012919 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012920 (exit $ac_status); } && {
12921 test -z "$ac_c_werror_flag" ||
12922 test ! -s conftest.err
12923 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ac_hi=$ac_mid; break
12925else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012926 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012927sed 's/^/| /' conftest.$ac_ext >&5
12928
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929 ac_lo=`expr $ac_mid + 1`
12930 if test $ac_lo -le $ac_mid; then
12931 ac_lo= ac_hi=
12932 break
12933 fi
12934 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012935fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012936
12937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012938 done
12939else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012940 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012941sed 's/^/| /' conftest.$ac_ext >&5
12942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012943 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012944/* confdefs.h. */
12945_ACEOF
12946cat confdefs.h >>conftest.$ac_ext
12947cat >>conftest.$ac_ext <<_ACEOF
12948/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012949$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012950int
12951main ()
12952{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012953static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012954test_array [0] = 0
12955
12956 ;
12957 return 0;
12958}
12959_ACEOF
12960rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012961if { (ac_try="$ac_compile"
12962case "(($ac_try" in
12963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12964 *) ac_try_echo=$ac_try;;
12965esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012966eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12967$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012968 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012970 grep -v '^ *+' conftest.er1 >conftest.err
12971 rm -f conftest.er1
12972 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012973 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012974 (exit $ac_status); } && {
12975 test -z "$ac_c_werror_flag" ||
12976 test ! -s conftest.err
12977 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 ac_hi=-1 ac_mid=-1
12979 while :; do
12980 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012981/* confdefs.h. */
12982_ACEOF
12983cat confdefs.h >>conftest.$ac_ext
12984cat >>conftest.$ac_ext <<_ACEOF
12985/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012986$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012987int
12988main ()
12989{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000012990static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012991test_array [0] = 0
12992
12993 ;
12994 return 0;
12995}
12996_ACEOF
12997rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012998if { (ac_try="$ac_compile"
12999case "(($ac_try" in
13000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13001 *) ac_try_echo=$ac_try;;
13002esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013003eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13004$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013006 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013007 grep -v '^ *+' conftest.er1 >conftest.err
13008 rm -f conftest.er1
13009 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013010 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013011 (exit $ac_status); } && {
13012 test -z "$ac_c_werror_flag" ||
13013 test ! -s conftest.err
13014 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 ac_lo=$ac_mid; break
13016else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013017 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013018sed 's/^/| /' conftest.$ac_ext >&5
13019
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020 ac_hi=`expr '(' $ac_mid ')' - 1`
13021 if test $ac_mid -le $ac_hi; then
13022 ac_lo= ac_hi=
13023 break
13024 fi
13025 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000013026fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013027
13028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013029 done
13030else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013031 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013032sed 's/^/| /' conftest.$ac_ext >&5
13033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013034 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000013035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013036
13037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013038fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013039
13040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013041# Binary search between lo and hi bounds.
13042while test "x$ac_lo" != "x$ac_hi"; do
13043 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013045/* confdefs.h. */
13046_ACEOF
13047cat confdefs.h >>conftest.$ac_ext
13048cat >>conftest.$ac_ext <<_ACEOF
13049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013050$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013051int
13052main ()
13053{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013054static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000013055test_array [0] = 0
13056
13057 ;
13058 return 0;
13059}
13060_ACEOF
13061rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013062if { (ac_try="$ac_compile"
13063case "(($ac_try" in
13064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13065 *) ac_try_echo=$ac_try;;
13066esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013067eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13068$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013069 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013070 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013071 grep -v '^ *+' conftest.er1 >conftest.err
13072 rm -f conftest.er1
13073 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013074 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013075 (exit $ac_status); } && {
13076 test -z "$ac_c_werror_flag" ||
13077 test ! -s conftest.err
13078 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 ac_hi=$ac_mid
13080else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013081 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013082sed 's/^/| /' conftest.$ac_ext >&5
13083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013084 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000013085fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013086
13087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013088done
13089case $ac_lo in
13090?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013091'') if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013092 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13093$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13094{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013095See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013096$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013097See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013098 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013099 else
13100 ac_cv_sizeof_uintptr_t=0
13101 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013102esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013103else
Martin v. Löwis11437992002-04-12 09:54:03 +000013104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013105/* confdefs.h. */
13106_ACEOF
13107cat confdefs.h >>conftest.$ac_ext
13108cat >>conftest.$ac_ext <<_ACEOF
13109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013110$ac_includes_default
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013111static long int longval () { return (long int) (sizeof (uintptr_t)); }
13112static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013113#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013114#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013115int
13116main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013117{
Martin v. Löwis11437992002-04-12 09:54:03 +000013118
13119 FILE *f = fopen ("conftest.val", "w");
13120 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013121 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013122 if (((long int) (sizeof (uintptr_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013123 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013124 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013125 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013126 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013127 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013128 }
13129 else
13130 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013131 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013132 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013134 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013135 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013136 /* Do not output a trailing newline, as this causes \r\n confusion
13137 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013138 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013139
13140 ;
13141 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013142}
Martin v. Löwis11437992002-04-12 09:54:03 +000013143_ACEOF
13144rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145if { (ac_try="$ac_link"
13146case "(($ac_try" in
13147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13148 *) ac_try_echo=$ac_try;;
13149esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013150eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13151$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013152 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013153 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013154 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013155 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013156 { (case "(($ac_try" in
13157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13158 *) ac_try_echo=$ac_try;;
13159esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013160eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13161$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013162 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013163 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013164 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013165 (exit $ac_status); }; }; then
13166 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013167else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013168 $as_echo "$as_me: program exited with status $ac_status" >&5
13169$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013170sed 's/^/| /' conftest.$ac_ext >&5
13171
Martin v. Löwis11437992002-04-12 09:54:03 +000013172( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013173if test "$ac_cv_type_uintptr_t" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013174 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13175$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13176{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013177See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013178$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013179See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013180 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013181 else
13182 ac_cv_sizeof_uintptr_t=0
13183 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013184fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013185rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013186rm -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 +000013187fi
13188rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013189fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013190{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13191$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013192
13193
13194
Martin v. Löwis11437992002-04-12 09:54:03 +000013195cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013196#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013197_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013198
Michael W. Hudson54241132001-12-07 15:38:26 +000013199
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013200fi
13201
Thomas Wouters89f507f2006-12-13 04:49:30 +000013202
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013203# The cast to long int works around a bug in the HP C Compiler
13204# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13205# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13206# This bug is HP SR number 8606223364.
13207{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5
13208$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013209if test "${ac_cv_sizeof_off_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013210 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013211else
13212 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013213 # Depending upon the size, compute the lo and hi bounds.
13214cat >conftest.$ac_ext <<_ACEOF
13215/* confdefs.h. */
13216_ACEOF
13217cat confdefs.h >>conftest.$ac_ext
13218cat >>conftest.$ac_ext <<_ACEOF
13219/* end confdefs.h. */
13220
13221#ifdef HAVE_SYS_TYPES_H
13222#include <sys/types.h>
13223#endif
13224
13225
13226int
13227main ()
13228{
13229static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)];
13230test_array [0] = 0
13231
13232 ;
13233 return 0;
13234}
13235_ACEOF
13236rm -f conftest.$ac_objext
13237if { (ac_try="$ac_compile"
13238case "(($ac_try" in
13239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13240 *) ac_try_echo=$ac_try;;
13241esac
13242eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13243$as_echo "$ac_try_echo") >&5
13244 (eval "$ac_compile") 2>conftest.er1
13245 ac_status=$?
13246 grep -v '^ *+' conftest.er1 >conftest.err
13247 rm -f conftest.er1
13248 cat conftest.err >&5
13249 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13250 (exit $ac_status); } && {
13251 test -z "$ac_c_werror_flag" ||
13252 test ! -s conftest.err
13253 } && test -s conftest.$ac_objext; then
13254 ac_lo=0 ac_mid=0
13255 while :; do
13256 cat >conftest.$ac_ext <<_ACEOF
13257/* confdefs.h. */
13258_ACEOF
13259cat confdefs.h >>conftest.$ac_ext
13260cat >>conftest.$ac_ext <<_ACEOF
13261/* end confdefs.h. */
13262
13263#ifdef HAVE_SYS_TYPES_H
13264#include <sys/types.h>
13265#endif
13266
13267
13268int
13269main ()
13270{
13271static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
13272test_array [0] = 0
13273
13274 ;
13275 return 0;
13276}
13277_ACEOF
13278rm -f conftest.$ac_objext
13279if { (ac_try="$ac_compile"
13280case "(($ac_try" in
13281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13282 *) ac_try_echo=$ac_try;;
13283esac
13284eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13285$as_echo "$ac_try_echo") >&5
13286 (eval "$ac_compile") 2>conftest.er1
13287 ac_status=$?
13288 grep -v '^ *+' conftest.er1 >conftest.err
13289 rm -f conftest.er1
13290 cat conftest.err >&5
13291 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13292 (exit $ac_status); } && {
13293 test -z "$ac_c_werror_flag" ||
13294 test ! -s conftest.err
13295 } && test -s conftest.$ac_objext; then
13296 ac_hi=$ac_mid; break
13297else
13298 $as_echo "$as_me: failed program was:" >&5
13299sed 's/^/| /' conftest.$ac_ext >&5
13300
13301 ac_lo=`expr $ac_mid + 1`
13302 if test $ac_lo -le $ac_mid; then
13303 ac_lo= ac_hi=
13304 break
13305 fi
13306 ac_mid=`expr 2 '*' $ac_mid + 1`
13307fi
13308
13309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13310 done
13311else
13312 $as_echo "$as_me: failed program was:" >&5
13313sed 's/^/| /' conftest.$ac_ext >&5
13314
13315 cat >conftest.$ac_ext <<_ACEOF
13316/* confdefs.h. */
13317_ACEOF
13318cat confdefs.h >>conftest.$ac_ext
13319cat >>conftest.$ac_ext <<_ACEOF
13320/* end confdefs.h. */
13321
13322#ifdef HAVE_SYS_TYPES_H
13323#include <sys/types.h>
13324#endif
13325
13326
13327int
13328main ()
13329{
13330static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)];
13331test_array [0] = 0
13332
13333 ;
13334 return 0;
13335}
13336_ACEOF
13337rm -f conftest.$ac_objext
13338if { (ac_try="$ac_compile"
13339case "(($ac_try" in
13340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13341 *) ac_try_echo=$ac_try;;
13342esac
13343eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13344$as_echo "$ac_try_echo") >&5
13345 (eval "$ac_compile") 2>conftest.er1
13346 ac_status=$?
13347 grep -v '^ *+' conftest.er1 >conftest.err
13348 rm -f conftest.er1
13349 cat conftest.err >&5
13350 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13351 (exit $ac_status); } && {
13352 test -z "$ac_c_werror_flag" ||
13353 test ! -s conftest.err
13354 } && test -s conftest.$ac_objext; then
13355 ac_hi=-1 ac_mid=-1
13356 while :; do
13357 cat >conftest.$ac_ext <<_ACEOF
13358/* confdefs.h. */
13359_ACEOF
13360cat confdefs.h >>conftest.$ac_ext
13361cat >>conftest.$ac_ext <<_ACEOF
13362/* end confdefs.h. */
13363
13364#ifdef HAVE_SYS_TYPES_H
13365#include <sys/types.h>
13366#endif
13367
13368
13369int
13370main ()
13371{
13372static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)];
13373test_array [0] = 0
13374
13375 ;
13376 return 0;
13377}
13378_ACEOF
13379rm -f conftest.$ac_objext
13380if { (ac_try="$ac_compile"
13381case "(($ac_try" in
13382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13383 *) ac_try_echo=$ac_try;;
13384esac
13385eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13386$as_echo "$ac_try_echo") >&5
13387 (eval "$ac_compile") 2>conftest.er1
13388 ac_status=$?
13389 grep -v '^ *+' conftest.er1 >conftest.err
13390 rm -f conftest.er1
13391 cat conftest.err >&5
13392 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13393 (exit $ac_status); } && {
13394 test -z "$ac_c_werror_flag" ||
13395 test ! -s conftest.err
13396 } && test -s conftest.$ac_objext; then
13397 ac_lo=$ac_mid; break
13398else
13399 $as_echo "$as_me: failed program was:" >&5
13400sed 's/^/| /' conftest.$ac_ext >&5
13401
13402 ac_hi=`expr '(' $ac_mid ')' - 1`
13403 if test $ac_mid -le $ac_hi; then
13404 ac_lo= ac_hi=
13405 break
13406 fi
13407 ac_mid=`expr 2 '*' $ac_mid`
13408fi
13409
13410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13411 done
13412else
13413 $as_echo "$as_me: failed program was:" >&5
13414sed 's/^/| /' conftest.$ac_ext >&5
13415
13416 ac_lo= ac_hi=
13417fi
13418
13419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13420fi
13421
13422rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13423# Binary search between lo and hi bounds.
13424while test "x$ac_lo" != "x$ac_hi"; do
13425 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13426 cat >conftest.$ac_ext <<_ACEOF
13427/* confdefs.h. */
13428_ACEOF
13429cat confdefs.h >>conftest.$ac_ext
13430cat >>conftest.$ac_ext <<_ACEOF
13431/* end confdefs.h. */
13432
13433#ifdef HAVE_SYS_TYPES_H
13434#include <sys/types.h>
13435#endif
13436
13437
13438int
13439main ()
13440{
13441static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
13442test_array [0] = 0
13443
13444 ;
13445 return 0;
13446}
13447_ACEOF
13448rm -f conftest.$ac_objext
13449if { (ac_try="$ac_compile"
13450case "(($ac_try" in
13451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13452 *) ac_try_echo=$ac_try;;
13453esac
13454eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13455$as_echo "$ac_try_echo") >&5
13456 (eval "$ac_compile") 2>conftest.er1
13457 ac_status=$?
13458 grep -v '^ *+' conftest.er1 >conftest.err
13459 rm -f conftest.er1
13460 cat conftest.err >&5
13461 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13462 (exit $ac_status); } && {
13463 test -z "$ac_c_werror_flag" ||
13464 test ! -s conftest.err
13465 } && test -s conftest.$ac_objext; then
13466 ac_hi=$ac_mid
13467else
13468 $as_echo "$as_me: failed program was:" >&5
13469sed 's/^/| /' conftest.$ac_ext >&5
13470
13471 ac_lo=`expr '(' $ac_mid ')' + 1`
13472fi
13473
13474rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13475done
13476case $ac_lo in
13477?*) ac_cv_sizeof_off_t=$ac_lo;;
13478'') if test "$ac_cv_type_off_t" = yes; then
13479 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13480$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13481{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13482See \`config.log' for more details." >&5
13483$as_echo "$as_me: error: cannot compute sizeof (off_t)
13484See \`config.log' for more details." >&2;}
13485 { (exit 77); exit 77; }; }; }
13486 else
13487 ac_cv_sizeof_off_t=0
13488 fi ;;
13489esac
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013490else
Martin v. Löwis11437992002-04-12 09:54:03 +000013491 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013492/* confdefs.h. */
13493_ACEOF
13494cat confdefs.h >>conftest.$ac_ext
13495cat >>conftest.$ac_ext <<_ACEOF
13496/* end confdefs.h. */
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013497
13498#ifdef HAVE_SYS_TYPES_H
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013499#include <sys/types.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013500#endif
13501
13502
13503static long int longval () { return (long int) (sizeof (off_t)); }
13504static unsigned long int ulongval () { return (long int) (sizeof (off_t)); }
13505#include <stdio.h>
13506#include <stdlib.h>
13507int
13508main ()
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013509{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013510
13511 FILE *f = fopen ("conftest.val", "w");
13512 if (! f)
13513 return 1;
13514 if (((long int) (sizeof (off_t))) < 0)
13515 {
13516 long int i = longval ();
13517 if (i != ((long int) (sizeof (off_t))))
13518 return 1;
13519 fprintf (f, "%ld", i);
13520 }
13521 else
13522 {
13523 unsigned long int i = ulongval ();
13524 if (i != ((long int) (sizeof (off_t))))
13525 return 1;
13526 fprintf (f, "%lu", i);
13527 }
13528 /* Do not output a trailing newline, as this causes \r\n confusion
13529 on some platforms. */
13530 return ferror (f) || fclose (f) != 0;
13531
13532 ;
13533 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013534}
Martin v. Löwis11437992002-04-12 09:54:03 +000013535_ACEOF
13536rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537if { (ac_try="$ac_link"
13538case "(($ac_try" in
13539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13540 *) ac_try_echo=$ac_try;;
13541esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013542eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13543$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013544 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013545 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013546 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013547 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013548 { (case "(($ac_try" in
13549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13550 *) ac_try_echo=$ac_try;;
13551esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013552eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13553$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013554 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013555 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013556 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013557 (exit $ac_status); }; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013558 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013559else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013560 $as_echo "$as_me: program exited with status $ac_status" >&5
13561$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013562sed 's/^/| /' conftest.$ac_ext >&5
13563
Martin v. Löwis11437992002-04-12 09:54:03 +000013564( exit $ac_status )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013565if test "$ac_cv_type_off_t" = yes; then
13566 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13567$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13568{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
13569See \`config.log' for more details." >&5
13570$as_echo "$as_me: error: cannot compute sizeof (off_t)
13571See \`config.log' for more details." >&2;}
13572 { (exit 77); exit 77; }; }; }
13573 else
13574 ac_cv_sizeof_off_t=0
13575 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013576fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013577rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013578rm -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 +000013579fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013580rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013581fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013582{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13583$as_echo "$ac_cv_sizeof_off_t" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013584
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013585
Martin v. Löwis11437992002-04-12 09:54:03 +000013586
13587cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013588#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013589_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013590
Michael W. Hudson54241132001-12-07 15:38:26 +000013591
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013592
13593{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13594$as_echo_n "checking whether to enable large file support... " >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013595if test "$have_long_long" = yes -a \
13596 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13597 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013598
Martin v. Löwis11437992002-04-12 09:54:03 +000013599cat >>confdefs.h <<\_ACEOF
13600#define HAVE_LARGEFILE_SUPPORT 1
13601_ACEOF
13602
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013603 { $as_echo "$as_me:$LINENO: result: yes" >&5
13604$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013605else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013606 { $as_echo "$as_me:$LINENO: result: no" >&5
13607$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013608fi
13609
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013610# The cast to long int works around a bug in the HP C Compiler
13611# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13612# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13613# This bug is HP SR number 8606223364.
13614{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5
13615$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013616if test "${ac_cv_sizeof_time_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013617 $as_echo_n "(cached) " >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013618else
13619 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013620 # Depending upon the size, compute the lo and hi bounds.
13621cat >conftest.$ac_ext <<_ACEOF
13622/* confdefs.h. */
13623_ACEOF
13624cat confdefs.h >>conftest.$ac_ext
13625cat >>conftest.$ac_ext <<_ACEOF
13626/* end confdefs.h. */
13627
13628#ifdef HAVE_SYS_TYPES_H
13629#include <sys/types.h>
13630#endif
13631#ifdef HAVE_TIME_H
13632#include <time.h>
13633#endif
13634
13635
13636int
13637main ()
13638{
13639static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= 0)];
13640test_array [0] = 0
13641
13642 ;
13643 return 0;
13644}
13645_ACEOF
13646rm -f conftest.$ac_objext
13647if { (ac_try="$ac_compile"
13648case "(($ac_try" in
13649 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13650 *) ac_try_echo=$ac_try;;
13651esac
13652eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13653$as_echo "$ac_try_echo") >&5
13654 (eval "$ac_compile") 2>conftest.er1
13655 ac_status=$?
13656 grep -v '^ *+' conftest.er1 >conftest.err
13657 rm -f conftest.er1
13658 cat conftest.err >&5
13659 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13660 (exit $ac_status); } && {
13661 test -z "$ac_c_werror_flag" ||
13662 test ! -s conftest.err
13663 } && test -s conftest.$ac_objext; then
13664 ac_lo=0 ac_mid=0
13665 while :; do
13666 cat >conftest.$ac_ext <<_ACEOF
13667/* confdefs.h. */
13668_ACEOF
13669cat confdefs.h >>conftest.$ac_ext
13670cat >>conftest.$ac_ext <<_ACEOF
13671/* end confdefs.h. */
13672
13673#ifdef HAVE_SYS_TYPES_H
13674#include <sys/types.h>
13675#endif
13676#ifdef HAVE_TIME_H
13677#include <time.h>
13678#endif
13679
13680
13681int
13682main ()
13683{
13684static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)];
13685test_array [0] = 0
13686
13687 ;
13688 return 0;
13689}
13690_ACEOF
13691rm -f conftest.$ac_objext
13692if { (ac_try="$ac_compile"
13693case "(($ac_try" in
13694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13695 *) ac_try_echo=$ac_try;;
13696esac
13697eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13698$as_echo "$ac_try_echo") >&5
13699 (eval "$ac_compile") 2>conftest.er1
13700 ac_status=$?
13701 grep -v '^ *+' conftest.er1 >conftest.err
13702 rm -f conftest.er1
13703 cat conftest.err >&5
13704 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13705 (exit $ac_status); } && {
13706 test -z "$ac_c_werror_flag" ||
13707 test ! -s conftest.err
13708 } && test -s conftest.$ac_objext; then
13709 ac_hi=$ac_mid; break
13710else
13711 $as_echo "$as_me: failed program was:" >&5
13712sed 's/^/| /' conftest.$ac_ext >&5
13713
13714 ac_lo=`expr $ac_mid + 1`
13715 if test $ac_lo -le $ac_mid; then
13716 ac_lo= ac_hi=
13717 break
13718 fi
13719 ac_mid=`expr 2 '*' $ac_mid + 1`
13720fi
13721
13722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13723 done
13724else
13725 $as_echo "$as_me: failed program was:" >&5
13726sed 's/^/| /' conftest.$ac_ext >&5
13727
13728 cat >conftest.$ac_ext <<_ACEOF
13729/* confdefs.h. */
13730_ACEOF
13731cat confdefs.h >>conftest.$ac_ext
13732cat >>conftest.$ac_ext <<_ACEOF
13733/* end confdefs.h. */
13734
13735#ifdef HAVE_SYS_TYPES_H
13736#include <sys/types.h>
13737#endif
13738#ifdef HAVE_TIME_H
13739#include <time.h>
13740#endif
13741
13742
13743int
13744main ()
13745{
13746static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) < 0)];
13747test_array [0] = 0
13748
13749 ;
13750 return 0;
13751}
13752_ACEOF
13753rm -f conftest.$ac_objext
13754if { (ac_try="$ac_compile"
13755case "(($ac_try" in
13756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13757 *) ac_try_echo=$ac_try;;
13758esac
13759eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13760$as_echo "$ac_try_echo") >&5
13761 (eval "$ac_compile") 2>conftest.er1
13762 ac_status=$?
13763 grep -v '^ *+' conftest.er1 >conftest.err
13764 rm -f conftest.er1
13765 cat conftest.err >&5
13766 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13767 (exit $ac_status); } && {
13768 test -z "$ac_c_werror_flag" ||
13769 test ! -s conftest.err
13770 } && test -s conftest.$ac_objext; then
13771 ac_hi=-1 ac_mid=-1
13772 while :; do
13773 cat >conftest.$ac_ext <<_ACEOF
13774/* confdefs.h. */
13775_ACEOF
13776cat confdefs.h >>conftest.$ac_ext
13777cat >>conftest.$ac_ext <<_ACEOF
13778/* end confdefs.h. */
13779
13780#ifdef HAVE_SYS_TYPES_H
13781#include <sys/types.h>
13782#endif
13783#ifdef HAVE_TIME_H
13784#include <time.h>
13785#endif
13786
13787
13788int
13789main ()
13790{
13791static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= $ac_mid)];
13792test_array [0] = 0
13793
13794 ;
13795 return 0;
13796}
13797_ACEOF
13798rm -f conftest.$ac_objext
13799if { (ac_try="$ac_compile"
13800case "(($ac_try" in
13801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13802 *) ac_try_echo=$ac_try;;
13803esac
13804eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13805$as_echo "$ac_try_echo") >&5
13806 (eval "$ac_compile") 2>conftest.er1
13807 ac_status=$?
13808 grep -v '^ *+' conftest.er1 >conftest.err
13809 rm -f conftest.er1
13810 cat conftest.err >&5
13811 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13812 (exit $ac_status); } && {
13813 test -z "$ac_c_werror_flag" ||
13814 test ! -s conftest.err
13815 } && test -s conftest.$ac_objext; then
13816 ac_lo=$ac_mid; break
13817else
13818 $as_echo "$as_me: failed program was:" >&5
13819sed 's/^/| /' conftest.$ac_ext >&5
13820
13821 ac_hi=`expr '(' $ac_mid ')' - 1`
13822 if test $ac_mid -le $ac_hi; then
13823 ac_lo= ac_hi=
13824 break
13825 fi
13826 ac_mid=`expr 2 '*' $ac_mid`
13827fi
13828
13829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13830 done
13831else
13832 $as_echo "$as_me: failed program was:" >&5
13833sed 's/^/| /' conftest.$ac_ext >&5
13834
13835 ac_lo= ac_hi=
13836fi
13837
13838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13839fi
13840
13841rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13842# Binary search between lo and hi bounds.
13843while test "x$ac_lo" != "x$ac_hi"; do
13844 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13845 cat >conftest.$ac_ext <<_ACEOF
13846/* confdefs.h. */
13847_ACEOF
13848cat confdefs.h >>conftest.$ac_ext
13849cat >>conftest.$ac_ext <<_ACEOF
13850/* end confdefs.h. */
13851
13852#ifdef HAVE_SYS_TYPES_H
13853#include <sys/types.h>
13854#endif
13855#ifdef HAVE_TIME_H
13856#include <time.h>
13857#endif
13858
13859
13860int
13861main ()
13862{
13863static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)];
13864test_array [0] = 0
13865
13866 ;
13867 return 0;
13868}
13869_ACEOF
13870rm -f conftest.$ac_objext
13871if { (ac_try="$ac_compile"
13872case "(($ac_try" in
13873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13874 *) ac_try_echo=$ac_try;;
13875esac
13876eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13877$as_echo "$ac_try_echo") >&5
13878 (eval "$ac_compile") 2>conftest.er1
13879 ac_status=$?
13880 grep -v '^ *+' conftest.er1 >conftest.err
13881 rm -f conftest.er1
13882 cat conftest.err >&5
13883 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
13884 (exit $ac_status); } && {
13885 test -z "$ac_c_werror_flag" ||
13886 test ! -s conftest.err
13887 } && test -s conftest.$ac_objext; then
13888 ac_hi=$ac_mid
13889else
13890 $as_echo "$as_me: failed program was:" >&5
13891sed 's/^/| /' conftest.$ac_ext >&5
13892
13893 ac_lo=`expr '(' $ac_mid ')' + 1`
13894fi
13895
13896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13897done
13898case $ac_lo in
13899?*) ac_cv_sizeof_time_t=$ac_lo;;
13900'') if test "$ac_cv_type_time_t" = yes; then
13901 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13902$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13903{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13904See \`config.log' for more details." >&5
13905$as_echo "$as_me: error: cannot compute sizeof (time_t)
13906See \`config.log' for more details." >&2;}
13907 { (exit 77); exit 77; }; }; }
13908 else
13909 ac_cv_sizeof_time_t=0
13910 fi ;;
13911esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013912else
Martin v. Löwis11437992002-04-12 09:54:03 +000013913 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013914/* confdefs.h. */
13915_ACEOF
13916cat confdefs.h >>conftest.$ac_ext
13917cat >>conftest.$ac_ext <<_ACEOF
13918/* end confdefs.h. */
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013919
13920#ifdef HAVE_SYS_TYPES_H
13921#include <sys/types.h>
13922#endif
13923#ifdef HAVE_TIME_H
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013924#include <time.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013925#endif
13926
13927
13928static long int longval () { return (long int) (sizeof (time_t)); }
13929static unsigned long int ulongval () { return (long int) (sizeof (time_t)); }
13930#include <stdio.h>
13931#include <stdlib.h>
13932int
13933main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013934{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013935
13936 FILE *f = fopen ("conftest.val", "w");
13937 if (! f)
13938 return 1;
13939 if (((long int) (sizeof (time_t))) < 0)
13940 {
13941 long int i = longval ();
13942 if (i != ((long int) (sizeof (time_t))))
13943 return 1;
13944 fprintf (f, "%ld", i);
13945 }
13946 else
13947 {
13948 unsigned long int i = ulongval ();
13949 if (i != ((long int) (sizeof (time_t))))
13950 return 1;
13951 fprintf (f, "%lu", i);
13952 }
13953 /* Do not output a trailing newline, as this causes \r\n confusion
13954 on some platforms. */
13955 return ferror (f) || fclose (f) != 0;
13956
13957 ;
13958 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013959}
Martin v. Löwis11437992002-04-12 09:54:03 +000013960_ACEOF
13961rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013962if { (ac_try="$ac_link"
13963case "(($ac_try" in
13964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13965 *) ac_try_echo=$ac_try;;
13966esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013967eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13968$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013969 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013970 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013971 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013972 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013973 { (case "(($ac_try" in
13974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13975 *) ac_try_echo=$ac_try;;
13976esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013977eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13978$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013979 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013980 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013981 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013982 (exit $ac_status); }; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013983 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013984else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013985 $as_echo "$as_me: program exited with status $ac_status" >&5
13986$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013987sed 's/^/| /' conftest.$ac_ext >&5
13988
Martin v. Löwis11437992002-04-12 09:54:03 +000013989( exit $ac_status )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000013990if test "$ac_cv_type_time_t" = yes; then
13991 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13992$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13993{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
13994See \`config.log' for more details." >&5
13995$as_echo "$as_me: error: cannot compute sizeof (time_t)
13996See \`config.log' for more details." >&2;}
13997 { (exit 77); exit 77; }; }; }
13998 else
13999 ac_cv_sizeof_time_t=0
14000 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014001fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014002rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014003rm -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 +000014004fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014005rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014006fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014007{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
14008$as_echo "$ac_cv_sizeof_time_t" >&6; }
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014009
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014010
Martin v. Löwis11437992002-04-12 09:54:03 +000014011
14012cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014013#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014014_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014015
Michael W. Hudson54241132001-12-07 15:38:26 +000014016
14017
Trent Mick635f6fb2000-08-23 21:33:05 +000014018# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014019ac_save_cc="$CC"
14020if test "$ac_cv_kpthread" = "yes"
14021then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014022elif test "$ac_cv_kthread" = "yes"
14023then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014024elif test "$ac_cv_pthread" = "yes"
14025then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014026fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014027
14028{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5
14029$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014030have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014031cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014032/* confdefs.h. */
14033_ACEOF
14034cat confdefs.h >>conftest.$ac_ext
14035cat >>conftest.$ac_ext <<_ACEOF
14036/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014037#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014038int
14039main ()
14040{
Guido van Rossum12580492000-09-24 16:47:19 +000014041pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014042 ;
14043 return 0;
14044}
14045_ACEOF
14046rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014047if { (ac_try="$ac_compile"
14048case "(($ac_try" in
14049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14050 *) ac_try_echo=$ac_try;;
14051esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014052eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14053$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014056 grep -v '^ *+' conftest.er1 >conftest.err
14057 rm -f conftest.er1
14058 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014059 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014060 (exit $ac_status); } && {
14061 test -z "$ac_c_werror_flag" ||
14062 test ! -s conftest.err
14063 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014064 have_pthread_t=yes
14065else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014066 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014067sed 's/^/| /' conftest.$ac_ext >&5
14068
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069
Trent Mick635f6fb2000-08-23 21:33:05 +000014070fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014071
14072rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014073{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14074$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014075if test "$have_pthread_t" = yes ; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014076 # The cast to long int works around a bug in the HP C Compiler
14077# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14078# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14079# This bug is HP SR number 8606223364.
14080{ $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5
14081$as_echo_n "checking size of pthread_t... " >&6; }
14082if test "${ac_cv_sizeof_pthread_t+set}" = set; then
14083 $as_echo_n "(cached) " >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000014084else
14085 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014086 # Depending upon the size, compute the lo and hi bounds.
14087cat >conftest.$ac_ext <<_ACEOF
14088/* confdefs.h. */
14089_ACEOF
14090cat confdefs.h >>conftest.$ac_ext
14091cat >>conftest.$ac_ext <<_ACEOF
14092/* end confdefs.h. */
14093
14094#ifdef HAVE_PTHREAD_H
14095#include <pthread.h>
14096#endif
14097
14098
14099int
14100main ()
14101{
14102static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= 0)];
14103test_array [0] = 0
14104
14105 ;
14106 return 0;
14107}
14108_ACEOF
14109rm -f conftest.$ac_objext
14110if { (ac_try="$ac_compile"
14111case "(($ac_try" in
14112 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14113 *) ac_try_echo=$ac_try;;
14114esac
14115eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14116$as_echo "$ac_try_echo") >&5
14117 (eval "$ac_compile") 2>conftest.er1
14118 ac_status=$?
14119 grep -v '^ *+' conftest.er1 >conftest.err
14120 rm -f conftest.er1
14121 cat conftest.err >&5
14122 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14123 (exit $ac_status); } && {
14124 test -z "$ac_c_werror_flag" ||
14125 test ! -s conftest.err
14126 } && test -s conftest.$ac_objext; then
14127 ac_lo=0 ac_mid=0
14128 while :; do
14129 cat >conftest.$ac_ext <<_ACEOF
14130/* confdefs.h. */
14131_ACEOF
14132cat confdefs.h >>conftest.$ac_ext
14133cat >>conftest.$ac_ext <<_ACEOF
14134/* end confdefs.h. */
14135
14136#ifdef HAVE_PTHREAD_H
14137#include <pthread.h>
14138#endif
14139
14140
14141int
14142main ()
14143{
14144static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)];
14145test_array [0] = 0
14146
14147 ;
14148 return 0;
14149}
14150_ACEOF
14151rm -f conftest.$ac_objext
14152if { (ac_try="$ac_compile"
14153case "(($ac_try" in
14154 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14155 *) ac_try_echo=$ac_try;;
14156esac
14157eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14158$as_echo "$ac_try_echo") >&5
14159 (eval "$ac_compile") 2>conftest.er1
14160 ac_status=$?
14161 grep -v '^ *+' conftest.er1 >conftest.err
14162 rm -f conftest.er1
14163 cat conftest.err >&5
14164 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14165 (exit $ac_status); } && {
14166 test -z "$ac_c_werror_flag" ||
14167 test ! -s conftest.err
14168 } && test -s conftest.$ac_objext; then
14169 ac_hi=$ac_mid; break
14170else
14171 $as_echo "$as_me: failed program was:" >&5
14172sed 's/^/| /' conftest.$ac_ext >&5
14173
14174 ac_lo=`expr $ac_mid + 1`
14175 if test $ac_lo -le $ac_mid; then
14176 ac_lo= ac_hi=
14177 break
14178 fi
14179 ac_mid=`expr 2 '*' $ac_mid + 1`
14180fi
14181
14182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14183 done
14184else
14185 $as_echo "$as_me: failed program was:" >&5
14186sed 's/^/| /' conftest.$ac_ext >&5
14187
14188 cat >conftest.$ac_ext <<_ACEOF
14189/* confdefs.h. */
14190_ACEOF
14191cat confdefs.h >>conftest.$ac_ext
14192cat >>conftest.$ac_ext <<_ACEOF
14193/* end confdefs.h. */
14194
14195#ifdef HAVE_PTHREAD_H
14196#include <pthread.h>
14197#endif
14198
14199
14200int
14201main ()
14202{
14203static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) < 0)];
14204test_array [0] = 0
14205
14206 ;
14207 return 0;
14208}
14209_ACEOF
14210rm -f conftest.$ac_objext
14211if { (ac_try="$ac_compile"
14212case "(($ac_try" in
14213 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14214 *) ac_try_echo=$ac_try;;
14215esac
14216eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14217$as_echo "$ac_try_echo") >&5
14218 (eval "$ac_compile") 2>conftest.er1
14219 ac_status=$?
14220 grep -v '^ *+' conftest.er1 >conftest.err
14221 rm -f conftest.er1
14222 cat conftest.err >&5
14223 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14224 (exit $ac_status); } && {
14225 test -z "$ac_c_werror_flag" ||
14226 test ! -s conftest.err
14227 } && test -s conftest.$ac_objext; then
14228 ac_hi=-1 ac_mid=-1
14229 while :; do
14230 cat >conftest.$ac_ext <<_ACEOF
14231/* confdefs.h. */
14232_ACEOF
14233cat confdefs.h >>conftest.$ac_ext
14234cat >>conftest.$ac_ext <<_ACEOF
14235/* end confdefs.h. */
14236
14237#ifdef HAVE_PTHREAD_H
14238#include <pthread.h>
14239#endif
14240
14241
14242int
14243main ()
14244{
14245static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= $ac_mid)];
14246test_array [0] = 0
14247
14248 ;
14249 return 0;
14250}
14251_ACEOF
14252rm -f conftest.$ac_objext
14253if { (ac_try="$ac_compile"
14254case "(($ac_try" in
14255 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14256 *) ac_try_echo=$ac_try;;
14257esac
14258eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14259$as_echo "$ac_try_echo") >&5
14260 (eval "$ac_compile") 2>conftest.er1
14261 ac_status=$?
14262 grep -v '^ *+' conftest.er1 >conftest.err
14263 rm -f conftest.er1
14264 cat conftest.err >&5
14265 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14266 (exit $ac_status); } && {
14267 test -z "$ac_c_werror_flag" ||
14268 test ! -s conftest.err
14269 } && test -s conftest.$ac_objext; then
14270 ac_lo=$ac_mid; break
14271else
14272 $as_echo "$as_me: failed program was:" >&5
14273sed 's/^/| /' conftest.$ac_ext >&5
14274
14275 ac_hi=`expr '(' $ac_mid ')' - 1`
14276 if test $ac_mid -le $ac_hi; then
14277 ac_lo= ac_hi=
14278 break
14279 fi
14280 ac_mid=`expr 2 '*' $ac_mid`
14281fi
14282
14283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14284 done
14285else
14286 $as_echo "$as_me: failed program was:" >&5
14287sed 's/^/| /' conftest.$ac_ext >&5
14288
14289 ac_lo= ac_hi=
14290fi
14291
14292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14293fi
14294
14295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14296# Binary search between lo and hi bounds.
14297while test "x$ac_lo" != "x$ac_hi"; do
14298 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14299 cat >conftest.$ac_ext <<_ACEOF
14300/* confdefs.h. */
14301_ACEOF
14302cat confdefs.h >>conftest.$ac_ext
14303cat >>conftest.$ac_ext <<_ACEOF
14304/* end confdefs.h. */
14305
14306#ifdef HAVE_PTHREAD_H
14307#include <pthread.h>
14308#endif
14309
14310
14311int
14312main ()
14313{
14314static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)];
14315test_array [0] = 0
14316
14317 ;
14318 return 0;
14319}
14320_ACEOF
14321rm -f conftest.$ac_objext
14322if { (ac_try="$ac_compile"
14323case "(($ac_try" in
14324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14325 *) ac_try_echo=$ac_try;;
14326esac
14327eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14328$as_echo "$ac_try_echo") >&5
14329 (eval "$ac_compile") 2>conftest.er1
14330 ac_status=$?
14331 grep -v '^ *+' conftest.er1 >conftest.err
14332 rm -f conftest.er1
14333 cat conftest.err >&5
14334 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
14335 (exit $ac_status); } && {
14336 test -z "$ac_c_werror_flag" ||
14337 test ! -s conftest.err
14338 } && test -s conftest.$ac_objext; then
14339 ac_hi=$ac_mid
14340else
14341 $as_echo "$as_me: failed program was:" >&5
14342sed 's/^/| /' conftest.$ac_ext >&5
14343
14344 ac_lo=`expr '(' $ac_mid ')' + 1`
14345fi
14346
14347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14348done
14349case $ac_lo in
14350?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14351'') if test "$ac_cv_type_pthread_t" = yes; then
14352 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
14353$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14354{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14355See \`config.log' for more details." >&5
14356$as_echo "$as_me: error: cannot compute sizeof (pthread_t)
14357See \`config.log' for more details." >&2;}
14358 { (exit 77); exit 77; }; }; }
14359 else
14360 ac_cv_sizeof_pthread_t=0
14361 fi ;;
14362esac
Trent Mick635f6fb2000-08-23 21:33:05 +000014363else
Martin v. Löwis11437992002-04-12 09:54:03 +000014364 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014365/* confdefs.h. */
14366_ACEOF
14367cat confdefs.h >>conftest.$ac_ext
14368cat >>conftest.$ac_ext <<_ACEOF
14369/* end confdefs.h. */
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014370
14371#ifdef HAVE_PTHREAD_H
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014372#include <pthread.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014373#endif
14374
14375
14376static long int longval () { return (long int) (sizeof (pthread_t)); }
14377static unsigned long int ulongval () { return (long int) (sizeof (pthread_t)); }
14378#include <stdio.h>
14379#include <stdlib.h>
14380int
14381main ()
14382{
14383
14384 FILE *f = fopen ("conftest.val", "w");
14385 if (! f)
14386 return 1;
14387 if (((long int) (sizeof (pthread_t))) < 0)
14388 {
14389 long int i = longval ();
14390 if (i != ((long int) (sizeof (pthread_t))))
14391 return 1;
14392 fprintf (f, "%ld", i);
14393 }
14394 else
14395 {
14396 unsigned long int i = ulongval ();
14397 if (i != ((long int) (sizeof (pthread_t))))
14398 return 1;
14399 fprintf (f, "%lu", i);
14400 }
14401 /* Do not output a trailing newline, as this causes \r\n confusion
14402 on some platforms. */
14403 return ferror (f) || fclose (f) != 0;
14404
14405 ;
14406 return 0;
14407}
Martin v. Löwis11437992002-04-12 09:54:03 +000014408_ACEOF
14409rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014410if { (ac_try="$ac_link"
14411case "(($ac_try" in
14412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14413 *) ac_try_echo=$ac_try;;
14414esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014415eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14416$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014417 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014418 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014419 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014420 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014421 { (case "(($ac_try" in
14422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14423 *) ac_try_echo=$ac_try;;
14424esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014425eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14426$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014427 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014428 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014429 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014430 (exit $ac_status); }; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014431 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014432else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014433 $as_echo "$as_me: program exited with status $ac_status" >&5
14434$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014435sed 's/^/| /' conftest.$ac_ext >&5
14436
Martin v. Löwis11437992002-04-12 09:54:03 +000014437( exit $ac_status )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014438if test "$ac_cv_type_pthread_t" = yes; then
14439 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
14440$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14441{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
14442See \`config.log' for more details." >&5
14443$as_echo "$as_me: error: cannot compute sizeof (pthread_t)
14444See \`config.log' for more details." >&2;}
14445 { (exit 77); exit 77; }; }; }
14446 else
14447 ac_cv_sizeof_pthread_t=0
14448 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014449fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014450rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014451rm -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 +000014452fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014453rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014454fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014455{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14456$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014457
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014458
Martin v. Löwis11437992002-04-12 09:54:03 +000014459
14460cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014461#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014462_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014463
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014464
Trent Mick635f6fb2000-08-23 21:33:05 +000014465fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014466CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014467
Michael W. Hudson54241132001-12-07 15:38:26 +000014468
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014469case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014470 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014471 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14472 ;;
14473 Darwin/*)
14474 OTHER_LIBTOOL_OPT=""
14475 ;;
14476esac
14477
14478
14479case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014480 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014481 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14482 if test "${enable_universalsdk}"; then
14483 :
14484 else
14485 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
14486 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014487 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014488 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014489 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014490 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14491 if test ${gcc_version} '<' 4.0
14492 then
14493 LIBTOOL_CRUFT="-lcc_dynamic"
14494 else
14495 LIBTOOL_CRUFT=""
14496 fi
Jack Jansen39fd2312006-02-23 15:12:19 +000014497 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only `arch`"
Jack Jansenb36687a2004-07-16 08:43:47 +000014498 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014499 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014500esac
14501
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014502{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5
14503$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014504if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014505then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014506 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014507 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014508 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014509
Martin v. Löwis11437992002-04-12 09:54:03 +000014510cat >>confdefs.h <<\_ACEOF
14511#define WITH_NEXT_FRAMEWORK 1
14512_ACEOF
14513
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014514 { $as_echo "$as_me:$LINENO: result: yes" >&5
14515$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014516 if test $enable_shared = "yes"
14517 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014518 { { $as_echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14519$as_echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
Ronald Oussoren99aab652009-06-08 21:22:57 +000014520 { (exit 1); exit 1; }; }
14521 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014522else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014523 { $as_echo "$as_me:$LINENO: result: no" >&5
14524$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014525fi
14526
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014527{ $as_echo "$as_me:$LINENO: checking for dyld" >&5
14528$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014529case $ac_sys_system/$ac_sys_release in
14530 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014531
Martin v. Löwis11437992002-04-12 09:54:03 +000014532cat >>confdefs.h <<\_ACEOF
14533#define WITH_DYLD 1
14534_ACEOF
14535
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014536 { $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5
14537$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014538 ;;
14539 *)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014540 { $as_echo "$as_me:$LINENO: result: no" >&5
14541$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014542 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014543esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014544
Guido van Rossum0a516c91994-09-12 10:58:40 +000014545# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014546
Michael W. Hudson54241132001-12-07 15:38:26 +000014547
14548
14549
14550
Guido van Rossum0a516c91994-09-12 10:58:40 +000014551# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014552# -- usually .so, .sl on HP-UX, .dll on Cygwin
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014553{ $as_echo "$as_me:$LINENO: checking SO" >&5
14554$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014555if test -z "$SO"
14556then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014557 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014558 hp*|HP*)
14559 case `uname -m` in
14560 ia64) SO=.so;;
14561 *) SO=.sl;;
14562 esac
14563 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014564 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014565 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014566 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014567else
14568 # this might also be a termcap variable, see #610332
14569 echo
14570 echo '====================================================================='
14571 echo '+ +'
14572 echo '+ WARNING: You have set SO in your environment. +'
14573 echo '+ Do you really mean to change the extension for shared libraries? +'
14574 echo '+ Continuing in 10 seconds to let you to ponder. +'
14575 echo '+ +'
14576 echo '====================================================================='
14577 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014578fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014579{ $as_echo "$as_me:$LINENO: result: $SO" >&5
14580$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014581
Georg Brandlb1441c72009-01-03 22:33:39 +000014582
Thomas Wouters477c8d52006-05-27 19:21:47 +000014583cat >>confdefs.h <<_ACEOF
14584#define SHLIB_EXT "$SO"
14585_ACEOF
14586
Guido van Rossum0a516c91994-09-12 10:58:40 +000014587# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014588# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014589# (Shared libraries in this instance are shared modules to be loaded into
14590# Python, as opposed to building Python itself as a shared library.)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014591{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5
14592$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014593if test -z "$LDSHARED"
14594then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014595 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014596 AIX*)
14597 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014598 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014599 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014600 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014601 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014603 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014604 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014605 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014606 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014607 hp*|HP*)
14608 if test "$GCC" = "yes"
14609 then LDSHARED='$(CC) -shared'
14610 else LDSHARED='ld -b';
14611 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014612 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014613 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014614 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14615 if test "$enable_framework" ; then
14616 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014617 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14618 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014619 else
14620 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014621 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014622 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014623 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014624 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14625 if test "$enable_framework" ; then
14626 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014627 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14628 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014629 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014630 # No framework, use the Python app as bundle-loader
14631 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014632 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014633 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014634 Darwin/*)
14635 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14636 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014637
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014638 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014639 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014640 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014641 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014642 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014643 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14644 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014645 else
14646 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14647 if test "$enable_framework" ; then
14648 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014649 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14650 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014651 else
14652 # No framework, use the Python app as bundle-loader
14653 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14654 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14655 fi
14656 fi
14657 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014658 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014659 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014660 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014661 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014662 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014663 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014664 else
14665 LDSHARED="ld -Bshareable ${LDFLAGS}"
14666 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014667 OpenBSD*)
14668 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14669 then
14670 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14671 else
14672 case `uname -r` in
14673 [01].* | 2.[0-7] | 2.[0-7].*)
14674 LDSHARED="ld -Bshareable ${LDFLAGS}"
14675 ;;
14676 *)
14677 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14678 ;;
14679 esac
14680 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014681 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014682 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014683 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014684 then LDSHARED='$(CC) -shared'
14685 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014686 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014687 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000014688 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014689 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014690 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014691 *) LDSHARED="ld";;
14692 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014693fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014694{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5
14695$as_echo "$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014696BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014697# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014698# library (module) -- this is only needed for a few systems
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014699{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5
14700$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014701if test -z "$CCSHARED"
14702then
Guido van Rossum07397971997-04-29 21:49:50 +000014703 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014704 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014705 then CCSHARED="-fPIC";
14706 elif test `uname -p` = sparc;
14707 then CCSHARED="-xcode=pic32";
14708 else CCSHARED="-Kpic";
14709 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014710 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014711 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014712 else CCSHARED="+z";
14713 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014714 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014715 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014716 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014717 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014718 if test "$GCC" = "yes"
14719 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014720 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014721 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014722 SCO_SV*)
14723 if test "$GCC" = "yes"
14724 then CCSHARED="-fPIC"
14725 else CCSHARED="-Kpic -belf"
14726 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000014727 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014728 IRIX*/6*) case $CC in
14729 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014730 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014731 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014732 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014733 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014734fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014735{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5
14736$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014737# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014738# the python executable -- this is only needed for a few systems
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014739{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14740$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014741if test -z "$LINKFORSHARED"
14742then
Guido van Rossum07397971997-04-29 21:49:50 +000014743 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014744 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014745 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014746 LINKFORSHARED="-Wl,-E -Wl,+s";;
14747# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014748 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014749 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014750 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014751 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014752 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014753 if test "$enable_framework"
14754 then
Jack Jansenda49e192005-01-07 13:08:22 +000014755 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014756 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014757 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014758 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014759 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014760 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014761 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014762 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14763 then
14764 LINKFORSHARED="-Wl,--export-dynamic"
14765 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014766 SunOS/5*) case $CC in
14767 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014768 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014769 then
14770 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014771 fi;;
14772 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014773 CYGWIN*)
14774 if test $enable_shared = "no"
14775 then
14776 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14777 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014778 QNX*)
14779 # -Wl,-E causes the symbols to be added to the dynamic
14780 # symbol table so that they can be found when a module
14781 # is loaded. -N 2048K causes the stack size to be set
14782 # to 2048 kilobytes so that the stack doesn't overflow
14783 # when running test_compile.py.
14784 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014785 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014786fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014787{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14788$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014789
Michael W. Hudson54241132001-12-07 15:38:26 +000014790
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014791
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014792{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14793$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014794if test ! "$LIBRARY" = "$LDLIBRARY"
14795then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014796 case $ac_sys_system in
14797 CYGWIN*)
14798 # Cygwin needs CCSHARED when building extension DLLs
14799 # but not when building the interpreter DLL.
14800 CFLAGSFORSHARED='';;
14801 *)
14802 CFLAGSFORSHARED='$(CCSHARED)'
14803 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014804fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014805{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14806$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014807
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014808# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14809# library (with --enable-shared).
14810# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014811# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14812# if it is not required, since it creates a dependency of the shared library
14813# to LIBS. This, in turn, means that applications linking the shared libpython
14814# don't need to link LIBS explicitly. The default should be only changed
14815# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014816
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014817{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5
14818$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014819case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014820 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014821 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014822esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014823{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5
14824$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014825
14826
Guido van Rossum627b2d71993-12-24 10:39:16 +000014827# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014829{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14830$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014831if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014832 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014833else
Martin v. Löwis11437992002-04-12 09:54:03 +000014834 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014835LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014836cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014837/* confdefs.h. */
14838_ACEOF
14839cat confdefs.h >>conftest.$ac_ext
14840cat >>conftest.$ac_ext <<_ACEOF
14841/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014843/* Override any GCC internal prototype to avoid an error.
14844 Use char because int might match the return type of a GCC
14845 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014846#ifdef __cplusplus
14847extern "C"
14848#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014849char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014850int
14851main ()
14852{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014853return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 ;
14855 return 0;
14856}
14857_ACEOF
14858rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014859if { (ac_try="$ac_link"
14860case "(($ac_try" in
14861 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14862 *) ac_try_echo=$ac_try;;
14863esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014864eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14865$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014866 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014867 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014868 grep -v '^ *+' conftest.er1 >conftest.err
14869 rm -f conftest.er1
14870 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014871 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014872 (exit $ac_status); } && {
14873 test -z "$ac_c_werror_flag" ||
14874 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014875 } && test -s conftest$ac_exeext && {
14876 test "$cross_compiling" = yes ||
14877 $as_test_x conftest$ac_exeext
14878 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014879 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014880else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014881 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014882sed 's/^/| /' conftest.$ac_ext >&5
14883
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014884 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014885fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014886
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014887rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014888rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014889 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014890LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014891fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014892{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14893$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14894if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014895 cat >>confdefs.h <<_ACEOF
14896#define HAVE_LIBDL 1
14897_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014898
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014899 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014900
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014901fi
14902 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014903
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014904{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14905$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014906if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014907 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014908else
Martin v. Löwis11437992002-04-12 09:54:03 +000014909 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014910LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014911cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014912/* confdefs.h. */
14913_ACEOF
14914cat confdefs.h >>conftest.$ac_ext
14915cat >>conftest.$ac_ext <<_ACEOF
14916/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014917
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014918/* Override any GCC internal prototype to avoid an error.
14919 Use char because int might match the return type of a GCC
14920 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014921#ifdef __cplusplus
14922extern "C"
14923#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014924char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014925int
14926main ()
14927{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014928return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014929 ;
14930 return 0;
14931}
14932_ACEOF
14933rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014934if { (ac_try="$ac_link"
14935case "(($ac_try" in
14936 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14937 *) ac_try_echo=$ac_try;;
14938esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014939eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14940$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014941 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014942 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014943 grep -v '^ *+' conftest.er1 >conftest.err
14944 rm -f conftest.er1
14945 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014946 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014947 (exit $ac_status); } && {
14948 test -z "$ac_c_werror_flag" ||
14949 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014950 } && test -s conftest$ac_exeext && {
14951 test "$cross_compiling" = yes ||
14952 $as_test_x conftest$ac_exeext
14953 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014954 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014955else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014956 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014957sed 's/^/| /' conftest.$ac_ext >&5
14958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014959 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014962rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014963rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014964 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014965LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014966fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014967{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14968$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14969if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014970 cat >>confdefs.h <<_ACEOF
14971#define HAVE_LIBDLD 1
14972_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014973
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014974 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014975
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014976fi
14977 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014978
Georg Brandlb1441c72009-01-03 22:33:39 +000014979# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014980if test "$with_threads" = "yes" -o -z "$with_threads"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014981 { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14982$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014983if test "${ac_cv_search_sem_init+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000014984 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014985else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014986 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014987cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014988/* confdefs.h. */
14989_ACEOF
14990cat confdefs.h >>conftest.$ac_ext
14991cat >>conftest.$ac_ext <<_ACEOF
14992/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014993
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994/* Override any GCC internal prototype to avoid an error.
14995 Use char because int might match the return type of a GCC
14996 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014997#ifdef __cplusplus
14998extern "C"
14999#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015000char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015001int
15002main ()
15003{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015004return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015005 ;
15006 return 0;
15007}
15008_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015009for ac_lib in '' pthread rt posix4; do
15010 if test -z "$ac_lib"; then
15011 ac_res="none required"
15012 else
15013 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015014 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015015 fi
15016 rm -f conftest.$ac_objext conftest$ac_exeext
15017if { (ac_try="$ac_link"
15018case "(($ac_try" in
15019 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15020 *) ac_try_echo=$ac_try;;
15021esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015022eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15023$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015024 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015025 ac_status=$?
15026 grep -v '^ *+' conftest.er1 >conftest.err
15027 rm -f conftest.er1
15028 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015029 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015030 (exit $ac_status); } && {
15031 test -z "$ac_c_werror_flag" ||
15032 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015033 } && test -s conftest$ac_exeext && {
15034 test "$cross_compiling" = yes ||
15035 $as_test_x conftest$ac_exeext
15036 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015037 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015038else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015039 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015040sed 's/^/| /' conftest.$ac_ext >&5
15041
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015042
Thomas Wouters477c8d52006-05-27 19:21:47 +000015043fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015044
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015045rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15047 conftest$ac_exeext
15048 if test "${ac_cv_search_sem_init+set}" = set; then
15049 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015050fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015051done
15052if test "${ac_cv_search_sem_init+set}" = set; then
15053 :
15054else
15055 ac_cv_search_sem_init=no
15056fi
15057rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015058LIBS=$ac_func_search_save_LIBS
15059fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015060{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15061$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062ac_res=$ac_cv_search_sem_init
15063if test "$ac_res" != no; then
15064 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015065
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015066fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015067 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015068 # posix4 on Solaris 2.6
15069 # pthread (first!) on Linux
15070fi
15071
Martin v. Löwis19d17342003-06-14 21:03:05 +000015072# check if we need libintl for locale functions
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015073{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15074$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015075if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015076 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015077else
15078 ac_check_lib_save_LIBS=$LIBS
15079LIBS="-lintl $LIBS"
15080cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015081/* confdefs.h. */
15082_ACEOF
15083cat confdefs.h >>conftest.$ac_ext
15084cat >>conftest.$ac_ext <<_ACEOF
15085/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015087/* Override any GCC internal prototype to avoid an error.
15088 Use char because int might match the return type of a GCC
15089 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015090#ifdef __cplusplus
15091extern "C"
15092#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015093char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015094int
15095main ()
15096{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015097return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015098 ;
15099 return 0;
15100}
15101_ACEOF
15102rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103if { (ac_try="$ac_link"
15104case "(($ac_try" in
15105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15106 *) ac_try_echo=$ac_try;;
15107esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015108eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15109$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015110 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015111 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015112 grep -v '^ *+' conftest.er1 >conftest.err
15113 rm -f conftest.er1
15114 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015115 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015116 (exit $ac_status); } && {
15117 test -z "$ac_c_werror_flag" ||
15118 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015119 } && test -s conftest$ac_exeext && {
15120 test "$cross_compiling" = yes ||
15121 $as_test_x conftest$ac_exeext
15122 }; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015123 ac_cv_lib_intl_textdomain=yes
15124else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015125 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015126sed 's/^/| /' conftest.$ac_ext >&5
15127
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015128 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015130
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015131rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015132rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015133 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015134LIBS=$ac_check_lib_save_LIBS
15135fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015136{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15137$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
15138if test "x$ac_cv_lib_intl_textdomain" = x""yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015139
15140cat >>confdefs.h <<\_ACEOF
15141#define WITH_LIBINTL 1
15142_ACEOF
15143
Brett Cannonc6d936e2009-06-07 20:09:53 +000015144 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015145fi
15146
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015147
15148# checks for system dependent C++ extensions support
15149case "$ac_sys_system" in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015150 AIX*) { $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15151$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015153/* confdefs.h. */
15154_ACEOF
15155cat confdefs.h >>conftest.$ac_ext
15156cat >>conftest.$ac_ext <<_ACEOF
15157/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015158#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015159int
15160main ()
15161{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015162loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015163 ;
15164 return 0;
15165}
15166_ACEOF
15167rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015168if { (ac_try="$ac_link"
15169case "(($ac_try" in
15170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15171 *) ac_try_echo=$ac_try;;
15172esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015173eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15174$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015175 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015177 grep -v '^ *+' conftest.er1 >conftest.err
15178 rm -f conftest.er1
15179 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015180 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015181 (exit $ac_status); } && {
15182 test -z "$ac_c_werror_flag" ||
15183 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015184 } && test -s conftest$ac_exeext && {
15185 test "$cross_compiling" = yes ||
15186 $as_test_x conftest$ac_exeext
15187 }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015188
Martin v. Löwis11437992002-04-12 09:54:03 +000015189cat >>confdefs.h <<\_ACEOF
15190#define AIX_GENUINE_CPLUSPLUS 1
15191_ACEOF
15192
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015193 { $as_echo "$as_me:$LINENO: result: yes" >&5
15194$as_echo "yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015195else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015196 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015197sed 's/^/| /' conftest.$ac_ext >&5
15198
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015199 { $as_echo "$as_me:$LINENO: result: no" >&5
15200$as_echo "no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015201fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015203rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015204rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015205 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015206 *) ;;
15207esac
15208
Guido van Rossum70c7f481998-03-26 18:44:10 +000015209# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015210{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15211$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015212if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015213 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015214else
Martin v. Löwis11437992002-04-12 09:54:03 +000015215 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015216LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015217cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015218/* confdefs.h. */
15219_ACEOF
15220cat confdefs.h >>conftest.$ac_ext
15221cat >>conftest.$ac_ext <<_ACEOF
15222/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015223
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015224/* Override any GCC internal prototype to avoid an error.
15225 Use char because int might match the return type of a GCC
15226 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015227#ifdef __cplusplus
15228extern "C"
15229#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015230char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015231int
15232main ()
15233{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015234return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 ;
15236 return 0;
15237}
15238_ACEOF
15239rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240if { (ac_try="$ac_link"
15241case "(($ac_try" in
15242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15243 *) ac_try_echo=$ac_try;;
15244esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015245eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15246$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015247 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015248 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015249 grep -v '^ *+' conftest.er1 >conftest.err
15250 rm -f conftest.er1
15251 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015252 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015253 (exit $ac_status); } && {
15254 test -z "$ac_c_werror_flag" ||
15255 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015256 } && test -s conftest$ac_exeext && {
15257 test "$cross_compiling" = yes ||
15258 $as_test_x conftest$ac_exeext
15259 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015260 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015261else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015262 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015263sed 's/^/| /' conftest.$ac_ext >&5
15264
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015265 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015266fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015267
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015268rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015269rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015270 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015271LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015272fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015273{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15274$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
15275if test "x$ac_cv_lib_nsl_t_open" = x""yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015276 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015277fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015278 # SVR4
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015279{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15280$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015281if test "${ac_cv_lib_socket_socket+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015282 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015283else
Martin v. Löwis11437992002-04-12 09:54:03 +000015284 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015285LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015286cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015287/* confdefs.h. */
15288_ACEOF
15289cat confdefs.h >>conftest.$ac_ext
15290cat >>conftest.$ac_ext <<_ACEOF
15291/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015292
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293/* Override any GCC internal prototype to avoid an error.
15294 Use char because int might match the return type of a GCC
15295 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015296#ifdef __cplusplus
15297extern "C"
15298#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015299char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015300int
15301main ()
15302{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015303return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015304 ;
15305 return 0;
15306}
15307_ACEOF
15308rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015309if { (ac_try="$ac_link"
15310case "(($ac_try" in
15311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15312 *) ac_try_echo=$ac_try;;
15313esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015314eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15315$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015316 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015318 grep -v '^ *+' conftest.er1 >conftest.err
15319 rm -f conftest.er1
15320 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015321 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015322 (exit $ac_status); } && {
15323 test -z "$ac_c_werror_flag" ||
15324 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015325 } && test -s conftest$ac_exeext && {
15326 test "$cross_compiling" = yes ||
15327 $as_test_x conftest$ac_exeext
15328 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015329 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015330else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015331 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015332sed 's/^/| /' conftest.$ac_ext >&5
15333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015334 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015336
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015337rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015338rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015339 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015340LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015341fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015342{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15343$as_echo "$ac_cv_lib_socket_socket" >&6; }
15344if test "x$ac_cv_lib_socket_socket" = x""yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015345 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015346fi
15347 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015348
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015349{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5
15350$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015352# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015353if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015354 withval=$with_libs;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015355{ $as_echo "$as_me:$LINENO: result: $withval" >&5
15356$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015357LIBS="$withval $LIBS"
15358
15359else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015360 { $as_echo "$as_me:$LINENO: result: no" >&5
15361$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015362fi
15363
Guido van Rossum7f43da71994-08-01 12:15:30 +000015364
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015365# Check for use of the system libffi library
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015366{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15367$as_echo_n "checking for --with-system-ffi... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015368
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015369# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015370if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371 withval=$with_system_ffi;
15372fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015373
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015374
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015375{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15376$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015377
Matthias Klose55708cc2009-04-30 08:06:49 +000015378# Check for --with-dbmliborder
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015379{ $as_echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15380$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015381
15382# Check whether --with-dbmliborder was given.
15383if test "${with_dbmliborder+set}" = set; then
15384 withval=$with_dbmliborder;
15385if test x$with_dbmliborder = xyes
15386then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015387{ { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15388$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015389 { (exit 1); exit 1; }; }
15390else
15391 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15392 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15393 then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015394 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15395$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015396 { (exit 1); exit 1; }; }
15397 fi
15398 done
15399fi
15400fi
15401
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015402{ $as_echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15403$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015404
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015405# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015406
15407
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015408{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15409$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015411# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015412if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015413 withval=$with_signal_module;
15414fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015415
15416
15417if test -z "$with_signal_module"
15418then with_signal_module="yes"
15419fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015420{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5
15421$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015422
15423if test "${with_signal_module}" = "yes"; then
15424 USE_SIGNAL_MODULE=""
15425 SIGNAL_OBJS=""
15426else
15427 USE_SIGNAL_MODULE="#"
15428 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15429fi
15430
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015431# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015432
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015433USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015434
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015435{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15436$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015437
Guido van Rossumec2f0731997-01-22 20:54:01 +000015438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015439# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015440if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015441 withval=$with_dec_threads;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015442{ $as_echo "$as_me:$LINENO: result: $withval" >&5
15443$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015444LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015445if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015446 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015447fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015448else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015449 { $as_echo "$as_me:$LINENO: result: no" >&5
15450$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015451fi
15452
Martin v. Löwis11437992002-04-12 09:54:03 +000015453
15454# Templates for things AC_DEFINEd more than once.
15455# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015456
15457
Martin v. Löwis11437992002-04-12 09:54:03 +000015458
15459
15460
15461
15462
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015463{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5
15464$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015465
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015466# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015467if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015468 withval=$with_threads;
15469fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015470
15471
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015472# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015473
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015474# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015475if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015476 withval=$with_thread; with_threads=$with_thread
15477fi
15478
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015479
15480if test -z "$with_threads"
15481then with_threads="yes"
15482fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015483{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5
15484$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015485
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015486
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015487if test "$with_threads" = "no"
15488then
15489 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015490elif test "$ac_cv_pthread_is_default" = yes
15491then
Martin v. Löwis11437992002-04-12 09:54:03 +000015492 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015493#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015494_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015495
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015496 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015497 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015498#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015499_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015500
15501 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015502 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015503elif test "$ac_cv_kpthread" = "yes"
15504then
15505 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015506 if test "$ac_cv_cxx_thread" = "yes"; then
15507 CXX="$CXX -Kpthread"
15508 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015509 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015510#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015511_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015512
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015513 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015514 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015515elif test "$ac_cv_kthread" = "yes"
15516then
15517 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015518 if test "$ac_cv_cxx_thread" = "yes"; then
15519 CXX="$CXX -Kthread"
15520 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015521 cat >>confdefs.h <<\_ACEOF
15522#define WITH_THREAD 1
15523_ACEOF
15524
15525 posix_threads=yes
15526 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015527elif test "$ac_cv_pthread" = "yes"
15528then
15529 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015530 if test "$ac_cv_cxx_thread" = "yes"; then
15531 CXX="$CXX -pthread"
15532 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015533 cat >>confdefs.h <<\_ACEOF
15534#define WITH_THREAD 1
15535_ACEOF
15536
15537 posix_threads=yes
15538 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015539else
15540 if test ! -z "$with_threads" -a -d "$with_threads"
15541 then LDFLAGS="$LDFLAGS -L$with_threads"
15542 fi
15543 if test ! -z "$withval" -a -d "$withval"
15544 then LDFLAGS="$LDFLAGS -L$withval"
15545 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015546
15547 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015548 # define _POSIX_THREADS in unistd.h. Some apparently don't
15549 # (e.g. gnu pth with pthread emulation)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015550 { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15551$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015552 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015553/* confdefs.h. */
15554_ACEOF
15555cat confdefs.h >>conftest.$ac_ext
15556cat >>conftest.$ac_ext <<_ACEOF
15557/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015558
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015559#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015560#ifdef _POSIX_THREADS
15561yes
15562#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015563
15564_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015565if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015566 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015567 unistd_defines_pthreads=yes
15568else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015569 unistd_defines_pthreads=no
15570fi
15571rm -f conftest*
15572
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015573 { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15574$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015575
Martin v. Löwis11437992002-04-12 09:54:03 +000015576 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015577#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015578_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015579
Martin v. Löwis11437992002-04-12 09:54:03 +000015580 if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015581 { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
15582$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015583if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015584 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015585fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015586{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15587$as_echo "$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015588else
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 # Is the header compilable?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015590{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15591$as_echo_n "checking cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015592cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015593/* confdefs.h. */
15594_ACEOF
15595cat confdefs.h >>conftest.$ac_ext
15596cat >>conftest.$ac_ext <<_ACEOF
15597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015598$ac_includes_default
15599#include <cthreads.h>
15600_ACEOF
15601rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015602if { (ac_try="$ac_compile"
15603case "(($ac_try" in
15604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15605 *) ac_try_echo=$ac_try;;
15606esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015607eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15608$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015609 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015610 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015611 grep -v '^ *+' conftest.er1 >conftest.err
15612 rm -f conftest.er1
15613 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015614 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015615 (exit $ac_status); } && {
15616 test -z "$ac_c_werror_flag" ||
15617 test ! -s conftest.err
15618 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015619 ac_header_compiler=yes
15620else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015621 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015622sed 's/^/| /' conftest.$ac_ext >&5
15623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015624 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015626
15627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015628{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15629$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015630
15631# Is the header present?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015632{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15633$as_echo_n "checking cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015634cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015635/* confdefs.h. */
15636_ACEOF
15637cat confdefs.h >>conftest.$ac_ext
15638cat >>conftest.$ac_ext <<_ACEOF
15639/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015640#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015641_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642if { (ac_try="$ac_cpp conftest.$ac_ext"
15643case "(($ac_try" in
15644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15645 *) ac_try_echo=$ac_try;;
15646esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015647eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15648$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015649 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015650 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015651 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015652 rm -f conftest.er1
15653 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015655 (exit $ac_status); } >/dev/null && {
15656 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15657 test ! -s conftest.err
15658 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015659 ac_header_preproc=yes
15660else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015661 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015662sed 's/^/| /' conftest.$ac_ext >&5
15663
Martin v. Löwis11437992002-04-12 09:54:03 +000015664 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015665fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015666
Martin v. Löwis11437992002-04-12 09:54:03 +000015667rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015668{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15669$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015670
15671# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015672case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15673 yes:no: )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015674 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15675$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15676 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15677$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015678 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015679 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015680 no:yes:* )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015681 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15682$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15683 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15684$as_echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15685 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15686$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15687 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15688$as_echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15689 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15690$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15691 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15692$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015693 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015694## -------------------------------------- ##
15695## Report this to http://bugs.python.org/ ##
15696## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015697_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015698 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015699 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015700esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015701{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
15702$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015703if test "${ac_cv_header_cthreads_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015704 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015705else
15706 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015707fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015708{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15709$as_echo "$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015710
15711fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015712if test "x$ac_cv_header_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015713 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015714#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015715_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015716
Martin v. Löwis11437992002-04-12 09:54:03 +000015717 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015718#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015719_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015720
Martin v. Löwis11437992002-04-12 09:54:03 +000015721
15722cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015723#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015724_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015725
15726 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015727 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015728else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015729
Martin v. Löwis11437992002-04-12 09:54:03 +000015730 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015731 { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15732$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015733if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015734 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015735fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015736{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15737$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015738else
Martin v. Löwis11437992002-04-12 09:54:03 +000015739 # Is the header compilable?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015740{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15741$as_echo_n "checking mach/cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015743/* confdefs.h. */
15744_ACEOF
15745cat confdefs.h >>conftest.$ac_ext
15746cat >>conftest.$ac_ext <<_ACEOF
15747/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015748$ac_includes_default
15749#include <mach/cthreads.h>
15750_ACEOF
15751rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015752if { (ac_try="$ac_compile"
15753case "(($ac_try" in
15754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15755 *) ac_try_echo=$ac_try;;
15756esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015757eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15758$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015761 grep -v '^ *+' conftest.er1 >conftest.err
15762 rm -f conftest.er1
15763 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015764 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765 (exit $ac_status); } && {
15766 test -z "$ac_c_werror_flag" ||
15767 test ! -s conftest.err
15768 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015769 ac_header_compiler=yes
15770else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015771 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015772sed 's/^/| /' conftest.$ac_ext >&5
15773
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015774 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015775fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015776
15777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015778{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15779$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015780
15781# Is the header present?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015782{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15783$as_echo_n "checking mach/cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015784cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015785/* confdefs.h. */
15786_ACEOF
15787cat confdefs.h >>conftest.$ac_ext
15788cat >>conftest.$ac_ext <<_ACEOF
15789/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015790#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015791_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792if { (ac_try="$ac_cpp conftest.$ac_ext"
15793case "(($ac_try" in
15794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15795 *) ac_try_echo=$ac_try;;
15796esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015797eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15798$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015799 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015800 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015801 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015802 rm -f conftest.er1
15803 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015804 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015805 (exit $ac_status); } >/dev/null && {
15806 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15807 test ! -s conftest.err
15808 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015809 ac_header_preproc=yes
15810else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015811 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015812sed 's/^/| /' conftest.$ac_ext >&5
15813
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015815fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015816
Martin v. Löwis11437992002-04-12 09:54:03 +000015817rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015818{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15819$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015820
15821# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15823 yes:no: )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015824 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15825$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15826 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15827$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015828 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015829 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015830 no:yes:* )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015831 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15832$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15833 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15834$as_echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15835 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15836$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15837 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15838$as_echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15839 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15840$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15841 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15842$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015843 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015844## -------------------------------------- ##
15845## Report this to http://bugs.python.org/ ##
15846## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015847_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015848 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015849 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015850esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015851{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15852$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015853if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015854 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015855else
15856 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015857fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015858{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15859$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015860
15861fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015862if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015863 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015864#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015865_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015866
Martin v. Löwis11437992002-04-12 09:54:03 +000015867 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015868#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015869_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015870
Martin v. Löwis11437992002-04-12 09:54:03 +000015871
15872cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015873#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015874_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015875
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015876 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015877else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015878
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015879 { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5
15880$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015881
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015882# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015883if test "${with_pth+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015884 withval=$with_pth; { $as_echo "$as_me:$LINENO: result: $withval" >&5
15885$as_echo "$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015886 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015887#define WITH_THREAD 1
15888_ACEOF
15889
15890
15891cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015892#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015893_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015894
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015895 LIBS="-lpth $LIBS"
15896 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015897else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015898 { $as_echo "$as_me:$LINENO: result: no" >&5
15899$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015900
15901 # Just looking for pthread_create in libpthread is not enough:
15902 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15903 # So we really have to include pthread.h, and then link.
15904 _libs=$LIBS
15905 LIBS="$LIBS -lpthread"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015906 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15907$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015909/* confdefs.h. */
15910_ACEOF
15911cat confdefs.h >>conftest.$ac_ext
15912cat >>conftest.$ac_ext <<_ACEOF
15913/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015914#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015915
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015916void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015917int
15918main ()
15919{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015920
15921pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015922 ;
15923 return 0;
15924}
15925_ACEOF
15926rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015927if { (ac_try="$ac_link"
15928case "(($ac_try" in
15929 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15930 *) ac_try_echo=$ac_try;;
15931esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015932eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15933$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015934 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015935 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015936 grep -v '^ *+' conftest.er1 >conftest.err
15937 rm -f conftest.er1
15938 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015939 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015940 (exit $ac_status); } && {
15941 test -z "$ac_c_werror_flag" ||
15942 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015943 } && test -s conftest$ac_exeext && {
15944 test "$cross_compiling" = yes ||
15945 $as_test_x conftest$ac_exeext
15946 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015947
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015948 { $as_echo "$as_me:$LINENO: result: yes" >&5
15949$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015950 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015951#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015952_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015953
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015954 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015955 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015956else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015957 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015958sed 's/^/| /' conftest.$ac_ext >&5
15959
Martin v. Löwis11437992002-04-12 09:54:03 +000015960
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015961 LIBS=$_libs
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015962 { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5
15963$as_echo_n "checking for pthread_detach... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015964if test "${ac_cv_func_pthread_detach+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000015965 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015966else
Martin v. Löwis11437992002-04-12 09:54:03 +000015967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015968/* confdefs.h. */
15969_ACEOF
15970cat confdefs.h >>conftest.$ac_ext
15971cat >>conftest.$ac_ext <<_ACEOF
15972/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015973/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15974 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15975#define pthread_detach innocuous_pthread_detach
15976
Guido van Rossumad678af1998-10-02 14:42:15 +000015977/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015978 which can conflict with char pthread_detach (); below.
15979 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015980 <limits.h> exists even on freestanding compilers. */
15981
15982#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015983# include <limits.h>
15984#else
15985# include <assert.h>
15986#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015987
15988#undef pthread_detach
15989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015990/* Override any GCC internal prototype to avoid an error.
15991 Use char because int might match the return type of a GCC
15992 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015993#ifdef __cplusplus
15994extern "C"
15995#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015996char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015997/* The GNU C library defines this for functions which it implements
15998 to always fail with ENOSYS. Some functions are actually named
15999 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016000#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016001choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016002#endif
16003
Skip Montanaro6dead952003-09-25 14:50:04 +000016004int
16005main ()
16006{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016007return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016008 ;
16009 return 0;
16010}
16011_ACEOF
16012rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016013if { (ac_try="$ac_link"
16014case "(($ac_try" in
16015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16016 *) ac_try_echo=$ac_try;;
16017esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016018eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16019$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016020 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016022 grep -v '^ *+' conftest.er1 >conftest.err
16023 rm -f conftest.er1
16024 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016025 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026 (exit $ac_status); } && {
16027 test -z "$ac_c_werror_flag" ||
16028 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016029 } && test -s conftest$ac_exeext && {
16030 test "$cross_compiling" = yes ||
16031 $as_test_x conftest$ac_exeext
16032 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016033 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016034else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016035 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016036sed 's/^/| /' conftest.$ac_ext >&5
16037
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016038 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016040
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016041rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016042rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016043 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016044fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016045{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16046$as_echo "$ac_cv_func_pthread_detach" >&6; }
16047if test "x$ac_cv_func_pthread_detach" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016048 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016049#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016050_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016051
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016052 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016053 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016054else
Guido van Rossumad678af1998-10-02 14:42:15 +000016055
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016056 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016057 { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16058$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016059if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016060 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016061fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016062{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16063$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016064else
16065 # Is the header compilable?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016066{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16067$as_echo_n "checking atheos/threads.h usability... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016068cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016069/* confdefs.h. */
16070_ACEOF
16071cat confdefs.h >>conftest.$ac_ext
16072cat >>conftest.$ac_ext <<_ACEOF
16073/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016074$ac_includes_default
16075#include <atheos/threads.h>
16076_ACEOF
16077rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016078if { (ac_try="$ac_compile"
16079case "(($ac_try" in
16080 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16081 *) ac_try_echo=$ac_try;;
16082esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016083eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16084$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016085 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016086 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016087 grep -v '^ *+' conftest.er1 >conftest.err
16088 rm -f conftest.er1
16089 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016090 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016091 (exit $ac_status); } && {
16092 test -z "$ac_c_werror_flag" ||
16093 test ! -s conftest.err
16094 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016095 ac_header_compiler=yes
16096else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016097 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016098sed 's/^/| /' conftest.$ac_ext >&5
16099
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016100 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016101fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016102
16103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016104{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16105$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016106
16107# Is the header present?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016108{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16109$as_echo_n "checking atheos/threads.h presence... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016110cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016111/* confdefs.h. */
16112_ACEOF
16113cat confdefs.h >>conftest.$ac_ext
16114cat >>conftest.$ac_ext <<_ACEOF
16115/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016116#include <atheos/threads.h>
16117_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016118if { (ac_try="$ac_cpp conftest.$ac_ext"
16119case "(($ac_try" in
16120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16121 *) ac_try_echo=$ac_try;;
16122esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016123eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16124$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016125 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016126 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016127 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016128 rm -f conftest.er1
16129 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016130 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016131 (exit $ac_status); } >/dev/null && {
16132 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16133 test ! -s conftest.err
16134 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016135 ac_header_preproc=yes
16136else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016137 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016138sed 's/^/| /' conftest.$ac_ext >&5
16139
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016140 ac_header_preproc=no
16141fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016142
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016143rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016144{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16145$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016146
16147# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016148case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16149 yes:no: )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016150 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16151$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16152 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16153$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016154 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016155 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016156 no:yes:* )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016157 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16158$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16159 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16160$as_echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16161 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16162$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16163 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16164$as_echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16165 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16166$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16167 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16168$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016169 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000016170## -------------------------------------- ##
16171## Report this to http://bugs.python.org/ ##
16172## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016173_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016174 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016175 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016176esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016177{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16178$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016179if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016180 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016181else
16182 ac_cv_header_atheos_threads_h=$ac_header_preproc
16183fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016184{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16185$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016186
16187fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016188if test "x$ac_cv_header_atheos_threads_h" = x""yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016189 cat >>confdefs.h <<\_ACEOF
16190#define WITH_THREAD 1
16191_ACEOF
16192
16193
16194cat >>confdefs.h <<\_ACEOF
16195#define ATHEOS_THREADS 1
16196_ACEOF
16197
16198 THREADOBJ="Python/thread.o"
16199else
16200
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016201 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16202$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016203if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016204 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016205else
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016207LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016208cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016209/* confdefs.h. */
16210_ACEOF
16211cat confdefs.h >>conftest.$ac_ext
16212cat >>conftest.$ac_ext <<_ACEOF
16213/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016215/* Override any GCC internal prototype to avoid an error.
16216 Use char because int might match the return type of a GCC
16217 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016218#ifdef __cplusplus
16219extern "C"
16220#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016221char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016222int
16223main ()
16224{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016225return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016226 ;
16227 return 0;
16228}
16229_ACEOF
16230rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016231if { (ac_try="$ac_link"
16232case "(($ac_try" in
16233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16234 *) ac_try_echo=$ac_try;;
16235esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016236eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16237$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016238 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016239 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016240 grep -v '^ *+' conftest.er1 >conftest.err
16241 rm -f conftest.er1
16242 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016243 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016244 (exit $ac_status); } && {
16245 test -z "$ac_c_werror_flag" ||
16246 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016247 } && test -s conftest$ac_exeext && {
16248 test "$cross_compiling" = yes ||
16249 $as_test_x conftest$ac_exeext
16250 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016251 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016252else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016253 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016254sed 's/^/| /' conftest.$ac_ext >&5
16255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016256 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016258
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016259rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016260rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016261 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016262LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016263fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016264{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16265$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
16266if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016267 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016268#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016269_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016270
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016271 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016272 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016273 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016274else
Greg Steinadf63d62000-07-05 10:38:09 +000016275
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016276 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16277$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016278if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016279 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016280else
Martin v. Löwis11437992002-04-12 09:54:03 +000016281 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016282LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016283cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016284/* confdefs.h. */
16285_ACEOF
16286cat confdefs.h >>conftest.$ac_ext
16287cat >>conftest.$ac_ext <<_ACEOF
16288/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016289
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016290/* Override any GCC internal prototype to avoid an error.
16291 Use char because int might match the return type of a GCC
16292 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016293#ifdef __cplusplus
16294extern "C"
16295#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016296char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016297int
16298main ()
16299{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016300return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016301 ;
16302 return 0;
16303}
16304_ACEOF
16305rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016306if { (ac_try="$ac_link"
16307case "(($ac_try" in
16308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16309 *) ac_try_echo=$ac_try;;
16310esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016311eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16312$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016313 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016314 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016315 grep -v '^ *+' conftest.er1 >conftest.err
16316 rm -f conftest.er1
16317 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016318 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016319 (exit $ac_status); } && {
16320 test -z "$ac_c_werror_flag" ||
16321 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016322 } && test -s conftest$ac_exeext && {
16323 test "$cross_compiling" = yes ||
16324 $as_test_x conftest$ac_exeext
16325 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016326 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016327else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016328 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016329sed 's/^/| /' conftest.$ac_ext >&5
16330
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016331 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016332fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016333
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016334rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016335rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016336 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016337LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016338fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016339{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16340$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
16341if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016342 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016343#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016344_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016345
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016346 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016347 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016348 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016349else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016350
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016351 { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16352$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016353if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016354 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016355else
Martin v. Löwis11437992002-04-12 09:54:03 +000016356 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016357LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016358cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016359/* confdefs.h. */
16360_ACEOF
16361cat confdefs.h >>conftest.$ac_ext
16362cat >>conftest.$ac_ext <<_ACEOF
16363/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016365/* Override any GCC internal prototype to avoid an error.
16366 Use char because int might match the return type of a GCC
16367 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016368#ifdef __cplusplus
16369extern "C"
16370#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016371char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016372int
16373main ()
16374{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016375return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016376 ;
16377 return 0;
16378}
16379_ACEOF
16380rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016381if { (ac_try="$ac_link"
16382case "(($ac_try" in
16383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16384 *) ac_try_echo=$ac_try;;
16385esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016386eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16387$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016388 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016389 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016390 grep -v '^ *+' conftest.er1 >conftest.err
16391 rm -f conftest.er1
16392 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016393 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016394 (exit $ac_status); } && {
16395 test -z "$ac_c_werror_flag" ||
16396 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016397 } && test -s conftest$ac_exeext && {
16398 test "$cross_compiling" = yes ||
16399 $as_test_x conftest$ac_exeext
16400 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016401 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016402else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016403 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016404sed 's/^/| /' conftest.$ac_ext >&5
16405
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016406 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016407fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016408
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016409rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016410rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016411 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016412LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016413fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016414{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16415$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
16416if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016417 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016418#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016419_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016420
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016421 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016422 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016423 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016424else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016425
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016426 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16427$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016428if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016429 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016430else
Martin v. Löwis11437992002-04-12 09:54:03 +000016431 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016432LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016434/* confdefs.h. */
16435_ACEOF
16436cat confdefs.h >>conftest.$ac_ext
16437cat >>conftest.$ac_ext <<_ACEOF
16438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016440/* Override any GCC internal prototype to avoid an error.
16441 Use char because int might match the return type of a GCC
16442 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016443#ifdef __cplusplus
16444extern "C"
16445#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016446char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016447int
16448main ()
16449{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016450return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016451 ;
16452 return 0;
16453}
16454_ACEOF
16455rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016456if { (ac_try="$ac_link"
16457case "(($ac_try" in
16458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16459 *) ac_try_echo=$ac_try;;
16460esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016461eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16462$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016463 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016464 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016465 grep -v '^ *+' conftest.er1 >conftest.err
16466 rm -f conftest.er1
16467 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016468 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016469 (exit $ac_status); } && {
16470 test -z "$ac_c_werror_flag" ||
16471 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016472 } && test -s conftest$ac_exeext && {
16473 test "$cross_compiling" = yes ||
16474 $as_test_x conftest$ac_exeext
16475 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016476 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016477else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016478 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016479sed 's/^/| /' conftest.$ac_ext >&5
16480
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016481 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016482fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016483
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016484rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016485rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016486 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016487LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016488fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016489{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16490$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
16491if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016492 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016493#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016494_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016495
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016496 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016497 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016498 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016499else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016500
Martin v. Löwis130fb172001-07-19 11:00:41 +000016501 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016502fi
16503
Guido van Rossum627b2d71993-12-24 10:39:16 +000016504
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016505fi
16506
Guido van Rossum0be3e491997-05-22 20:33:33 +000016507fi
16508
Guido van Rossum49545951997-12-02 19:28:29 +000016509fi
16510
Guido van Rossumb93a8621998-05-07 13:27:32 +000016511fi
16512
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016513
Michael W. Hudson54241132001-12-07 15:38:26 +000016514fi
16515
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016517
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016518rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016519rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016520 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016521fi
16522
Martin v. Löwis11437992002-04-12 09:54:03 +000016523fi
16524
16525
16526fi
16527
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016528
Michael W. Hudson54241132001-12-07 15:38:26 +000016529
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016530 { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16531$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016532if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016533 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016534else
Martin v. Löwis11437992002-04-12 09:54:03 +000016535 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016536LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016537cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016538/* confdefs.h. */
16539_ACEOF
16540cat confdefs.h >>conftest.$ac_ext
16541cat >>conftest.$ac_ext <<_ACEOF
16542/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016544/* Override any GCC internal prototype to avoid an error.
16545 Use char because int might match the return type of a GCC
16546 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016547#ifdef __cplusplus
16548extern "C"
16549#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016550char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016551int
16552main ()
16553{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016554return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016555 ;
16556 return 0;
16557}
16558_ACEOF
16559rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016560if { (ac_try="$ac_link"
16561case "(($ac_try" in
16562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16563 *) ac_try_echo=$ac_try;;
16564esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016565eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16566$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016567 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016568 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016569 grep -v '^ *+' conftest.er1 >conftest.err
16570 rm -f conftest.er1
16571 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016572 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016573 (exit $ac_status); } && {
16574 test -z "$ac_c_werror_flag" ||
16575 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016576 } && test -s conftest$ac_exeext && {
16577 test "$cross_compiling" = yes ||
16578 $as_test_x conftest$ac_exeext
16579 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016580 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016581else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016582 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016583sed 's/^/| /' conftest.$ac_ext >&5
16584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016585 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016587
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016588rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016589rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016590 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016591LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016592fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016593{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16594$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
16595if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016596 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016597#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016598_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016599
Martin v. Löwis130fb172001-07-19 11:00:41 +000016600 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016601 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016602 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016603fi
16604
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016605
Neal Norwitza978ab02002-11-02 16:58:05 +000016606 if test "$posix_threads" != "yes"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016607 { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16608$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016609if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016610 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016611else
Martin v. Löwis11437992002-04-12 09:54:03 +000016612 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016613LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016614cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016615/* confdefs.h. */
16616_ACEOF
16617cat confdefs.h >>conftest.$ac_ext
16618cat >>conftest.$ac_ext <<_ACEOF
16619/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016621/* Override any GCC internal prototype to avoid an error.
16622 Use char because int might match the return type of a GCC
16623 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016624#ifdef __cplusplus
16625extern "C"
16626#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016627char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016628int
16629main ()
16630{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016631return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016632 ;
16633 return 0;
16634}
16635_ACEOF
16636rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637if { (ac_try="$ac_link"
16638case "(($ac_try" in
16639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16640 *) ac_try_echo=$ac_try;;
16641esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016642eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16643$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016644 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016645 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016646 grep -v '^ *+' conftest.er1 >conftest.err
16647 rm -f conftest.er1
16648 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016649 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016650 (exit $ac_status); } && {
16651 test -z "$ac_c_werror_flag" ||
16652 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016653 } && test -s conftest$ac_exeext && {
16654 test "$cross_compiling" = yes ||
16655 $as_test_x conftest$ac_exeext
16656 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016657 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016658else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016659 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016660sed 's/^/| /' conftest.$ac_ext >&5
16661
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016662 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016663fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016664
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016665rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016666rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016667 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016668LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016669fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016670{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16671$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
16672if test "x$ac_cv_lib_thread_thr_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016673 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016674#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016675_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016676
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016677 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016678 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016679 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016680fi
16681
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016682 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016683
Martin v. Löwis130fb172001-07-19 11:00:41 +000016684 if test "$USE_THREAD_MODULE" != "#"
16685 then
16686 # If the above checks didn't disable threads, (at least) OSF1
16687 # needs this '-threads' argument during linking.
16688 case $ac_sys_system in
16689 OSF1) LDLAST=-threads;;
16690 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016691 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016692fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016693
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016694if test "$posix_threads" = "yes"; then
16695 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016696
16697cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016698#define _POSIX_THREADS 1
16699_ACEOF
16700
16701 fi
16702
16703 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16704 case $ac_sys_system/$ac_sys_release in
16705 SunOS/5.6)
16706cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016707#define HAVE_PTHREAD_DESTRUCTOR 1
16708_ACEOF
16709
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016710 ;;
16711 SunOS/5.8)
16712cat >>confdefs.h <<\_ACEOF
16713#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16714_ACEOF
16715
16716 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016717 AIX/5)
16718cat >>confdefs.h <<\_ACEOF
16719#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16720_ACEOF
16721
16722 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016723 esac
16724
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016725 { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16726$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016727 if test "${ac_cv_pthread_system_supported+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016728 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016729else
16730 if test "$cross_compiling" = yes; then
16731 ac_cv_pthread_system_supported=no
16732else
16733 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016734/* confdefs.h. */
16735_ACEOF
16736cat confdefs.h >>conftest.$ac_ext
16737cat >>conftest.$ac_ext <<_ACEOF
16738/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016739#include <pthread.h>
16740 void *foo(void *parm) {
16741 return NULL;
16742 }
16743 main() {
16744 pthread_attr_t attr;
16745 pthread_t id;
16746 if (pthread_attr_init(&attr)) exit(-1);
16747 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16748 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16749 exit(0);
16750 }
16751_ACEOF
16752rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016753if { (ac_try="$ac_link"
16754case "(($ac_try" in
16755 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16756 *) ac_try_echo=$ac_try;;
16757esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016758eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16759$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016760 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016761 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016762 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016763 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016764 { (case "(($ac_try" in
16765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16766 *) ac_try_echo=$ac_try;;
16767esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016768eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16769$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016770 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016771 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016772 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016773 (exit $ac_status); }; }; then
16774 ac_cv_pthread_system_supported=yes
16775else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016776 $as_echo "$as_me: program exited with status $ac_status" >&5
16777$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016778sed 's/^/| /' conftest.$ac_ext >&5
16779
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016780( exit $ac_status )
16781ac_cv_pthread_system_supported=no
16782fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016783rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016784rm -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 +000016785fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016787
16788
Guido van Rossum627b2d71993-12-24 10:39:16 +000016789fi
16790
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016791 { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16792$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016793 if test "$ac_cv_pthread_system_supported" = "yes"; then
16794
16795cat >>confdefs.h <<\_ACEOF
16796#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16797_ACEOF
16798
16799 fi
16800
16801for ac_func in pthread_sigmask
16802do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016803as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16804{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16805$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016806if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016807 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016808else
16809 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016810/* confdefs.h. */
16811_ACEOF
16812cat confdefs.h >>conftest.$ac_ext
16813cat >>conftest.$ac_ext <<_ACEOF
16814/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016815/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16816 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16817#define $ac_func innocuous_$ac_func
16818
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016819/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016820 which can conflict with char $ac_func (); below.
16821 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016822 <limits.h> exists even on freestanding compilers. */
16823
16824#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016825# include <limits.h>
16826#else
16827# include <assert.h>
16828#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016829
16830#undef $ac_func
16831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016832/* Override any GCC internal prototype to avoid an error.
16833 Use char because int might match the return type of a GCC
16834 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016835#ifdef __cplusplus
16836extern "C"
16837#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016838char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016839/* The GNU C library defines this for functions which it implements
16840 to always fail with ENOSYS. Some functions are actually named
16841 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016842#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016843choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016844#endif
16845
Skip Montanaro6dead952003-09-25 14:50:04 +000016846int
16847main ()
16848{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016849return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016850 ;
16851 return 0;
16852}
16853_ACEOF
16854rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016855if { (ac_try="$ac_link"
16856case "(($ac_try" in
16857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16858 *) ac_try_echo=$ac_try;;
16859esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016860eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16861$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016862 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016863 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016864 grep -v '^ *+' conftest.er1 >conftest.err
16865 rm -f conftest.er1
16866 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016867 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868 (exit $ac_status); } && {
16869 test -z "$ac_c_werror_flag" ||
16870 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016871 } && test -s conftest$ac_exeext && {
16872 test "$cross_compiling" = yes ||
16873 $as_test_x conftest$ac_exeext
16874 }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016875 eval "$as_ac_var=yes"
16876else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016877 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016878sed 's/^/| /' conftest.$ac_ext >&5
16879
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016880 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016881fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016882
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016883rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016884rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016885 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016886fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016887ac_res=`eval 'as_val=${'$as_ac_var'}
16888 $as_echo "$as_val"'`
16889 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16890$as_echo "$ac_res" >&6; }
16891as_val=`eval 'as_val=${'$as_ac_var'}
16892 $as_echo "$as_val"'`
16893 if test "x$as_val" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016894 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016895#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016896_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016897 case $ac_sys_system in
16898 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016899
Jason Tishlerfac083d2003-07-22 15:20:49 +000016900cat >>confdefs.h <<\_ACEOF
16901#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16902_ACEOF
16903
16904 ;;
16905 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016906fi
16907done
16908
16909fi
16910
16911
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016912# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016913
16914
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016915{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16916$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016918if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016919 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016920 no)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016921 { $as_echo "$as_me:$LINENO: result: no" >&5
16922$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016923 ipv6=no
16924 ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016925 *) { $as_echo "$as_me:$LINENO: result: yes" >&5
16926$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016927 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016928#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016929_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016930
16931 ipv6=yes
16932 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016933 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016934else
Martin v. Löwis11437992002-04-12 09:54:03 +000016935
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016936 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016937 { $as_echo "$as_me:$LINENO: result: no" >&5
16938$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016939 ipv6=no
16940
16941else
Martin v. Löwis11437992002-04-12 09:54:03 +000016942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016943/* confdefs.h. */
16944_ACEOF
16945cat confdefs.h >>conftest.$ac_ext
16946cat >>conftest.$ac_ext <<_ACEOF
16947/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016948 /* AF_INET6 available check */
16949#include <sys/types.h>
16950#include <sys/socket.h>
16951main()
16952{
16953 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16954 exit(1);
16955 else
16956 exit(0);
16957}
16958
Martin v. Löwis11437992002-04-12 09:54:03 +000016959_ACEOF
16960rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961if { (ac_try="$ac_link"
16962case "(($ac_try" in
16963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16964 *) ac_try_echo=$ac_try;;
16965esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016966eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16967$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016968 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016969 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016970 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016971 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016972 { (case "(($ac_try" in
16973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16974 *) ac_try_echo=$ac_try;;
16975esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016976eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16977$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016978 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016979 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016980 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016981 (exit $ac_status); }; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016982 { $as_echo "$as_me:$LINENO: result: yes" >&5
16983$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016984 ipv6=yes
16985else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016986 $as_echo "$as_me: program exited with status $ac_status" >&5
16987$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016988sed 's/^/| /' conftest.$ac_ext >&5
16989
Martin v. Löwis11437992002-04-12 09:54:03 +000016990( exit $ac_status )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016991{ $as_echo "$as_me:$LINENO: result: no" >&5
16992$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016993 ipv6=no
16994fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000016995rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016996rm -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 +000016997fi
16998
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016999
17000
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017001if test "$ipv6" = "yes"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017002 { $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17003$as_echo_n "checking if RFC2553 API is available... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017004 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017005/* confdefs.h. */
17006_ACEOF
17007cat confdefs.h >>conftest.$ac_ext
17008cat >>conftest.$ac_ext <<_ACEOF
17009/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017010#include <sys/types.h>
17011#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017012int
17013main ()
17014{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017015struct sockaddr_in6 x;
17016x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017017 ;
17018 return 0;
17019}
17020_ACEOF
17021rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017022if { (ac_try="$ac_compile"
17023case "(($ac_try" in
17024 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17025 *) ac_try_echo=$ac_try;;
17026esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017027eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17028$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017029 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017030 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017031 grep -v '^ *+' conftest.er1 >conftest.err
17032 rm -f conftest.er1
17033 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017034 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017035 (exit $ac_status); } && {
17036 test -z "$ac_c_werror_flag" ||
17037 test ! -s conftest.err
17038 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017039 { $as_echo "$as_me:$LINENO: result: yes" >&5
17040$as_echo "yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017041 ipv6=yes
17042else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017043 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017044sed 's/^/| /' conftest.$ac_ext >&5
17045
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017046 { $as_echo "$as_me:$LINENO: result: no" >&5
17047$as_echo "no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017048 ipv6=no
17049fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017050
17051rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017052fi
17053
17054if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017055 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017056#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017057_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017058
17059fi
17060
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017061fi
17062
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017063
17064ipv6type=unknown
17065ipv6lib=none
17066ipv6trylibc=no
17067
17068if test "$ipv6" = "yes"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017069 { $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17070$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017071 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17072 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017073 case $i in
17074 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017075 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017076/* confdefs.h. */
17077_ACEOF
17078cat confdefs.h >>conftest.$ac_ext
17079cat >>conftest.$ac_ext <<_ACEOF
17080/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017081
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017082#include <netinet/in.h>
17083#ifdef IPV6_INRIA_VERSION
17084yes
17085#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017086_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017087if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017088 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017089 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017090fi
17091rm -f conftest*
17092
17093 ;;
17094 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017096/* confdefs.h. */
17097_ACEOF
17098cat confdefs.h >>conftest.$ac_ext
17099cat >>conftest.$ac_ext <<_ACEOF
17100/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017101
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017102#include <netinet/in.h>
17103#ifdef __KAME__
17104yes
17105#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017106_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017108 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017109 ipv6type=$i;
17110 ipv6lib=inet6
17111 ipv6libdir=/usr/local/v6/lib
17112 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017113fi
17114rm -f conftest*
17115
17116 ;;
17117 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017119/* confdefs.h. */
17120_ACEOF
17121cat confdefs.h >>conftest.$ac_ext
17122cat >>conftest.$ac_ext <<_ACEOF
17123/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017124
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017125#include <features.h>
17126#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17127yes
17128#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017129_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017130if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017131 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017132 ipv6type=$i;
17133 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017134fi
17135rm -f conftest*
17136
17137 ;;
17138 linux-inet6)
17139 if test -d /usr/inet6; then
17140 ipv6type=$i
17141 ipv6lib=inet6
17142 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017143 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017144 fi
17145 ;;
17146 solaris)
17147 if test -f /etc/netconfig; then
17148 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17149 ipv6type=$i
17150 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017151 fi
17152 fi
17153 ;;
17154 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017156/* confdefs.h. */
17157_ACEOF
17158cat confdefs.h >>conftest.$ac_ext
17159cat >>conftest.$ac_ext <<_ACEOF
17160/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017161
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017162#include <sys/param.h>
17163#ifdef _TOSHIBA_INET6
17164yes
17165#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017166_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017167if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017168 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017169 ipv6type=$i;
17170 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017171 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017172fi
17173rm -f conftest*
17174
17175 ;;
17176 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017177 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017178/* confdefs.h. */
17179_ACEOF
17180cat confdefs.h >>conftest.$ac_ext
17181cat >>conftest.$ac_ext <<_ACEOF
17182/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017183
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017184#include </usr/local/v6/include/sys/v6config.h>
17185#ifdef __V6D__
17186yes
17187#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017188_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017189if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017190 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017191 ipv6type=$i;
17192 ipv6lib=v6;
17193 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017194 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017195fi
17196rm -f conftest*
17197
17198 ;;
17199 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017200 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017201/* confdefs.h. */
17202_ACEOF
17203cat confdefs.h >>conftest.$ac_ext
17204cat >>conftest.$ac_ext <<_ACEOF
17205/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017206
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017207#include <sys/param.h>
17208#ifdef _ZETA_MINAMI_INET6
17209yes
17210#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017211_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017212if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017213 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017214 ipv6type=$i;
17215 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017216 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017217fi
17218rm -f conftest*
17219
17220 ;;
17221 esac
17222 if test "$ipv6type" != "unknown"; then
17223 break
17224 fi
17225 done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017226 { $as_echo "$as_me:$LINENO: result: $ipv6type" >&5
17227$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017228fi
17229
17230if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17231 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17232 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17233 echo "using lib$ipv6lib"
17234 else
17235 if test $ipv6trylibc = "yes"; then
17236 echo "using libc"
17237 else
17238 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17239 echo "You need to fetch lib$ipv6lib.a from appropriate"
17240 echo 'ipv6 kit and compile beforehand.'
17241 exit 1
17242 fi
17243 fi
17244fi
17245
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017246{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17247$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017248cat >conftest.$ac_ext <<_ACEOF
17249/* confdefs.h. */
17250_ACEOF
17251cat confdefs.h >>conftest.$ac_ext
17252cat >>conftest.$ac_ext <<_ACEOF
17253/* end confdefs.h. */
17254#include <Carbon/Carbon.h>
17255int
17256main ()
17257{
17258FSIORefNum fRef = 0
17259 ;
17260 return 0;
17261}
17262_ACEOF
17263rm -f conftest.$ac_objext
17264if { (ac_try="$ac_compile"
17265case "(($ac_try" in
17266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17267 *) ac_try_echo=$ac_try;;
17268esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017269eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17270$as_echo "$ac_try_echo") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017271 (eval "$ac_compile") 2>conftest.er1
17272 ac_status=$?
17273 grep -v '^ *+' conftest.er1 >conftest.err
17274 rm -f conftest.er1
17275 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017276 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017277 (exit $ac_status); } && {
17278 test -z "$ac_c_werror_flag" ||
17279 test ! -s conftest.err
17280 } && test -s conftest.$ac_objext; then
17281
17282cat >>confdefs.h <<\_ACEOF
17283#define HAVE_OSX105_SDK 1
17284_ACEOF
17285
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017286 { $as_echo "$as_me:$LINENO: result: yes" >&5
17287$as_echo "yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017288else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017289 $as_echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017290sed 's/^/| /' conftest.$ac_ext >&5
17291
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017292 { $as_echo "$as_me:$LINENO: result: no" >&5
17293$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017294
17295fi
17296
17297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17298
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017299# Check for --with-doc-strings
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017300{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17301$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017302
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017303# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017304if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017305 withval=$with_doc_strings;
17306fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017307
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017308
17309if test -z "$with_doc_strings"
17310then with_doc_strings="yes"
17311fi
17312if test "$with_doc_strings" != "no"
17313then
17314
17315cat >>confdefs.h <<\_ACEOF
17316#define WITH_DOC_STRINGS 1
17317_ACEOF
17318
17319fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017320{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17321$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017322
Neil Schemenauera35c6882001-02-27 04:45:05 +000017323# Check for Python-specific malloc support
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017324{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5
17325$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017326
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017327# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017328if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017329 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017330if test "$withval" != no
17331then
17332
17333cat >>confdefs.h <<\_ACEOF
17334#define WITH_TSC 1
17335_ACEOF
17336
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017337 { $as_echo "$as_me:$LINENO: result: yes" >&5
17338$as_echo "yes" >&6; }
17339else { $as_echo "$as_me:$LINENO: result: no" >&5
17340$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017341fi
17342else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017343 { $as_echo "$as_me:$LINENO: result: no" >&5
17344$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017345fi
17346
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017347
17348# Check for Python-specific malloc support
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017349{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17350$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017351
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017352# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017353if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017354 withval=$with_pymalloc;
17355fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017356
Neil Schemenauera35c6882001-02-27 04:45:05 +000017357
Neil Schemenauer16c22972002-03-22 15:34:49 +000017358if test -z "$with_pymalloc"
17359then with_pymalloc="yes"
17360fi
17361if test "$with_pymalloc" != "no"
17362then
Martin v. Löwis11437992002-04-12 09:54:03 +000017363
17364cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017365#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017366_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017367
17368fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017369{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17370$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017371
Barry Warsawef82cd72000-06-30 16:21:01 +000017372# Check for --with-wctype-functions
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017373{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17374$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017376# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017377if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017378 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017379if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017380then
17381
17382cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017383#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017384_ACEOF
17385
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017386 { $as_echo "$as_me:$LINENO: result: yes" >&5
17387$as_echo "yes" >&6; }
17388else { $as_echo "$as_me:$LINENO: result: no" >&5
17389$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017390fi
17391else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017392 { $as_echo "$as_me:$LINENO: result: no" >&5
17393$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017394fi
17395
Barry Warsawef82cd72000-06-30 16:21:01 +000017396
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017397# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017398
Guido van Rossum98935bf2001-09-05 19:13:16 +000017399DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017400
Guido van Rossume97ee181999-12-20 21:27:22 +000017401# the dlopen() function means we might want to use dynload_shlib.o. some
17402# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017403
Thomas Wouters3a584202000-08-05 23:28:51 +000017404for ac_func in dlopen
17405do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017406as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17407{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
17408$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017409if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017410 $as_echo_n "(cached) " >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017411else
Martin v. Löwis11437992002-04-12 09:54:03 +000017412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017413/* confdefs.h. */
17414_ACEOF
17415cat confdefs.h >>conftest.$ac_ext
17416cat >>conftest.$ac_ext <<_ACEOF
17417/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017418/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17419 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17420#define $ac_func innocuous_$ac_func
17421
Guido van Rossume97ee181999-12-20 21:27:22 +000017422/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017423 which can conflict with char $ac_func (); below.
17424 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017425 <limits.h> exists even on freestanding compilers. */
17426
17427#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017428# include <limits.h>
17429#else
17430# include <assert.h>
17431#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017432
17433#undef $ac_func
17434
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017435/* Override any GCC internal prototype to avoid an error.
17436 Use char because int might match the return type of a GCC
17437 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017438#ifdef __cplusplus
17439extern "C"
17440#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017441char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017442/* The GNU C library defines this for functions which it implements
17443 to always fail with ENOSYS. Some functions are actually named
17444 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017446choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017447#endif
17448
Skip Montanaro6dead952003-09-25 14:50:04 +000017449int
17450main ()
17451{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017452return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017453 ;
17454 return 0;
17455}
17456_ACEOF
17457rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017458if { (ac_try="$ac_link"
17459case "(($ac_try" in
17460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17461 *) ac_try_echo=$ac_try;;
17462esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017463eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17464$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017465 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017466 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017467 grep -v '^ *+' conftest.er1 >conftest.err
17468 rm -f conftest.er1
17469 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017470 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017471 (exit $ac_status); } && {
17472 test -z "$ac_c_werror_flag" ||
17473 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017474 } && test -s conftest$ac_exeext && {
17475 test "$cross_compiling" = yes ||
17476 $as_test_x conftest$ac_exeext
17477 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017478 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017479else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017480 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017481sed 's/^/| /' conftest.$ac_ext >&5
17482
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017483 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017484fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017485
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017486rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017487rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017488 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017489fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017490ac_res=`eval 'as_val=${'$as_ac_var'}
17491 $as_echo "$as_val"'`
17492 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
17493$as_echo "$ac_res" >&6; }
17494as_val=`eval 'as_val=${'$as_ac_var'}
17495 $as_echo "$as_val"'`
17496 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017497 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017498#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017499_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017500
Guido van Rossume97ee181999-12-20 21:27:22 +000017501fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017502done
Guido van Rossume97ee181999-12-20 21:27:22 +000017503
Michael W. Hudson54241132001-12-07 15:38:26 +000017504
Guido van Rossume97ee181999-12-20 21:27:22 +000017505# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17506# loading of modules.
17507
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017508{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17509$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017510if test -z "$DYNLOADFILE"
17511then
17512 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017513 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17514 if test "$ac_cv_func_dlopen" = yes
17515 then DYNLOADFILE="dynload_shlib.o"
17516 else DYNLOADFILE="dynload_aix.o"
17517 fi
17518 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017519 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017520 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17521 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017522 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017523 *)
17524 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17525 # out any dynamic loading
17526 if test "$ac_cv_func_dlopen" = yes
17527 then DYNLOADFILE="dynload_shlib.o"
17528 else DYNLOADFILE="dynload_stub.o"
17529 fi
17530 ;;
17531 esac
17532fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017533{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17534$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017535if test "$DYNLOADFILE" != "dynload_stub.o"
17536then
Martin v. Löwis11437992002-04-12 09:54:03 +000017537
17538cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017539#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017540_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017541
17542fi
17543
Neil Schemenauer4e425612001-06-19 15:44:15 +000017544# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17545
Michael W. Hudson54241132001-12-07 15:38:26 +000017546
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017547{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17548$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017549if test -z "$MACHDEP_OBJS"
17550then
Jack Jansene578a632001-08-15 01:27:14 +000017551 MACHDEP_OBJS=$extra_machdep_objs
17552else
17553 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017554fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017555{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17556$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017557
Guido van Rossum627b2d71993-12-24 10:39:16 +000017558# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017559
17560
17561
17562
17563
17564
17565
17566
17567
17568
17569
17570
17571
17572
17573
17574
17575
17576
17577
17578
17579
17580
17581
17582
17583
17584
17585
17586
17587
17588
17589
17590
17591
17592
17593
17594
17595
17596
17597
17598
17599
17600
17601
17602
17603
17604
17605
17606
17607
17608
17609
17610
17611
17612
17613
17614
17615
17616
17617
17618
17619
17620
17621
17622
17623
17624
17625
17626
17627
17628
17629
Martin v. Löwisd6320502004-08-12 13:45:08 +000017630
Martin v. Löwisc3001752005-01-23 09:27:24 +000017631
17632
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017633
17634
Thomas Wouterscf297e42007-02-23 15:07:44 +000017635
17636
Gregory P. Smith25523d22007-09-03 16:44:55 +000017637
Christian Heimes4e30a842007-11-30 22:12:06 +000017638
Martin v. Löwis92fab752008-03-08 10:40:41 +000017639
Martin v. Löwis823725e2008-03-24 13:39:54 +000017640
17641
Benjamin Peterson965ce872009-04-05 21:24:58 +000017642
17643
17644
17645
Martin v. Löwis011e8422009-05-05 04:43:17 +000017646
Martin v. Löwis113a0852009-05-29 17:25:39 +000017647
Martin v. Löwis823725e2008-03-24 13:39:54 +000017648for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17649 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017650 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017651 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000017652 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017653 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017654 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017655 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17656 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017657 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000017658 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017659 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017660 truncate uname unsetenv utimes waitpid wait3 wait4 \
17661 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017662do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017663as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17664{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
17665$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017666if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017667 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017668else
Martin v. Löwis11437992002-04-12 09:54:03 +000017669 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017670/* confdefs.h. */
17671_ACEOF
17672cat confdefs.h >>conftest.$ac_ext
17673cat >>conftest.$ac_ext <<_ACEOF
17674/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017675/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17676 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17677#define $ac_func innocuous_$ac_func
17678
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017679/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017680 which can conflict with char $ac_func (); below.
17681 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017682 <limits.h> exists even on freestanding compilers. */
17683
17684#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017685# include <limits.h>
17686#else
17687# include <assert.h>
17688#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017689
17690#undef $ac_func
17691
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017692/* Override any GCC internal prototype to avoid an error.
17693 Use char because int might match the return type of a GCC
17694 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017695#ifdef __cplusplus
17696extern "C"
17697#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017698char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017699/* The GNU C library defines this for functions which it implements
17700 to always fail with ENOSYS. Some functions are actually named
17701 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017703choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017704#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017705
Skip Montanaro6dead952003-09-25 14:50:04 +000017706int
17707main ()
17708{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017710 ;
17711 return 0;
17712}
17713_ACEOF
17714rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715if { (ac_try="$ac_link"
17716case "(($ac_try" in
17717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17718 *) ac_try_echo=$ac_try;;
17719esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017720eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17721$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017722 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017723 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017724 grep -v '^ *+' conftest.er1 >conftest.err
17725 rm -f conftest.er1
17726 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017727 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017728 (exit $ac_status); } && {
17729 test -z "$ac_c_werror_flag" ||
17730 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017731 } && test -s conftest$ac_exeext && {
17732 test "$cross_compiling" = yes ||
17733 $as_test_x conftest$ac_exeext
17734 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017735 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017736else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017737 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017738sed 's/^/| /' conftest.$ac_ext >&5
17739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017740 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017742
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017743rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017744rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017745 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017746fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017747ac_res=`eval 'as_val=${'$as_ac_var'}
17748 $as_echo "$as_val"'`
17749 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
17750$as_echo "$ac_res" >&6; }
17751as_val=`eval 'as_val=${'$as_ac_var'}
17752 $as_echo "$as_val"'`
17753 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017754 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017755#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017756_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017757
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017758fi
17759done
17760
Michael W. Hudson54241132001-12-07 15:38:26 +000017761
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017762# For some functions, having a definition is not sufficient, since
17763# we want to take their address.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017764{ $as_echo "$as_me:$LINENO: checking for chroot" >&5
17765$as_echo_n "checking for chroot... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017766cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017767/* confdefs.h. */
17768_ACEOF
17769cat confdefs.h >>conftest.$ac_ext
17770cat >>conftest.$ac_ext <<_ACEOF
17771/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017772#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017773int
17774main ()
17775{
17776void *x=chroot
17777 ;
17778 return 0;
17779}
17780_ACEOF
17781rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017782if { (ac_try="$ac_compile"
17783case "(($ac_try" in
17784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17785 *) ac_try_echo=$ac_try;;
17786esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017787eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17788$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017791 grep -v '^ *+' conftest.er1 >conftest.err
17792 rm -f conftest.er1
17793 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017794 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017795 (exit $ac_status); } && {
17796 test -z "$ac_c_werror_flag" ||
17797 test ! -s conftest.err
17798 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017799
17800cat >>confdefs.h <<\_ACEOF
17801#define HAVE_CHROOT 1
17802_ACEOF
17803
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017804 { $as_echo "$as_me:$LINENO: result: yes" >&5
17805$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017806else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017807 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017808sed 's/^/| /' conftest.$ac_ext >&5
17809
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017810 { $as_echo "$as_me:$LINENO: result: no" >&5
17811$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017812
17813fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814
17815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017816{ $as_echo "$as_me:$LINENO: checking for link" >&5
17817$as_echo_n "checking for link... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017818cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017819/* confdefs.h. */
17820_ACEOF
17821cat confdefs.h >>conftest.$ac_ext
17822cat >>conftest.$ac_ext <<_ACEOF
17823/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017824#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017825int
17826main ()
17827{
17828void *x=link
17829 ;
17830 return 0;
17831}
17832_ACEOF
17833rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017834if { (ac_try="$ac_compile"
17835case "(($ac_try" in
17836 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17837 *) ac_try_echo=$ac_try;;
17838esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017839eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17840$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017841 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017842 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017843 grep -v '^ *+' conftest.er1 >conftest.err
17844 rm -f conftest.er1
17845 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017846 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017847 (exit $ac_status); } && {
17848 test -z "$ac_c_werror_flag" ||
17849 test ! -s conftest.err
17850 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017851
17852cat >>confdefs.h <<\_ACEOF
17853#define HAVE_LINK 1
17854_ACEOF
17855
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017856 { $as_echo "$as_me:$LINENO: result: yes" >&5
17857$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017858else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017859 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017860sed 's/^/| /' conftest.$ac_ext >&5
17861
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017862 { $as_echo "$as_me:$LINENO: result: no" >&5
17863$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017864
17865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017866
17867rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017868{ $as_echo "$as_me:$LINENO: checking for symlink" >&5
17869$as_echo_n "checking for symlink... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017870cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017871/* confdefs.h. */
17872_ACEOF
17873cat confdefs.h >>conftest.$ac_ext
17874cat >>conftest.$ac_ext <<_ACEOF
17875/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017876#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017877int
17878main ()
17879{
17880void *x=symlink
17881 ;
17882 return 0;
17883}
17884_ACEOF
17885rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017886if { (ac_try="$ac_compile"
17887case "(($ac_try" in
17888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17889 *) ac_try_echo=$ac_try;;
17890esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017891eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17892$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017895 grep -v '^ *+' conftest.er1 >conftest.err
17896 rm -f conftest.er1
17897 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017898 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017899 (exit $ac_status); } && {
17900 test -z "$ac_c_werror_flag" ||
17901 test ! -s conftest.err
17902 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017903
17904cat >>confdefs.h <<\_ACEOF
17905#define HAVE_SYMLINK 1
17906_ACEOF
17907
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017908 { $as_echo "$as_me:$LINENO: result: yes" >&5
17909$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017910else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017911 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017912sed 's/^/| /' conftest.$ac_ext >&5
17913
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017914 { $as_echo "$as_me:$LINENO: result: no" >&5
17915$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017916
17917fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017918
17919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017920{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5
17921$as_echo_n "checking for fchdir... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017922cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017923/* confdefs.h. */
17924_ACEOF
17925cat confdefs.h >>conftest.$ac_ext
17926cat >>conftest.$ac_ext <<_ACEOF
17927/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017928#include <unistd.h>
17929int
17930main ()
17931{
17932void *x=fchdir
17933 ;
17934 return 0;
17935}
17936_ACEOF
17937rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017938if { (ac_try="$ac_compile"
17939case "(($ac_try" in
17940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17941 *) ac_try_echo=$ac_try;;
17942esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017943eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17944$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017947 grep -v '^ *+' conftest.er1 >conftest.err
17948 rm -f conftest.er1
17949 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017950 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017951 (exit $ac_status); } && {
17952 test -z "$ac_c_werror_flag" ||
17953 test ! -s conftest.err
17954 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017955
17956cat >>confdefs.h <<\_ACEOF
17957#define HAVE_FCHDIR 1
17958_ACEOF
17959
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017960 { $as_echo "$as_me:$LINENO: result: yes" >&5
17961$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017962else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017963 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017964sed 's/^/| /' conftest.$ac_ext >&5
17965
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017966 { $as_echo "$as_me:$LINENO: result: no" >&5
17967$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017968
17969fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017970
17971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017972{ $as_echo "$as_me:$LINENO: checking for fsync" >&5
17973$as_echo_n "checking for fsync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017974cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017975/* confdefs.h. */
17976_ACEOF
17977cat confdefs.h >>conftest.$ac_ext
17978cat >>conftest.$ac_ext <<_ACEOF
17979/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017980#include <unistd.h>
17981int
17982main ()
17983{
17984void *x=fsync
17985 ;
17986 return 0;
17987}
17988_ACEOF
17989rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017990if { (ac_try="$ac_compile"
17991case "(($ac_try" in
17992 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17993 *) ac_try_echo=$ac_try;;
17994esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000017995eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17996$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017997 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017998 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017999 grep -v '^ *+' conftest.er1 >conftest.err
18000 rm -f conftest.er1
18001 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018002 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018003 (exit $ac_status); } && {
18004 test -z "$ac_c_werror_flag" ||
18005 test ! -s conftest.err
18006 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018007
18008cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018009#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018010_ACEOF
18011
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018012 { $as_echo "$as_me:$LINENO: result: yes" >&5
18013$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018014else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018015 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018016sed 's/^/| /' conftest.$ac_ext >&5
18017
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018018 { $as_echo "$as_me:$LINENO: result: no" >&5
18019$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018020
18021fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018022
18023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018024{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5
18025$as_echo_n "checking for fdatasync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018026cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018027/* confdefs.h. */
18028_ACEOF
18029cat confdefs.h >>conftest.$ac_ext
18030cat >>conftest.$ac_ext <<_ACEOF
18031/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018032#include <unistd.h>
18033int
18034main ()
18035{
18036void *x=fdatasync
18037 ;
18038 return 0;
18039}
18040_ACEOF
18041rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018042if { (ac_try="$ac_compile"
18043case "(($ac_try" in
18044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18045 *) ac_try_echo=$ac_try;;
18046esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018050 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018051 grep -v '^ *+' conftest.er1 >conftest.err
18052 rm -f conftest.er1
18053 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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
18058 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018059
18060cat >>confdefs.h <<\_ACEOF
18061#define HAVE_FDATASYNC 1
18062_ACEOF
18063
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018064 { $as_echo "$as_me:$LINENO: result: yes" >&5
18065$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018066else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018067 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018068sed 's/^/| /' conftest.$ac_ext >&5
18069
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018070 { $as_echo "$as_me:$LINENO: result: no" >&5
18071$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018072
18073fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018074
18075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018076{ $as_echo "$as_me:$LINENO: checking for epoll" >&5
18077$as_echo_n "checking for epoll... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018078cat >conftest.$ac_ext <<_ACEOF
18079/* confdefs.h. */
18080_ACEOF
18081cat confdefs.h >>conftest.$ac_ext
18082cat >>conftest.$ac_ext <<_ACEOF
18083/* end confdefs.h. */
18084#include <sys/epoll.h>
18085int
18086main ()
18087{
18088void *x=epoll_create
18089 ;
18090 return 0;
18091}
18092_ACEOF
18093rm -f conftest.$ac_objext
18094if { (ac_try="$ac_compile"
18095case "(($ac_try" in
18096 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18097 *) ac_try_echo=$ac_try;;
18098esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018099eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18100$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018101 (eval "$ac_compile") 2>conftest.er1
18102 ac_status=$?
18103 grep -v '^ *+' conftest.er1 >conftest.err
18104 rm -f conftest.er1
18105 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018106 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018107 (exit $ac_status); } && {
18108 test -z "$ac_c_werror_flag" ||
18109 test ! -s conftest.err
18110 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018111
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018112cat >>confdefs.h <<\_ACEOF
18113#define HAVE_EPOLL 1
18114_ACEOF
18115
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018116 { $as_echo "$as_me:$LINENO: result: yes" >&5
18117$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018118else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018119 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018120sed 's/^/| /' conftest.$ac_ext >&5
18121
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018122 { $as_echo "$as_me:$LINENO: result: no" >&5
18123$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018124
18125fi
18126
18127rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018128{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5
18129$as_echo_n "checking for kqueue... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018130cat >conftest.$ac_ext <<_ACEOF
18131/* confdefs.h. */
18132_ACEOF
18133cat confdefs.h >>conftest.$ac_ext
18134cat >>conftest.$ac_ext <<_ACEOF
18135/* end confdefs.h. */
18136
18137#include <sys/types.h>
18138#include <sys/event.h>
18139
18140int
18141main ()
18142{
18143int x=kqueue()
18144 ;
18145 return 0;
18146}
18147_ACEOF
18148rm -f conftest.$ac_objext
18149if { (ac_try="$ac_compile"
18150case "(($ac_try" in
18151 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18152 *) ac_try_echo=$ac_try;;
18153esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018154eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18155$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018156 (eval "$ac_compile") 2>conftest.er1
18157 ac_status=$?
18158 grep -v '^ *+' conftest.er1 >conftest.err
18159 rm -f conftest.er1
18160 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018161 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018162 (exit $ac_status); } && {
18163 test -z "$ac_c_werror_flag" ||
18164 test ! -s conftest.err
18165 } && test -s conftest.$ac_objext; then
18166
18167cat >>confdefs.h <<\_ACEOF
18168#define HAVE_KQUEUE 1
18169_ACEOF
18170
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018171 { $as_echo "$as_me:$LINENO: result: yes" >&5
18172$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018173else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018174 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018175sed 's/^/| /' conftest.$ac_ext >&5
18176
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018177 { $as_echo "$as_me:$LINENO: result: no" >&5
18178$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018179
18180fi
18181
18182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018183# On some systems (eg. FreeBSD 5), we would find a definition of the
18184# functions ctermid_r, setgroups in the library, but no prototype
18185# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18186# address to avoid compiler warnings and potential miscompilations
18187# because of the missing prototypes.
18188
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018189{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5
18190$as_echo_n "checking for ctermid_r... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018191cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018192/* confdefs.h. */
18193_ACEOF
18194cat confdefs.h >>conftest.$ac_ext
18195cat >>conftest.$ac_ext <<_ACEOF
18196/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018197
18198#include "confdefs.h"
18199#include <stdio.h>
18200
Martin v. Löwisd5843682002-11-21 20:41:28 +000018201int
18202main ()
18203{
18204void* p = ctermid_r
18205 ;
18206 return 0;
18207}
18208_ACEOF
18209rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018210if { (ac_try="$ac_compile"
18211case "(($ac_try" in
18212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18213 *) ac_try_echo=$ac_try;;
18214esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018215eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18216$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018217 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018218 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018219 grep -v '^ *+' conftest.er1 >conftest.err
18220 rm -f conftest.er1
18221 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018222 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018223 (exit $ac_status); } && {
18224 test -z "$ac_c_werror_flag" ||
18225 test ! -s conftest.err
18226 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018227
18228cat >>confdefs.h <<\_ACEOF
18229#define HAVE_CTERMID_R 1
18230_ACEOF
18231
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018232 { $as_echo "$as_me:$LINENO: result: yes" >&5
18233$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018234else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018235 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018236sed 's/^/| /' conftest.$ac_ext >&5
18237
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018238 { $as_echo "$as_me:$LINENO: result: no" >&5
18239$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018240
18241fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018242
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018243rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18244
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018245{ $as_echo "$as_me:$LINENO: checking for flock" >&5
18246$as_echo_n "checking for flock... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018247cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018248/* confdefs.h. */
18249_ACEOF
18250cat confdefs.h >>conftest.$ac_ext
18251cat >>conftest.$ac_ext <<_ACEOF
18252/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018253
18254#include "confdefs.h"
18255#include <sys/file.h>
18256
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018257int
18258main ()
18259{
18260void* p = flock
18261 ;
18262 return 0;
18263}
18264_ACEOF
18265rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018266if { (ac_try="$ac_compile"
18267case "(($ac_try" in
18268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18269 *) ac_try_echo=$ac_try;;
18270esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018271eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18272$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018275 grep -v '^ *+' conftest.er1 >conftest.err
18276 rm -f conftest.er1
18277 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018278 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018279 (exit $ac_status); } && {
18280 test -z "$ac_c_werror_flag" ||
18281 test ! -s conftest.err
18282 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018283
18284cat >>confdefs.h <<\_ACEOF
18285#define HAVE_FLOCK 1
18286_ACEOF
18287
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018288 { $as_echo "$as_me:$LINENO: result: yes" >&5
18289$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018290else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018291 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018292sed 's/^/| /' conftest.$ac_ext >&5
18293
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018294 { $as_echo "$as_me:$LINENO: result: no" >&5
18295$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018296
18297fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018298
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18300
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018301{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5
18302$as_echo_n "checking for getpagesize... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018303cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018304/* confdefs.h. */
18305_ACEOF
18306cat confdefs.h >>conftest.$ac_ext
18307cat >>conftest.$ac_ext <<_ACEOF
18308/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018309
18310#include "confdefs.h"
18311#include <unistd.h>
18312
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018313int
18314main ()
18315{
18316void* p = getpagesize
18317 ;
18318 return 0;
18319}
18320_ACEOF
18321rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018322if { (ac_try="$ac_compile"
18323case "(($ac_try" in
18324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18325 *) ac_try_echo=$ac_try;;
18326esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018327eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18328$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018329 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018330 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018331 grep -v '^ *+' conftest.er1 >conftest.err
18332 rm -f conftest.er1
18333 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018334 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018335 (exit $ac_status); } && {
18336 test -z "$ac_c_werror_flag" ||
18337 test ! -s conftest.err
18338 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018339
18340cat >>confdefs.h <<\_ACEOF
18341#define HAVE_GETPAGESIZE 1
18342_ACEOF
18343
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018344 { $as_echo "$as_me:$LINENO: result: yes" >&5
18345$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018346else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018347 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018348sed 's/^/| /' conftest.$ac_ext >&5
18349
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018350 { $as_echo "$as_me:$LINENO: result: no" >&5
18351$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018352
18353fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018354
18355rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018356
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018357for ac_prog in true
18358do
18359 # Extract the first word of "$ac_prog", so it can be a program name with args.
18360set dummy $ac_prog; ac_word=$2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018361{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18362$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018363if test "${ac_cv_prog_TRUE+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018364 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018365else
18366 if test -n "$TRUE"; then
18367 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18368else
18369as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18370for as_dir in $PATH
18371do
18372 IFS=$as_save_IFS
18373 test -z "$as_dir" && as_dir=.
18374 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018375 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 +000018376 ac_cv_prog_TRUE="$ac_prog"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018377 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018378 break 2
18379 fi
18380done
18381done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018382IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018383
18384fi
18385fi
18386TRUE=$ac_cv_prog_TRUE
18387if test -n "$TRUE"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018388 { $as_echo "$as_me:$LINENO: result: $TRUE" >&5
18389$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018390else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018391 { $as_echo "$as_me:$LINENO: result: no" >&5
18392$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018393fi
18394
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018395
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018396 test -n "$TRUE" && break
18397done
18398test -n "$TRUE" || TRUE="/bin/true"
18399
18400
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018401{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18402$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018403if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018404 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018405else
18406 ac_check_lib_save_LIBS=$LIBS
18407LIBS="-lc $LIBS"
18408cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018409/* confdefs.h. */
18410_ACEOF
18411cat confdefs.h >>conftest.$ac_ext
18412cat >>conftest.$ac_ext <<_ACEOF
18413/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018414
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018415/* Override any GCC internal prototype to avoid an error.
18416 Use char because int might match the return type of a GCC
18417 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018418#ifdef __cplusplus
18419extern "C"
18420#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018421char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018422int
18423main ()
18424{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018425return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018426 ;
18427 return 0;
18428}
18429_ACEOF
18430rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018431if { (ac_try="$ac_link"
18432case "(($ac_try" in
18433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18434 *) ac_try_echo=$ac_try;;
18435esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018436eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18437$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018438 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018439 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018440 grep -v '^ *+' conftest.er1 >conftest.err
18441 rm -f conftest.er1
18442 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018443 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018444 (exit $ac_status); } && {
18445 test -z "$ac_c_werror_flag" ||
18446 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018447 } && test -s conftest$ac_exeext && {
18448 test "$cross_compiling" = yes ||
18449 $as_test_x conftest$ac_exeext
18450 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018451 ac_cv_lib_c_inet_aton=yes
18452else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018453 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018454sed 's/^/| /' conftest.$ac_ext >&5
18455
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018456 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018458
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018459rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018460rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018461 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018462LIBS=$ac_check_lib_save_LIBS
18463fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018464{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18465$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
18466if test "x$ac_cv_lib_c_inet_aton" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018467 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018468else
18469
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018470{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18471$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018472if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018473 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018474else
18475 ac_check_lib_save_LIBS=$LIBS
18476LIBS="-lresolv $LIBS"
18477cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018478/* confdefs.h. */
18479_ACEOF
18480cat confdefs.h >>conftest.$ac_ext
18481cat >>conftest.$ac_ext <<_ACEOF
18482/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018484/* Override any GCC internal prototype to avoid an error.
18485 Use char because int might match the return type of a GCC
18486 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018487#ifdef __cplusplus
18488extern "C"
18489#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018490char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018491int
18492main ()
18493{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018495 ;
18496 return 0;
18497}
18498_ACEOF
18499rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500if { (ac_try="$ac_link"
18501case "(($ac_try" in
18502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18503 *) ac_try_echo=$ac_try;;
18504esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018505eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18506$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018507 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018508 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018509 grep -v '^ *+' conftest.er1 >conftest.err
18510 rm -f conftest.er1
18511 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018512 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018513 (exit $ac_status); } && {
18514 test -z "$ac_c_werror_flag" ||
18515 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018516 } && test -s conftest$ac_exeext && {
18517 test "$cross_compiling" = yes ||
18518 $as_test_x conftest$ac_exeext
18519 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018520 ac_cv_lib_resolv_inet_aton=yes
18521else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018522 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018523sed 's/^/| /' conftest.$ac_ext >&5
18524
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018525 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018526fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018527
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018528rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018529rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018530 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018531LIBS=$ac_check_lib_save_LIBS
18532fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018533{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18534$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
18535if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018536 cat >>confdefs.h <<_ACEOF
18537#define HAVE_LIBRESOLV 1
18538_ACEOF
18539
18540 LIBS="-lresolv $LIBS"
18541
18542fi
18543
18544
18545fi
18546
18547
Christian Heimesd0764e22007-12-04 15:00:33 +000018548# On Tru64, chflags seems to be present, but calling it will
18549# exit Python
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018550{ $as_echo "$as_me:$LINENO: checking for chflags" >&5
18551$as_echo_n "checking for chflags... " >&6; }
18552if test "${ac_cv_have_chflags+set}" = set; then
18553 $as_echo_n "(cached) " >&6
18554else
18555 if test "$cross_compiling" = yes; then
18556 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018557else
18558 cat >conftest.$ac_ext <<_ACEOF
18559/* confdefs.h. */
18560_ACEOF
18561cat confdefs.h >>conftest.$ac_ext
18562cat >>conftest.$ac_ext <<_ACEOF
18563/* end confdefs.h. */
18564
18565#include <sys/stat.h>
18566#include <unistd.h>
18567int main(int argc, char*argv[])
18568{
18569 if(chflags(argv[0], 0) != 0)
18570 return 1;
18571 return 0;
18572}
18573
18574_ACEOF
18575rm -f conftest$ac_exeext
18576if { (ac_try="$ac_link"
18577case "(($ac_try" in
18578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18579 *) ac_try_echo=$ac_try;;
18580esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018581eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18582$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018583 (eval "$ac_link") 2>&5
18584 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018585 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018586 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18587 { (case "(($ac_try" in
18588 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18589 *) ac_try_echo=$ac_try;;
18590esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018591eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18592$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018593 (eval "$ac_try") 2>&5
18594 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018595 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018596 (exit $ac_status); }; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018597 ac_cv_have_chflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000018598else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018599 $as_echo "$as_me: program exited with status $ac_status" >&5
18600$as_echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018601sed 's/^/| /' conftest.$ac_ext >&5
18602
18603( exit $ac_status )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018604ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018605fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018606rm -rf conftest.dSYM
Christian Heimesd0764e22007-12-04 15:00:33 +000018607rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18608fi
18609
18610
18611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018612fi
18613
18614{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18615$as_echo "$ac_cv_have_chflags" >&6; }
18616if test $ac_cv_have_chflags = yes
18617then
18618
18619cat >>confdefs.h <<\_ACEOF
18620#define HAVE_CHFLAGS 1
18621_ACEOF
18622
18623fi
18624
18625{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5
18626$as_echo_n "checking for lchflags... " >&6; }
18627if test "${ac_cv_have_lchflags+set}" = set; then
18628 $as_echo_n "(cached) " >&6
18629else
18630 if test "$cross_compiling" = yes; then
18631 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018632else
18633 cat >conftest.$ac_ext <<_ACEOF
18634/* confdefs.h. */
18635_ACEOF
18636cat confdefs.h >>conftest.$ac_ext
18637cat >>conftest.$ac_ext <<_ACEOF
18638/* end confdefs.h. */
18639
18640#include <sys/stat.h>
18641#include <unistd.h>
18642int main(int argc, char*argv[])
18643{
18644 if(lchflags(argv[0], 0) != 0)
18645 return 1;
18646 return 0;
18647}
18648
18649_ACEOF
18650rm -f conftest$ac_exeext
18651if { (ac_try="$ac_link"
18652case "(($ac_try" in
18653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18654 *) ac_try_echo=$ac_try;;
18655esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018656eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18657$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018658 (eval "$ac_link") 2>&5
18659 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018660 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018661 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18662 { (case "(($ac_try" in
18663 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18664 *) ac_try_echo=$ac_try;;
18665esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018666eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18667$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018668 (eval "$ac_try") 2>&5
18669 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018670 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018671 (exit $ac_status); }; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018672 ac_cv_have_lchflags=yes
18673else
18674 $as_echo "$as_me: program exited with status $ac_status" >&5
18675$as_echo "$as_me: failed program was:" >&5
18676sed 's/^/| /' conftest.$ac_ext >&5
18677
18678( exit $ac_status )
18679ac_cv_have_lchflags=no
18680fi
18681rm -rf conftest.dSYM
18682rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18683fi
18684
18685
18686
18687fi
18688
18689{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18690$as_echo "$ac_cv_have_lchflags" >&6; }
18691if test $ac_cv_have_lchflags = yes
18692then
Christian Heimesd0764e22007-12-04 15:00:33 +000018693
18694cat >>confdefs.h <<\_ACEOF
18695#define HAVE_LCHFLAGS 1
18696_ACEOF
18697
Christian Heimesd0764e22007-12-04 15:00:33 +000018698fi
Christian Heimesd0764e22007-12-04 15:00:33 +000018699
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018700case $ac_sys_system/$ac_sys_release in
18701Darwin/*)
18702 _CUR_CFLAGS="${CFLAGS}"
18703 _CUR_LDFLAGS="${LDFLAGS}"
18704 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18705 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18706 ;;
18707esac
18708
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018709{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18710$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018711if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018712 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018713else
18714 ac_check_lib_save_LIBS=$LIBS
18715LIBS="-lz $LIBS"
18716cat >conftest.$ac_ext <<_ACEOF
18717/* confdefs.h. */
18718_ACEOF
18719cat confdefs.h >>conftest.$ac_ext
18720cat >>conftest.$ac_ext <<_ACEOF
18721/* end confdefs.h. */
18722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018723/* Override any GCC internal prototype to avoid an error.
18724 Use char because int might match the return type of a GCC
18725 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018726#ifdef __cplusplus
18727extern "C"
18728#endif
18729char inflateCopy ();
18730int
18731main ()
18732{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018733return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018734 ;
18735 return 0;
18736}
18737_ACEOF
18738rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018739if { (ac_try="$ac_link"
18740case "(($ac_try" in
18741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18742 *) ac_try_echo=$ac_try;;
18743esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018744eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18745$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018746 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018747 ac_status=$?
18748 grep -v '^ *+' conftest.er1 >conftest.err
18749 rm -f conftest.er1
18750 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018751 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018752 (exit $ac_status); } && {
18753 test -z "$ac_c_werror_flag" ||
18754 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018755 } && test -s conftest$ac_exeext && {
18756 test "$cross_compiling" = yes ||
18757 $as_test_x conftest$ac_exeext
18758 }; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018759 ac_cv_lib_z_inflateCopy=yes
18760else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018761 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018762sed 's/^/| /' conftest.$ac_ext >&5
18763
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018764 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018765fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018766
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018767rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018768rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018769 conftest$ac_exeext conftest.$ac_ext
18770LIBS=$ac_check_lib_save_LIBS
18771fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018772{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18773$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
18774if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018775
18776cat >>confdefs.h <<\_ACEOF
18777#define HAVE_ZLIB_COPY 1
18778_ACEOF
18779
18780fi
18781
18782
18783case $ac_sys_system/$ac_sys_release in
18784Darwin/*)
18785 CFLAGS="${_CUR_CFLAGS}"
18786 LDFLAGS="${_CUR_LDFLAGS}"
18787 ;;
18788esac
18789
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018790{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5
18791$as_echo_n "checking for hstrerror... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018792cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018793/* confdefs.h. */
18794_ACEOF
18795cat confdefs.h >>conftest.$ac_ext
18796cat >>conftest.$ac_ext <<_ACEOF
18797/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018798
18799#include "confdefs.h"
18800#include <netdb.h>
18801
Martin v. Löwise9416172003-05-03 10:12:45 +000018802int
18803main ()
18804{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018805void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018806 ;
18807 return 0;
18808}
18809_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018810rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018811if { (ac_try="$ac_link"
18812case "(($ac_try" in
18813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18814 *) ac_try_echo=$ac_try;;
18815esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018816eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18817$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018818 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018819 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018820 grep -v '^ *+' conftest.er1 >conftest.err
18821 rm -f conftest.er1
18822 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018823 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018824 (exit $ac_status); } && {
18825 test -z "$ac_c_werror_flag" ||
18826 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018827 } && test -s conftest$ac_exeext && {
18828 test "$cross_compiling" = yes ||
18829 $as_test_x conftest$ac_exeext
18830 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018831
18832cat >>confdefs.h <<\_ACEOF
18833#define HAVE_HSTRERROR 1
18834_ACEOF
18835
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018836 { $as_echo "$as_me:$LINENO: result: yes" >&5
18837$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018838else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018839 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018840sed 's/^/| /' conftest.$ac_ext >&5
18841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018842 { $as_echo "$as_me:$LINENO: result: no" >&5
18843$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018844
18845fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018846
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018847rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018848rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018849 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018850
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018851{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5
18852$as_echo_n "checking for inet_aton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018853cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018854/* confdefs.h. */
18855_ACEOF
18856cat confdefs.h >>conftest.$ac_ext
18857cat >>conftest.$ac_ext <<_ACEOF
18858/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018859
18860#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018861#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018862#include <sys/socket.h>
18863#include <netinet/in.h>
18864#include <arpa/inet.h>
18865
Martin v. Löwise9416172003-05-03 10:12:45 +000018866int
18867main ()
18868{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018869void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018870 ;
18871 return 0;
18872}
18873_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018874rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018875if { (ac_try="$ac_link"
18876case "(($ac_try" in
18877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18878 *) ac_try_echo=$ac_try;;
18879esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018880eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18881$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018882 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018883 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018884 grep -v '^ *+' conftest.er1 >conftest.err
18885 rm -f conftest.er1
18886 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018887 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018888 (exit $ac_status); } && {
18889 test -z "$ac_c_werror_flag" ||
18890 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018891 } && test -s conftest$ac_exeext && {
18892 test "$cross_compiling" = yes ||
18893 $as_test_x conftest$ac_exeext
18894 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018895
18896cat >>confdefs.h <<\_ACEOF
18897#define HAVE_INET_ATON 1
18898_ACEOF
18899
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018900 { $as_echo "$as_me:$LINENO: result: yes" >&5
18901$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018902else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018903 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018904sed 's/^/| /' conftest.$ac_ext >&5
18905
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018906 { $as_echo "$as_me:$LINENO: result: no" >&5
18907$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018908
18909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018910
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018911rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018912rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018913 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018914
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018915{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5
18916$as_echo_n "checking for inet_pton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018918/* confdefs.h. */
18919_ACEOF
18920cat confdefs.h >>conftest.$ac_ext
18921cat >>conftest.$ac_ext <<_ACEOF
18922/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018923
18924#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018925#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018926#include <sys/socket.h>
18927#include <netinet/in.h>
18928#include <arpa/inet.h>
18929
Martin v. Löwise9416172003-05-03 10:12:45 +000018930int
18931main ()
18932{
18933void* p = inet_pton
18934 ;
18935 return 0;
18936}
18937_ACEOF
18938rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018939if { (ac_try="$ac_compile"
18940case "(($ac_try" in
18941 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18942 *) ac_try_echo=$ac_try;;
18943esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018944eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18945$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018946 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018947 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018948 grep -v '^ *+' conftest.er1 >conftest.err
18949 rm -f conftest.er1
18950 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018951 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018952 (exit $ac_status); } && {
18953 test -z "$ac_c_werror_flag" ||
18954 test ! -s conftest.err
18955 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018956
18957cat >>confdefs.h <<\_ACEOF
18958#define HAVE_INET_PTON 1
18959_ACEOF
18960
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018961 { $as_echo "$as_me:$LINENO: result: yes" >&5
18962$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018963else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018964 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018965sed 's/^/| /' conftest.$ac_ext >&5
18966
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018967 { $as_echo "$as_me:$LINENO: result: no" >&5
18968$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018969
18970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018971
18972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018973
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018974# On some systems, setgroups is in unistd.h, on others, in grp.h
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018975{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5
18976$as_echo_n "checking for setgroups... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018977cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018978/* confdefs.h. */
18979_ACEOF
18980cat confdefs.h >>conftest.$ac_ext
18981cat >>conftest.$ac_ext <<_ACEOF
18982/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018983
18984#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018985#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018986#ifdef HAVE_GRP_H
18987#include <grp.h>
18988#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018989
Martin v. Löwisd5843682002-11-21 20:41:28 +000018990int
18991main ()
18992{
18993void* p = setgroups
18994 ;
18995 return 0;
18996}
18997_ACEOF
18998rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018999if { (ac_try="$ac_compile"
19000case "(($ac_try" in
19001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19002 *) ac_try_echo=$ac_try;;
19003esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019004eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19005$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019006 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019007 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019008 grep -v '^ *+' conftest.er1 >conftest.err
19009 rm -f conftest.er1
19010 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019011 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019012 (exit $ac_status); } && {
19013 test -z "$ac_c_werror_flag" ||
19014 test ! -s conftest.err
19015 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019016
19017cat >>confdefs.h <<\_ACEOF
19018#define HAVE_SETGROUPS 1
19019_ACEOF
19020
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019021 { $as_echo "$as_me:$LINENO: result: yes" >&5
19022$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019023else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019024 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019025sed 's/^/| /' conftest.$ac_ext >&5
19026
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019027 { $as_echo "$as_me:$LINENO: result: no" >&5
19028$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019029
19030fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019031
19032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019033
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019034# check for openpty and forkpty
19035
Martin v. Löwis11437992002-04-12 09:54:03 +000019036
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019037for ac_func in openpty
19038do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019039as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19040{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19041$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019042if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019043 $as_echo_n "(cached) " >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019044else
Martin v. Löwis11437992002-04-12 09:54:03 +000019045 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019046/* confdefs.h. */
19047_ACEOF
19048cat confdefs.h >>conftest.$ac_ext
19049cat >>conftest.$ac_ext <<_ACEOF
19050/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019051/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19052 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19053#define $ac_func innocuous_$ac_func
19054
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019055/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019056 which can conflict with char $ac_func (); below.
19057 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019058 <limits.h> exists even on freestanding compilers. */
19059
19060#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019061# include <limits.h>
19062#else
19063# include <assert.h>
19064#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019065
19066#undef $ac_func
19067
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019068/* Override any GCC internal prototype to avoid an error.
19069 Use char because int might match the return type of a GCC
19070 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019071#ifdef __cplusplus
19072extern "C"
19073#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019074char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019075/* The GNU C library defines this for functions which it implements
19076 to always fail with ENOSYS. Some functions are actually named
19077 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019078#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019079choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019080#endif
19081
Skip Montanaro6dead952003-09-25 14:50:04 +000019082int
19083main ()
19084{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019085return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019086 ;
19087 return 0;
19088}
19089_ACEOF
19090rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019091if { (ac_try="$ac_link"
19092case "(($ac_try" in
19093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19094 *) ac_try_echo=$ac_try;;
19095esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019096eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19097$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019098 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019099 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019100 grep -v '^ *+' conftest.er1 >conftest.err
19101 rm -f conftest.er1
19102 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019103 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019104 (exit $ac_status); } && {
19105 test -z "$ac_c_werror_flag" ||
19106 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019107 } && test -s conftest$ac_exeext && {
19108 test "$cross_compiling" = yes ||
19109 $as_test_x conftest$ac_exeext
19110 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019111 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019112else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019113 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019114sed 's/^/| /' conftest.$ac_ext >&5
19115
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019116 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019117fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019118
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019119rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019120rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019121 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019122fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019123ac_res=`eval 'as_val=${'$as_ac_var'}
19124 $as_echo "$as_val"'`
19125 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19126$as_echo "$ac_res" >&6; }
19127as_val=`eval 'as_val=${'$as_ac_var'}
19128 $as_echo "$as_val"'`
19129 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019130 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019131#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019132_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019133
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019134else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019135 { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19136$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019137if test "${ac_cv_lib_util_openpty+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019138 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019139else
Martin v. Löwis11437992002-04-12 09:54:03 +000019140 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019141LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019142cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019143/* confdefs.h. */
19144_ACEOF
19145cat confdefs.h >>conftest.$ac_ext
19146cat >>conftest.$ac_ext <<_ACEOF
19147/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019148
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019149/* Override any GCC internal prototype to avoid an error.
19150 Use char because int might match the return type of a GCC
19151 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019152#ifdef __cplusplus
19153extern "C"
19154#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019155char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019156int
19157main ()
19158{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019159return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019160 ;
19161 return 0;
19162}
19163_ACEOF
19164rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019165if { (ac_try="$ac_link"
19166case "(($ac_try" in
19167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19168 *) ac_try_echo=$ac_try;;
19169esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019170eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19171$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019172 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019173 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019174 grep -v '^ *+' conftest.er1 >conftest.err
19175 rm -f conftest.er1
19176 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019177 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019178 (exit $ac_status); } && {
19179 test -z "$ac_c_werror_flag" ||
19180 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019181 } && test -s conftest$ac_exeext && {
19182 test "$cross_compiling" = yes ||
19183 $as_test_x conftest$ac_exeext
19184 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019185 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019186else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019187 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019188sed 's/^/| /' conftest.$ac_ext >&5
19189
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019190 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019191fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019192
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019193rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019194rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019195 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019196LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019197fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019198{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19199$as_echo "$ac_cv_lib_util_openpty" >&6; }
19200if test "x$ac_cv_lib_util_openpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019201 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019202#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019203_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019204 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019205else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019206 { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19207$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019208if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019209 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019210else
19211 ac_check_lib_save_LIBS=$LIBS
19212LIBS="-lbsd $LIBS"
19213cat >conftest.$ac_ext <<_ACEOF
19214/* confdefs.h. */
19215_ACEOF
19216cat confdefs.h >>conftest.$ac_ext
19217cat >>conftest.$ac_ext <<_ACEOF
19218/* end confdefs.h. */
19219
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019220/* Override any GCC internal prototype to avoid an error.
19221 Use char because int might match the return type of a GCC
19222 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019223#ifdef __cplusplus
19224extern "C"
19225#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019226char openpty ();
19227int
19228main ()
19229{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019230return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019231 ;
19232 return 0;
19233}
19234_ACEOF
19235rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019236if { (ac_try="$ac_link"
19237case "(($ac_try" in
19238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19239 *) ac_try_echo=$ac_try;;
19240esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019241eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19242$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019243 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019244 ac_status=$?
19245 grep -v '^ *+' conftest.er1 >conftest.err
19246 rm -f conftest.er1
19247 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019248 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019249 (exit $ac_status); } && {
19250 test -z "$ac_c_werror_flag" ||
19251 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019252 } && test -s conftest$ac_exeext && {
19253 test "$cross_compiling" = yes ||
19254 $as_test_x conftest$ac_exeext
19255 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019256 ac_cv_lib_bsd_openpty=yes
19257else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019258 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019259sed 's/^/| /' conftest.$ac_ext >&5
19260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019261 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019263
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019264rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019265rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019266 conftest$ac_exeext conftest.$ac_ext
19267LIBS=$ac_check_lib_save_LIBS
19268fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019269{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19270$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
19271if test "x$ac_cv_lib_bsd_openpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019272 cat >>confdefs.h <<\_ACEOF
19273#define HAVE_OPENPTY 1
19274_ACEOF
19275 LIBS="$LIBS -lbsd"
19276fi
19277
19278
19279fi
19280
Fred Drake8cef4cf2000-06-28 16:40:38 +000019281
19282fi
19283done
19284
Martin v. Löwis11437992002-04-12 09:54:03 +000019285
Fred Drake8cef4cf2000-06-28 16:40:38 +000019286for ac_func in forkpty
19287do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019288as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19289{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19290$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019291if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019292 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019293else
Martin v. Löwis11437992002-04-12 09:54:03 +000019294 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019295/* confdefs.h. */
19296_ACEOF
19297cat confdefs.h >>conftest.$ac_ext
19298cat >>conftest.$ac_ext <<_ACEOF
19299/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019300/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19301 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19302#define $ac_func innocuous_$ac_func
19303
Fred Drake8cef4cf2000-06-28 16:40:38 +000019304/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019305 which can conflict with char $ac_func (); below.
19306 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019307 <limits.h> exists even on freestanding compilers. */
19308
19309#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019310# include <limits.h>
19311#else
19312# include <assert.h>
19313#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019314
19315#undef $ac_func
19316
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019317/* Override any GCC internal prototype to avoid an error.
19318 Use char because int might match the return type of a GCC
19319 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019320#ifdef __cplusplus
19321extern "C"
19322#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019323char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019324/* The GNU C library defines this for functions which it implements
19325 to always fail with ENOSYS. Some functions are actually named
19326 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019327#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019328choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019329#endif
19330
Skip Montanaro6dead952003-09-25 14:50:04 +000019331int
19332main ()
19333{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019334return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019335 ;
19336 return 0;
19337}
19338_ACEOF
19339rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019340if { (ac_try="$ac_link"
19341case "(($ac_try" in
19342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19343 *) ac_try_echo=$ac_try;;
19344esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019345eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19346$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019347 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019348 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019349 grep -v '^ *+' conftest.er1 >conftest.err
19350 rm -f conftest.er1
19351 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019352 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019353 (exit $ac_status); } && {
19354 test -z "$ac_c_werror_flag" ||
19355 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019356 } && test -s conftest$ac_exeext && {
19357 test "$cross_compiling" = yes ||
19358 $as_test_x conftest$ac_exeext
19359 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019360 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019361else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019362 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019363sed 's/^/| /' conftest.$ac_ext >&5
19364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019365 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019367
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019368rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019369rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019370 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019371fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019372ac_res=`eval 'as_val=${'$as_ac_var'}
19373 $as_echo "$as_val"'`
19374 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19375$as_echo "$ac_res" >&6; }
19376as_val=`eval 'as_val=${'$as_ac_var'}
19377 $as_echo "$as_val"'`
19378 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019379 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019380#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019381_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019382
Fred Drake8cef4cf2000-06-28 16:40:38 +000019383else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019384 { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19385$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019386if test "${ac_cv_lib_util_forkpty+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019387 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019388else
Martin v. Löwis11437992002-04-12 09:54:03 +000019389 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019390LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019391cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019392/* confdefs.h. */
19393_ACEOF
19394cat confdefs.h >>conftest.$ac_ext
19395cat >>conftest.$ac_ext <<_ACEOF
19396/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019398/* Override any GCC internal prototype to avoid an error.
19399 Use char because int might match the return type of a GCC
19400 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019401#ifdef __cplusplus
19402extern "C"
19403#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019404char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019405int
19406main ()
19407{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019408return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019409 ;
19410 return 0;
19411}
19412_ACEOF
19413rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019414if { (ac_try="$ac_link"
19415case "(($ac_try" in
19416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19417 *) ac_try_echo=$ac_try;;
19418esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019419eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19420$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019421 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019422 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019423 grep -v '^ *+' conftest.er1 >conftest.err
19424 rm -f conftest.er1
19425 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019426 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019427 (exit $ac_status); } && {
19428 test -z "$ac_c_werror_flag" ||
19429 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019430 } && test -s conftest$ac_exeext && {
19431 test "$cross_compiling" = yes ||
19432 $as_test_x conftest$ac_exeext
19433 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019434 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019435else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019436 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019437sed 's/^/| /' conftest.$ac_ext >&5
19438
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019439 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019440fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019441
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019442rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019443rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019444 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019445LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019446fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019447{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19448$as_echo "$ac_cv_lib_util_forkpty" >&6; }
19449if test "x$ac_cv_lib_util_forkpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019450 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019451#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019452_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019453 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019454else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019455 { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19456$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019457if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019458 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019459else
19460 ac_check_lib_save_LIBS=$LIBS
19461LIBS="-lbsd $LIBS"
19462cat >conftest.$ac_ext <<_ACEOF
19463/* confdefs.h. */
19464_ACEOF
19465cat confdefs.h >>conftest.$ac_ext
19466cat >>conftest.$ac_ext <<_ACEOF
19467/* end confdefs.h. */
19468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019469/* Override any GCC internal prototype to avoid an error.
19470 Use char because int might match the return type of a GCC
19471 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019472#ifdef __cplusplus
19473extern "C"
19474#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019475char forkpty ();
19476int
19477main ()
19478{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019479return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019480 ;
19481 return 0;
19482}
19483_ACEOF
19484rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019485if { (ac_try="$ac_link"
19486case "(($ac_try" in
19487 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19488 *) ac_try_echo=$ac_try;;
19489esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019490eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19491$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019492 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019493 ac_status=$?
19494 grep -v '^ *+' conftest.er1 >conftest.err
19495 rm -f conftest.er1
19496 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019497 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019498 (exit $ac_status); } && {
19499 test -z "$ac_c_werror_flag" ||
19500 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019501 } && test -s conftest$ac_exeext && {
19502 test "$cross_compiling" = yes ||
19503 $as_test_x conftest$ac_exeext
19504 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019505 ac_cv_lib_bsd_forkpty=yes
19506else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019507 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019508sed 's/^/| /' conftest.$ac_ext >&5
19509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019510 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019512
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019513rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019514rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019515 conftest$ac_exeext conftest.$ac_ext
19516LIBS=$ac_check_lib_save_LIBS
19517fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019518{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19519$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
19520if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019521 cat >>confdefs.h <<\_ACEOF
19522#define HAVE_FORKPTY 1
19523_ACEOF
19524 LIBS="$LIBS -lbsd"
19525fi
19526
19527
19528fi
19529
Fred Drake8cef4cf2000-06-28 16:40:38 +000019530
19531fi
19532done
19533
Jack Jansendd19cf82001-12-06 22:36:17 +000019534
Christian Heimesb186d002008-03-18 15:15:01 +000019535# Stuff for expat.
19536
19537for ac_func in memmove
19538do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019539as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19540{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19541$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019542if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019543 $as_echo_n "(cached) " >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019544else
19545 cat >conftest.$ac_ext <<_ACEOF
19546/* confdefs.h. */
19547_ACEOF
19548cat confdefs.h >>conftest.$ac_ext
19549cat >>conftest.$ac_ext <<_ACEOF
19550/* end confdefs.h. */
19551/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19552 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19553#define $ac_func innocuous_$ac_func
19554
19555/* System header to define __stub macros and hopefully few prototypes,
19556 which can conflict with char $ac_func (); below.
19557 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19558 <limits.h> exists even on freestanding compilers. */
19559
19560#ifdef __STDC__
19561# include <limits.h>
19562#else
19563# include <assert.h>
19564#endif
19565
19566#undef $ac_func
19567
19568/* Override any GCC internal prototype to avoid an error.
19569 Use char because int might match the return type of a GCC
19570 builtin and then its argument prototype would still apply. */
19571#ifdef __cplusplus
19572extern "C"
19573#endif
19574char $ac_func ();
19575/* The GNU C library defines this for functions which it implements
19576 to always fail with ENOSYS. Some functions are actually named
19577 something starting with __ and the normal name is an alias. */
19578#if defined __stub_$ac_func || defined __stub___$ac_func
19579choke me
19580#endif
19581
19582int
19583main ()
19584{
19585return $ac_func ();
19586 ;
19587 return 0;
19588}
19589_ACEOF
19590rm -f conftest.$ac_objext conftest$ac_exeext
19591if { (ac_try="$ac_link"
19592case "(($ac_try" in
19593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19594 *) ac_try_echo=$ac_try;;
19595esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019596eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19597$as_echo "$ac_try_echo") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019598 (eval "$ac_link") 2>conftest.er1
19599 ac_status=$?
19600 grep -v '^ *+' conftest.er1 >conftest.err
19601 rm -f conftest.er1
19602 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019603 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019604 (exit $ac_status); } && {
19605 test -z "$ac_c_werror_flag" ||
19606 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019607 } && test -s conftest$ac_exeext && {
19608 test "$cross_compiling" = yes ||
19609 $as_test_x conftest$ac_exeext
19610 }; then
Christian Heimesb186d002008-03-18 15:15:01 +000019611 eval "$as_ac_var=yes"
19612else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019613 $as_echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019614sed 's/^/| /' conftest.$ac_ext >&5
19615
19616 eval "$as_ac_var=no"
19617fi
19618
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019619rm -rf conftest.dSYM
Christian Heimesb186d002008-03-18 15:15:01 +000019620rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19621 conftest$ac_exeext conftest.$ac_ext
19622fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019623ac_res=`eval 'as_val=${'$as_ac_var'}
19624 $as_echo "$as_val"'`
19625 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19626$as_echo "$ac_res" >&6; }
19627as_val=`eval 'as_val=${'$as_ac_var'}
19628 $as_echo "$as_val"'`
19629 if test "x$as_val" = x""yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019630 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019631#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019632_ACEOF
19633
19634fi
19635done
19636
19637
Michael W. Hudson54241132001-12-07 15:38:26 +000019638# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019639
19640
19641
19642
19643
19644
Fred Drake8cef4cf2000-06-28 16:40:38 +000019645for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19646do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019647as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19648{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19649$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019650if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019651 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019652else
Martin v. Löwis11437992002-04-12 09:54:03 +000019653 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019654/* confdefs.h. */
19655_ACEOF
19656cat confdefs.h >>conftest.$ac_ext
19657cat >>conftest.$ac_ext <<_ACEOF
19658/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019659/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19660 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19661#define $ac_func innocuous_$ac_func
19662
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019663/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019664 which can conflict with char $ac_func (); below.
19665 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019666 <limits.h> exists even on freestanding compilers. */
19667
19668#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019669# include <limits.h>
19670#else
19671# include <assert.h>
19672#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019673
19674#undef $ac_func
19675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019676/* Override any GCC internal prototype to avoid an error.
19677 Use char because int might match the return type of a GCC
19678 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019679#ifdef __cplusplus
19680extern "C"
19681#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019682char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019683/* The GNU C library defines this for functions which it implements
19684 to always fail with ENOSYS. Some functions are actually named
19685 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019686#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019687choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019688#endif
19689
Skip Montanaro6dead952003-09-25 14:50:04 +000019690int
19691main ()
19692{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019693return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019694 ;
19695 return 0;
19696}
19697_ACEOF
19698rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019699if { (ac_try="$ac_link"
19700case "(($ac_try" in
19701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19702 *) ac_try_echo=$ac_try;;
19703esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019704eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19705$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019706 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019707 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019708 grep -v '^ *+' conftest.er1 >conftest.err
19709 rm -f conftest.er1
19710 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019711 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019712 (exit $ac_status); } && {
19713 test -z "$ac_c_werror_flag" ||
19714 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019715 } && test -s conftest$ac_exeext && {
19716 test "$cross_compiling" = yes ||
19717 $as_test_x conftest$ac_exeext
19718 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019719 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019720else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019721 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019722sed 's/^/| /' conftest.$ac_ext >&5
19723
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019724 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019725fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019727rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019728rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019729 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019730fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019731ac_res=`eval 'as_val=${'$as_ac_var'}
19732 $as_echo "$as_val"'`
19733 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19734$as_echo "$ac_res" >&6; }
19735as_val=`eval 'as_val=${'$as_ac_var'}
19736 $as_echo "$as_val"'`
19737 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019738 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019739#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019740_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019741
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019742fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019743done
19744
Michael W. Hudson54241132001-12-07 15:38:26 +000019745
Martin v. Löwis11437992002-04-12 09:54:03 +000019746
19747
19748
Christian Heimesb186d002008-03-18 15:15:01 +000019749for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019750do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019751as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19752{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19753$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019754if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019755 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019756else
Martin v. Löwis11437992002-04-12 09:54:03 +000019757 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019758/* confdefs.h. */
19759_ACEOF
19760cat confdefs.h >>conftest.$ac_ext
19761cat >>conftest.$ac_ext <<_ACEOF
19762/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019763/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19764 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19765#define $ac_func innocuous_$ac_func
19766
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019767/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019768 which can conflict with char $ac_func (); below.
19769 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019770 <limits.h> exists even on freestanding compilers. */
19771
19772#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019773# include <limits.h>
19774#else
19775# include <assert.h>
19776#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019777
19778#undef $ac_func
19779
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019780/* Override any GCC internal prototype to avoid an error.
19781 Use char because int might match the return type of a GCC
19782 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019783#ifdef __cplusplus
19784extern "C"
19785#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019786char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019787/* The GNU C library defines this for functions which it implements
19788 to always fail with ENOSYS. Some functions are actually named
19789 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019790#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019791choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019792#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019793
Skip Montanaro6dead952003-09-25 14:50:04 +000019794int
19795main ()
19796{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019797return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019798 ;
19799 return 0;
19800}
19801_ACEOF
19802rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019803if { (ac_try="$ac_link"
19804case "(($ac_try" in
19805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19806 *) ac_try_echo=$ac_try;;
19807esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019808eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19809$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019810 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019811 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019812 grep -v '^ *+' conftest.er1 >conftest.err
19813 rm -f conftest.er1
19814 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019815 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019816 (exit $ac_status); } && {
19817 test -z "$ac_c_werror_flag" ||
19818 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019819 } && test -s conftest$ac_exeext && {
19820 test "$cross_compiling" = yes ||
19821 $as_test_x conftest$ac_exeext
19822 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019823 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019824else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019825 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019826sed 's/^/| /' conftest.$ac_ext >&5
19827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019828 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019829fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019830
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019831rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019832rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019833 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019834fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019835ac_res=`eval 'as_val=${'$as_ac_var'}
19836 $as_echo "$as_val"'`
19837 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19838$as_echo "$ac_res" >&6; }
19839as_val=`eval 'as_val=${'$as_ac_var'}
19840 $as_echo "$as_val"'`
19841 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019842 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019843#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019844_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019845
Martin v. Löwis1142de32002-03-29 16:28:31 +000019846else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019847 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019848 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019849 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19850 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019851esac
19852
Martin v. Löwis1142de32002-03-29 16:28:31 +000019853fi
19854done
19855
19856
Martin v. Löwis11437992002-04-12 09:54:03 +000019857
Martin v. Löwis1142de32002-03-29 16:28:31 +000019858for ac_func in getpgrp
19859do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019860as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19861{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19862$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019863if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019864 $as_echo_n "(cached) " >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019865else
Martin v. Löwis11437992002-04-12 09:54:03 +000019866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019867/* confdefs.h. */
19868_ACEOF
19869cat confdefs.h >>conftest.$ac_ext
19870cat >>conftest.$ac_ext <<_ACEOF
19871/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019872/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19873 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19874#define $ac_func innocuous_$ac_func
19875
Martin v. Löwis1142de32002-03-29 16:28:31 +000019876/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019877 which can conflict with char $ac_func (); below.
19878 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019879 <limits.h> exists even on freestanding compilers. */
19880
19881#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019882# include <limits.h>
19883#else
19884# include <assert.h>
19885#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019886
19887#undef $ac_func
19888
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019889/* Override any GCC internal prototype to avoid an error.
19890 Use char because int might match the return type of a GCC
19891 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019892#ifdef __cplusplus
19893extern "C"
19894#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019895char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019896/* The GNU C library defines this for functions which it implements
19897 to always fail with ENOSYS. Some functions are actually named
19898 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019899#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019900choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019901#endif
19902
Skip Montanaro6dead952003-09-25 14:50:04 +000019903int
19904main ()
19905{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019906return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019907 ;
19908 return 0;
19909}
19910_ACEOF
19911rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019912if { (ac_try="$ac_link"
19913case "(($ac_try" in
19914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19915 *) ac_try_echo=$ac_try;;
19916esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019917eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19918$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019919 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019920 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019921 grep -v '^ *+' conftest.er1 >conftest.err
19922 rm -f conftest.er1
19923 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019924 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019925 (exit $ac_status); } && {
19926 test -z "$ac_c_werror_flag" ||
19927 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019928 } && test -s conftest$ac_exeext && {
19929 test "$cross_compiling" = yes ||
19930 $as_test_x conftest$ac_exeext
19931 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019932 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019933else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019934 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019935sed 's/^/| /' conftest.$ac_ext >&5
19936
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019937 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019938fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019939
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019940rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019941rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019942 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019943fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019944ac_res=`eval 'as_val=${'$as_ac_var'}
19945 $as_echo "$as_val"'`
19946 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19947$as_echo "$ac_res" >&6; }
19948as_val=`eval 'as_val=${'$as_ac_var'}
19949 $as_echo "$as_val"'`
19950 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019951 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019952#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019953_ACEOF
19954 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019955/* confdefs.h. */
19956_ACEOF
19957cat confdefs.h >>conftest.$ac_ext
19958cat >>conftest.$ac_ext <<_ACEOF
19959/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019960#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019961int
19962main ()
19963{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019964getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019965 ;
19966 return 0;
19967}
19968_ACEOF
19969rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019970if { (ac_try="$ac_compile"
19971case "(($ac_try" in
19972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19973 *) ac_try_echo=$ac_try;;
19974esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019975eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19976$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019979 grep -v '^ *+' conftest.er1 >conftest.err
19980 rm -f conftest.er1
19981 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019982 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019983 (exit $ac_status); } && {
19984 test -z "$ac_c_werror_flag" ||
19985 test ! -s conftest.err
19986 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019987
19988cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019989#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019990_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019991
Martin v. Löwis11437992002-04-12 09:54:03 +000019992
Guido van Rossumf78abae1997-01-21 22:02:36 +000019993else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000019994 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019995sed 's/^/| /' conftest.$ac_ext >&5
19996
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019997
Guido van Rossum627b2d71993-12-24 10:39:16 +000019998fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019999
20000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020001
Guido van Rossum627b2d71993-12-24 10:39:16 +000020002fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020003done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020004
Jack Jansen150753c2003-03-29 22:07:47 +000020005
20006for ac_func in setpgrp
20007do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020008as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20009{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20010$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020011if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020012 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020013else
Martin v. Löwis11437992002-04-12 09:54:03 +000020014 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020015/* confdefs.h. */
20016_ACEOF
20017cat confdefs.h >>conftest.$ac_ext
20018cat >>conftest.$ac_ext <<_ACEOF
20019/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020020/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20021 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20022#define $ac_func innocuous_$ac_func
20023
Jack Jansen150753c2003-03-29 22:07:47 +000020024/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020025 which can conflict with char $ac_func (); below.
20026 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020027 <limits.h> exists even on freestanding compilers. */
20028
20029#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020030# include <limits.h>
20031#else
20032# include <assert.h>
20033#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020034
20035#undef $ac_func
20036
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020037/* Override any GCC internal prototype to avoid an error.
20038 Use char because int might match the return type of a GCC
20039 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020040#ifdef __cplusplus
20041extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020042#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020043char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020044/* The GNU C library defines this for functions which it implements
20045 to always fail with ENOSYS. Some functions are actually named
20046 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020047#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020048choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020049#endif
20050
Skip Montanaro6dead952003-09-25 14:50:04 +000020051int
20052main ()
20053{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020054return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020055 ;
20056 return 0;
20057}
20058_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020059rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020060if { (ac_try="$ac_link"
20061case "(($ac_try" in
20062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20063 *) ac_try_echo=$ac_try;;
20064esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020065eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20066$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020067 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020068 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020069 grep -v '^ *+' conftest.er1 >conftest.err
20070 rm -f conftest.er1
20071 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020072 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020073 (exit $ac_status); } && {
20074 test -z "$ac_c_werror_flag" ||
20075 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020076 } && test -s conftest$ac_exeext && {
20077 test "$cross_compiling" = yes ||
20078 $as_test_x conftest$ac_exeext
20079 }; then
Jack Jansen150753c2003-03-29 22:07:47 +000020080 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020081else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020082 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020083sed 's/^/| /' conftest.$ac_ext >&5
20084
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020085 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020086fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020087
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020088rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020089rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020090 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020091fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020092ac_res=`eval 'as_val=${'$as_ac_var'}
20093 $as_echo "$as_val"'`
20094 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20095$as_echo "$ac_res" >&6; }
20096as_val=`eval 'as_val=${'$as_ac_var'}
20097 $as_echo "$as_val"'`
20098 if test "x$as_val" = x""yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020099 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020100#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020101_ACEOF
20102 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020103/* confdefs.h. */
20104_ACEOF
20105cat confdefs.h >>conftest.$ac_ext
20106cat >>conftest.$ac_ext <<_ACEOF
20107/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020108#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020109int
20110main ()
20111{
20112setpgrp(0,0);
20113 ;
20114 return 0;
20115}
20116_ACEOF
20117rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020118if { (ac_try="$ac_compile"
20119case "(($ac_try" in
20120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20121 *) ac_try_echo=$ac_try;;
20122esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020123eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20124$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020125 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020127 grep -v '^ *+' conftest.er1 >conftest.err
20128 rm -f conftest.er1
20129 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020130 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020131 (exit $ac_status); } && {
20132 test -z "$ac_c_werror_flag" ||
20133 test ! -s conftest.err
20134 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020135
20136cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020137#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020138_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020139
Jack Jansen150753c2003-03-29 22:07:47 +000020140
20141else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020142 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020143sed 's/^/| /' conftest.$ac_ext >&5
20144
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020145
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020146fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020147
20148rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020149
20150fi
20151done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020152
Martin v. Löwis11437992002-04-12 09:54:03 +000020153
Thomas Wouters3a584202000-08-05 23:28:51 +000020154for ac_func in gettimeofday
20155do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020156as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20157{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20158$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020159if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020160 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020161else
Martin v. Löwis11437992002-04-12 09:54:03 +000020162 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020163/* confdefs.h. */
20164_ACEOF
20165cat confdefs.h >>conftest.$ac_ext
20166cat >>conftest.$ac_ext <<_ACEOF
20167/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020168/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20169 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20170#define $ac_func innocuous_$ac_func
20171
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020172/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020173 which can conflict with char $ac_func (); below.
20174 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020175 <limits.h> exists even on freestanding compilers. */
20176
20177#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020178# include <limits.h>
20179#else
20180# include <assert.h>
20181#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020182
20183#undef $ac_func
20184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020185/* Override any GCC internal prototype to avoid an error.
20186 Use char because int might match the return type of a GCC
20187 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020188#ifdef __cplusplus
20189extern "C"
20190#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020191char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020192/* The GNU C library defines this for functions which it implements
20193 to always fail with ENOSYS. Some functions are actually named
20194 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020195#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020196choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020197#endif
20198
Skip Montanaro6dead952003-09-25 14:50:04 +000020199int
20200main ()
20201{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020202return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020203 ;
20204 return 0;
20205}
20206_ACEOF
20207rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020208if { (ac_try="$ac_link"
20209case "(($ac_try" in
20210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20211 *) ac_try_echo=$ac_try;;
20212esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020213eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20214$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020215 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020216 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020217 grep -v '^ *+' conftest.er1 >conftest.err
20218 rm -f conftest.er1
20219 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020220 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020221 (exit $ac_status); } && {
20222 test -z "$ac_c_werror_flag" ||
20223 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020224 } && test -s conftest$ac_exeext && {
20225 test "$cross_compiling" = yes ||
20226 $as_test_x conftest$ac_exeext
20227 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020228 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020229else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020230 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020231sed 's/^/| /' conftest.$ac_ext >&5
20232
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020233 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020234fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020235
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020236rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020237rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020238 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020239fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020240ac_res=`eval 'as_val=${'$as_ac_var'}
20241 $as_echo "$as_val"'`
20242 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20243$as_echo "$ac_res" >&6; }
20244as_val=`eval 'as_val=${'$as_ac_var'}
20245 $as_echo "$as_val"'`
20246 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020247 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020248#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020249_ACEOF
20250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020251/* confdefs.h. */
20252_ACEOF
20253cat confdefs.h >>conftest.$ac_ext
20254cat >>conftest.$ac_ext <<_ACEOF
20255/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020256#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020257int
20258main ()
20259{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020260gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020261 ;
20262 return 0;
20263}
20264_ACEOF
20265rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020266if { (ac_try="$ac_compile"
20267case "(($ac_try" in
20268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20269 *) ac_try_echo=$ac_try;;
20270esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020271eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20272$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020275 grep -v '^ *+' conftest.er1 >conftest.err
20276 rm -f conftest.er1
20277 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020278 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020279 (exit $ac_status); } && {
20280 test -z "$ac_c_werror_flag" ||
20281 test ! -s conftest.err
20282 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020283 :
20284else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020285 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020286sed 's/^/| /' conftest.$ac_ext >&5
20287
Martin v. Löwis11437992002-04-12 09:54:03 +000020288
20289cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020290#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020291_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020292
Martin v. Löwis11437992002-04-12 09:54:03 +000020293
Guido van Rossum627b2d71993-12-24 10:39:16 +000020294fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020295
20296rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020297
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020298fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020299done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020300
Michael W. Hudson54241132001-12-07 15:38:26 +000020301
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020302{ $as_echo "$as_me:$LINENO: checking for major" >&5
20303$as_echo_n "checking for major... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020304cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020305/* confdefs.h. */
20306_ACEOF
20307cat confdefs.h >>conftest.$ac_ext
20308cat >>conftest.$ac_ext <<_ACEOF
20309/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020310
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020311#if defined(MAJOR_IN_MKDEV)
20312#include <sys/mkdev.h>
20313#elif defined(MAJOR_IN_SYSMACROS)
20314#include <sys/sysmacros.h>
20315#else
20316#include <sys/types.h>
20317#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020318
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020319int
20320main ()
20321{
20322
20323 makedev(major(0),minor(0));
20324
20325 ;
20326 return 0;
20327}
20328_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020329rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020330if { (ac_try="$ac_link"
20331case "(($ac_try" in
20332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20333 *) ac_try_echo=$ac_try;;
20334esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020335eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20336$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020339 grep -v '^ *+' conftest.er1 >conftest.err
20340 rm -f conftest.er1
20341 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020342 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020343 (exit $ac_status); } && {
20344 test -z "$ac_c_werror_flag" ||
20345 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020346 } && test -s conftest$ac_exeext && {
20347 test "$cross_compiling" = yes ||
20348 $as_test_x conftest$ac_exeext
20349 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020350
20351
20352cat >>confdefs.h <<\_ACEOF
20353#define HAVE_DEVICE_MACROS 1
20354_ACEOF
20355
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020356 { $as_echo "$as_me:$LINENO: result: yes" >&5
20357$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020358
20359else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020360 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020361sed 's/^/| /' conftest.$ac_ext >&5
20362
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020363
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020364 { $as_echo "$as_me:$LINENO: result: no" >&5
20365$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020366
20367fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020368
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020369rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020370rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020371 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020372
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020373# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020374# for [no]getaddrinfo in netdb.h.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020375{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20376$as_echo_n "checking for getaddrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020377cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020378/* confdefs.h. */
20379_ACEOF
20380cat confdefs.h >>conftest.$ac_ext
20381cat >>conftest.$ac_ext <<_ACEOF
20382/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020383
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020384#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020385#include <sys/socket.h>
20386#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020387#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020388
Martin v. Löwis11437992002-04-12 09:54:03 +000020389int
20390main ()
20391{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020392getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020393 ;
20394 return 0;
20395}
20396_ACEOF
20397rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020398if { (ac_try="$ac_link"
20399case "(($ac_try" in
20400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20401 *) ac_try_echo=$ac_try;;
20402esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020403eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20404$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020405 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020406 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020407 grep -v '^ *+' conftest.er1 >conftest.err
20408 rm -f conftest.er1
20409 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020410 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020411 (exit $ac_status); } && {
20412 test -z "$ac_c_werror_flag" ||
20413 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020414 } && test -s conftest$ac_exeext && {
20415 test "$cross_compiling" = yes ||
20416 $as_test_x conftest$ac_exeext
20417 }; then
20418 have_getaddrinfo=yes
20419else
20420 $as_echo "$as_me: failed program was:" >&5
20421sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020422
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020423 have_getaddrinfo=no
20424fi
20425
20426rm -rf conftest.dSYM
20427rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20428 conftest$ac_exeext conftest.$ac_ext
20429{ $as_echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20430$as_echo "$have_getaddrinfo" >&6; }
20431if test $have_getaddrinfo = yes
20432then
20433 { $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20434$as_echo_n "checking getaddrinfo bug... " >&6; }
20435 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
20436 $as_echo_n "(cached) " >&6
20437else
20438 if test "$cross_compiling" = yes; then
20439 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020440else
Martin v. Löwis11437992002-04-12 09:54:03 +000020441 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020442/* confdefs.h. */
20443_ACEOF
20444cat confdefs.h >>conftest.$ac_ext
20445cat >>conftest.$ac_ext <<_ACEOF
20446/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020447
20448#include <sys/types.h>
20449#include <netdb.h>
20450#include <string.h>
20451#include <sys/socket.h>
20452#include <netinet/in.h>
20453
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020454int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020455{
20456 int passive, gaierr, inet4 = 0, inet6 = 0;
20457 struct addrinfo hints, *ai, *aitop;
20458 char straddr[INET6_ADDRSTRLEN], strport[16];
20459
20460 for (passive = 0; passive <= 1; passive++) {
20461 memset(&hints, 0, sizeof(hints));
20462 hints.ai_family = AF_UNSPEC;
20463 hints.ai_flags = passive ? AI_PASSIVE : 0;
20464 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020465 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020466 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20467 (void)gai_strerror(gaierr);
20468 goto bad;
20469 }
20470 for (ai = aitop; ai; ai = ai->ai_next) {
20471 if (ai->ai_addr == NULL ||
20472 ai->ai_addrlen == 0 ||
20473 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20474 straddr, sizeof(straddr), strport, sizeof(strport),
20475 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20476 goto bad;
20477 }
20478 switch (ai->ai_family) {
20479 case AF_INET:
20480 if (strcmp(strport, "54321") != 0) {
20481 goto bad;
20482 }
20483 if (passive) {
20484 if (strcmp(straddr, "0.0.0.0") != 0) {
20485 goto bad;
20486 }
20487 } else {
20488 if (strcmp(straddr, "127.0.0.1") != 0) {
20489 goto bad;
20490 }
20491 }
20492 inet4++;
20493 break;
20494 case AF_INET6:
20495 if (strcmp(strport, "54321") != 0) {
20496 goto bad;
20497 }
20498 if (passive) {
20499 if (strcmp(straddr, "::") != 0) {
20500 goto bad;
20501 }
20502 } else {
20503 if (strcmp(straddr, "::1") != 0) {
20504 goto bad;
20505 }
20506 }
20507 inet6++;
20508 break;
20509 case AF_UNSPEC:
20510 goto bad;
20511 break;
20512 default:
20513 /* another family support? */
20514 break;
20515 }
20516 }
20517 }
20518
20519 if (!(inet4 == 0 || inet4 == 2))
20520 goto bad;
20521 if (!(inet6 == 0 || inet6 == 2))
20522 goto bad;
20523
20524 if (aitop)
20525 freeaddrinfo(aitop);
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020526 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020527
20528 bad:
20529 if (aitop)
20530 freeaddrinfo(aitop);
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020531 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020532}
20533
Martin v. Löwis11437992002-04-12 09:54:03 +000020534_ACEOF
20535rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020536if { (ac_try="$ac_link"
20537case "(($ac_try" in
20538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20539 *) ac_try_echo=$ac_try;;
20540esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020541eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20542$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020543 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020544 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020545 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020546 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020547 { (case "(($ac_try" in
20548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20549 *) ac_try_echo=$ac_try;;
20550esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020551eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20552$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020553 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020554 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020555 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020556 (exit $ac_status); }; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020557 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020558else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020559 $as_echo "$as_me: program exited with status $ac_status" >&5
20560$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020561sed 's/^/| /' conftest.$ac_ext >&5
20562
Martin v. Löwis11437992002-04-12 09:54:03 +000020563( exit $ac_status )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020564ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020565fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020566rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020567rm -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 +000020568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020569
20570
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020571fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020572
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020574
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020575if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20576then
20577 if test $ipv6 = yes
20578 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020579 echo 'Fatal: You must get working getaddrinfo() function.'
20580 echo ' or you can specify "--disable-ipv6"'.
20581 exit 1
20582 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020583else
Martin v. Löwis11437992002-04-12 09:54:03 +000020584
20585cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020586#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020587_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020588
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020589fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020590
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020591for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020592do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020593as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20594{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20595$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020596if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020597 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020598else
Martin v. Löwis11437992002-04-12 09:54:03 +000020599 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020600/* confdefs.h. */
20601_ACEOF
20602cat confdefs.h >>conftest.$ac_ext
20603cat >>conftest.$ac_ext <<_ACEOF
20604/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020605/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20606 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20607#define $ac_func innocuous_$ac_func
20608
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020609/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020610 which can conflict with char $ac_func (); below.
20611 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020612 <limits.h> exists even on freestanding compilers. */
20613
20614#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020615# include <limits.h>
20616#else
20617# include <assert.h>
20618#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020619
20620#undef $ac_func
20621
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020622/* Override any GCC internal prototype to avoid an error.
20623 Use char because int might match the return type of a GCC
20624 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020625#ifdef __cplusplus
20626extern "C"
20627#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020628char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020629/* The GNU C library defines this for functions which it implements
20630 to always fail with ENOSYS. Some functions are actually named
20631 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020632#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020633choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020634#endif
20635
Skip Montanaro6dead952003-09-25 14:50:04 +000020636int
20637main ()
20638{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020639return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020640 ;
20641 return 0;
20642}
20643_ACEOF
20644rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020645if { (ac_try="$ac_link"
20646case "(($ac_try" in
20647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20648 *) ac_try_echo=$ac_try;;
20649esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020650eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20651$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020652 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020653 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020654 grep -v '^ *+' conftest.er1 >conftest.err
20655 rm -f conftest.er1
20656 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020657 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020658 (exit $ac_status); } && {
20659 test -z "$ac_c_werror_flag" ||
20660 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020661 } && test -s conftest$ac_exeext && {
20662 test "$cross_compiling" = yes ||
20663 $as_test_x conftest$ac_exeext
20664 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020665 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020666else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020667 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020668sed 's/^/| /' conftest.$ac_ext >&5
20669
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020670 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020671fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020672
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020673rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020674rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020675 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020676fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020677ac_res=`eval 'as_val=${'$as_ac_var'}
20678 $as_echo "$as_val"'`
20679 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20680$as_echo "$ac_res" >&6; }
20681as_val=`eval 'as_val=${'$as_ac_var'}
20682 $as_echo "$as_val"'`
20683 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020684 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020685#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020686_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020687
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020688fi
20689done
20690
Michael W. Hudson54241132001-12-07 15:38:26 +000020691
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020692# checks for structures
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020693{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20694$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 +000020695if test "${ac_cv_header_time+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020696 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020697else
Martin v. Löwis11437992002-04-12 09:54:03 +000020698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020699/* confdefs.h. */
20700_ACEOF
20701cat confdefs.h >>conftest.$ac_ext
20702cat >>conftest.$ac_ext <<_ACEOF
20703/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020704#include <sys/types.h>
20705#include <sys/time.h>
20706#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020707
Martin v. Löwis11437992002-04-12 09:54:03 +000020708int
20709main ()
20710{
20711if ((struct tm *) 0)
20712return 0;
20713 ;
20714 return 0;
20715}
20716_ACEOF
20717rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020718if { (ac_try="$ac_compile"
20719case "(($ac_try" in
20720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20721 *) ac_try_echo=$ac_try;;
20722esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020723eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20724$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020727 grep -v '^ *+' conftest.er1 >conftest.err
20728 rm -f conftest.er1
20729 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020730 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020731 (exit $ac_status); } && {
20732 test -z "$ac_c_werror_flag" ||
20733 test ! -s conftest.err
20734 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020735 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020736else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020737 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020738sed 's/^/| /' conftest.$ac_ext >&5
20739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020740 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020741fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020742
20743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020744fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020745{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20746$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020747if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020748
20749cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020750#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020751_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020752
20753fi
20754
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020755{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20756$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 +000020757if test "${ac_cv_struct_tm+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020758 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020759else
Martin v. Löwis11437992002-04-12 09:54:03 +000020760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020761/* confdefs.h. */
20762_ACEOF
20763cat confdefs.h >>conftest.$ac_ext
20764cat >>conftest.$ac_ext <<_ACEOF
20765/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020766#include <sys/types.h>
20767#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020768
Martin v. Löwis11437992002-04-12 09:54:03 +000020769int
20770main ()
20771{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020772struct tm tm;
20773 int *p = &tm.tm_sec;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020774 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020775 ;
20776 return 0;
20777}
20778_ACEOF
20779rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020780if { (ac_try="$ac_compile"
20781case "(($ac_try" in
20782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20783 *) ac_try_echo=$ac_try;;
20784esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020785eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20786$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020787 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020788 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020789 grep -v '^ *+' conftest.er1 >conftest.err
20790 rm -f conftest.er1
20791 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020792 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020793 (exit $ac_status); } && {
20794 test -z "$ac_c_werror_flag" ||
20795 test ! -s conftest.err
20796 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020797 ac_cv_struct_tm=time.h
20798else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020799 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020800sed 's/^/| /' conftest.$ac_ext >&5
20801
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020802 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020803fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020804
20805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020806fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020807{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20808$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020809if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020810
20811cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020812#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020813_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020814
20815fi
20816
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020817{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20818$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020819if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020820 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020821else
Martin v. Löwis11437992002-04-12 09:54:03 +000020822 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020823/* confdefs.h. */
20824_ACEOF
20825cat confdefs.h >>conftest.$ac_ext
20826cat >>conftest.$ac_ext <<_ACEOF
20827/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020828#include <sys/types.h>
20829#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020830
20831
Martin v. Löwis11437992002-04-12 09:54:03 +000020832int
20833main ()
20834{
20835static struct tm ac_aggr;
20836if (ac_aggr.tm_zone)
20837return 0;
20838 ;
20839 return 0;
20840}
20841_ACEOF
20842rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020843if { (ac_try="$ac_compile"
20844case "(($ac_try" in
20845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20846 *) ac_try_echo=$ac_try;;
20847esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020848eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20849$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020850 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020852 grep -v '^ *+' conftest.er1 >conftest.err
20853 rm -f conftest.er1
20854 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020855 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020856 (exit $ac_status); } && {
20857 test -z "$ac_c_werror_flag" ||
20858 test ! -s conftest.err
20859 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020860 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020861else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020862 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020863sed 's/^/| /' conftest.$ac_ext >&5
20864
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020865 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020866/* confdefs.h. */
20867_ACEOF
20868cat confdefs.h >>conftest.$ac_ext
20869cat >>conftest.$ac_ext <<_ACEOF
20870/* end confdefs.h. */
20871#include <sys/types.h>
20872#include <$ac_cv_struct_tm>
20873
20874
20875int
20876main ()
20877{
20878static struct tm ac_aggr;
20879if (sizeof ac_aggr.tm_zone)
20880return 0;
20881 ;
20882 return 0;
20883}
20884_ACEOF
20885rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020886if { (ac_try="$ac_compile"
20887case "(($ac_try" in
20888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20889 *) ac_try_echo=$ac_try;;
20890esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020891eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20892$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020893 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020895 grep -v '^ *+' conftest.er1 >conftest.err
20896 rm -f conftest.er1
20897 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020898 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020899 (exit $ac_status); } && {
20900 test -z "$ac_c_werror_flag" ||
20901 test ! -s conftest.err
20902 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020903 ac_cv_member_struct_tm_tm_zone=yes
20904else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020905 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020906sed 's/^/| /' conftest.$ac_ext >&5
20907
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020908 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020909fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020910
20911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020913
20914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020915fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020916{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20917$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
20918if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020919
20920cat >>confdefs.h <<_ACEOF
20921#define HAVE_STRUCT_TM_TM_ZONE 1
20922_ACEOF
20923
20924
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020925fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020926
Martin v. Löwis11437992002-04-12 09:54:03 +000020927if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20928
20929cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020930#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020931_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020932
20933else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020934 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20935$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020936if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020937 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020938else
20939 cat >conftest.$ac_ext <<_ACEOF
20940/* confdefs.h. */
20941_ACEOF
20942cat confdefs.h >>conftest.$ac_ext
20943cat >>conftest.$ac_ext <<_ACEOF
20944/* end confdefs.h. */
20945#include <time.h>
20946
20947int
20948main ()
20949{
20950#ifndef tzname
20951 (void) tzname;
20952#endif
20953
20954 ;
20955 return 0;
20956}
20957_ACEOF
20958rm -f conftest.$ac_objext
20959if { (ac_try="$ac_compile"
20960case "(($ac_try" in
20961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20962 *) ac_try_echo=$ac_try;;
20963esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020964eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20965$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020966 (eval "$ac_compile") 2>conftest.er1
20967 ac_status=$?
20968 grep -v '^ *+' conftest.er1 >conftest.err
20969 rm -f conftest.er1
20970 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020971 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020972 (exit $ac_status); } && {
20973 test -z "$ac_c_werror_flag" ||
20974 test ! -s conftest.err
20975 } && test -s conftest.$ac_objext; then
20976 ac_cv_have_decl_tzname=yes
20977else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020978 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020979sed 's/^/| /' conftest.$ac_ext >&5
20980
20981 ac_cv_have_decl_tzname=no
20982fi
20983
20984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20985fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000020986{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20987$as_echo "$ac_cv_have_decl_tzname" >&6; }
20988if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020989
20990cat >>confdefs.h <<_ACEOF
20991#define HAVE_DECL_TZNAME 1
20992_ACEOF
20993
20994
20995else
20996 cat >>confdefs.h <<_ACEOF
20997#define HAVE_DECL_TZNAME 0
20998_ACEOF
20999
21000
21001fi
21002
21003
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021004 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
21005$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021006if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021007 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021008else
Martin v. Löwis11437992002-04-12 09:54:03 +000021009 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021010/* confdefs.h. */
21011_ACEOF
21012cat confdefs.h >>conftest.$ac_ext
21013cat >>conftest.$ac_ext <<_ACEOF
21014/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021015#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021016#if !HAVE_DECL_TZNAME
21017extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021018#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021019
Martin v. Löwis11437992002-04-12 09:54:03 +000021020int
21021main ()
21022{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021023return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021024 ;
21025 return 0;
21026}
21027_ACEOF
21028rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021029if { (ac_try="$ac_link"
21030case "(($ac_try" in
21031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21032 *) ac_try_echo=$ac_try;;
21033esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021034eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21035$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021036 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021038 grep -v '^ *+' conftest.er1 >conftest.err
21039 rm -f conftest.er1
21040 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021041 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021042 (exit $ac_status); } && {
21043 test -z "$ac_c_werror_flag" ||
21044 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021045 } && test -s conftest$ac_exeext && {
21046 test "$cross_compiling" = yes ||
21047 $as_test_x conftest$ac_exeext
21048 }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021049 ac_cv_var_tzname=yes
21050else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021051 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021052sed 's/^/| /' conftest.$ac_ext >&5
21053
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021054 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021055fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021056
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021057rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021058rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021059 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021060fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021061{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21062$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021063 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021064
21065cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021066#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021067_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021068
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021069 fi
21070fi
21071
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021072{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21073$as_echo_n "checking for struct stat.st_rdev... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021074if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021075 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021076else
21077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021078/* confdefs.h. */
21079_ACEOF
21080cat confdefs.h >>conftest.$ac_ext
21081cat >>conftest.$ac_ext <<_ACEOF
21082/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021083$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021084int
21085main ()
21086{
21087static struct stat ac_aggr;
21088if (ac_aggr.st_rdev)
21089return 0;
21090 ;
21091 return 0;
21092}
21093_ACEOF
21094rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021095if { (ac_try="$ac_compile"
21096case "(($ac_try" in
21097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21098 *) ac_try_echo=$ac_try;;
21099esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021100eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21101$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021102 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021103 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021104 grep -v '^ *+' conftest.er1 >conftest.err
21105 rm -f conftest.er1
21106 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021107 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021108 (exit $ac_status); } && {
21109 test -z "$ac_c_werror_flag" ||
21110 test ! -s conftest.err
21111 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021112 ac_cv_member_struct_stat_st_rdev=yes
21113else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021114 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021115sed 's/^/| /' conftest.$ac_ext >&5
21116
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021118/* confdefs.h. */
21119_ACEOF
21120cat confdefs.h >>conftest.$ac_ext
21121cat >>conftest.$ac_ext <<_ACEOF
21122/* end confdefs.h. */
21123$ac_includes_default
21124int
21125main ()
21126{
21127static struct stat ac_aggr;
21128if (sizeof ac_aggr.st_rdev)
21129return 0;
21130 ;
21131 return 0;
21132}
21133_ACEOF
21134rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021135if { (ac_try="$ac_compile"
21136case "(($ac_try" in
21137 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21138 *) ac_try_echo=$ac_try;;
21139esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021140eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21141$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021142 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021143 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021144 grep -v '^ *+' conftest.er1 >conftest.err
21145 rm -f conftest.er1
21146 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021147 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021148 (exit $ac_status); } && {
21149 test -z "$ac_c_werror_flag" ||
21150 test ! -s conftest.err
21151 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021152 ac_cv_member_struct_stat_st_rdev=yes
21153else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021154 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021155sed 's/^/| /' conftest.$ac_ext >&5
21156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021157 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021158fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021159
21160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021162
21163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021164fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021165{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21166$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; }
21167if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021168
21169cat >>confdefs.h <<_ACEOF
21170#define HAVE_STRUCT_STAT_ST_RDEV 1
21171_ACEOF
21172
21173
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021174fi
21175
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021176{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21177$as_echo_n "checking for struct stat.st_blksize... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021178if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021179 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021180else
Martin v. Löwis11437992002-04-12 09:54:03 +000021181 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021182/* confdefs.h. */
21183_ACEOF
21184cat confdefs.h >>conftest.$ac_ext
21185cat >>conftest.$ac_ext <<_ACEOF
21186/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021187$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021188int
21189main ()
21190{
21191static struct stat ac_aggr;
21192if (ac_aggr.st_blksize)
21193return 0;
21194 ;
21195 return 0;
21196}
21197_ACEOF
21198rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021199if { (ac_try="$ac_compile"
21200case "(($ac_try" in
21201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21202 *) ac_try_echo=$ac_try;;
21203esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021204eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21205$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021206 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021207 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021208 grep -v '^ *+' conftest.er1 >conftest.err
21209 rm -f conftest.er1
21210 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021211 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021212 (exit $ac_status); } && {
21213 test -z "$ac_c_werror_flag" ||
21214 test ! -s conftest.err
21215 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021216 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021217else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021218 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021219sed 's/^/| /' conftest.$ac_ext >&5
21220
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021221 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021222/* confdefs.h. */
21223_ACEOF
21224cat confdefs.h >>conftest.$ac_ext
21225cat >>conftest.$ac_ext <<_ACEOF
21226/* end confdefs.h. */
21227$ac_includes_default
21228int
21229main ()
21230{
21231static struct stat ac_aggr;
21232if (sizeof ac_aggr.st_blksize)
21233return 0;
21234 ;
21235 return 0;
21236}
21237_ACEOF
21238rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021239if { (ac_try="$ac_compile"
21240case "(($ac_try" in
21241 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21242 *) ac_try_echo=$ac_try;;
21243esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021244eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21245$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021246 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021247 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021248 grep -v '^ *+' conftest.er1 >conftest.err
21249 rm -f conftest.er1
21250 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021251 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021252 (exit $ac_status); } && {
21253 test -z "$ac_c_werror_flag" ||
21254 test ! -s conftest.err
21255 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021256 ac_cv_member_struct_stat_st_blksize=yes
21257else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021258 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021259sed 's/^/| /' conftest.$ac_ext >&5
21260
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021261 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021262fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021263
21264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021265fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021266
21267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021268fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021269{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21270$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; }
21271if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021272
Martin v. Löwis11437992002-04-12 09:54:03 +000021273cat >>confdefs.h <<_ACEOF
21274#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21275_ACEOF
21276
21277
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021278fi
21279
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021280{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21281$as_echo_n "checking for struct stat.st_flags... " >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021282if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021283 $as_echo_n "(cached) " >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021284else
21285 cat >conftest.$ac_ext <<_ACEOF
21286/* confdefs.h. */
21287_ACEOF
21288cat confdefs.h >>conftest.$ac_ext
21289cat >>conftest.$ac_ext <<_ACEOF
21290/* end confdefs.h. */
21291$ac_includes_default
21292int
21293main ()
21294{
21295static struct stat ac_aggr;
21296if (ac_aggr.st_flags)
21297return 0;
21298 ;
21299 return 0;
21300}
21301_ACEOF
21302rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021303if { (ac_try="$ac_compile"
21304case "(($ac_try" in
21305 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21306 *) ac_try_echo=$ac_try;;
21307esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021308eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21309$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021310 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021311 ac_status=$?
21312 grep -v '^ *+' conftest.er1 >conftest.err
21313 rm -f conftest.er1
21314 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021315 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021316 (exit $ac_status); } && {
21317 test -z "$ac_c_werror_flag" ||
21318 test ! -s conftest.err
21319 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021320 ac_cv_member_struct_stat_st_flags=yes
21321else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021322 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021323sed 's/^/| /' conftest.$ac_ext >&5
21324
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021325 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021326/* confdefs.h. */
21327_ACEOF
21328cat confdefs.h >>conftest.$ac_ext
21329cat >>conftest.$ac_ext <<_ACEOF
21330/* end confdefs.h. */
21331$ac_includes_default
21332int
21333main ()
21334{
21335static struct stat ac_aggr;
21336if (sizeof ac_aggr.st_flags)
21337return 0;
21338 ;
21339 return 0;
21340}
21341_ACEOF
21342rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021343if { (ac_try="$ac_compile"
21344case "(($ac_try" in
21345 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21346 *) ac_try_echo=$ac_try;;
21347esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021348eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21349$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021350 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021351 ac_status=$?
21352 grep -v '^ *+' conftest.er1 >conftest.err
21353 rm -f conftest.er1
21354 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021355 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021356 (exit $ac_status); } && {
21357 test -z "$ac_c_werror_flag" ||
21358 test ! -s conftest.err
21359 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021360 ac_cv_member_struct_stat_st_flags=yes
21361else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021362 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021363sed 's/^/| /' conftest.$ac_ext >&5
21364
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021365 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021366fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021367
21368rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021370
21371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021372fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021373{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21374$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; }
21375if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021376
21377cat >>confdefs.h <<_ACEOF
21378#define HAVE_STRUCT_STAT_ST_FLAGS 1
21379_ACEOF
21380
21381
21382fi
21383
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021384{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21385$as_echo_n "checking for struct stat.st_gen... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021386if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021387 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021388else
21389 cat >conftest.$ac_ext <<_ACEOF
21390/* confdefs.h. */
21391_ACEOF
21392cat confdefs.h >>conftest.$ac_ext
21393cat >>conftest.$ac_ext <<_ACEOF
21394/* end confdefs.h. */
21395$ac_includes_default
21396int
21397main ()
21398{
21399static struct stat ac_aggr;
21400if (ac_aggr.st_gen)
21401return 0;
21402 ;
21403 return 0;
21404}
21405_ACEOF
21406rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021407if { (ac_try="$ac_compile"
21408case "(($ac_try" in
21409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21410 *) ac_try_echo=$ac_try;;
21411esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021412eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21413$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021415 ac_status=$?
21416 grep -v '^ *+' conftest.er1 >conftest.err
21417 rm -f conftest.er1
21418 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021419 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021420 (exit $ac_status); } && {
21421 test -z "$ac_c_werror_flag" ||
21422 test ! -s conftest.err
21423 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021424 ac_cv_member_struct_stat_st_gen=yes
21425else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021426 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021427sed 's/^/| /' conftest.$ac_ext >&5
21428
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021429 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021430/* confdefs.h. */
21431_ACEOF
21432cat confdefs.h >>conftest.$ac_ext
21433cat >>conftest.$ac_ext <<_ACEOF
21434/* end confdefs.h. */
21435$ac_includes_default
21436int
21437main ()
21438{
21439static struct stat ac_aggr;
21440if (sizeof ac_aggr.st_gen)
21441return 0;
21442 ;
21443 return 0;
21444}
21445_ACEOF
21446rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021447if { (ac_try="$ac_compile"
21448case "(($ac_try" in
21449 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21450 *) ac_try_echo=$ac_try;;
21451esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021452eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21453$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021454 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021455 ac_status=$?
21456 grep -v '^ *+' conftest.er1 >conftest.err
21457 rm -f conftest.er1
21458 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021459 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021460 (exit $ac_status); } && {
21461 test -z "$ac_c_werror_flag" ||
21462 test ! -s conftest.err
21463 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021464 ac_cv_member_struct_stat_st_gen=yes
21465else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021466 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021467sed 's/^/| /' conftest.$ac_ext >&5
21468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021469 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021471
21472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021473fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021474
21475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021476fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021477{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21478$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; }
21479if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021480
21481cat >>confdefs.h <<_ACEOF
21482#define HAVE_STRUCT_STAT_ST_GEN 1
21483_ACEOF
21484
21485
21486fi
21487
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021488{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21489$as_echo_n "checking for struct stat.st_birthtime... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021490if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021491 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021492else
21493 cat >conftest.$ac_ext <<_ACEOF
21494/* confdefs.h. */
21495_ACEOF
21496cat confdefs.h >>conftest.$ac_ext
21497cat >>conftest.$ac_ext <<_ACEOF
21498/* end confdefs.h. */
21499$ac_includes_default
21500int
21501main ()
21502{
21503static struct stat ac_aggr;
21504if (ac_aggr.st_birthtime)
21505return 0;
21506 ;
21507 return 0;
21508}
21509_ACEOF
21510rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021511if { (ac_try="$ac_compile"
21512case "(($ac_try" in
21513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21514 *) ac_try_echo=$ac_try;;
21515esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021516eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21517$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021518 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021519 ac_status=$?
21520 grep -v '^ *+' conftest.er1 >conftest.err
21521 rm -f conftest.er1
21522 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021523 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021524 (exit $ac_status); } && {
21525 test -z "$ac_c_werror_flag" ||
21526 test ! -s conftest.err
21527 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021528 ac_cv_member_struct_stat_st_birthtime=yes
21529else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021530 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021531sed 's/^/| /' conftest.$ac_ext >&5
21532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021533 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021534/* confdefs.h. */
21535_ACEOF
21536cat confdefs.h >>conftest.$ac_ext
21537cat >>conftest.$ac_ext <<_ACEOF
21538/* end confdefs.h. */
21539$ac_includes_default
21540int
21541main ()
21542{
21543static struct stat ac_aggr;
21544if (sizeof ac_aggr.st_birthtime)
21545return 0;
21546 ;
21547 return 0;
21548}
21549_ACEOF
21550rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021551if { (ac_try="$ac_compile"
21552case "(($ac_try" in
21553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21554 *) ac_try_echo=$ac_try;;
21555esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021556eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21557$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021559 ac_status=$?
21560 grep -v '^ *+' conftest.er1 >conftest.err
21561 rm -f conftest.er1
21562 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021563 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021564 (exit $ac_status); } && {
21565 test -z "$ac_c_werror_flag" ||
21566 test ! -s conftest.err
21567 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021568 ac_cv_member_struct_stat_st_birthtime=yes
21569else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021570 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021571sed 's/^/| /' conftest.$ac_ext >&5
21572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021573 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021575
21576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021578
21579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021580fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021581{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21582$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; }
21583if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021584
21585cat >>confdefs.h <<_ACEOF
21586#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21587_ACEOF
21588
21589
21590fi
21591
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021592{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21593$as_echo_n "checking for struct stat.st_blocks... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021594if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021595 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021596else
Martin v. Löwis11437992002-04-12 09:54:03 +000021597 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021598/* confdefs.h. */
21599_ACEOF
21600cat confdefs.h >>conftest.$ac_ext
21601cat >>conftest.$ac_ext <<_ACEOF
21602/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021603$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021604int
21605main ()
21606{
21607static struct stat ac_aggr;
21608if (ac_aggr.st_blocks)
21609return 0;
21610 ;
21611 return 0;
21612}
21613_ACEOF
21614rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021615if { (ac_try="$ac_compile"
21616case "(($ac_try" in
21617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21618 *) ac_try_echo=$ac_try;;
21619esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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_compile") 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
Alexandre Vassalotti302825b2009-07-17 07:49:53 +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
21631 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021632 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021633else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021634 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021635sed 's/^/| /' conftest.$ac_ext >&5
21636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021637 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021638/* confdefs.h. */
21639_ACEOF
21640cat confdefs.h >>conftest.$ac_ext
21641cat >>conftest.$ac_ext <<_ACEOF
21642/* end confdefs.h. */
21643$ac_includes_default
21644int
21645main ()
21646{
21647static struct stat ac_aggr;
21648if (sizeof ac_aggr.st_blocks)
21649return 0;
21650 ;
21651 return 0;
21652}
21653_ACEOF
21654rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021655if { (ac_try="$ac_compile"
21656case "(($ac_try" in
21657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21658 *) ac_try_echo=$ac_try;;
21659esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021660eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21661$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021662 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021663 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021664 grep -v '^ *+' conftest.er1 >conftest.err
21665 rm -f conftest.er1
21666 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021667 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021668 (exit $ac_status); } && {
21669 test -z "$ac_c_werror_flag" ||
21670 test ! -s conftest.err
21671 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021672 ac_cv_member_struct_stat_st_blocks=yes
21673else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021674 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021675sed 's/^/| /' conftest.$ac_ext >&5
21676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021677 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021679
21680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021682
21683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021684fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021685{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21686$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; }
21687if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021688
Martin v. Löwis11437992002-04-12 09:54:03 +000021689cat >>confdefs.h <<_ACEOF
21690#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21691_ACEOF
21692
21693
21694cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021695#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021696_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021697
21698else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021699 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021700 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021701 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21702 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021703esac
21704
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021705fi
21706
Michael W. Hudson54241132001-12-07 15:38:26 +000021707
Martin v. Löwis11437992002-04-12 09:54:03 +000021708
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021709{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21710$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021711if test "${ac_cv_header_time_altzone+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021712 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021713else
Martin v. Löwis11437992002-04-12 09:54:03 +000021714 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021715/* confdefs.h. */
21716_ACEOF
21717cat confdefs.h >>conftest.$ac_ext
21718cat >>conftest.$ac_ext <<_ACEOF
21719/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021720#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021721int
21722main ()
21723{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021724return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021725 ;
21726 return 0;
21727}
21728_ACEOF
21729rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021730if { (ac_try="$ac_compile"
21731case "(($ac_try" in
21732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21733 *) ac_try_echo=$ac_try;;
21734esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021735eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21736$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021737 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021738 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021739 grep -v '^ *+' conftest.er1 >conftest.err
21740 rm -f conftest.er1
21741 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021742 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021743 (exit $ac_status); } && {
21744 test -z "$ac_c_werror_flag" ||
21745 test ! -s conftest.err
21746 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021747 ac_cv_header_time_altzone=yes
21748else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021749 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021750sed 's/^/| /' conftest.$ac_ext >&5
21751
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021752 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021753fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021754
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21756fi
21757
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021758{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21759$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021760if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021761
21762cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021763#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021764_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021765
21766fi
21767
Guido van Rossumda88dad1995-01-26 00:46:29 +000021768was_it_defined=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021769{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21770$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 +000021771cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021772/* confdefs.h. */
21773_ACEOF
21774cat confdefs.h >>conftest.$ac_ext
21775cat >>conftest.$ac_ext <<_ACEOF
21776/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021777
21778#include <sys/types.h>
21779#include <sys/select.h>
21780#include <sys/time.h>
21781
Martin v. Löwis11437992002-04-12 09:54:03 +000021782int
21783main ()
21784{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021785;
Martin v. Löwis11437992002-04-12 09:54:03 +000021786 ;
21787 return 0;
21788}
21789_ACEOF
21790rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021791if { (ac_try="$ac_compile"
21792case "(($ac_try" in
21793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21794 *) ac_try_echo=$ac_try;;
21795esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021796eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21797$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021798 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021799 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021800 grep -v '^ *+' conftest.er1 >conftest.err
21801 rm -f conftest.er1
21802 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021803 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021804 (exit $ac_status); } && {
21805 test -z "$ac_c_werror_flag" ||
21806 test ! -s conftest.err
21807 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021808
21809
21810cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021811#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021812_ACEOF
21813
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021814 was_it_defined=yes
21815
Guido van Rossumf78abae1997-01-21 22:02:36 +000021816else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021817 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021818sed 's/^/| /' conftest.$ac_ext >&5
21819
Thomas Wouters477c8d52006-05-27 19:21:47 +000021820
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021821fi
21822
21823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021824{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
21825$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021826
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021827{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5
21828$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021829if test "${ac_cv_struct_addrinfo+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021830 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021831else
Martin v. Löwis11437992002-04-12 09:54:03 +000021832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021833/* confdefs.h. */
21834_ACEOF
21835cat confdefs.h >>conftest.$ac_ext
21836cat >>conftest.$ac_ext <<_ACEOF
21837/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021838
21839# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021840int
21841main ()
21842{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021843struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021844 ;
21845 return 0;
21846}
21847_ACEOF
21848rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021849if { (ac_try="$ac_compile"
21850case "(($ac_try" in
21851 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21852 *) ac_try_echo=$ac_try;;
21853esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021854eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21855$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021856 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021857 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021858 grep -v '^ *+' conftest.er1 >conftest.err
21859 rm -f conftest.er1
21860 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021861 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021862 (exit $ac_status); } && {
21863 test -z "$ac_c_werror_flag" ||
21864 test ! -s conftest.err
21865 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021866 ac_cv_struct_addrinfo=yes
21867else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021868 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021869sed 's/^/| /' conftest.$ac_ext >&5
21870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021871 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021872fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021873
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21875fi
21876
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021877{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21878$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021879if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021880
21881cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021882#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021883_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021884
21885fi
21886
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021887{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21888$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021889if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021890 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021891else
Martin v. Löwis11437992002-04-12 09:54:03 +000021892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021893/* confdefs.h. */
21894_ACEOF
21895cat confdefs.h >>conftest.$ac_ext
21896cat >>conftest.$ac_ext <<_ACEOF
21897/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021898
21899# include <sys/types.h>
21900# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021901int
21902main ()
21903{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021904struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021905 ;
21906 return 0;
21907}
21908_ACEOF
21909rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021910if { (ac_try="$ac_compile"
21911case "(($ac_try" in
21912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21913 *) ac_try_echo=$ac_try;;
21914esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021915eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21916$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021919 grep -v '^ *+' conftest.er1 >conftest.err
21920 rm -f conftest.er1
21921 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021922 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021923 (exit $ac_status); } && {
21924 test -z "$ac_c_werror_flag" ||
21925 test ! -s conftest.err
21926 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021927 ac_cv_struct_sockaddr_storage=yes
21928else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021929 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021930sed 's/^/| /' conftest.$ac_ext >&5
21931
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021932 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021933fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21936fi
21937
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021938{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21939$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021940if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021941
21942cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021943#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021944_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021945
21946fi
21947
Guido van Rossum627b2d71993-12-24 10:39:16 +000021948# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021949
Michael W. Hudson54241132001-12-07 15:38:26 +000021950
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021951{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21952$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021953if test "${ac_cv_c_char_unsigned+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021954 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021955else
Martin v. Löwis11437992002-04-12 09:54:03 +000021956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021957/* confdefs.h. */
21958_ACEOF
21959cat confdefs.h >>conftest.$ac_ext
21960cat >>conftest.$ac_ext <<_ACEOF
21961/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021962$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021963int
21964main ()
21965{
21966static int test_array [1 - 2 * !(((char) -1) < 0)];
21967test_array [0] = 0
21968
21969 ;
21970 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021971}
Martin v. Löwis11437992002-04-12 09:54:03 +000021972_ACEOF
21973rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021974if { (ac_try="$ac_compile"
21975case "(($ac_try" in
21976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21977 *) ac_try_echo=$ac_try;;
21978esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021979eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21980$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021981 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021983 grep -v '^ *+' conftest.er1 >conftest.err
21984 rm -f conftest.er1
21985 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021986 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021987 (exit $ac_status); } && {
21988 test -z "$ac_c_werror_flag" ||
21989 test ! -s conftest.err
21990 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021991 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021992else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000021993 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021994sed 's/^/| /' conftest.$ac_ext >&5
21995
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021996 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021997fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021998
21999rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022000fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022001{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22002$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022003if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022004 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022005#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022006_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022007
22008fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022009
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022010{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22011$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022012if test "${ac_cv_c_const+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022013 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022014else
22015 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022016/* confdefs.h. */
22017_ACEOF
22018cat confdefs.h >>conftest.$ac_ext
22019cat >>conftest.$ac_ext <<_ACEOF
22020/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022021
Martin v. Löwis11437992002-04-12 09:54:03 +000022022int
22023main ()
22024{
22025/* FIXME: Include the comments suggested by Paul. */
22026#ifndef __cplusplus
22027 /* Ultrix mips cc rejects this. */
22028 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022029 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022030 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022031 char const *const *pcpcc;
22032 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022033 /* NEC SVR4.0.2 mips cc rejects this. */
22034 struct point {int x, y;};
22035 static struct point const zero = {0,0};
22036 /* AIX XL C 1.02.0.0 rejects this.
22037 It does not let you subtract one const X* pointer from another in
22038 an arm of an if-expression whose if-part is not a constant
22039 expression */
22040 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022041 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022042 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022043 ++pcpcc;
22044 ppc = (char**) pcpcc;
22045 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022046 { /* SCO 3.2v4 cc rejects this. */
22047 char *t;
22048 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022049
Martin v. Löwis11437992002-04-12 09:54:03 +000022050 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022051 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022052 }
22053 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22054 int x[] = {25, 17};
22055 const int *foo = &x[0];
22056 ++foo;
22057 }
22058 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22059 typedef const int *iptr;
22060 iptr p = 0;
22061 ++p;
22062 }
22063 { /* AIX XL C 1.02.0.0 rejects this saying
22064 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22065 struct s { int j; const int *ap[3]; };
22066 struct s *b; b->j = 5;
22067 }
22068 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22069 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022070 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022071 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022072 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022073#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022074
Martin v. Löwis11437992002-04-12 09:54:03 +000022075 ;
22076 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022077}
Martin v. Löwis11437992002-04-12 09:54:03 +000022078_ACEOF
22079rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022080if { (ac_try="$ac_compile"
22081case "(($ac_try" in
22082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22083 *) ac_try_echo=$ac_try;;
22084esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022085eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22086$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022087 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022088 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022089 grep -v '^ *+' conftest.er1 >conftest.err
22090 rm -f conftest.er1
22091 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022092 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022093 (exit $ac_status); } && {
22094 test -z "$ac_c_werror_flag" ||
22095 test ! -s conftest.err
22096 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022097 ac_cv_c_const=yes
22098else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022099 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022100sed 's/^/| /' conftest.$ac_ext >&5
22101
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022102 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022103fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022104
22105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022106fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022107{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22108$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022109if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022110
22111cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022112#define const /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000022113_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022114
22115fi
22116
Michael W. Hudson54241132001-12-07 15:38:26 +000022117
Guido van Rossumda88dad1995-01-26 00:46:29 +000022118works=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022119{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
22120$as_echo_n "checking for working volatile... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022121cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022122/* confdefs.h. */
22123_ACEOF
22124cat confdefs.h >>conftest.$ac_ext
22125cat >>conftest.$ac_ext <<_ACEOF
22126/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022127
Martin v. Löwis11437992002-04-12 09:54:03 +000022128int
22129main ()
22130{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022131volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022132 ;
22133 return 0;
22134}
22135_ACEOF
22136rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022137if { (ac_try="$ac_compile"
22138case "(($ac_try" in
22139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22140 *) ac_try_echo=$ac_try;;
22141esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022142eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22143$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022146 grep -v '^ *+' conftest.er1 >conftest.err
22147 rm -f conftest.er1
22148 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022149 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022150 (exit $ac_status); } && {
22151 test -z "$ac_c_werror_flag" ||
22152 test ! -s conftest.err
22153 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022154 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022155else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022156 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022157sed 's/^/| /' conftest.$ac_ext >&5
22158
Martin v. Löwis11437992002-04-12 09:54:03 +000022159
22160cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022161#define volatile /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000022162_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022163
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022164
Guido van Rossum627b2d71993-12-24 10:39:16 +000022165fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022166
22167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022168{ $as_echo "$as_me:$LINENO: result: $works" >&5
22169$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022170
Guido van Rossumda88dad1995-01-26 00:46:29 +000022171works=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022172{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5
22173$as_echo_n "checking for working signed char... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022174cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022175/* confdefs.h. */
22176_ACEOF
22177cat confdefs.h >>conftest.$ac_ext
22178cat >>conftest.$ac_ext <<_ACEOF
22179/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022180
Martin v. Löwis11437992002-04-12 09:54:03 +000022181int
22182main ()
22183{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022184signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022185 ;
22186 return 0;
22187}
22188_ACEOF
22189rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022190if { (ac_try="$ac_compile"
22191case "(($ac_try" in
22192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22193 *) ac_try_echo=$ac_try;;
22194esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022195eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22196$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022197 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022199 grep -v '^ *+' conftest.er1 >conftest.err
22200 rm -f conftest.er1
22201 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022202 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022203 (exit $ac_status); } && {
22204 test -z "$ac_c_werror_flag" ||
22205 test ! -s conftest.err
22206 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022207 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022208else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022209 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022210sed 's/^/| /' conftest.$ac_ext >&5
22211
Martin v. Löwis11437992002-04-12 09:54:03 +000022212
22213cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022214#define signed /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000022215_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022216
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022217
Guido van Rossum7f43da71994-08-01 12:15:30 +000022218fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022219
22220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022221{ $as_echo "$as_me:$LINENO: result: $works" >&5
22222$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022223
Guido van Rossumda88dad1995-01-26 00:46:29 +000022224have_prototypes=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022225{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5
22226$as_echo_n "checking for prototypes... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022227cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022228/* confdefs.h. */
22229_ACEOF
22230cat confdefs.h >>conftest.$ac_ext
22231cat >>conftest.$ac_ext <<_ACEOF
22232/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022233int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022234int
22235main ()
22236{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022237return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022238 ;
22239 return 0;
22240}
22241_ACEOF
22242rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022243if { (ac_try="$ac_compile"
22244case "(($ac_try" in
22245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22246 *) ac_try_echo=$ac_try;;
22247esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022248eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22249$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022252 grep -v '^ *+' conftest.er1 >conftest.err
22253 rm -f conftest.er1
22254 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022255 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022256 (exit $ac_status); } && {
22257 test -z "$ac_c_werror_flag" ||
22258 test ! -s conftest.err
22259 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022260
22261
22262cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022263#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022264_ACEOF
22265
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022266 have_prototypes=yes
22267
Guido van Rossumf78abae1997-01-21 22:02:36 +000022268else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022269 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022270sed 's/^/| /' conftest.$ac_ext >&5
22271
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022272
Guido van Rossum7f43da71994-08-01 12:15:30 +000022273fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022274
22275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022276{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5
22277$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022278
Guido van Rossumda88dad1995-01-26 00:46:29 +000022279works=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022280{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22281$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022282cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022283/* confdefs.h. */
22284_ACEOF
22285cat confdefs.h >>conftest.$ac_ext
22286cat >>conftest.$ac_ext <<_ACEOF
22287/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022288
22289#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022290int foo(int x, ...) {
22291 va_list va;
22292 va_start(va, x);
22293 va_arg(va, int);
22294 va_arg(va, char *);
22295 va_arg(va, double);
22296 return 0;
22297}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022298
Martin v. Löwis11437992002-04-12 09:54:03 +000022299int
22300main ()
22301{
Guido van Rossum90eea071996-08-30 20:58:57 +000022302return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022303 ;
22304 return 0;
22305}
22306_ACEOF
22307rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022308if { (ac_try="$ac_compile"
22309case "(($ac_try" in
22310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22311 *) ac_try_echo=$ac_try;;
22312esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022313eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22314$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022315 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022316 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022317 grep -v '^ *+' conftest.er1 >conftest.err
22318 rm -f conftest.er1
22319 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022320 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022321 (exit $ac_status); } && {
22322 test -z "$ac_c_werror_flag" ||
22323 test ! -s conftest.err
22324 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022325
22326
22327cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022328#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022329_ACEOF
22330
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022331 works=yes
22332
Guido van Rossumf78abae1997-01-21 22:02:36 +000022333else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022334 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022335sed 's/^/| /' conftest.$ac_ext >&5
22336
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022337
Guido van Rossum627b2d71993-12-24 10:39:16 +000022338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022339
22340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022341{ $as_echo "$as_me:$LINENO: result: $works" >&5
22342$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022343
Martin v. Löwisd6320502004-08-12 13:45:08 +000022344# check for socketpair
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022345{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5
22346$as_echo_n "checking for socketpair... " >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022347cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022348/* confdefs.h. */
22349_ACEOF
22350cat confdefs.h >>conftest.$ac_ext
22351cat >>conftest.$ac_ext <<_ACEOF
22352/* end confdefs.h. */
22353
22354#include <sys/types.h>
22355#include <sys/socket.h>
22356
22357int
22358main ()
22359{
22360void *x=socketpair
22361 ;
22362 return 0;
22363}
22364_ACEOF
22365rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022366if { (ac_try="$ac_compile"
22367case "(($ac_try" in
22368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22369 *) ac_try_echo=$ac_try;;
22370esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022371eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22372$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022373 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022374 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022375 grep -v '^ *+' conftest.er1 >conftest.err
22376 rm -f conftest.er1
22377 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022378 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022379 (exit $ac_status); } && {
22380 test -z "$ac_c_werror_flag" ||
22381 test ! -s conftest.err
22382 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022383
22384cat >>confdefs.h <<\_ACEOF
22385#define HAVE_SOCKETPAIR 1
22386_ACEOF
22387
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022388 { $as_echo "$as_me:$LINENO: result: yes" >&5
22389$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022390else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022391 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022392sed 's/^/| /' conftest.$ac_ext >&5
22393
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022394 { $as_echo "$as_me:$LINENO: result: no" >&5
22395$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022396
22397fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022398
22399rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022400
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022401# check if sockaddr has sa_len member
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022402{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22403$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022404cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022405/* confdefs.h. */
22406_ACEOF
22407cat confdefs.h >>conftest.$ac_ext
22408cat >>conftest.$ac_ext <<_ACEOF
22409/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022410#include <sys/types.h>
22411#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022412int
22413main ()
22414{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022415struct sockaddr x;
22416x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022417 ;
22418 return 0;
22419}
22420_ACEOF
22421rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022422if { (ac_try="$ac_compile"
22423case "(($ac_try" in
22424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22425 *) ac_try_echo=$ac_try;;
22426esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022427eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22428$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022429 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022430 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022431 grep -v '^ *+' conftest.er1 >conftest.err
22432 rm -f conftest.er1
22433 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022434 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022435 (exit $ac_status); } && {
22436 test -z "$ac_c_werror_flag" ||
22437 test ! -s conftest.err
22438 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022439 { $as_echo "$as_me:$LINENO: result: yes" >&5
22440$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022441
22442cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022443#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022444_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022445
22446else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022447 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022448sed 's/^/| /' conftest.$ac_ext >&5
22449
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022450 { $as_echo "$as_me:$LINENO: result: no" >&5
22451$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022453
22454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022455
Guido van Rossumda88dad1995-01-26 00:46:29 +000022456va_list_is_array=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022457{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22458$as_echo_n "checking whether va_list is an array... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022459cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022460/* confdefs.h. */
22461_ACEOF
22462cat confdefs.h >>conftest.$ac_ext
22463cat >>conftest.$ac_ext <<_ACEOF
22464/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022465
22466#ifdef HAVE_STDARG_PROTOTYPES
22467#include <stdarg.h>
22468#else
22469#include <varargs.h>
22470#endif
22471
Martin v. Löwis11437992002-04-12 09:54:03 +000022472int
22473main ()
22474{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022475va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022476 ;
22477 return 0;
22478}
22479_ACEOF
22480rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022481if { (ac_try="$ac_compile"
22482case "(($ac_try" in
22483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22484 *) ac_try_echo=$ac_try;;
22485esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022486eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22487$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022490 grep -v '^ *+' conftest.er1 >conftest.err
22491 rm -f conftest.er1
22492 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022493 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022494 (exit $ac_status); } && {
22495 test -z "$ac_c_werror_flag" ||
22496 test ! -s conftest.err
22497 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022498 :
22499else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022500 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022501sed 's/^/| /' conftest.$ac_ext >&5
22502
Martin v. Löwis11437992002-04-12 09:54:03 +000022503
22504
22505cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022506#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022507_ACEOF
22508
Guido van Rossumda88dad1995-01-26 00:46:29 +000022509 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022510
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022512
22513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022514{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22515$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022516
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022517# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022518
22519
22520
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022521{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22522$as_echo_n "checking for gethostbyname_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022523if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022524 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022525else
Martin v. Löwis11437992002-04-12 09:54:03 +000022526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022527/* confdefs.h. */
22528_ACEOF
22529cat confdefs.h >>conftest.$ac_ext
22530cat >>conftest.$ac_ext <<_ACEOF
22531/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022532/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22533 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22534#define gethostbyname_r innocuous_gethostbyname_r
22535
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022536/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022537 which can conflict with char gethostbyname_r (); below.
22538 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022539 <limits.h> exists even on freestanding compilers. */
22540
22541#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022542# include <limits.h>
22543#else
22544# include <assert.h>
22545#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022546
22547#undef gethostbyname_r
22548
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022549/* Override any GCC internal prototype to avoid an error.
22550 Use char because int might match the return type of a GCC
22551 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022552#ifdef __cplusplus
22553extern "C"
22554#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022555char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022556/* The GNU C library defines this for functions which it implements
22557 to always fail with ENOSYS. Some functions are actually named
22558 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022559#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022560choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022561#endif
22562
Skip Montanaro6dead952003-09-25 14:50:04 +000022563int
22564main ()
22565{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022566return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022567 ;
22568 return 0;
22569}
22570_ACEOF
22571rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022572if { (ac_try="$ac_link"
22573case "(($ac_try" in
22574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22575 *) ac_try_echo=$ac_try;;
22576esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022577eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22578$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022579 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022580 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022581 grep -v '^ *+' conftest.er1 >conftest.err
22582 rm -f conftest.er1
22583 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022584 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022585 (exit $ac_status); } && {
22586 test -z "$ac_c_werror_flag" ||
22587 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022588 } && test -s conftest$ac_exeext && {
22589 test "$cross_compiling" = yes ||
22590 $as_test_x conftest$ac_exeext
22591 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022592 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022593else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022594 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022595sed 's/^/| /' conftest.$ac_ext >&5
22596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022597 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022598fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022599
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022600rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022601rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022602 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022603fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022604{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22605$as_echo "$ac_cv_func_gethostbyname_r" >&6; }
22606if test "x$ac_cv_func_gethostbyname_r" = x""yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022607
Martin v. Löwis11437992002-04-12 09:54:03 +000022608 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022609#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022610_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022611
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022612 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22613$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022614 OLD_CFLAGS=$CFLAGS
22615 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022616 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022617/* confdefs.h. */
22618_ACEOF
22619cat confdefs.h >>conftest.$ac_ext
22620cat >>conftest.$ac_ext <<_ACEOF
22621/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022622
22623# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022624
Martin v. Löwis11437992002-04-12 09:54:03 +000022625int
22626main ()
22627{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022628
22629 char *name;
22630 struct hostent *he, *res;
22631 char buffer[2048];
22632 int buflen = 2048;
22633 int h_errnop;
22634
22635 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022636
22637 ;
22638 return 0;
22639}
22640_ACEOF
22641rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022642if { (ac_try="$ac_compile"
22643case "(($ac_try" in
22644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22645 *) ac_try_echo=$ac_try;;
22646esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022647eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22648$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022651 grep -v '^ *+' conftest.er1 >conftest.err
22652 rm -f conftest.er1
22653 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022655 (exit $ac_status); } && {
22656 test -z "$ac_c_werror_flag" ||
22657 test ! -s conftest.err
22658 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022659
22660 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022661#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022662_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022663
Martin v. Löwis11437992002-04-12 09:54:03 +000022664
22665cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022666#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022667_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022668
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022669 { $as_echo "$as_me:$LINENO: result: yes" >&5
22670$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022671
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022672else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022673 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022674sed 's/^/| /' conftest.$ac_ext >&5
22675
Martin v. Löwis11437992002-04-12 09:54:03 +000022676
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022677 { $as_echo "$as_me:$LINENO: result: no" >&5
22678$as_echo "no" >&6; }
22679 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22680$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022681 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022682/* confdefs.h. */
22683_ACEOF
22684cat confdefs.h >>conftest.$ac_ext
22685cat >>conftest.$ac_ext <<_ACEOF
22686/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022687
22688# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022689
Martin v. Löwis11437992002-04-12 09:54:03 +000022690int
22691main ()
22692{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022693
22694 char *name;
22695 struct hostent *he;
22696 char buffer[2048];
22697 int buflen = 2048;
22698 int h_errnop;
22699
22700 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022701
22702 ;
22703 return 0;
22704}
22705_ACEOF
22706rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022707if { (ac_try="$ac_compile"
22708case "(($ac_try" in
22709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22710 *) ac_try_echo=$ac_try;;
22711esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022712eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22713$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022716 grep -v '^ *+' conftest.er1 >conftest.err
22717 rm -f conftest.er1
22718 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022719 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022720 (exit $ac_status); } && {
22721 test -z "$ac_c_werror_flag" ||
22722 test ! -s conftest.err
22723 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022724
22725 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022726#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022727_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022728
Martin v. Löwis11437992002-04-12 09:54:03 +000022729
22730cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022731#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022732_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022733
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022734 { $as_echo "$as_me:$LINENO: result: yes" >&5
22735$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022736
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022737else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022738 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022739sed 's/^/| /' conftest.$ac_ext >&5
22740
Martin v. Löwis11437992002-04-12 09:54:03 +000022741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022742 { $as_echo "$as_me:$LINENO: result: no" >&5
22743$as_echo "no" >&6; }
22744 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22745$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022746 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022747/* confdefs.h. */
22748_ACEOF
22749cat confdefs.h >>conftest.$ac_ext
22750cat >>conftest.$ac_ext <<_ACEOF
22751/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022752
22753# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022754
Martin v. Löwis11437992002-04-12 09:54:03 +000022755int
22756main ()
22757{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022758
22759 char *name;
22760 struct hostent *he;
22761 struct hostent_data data;
22762
22763 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022764
22765 ;
22766 return 0;
22767}
22768_ACEOF
22769rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022770if { (ac_try="$ac_compile"
22771case "(($ac_try" in
22772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22773 *) ac_try_echo=$ac_try;;
22774esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022775eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22776$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022779 grep -v '^ *+' conftest.er1 >conftest.err
22780 rm -f conftest.er1
22781 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022782 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022783 (exit $ac_status); } && {
22784 test -z "$ac_c_werror_flag" ||
22785 test ! -s conftest.err
22786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022787
22788 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022789#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022790_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022791
Martin v. Löwis11437992002-04-12 09:54:03 +000022792
22793cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022794#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022795_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022796
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022797 { $as_echo "$as_me:$LINENO: result: yes" >&5
22798$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022799
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022800else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022801 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022802sed 's/^/| /' conftest.$ac_ext >&5
22803
Martin v. Löwis11437992002-04-12 09:54:03 +000022804
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022805 { $as_echo "$as_me:$LINENO: result: no" >&5
22806$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022807
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022808fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022809
22810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022811
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022812fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022813
22814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022815
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022817
22818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022819 CFLAGS=$OLD_CFLAGS
22820
22821else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022822
Martin v. Löwis11437992002-04-12 09:54:03 +000022823
22824for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022825do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022826as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22827{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22828$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022829if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022830 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022831else
Martin v. Löwis11437992002-04-12 09:54:03 +000022832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022833/* confdefs.h. */
22834_ACEOF
22835cat confdefs.h >>conftest.$ac_ext
22836cat >>conftest.$ac_ext <<_ACEOF
22837/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022838/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22839 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22840#define $ac_func innocuous_$ac_func
22841
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022842/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022843 which can conflict with char $ac_func (); below.
22844 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022845 <limits.h> exists even on freestanding compilers. */
22846
22847#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022848# include <limits.h>
22849#else
22850# include <assert.h>
22851#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022852
22853#undef $ac_func
22854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022855/* Override any GCC internal prototype to avoid an error.
22856 Use char because int might match the return type of a GCC
22857 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022858#ifdef __cplusplus
22859extern "C"
22860#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022861char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022862/* The GNU C library defines this for functions which it implements
22863 to always fail with ENOSYS. Some functions are actually named
22864 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022865#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022866choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022867#endif
22868
Skip Montanaro6dead952003-09-25 14:50:04 +000022869int
22870main ()
22871{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022872return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022873 ;
22874 return 0;
22875}
22876_ACEOF
22877rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022878if { (ac_try="$ac_link"
22879case "(($ac_try" in
22880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22881 *) ac_try_echo=$ac_try;;
22882esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022883eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22884$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022885 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022886 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022887 grep -v '^ *+' conftest.er1 >conftest.err
22888 rm -f conftest.er1
22889 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022890 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022891 (exit $ac_status); } && {
22892 test -z "$ac_c_werror_flag" ||
22893 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022894 } && test -s conftest$ac_exeext && {
22895 test "$cross_compiling" = yes ||
22896 $as_test_x conftest$ac_exeext
22897 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022898 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022899else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022900 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022901sed 's/^/| /' conftest.$ac_ext >&5
22902
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022903 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022904fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022905
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022906rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022907rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022908 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022909fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022910ac_res=`eval 'as_val=${'$as_ac_var'}
22911 $as_echo "$as_val"'`
22912 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22913$as_echo "$ac_res" >&6; }
22914as_val=`eval 'as_val=${'$as_ac_var'}
22915 $as_echo "$as_val"'`
22916 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022917 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022918#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022919_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022920
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022921fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022922done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022923
Michael W. Hudson54241132001-12-07 15:38:26 +000022924
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022925fi
22926
Michael W. Hudson54241132001-12-07 15:38:26 +000022927
22928
22929
22930
22931
22932
Guido van Rossum627b2d71993-12-24 10:39:16 +000022933# checks for system services
22934# (none yet)
22935
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022936# Linux requires this for correct f.p. operations
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022937{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5
22938$as_echo_n "checking for __fpu_control... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022939if test "${ac_cv_func___fpu_control+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022940 $as_echo_n "(cached) " >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022941else
Martin v. Löwis11437992002-04-12 09:54:03 +000022942 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022943/* confdefs.h. */
22944_ACEOF
22945cat confdefs.h >>conftest.$ac_ext
22946cat >>conftest.$ac_ext <<_ACEOF
22947/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022948/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22949 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22950#define __fpu_control innocuous___fpu_control
22951
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022952/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022953 which can conflict with char __fpu_control (); below.
22954 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022955 <limits.h> exists even on freestanding compilers. */
22956
22957#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022958# include <limits.h>
22959#else
22960# include <assert.h>
22961#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022962
22963#undef __fpu_control
22964
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022965/* Override any GCC internal prototype to avoid an error.
22966 Use char because int might match the return type of a GCC
22967 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022968#ifdef __cplusplus
22969extern "C"
22970#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022971char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022972/* The GNU C library defines this for functions which it implements
22973 to always fail with ENOSYS. Some functions are actually named
22974 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022975#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022976choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022977#endif
22978
Skip Montanaro6dead952003-09-25 14:50:04 +000022979int
22980main ()
22981{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022982return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022983 ;
22984 return 0;
22985}
22986_ACEOF
22987rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022988if { (ac_try="$ac_link"
22989case "(($ac_try" in
22990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22991 *) ac_try_echo=$ac_try;;
22992esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000022993eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22994$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022995 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022996 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022997 grep -v '^ *+' conftest.er1 >conftest.err
22998 rm -f conftest.er1
22999 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023000 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023001 (exit $ac_status); } && {
23002 test -z "$ac_c_werror_flag" ||
23003 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023004 } && test -s conftest$ac_exeext && {
23005 test "$cross_compiling" = yes ||
23006 $as_test_x conftest$ac_exeext
23007 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023008 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023009else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023010 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023011sed 's/^/| /' conftest.$ac_ext >&5
23012
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023013 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023014fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023015
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023016rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023017rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023018 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023019fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023020{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23021$as_echo "$ac_cv_func___fpu_control" >&6; }
23022if test "x$ac_cv_func___fpu_control" = x""yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023023 :
23024else
Martin v. Löwis11437992002-04-12 09:54:03 +000023025
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023026{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23027$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023028if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023029 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023030else
Martin v. Löwis11437992002-04-12 09:54:03 +000023031 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023032LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023033cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023034/* confdefs.h. */
23035_ACEOF
23036cat confdefs.h >>conftest.$ac_ext
23037cat >>conftest.$ac_ext <<_ACEOF
23038/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023039
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023040/* Override any GCC internal prototype to avoid an error.
23041 Use char because int might match the return type of a GCC
23042 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023043#ifdef __cplusplus
23044extern "C"
23045#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023046char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023047int
23048main ()
23049{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023050return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023051 ;
23052 return 0;
23053}
23054_ACEOF
23055rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023056if { (ac_try="$ac_link"
23057case "(($ac_try" in
23058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23059 *) ac_try_echo=$ac_try;;
23060esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023061eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23062$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023063 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023065 grep -v '^ *+' conftest.er1 >conftest.err
23066 rm -f conftest.er1
23067 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023068 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023069 (exit $ac_status); } && {
23070 test -z "$ac_c_werror_flag" ||
23071 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023072 } && test -s conftest$ac_exeext && {
23073 test "$cross_compiling" = yes ||
23074 $as_test_x conftest$ac_exeext
23075 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023076 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023077else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023078 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023079sed 's/^/| /' conftest.$ac_ext >&5
23080
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023081 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023083
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023084rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023085rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023086 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023087LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023088fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023089{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23090$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
23091if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023092 cat >>confdefs.h <<_ACEOF
23093#define HAVE_LIBIEEE 1
23094_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023095
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023096 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023097
Guido van Rossum627b2d71993-12-24 10:39:16 +000023098fi
23099
Michael W. Hudson54241132001-12-07 15:38:26 +000023100
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023101fi
23102
Michael W. Hudson54241132001-12-07 15:38:26 +000023103
Guido van Rossum7f253911997-05-09 02:42:48 +000023104# Check for --with-fpectl
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023105{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23106$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023108# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023109if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023110 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023111if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023112then
23113
23114cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023115#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023116_ACEOF
23117
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023118 { $as_echo "$as_me:$LINENO: result: yes" >&5
23119$as_echo "yes" >&6; }
23120else { $as_echo "$as_me:$LINENO: result: no" >&5
23121$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023122fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023123else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023124 { $as_echo "$as_me:$LINENO: result: no" >&5
23125$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023126fi
23127
Guido van Rossum7f253911997-05-09 02:42:48 +000023128
Guido van Rossum7f43da71994-08-01 12:15:30 +000023129# check for --with-libm=...
23130
Guido van Rossum563e7081996-09-10 18:20:48 +000023131case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023132Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023133*) LIBM=-lm
23134esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023135{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23136$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023138# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023139if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023140 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023141if test "$withval" = no
23142then LIBM=
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023143 { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5
23144$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023145elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023146then LIBM=$withval
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023147 { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23148$as_echo "set LIBM=\"$withval\"" >&6; }
23149else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23150$as_echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023151 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023152fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023153else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023154 { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23155$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023156fi
23157
Guido van Rossum7f43da71994-08-01 12:15:30 +000023158
23159# check for --with-libc=...
23160
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023161{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23162$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023164# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023165if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023166 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023167if test "$withval" = no
23168then LIBC=
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023169 { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5
23170$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023171elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023172then LIBC=$withval
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023173 { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23174$as_echo "set LIBC=\"$withval\"" >&6; }
23175else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23176$as_echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023177 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023178fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023179else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023180 { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23181$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023182fi
23183
Guido van Rossum7f43da71994-08-01 12:15:30 +000023184
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023185# **************************************************
23186# * Check for various properties of floating point *
23187# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023188
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023189{ $as_echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23190$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023191if test "${ac_cv_little_endian_double+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023192 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023193else
23194
23195if test "$cross_compiling" = yes; then
23196 ac_cv_little_endian_double=no
23197else
23198 cat >conftest.$ac_ext <<_ACEOF
23199/* confdefs.h. */
23200_ACEOF
23201cat confdefs.h >>conftest.$ac_ext
23202cat >>conftest.$ac_ext <<_ACEOF
23203/* end confdefs.h. */
23204
23205#include <string.h>
23206int main() {
23207 double x = 9006104071832581.0;
23208 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23209 return 0;
23210 else
23211 return 1;
23212}
23213
23214_ACEOF
23215rm -f conftest$ac_exeext
23216if { (ac_try="$ac_link"
23217case "(($ac_try" in
23218 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23219 *) ac_try_echo=$ac_try;;
23220esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023221eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23222$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023223 (eval "$ac_link") 2>&5
23224 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023225 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023226 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23227 { (case "(($ac_try" in
23228 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23229 *) ac_try_echo=$ac_try;;
23230esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023231eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23232$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023233 (eval "$ac_try") 2>&5
23234 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023235 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023236 (exit $ac_status); }; }; then
23237 ac_cv_little_endian_double=yes
23238else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023239 $as_echo "$as_me: program exited with status $ac_status" >&5
23240$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023241sed 's/^/| /' conftest.$ac_ext >&5
23242
23243( exit $ac_status )
23244ac_cv_little_endian_double=no
23245fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023246rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23248fi
23249
23250
23251fi
23252
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023253{ $as_echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23254$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023255if test "$ac_cv_little_endian_double" = yes
23256then
23257
23258cat >>confdefs.h <<\_ACEOF
23259#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23260_ACEOF
23261
23262fi
23263
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023264{ $as_echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23265$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023266if test "${ac_cv_big_endian_double+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023267 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023268else
23269
23270if test "$cross_compiling" = yes; then
23271 ac_cv_big_endian_double=no
23272else
23273 cat >conftest.$ac_ext <<_ACEOF
23274/* confdefs.h. */
23275_ACEOF
23276cat confdefs.h >>conftest.$ac_ext
23277cat >>conftest.$ac_ext <<_ACEOF
23278/* end confdefs.h. */
23279
23280#include <string.h>
23281int main() {
23282 double x = 9006104071832581.0;
23283 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23284 return 0;
23285 else
23286 return 1;
23287}
23288
23289_ACEOF
23290rm -f conftest$ac_exeext
23291if { (ac_try="$ac_link"
23292case "(($ac_try" in
23293 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23294 *) ac_try_echo=$ac_try;;
23295esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023296eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23297$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023298 (eval "$ac_link") 2>&5
23299 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023300 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023301 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23302 { (case "(($ac_try" in
23303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23304 *) ac_try_echo=$ac_try;;
23305esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023306eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23307$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023308 (eval "$ac_try") 2>&5
23309 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023310 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023311 (exit $ac_status); }; }; then
23312 ac_cv_big_endian_double=yes
23313else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023314 $as_echo "$as_me: program exited with status $ac_status" >&5
23315$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023316sed 's/^/| /' conftest.$ac_ext >&5
23317
23318( exit $ac_status )
23319ac_cv_big_endian_double=no
23320fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023321rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023322rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23323fi
23324
23325
23326fi
23327
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023328{ $as_echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23329$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023330if test "$ac_cv_big_endian_double" = yes
23331then
23332
23333cat >>confdefs.h <<\_ACEOF
23334#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23335_ACEOF
23336
23337fi
23338
23339# Some ARM platforms use a mixed-endian representation for doubles.
23340# While Python doesn't currently have full support for these platforms
23341# (see e.g., issue 1762561), we can at least make sure that float <-> string
23342# conversions work.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023343{ $as_echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23344$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023345if test "${ac_cv_mixed_endian_double+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023346 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023347else
23348
23349if test "$cross_compiling" = yes; then
23350 ac_cv_mixed_endian_double=no
23351else
23352 cat >conftest.$ac_ext <<_ACEOF
23353/* confdefs.h. */
23354_ACEOF
23355cat confdefs.h >>conftest.$ac_ext
23356cat >>conftest.$ac_ext <<_ACEOF
23357/* end confdefs.h. */
23358
23359#include <string.h>
23360int main() {
23361 double x = 9006104071832581.0;
23362 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23363 return 0;
23364 else
23365 return 1;
23366}
23367
23368_ACEOF
23369rm -f conftest$ac_exeext
23370if { (ac_try="$ac_link"
23371case "(($ac_try" in
23372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23373 *) ac_try_echo=$ac_try;;
23374esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023375eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23376$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023377 (eval "$ac_link") 2>&5
23378 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023379 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023380 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23381 { (case "(($ac_try" in
23382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23383 *) ac_try_echo=$ac_try;;
23384esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023385eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23386$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023387 (eval "$ac_try") 2>&5
23388 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023389 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023390 (exit $ac_status); }; }; then
23391 ac_cv_mixed_endian_double=yes
23392else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023393 $as_echo "$as_me: program exited with status $ac_status" >&5
23394$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023395sed 's/^/| /' conftest.$ac_ext >&5
23396
23397( exit $ac_status )
23398ac_cv_mixed_endian_double=no
23399fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023400rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023401rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23402fi
23403
23404
23405fi
23406
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023407{ $as_echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23408$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023409if test "$ac_cv_mixed_endian_double" = yes
23410then
23411
23412cat >>confdefs.h <<\_ACEOF
23413#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23414_ACEOF
23415
23416fi
23417
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023418# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023419# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023420# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023421# rounding; this is a problem on x86, where the x87 FPU has a default
23422# rounding precision of 64 bits. For gcc/x86, we try to fix this by
23423# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023424if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
23425then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023426 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000023427 # x87 control word. It should be, but you never know...
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023428 { $as_echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
23429$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023430 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023431/* confdefs.h. */
23432_ACEOF
23433cat confdefs.h >>conftest.$ac_ext
23434cat >>conftest.$ac_ext <<_ACEOF
23435/* end confdefs.h. */
23436
23437int
23438main ()
23439{
23440
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023441 unsigned short cw;
23442 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23443 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023444
23445 ;
23446 return 0;
23447}
23448_ACEOF
23449rm -f conftest.$ac_objext
23450if { (ac_try="$ac_compile"
23451case "(($ac_try" in
23452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23453 *) ac_try_echo=$ac_try;;
23454esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023455eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23456$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023457 (eval "$ac_compile") 2>conftest.er1
23458 ac_status=$?
23459 grep -v '^ *+' conftest.er1 >conftest.err
23460 rm -f conftest.er1
23461 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023462 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023463 (exit $ac_status); } && {
23464 test -z "$ac_c_werror_flag" ||
23465 test ! -s conftest.err
23466 } && test -s conftest.$ac_objext; then
23467 have_gcc_asm_for_x87=yes
23468else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023469 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023470sed 's/^/| /' conftest.$ac_ext >&5
23471
23472 have_gcc_asm_for_x87=no
23473fi
23474
23475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023476 { $as_echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
23477$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023478 if test "$have_gcc_asm_for_x87" = yes
23479 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023480
23481cat >>confdefs.h <<\_ACEOF
23482#define HAVE_GCC_ASM_FOR_X87 1
23483_ACEOF
23484
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023485 fi
23486fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023487
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023488# Detect whether system arithmetic is subject to x87-style double
23489# rounding issues. The result of this test has little meaning on non
23490# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23491# mode is round-to-nearest and double rounding issues are present, and
23492# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023493{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23494$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023495# $BASECFLAGS may affect the result
23496ac_save_cc="$CC"
23497CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023498if test "$cross_compiling" = yes; then
23499 ac_cv_x87_double_rounding=no
23500else
23501 cat >conftest.$ac_ext <<_ACEOF
23502/* confdefs.h. */
23503_ACEOF
23504cat confdefs.h >>conftest.$ac_ext
23505cat >>conftest.$ac_ext <<_ACEOF
23506/* end confdefs.h. */
23507
23508#include <stdlib.h>
23509#include <math.h>
23510int main() {
23511 volatile double x, y, z;
23512 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23513 x = 0.99999999999999989; /* 1-2**-53 */
23514 y = 1./x;
23515 if (y != 1.)
23516 exit(0);
23517 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23518 x = 1e16;
23519 y = 2.99999;
23520 z = x + y;
23521 if (z != 1e16+4.)
23522 exit(0);
23523 /* both tests show evidence of double rounding */
23524 exit(1);
23525}
23526
23527_ACEOF
23528rm -f conftest$ac_exeext
23529if { (ac_try="$ac_link"
23530case "(($ac_try" in
23531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23532 *) ac_try_echo=$ac_try;;
23533esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023534eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23535$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023536 (eval "$ac_link") 2>&5
23537 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023538 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023539 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23540 { (case "(($ac_try" in
23541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23542 *) ac_try_echo=$ac_try;;
23543esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023544eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23545$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023546 (eval "$ac_try") 2>&5
23547 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023548 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023549 (exit $ac_status); }; }; then
23550 ac_cv_x87_double_rounding=no
23551else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023552 $as_echo "$as_me: program exited with status $ac_status" >&5
23553$as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023554sed 's/^/| /' conftest.$ac_ext >&5
23555
23556( exit $ac_status )
23557ac_cv_x87_double_rounding=yes
23558fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023559rm -rf conftest.dSYM
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023560rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23561fi
23562
23563
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023564CC="$ac_save_cc"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023565{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23566$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023567if test "$ac_cv_x87_double_rounding" = yes
23568then
23569
23570cat >>confdefs.h <<\_ACEOF
23571#define X87_DOUBLE_ROUNDING 1
23572_ACEOF
23573
23574fi
23575
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023576# ************************************
23577# * Check for mathematical functions *
23578# ************************************
23579
23580LIBS_SAVE=$LIBS
23581LIBS="$LIBS $LIBM"
23582
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023583# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23584# -0. on some architectures.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023585{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23586$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023587if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023588 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023589else
23590
23591if test "$cross_compiling" = yes; then
23592 ac_cv_tanh_preserves_zero_sign=no
23593else
23594 cat >conftest.$ac_ext <<_ACEOF
23595/* confdefs.h. */
23596_ACEOF
23597cat confdefs.h >>conftest.$ac_ext
23598cat >>conftest.$ac_ext <<_ACEOF
23599/* end confdefs.h. */
23600
23601#include <math.h>
23602#include <stdlib.h>
23603int main() {
23604 /* return 0 if either negative zeros don't exist
23605 on this platform or if negative zeros exist
23606 and tanh(-0.) == -0. */
23607 if (atan2(0., -1.) == atan2(-0., -1.) ||
23608 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23609 else exit(1);
23610}
23611
23612_ACEOF
23613rm -f conftest$ac_exeext
23614if { (ac_try="$ac_link"
23615case "(($ac_try" in
23616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23617 *) ac_try_echo=$ac_try;;
23618esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023619eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23620$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023621 (eval "$ac_link") 2>&5
23622 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023623 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023624 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23625 { (case "(($ac_try" in
23626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23627 *) ac_try_echo=$ac_try;;
23628esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023629eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23630$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023631 (eval "$ac_try") 2>&5
23632 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023633 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023634 (exit $ac_status); }; }; then
23635 ac_cv_tanh_preserves_zero_sign=yes
23636else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023637 $as_echo "$as_me: program exited with status $ac_status" >&5
23638$as_echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023639sed 's/^/| /' conftest.$ac_ext >&5
23640
23641( exit $ac_status )
23642ac_cv_tanh_preserves_zero_sign=no
23643fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023644rm -rf conftest.dSYM
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023645rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23646fi
23647
23648
23649fi
23650
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023651{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23652$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023653if test "$ac_cv_tanh_preserves_zero_sign" = yes
23654then
23655
23656cat >>confdefs.h <<\_ACEOF
23657#define TANH_PRESERVES_ZERO_SIGN 1
23658_ACEOF
23659
23660fi
23661
23662
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023663
Michael W. Hudson54241132001-12-07 15:38:26 +000023664
Christian Heimes99170a52007-12-19 02:07:34 +000023665
23666
23667
23668
23669
Mark Dickinsonf2537862009-04-18 13:58:18 +000023670
23671for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000023672do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023673as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23674{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
23675$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023676if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023677 $as_echo_n "(cached) " >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023678else
23679 cat >conftest.$ac_ext <<_ACEOF
23680/* confdefs.h. */
23681_ACEOF
23682cat confdefs.h >>conftest.$ac_ext
23683cat >>conftest.$ac_ext <<_ACEOF
23684/* end confdefs.h. */
23685/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23686 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23687#define $ac_func innocuous_$ac_func
23688
23689/* System header to define __stub macros and hopefully few prototypes,
23690 which can conflict with char $ac_func (); below.
23691 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23692 <limits.h> exists even on freestanding compilers. */
23693
23694#ifdef __STDC__
23695# include <limits.h>
23696#else
23697# include <assert.h>
23698#endif
23699
23700#undef $ac_func
23701
23702/* Override any GCC internal prototype to avoid an error.
23703 Use char because int might match the return type of a GCC
23704 builtin and then its argument prototype would still apply. */
23705#ifdef __cplusplus
23706extern "C"
23707#endif
23708char $ac_func ();
23709/* The GNU C library defines this for functions which it implements
23710 to always fail with ENOSYS. Some functions are actually named
23711 something starting with __ and the normal name is an alias. */
23712#if defined __stub_$ac_func || defined __stub___$ac_func
23713choke me
23714#endif
23715
23716int
23717main ()
23718{
23719return $ac_func ();
23720 ;
23721 return 0;
23722}
23723_ACEOF
23724rm -f conftest.$ac_objext conftest$ac_exeext
23725if { (ac_try="$ac_link"
23726case "(($ac_try" in
23727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23728 *) ac_try_echo=$ac_try;;
23729esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023730eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23731$as_echo "$ac_try_echo") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023732 (eval "$ac_link") 2>conftest.er1
23733 ac_status=$?
23734 grep -v '^ *+' conftest.er1 >conftest.err
23735 rm -f conftest.er1
23736 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023737 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023738 (exit $ac_status); } && {
23739 test -z "$ac_c_werror_flag" ||
23740 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023741 } && test -s conftest$ac_exeext && {
23742 test "$cross_compiling" = yes ||
23743 $as_test_x conftest$ac_exeext
23744 }; then
Christian Heimes99170a52007-12-19 02:07:34 +000023745 eval "$as_ac_var=yes"
23746else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023747 $as_echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023748sed 's/^/| /' conftest.$ac_ext >&5
23749
23750 eval "$as_ac_var=no"
23751fi
23752
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023753rm -rf conftest.dSYM
Christian Heimes99170a52007-12-19 02:07:34 +000023754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23755 conftest$ac_exeext conftest.$ac_ext
23756fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023757ac_res=`eval 'as_val=${'$as_ac_var'}
23758 $as_echo "$as_val"'`
23759 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
23760$as_echo "$ac_res" >&6; }
23761as_val=`eval 'as_val=${'$as_ac_var'}
23762 $as_echo "$as_val"'`
23763 if test "x$as_val" = x""yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023764 cat >>confdefs.h <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023765#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023766_ACEOF
23767
23768fi
23769done
23770
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023771{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23772$as_echo_n "checking whether isinf is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023773if test "${ac_cv_have_decl_isinf+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023774 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023775else
23776 cat >conftest.$ac_ext <<_ACEOF
23777/* confdefs.h. */
23778_ACEOF
23779cat confdefs.h >>conftest.$ac_ext
23780cat >>conftest.$ac_ext <<_ACEOF
23781/* end confdefs.h. */
23782#include <math.h>
23783
23784int
23785main ()
23786{
23787#ifndef isinf
23788 (void) isinf;
23789#endif
23790
23791 ;
23792 return 0;
23793}
23794_ACEOF
23795rm -f conftest.$ac_objext
23796if { (ac_try="$ac_compile"
23797case "(($ac_try" in
23798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23799 *) ac_try_echo=$ac_try;;
23800esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023801eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23802$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023803 (eval "$ac_compile") 2>conftest.er1
23804 ac_status=$?
23805 grep -v '^ *+' conftest.er1 >conftest.err
23806 rm -f conftest.er1
23807 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023808 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023809 (exit $ac_status); } && {
23810 test -z "$ac_c_werror_flag" ||
23811 test ! -s conftest.err
23812 } && test -s conftest.$ac_objext; then
23813 ac_cv_have_decl_isinf=yes
23814else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023815 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023816sed 's/^/| /' conftest.$ac_ext >&5
23817
23818 ac_cv_have_decl_isinf=no
23819fi
23820
23821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23822fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023823{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23824$as_echo "$ac_cv_have_decl_isinf" >&6; }
23825if test "x$ac_cv_have_decl_isinf" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023826
23827cat >>confdefs.h <<_ACEOF
23828#define HAVE_DECL_ISINF 1
23829_ACEOF
23830
23831
23832else
23833 cat >>confdefs.h <<_ACEOF
23834#define HAVE_DECL_ISINF 0
23835_ACEOF
23836
23837
23838fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023839{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23840$as_echo_n "checking whether isnan is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023841if test "${ac_cv_have_decl_isnan+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023842 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023843else
23844 cat >conftest.$ac_ext <<_ACEOF
23845/* confdefs.h. */
23846_ACEOF
23847cat confdefs.h >>conftest.$ac_ext
23848cat >>conftest.$ac_ext <<_ACEOF
23849/* end confdefs.h. */
23850#include <math.h>
23851
23852int
23853main ()
23854{
23855#ifndef isnan
23856 (void) isnan;
23857#endif
23858
23859 ;
23860 return 0;
23861}
23862_ACEOF
23863rm -f conftest.$ac_objext
23864if { (ac_try="$ac_compile"
23865case "(($ac_try" in
23866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23867 *) ac_try_echo=$ac_try;;
23868esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023869eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23870$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023871 (eval "$ac_compile") 2>conftest.er1
23872 ac_status=$?
23873 grep -v '^ *+' conftest.er1 >conftest.err
23874 rm -f conftest.er1
23875 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023876 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023877 (exit $ac_status); } && {
23878 test -z "$ac_c_werror_flag" ||
23879 test ! -s conftest.err
23880 } && test -s conftest.$ac_objext; then
23881 ac_cv_have_decl_isnan=yes
23882else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023883 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023884sed 's/^/| /' conftest.$ac_ext >&5
23885
23886 ac_cv_have_decl_isnan=no
23887fi
23888
23889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23890fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023891{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23892$as_echo "$ac_cv_have_decl_isnan" >&6; }
23893if test "x$ac_cv_have_decl_isnan" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023894
23895cat >>confdefs.h <<_ACEOF
23896#define HAVE_DECL_ISNAN 1
23897_ACEOF
23898
23899
23900else
23901 cat >>confdefs.h <<_ACEOF
23902#define HAVE_DECL_ISNAN 0
23903_ACEOF
23904
23905
23906fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023907{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23908$as_echo_n "checking whether isfinite is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023909if test "${ac_cv_have_decl_isfinite+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023910 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023911else
23912 cat >conftest.$ac_ext <<_ACEOF
23913/* confdefs.h. */
23914_ACEOF
23915cat confdefs.h >>conftest.$ac_ext
23916cat >>conftest.$ac_ext <<_ACEOF
23917/* end confdefs.h. */
23918#include <math.h>
23919
23920int
23921main ()
23922{
23923#ifndef isfinite
23924 (void) isfinite;
23925#endif
23926
23927 ;
23928 return 0;
23929}
23930_ACEOF
23931rm -f conftest.$ac_objext
23932if { (ac_try="$ac_compile"
23933case "(($ac_try" in
23934 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23935 *) ac_try_echo=$ac_try;;
23936esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023937eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23938$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023939 (eval "$ac_compile") 2>conftest.er1
23940 ac_status=$?
23941 grep -v '^ *+' conftest.er1 >conftest.err
23942 rm -f conftest.er1
23943 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023944 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023945 (exit $ac_status); } && {
23946 test -z "$ac_c_werror_flag" ||
23947 test ! -s conftest.err
23948 } && test -s conftest.$ac_objext; then
23949 ac_cv_have_decl_isfinite=yes
23950else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023951 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023952sed 's/^/| /' conftest.$ac_ext >&5
23953
23954 ac_cv_have_decl_isfinite=no
23955fi
23956
23957rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23958fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023959{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23960$as_echo "$ac_cv_have_decl_isfinite" >&6; }
23961if test "x$ac_cv_have_decl_isfinite" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023962
23963cat >>confdefs.h <<_ACEOF
23964#define HAVE_DECL_ISFINITE 1
23965_ACEOF
23966
23967
23968else
23969 cat >>confdefs.h <<_ACEOF
23970#define HAVE_DECL_ISFINITE 0
23971_ACEOF
23972
23973
23974fi
23975
23976
Christian Heimes99170a52007-12-19 02:07:34 +000023977
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023978LIBS=$LIBS_SAVE
23979
Mark Dickinson10683072009-04-18 21:18:19 +000023980# Multiprocessing check for broken sem_getvalue
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000023981{ $as_echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23982$as_echo_n "checking for broken sem_getvalue... " >&6; }
23983if test "${ac_cv_broken_sem_getvalue+set}" = set; then
23984 $as_echo_n "(cached) " >&6
23985else
23986 if test "$cross_compiling" = yes; then
23987 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000023988else
23989 cat >conftest.$ac_ext <<_ACEOF
23990/* confdefs.h. */
23991_ACEOF
23992cat confdefs.h >>conftest.$ac_ext
23993cat >>conftest.$ac_ext <<_ACEOF
23994/* end confdefs.h. */
23995
23996#include <unistd.h>
23997#include <fcntl.h>
23998#include <stdio.h>
23999#include <semaphore.h>
24000#include <sys/stat.h>
24001
24002int main(void){
24003 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24004 int count;
24005 int res;
24006 if(a==SEM_FAILED){
24007 perror("sem_open");
24008 return 1;
24009
24010 }
24011 res = sem_getvalue(a, &count);
24012 sem_close(a);
24013 return res==-1 ? 1 : 0;
24014}
24015
Mark Dickinson10683072009-04-18 21:18:19 +000024016_ACEOF
24017rm -f conftest$ac_exeext
24018if { (ac_try="$ac_link"
24019case "(($ac_try" in
24020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24021 *) ac_try_echo=$ac_try;;
24022esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024023eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24024$as_echo "$ac_try_echo") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024025 (eval "$ac_link") 2>&5
24026 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024027 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024028 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24029 { (case "(($ac_try" in
24030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24031 *) ac_try_echo=$ac_try;;
24032esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024033eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24034$as_echo "$ac_try_echo") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024035 (eval "$ac_try") 2>&5
24036 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024037 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024038 (exit $ac_status); }; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024039 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024040else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024041 $as_echo "$as_me: program exited with status $ac_status" >&5
24042$as_echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024043sed 's/^/| /' conftest.$ac_ext >&5
24044
24045( exit $ac_status )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024046ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024047fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024048rm -rf conftest.dSYM
Mark Dickinson10683072009-04-18 21:18:19 +000024049rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
24050fi
24051
24052
24053
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024054fi
24055
24056{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24057$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
24058if test $ac_cv_broken_sem_getvalue = yes
24059then
24060
24061cat >>confdefs.h <<\_ACEOF
24062#define HAVE_BROKEN_SEM_GETVALUE 1
24063_ACEOF
24064
24065fi
24066
Mark Dickinsonbd792642009-03-18 20:06:12 +000024067# determine what size digit to use for Python's longs
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024068{ $as_echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24069$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024070# Check whether --enable-big-digits was given.
24071if test "${enable_big_digits+set}" = set; then
24072 enableval=$enable_big_digits; case $enable_big_digits in
24073yes)
24074 enable_big_digits=30 ;;
24075no)
24076 enable_big_digits=15 ;;
2407715|30)
24078 ;;
24079*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024080 { { $as_echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24081$as_echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
Mark Dickinsonbd792642009-03-18 20:06:12 +000024082 { (exit 1); exit 1; }; } ;;
24083esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024084{ $as_echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24085$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024086
24087cat >>confdefs.h <<_ACEOF
24088#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24089_ACEOF
24090
24091
24092else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024093 { $as_echo "$as_me:$LINENO: result: no value specified" >&5
24094$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024095fi
24096
24097
Guido van Rossumef2255b2000-03-10 22:30:29 +000024098# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024099if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024100 { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
24101$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024102if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024103 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024104fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024105{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24106$as_echo "$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024107else
Martin v. Löwis11437992002-04-12 09:54:03 +000024108 # Is the header compilable?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024109{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5
24110$as_echo_n "checking wchar.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024111cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024112/* confdefs.h. */
24113_ACEOF
24114cat confdefs.h >>conftest.$ac_ext
24115cat >>conftest.$ac_ext <<_ACEOF
24116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024117$ac_includes_default
24118#include <wchar.h>
24119_ACEOF
24120rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024121if { (ac_try="$ac_compile"
24122case "(($ac_try" in
24123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24124 *) ac_try_echo=$ac_try;;
24125esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024126eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24127$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024130 grep -v '^ *+' conftest.er1 >conftest.err
24131 rm -f conftest.er1
24132 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024133 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024134 (exit $ac_status); } && {
24135 test -z "$ac_c_werror_flag" ||
24136 test ! -s conftest.err
24137 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024138 ac_header_compiler=yes
24139else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024140 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024141sed 's/^/| /' conftest.$ac_ext >&5
24142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024143 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024145
24146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024147{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24148$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024149
24150# Is the header present?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024151{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5
24152$as_echo_n "checking wchar.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024153cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024154/* confdefs.h. */
24155_ACEOF
24156cat confdefs.h >>conftest.$ac_ext
24157cat >>conftest.$ac_ext <<_ACEOF
24158/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024159#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024160_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024161if { (ac_try="$ac_cpp conftest.$ac_ext"
24162case "(($ac_try" in
24163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24164 *) ac_try_echo=$ac_try;;
24165esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024166eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24167$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024168 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024169 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024170 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024171 rm -f conftest.er1
24172 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024173 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024174 (exit $ac_status); } >/dev/null && {
24175 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24176 test ! -s conftest.err
24177 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024178 ac_header_preproc=yes
24179else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024180 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024181sed 's/^/| /' conftest.$ac_ext >&5
24182
Martin v. Löwis11437992002-04-12 09:54:03 +000024183 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024185
Martin v. Löwis11437992002-04-12 09:54:03 +000024186rm -f conftest.err conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024187{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24188$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024189
24190# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024191case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24192 yes:no: )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024193 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24194$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24195 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24196$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024197 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024198 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024199 no:yes:* )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024200 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24201$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24202 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24203$as_echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24204 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24205$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24206 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24207$as_echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24208 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24209$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24210 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24211$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024212 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024213## -------------------------------------- ##
24214## Report this to http://bugs.python.org/ ##
24215## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024216_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024217 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024218 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024219esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024220{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
24221$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024222if test "${ac_cv_header_wchar_h+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024223 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024224else
24225 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024226fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024227{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24228$as_echo "$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024229
24230fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024231if test "x$ac_cv_header_wchar_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024232
24233
24234cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024235#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024236_ACEOF
24237
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024238 wchar_h="yes"
24239
Guido van Rossumef2255b2000-03-10 22:30:29 +000024240else
Martin v. Löwis11437992002-04-12 09:54:03 +000024241 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024242
24243fi
24244
Michael W. Hudson54241132001-12-07 15:38:26 +000024245
Martin v. Löwis11437992002-04-12 09:54:03 +000024246
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024247# determine wchar_t size
24248if test "$wchar_h" = yes
24249then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024250 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024251# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24252# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24253# This bug is HP SR number 8606223364.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024254{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5
24255$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024256if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024257 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024258else
Martin v. Löwis11437992002-04-12 09:54:03 +000024259 if test "$cross_compiling" = yes; then
24260 # Depending upon the size, compute the lo and hi bounds.
24261cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024262/* confdefs.h. */
24263_ACEOF
24264cat confdefs.h >>conftest.$ac_ext
24265cat >>conftest.$ac_ext <<_ACEOF
24266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024267#include <wchar.h>
24268
Martin v. Löwis11437992002-04-12 09:54:03 +000024269int
24270main ()
24271{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024272static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024273test_array [0] = 0
24274
24275 ;
24276 return 0;
24277}
24278_ACEOF
24279rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024280if { (ac_try="$ac_compile"
24281case "(($ac_try" in
24282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24283 *) ac_try_echo=$ac_try;;
24284esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024285eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24286$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024289 grep -v '^ *+' conftest.er1 >conftest.err
24290 rm -f conftest.er1
24291 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024292 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024293 (exit $ac_status); } && {
24294 test -z "$ac_c_werror_flag" ||
24295 test ! -s conftest.err
24296 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024297 ac_lo=0 ac_mid=0
24298 while :; do
24299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024300/* confdefs.h. */
24301_ACEOF
24302cat confdefs.h >>conftest.$ac_ext
24303cat >>conftest.$ac_ext <<_ACEOF
24304/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024305#include <wchar.h>
24306
Martin v. Löwis11437992002-04-12 09:54:03 +000024307int
24308main ()
24309{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024310static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024311test_array [0] = 0
24312
24313 ;
24314 return 0;
24315}
24316_ACEOF
24317rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024318if { (ac_try="$ac_compile"
24319case "(($ac_try" in
24320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24321 *) ac_try_echo=$ac_try;;
24322esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024323eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24324$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024325 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024326 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024327 grep -v '^ *+' conftest.er1 >conftest.err
24328 rm -f conftest.er1
24329 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024330 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024331 (exit $ac_status); } && {
24332 test -z "$ac_c_werror_flag" ||
24333 test ! -s conftest.err
24334 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024335 ac_hi=$ac_mid; break
24336else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024337 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024338sed 's/^/| /' conftest.$ac_ext >&5
24339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024340 ac_lo=`expr $ac_mid + 1`
24341 if test $ac_lo -le $ac_mid; then
24342 ac_lo= ac_hi=
24343 break
24344 fi
24345 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024346fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024347
24348rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024349 done
24350else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024351 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024352sed 's/^/| /' conftest.$ac_ext >&5
24353
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024355/* confdefs.h. */
24356_ACEOF
24357cat confdefs.h >>conftest.$ac_ext
24358cat >>conftest.$ac_ext <<_ACEOF
24359/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024360#include <wchar.h>
24361
Martin v. Löwis11437992002-04-12 09:54:03 +000024362int
24363main ()
24364{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024365static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024366test_array [0] = 0
24367
24368 ;
24369 return 0;
24370}
24371_ACEOF
24372rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024373if { (ac_try="$ac_compile"
24374case "(($ac_try" in
24375 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24376 *) ac_try_echo=$ac_try;;
24377esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024378eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24379$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024380 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024381 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024382 grep -v '^ *+' conftest.er1 >conftest.err
24383 rm -f conftest.er1
24384 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024385 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024386 (exit $ac_status); } && {
24387 test -z "$ac_c_werror_flag" ||
24388 test ! -s conftest.err
24389 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024390 ac_hi=-1 ac_mid=-1
24391 while :; do
24392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024393/* confdefs.h. */
24394_ACEOF
24395cat confdefs.h >>conftest.$ac_ext
24396cat >>conftest.$ac_ext <<_ACEOF
24397/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024398#include <wchar.h>
24399
Martin v. Löwis11437992002-04-12 09:54:03 +000024400int
24401main ()
24402{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024403static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024404test_array [0] = 0
24405
24406 ;
24407 return 0;
24408}
24409_ACEOF
24410rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024411if { (ac_try="$ac_compile"
24412case "(($ac_try" in
24413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24414 *) ac_try_echo=$ac_try;;
24415esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024416eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24417$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024418 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024420 grep -v '^ *+' conftest.er1 >conftest.err
24421 rm -f conftest.er1
24422 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024423 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024424 (exit $ac_status); } && {
24425 test -z "$ac_c_werror_flag" ||
24426 test ! -s conftest.err
24427 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024428 ac_lo=$ac_mid; break
24429else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024430 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024431sed 's/^/| /' conftest.$ac_ext >&5
24432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024433 ac_hi=`expr '(' $ac_mid ')' - 1`
24434 if test $ac_mid -le $ac_hi; then
24435 ac_lo= ac_hi=
24436 break
24437 fi
24438 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024439fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024440
24441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024442 done
24443else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024444 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024445sed 's/^/| /' conftest.$ac_ext >&5
24446
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024447 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024449
24450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024451fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024452
24453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024454# Binary search between lo and hi bounds.
24455while test "x$ac_lo" != "x$ac_hi"; do
24456 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24457 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024458/* confdefs.h. */
24459_ACEOF
24460cat confdefs.h >>conftest.$ac_ext
24461cat >>conftest.$ac_ext <<_ACEOF
24462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024463#include <wchar.h>
24464
Martin v. Löwis11437992002-04-12 09:54:03 +000024465int
24466main ()
24467{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024468static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024469test_array [0] = 0
24470
24471 ;
24472 return 0;
24473}
24474_ACEOF
24475rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024476if { (ac_try="$ac_compile"
24477case "(($ac_try" in
24478 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24479 *) ac_try_echo=$ac_try;;
24480esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024481eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24482$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024483 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024484 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024485 grep -v '^ *+' conftest.er1 >conftest.err
24486 rm -f conftest.er1
24487 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024488 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024489 (exit $ac_status); } && {
24490 test -z "$ac_c_werror_flag" ||
24491 test ! -s conftest.err
24492 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024493 ac_hi=$ac_mid
24494else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024495 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024496sed 's/^/| /' conftest.$ac_ext >&5
24497
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024498 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024499fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024500
24501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024502done
24503case $ac_lo in
24504?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024505'') if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024506 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24507$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24508{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024509See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024510$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024511See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024512 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024513 else
24514 ac_cv_sizeof_wchar_t=0
24515 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024516esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024517else
Martin v. Löwis11437992002-04-12 09:54:03 +000024518 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024519/* confdefs.h. */
24520_ACEOF
24521cat confdefs.h >>conftest.$ac_ext
24522cat >>conftest.$ac_ext <<_ACEOF
24523/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024524#include <wchar.h>
24525
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024526static long int longval () { return (long int) (sizeof (wchar_t)); }
24527static unsigned long int ulongval () { return (long int) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024528#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024529#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024530int
24531main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024532{
Martin v. Löwis11437992002-04-12 09:54:03 +000024533
24534 FILE *f = fopen ("conftest.val", "w");
24535 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024536 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024537 if (((long int) (sizeof (wchar_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024538 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024539 long int i = longval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024540 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024541 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024542 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024543 }
24544 else
24545 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024546 unsigned long int i = ulongval ();
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024547 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024548 return 1;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024549 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024550 }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024551 /* Do not output a trailing newline, as this causes \r\n confusion
24552 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024553 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024554
24555 ;
24556 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024557}
Martin v. Löwis11437992002-04-12 09:54:03 +000024558_ACEOF
24559rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024560if { (ac_try="$ac_link"
24561case "(($ac_try" in
24562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24563 *) ac_try_echo=$ac_try;;
24564esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024565eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24566$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024567 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024568 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024569 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024570 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024571 { (case "(($ac_try" in
24572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24573 *) ac_try_echo=$ac_try;;
24574esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024575eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24576$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024577 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024578 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024579 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024580 (exit $ac_status); }; }; then
24581 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024582else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024583 $as_echo "$as_me: program exited with status $ac_status" >&5
24584$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024585sed 's/^/| /' conftest.$ac_ext >&5
24586
Martin v. Löwis11437992002-04-12 09:54:03 +000024587( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024588if test "$ac_cv_type_wchar_t" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024589 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24590$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24591{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024592See \`config.log' for more details." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024593$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024594See \`config.log' for more details." >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024595 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024596 else
24597 ac_cv_sizeof_wchar_t=0
24598 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024599fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024600rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024601rm -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 +000024602fi
24603rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024604fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024605{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24606$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024607
24608
24609
Martin v. Löwis11437992002-04-12 09:54:03 +000024610cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024611#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024612_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024613
Michael W. Hudson54241132001-12-07 15:38:26 +000024614
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024615fi
24616
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024617{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24618$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024619have_ucs4_tcl=no
24620cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024621/* confdefs.h. */
24622_ACEOF
24623cat confdefs.h >>conftest.$ac_ext
24624cat >>conftest.$ac_ext <<_ACEOF
24625/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024626
24627#include <tcl.h>
24628#if TCL_UTF_MAX != 6
24629# error "NOT UCS4_TCL"
24630#endif
24631int
24632main ()
24633{
24634
24635 ;
24636 return 0;
24637}
24638_ACEOF
24639rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024640if { (ac_try="$ac_compile"
24641case "(($ac_try" in
24642 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24643 *) ac_try_echo=$ac_try;;
24644esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024645eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24646$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024647 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024648 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024649 grep -v '^ *+' conftest.er1 >conftest.err
24650 rm -f conftest.er1
24651 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024652 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024653 (exit $ac_status); } && {
24654 test -z "$ac_c_werror_flag" ||
24655 test ! -s conftest.err
24656 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024657
24658
24659cat >>confdefs.h <<\_ACEOF
24660#define HAVE_UCS4_TCL 1
24661_ACEOF
24662
24663 have_ucs4_tcl=yes
24664
24665else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024666 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024667sed 's/^/| /' conftest.$ac_ext >&5
24668
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024669
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024670fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024671
24672rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024673{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24674$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024675
Skip Montanaro6dead952003-09-25 14:50:04 +000024676# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024677if test "$wchar_h" = yes
24678then
24679 # check whether wchar_t is signed or not
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024680 { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24681$as_echo_n "checking whether wchar_t is signed... " >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024682 if test "${ac_cv_wchar_t_signed+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024683 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024684else
24685
24686 if test "$cross_compiling" = yes; then
24687 ac_cv_wchar_t_signed=yes
24688else
24689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024690/* confdefs.h. */
24691_ACEOF
24692cat confdefs.h >>conftest.$ac_ext
24693cat >>conftest.$ac_ext <<_ACEOF
24694/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024695
24696 #include <wchar.h>
24697 int main()
24698 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024699 /* Success: exit code 0 */
24700 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024701 }
24702
24703_ACEOF
24704rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024705if { (ac_try="$ac_link"
24706case "(($ac_try" in
24707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24708 *) ac_try_echo=$ac_try;;
24709esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024710eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24711$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024712 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024713 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024714 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024715 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024716 { (case "(($ac_try" in
24717 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24718 *) ac_try_echo=$ac_try;;
24719esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024720eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24721$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024722 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024723 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024724 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024725 (exit $ac_status); }; }; then
24726 ac_cv_wchar_t_signed=yes
24727else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024728 $as_echo "$as_me: program exited with status $ac_status" >&5
24729$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024730sed 's/^/| /' conftest.$ac_ext >&5
24731
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024732( exit $ac_status )
24733ac_cv_wchar_t_signed=no
24734fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024735rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024736rm -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 +000024737fi
24738
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024739
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024740fi
24741
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024742 { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24743$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024744fi
24745
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024746{ $as_echo "$as_me:$LINENO: checking what type to use for str" >&5
24747$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024748
24749# Check whether --with-wide-unicode was given.
24750if test "${with_wide_unicode+set}" = set; then
24751 withval=$with_wide_unicode;
24752if test "$withval" != no
24753then unicode_size="4"
24754else unicode_size="2"
24755fi
24756
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024757else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024758
Georg Brandl52d168a2008-01-07 18:10:24 +000024759case "$have_ucs4_tcl" in
24760 yes) unicode_size="4" ;;
24761 *) unicode_size="2" ;;
24762esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024763
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024764fi
24765
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024766
24767
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024768
Georg Brandl52d168a2008-01-07 18:10:24 +000024769case "$unicode_size" in
24770 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024771#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024772_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024773 ;;
24774 *) cat >>confdefs.h <<\_ACEOF
24775#define Py_UNICODE_SIZE 2
24776_ACEOF
24777 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024778esac
24779
Michael W. Hudson54241132001-12-07 15:38:26 +000024780
Martin v. Löwis11437992002-04-12 09:54:03 +000024781
24782
Georg Brandl52d168a2008-01-07 18:10:24 +000024783# wchar_t is only usable if it maps to an unsigned type
24784if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024785 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024786then
24787 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024788
Martin v. Löwis11437992002-04-12 09:54:03 +000024789cat >>confdefs.h <<\_ACEOF
24790#define HAVE_USABLE_WCHAR_T 1
24791_ACEOF
24792
Georg Brandl52d168a2008-01-07 18:10:24 +000024793 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024794#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024795_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024796
Georg Brandl52d168a2008-01-07 18:10:24 +000024797elif test "$ac_cv_sizeof_short" = "$unicode_size"
24798then
24799 PY_UNICODE_TYPE="unsigned short"
24800 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024801#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024802_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024803
Georg Brandl52d168a2008-01-07 18:10:24 +000024804elif test "$ac_cv_sizeof_long" = "$unicode_size"
24805then
24806 PY_UNICODE_TYPE="unsigned long"
24807 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024808#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024809_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024810
Georg Brandl52d168a2008-01-07 18:10:24 +000024811else
24812 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024813fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024814{ $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24815$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024816
24817# check for endianness
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024818
24819 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24820$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024821if test "${ac_cv_c_bigendian+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024822 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024823else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024824 ac_cv_c_bigendian=unknown
24825 # See if we're dealing with a universal compiler.
24826 cat >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#ifndef __APPLE_CC__
24833 not a universal capable compiler
24834 #endif
24835 typedef int dummy;
24836
24837_ACEOF
24838rm -f conftest.$ac_objext
24839if { (ac_try="$ac_compile"
24840case "(($ac_try" in
24841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24842 *) ac_try_echo=$ac_try;;
24843esac
24844eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24845$as_echo "$ac_try_echo") >&5
24846 (eval "$ac_compile") 2>conftest.er1
24847 ac_status=$?
24848 grep -v '^ *+' conftest.er1 >conftest.err
24849 rm -f conftest.er1
24850 cat conftest.err >&5
24851 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24852 (exit $ac_status); } && {
24853 test -z "$ac_c_werror_flag" ||
24854 test ! -s conftest.err
24855 } && test -s conftest.$ac_objext; then
24856
24857 # Check for potential -arch flags. It is not universal unless
24858 # there are some -arch flags. Note that *ppc* also matches
24859 # ppc64. This check is also rather less than ideal.
24860 case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
24861 *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
24862 esac
24863else
24864 $as_echo "$as_me: failed program was:" >&5
24865sed 's/^/| /' conftest.$ac_ext >&5
24866
24867
24868fi
24869
24870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24871 if test $ac_cv_c_bigendian = unknown; then
24872 # See if sys/param.h defines the BYTE_ORDER macro.
24873 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024874/* confdefs.h. */
24875_ACEOF
24876cat confdefs.h >>conftest.$ac_ext
24877cat >>conftest.$ac_ext <<_ACEOF
24878/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024879#include <sys/types.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024880 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024881
Martin v. Löwis11437992002-04-12 09:54:03 +000024882int
24883main ()
24884{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024885#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
24886 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
24887 && LITTLE_ENDIAN)
24888 bogus endian macros
24889 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024890
24891 ;
24892 return 0;
24893}
24894_ACEOF
24895rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024896if { (ac_try="$ac_compile"
24897case "(($ac_try" in
24898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24899 *) ac_try_echo=$ac_try;;
24900esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024901eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24902$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024904 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024905 grep -v '^ *+' conftest.er1 >conftest.err
24906 rm -f conftest.er1
24907 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024908 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024909 (exit $ac_status); } && {
24910 test -z "$ac_c_werror_flag" ||
24911 test ! -s conftest.err
24912 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024913 # It does; now see whether it defined to BIG_ENDIAN or not.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024914 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024915/* confdefs.h. */
24916_ACEOF
24917cat confdefs.h >>conftest.$ac_ext
24918cat >>conftest.$ac_ext <<_ACEOF
24919/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024920#include <sys/types.h>
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024921 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024922
Martin v. Löwis11437992002-04-12 09:54:03 +000024923int
24924main ()
24925{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024926#if BYTE_ORDER != BIG_ENDIAN
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024927 not big endian
24928 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024929
24930 ;
24931 return 0;
24932}
24933_ACEOF
24934rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024935if { (ac_try="$ac_compile"
24936case "(($ac_try" in
24937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24938 *) ac_try_echo=$ac_try;;
24939esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024940eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24941$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024942 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024943 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024944 grep -v '^ *+' conftest.er1 >conftest.err
24945 rm -f conftest.er1
24946 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024947 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024948 (exit $ac_status); } && {
24949 test -z "$ac_c_werror_flag" ||
24950 test ! -s conftest.err
24951 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024952 ac_cv_c_bigendian=yes
24953else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024954 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024955sed 's/^/| /' conftest.$ac_ext >&5
24956
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024957 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024958fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024959
24960rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024961else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024962 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024963sed 's/^/| /' conftest.$ac_ext >&5
24964
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024965
24966fi
24967
24968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24969 fi
24970 if test $ac_cv_c_bigendian = unknown; then
24971 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
24972 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024973/* confdefs.h. */
24974_ACEOF
24975cat confdefs.h >>conftest.$ac_ext
24976cat >>conftest.$ac_ext <<_ACEOF
24977/* end confdefs.h. */
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024978#include <limits.h>
24979
Martin v. Löwis11437992002-04-12 09:54:03 +000024980int
24981main ()
24982{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024983#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
24984 bogus endian macros
24985 #endif
24986
Martin v. Löwis11437992002-04-12 09:54:03 +000024987 ;
24988 return 0;
24989}
24990_ACEOF
24991rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024992if { (ac_try="$ac_compile"
24993case "(($ac_try" in
24994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24995 *) ac_try_echo=$ac_try;;
24996esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024997eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24998$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024999 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025000 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025001 grep -v '^ *+' conftest.er1 >conftest.err
25002 rm -f conftest.er1
25003 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025004 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025005 (exit $ac_status); } && {
25006 test -z "$ac_c_werror_flag" ||
25007 test ! -s conftest.err
25008 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025009 # It does; now see whether it defined to _BIG_ENDIAN or not.
25010 cat >conftest.$ac_ext <<_ACEOF
25011/* confdefs.h. */
25012_ACEOF
25013cat confdefs.h >>conftest.$ac_ext
25014cat >>conftest.$ac_ext <<_ACEOF
25015/* end confdefs.h. */
25016#include <limits.h>
25017
25018int
25019main ()
25020{
25021#ifndef _BIG_ENDIAN
25022 not big endian
25023 #endif
25024
25025 ;
25026 return 0;
25027}
25028_ACEOF
25029rm -f conftest.$ac_objext
25030if { (ac_try="$ac_compile"
25031case "(($ac_try" in
25032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25033 *) ac_try_echo=$ac_try;;
25034esac
25035eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25036$as_echo "$ac_try_echo") >&5
25037 (eval "$ac_compile") 2>conftest.er1
25038 ac_status=$?
25039 grep -v '^ *+' conftest.er1 >conftest.err
25040 rm -f conftest.er1
25041 cat conftest.err >&5
25042 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25043 (exit $ac_status); } && {
25044 test -z "$ac_c_werror_flag" ||
25045 test ! -s conftest.err
25046 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025047 ac_cv_c_bigendian=yes
Antoine Pitrou20327222009-05-24 20:39:11 +000025048else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025049 $as_echo "$as_me: failed program was:" >&5
25050sed 's/^/| /' conftest.$ac_ext >&5
25051
25052 ac_cv_c_bigendian=no
25053fi
25054
25055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25056else
25057 $as_echo "$as_me: failed program was:" >&5
25058sed 's/^/| /' conftest.$ac_ext >&5
25059
25060
25061fi
25062
25063rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25064 fi
25065 if test $ac_cv_c_bigendian = unknown; then
25066 # Compile a test program.
25067 if test "$cross_compiling" = yes; then
25068 # Try to guess by grepping values from an object file.
25069 cat >conftest.$ac_ext <<_ACEOF
25070/* confdefs.h. */
25071_ACEOF
25072cat confdefs.h >>conftest.$ac_ext
25073cat >>conftest.$ac_ext <<_ACEOF
25074/* end confdefs.h. */
25075short int ascii_mm[] =
25076 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25077 short int ascii_ii[] =
25078 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25079 int use_ascii (int i) {
25080 return ascii_mm[i] + ascii_ii[i];
25081 }
25082 short int ebcdic_ii[] =
25083 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25084 short int ebcdic_mm[] =
25085 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25086 int use_ebcdic (int i) {
25087 return ebcdic_mm[i] + ebcdic_ii[i];
25088 }
25089 extern int foo;
25090
25091int
25092main ()
25093{
25094return use_ascii (foo) == use_ebcdic (foo);
25095 ;
25096 return 0;
25097}
25098_ACEOF
25099rm -f conftest.$ac_objext
25100if { (ac_try="$ac_compile"
25101case "(($ac_try" in
25102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25103 *) ac_try_echo=$ac_try;;
25104esac
25105eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25106$as_echo "$ac_try_echo") >&5
25107 (eval "$ac_compile") 2>conftest.er1
25108 ac_status=$?
25109 grep -v '^ *+' conftest.er1 >conftest.err
25110 rm -f conftest.er1
25111 cat conftest.err >&5
25112 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25113 (exit $ac_status); } && {
25114 test -z "$ac_c_werror_flag" ||
25115 test ! -s conftest.err
25116 } && test -s conftest.$ac_objext; then
25117 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
25118 ac_cv_c_bigendian=yes
25119 fi
25120 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25121 if test "$ac_cv_c_bigendian" = unknown; then
25122 ac_cv_c_bigendian=no
25123 else
25124 # finding both strings is unlikely to happen, but who knows?
25125 ac_cv_c_bigendian=unknown
25126 fi
25127 fi
25128else
25129 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025130sed 's/^/| /' conftest.$ac_ext >&5
25131
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025132
Martin v. Löwis11437992002-04-12 09:54:03 +000025133fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025134
25135rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025136else
25137 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025138/* confdefs.h. */
25139_ACEOF
25140cat confdefs.h >>conftest.$ac_ext
25141cat >>conftest.$ac_ext <<_ACEOF
25142/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025143$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025144int
25145main ()
25146{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025147
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025148 /* Are we little or big endian? From Harbison&Steele. */
25149 union
25150 {
25151 long int l;
25152 char c[sizeof (long int)];
25153 } u;
25154 u.l = 1;
25155 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025156
25157 ;
25158 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025159}
Martin v. Löwis11437992002-04-12 09:54:03 +000025160_ACEOF
25161rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025162if { (ac_try="$ac_link"
25163case "(($ac_try" in
25164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25165 *) ac_try_echo=$ac_try;;
25166esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025167eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25168$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025169 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025170 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025171 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025172 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025173 { (case "(($ac_try" in
25174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25175 *) ac_try_echo=$ac_try;;
25176esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025177eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25178$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025179 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025180 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025181 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025182 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025183 ac_cv_c_bigendian=no
25184else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025185 $as_echo "$as_me: program exited with status $ac_status" >&5
25186$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025187sed 's/^/| /' conftest.$ac_ext >&5
25188
Martin v. Löwis11437992002-04-12 09:54:03 +000025189( exit $ac_status )
25190ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025191fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025192rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025193rm -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 +000025194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025195
25196
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025197 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025198fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025199{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25200$as_echo "$ac_cv_c_bigendian" >&6; }
25201 case $ac_cv_c_bigendian in #(
25202 yes)
25203 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis113a0852009-05-29 17:25:39 +000025204#define WORDS_BIGENDIAN 1
Antoine Pitrou20327222009-05-24 20:39:11 +000025205_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025206;; #(
25207 no)
25208 ;; #(
25209 universal)
25210
25211cat >>confdefs.h <<\_ACEOF
25212#define AC_APPLE_UNIVERSAL_BUILD 1
25213_ACEOF
25214
25215 ;; #(
25216 *)
25217 { { $as_echo "$as_me:$LINENO: error: unknown endianness
25218 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25219$as_echo "$as_me: error: unknown endianness
25220 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025221 { (exit 1); exit 1; }; } ;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025222 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025223
Michael W. Hudson54241132001-12-07 15:38:26 +000025224
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025225# Check whether right shifting a negative integer extends the sign bit
25226# or fills with zeros (like the Cray J90, according to Tim Peters).
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025227{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25228$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025229if test "${ac_cv_rshift_extends_sign+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025230 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025231else
Martin v. Löwis11437992002-04-12 09:54:03 +000025232
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025233if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025234 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025235else
Martin v. Löwis11437992002-04-12 09:54:03 +000025236 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025237/* confdefs.h. */
25238_ACEOF
25239cat confdefs.h >>conftest.$ac_ext
25240cat >>conftest.$ac_ext <<_ACEOF
25241/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025242
25243int main()
25244{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025245 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025246}
25247
Martin v. Löwis11437992002-04-12 09:54:03 +000025248_ACEOF
25249rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025250if { (ac_try="$ac_link"
25251case "(($ac_try" in
25252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25253 *) ac_try_echo=$ac_try;;
25254esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025255eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25256$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025257 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025258 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025259 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025260 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025261 { (case "(($ac_try" in
25262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25263 *) ac_try_echo=$ac_try;;
25264esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025265eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25266$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025267 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025268 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025269 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025270 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025271 ac_cv_rshift_extends_sign=yes
25272else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025273 $as_echo "$as_me: program exited with status $ac_status" >&5
25274$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025275sed 's/^/| /' conftest.$ac_ext >&5
25276
Martin v. Löwis11437992002-04-12 09:54:03 +000025277( exit $ac_status )
25278ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025279fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025280rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025281rm -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 +000025282fi
25283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025284
25285fi
25286
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025287{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25288$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025289if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025290then
Martin v. Löwis11437992002-04-12 09:54:03 +000025291
25292cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025293#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025294_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025295
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025296fi
25297
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025298# check for getc_unlocked and related locking functions
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025299{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25300$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025301if test "${ac_cv_have_getc_unlocked+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025302 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025303else
Martin v. Löwis11437992002-04-12 09:54:03 +000025304
25305cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025306/* confdefs.h. */
25307_ACEOF
25308cat confdefs.h >>conftest.$ac_ext
25309cat >>conftest.$ac_ext <<_ACEOF
25310/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025311#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025312int
25313main ()
25314{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025315
25316 FILE *f = fopen("/dev/null", "r");
25317 flockfile(f);
25318 getc_unlocked(f);
25319 funlockfile(f);
25320
Martin v. Löwis11437992002-04-12 09:54:03 +000025321 ;
25322 return 0;
25323}
25324_ACEOF
25325rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025326if { (ac_try="$ac_link"
25327case "(($ac_try" in
25328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25329 *) ac_try_echo=$ac_try;;
25330esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025331eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25332$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025333 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025334 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025335 grep -v '^ *+' conftest.er1 >conftest.err
25336 rm -f conftest.er1
25337 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025338 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025339 (exit $ac_status); } && {
25340 test -z "$ac_c_werror_flag" ||
25341 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025342 } && test -s conftest$ac_exeext && {
25343 test "$cross_compiling" = yes ||
25344 $as_test_x conftest$ac_exeext
25345 }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025346 ac_cv_have_getc_unlocked=yes
25347else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025348 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025349sed 's/^/| /' conftest.$ac_ext >&5
25350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025351 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025352fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025353
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025354rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025355rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025356 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025357fi
25358
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025359{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25360$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025361if test "$ac_cv_have_getc_unlocked" = yes
25362then
Martin v. Löwis11437992002-04-12 09:54:03 +000025363
25364cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025365#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025366_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025367
25368fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025369
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025370# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025371# save the value of LIBS so we don't actually link Python with readline
25372LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025373
Gregory P. Smith18820942008-09-07 06:24:49 +000025374# On some systems we need to link readline to a termcap compatible
25375# library. NOTE: Keep the precedence of listed libraries synchronised
25376# with setup.py.
25377py_cv_lib_readline=no
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025378{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5
25379$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025380for py_libtermcap in "" ncursesw ncurses curses termcap; do
25381 if test -z "$py_libtermcap"; then
25382 READLINE_LIBS="-lreadline"
25383 else
25384 READLINE_LIBS="-lreadline -l$py_libtermcap"
25385 fi
25386 LIBS="$READLINE_LIBS $LIBS_no_readline"
25387 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025388/* confdefs.h. */
25389_ACEOF
25390cat confdefs.h >>conftest.$ac_ext
25391cat >>conftest.$ac_ext <<_ACEOF
25392/* end confdefs.h. */
25393
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025394/* Override any GCC internal prototype to avoid an error.
25395 Use char because int might match the return type of a GCC
25396 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025397#ifdef __cplusplus
25398extern "C"
25399#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025400char readline ();
25401int
25402main ()
25403{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025404return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025405 ;
25406 return 0;
25407}
25408_ACEOF
25409rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025410if { (ac_try="$ac_link"
25411case "(($ac_try" in
25412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25413 *) ac_try_echo=$ac_try;;
25414esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025415eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25416$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025417 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025418 ac_status=$?
25419 grep -v '^ *+' conftest.er1 >conftest.err
25420 rm -f conftest.er1
25421 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025422 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025423 (exit $ac_status); } && {
25424 test -z "$ac_c_werror_flag" ||
25425 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025426 } && test -s conftest$ac_exeext && {
25427 test "$cross_compiling" = yes ||
25428 $as_test_x conftest$ac_exeext
25429 }; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025430 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025431else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025432 $as_echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025433sed 's/^/| /' conftest.$ac_ext >&5
25434
Gregory P. Smith18820942008-09-07 06:24:49 +000025435
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025436fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025437
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025438rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025439rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025440 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025441 if test $py_cv_lib_readline = yes; then
25442 break
25443 fi
25444done
25445# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25446#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025447if test $py_cv_lib_readline = no; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025448 { $as_echo "$as_me:$LINENO: result: none" >&5
25449$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025450else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025451 { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25452$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025453
25454cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025455#define HAVE_LIBREADLINE 1
25456_ACEOF
25457
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025458fi
25459
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025460# check for readline 2.1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025461{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25462$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025463if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025464 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025465else
25466 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025467LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025468cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025469/* confdefs.h. */
25470_ACEOF
25471cat confdefs.h >>conftest.$ac_ext
25472cat >>conftest.$ac_ext <<_ACEOF
25473/* end confdefs.h. */
25474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025475/* Override any GCC internal prototype to avoid an error.
25476 Use char because int might match the return type of a GCC
25477 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025478#ifdef __cplusplus
25479extern "C"
25480#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025481char rl_callback_handler_install ();
25482int
25483main ()
25484{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025485return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025486 ;
25487 return 0;
25488}
25489_ACEOF
25490rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025491if { (ac_try="$ac_link"
25492case "(($ac_try" in
25493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25494 *) ac_try_echo=$ac_try;;
25495esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025496eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25497$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025498 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025499 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025500 grep -v '^ *+' conftest.er1 >conftest.err
25501 rm -f conftest.er1
25502 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025503 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025504 (exit $ac_status); } && {
25505 test -z "$ac_c_werror_flag" ||
25506 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025507 } && test -s conftest$ac_exeext && {
25508 test "$cross_compiling" = yes ||
25509 $as_test_x conftest$ac_exeext
25510 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025511 ac_cv_lib_readline_rl_callback_handler_install=yes
25512else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025513 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025514sed 's/^/| /' conftest.$ac_ext >&5
25515
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025516 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025517fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025518
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025519rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025520rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025521 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025522LIBS=$ac_check_lib_save_LIBS
25523fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025524{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25525$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25526if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025527
25528cat >>confdefs.h <<\_ACEOF
25529#define HAVE_RL_CALLBACK 1
25530_ACEOF
25531
25532fi
25533
25534
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025535# check for readline 2.2
25536cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025537/* confdefs.h. */
25538_ACEOF
25539cat confdefs.h >>conftest.$ac_ext
25540cat >>conftest.$ac_ext <<_ACEOF
25541/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025542#include <readline/readline.h>
25543_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025544if { (ac_try="$ac_cpp conftest.$ac_ext"
25545case "(($ac_try" in
25546 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25547 *) ac_try_echo=$ac_try;;
25548esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025549eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25550$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025551 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025552 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025553 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025554 rm -f conftest.er1
25555 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025556 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025557 (exit $ac_status); } >/dev/null && {
25558 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25559 test ! -s conftest.err
25560 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025561 have_readline=yes
25562else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025563 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025564sed 's/^/| /' conftest.$ac_ext >&5
25565
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025566 have_readline=no
25567fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025568
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025569rm -f conftest.err conftest.$ac_ext
25570if test $have_readline = yes
25571then
25572 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025573/* confdefs.h. */
25574_ACEOF
25575cat confdefs.h >>conftest.$ac_ext
25576cat >>conftest.$ac_ext <<_ACEOF
25577/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025578#include <readline/readline.h>
25579
25580_ACEOF
25581if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025582 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025583
25584cat >>confdefs.h <<\_ACEOF
25585#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25586_ACEOF
25587
25588fi
25589rm -f conftest*
25590
25591fi
25592
Martin v. Löwis0daad592001-09-30 21:09:59 +000025593# check for readline 4.0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025594{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25595$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025596if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025597 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025598else
Martin v. Löwis11437992002-04-12 09:54:03 +000025599 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025600LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025601cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025602/* confdefs.h. */
25603_ACEOF
25604cat confdefs.h >>conftest.$ac_ext
25605cat >>conftest.$ac_ext <<_ACEOF
25606/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025608/* Override any GCC internal prototype to avoid an error.
25609 Use char because int might match the return type of a GCC
25610 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025611#ifdef __cplusplus
25612extern "C"
25613#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025614char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025615int
25616main ()
25617{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025618return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025619 ;
25620 return 0;
25621}
25622_ACEOF
25623rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025624if { (ac_try="$ac_link"
25625case "(($ac_try" in
25626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25627 *) ac_try_echo=$ac_try;;
25628esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025629eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25630$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025631 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025632 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025633 grep -v '^ *+' conftest.er1 >conftest.err
25634 rm -f conftest.er1
25635 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025636 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025637 (exit $ac_status); } && {
25638 test -z "$ac_c_werror_flag" ||
25639 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025640 } && test -s conftest$ac_exeext && {
25641 test "$cross_compiling" = yes ||
25642 $as_test_x conftest$ac_exeext
25643 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025644 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025645else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025646 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025647sed 's/^/| /' conftest.$ac_ext >&5
25648
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025649 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025650fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025651
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025652rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025653rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025654 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025655LIBS=$ac_check_lib_save_LIBS
25656fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025657{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25658$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25659if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025660
Martin v. Löwis11437992002-04-12 09:54:03 +000025661cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025662#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025663_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025664
Martin v. Löwis0daad592001-09-30 21:09:59 +000025665fi
25666
Michael W. Hudson54241132001-12-07 15:38:26 +000025667
Thomas Wouters89d996e2007-09-08 17:39:28 +000025668# also in 4.0
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025669{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25670$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025671if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025672 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025673else
25674 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025675LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025676cat >conftest.$ac_ext <<_ACEOF
25677/* confdefs.h. */
25678_ACEOF
25679cat confdefs.h >>conftest.$ac_ext
25680cat >>conftest.$ac_ext <<_ACEOF
25681/* end confdefs.h. */
25682
25683/* Override any GCC internal prototype to avoid an error.
25684 Use char because int might match the return type of a GCC
25685 builtin and then its argument prototype would still apply. */
25686#ifdef __cplusplus
25687extern "C"
25688#endif
25689char rl_completion_display_matches_hook ();
25690int
25691main ()
25692{
25693return rl_completion_display_matches_hook ();
25694 ;
25695 return 0;
25696}
25697_ACEOF
25698rm -f conftest.$ac_objext conftest$ac_exeext
25699if { (ac_try="$ac_link"
25700case "(($ac_try" in
25701 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25702 *) ac_try_echo=$ac_try;;
25703esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025704eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25705$as_echo "$ac_try_echo") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025706 (eval "$ac_link") 2>conftest.er1
25707 ac_status=$?
25708 grep -v '^ *+' conftest.er1 >conftest.err
25709 rm -f conftest.er1
25710 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025711 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025712 (exit $ac_status); } && {
25713 test -z "$ac_c_werror_flag" ||
25714 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025715 } && test -s conftest$ac_exeext && {
25716 test "$cross_compiling" = yes ||
25717 $as_test_x conftest$ac_exeext
25718 }; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025719 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25720else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025721 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025722sed 's/^/| /' conftest.$ac_ext >&5
25723
25724 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25725fi
25726
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025727rm -rf conftest.dSYM
Thomas Wouters89d996e2007-09-08 17:39:28 +000025728rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25729 conftest$ac_exeext conftest.$ac_ext
25730LIBS=$ac_check_lib_save_LIBS
25731fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025732{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25733$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25734if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025735
25736cat >>confdefs.h <<\_ACEOF
25737#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25738_ACEOF
25739
25740fi
25741
25742
Martin v. Löwis0daad592001-09-30 21:09:59 +000025743# check for readline 4.2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025744{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25745$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025746if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025747 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025748else
Martin v. Löwis11437992002-04-12 09:54:03 +000025749 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025750LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025751cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025752/* confdefs.h. */
25753_ACEOF
25754cat confdefs.h >>conftest.$ac_ext
25755cat >>conftest.$ac_ext <<_ACEOF
25756/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025758/* Override any GCC internal prototype to avoid an error.
25759 Use char because int might match the return type of a GCC
25760 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025761#ifdef __cplusplus
25762extern "C"
25763#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025764char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025765int
25766main ()
25767{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025768return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025769 ;
25770 return 0;
25771}
25772_ACEOF
25773rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025774if { (ac_try="$ac_link"
25775case "(($ac_try" in
25776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25777 *) ac_try_echo=$ac_try;;
25778esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025779eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25780$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025781 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025783 grep -v '^ *+' conftest.er1 >conftest.err
25784 rm -f conftest.er1
25785 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025786 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025787 (exit $ac_status); } && {
25788 test -z "$ac_c_werror_flag" ||
25789 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025790 } && test -s conftest$ac_exeext && {
25791 test "$cross_compiling" = yes ||
25792 $as_test_x conftest$ac_exeext
25793 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025794 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025795else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025796 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025797sed 's/^/| /' conftest.$ac_ext >&5
25798
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025799 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025800fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025801
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025802rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025803rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025804 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025805LIBS=$ac_check_lib_save_LIBS
25806fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025807{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25808$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
25809if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025810
Martin v. Löwis11437992002-04-12 09:54:03 +000025811cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025812#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025813_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025814
Guido van Rossum353ae582001-07-10 16:45:32 +000025815fi
25816
Jack Jansendd19cf82001-12-06 22:36:17 +000025817
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025818# also in readline 4.2
25819cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025820/* confdefs.h. */
25821_ACEOF
25822cat confdefs.h >>conftest.$ac_ext
25823cat >>conftest.$ac_ext <<_ACEOF
25824/* end confdefs.h. */
25825#include <readline/readline.h>
25826_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025827if { (ac_try="$ac_cpp conftest.$ac_ext"
25828case "(($ac_try" in
25829 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25830 *) ac_try_echo=$ac_try;;
25831esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025832eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25833$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025834 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025835 ac_status=$?
25836 grep -v '^ *+' conftest.er1 >conftest.err
25837 rm -f conftest.er1
25838 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025839 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025840 (exit $ac_status); } >/dev/null && {
25841 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25842 test ! -s conftest.err
25843 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025844 have_readline=yes
25845else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025846 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025847sed 's/^/| /' conftest.$ac_ext >&5
25848
25849 have_readline=no
25850fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025851
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025852rm -f conftest.err conftest.$ac_ext
25853if test $have_readline = yes
25854then
25855 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025856/* confdefs.h. */
25857_ACEOF
25858cat confdefs.h >>conftest.$ac_ext
25859cat >>conftest.$ac_ext <<_ACEOF
25860/* end confdefs.h. */
25861#include <readline/readline.h>
25862
25863_ACEOF
25864if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25865 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25866
25867cat >>confdefs.h <<\_ACEOF
25868#define HAVE_RL_CATCH_SIGNAL 1
25869_ACEOF
25870
25871fi
25872rm -f conftest*
25873
25874fi
25875
Martin v. Löwis82bca632006-02-10 20:49:30 +000025876# End of readline checks: restore LIBS
25877LIBS=$LIBS_no_readline
25878
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025879{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5
25880$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025881if test "${ac_cv_broken_nice+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025882 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025883else
Martin v. Löwis11437992002-04-12 09:54:03 +000025884
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025885if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025886 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025887else
Martin v. Löwis11437992002-04-12 09:54:03 +000025888 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025889/* confdefs.h. */
25890_ACEOF
25891cat confdefs.h >>conftest.$ac_ext
25892cat >>conftest.$ac_ext <<_ACEOF
25893/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025894
25895int main()
25896{
25897 int val1 = nice(1);
25898 if (val1 != -1 && val1 == nice(2))
25899 exit(0);
25900 exit(1);
25901}
25902
Martin v. Löwis11437992002-04-12 09:54:03 +000025903_ACEOF
25904rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025905if { (ac_try="$ac_link"
25906case "(($ac_try" in
25907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25908 *) ac_try_echo=$ac_try;;
25909esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025910eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25911$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025912 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025913 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025914 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025915 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025916 { (case "(($ac_try" in
25917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25918 *) ac_try_echo=$ac_try;;
25919esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025920eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25921$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025922 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025923 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025924 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025925 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025926 ac_cv_broken_nice=yes
25927else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025928 $as_echo "$as_me: program exited with status $ac_status" >&5
25929$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025930sed 's/^/| /' conftest.$ac_ext >&5
25931
Martin v. Löwis11437992002-04-12 09:54:03 +000025932( exit $ac_status )
25933ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025934fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025935rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025936rm -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 +000025937fi
25938
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025939
25940fi
25941
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025942{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25943$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025944if test "$ac_cv_broken_nice" = yes
25945then
Martin v. Löwis11437992002-04-12 09:54:03 +000025946
25947cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025948#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025949_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025950
25951fi
25952
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025953{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5
25954$as_echo_n "checking for broken poll()... " >&6; }
25955if test "${ac_cv_broken_poll+set}" = set; then
25956 $as_echo_n "(cached) " >&6
25957else
25958 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025959 ac_cv_broken_poll=no
25960else
25961 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025962/* confdefs.h. */
25963_ACEOF
25964cat confdefs.h >>conftest.$ac_ext
25965cat >>conftest.$ac_ext <<_ACEOF
25966/* end confdefs.h. */
25967
25968#include <poll.h>
25969
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025970int main()
25971{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025972 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025973 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025974
25975 close (42);
25976
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025977 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025978 if (poll_test < 0)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025979 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025980 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025981 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025982 else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025983 return 1;
25984}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025985
25986_ACEOF
25987rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025988if { (ac_try="$ac_link"
25989case "(($ac_try" in
25990 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25991 *) ac_try_echo=$ac_try;;
25992esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025993eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25994$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025995 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025996 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025997 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025998 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025999 { (case "(($ac_try" in
26000 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26001 *) ac_try_echo=$ac_try;;
26002esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026003eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26004$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026005 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026006 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026007 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026008 (exit $ac_status); }; }; then
26009 ac_cv_broken_poll=yes
26010else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026011 $as_echo "$as_me: program exited with status $ac_status" >&5
26012$as_echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026013sed 's/^/| /' conftest.$ac_ext >&5
26014
26015( exit $ac_status )
26016ac_cv_broken_poll=no
26017fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026018rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026019rm -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 +000026020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026021
26022
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026023fi
26024
26025{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26026$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026027if test "$ac_cv_broken_poll" = yes
26028then
26029
26030cat >>confdefs.h <<\_ACEOF
26031#define HAVE_BROKEN_POLL 1
26032_ACEOF
26033
26034fi
26035
Brett Cannon43802422005-02-10 20:48:03 +000026036# 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 +000026037# (which is not required by ISO C or UNIX spec) and/or if we support
26038# tzname[]
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026039{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26040$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026041if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026042 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000026043else
26044 cat >conftest.$ac_ext <<_ACEOF
26045/* confdefs.h. */
26046_ACEOF
26047cat confdefs.h >>conftest.$ac_ext
26048cat >>conftest.$ac_ext <<_ACEOF
26049/* end confdefs.h. */
26050#include <sys/types.h>
26051#include <$ac_cv_struct_tm>
26052
26053
26054int
26055main ()
26056{
26057static struct tm ac_aggr;
26058if (ac_aggr.tm_zone)
26059return 0;
26060 ;
26061 return 0;
26062}
26063_ACEOF
26064rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026065if { (ac_try="$ac_compile"
26066case "(($ac_try" in
26067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26068 *) ac_try_echo=$ac_try;;
26069esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026070eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26071$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026072 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026073 ac_status=$?
26074 grep -v '^ *+' conftest.er1 >conftest.err
26075 rm -f conftest.er1
26076 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026077 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026078 (exit $ac_status); } && {
26079 test -z "$ac_c_werror_flag" ||
26080 test ! -s conftest.err
26081 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026082 ac_cv_member_struct_tm_tm_zone=yes
26083else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026084 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026085sed 's/^/| /' conftest.$ac_ext >&5
26086
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026087 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026088/* confdefs.h. */
26089_ACEOF
26090cat confdefs.h >>conftest.$ac_ext
26091cat >>conftest.$ac_ext <<_ACEOF
26092/* end confdefs.h. */
26093#include <sys/types.h>
26094#include <$ac_cv_struct_tm>
26095
26096
26097int
26098main ()
26099{
26100static struct tm ac_aggr;
26101if (sizeof ac_aggr.tm_zone)
26102return 0;
26103 ;
26104 return 0;
26105}
26106_ACEOF
26107rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026108if { (ac_try="$ac_compile"
26109case "(($ac_try" in
26110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26111 *) ac_try_echo=$ac_try;;
26112esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026113eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26114$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026115 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026116 ac_status=$?
26117 grep -v '^ *+' conftest.er1 >conftest.err
26118 rm -f conftest.er1
26119 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026120 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026121 (exit $ac_status); } && {
26122 test -z "$ac_c_werror_flag" ||
26123 test ! -s conftest.err
26124 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026125 ac_cv_member_struct_tm_tm_zone=yes
26126else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026127 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026128sed 's/^/| /' conftest.$ac_ext >&5
26129
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026130 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026131fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026132
26133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026134fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026135
26136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026137fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026138{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26139$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
26140if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026141
26142cat >>confdefs.h <<_ACEOF
26143#define HAVE_STRUCT_TM_TM_ZONE 1
26144_ACEOF
26145
26146
26147fi
26148
26149if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26150
26151cat >>confdefs.h <<\_ACEOF
26152#define HAVE_TM_ZONE 1
26153_ACEOF
26154
26155else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026156 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26157$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026158if test "${ac_cv_have_decl_tzname+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026159 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026160else
26161 cat >conftest.$ac_ext <<_ACEOF
26162/* confdefs.h. */
26163_ACEOF
26164cat confdefs.h >>conftest.$ac_ext
26165cat >>conftest.$ac_ext <<_ACEOF
26166/* end confdefs.h. */
26167#include <time.h>
26168
26169int
26170main ()
26171{
26172#ifndef tzname
26173 (void) tzname;
26174#endif
26175
26176 ;
26177 return 0;
26178}
26179_ACEOF
26180rm -f conftest.$ac_objext
26181if { (ac_try="$ac_compile"
26182case "(($ac_try" in
26183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26184 *) ac_try_echo=$ac_try;;
26185esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026186eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26187$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026188 (eval "$ac_compile") 2>conftest.er1
26189 ac_status=$?
26190 grep -v '^ *+' conftest.er1 >conftest.err
26191 rm -f conftest.er1
26192 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026193 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026194 (exit $ac_status); } && {
26195 test -z "$ac_c_werror_flag" ||
26196 test ! -s conftest.err
26197 } && test -s conftest.$ac_objext; then
26198 ac_cv_have_decl_tzname=yes
26199else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026200 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026201sed 's/^/| /' conftest.$ac_ext >&5
26202
26203 ac_cv_have_decl_tzname=no
26204fi
26205
26206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26207fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026208{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26209$as_echo "$ac_cv_have_decl_tzname" >&6; }
26210if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026211
26212cat >>confdefs.h <<_ACEOF
26213#define HAVE_DECL_TZNAME 1
26214_ACEOF
26215
26216
26217else
26218 cat >>confdefs.h <<_ACEOF
26219#define HAVE_DECL_TZNAME 0
26220_ACEOF
26221
26222
26223fi
26224
26225
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026226 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
26227$as_echo_n "checking for tzname... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026228if test "${ac_cv_var_tzname+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026229 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000026230else
26231 cat >conftest.$ac_ext <<_ACEOF
26232/* confdefs.h. */
26233_ACEOF
26234cat confdefs.h >>conftest.$ac_ext
26235cat >>conftest.$ac_ext <<_ACEOF
26236/* end confdefs.h. */
26237#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026238#if !HAVE_DECL_TZNAME
26239extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026240#endif
26241
26242int
26243main ()
26244{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026245return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026246 ;
26247 return 0;
26248}
26249_ACEOF
26250rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026251if { (ac_try="$ac_link"
26252case "(($ac_try" in
26253 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26254 *) ac_try_echo=$ac_try;;
26255esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026256eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26257$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026258 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026259 ac_status=$?
26260 grep -v '^ *+' conftest.er1 >conftest.err
26261 rm -f conftest.er1
26262 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026263 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026264 (exit $ac_status); } && {
26265 test -z "$ac_c_werror_flag" ||
26266 test ! -s conftest.err
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026267 } && test -s conftest$ac_exeext && {
26268 test "$cross_compiling" = yes ||
26269 $as_test_x conftest$ac_exeext
26270 }; then
Brett Cannon43802422005-02-10 20:48:03 +000026271 ac_cv_var_tzname=yes
26272else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026273 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026274sed 's/^/| /' conftest.$ac_ext >&5
26275
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026276 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026277fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026278
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026279rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026280rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026281 conftest$ac_exeext conftest.$ac_ext
26282fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026283{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26284$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026285 if test $ac_cv_var_tzname = yes; then
26286
26287cat >>confdefs.h <<\_ACEOF
26288#define HAVE_TZNAME 1
26289_ACEOF
26290
26291 fi
26292fi
26293
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026294
Martin v. Löwis1d459062005-03-14 21:23:33 +000026295# check tzset(3) exists and works like we expect it to
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026296{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5
26297$as_echo_n "checking for working tzset()... " >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026298if test "${ac_cv_working_tzset+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026299 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026300else
26301
26302if test "$cross_compiling" = yes; then
26303 ac_cv_working_tzset=no
26304else
26305 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026306/* confdefs.h. */
26307_ACEOF
26308cat confdefs.h >>conftest.$ac_ext
26309cat >>conftest.$ac_ext <<_ACEOF
26310/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026311
26312#include <stdlib.h>
26313#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026314#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026315
26316#if HAVE_TZNAME
26317extern char *tzname[];
26318#endif
26319
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026320int main()
26321{
Brett Cannon18367812003-09-19 00:59:16 +000026322 /* Note that we need to ensure that not only does tzset(3)
26323 do 'something' with localtime, but it works as documented
26324 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026325 This includes making sure that tzname is set properly if
26326 tm->tm_zone does not exist since it is the alternative way
26327 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026328
26329 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026330 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026331 */
26332
Martin v. Löwis1d459062005-03-14 21:23:33 +000026333 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026334 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26335
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026336 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026337 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026338 if (localtime(&groundhogday)->tm_hour != 0)
26339 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026340#if HAVE_TZNAME
26341 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26342 if (strcmp(tzname[0], "UTC") ||
26343 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26344 exit(1);
26345#endif
Brett Cannon18367812003-09-19 00:59:16 +000026346
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026347 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026348 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026349 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026350 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026351#if HAVE_TZNAME
26352 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26353 exit(1);
26354#endif
Brett Cannon18367812003-09-19 00:59:16 +000026355
26356 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26357 tzset();
26358 if (localtime(&groundhogday)->tm_hour != 11)
26359 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026360#if HAVE_TZNAME
26361 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26362 exit(1);
26363#endif
26364
26365#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026366 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26367 exit(1);
26368 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26369 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026370#endif
Brett Cannon18367812003-09-19 00:59:16 +000026371
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026372 exit(0);
26373}
26374
26375_ACEOF
26376rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026377if { (ac_try="$ac_link"
26378case "(($ac_try" in
26379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26380 *) ac_try_echo=$ac_try;;
26381esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026382eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26383$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026384 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026385 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026386 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026387 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026388 { (case "(($ac_try" in
26389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26390 *) ac_try_echo=$ac_try;;
26391esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026392eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26393$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026394 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026395 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026396 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026397 (exit $ac_status); }; }; then
26398 ac_cv_working_tzset=yes
26399else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026400 $as_echo "$as_me: program exited with status $ac_status" >&5
26401$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026402sed 's/^/| /' conftest.$ac_ext >&5
26403
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026404( exit $ac_status )
26405ac_cv_working_tzset=no
26406fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026407rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026408rm -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 +000026409fi
26410
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026411
26412fi
26413
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026414{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26415$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026416if test "$ac_cv_working_tzset" = yes
26417then
26418
26419cat >>confdefs.h <<\_ACEOF
26420#define HAVE_WORKING_TZSET 1
26421_ACEOF
26422
26423fi
26424
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026425# Look for subsecond timestamps in struct stat
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026426{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26427$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026428if test "${ac_cv_stat_tv_nsec+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026429 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026430else
26431 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026432/* confdefs.h. */
26433_ACEOF
26434cat confdefs.h >>conftest.$ac_ext
26435cat >>conftest.$ac_ext <<_ACEOF
26436/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026437#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026438int
26439main ()
26440{
26441
26442struct stat st;
26443st.st_mtim.tv_nsec = 1;
26444
26445 ;
26446 return 0;
26447}
26448_ACEOF
26449rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026450if { (ac_try="$ac_compile"
26451case "(($ac_try" in
26452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26453 *) ac_try_echo=$ac_try;;
26454esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026455eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26456$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026459 grep -v '^ *+' conftest.er1 >conftest.err
26460 rm -f conftest.er1
26461 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026462 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026463 (exit $ac_status); } && {
26464 test -z "$ac_c_werror_flag" ||
26465 test ! -s conftest.err
26466 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026467 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026468else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026469 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026470sed 's/^/| /' conftest.$ac_ext >&5
26471
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026472 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026473fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26476fi
26477
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026478{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26479$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026480if test "$ac_cv_stat_tv_nsec" = yes
26481then
26482
26483cat >>confdefs.h <<\_ACEOF
26484#define HAVE_STAT_TV_NSEC 1
26485_ACEOF
26486
26487fi
26488
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026489# Look for BSD style subsecond timestamps in struct stat
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026490{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26491$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026492if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026493 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026494else
26495 cat >conftest.$ac_ext <<_ACEOF
26496/* confdefs.h. */
26497_ACEOF
26498cat confdefs.h >>conftest.$ac_ext
26499cat >>conftest.$ac_ext <<_ACEOF
26500/* end confdefs.h. */
26501#include <sys/stat.h>
26502int
26503main ()
26504{
26505
26506struct stat st;
26507st.st_mtimespec.tv_nsec = 1;
26508
26509 ;
26510 return 0;
26511}
26512_ACEOF
26513rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026514if { (ac_try="$ac_compile"
26515case "(($ac_try" in
26516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26517 *) ac_try_echo=$ac_try;;
26518esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026519eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26520$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026521 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026522 ac_status=$?
26523 grep -v '^ *+' conftest.er1 >conftest.err
26524 rm -f conftest.er1
26525 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026526 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026527 (exit $ac_status); } && {
26528 test -z "$ac_c_werror_flag" ||
26529 test ! -s conftest.err
26530 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026531 ac_cv_stat_tv_nsec2=yes
26532else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026533 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026534sed 's/^/| /' conftest.$ac_ext >&5
26535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026536 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026537fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26540fi
26541
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026542{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26543$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026544if test "$ac_cv_stat_tv_nsec2" = yes
26545then
26546
26547cat >>confdefs.h <<\_ACEOF
26548#define HAVE_STAT_TV_NSEC2 1
26549_ACEOF
26550
26551fi
26552
Jack Jansen666b1e72001-10-31 12:11:48 +000026553# On HP/UX 11.0, mvwdelch is a block with a return statement
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026554{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26555$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026556if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026557 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026558else
Martin v. Löwis11437992002-04-12 09:54:03 +000026559 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026560/* confdefs.h. */
26561_ACEOF
26562cat confdefs.h >>conftest.$ac_ext
26563cat >>conftest.$ac_ext <<_ACEOF
26564/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026565#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026566int
26567main ()
26568{
Jack Jansen666b1e72001-10-31 12:11:48 +000026569
26570 int rtn;
26571 rtn = mvwdelch(0,0,0);
26572
Martin v. Löwis11437992002-04-12 09:54:03 +000026573 ;
26574 return 0;
26575}
26576_ACEOF
26577rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026578if { (ac_try="$ac_compile"
26579case "(($ac_try" in
26580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26581 *) ac_try_echo=$ac_try;;
26582esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026583eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26584$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026585 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026586 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026587 grep -v '^ *+' conftest.er1 >conftest.err
26588 rm -f conftest.er1
26589 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026590 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026591 (exit $ac_status); } && {
26592 test -z "$ac_c_werror_flag" ||
26593 test ! -s conftest.err
26594 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026595 ac_cv_mvwdelch_is_expression=yes
26596else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026597 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026598sed 's/^/| /' conftest.$ac_ext >&5
26599
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026600 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026601fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26604fi
26605
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026606{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26607$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026608
26609if test "$ac_cv_mvwdelch_is_expression" = yes
26610then
Martin v. Löwis11437992002-04-12 09:54:03 +000026611
26612cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026613#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026614_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026615
26616fi
26617
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026618{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26619$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026620if test "${ac_cv_window_has_flags+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026621 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026622else
Martin v. Löwis11437992002-04-12 09:54:03 +000026623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026624/* confdefs.h. */
26625_ACEOF
26626cat confdefs.h >>conftest.$ac_ext
26627cat >>conftest.$ac_ext <<_ACEOF
26628/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026629#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026630int
26631main ()
26632{
Jack Jansen666b1e72001-10-31 12:11:48 +000026633
26634 WINDOW *w;
26635 w->_flags = 0;
26636
Martin v. Löwis11437992002-04-12 09:54:03 +000026637 ;
26638 return 0;
26639}
26640_ACEOF
26641rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026642if { (ac_try="$ac_compile"
26643case "(($ac_try" in
26644 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26645 *) ac_try_echo=$ac_try;;
26646esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026647eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26648$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026649 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026650 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026651 grep -v '^ *+' conftest.er1 >conftest.err
26652 rm -f conftest.er1
26653 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026655 (exit $ac_status); } && {
26656 test -z "$ac_c_werror_flag" ||
26657 test ! -s conftest.err
26658 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026659 ac_cv_window_has_flags=yes
26660else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026661 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026662sed 's/^/| /' conftest.$ac_ext >&5
26663
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026664 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026665fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26668fi
26669
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026670{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26671$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026672
Jack Jansen666b1e72001-10-31 12:11:48 +000026673
26674if test "$ac_cv_window_has_flags" = yes
26675then
Martin v. Löwis11437992002-04-12 09:54:03 +000026676
26677cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026678#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026679_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026680
26681fi
26682
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026683{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5
26684$as_echo_n "checking for is_term_resized... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026685cat >conftest.$ac_ext <<_ACEOF
26686/* confdefs.h. */
26687_ACEOF
26688cat confdefs.h >>conftest.$ac_ext
26689cat >>conftest.$ac_ext <<_ACEOF
26690/* end confdefs.h. */
26691#include <curses.h>
26692int
26693main ()
26694{
26695void *x=is_term_resized
26696 ;
26697 return 0;
26698}
26699_ACEOF
26700rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026701if { (ac_try="$ac_compile"
26702case "(($ac_try" in
26703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26704 *) ac_try_echo=$ac_try;;
26705esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026706eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26707$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026708 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026709 ac_status=$?
26710 grep -v '^ *+' conftest.er1 >conftest.err
26711 rm -f conftest.er1
26712 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026713 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026714 (exit $ac_status); } && {
26715 test -z "$ac_c_werror_flag" ||
26716 test ! -s conftest.err
26717 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026718
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026719cat >>confdefs.h <<\_ACEOF
26720#define HAVE_CURSES_IS_TERM_RESIZED 1
26721_ACEOF
26722
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026723 { $as_echo "$as_me:$LINENO: result: yes" >&5
26724$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026725else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026726 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026727sed 's/^/| /' conftest.$ac_ext >&5
26728
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026729 { $as_echo "$as_me:$LINENO: result: no" >&5
26730$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026731
26732fi
26733
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26735
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026736{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5
26737$as_echo_n "checking for resize_term... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026738cat >conftest.$ac_ext <<_ACEOF
26739/* confdefs.h. */
26740_ACEOF
26741cat confdefs.h >>conftest.$ac_ext
26742cat >>conftest.$ac_ext <<_ACEOF
26743/* end confdefs.h. */
26744#include <curses.h>
26745int
26746main ()
26747{
26748void *x=resize_term
26749 ;
26750 return 0;
26751}
26752_ACEOF
26753rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026754if { (ac_try="$ac_compile"
26755case "(($ac_try" in
26756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26757 *) ac_try_echo=$ac_try;;
26758esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026759eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26760$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026761 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026762 ac_status=$?
26763 grep -v '^ *+' conftest.er1 >conftest.err
26764 rm -f conftest.er1
26765 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026766 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026767 (exit $ac_status); } && {
26768 test -z "$ac_c_werror_flag" ||
26769 test ! -s conftest.err
26770 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026771
26772cat >>confdefs.h <<\_ACEOF
26773#define HAVE_CURSES_RESIZE_TERM 1
26774_ACEOF
26775
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026776 { $as_echo "$as_me:$LINENO: result: yes" >&5
26777$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026778else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026779 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026780sed 's/^/| /' conftest.$ac_ext >&5
26781
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026782 { $as_echo "$as_me:$LINENO: result: no" >&5
26783$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026784
26785fi
26786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26788
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026789{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5
26790$as_echo_n "checking for resizeterm... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026791cat >conftest.$ac_ext <<_ACEOF
26792/* confdefs.h. */
26793_ACEOF
26794cat confdefs.h >>conftest.$ac_ext
26795cat >>conftest.$ac_ext <<_ACEOF
26796/* end confdefs.h. */
26797#include <curses.h>
26798int
26799main ()
26800{
26801void *x=resizeterm
26802 ;
26803 return 0;
26804}
26805_ACEOF
26806rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026807if { (ac_try="$ac_compile"
26808case "(($ac_try" in
26809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26810 *) ac_try_echo=$ac_try;;
26811esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026812eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26813$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026814 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026815 ac_status=$?
26816 grep -v '^ *+' conftest.er1 >conftest.err
26817 rm -f conftest.er1
26818 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026819 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026820 (exit $ac_status); } && {
26821 test -z "$ac_c_werror_flag" ||
26822 test ! -s conftest.err
26823 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026824
26825cat >>confdefs.h <<\_ACEOF
26826#define HAVE_CURSES_RESIZETERM 1
26827_ACEOF
26828
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026829 { $as_echo "$as_me:$LINENO: result: yes" >&5
26830$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026831else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026832 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026833sed 's/^/| /' conftest.$ac_ext >&5
26834
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026835 { $as_echo "$as_me:$LINENO: result: no" >&5
26836$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026837
26838fi
26839
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26841
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026842{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26843$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026844
26845if test -r /dev/ptmx
26846then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026847 { $as_echo "$as_me:$LINENO: result: yes" >&5
26848$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026849
26850cat >>confdefs.h <<\_ACEOF
26851#define HAVE_DEV_PTMX 1
26852_ACEOF
26853
Thomas Wouters89f507f2006-12-13 04:49:30 +000026854else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026855 { $as_echo "$as_me:$LINENO: result: no" >&5
26856$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026857fi
26858
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026859{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26860$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026861
26862if test -r /dev/ptc
26863then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026864 { $as_echo "$as_me:$LINENO: result: yes" >&5
26865$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026866
26867cat >>confdefs.h <<\_ACEOF
26868#define HAVE_DEV_PTC 1
26869_ACEOF
26870
Thomas Wouters89f507f2006-12-13 04:49:30 +000026871else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026872 { $as_echo "$as_me:$LINENO: result: no" >&5
26873$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026874fi
26875
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026876{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26877$as_echo_n "checking for %zd printf() format support... " >&6; }
26878if test "${ac_cv_have_size_t_format+set}" = set; then
26879 $as_echo_n "(cached) " >&6
26880else
26881 if test "$cross_compiling" = yes; then
26882 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026883else
26884 cat >conftest.$ac_ext <<_ACEOF
26885/* confdefs.h. */
26886_ACEOF
26887cat confdefs.h >>conftest.$ac_ext
26888cat >>conftest.$ac_ext <<_ACEOF
26889/* end confdefs.h. */
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026890
Thomas Wouters477c8d52006-05-27 19:21:47 +000026891#include <stdio.h>
26892#include <stddef.h>
26893#include <string.h>
26894
Christian Heimes2c181612007-12-17 20:04:13 +000026895#ifdef HAVE_SYS_TYPES_H
26896#include <sys/types.h>
26897#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026898
26899#ifdef HAVE_SSIZE_T
26900typedef ssize_t Py_ssize_t;
26901#elif SIZEOF_VOID_P == SIZEOF_LONG
26902typedef long Py_ssize_t;
26903#else
26904typedef int Py_ssize_t;
26905#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026906
Christian Heimes2c181612007-12-17 20:04:13 +000026907int main()
26908{
26909 char buffer[256];
26910
Thomas Wouters477c8d52006-05-27 19:21:47 +000026911 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26912 return 1;
26913
Thomas Wouters89f507f2006-12-13 04:49:30 +000026914 if (strcmp(buffer, "123"))
26915 return 1;
26916
26917 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26918 return 1;
26919
26920 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026921 return 1;
26922
26923 return 0;
26924}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026925
Thomas Wouters477c8d52006-05-27 19:21:47 +000026926_ACEOF
26927rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026928if { (ac_try="$ac_link"
26929case "(($ac_try" in
26930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26931 *) ac_try_echo=$ac_try;;
26932esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026933eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26934$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026935 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026936 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026937 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026938 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026939 { (case "(($ac_try" in
26940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26941 *) ac_try_echo=$ac_try;;
26942esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026943eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26944$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026945 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026946 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026947 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026948 (exit $ac_status); }; }; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026949 ac_cv_have_size_t_format=yes
Thomas Wouters477c8d52006-05-27 19:21:47 +000026950else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026951 $as_echo "$as_me: program exited with status $ac_status" >&5
26952$as_echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026953sed 's/^/| /' conftest.$ac_ext >&5
26954
26955( exit $ac_status )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026956ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000026957fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026958rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026959rm -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 +000026960fi
26961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026962
26963
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026964fi
26965
26966{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
26967$as_echo "$ac_cv_have_size_t_format" >&6; }
26968if test $ac_cv_have_size_t_format = yes
26969then
26970
26971cat >>confdefs.h <<\_ACEOF
26972#define PY_FORMAT_SIZE_T "z"
26973_ACEOF
26974
26975fi
26976
26977{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
26978$as_echo_n "checking for socklen_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026979if test "${ac_cv_type_socklen_t+set}" = set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026980 $as_echo_n "(cached) " >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026981else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000026982 ac_cv_type_socklen_t=no
26983cat >conftest.$ac_ext <<_ACEOF
26984/* confdefs.h. */
26985_ACEOF
26986cat confdefs.h >>conftest.$ac_ext
26987cat >>conftest.$ac_ext <<_ACEOF
26988/* end confdefs.h. */
26989
26990#ifdef HAVE_SYS_TYPES_H
26991#include <sys/types.h>
26992#endif
26993#ifdef HAVE_SYS_SOCKET_H
26994#include <sys/socket.h>
26995#endif
26996
26997
26998int
26999main ()
27000{
27001if (sizeof (socklen_t))
27002 return 0;
27003 ;
27004 return 0;
27005}
27006_ACEOF
27007rm -f conftest.$ac_objext
27008if { (ac_try="$ac_compile"
27009case "(($ac_try" in
27010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27011 *) ac_try_echo=$ac_try;;
27012esac
27013eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27014$as_echo "$ac_try_echo") >&5
27015 (eval "$ac_compile") 2>conftest.er1
27016 ac_status=$?
27017 grep -v '^ *+' conftest.er1 >conftest.err
27018 rm -f conftest.er1
27019 cat conftest.err >&5
27020 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27021 (exit $ac_status); } && {
27022 test -z "$ac_c_werror_flag" ||
27023 test ! -s conftest.err
27024 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027025 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027026/* confdefs.h. */
27027_ACEOF
27028cat confdefs.h >>conftest.$ac_ext
27029cat >>conftest.$ac_ext <<_ACEOF
27030/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027031
27032#ifdef HAVE_SYS_TYPES_H
27033#include <sys/types.h>
27034#endif
27035#ifdef HAVE_SYS_SOCKET_H
27036#include <sys/socket.h>
27037#endif
27038
27039
Martin v. Löwis11437992002-04-12 09:54:03 +000027040int
27041main ()
27042{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027043if (sizeof ((socklen_t)))
27044 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027045 ;
27046 return 0;
27047}
27048_ACEOF
27049rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027050if { (ac_try="$ac_compile"
27051case "(($ac_try" in
27052 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27053 *) ac_try_echo=$ac_try;;
27054esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027055eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27056$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027057 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027058 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027059 grep -v '^ *+' conftest.er1 >conftest.err
27060 rm -f conftest.er1
27061 cat conftest.err >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027062 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027063 (exit $ac_status); } && {
27064 test -z "$ac_c_werror_flag" ||
27065 test ! -s conftest.err
27066 } && test -s conftest.$ac_objext; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027067 :
Guido van Rossum95713eb2000-05-18 20:53:31 +000027068else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027069 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027070sed 's/^/| /' conftest.$ac_ext >&5
27071
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027072 ac_cv_type_socklen_t=yes
27073fi
27074
27075rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27076else
27077 $as_echo "$as_me: failed program was:" >&5
27078sed 's/^/| /' conftest.$ac_ext >&5
27079
27080
Guido van Rossum95713eb2000-05-18 20:53:31 +000027081fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027082
27083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027084fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027085{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27086$as_echo "$ac_cv_type_socklen_t" >&6; }
27087if test "x$ac_cv_type_socklen_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027088 :
27089else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027090
Martin v. Löwis01c04012002-11-11 14:58:44 +000027091cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027092#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027093_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027094
27095fi
27096
Michael W. Hudson54241132001-12-07 15:38:26 +000027097
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027098{ $as_echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27099$as_echo_n "checking for broken mbstowcs... " >&6; }
27100if test "${ac_cv_broken_mbstowcs+set}" = set; then
27101 $as_echo_n "(cached) " >&6
27102else
27103 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027104 ac_cv_broken_mbstowcs=no
27105else
27106 cat >conftest.$ac_ext <<_ACEOF
27107/* confdefs.h. */
27108_ACEOF
27109cat confdefs.h >>conftest.$ac_ext
27110cat >>conftest.$ac_ext <<_ACEOF
27111/* end confdefs.h. */
27112
27113#include<stdlib.h>
27114int main() {
27115 size_t len = -1;
27116 const char *str = "text";
27117 len = mbstowcs(NULL, str, 0);
27118 return (len != 4);
27119}
27120
27121_ACEOF
27122rm -f conftest$ac_exeext
27123if { (ac_try="$ac_link"
27124case "(($ac_try" in
27125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27126 *) ac_try_echo=$ac_try;;
27127esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027128eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27129$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027130 (eval "$ac_link") 2>&5
27131 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027132 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027133 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27134 { (case "(($ac_try" in
27135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27136 *) ac_try_echo=$ac_try;;
27137esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027138eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27139$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027140 (eval "$ac_try") 2>&5
27141 ac_status=$?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027142 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027143 (exit $ac_status); }; }; then
27144 ac_cv_broken_mbstowcs=no
27145else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027146 $as_echo "$as_me: program exited with status $ac_status" >&5
27147$as_echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027148sed 's/^/| /' conftest.$ac_ext >&5
27149
27150( exit $ac_status )
27151ac_cv_broken_mbstowcs=yes
27152fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027153rm -rf conftest.dSYM
Antoine Pitroufff95302008-09-03 18:58:51 +000027154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27155fi
27156
27157
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027158fi
27159
27160{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27161$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027162if test "$ac_cv_broken_mbstowcs" = yes
27163then
27164
27165cat >>confdefs.h <<\_ACEOF
27166#define HAVE_BROKEN_MBSTOWCS 1
27167_ACEOF
27168
27169fi
27170
Antoine Pitroub52ec782009-01-25 16:34:23 +000027171# Check for --with-computed-gotos
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027172{ $as_echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27173$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027174
27175# Check whether --with-computed-gotos was given.
27176if test "${with_computed_gotos+set}" = set; then
27177 withval=$with_computed_gotos;
27178if test "$withval" != no
27179then
27180
27181cat >>confdefs.h <<\_ACEOF
27182#define USE_COMPUTED_GOTOS 1
27183_ACEOF
27184
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027185 { $as_echo "$as_me:$LINENO: result: yes" >&5
27186$as_echo "yes" >&6; }
27187else { $as_echo "$as_me:$LINENO: result: no" >&5
27188$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027189fi
27190else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027191 { $as_echo "$as_me:$LINENO: result: no" >&5
27192$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027193fi
27194
27195
27196
Michael W. Hudson54241132001-12-07 15:38:26 +000027197
27198
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027199for h in `(cd $srcdir;echo Python/thread_*.h)`
27200do
27201 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27202done
27203
Michael W. Hudson54241132001-12-07 15:38:26 +000027204
Neal Norwitzd24499d2005-12-18 21:36:39 +000027205SRCDIRS="Parser Grammar Objects Python Modules Mac"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027206{ $as_echo "$as_me:$LINENO: checking for build directories" >&5
27207$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027208for dir in $SRCDIRS; do
27209 if test ! -d $dir; then
27210 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027211 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027212done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027213{ $as_echo "$as_me:$LINENO: result: done" >&5
27214$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027215
Guido van Rossum627b2d71993-12-24 10:39:16 +000027216# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027217ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027218
Martin v. Löwis11437992002-04-12 09:54:03 +000027219cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027220# This file is a shell script that caches the results of configure
27221# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027222# scripts and configure runs, see configure's option --config-cache.
27223# It is not useful on other systems. If it contains results you don't
27224# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027225#
Martin v. Löwis11437992002-04-12 09:54:03 +000027226# config.status only pays attention to the cache file if you give it
27227# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027228#
Skip Montanaro6dead952003-09-25 14:50:04 +000027229# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027230# loading this file, other *unset* `ac_cv_foo' will be assigned the
27231# following values.
27232
27233_ACEOF
27234
Guido van Rossumf78abae1997-01-21 22:02:36 +000027235# The following way of writing the cache mishandles newlines in values,
27236# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027237# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027238# Ultrix sh set writes to stderr and can't be redirected directly,
27239# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027240(
27241 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27242 eval ac_val=\$$ac_var
27243 case $ac_val in #(
27244 *${as_nl}*)
27245 case $ac_var in #(
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027246 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
27247$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027248 esac
27249 case $ac_var in #(
27250 _ | IFS | as_nl) ;; #(
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027251 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027252 *) $as_unset $ac_var ;;
27253 esac ;;
27254 esac
27255 done
27256
Martin v. Löwis11437992002-04-12 09:54:03 +000027257 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027258 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27259 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027260 # `set' does not quote correctly, so add quotes (double-quote
27261 # substitution turns \\\\ into \\, and sed turns \\ into \).
27262 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027263 "s/'/'\\\\''/g;
27264 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027265 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027266 *)
27267 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027268 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027269 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027270 esac |
27271 sort
27272) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027273 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027274 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027275 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027276 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027277 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27278 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027279 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27280 :end' >>confcache
27281if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27282 if test -w "$cache_file"; then
27283 test "x$cache_file" != "x/dev/null" &&
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027284 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
27285$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027286 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027287 else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027288 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27289$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027290 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027291fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027292rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027293
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027294test "x$prefix" = xNONE && prefix=$ac_default_prefix
27295# Let make expand exec_prefix.
27296test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027297
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027298DEFS=-DHAVE_CONFIG_H
27299
Skip Montanaro6dead952003-09-25 14:50:04 +000027300ac_libobjs=
27301ac_ltlibobjs=
27302for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27303 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027304 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027305 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027306 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27307 # will be set to the directory where LIBOBJS objects are built.
27308 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27309 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027310done
27311LIBOBJS=$ac_libobjs
27312
27313LTLIBOBJS=$ac_ltlibobjs
27314
27315
Martin v. Löwis11437992002-04-12 09:54:03 +000027316
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027317
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027318: ${CONFIG_STATUS=./config.status}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027319ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000027320ac_clean_files_save=$ac_clean_files
27321ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027322{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27323$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
27324cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027325#! $SHELL
27326# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027327# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027328# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027329# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027330
Martin v. Löwis11437992002-04-12 09:54:03 +000027331debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027332ac_cs_recheck=false
27333ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027334SHELL=\${CONFIG_SHELL-$SHELL}
27335_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027336
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027337cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027338## --------------------- ##
27339## M4sh Initialization. ##
27340## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027342# Be more Bourne compatible
27343DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027344if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27345 emulate sh
27346 NULLCMD=:
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027347 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027348 # is contrary to our usage. Disable this feature.
27349 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027350 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027351else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027352 case `(set -o) 2>/dev/null` in
27353 *posix*) set -o posix ;;
27354esac
27355
Michael W. Hudson54241132001-12-07 15:38:26 +000027356fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027357
27358
Michael W. Hudson54241132001-12-07 15:38:26 +000027359
Michael W. Hudson54241132001-12-07 15:38:26 +000027360
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027361# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027362# Avoid depending upon Character Ranges.
27363as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27364as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27365as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27366as_cr_digits='0123456789'
27367as_cr_alnum=$as_cr_Letters$as_cr_digits
27368
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027369as_nl='
27370'
27371export as_nl
27372# Printing a long string crashes Solaris 7 /usr/bin/printf.
27373as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
27374as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
27375as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
27376if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
27377 as_echo='printf %s\n'
27378 as_echo_n='printf %s'
27379else
27380 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
27381 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
27382 as_echo_n='/usr/ucb/echo -n'
27383 else
27384 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
27385 as_echo_n_body='eval
27386 arg=$1;
27387 case $arg in
27388 *"$as_nl"*)
27389 expr "X$arg" : "X\\(.*\\)$as_nl";
27390 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
27391 esac;
27392 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
27393 '
27394 export as_echo_n_body
27395 as_echo_n='sh -c $as_echo_n_body as_echo'
27396 fi
27397 export as_echo_body
27398 as_echo='sh -c $as_echo_body as_echo'
27399fi
27400
Martin v. Löwis11437992002-04-12 09:54:03 +000027401# The user is always right.
27402if test "${PATH_SEPARATOR+set}" != set; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027403 PATH_SEPARATOR=:
27404 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
27405 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
27406 PATH_SEPARATOR=';'
27407 }
Martin v. Löwis11437992002-04-12 09:54:03 +000027408fi
27409
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027410# Support unset when possible.
27411if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27412 as_unset=unset
27413else
27414 as_unset=false
27415fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027417
27418# IFS
27419# We need space, tab and new line, in precisely that order. Quoting is
27420# there to prevent editors from complaining about space-tab.
27421# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27422# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027423IFS=" "" $as_nl"
27424
27425# Find who we are. Look in the path if we contain no directory separator.
27426case $0 in
27427 *[\\/]* ) as_myself=$0 ;;
27428 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027429for as_dir in $PATH
27430do
27431 IFS=$as_save_IFS
27432 test -z "$as_dir" && as_dir=.
27433 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27434done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027435IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027436
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027437 ;;
27438esac
27439# We did not find ourselves, most probably we were run as `sh COMMAND'
27440# in which case we are not to be found in the path.
27441if test "x$as_myself" = x; then
27442 as_myself=$0
27443fi
27444if test ! -f "$as_myself"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027445 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027446 { (exit 1); exit 1; }
27447fi
27448
27449# Work around bugs in pre-3.0 UWIN ksh.
27450for as_var in ENV MAIL MAILPATH
27451do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27452done
27453PS1='$ '
27454PS2='> '
27455PS4='+ '
27456
27457# NLS nuisances.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027458LC_ALL=C
27459export LC_ALL
27460LANGUAGE=C
27461export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027462
27463# Required to use basename.
27464if expr a : '\(a\)' >/dev/null 2>&1 &&
27465 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27466 as_expr=expr
27467else
27468 as_expr=false
27469fi
27470
27471if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27472 as_basename=basename
27473else
27474 as_basename=false
27475fi
27476
27477
27478# Name of the executable.
27479as_me=`$as_basename -- "$0" ||
27480$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27481 X"$0" : 'X\(//\)$' \| \
27482 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027483$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027484 sed '/^.*\/\([^/][^/]*\)\/*$/{
27485 s//\1/
27486 q
27487 }
27488 /^X\/\(\/\/\)$/{
27489 s//\1/
27490 q
27491 }
27492 /^X\/\(\/\).*/{
27493 s//\1/
27494 q
27495 }
27496 s/.*/./; q'`
27497
27498# CDPATH.
27499$as_unset CDPATH
27500
27501
27502
Martin v. Löwis11437992002-04-12 09:54:03 +000027503 as_lineno_1=$LINENO
27504 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027505 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027506 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027507
Martin v. Löwis11437992002-04-12 09:54:03 +000027508 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27509 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027510 # line-number line after each line using $LINENO; the second 'sed'
27511 # does the real work. The second script uses 'N' to pair each
27512 # line-number line with the line containing $LINENO, and appends
27513 # trailing '-' during substitution so that $LINENO is not a special
27514 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027515 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027516 # scripts with optimization help from Paolo Bonzini. Blame Lee
27517 # E. McMahon (1931-1989) for sed's syntax. :-)
27518 sed -n '
27519 p
27520 /[$]LINENO/=
27521 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027522 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027523 s/[$]LINENO.*/&-/
27524 t lineno
27525 b
27526 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027527 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027528 :loop
27529 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027530 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027531 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027532 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027533 chmod +x "$as_me.lineno" ||
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027534 { $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 +000027535 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027536
Martin v. Löwis11437992002-04-12 09:54:03 +000027537 # Don't try to exec as it changes $[0], causing all sort of problems
27538 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027539 # original and so on. Autoconf is especially sensitive to this).
27540 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027541 # Exit status is that of the last command.
27542 exit
27543}
27544
27545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027546if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27547 as_dirname=dirname
27548else
27549 as_dirname=false
27550fi
27551
27552ECHO_C= ECHO_N= ECHO_T=
27553case `echo -n x` in
27554-n*)
27555 case `echo 'x\c'` in
27556 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27557 *) ECHO_C='\c';;
27558 esac;;
27559*)
27560 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027561esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027562if expr a : '\(a\)' >/dev/null 2>&1 &&
27563 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027564 as_expr=expr
27565else
27566 as_expr=false
27567fi
27568
27569rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027570if test -d conf$$.dir; then
27571 rm -f conf$$.dir/conf$$.file
27572else
27573 rm -f conf$$.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027574 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027575fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027576if (echo >conf$$.file) 2>/dev/null; then
27577 if ln -s conf$$.file conf$$ 2>/dev/null; then
27578 as_ln_s='ln -s'
27579 # ... but there are two gotchas:
27580 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27581 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27582 # In both cases, we have to default to `cp -p'.
27583 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
27584 as_ln_s='cp -p'
27585 elif ln conf$$.file conf$$ 2>/dev/null; then
27586 as_ln_s=ln
27587 else
Martin v. Löwis11437992002-04-12 09:54:03 +000027588 as_ln_s='cp -p'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027589 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027590else
27591 as_ln_s='cp -p'
27592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027593rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27594rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027595
Skip Montanaro6dead952003-09-25 14:50:04 +000027596if mkdir -p . 2>/dev/null; then
27597 as_mkdir_p=:
27598else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027599 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027600 as_mkdir_p=false
27601fi
27602
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027603if test -x / >/dev/null 2>&1; then
27604 as_test_x='test -x'
27605else
27606 if ls -dL / >/dev/null 2>&1; then
27607 as_ls_L_option=L
27608 else
27609 as_ls_L_option=
27610 fi
27611 as_test_x='
27612 eval sh -c '\''
27613 if test -d "$1"; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027614 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027615 else
27616 case $1 in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027617 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027618 esac;
27619 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27620 ???[sx]*):;;*)false;;esac;fi
27621 '\'' sh
27622 '
27623fi
27624as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027625
27626# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027627as_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 +000027628
27629# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027630as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027631
27632
Martin v. Löwis11437992002-04-12 09:54:03 +000027633exec 6>&1
27634
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027635# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027636# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027637# values after options handling.
27638ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027639This file was extended by python $as_me 3.2, which was
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027640generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027641
27642 CONFIG_FILES = $CONFIG_FILES
27643 CONFIG_HEADERS = $CONFIG_HEADERS
27644 CONFIG_LINKS = $CONFIG_LINKS
27645 CONFIG_COMMANDS = $CONFIG_COMMANDS
27646 $ $0 $@
27647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027648on `(hostname || uname -n) 2>/dev/null | sed 1q`
27649"
27650
Martin v. Löwis11437992002-04-12 09:54:03 +000027651_ACEOF
27652
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027653case $ac_config_files in *"
27654"*) set x $ac_config_files; shift; ac_config_files=$*;;
27655esac
27656
27657case $ac_config_headers in *"
27658"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
27659esac
27660
27661
27662cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027663# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027664config_files="$ac_config_files"
27665config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027666
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027667_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027668
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027669cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027670ac_cs_usage="\
27671\`$as_me' instantiates files from templates according to the
27672current configuration.
27673
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027674Usage: $0 [OPTION]... [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027675
27676 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027677 -V, --version print version number and configuration settings, then exit
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027678 -q, --quiet, --silent
27679 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027680 -d, --debug don't remove temporary files
27681 --recheck update $as_me by reconfiguring in the same conditions
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027682 --file=FILE[:TEMPLATE]
27683 instantiate the configuration file FILE
27684 --header=FILE[:TEMPLATE]
27685 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027686
27687Configuration files:
27688$config_files
27689
27690Configuration headers:
27691$config_headers
27692
27693Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027694
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027695_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027696cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027697ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027698python config.status 3.2
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027699configured by $0, generated by GNU Autoconf 2.63,
27700 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027701
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027702Copyright (C) 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027703This config.status script is free software; the Free Software Foundation
27704gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027705
27706ac_pwd='$ac_pwd'
27707srcdir='$srcdir'
27708INSTALL='$INSTALL'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027709test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000027710_ACEOF
27711
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027712cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27713# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000027714ac_need_defaults=:
27715while test $# != 0
27716do
27717 case $1 in
27718 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027719 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27720 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027721 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027722 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027723 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027724 ac_option=$1
27725 ac_optarg=$2
27726 ac_shift=shift
27727 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027728 esac
27729
Skip Montanaro6dead952003-09-25 14:50:04 +000027730 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027731 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027732 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27733 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027734 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027735 $as_echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027736 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027737 debug=: ;;
27738 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027739 $ac_shift
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027740 case $ac_optarg in
27741 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27742 esac
27743 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027744 ac_need_defaults=false;;
27745 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027746 $ac_shift
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027747 case $ac_optarg in
27748 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27749 esac
27750 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027751 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027752 --he | --h)
27753 # Conflict between --help and --header
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027754 { $as_echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027755Try \`$0 --help' for more information." >&2
27756 { (exit 1); exit 1; }; };;
27757 --help | --hel | -h )
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027758 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027759 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27760 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27761 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027762
27763 # This is an error.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027764 -*) { $as_echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027765Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027766 { (exit 1); exit 1; }; } ;;
27767
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027768 *) ac_config_targets="$ac_config_targets $1"
27769 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027770
27771 esac
27772 shift
27773done
27774
Skip Montanaro6dead952003-09-25 14:50:04 +000027775ac_configure_extra_args=
27776
27777if $ac_cs_silent; then
27778 exec 6>/dev/null
27779 ac_configure_extra_args="$ac_configure_extra_args --silent"
27780fi
27781
27782_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027783cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000027784if \$ac_cs_recheck; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027785 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27786 shift
27787 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27788 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027789 export CONFIG_SHELL
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027790 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000027791fi
27792
Martin v. Löwis11437992002-04-12 09:54:03 +000027793_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027794cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027795exec 5>>config.log
27796{
27797 echo
27798 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27799## Running $as_me. ##
27800_ASBOX
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027801 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027802} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027804_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027805cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027806_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027807
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027808cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027809
27810# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027811for ac_config_target in $ac_config_targets
27812do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027813 case $ac_config_target in
27814 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27815 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27816 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027817 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27818 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027819 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27820 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027821 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027822
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027823 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27824$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027825 { (exit 1); exit 1; }; };;
27826 esac
27827done
27828
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027829
Martin v. Löwis11437992002-04-12 09:54:03 +000027830# If the user did not use the arguments to specify the items to instantiate,
27831# then the envvar interface is used. Set only those that are not.
27832# We use the long form for the default assignment because of an extremely
27833# bizarre bug on SunOS 4.1.3.
27834if $ac_need_defaults; then
27835 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27836 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27837fi
27838
Skip Montanaro6dead952003-09-25 14:50:04 +000027839# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027840# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027841# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027842# Hook for its removal unless debugging.
27843# Note that there is a small window in which the directory will not be cleaned:
27844# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027845$debug ||
27846{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027847 tmp=
27848 trap 'exit_status=$?
27849 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27850' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027851 trap '{ (exit 1); exit 1; }' 1 2 13 15
27852}
Martin v. Löwis11437992002-04-12 09:54:03 +000027853# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027854
Martin v. Löwis11437992002-04-12 09:54:03 +000027855{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027856 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027857 test -n "$tmp" && test -d "$tmp"
27858} ||
27859{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027860 tmp=./conf$$-$RANDOM
27861 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027862} ||
27863{
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027864 $as_echo "$as_me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027865 { (exit 1); exit 1; }
27866}
27867
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027868# Set up the scripts for CONFIG_FILES section.
27869# No need to generate them if there are no CONFIG_FILES.
27870# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027871if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027872
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027873
27874ac_cr=`echo X | tr X '\015'`
27875ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27876if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
27877 ac_cs_awk_cr='\\r'
27878else
27879 ac_cs_awk_cr=$ac_cr
27880fi
27881
27882echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027883_ACEOF
27884
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027885
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027886{
27887 echo "cat >conf$$subs.awk <<_ACEOF" &&
27888 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27889 echo "_ACEOF"
27890} >conf$$subs.sh ||
27891 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27892$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
27893 { (exit 1); exit 1; }; }
27894ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027895ac_delim='%!_!# '
27896for ac_last_try in false false false false false :; do
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027897 . ./conf$$subs.sh ||
27898 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27899$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
27900 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027901
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027902 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27903 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027904 break
27905 elif $ac_last_try; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027906 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27907$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027908 { (exit 1); exit 1; }; }
27909 else
27910 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027911 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027912done
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027913rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027914
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027915cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27916cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027917_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027918sed -n '
27919h
27920s/^/S["/; s/!.*/"]=/
27921p
27922g
27923s/^[^!]*!//
27924:repl
27925t repl
27926s/'"$ac_delim"'$//
27927t delim
27928:nl
27929h
27930s/\(.\{148\}\).*/\1/
27931t more1
27932s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27933p
27934n
27935b repl
27936:more1
27937s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27938p
27939g
27940s/.\{148\}//
27941t nl
27942:delim
27943h
27944s/\(.\{148\}\).*/\1/
27945t more2
27946s/["\\]/\\&/g; s/^/"/; s/$/"/
27947p
27948b
27949:more2
27950s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27951p
27952g
27953s/.\{148\}//
27954t delim
27955' <conf$$subs.awk | sed '
27956/^[^""]/{
27957 N
27958 s/\n//
27959}
27960' >>$CONFIG_STATUS || ac_write_fail=1
27961rm -f conf$$subs.awk
27962cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27963_ACAWK
27964cat >>"\$tmp/subs1.awk" <<_ACAWK &&
27965 for (key in S) S_is_set[key] = 1
27966 FS = ""
27967
27968}
27969{
27970 line = $ 0
27971 nfields = split(line, field, "@")
27972 substed = 0
27973 len = length(field[1])
27974 for (i = 2; i < nfields; i++) {
27975 key = field[i]
27976 keylen = length(key)
27977 if (S_is_set[key]) {
27978 value = S[key]
27979 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27980 len += length(value) + length(field[++i])
27981 substed = 1
27982 } else
27983 len += 1 + keylen
27984 }
27985
27986 print line
27987}
27988
27989_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027990_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027991cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27992if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27993 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27994else
27995 cat
27996fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
27997 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
27998$as_echo "$as_me: error: could not setup config files machinery" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027999 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028000_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028001
28002# VPATH may cause trouble with some makes, so we remove $(srcdir),
28003# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28004# trailing colons and then remove the whole line if VPATH becomes empty
28005# (actually we leave an empty line to preserve line numbers).
28006if test "x$srcdir" = x.; then
28007 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28008s/:*\$(srcdir):*/:/
28009s/:*\${srcdir}:*/:/
28010s/:*@srcdir@:*/:/
28011s/^\([^=]*=[ ]*\):*/\1/
28012s/:*$//
28013s/^[^=]*=[ ]*$//
28014}'
28015fi
28016
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028017cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000028018fi # test -n "$CONFIG_FILES"
28019
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028020# Set up the scripts for CONFIG_HEADERS section.
28021# No need to generate them if there are no CONFIG_HEADERS.
28022# This happens for instance with `./config.status Makefile'.
28023if test -n "$CONFIG_HEADERS"; then
28024cat >"$tmp/defines.awk" <<\_ACAWK ||
28025BEGIN {
28026_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028027
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028028# Transform confdefs.h into an awk script `defines.awk', embedded as
28029# here-document in config.status, that substitutes the proper values into
28030# config.h.in to produce config.h.
28031
28032# Create a delimiter string that does not exist in confdefs.h, to ease
28033# handling of long lines.
28034ac_delim='%!_!# '
28035for ac_last_try in false false :; do
28036 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
28037 if test -z "$ac_t"; then
28038 break
28039 elif $ac_last_try; then
28040 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
28041$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
28042 { (exit 1); exit 1; }; }
28043 else
28044 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28045 fi
28046done
28047
28048# For the awk script, D is an array of macro values keyed by name,
28049# likewise P contains macro parameters if any. Preserve backslash
28050# newline sequences.
28051
28052ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28053sed -n '
28054s/.\{148\}/&'"$ac_delim"'/g
28055t rset
28056:rset
28057s/^[ ]*#[ ]*define[ ][ ]*/ /
28058t def
28059d
28060:def
28061s/\\$//
28062t bsnl
28063s/["\\]/\\&/g
28064s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
28065D["\1"]=" \3"/p
28066s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
28067d
28068:bsnl
28069s/["\\]/\\&/g
28070s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
28071D["\1"]=" \3\\\\\\n"\\/p
28072t cont
28073s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
28074t cont
28075d
28076:cont
28077n
28078s/.\{148\}/&'"$ac_delim"'/g
28079t clear
28080:clear
28081s/\\$//
28082t bsnlc
28083s/["\\]/\\&/g; s/^/"/; s/$/"/p
28084d
28085:bsnlc
28086s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
28087b cont
28088' <confdefs.h | sed '
28089s/'"$ac_delim"'/"\\\
28090"/g' >>$CONFIG_STATUS || ac_write_fail=1
28091
28092cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28093 for (key in D) D_is_set[key] = 1
28094 FS = ""
28095}
28096/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
28097 line = \$ 0
28098 split(line, arg, " ")
28099 if (arg[1] == "#") {
28100 defundef = arg[2]
28101 mac1 = arg[3]
28102 } else {
28103 defundef = substr(arg[1], 2)
28104 mac1 = arg[2]
28105 }
28106 split(mac1, mac2, "(") #)
28107 macro = mac2[1]
28108 prefix = substr(line, 1, index(line, defundef) - 1)
28109 if (D_is_set[macro]) {
28110 # Preserve the white space surrounding the "#".
28111 print prefix "define", macro P[macro] D[macro]
28112 next
28113 } else {
28114 # Replace #undef with comments. This is necessary, for example,
28115 # in the case of _POSIX_SOURCE, which is predefined and required
28116 # on some systems where configure will not decide to define it.
28117 if (defundef == "undef") {
28118 print "/*", prefix defundef, macro, "*/"
28119 next
28120 }
28121 }
28122}
28123{ print }
28124_ACAWK
28125_ACEOF
28126cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28127 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
28128$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
28129 { (exit 1); exit 1; }; }
28130fi # test -n "$CONFIG_HEADERS"
28131
28132
28133eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
28134shift
28135for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028136do
28137 case $ac_tag in
28138 :[FHLC]) ac_mode=$ac_tag; continue;;
28139 esac
28140 case $ac_mode$ac_tag in
28141 :[FHL]*:*);;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028142 :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
28143$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028144 { (exit 1); exit 1; }; };;
28145 :[FH]-) ac_tag=-:-;;
28146 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28147 esac
28148 ac_save_IFS=$IFS
28149 IFS=:
28150 set x $ac_tag
28151 IFS=$ac_save_IFS
28152 shift
28153 ac_file=$1
28154 shift
28155
28156 case $ac_mode in
28157 :L) ac_source=$1;;
28158 :[FH])
28159 ac_file_inputs=
28160 for ac_f
28161 do
28162 case $ac_f in
28163 -) ac_f="$tmp/stdin";;
28164 *) # Look for the file first in the build tree, then in the source tree
28165 # (if the path is not absolute). The absolute path cannot be DOS-style,
28166 # because $ac_f cannot contain `:'.
28167 test -f "$ac_f" ||
28168 case $ac_f in
28169 [\\/$]*) false;;
28170 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28171 esac ||
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028172 { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28173$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028174 { (exit 1); exit 1; }; };;
28175 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028176 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
28177 ac_file_inputs="$ac_file_inputs '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028178 done
28179
28180 # Let's still pretend it is `configure' which instantiates (i.e., don't
28181 # use $as_me), people would be surprised to read:
28182 # /* config.h. Generated by config.status. */
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028183 configure_input='Generated from '`
28184 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
28185 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028186 if test x"$ac_file" != x-; then
28187 configure_input="$ac_file. $configure_input"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028188 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
28189$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028190 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028191 # Neutralize special characters interpreted by sed in replacement strings.
28192 case $configure_input in #(
28193 *\&* | *\|* | *\\* )
28194 ac_sed_conf_input=`$as_echo "$configure_input" |
28195 sed 's/[\\\\&|]/\\\\&/g'`;; #(
28196 *) ac_sed_conf_input=$configure_input;;
28197 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028198
28199 case $ac_tag in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028200 *:-:* | *:-) cat >"$tmp/stdin" \
28201 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
28202$as_echo "$as_me: error: could not create $ac_file" >&2;}
28203 { (exit 1); exit 1; }; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028204 esac
28205 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028206 esac
28207
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028208 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028209$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028210 X"$ac_file" : 'X\(//\)[^/]' \| \
28211 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028212 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028213$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028214 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28215 s//\1/
28216 q
28217 }
28218 /^X\(\/\/\)[^/].*/{
28219 s//\1/
28220 q
28221 }
28222 /^X\(\/\/\)$/{
28223 s//\1/
28224 q
28225 }
28226 /^X\(\/\).*/{
28227 s//\1/
28228 q
28229 }
28230 s/.*/./; q'`
28231 { as_dir="$ac_dir"
28232 case $as_dir in #(
28233 -*) as_dir=./$as_dir;;
28234 esac
28235 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028236 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028237 while :; do
28238 case $as_dir in #(
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028239 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028240 *) as_qdir=$as_dir;;
28241 esac
28242 as_dirs="'$as_qdir' $as_dirs"
28243 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028244$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028245 X"$as_dir" : 'X\(//\)[^/]' \| \
28246 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028247 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028248$as_echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028249 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28250 s//\1/
28251 q
28252 }
28253 /^X\(\/\/\)[^/].*/{
28254 s//\1/
28255 q
28256 }
28257 /^X\(\/\/\)$/{
28258 s//\1/
28259 q
28260 }
28261 /^X\(\/\).*/{
28262 s//\1/
28263 q
28264 }
28265 s/.*/./; q'`
28266 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028267 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028268 test -z "$as_dirs" || eval "mkdir $as_dirs"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028269 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28270$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028271 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028272 ac_builddir=.
28273
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028274case "$ac_dir" in
28275.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28276*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028277 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028278 # A ".." for each directory in $ac_dir_suffix.
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028279 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028280 case $ac_top_builddir_sub in
28281 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28282 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28283 esac ;;
28284esac
28285ac_abs_top_builddir=$ac_pwd
28286ac_abs_builddir=$ac_pwd$ac_dir_suffix
28287# for backward compatibility:
28288ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028289
28290case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028291 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028292 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028293 ac_top_srcdir=$ac_top_builddir_sub
28294 ac_abs_top_srcdir=$ac_pwd ;;
28295 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028296 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028297 ac_top_srcdir=$srcdir
28298 ac_abs_top_srcdir=$srcdir ;;
28299 *) # Relative name.
28300 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28301 ac_top_srcdir=$ac_top_build_prefix$srcdir
28302 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028303esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028304ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028305
Martin v. Löwis11437992002-04-12 09:54:03 +000028306
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028307 case $ac_mode in
28308 :F)
28309 #
28310 # CONFIG_FILE
28311 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028312
28313 case $INSTALL in
28314 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028315 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028316 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028317_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028318
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028319cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028320# If the template does not know about datarootdir, expand it.
28321# FIXME: This hack should be removed a few years after 2.60.
28322ac_datarootdir_hack=; ac_datarootdir_seen=
28323
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028324ac_sed_dataroot='
28325/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028326 p
28327 q
28328}
28329/@datadir@/p
28330/@docdir@/p
28331/@infodir@/p
28332/@localedir@/p
28333/@mandir@/p
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028334'
28335case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028336*datarootdir*) ac_datarootdir_seen=yes;;
28337*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028338 { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28339$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028340_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028341cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028342 ac_datarootdir_hack='
28343 s&@datadir@&$datadir&g
28344 s&@docdir@&$docdir&g
28345 s&@infodir@&$infodir&g
28346 s&@localedir@&$localedir&g
28347 s&@mandir@&$mandir&g
28348 s&\\\${datarootdir}&$datarootdir&g' ;;
28349esac
28350_ACEOF
28351
28352# Neutralize VPATH when `$srcdir' = `.'.
28353# Shell code in configure.ac might set extrasub.
28354# FIXME: do we really want to maintain this feature?
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028355cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28356ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028357$extrasub
28358_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028359cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000028360:t
28361/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028362s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028363s&@top_builddir@&$ac_top_builddir_sub&;t t
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028364s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028365s&@srcdir@&$ac_srcdir&;t t
28366s&@abs_srcdir@&$ac_abs_srcdir&;t t
28367s&@top_srcdir@&$ac_top_srcdir&;t t
28368s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28369s&@builddir@&$ac_builddir&;t t
28370s&@abs_builddir@&$ac_abs_builddir&;t t
28371s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28372s&@INSTALL@&$ac_INSTALL&;t t
28373$ac_datarootdir_hack
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028374"
28375eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
28376 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
28377$as_echo "$as_me: error: could not create $ac_file" >&2;}
28378 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028379
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028380test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28381 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28382 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028383 { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028384which seems to be undefined. Please make sure it is defined." >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028385$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028386which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028387
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028388 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028389 case $ac_file in
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028390 -) cat "$tmp/out" && rm -f "$tmp/out";;
28391 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
28392 esac \
28393 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
28394$as_echo "$as_me: error: could not create $ac_file" >&2;}
28395 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028396 ;;
28397 :H)
28398 #
28399 # CONFIG_HEADER
28400 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028401 if test x"$ac_file" != x-; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028402 {
28403 $as_echo "/* $configure_input */" \
28404 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
28405 } >"$tmp/config.h" \
28406 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
28407$as_echo "$as_me: error: could not create $ac_file" >&2;}
28408 { (exit 1); exit 1; }; }
28409 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
28410 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28411$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028412 else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028413 rm -f "$ac_file"
28414 mv "$tmp/config.h" "$ac_file" \
28415 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
28416$as_echo "$as_me: error: could not create $ac_file" >&2;}
28417 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028418 fi
28419 else
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028420 $as_echo "/* $configure_input */" \
28421 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
28422 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
28423$as_echo "$as_me: error: could not create -" >&2;}
28424 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028425 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028426 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028427
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028428
28429 esac
28430
28431done # for ac_tag
28432
Guido van Rossum627b2d71993-12-24 10:39:16 +000028433
Martin v. Löwis11437992002-04-12 09:54:03 +000028434{ (exit 0); exit 0; }
28435_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028436chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028437ac_clean_files=$ac_clean_files_save
28438
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028439test $ac_write_fail = 0 ||
28440 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
28441$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
28442 { (exit 1); exit 1; }; }
28443
Martin v. Löwis11437992002-04-12 09:54:03 +000028444
28445# configure is writing to config.log, and then calls config.status.
28446# config.status does its own redirection, appending to config.log.
28447# Unfortunately, on DOS this fails, as config.log is still kept open
28448# by configure, so config.status won't be able to write to it; its
28449# output is simply discarded. So we exec the FD to /dev/null,
28450# effectively closing config.log, so it can be properly (re)opened and
28451# appended to by config.status. When coming back to configure, we
28452# need to make the FD available again.
28453if test "$no_create" != yes; then
28454 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028455 ac_config_status_args=
28456 test "$silent" = yes &&
28457 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028458 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028459 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028460 exec 5>>config.log
28461 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28462 # would make configure fail if this is the last instruction.
28463 $ac_cs_success || { (exit 1); exit 1; }
28464fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000028465if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
28466 { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
28467$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28468fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028469
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028470
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028471echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028472if test ! -f Modules/Setup
28473then
28474 cp $srcdir/Modules/Setup.dist Modules/Setup
28475fi
28476
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028477echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028478if test ! -f Modules/Setup.local
28479then
28480 echo "# Edit this file for local setup changes" >Modules/Setup.local
28481fi
28482
28483echo "creating Makefile"
28484$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28485 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028486 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028487mv config.c Modules