blob: 38a3e44df709658d6f89a072fbcdbd34319cf760 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002# From configure.in Revision: 80577 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004# Generated by GNU Autoconf 2.63 for python 3.1.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Peterson82af01d2010-05-02 16:45:41 +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=:
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +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.
Benjamin Peterson82af01d2010-05-02 16:45:41 +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 ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +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=:
Benjamin Peterson82af01d2010-05-02 16:45:41 +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=:
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +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.
Benjamin Peterson82af01d2010-05-02 16:45:41 +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" ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000517 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +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'
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000557 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000558 else
559 case $1 in
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000560 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000561 esac;
562 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
563 ???[sx]*):;;*)false;;esac;fi
564 '\'' sh
565 '
566fi
567as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000570as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000571
572# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000573as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000574
575
Martin v. Löwis11437992002-04-12 09:54:03 +0000576
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000577exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000578
579# Name of the host.
580# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
581# so uname gets run too.
582ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
583
Martin v. Löwis11437992002-04-12 09:54:03 +0000584#
585# Initializations.
586#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000589ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000590LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000591cross_compiling=no
592subdirs=
593MFLAGS=
594MAKEFLAGS=
595SHELL=${CONFIG_SHELL-/bin/sh}
596
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000598PACKAGE_NAME='python'
599PACKAGE_TARNAME='python'
Christian Heimes70e5cab2008-12-03 18:18:23 +0000600PACKAGE_VERSION='3.1'
601PACKAGE_STRING='python 3.1'
Georg Brandle2e15612009-05-20 18:25:10 +0000602PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000603
604ac_unique_file="Include/object.h"
605# Factoring default headers for most tests.
606ac_includes_default="\
607#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000608#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <sys/types.h>
610#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000611#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000612# include <sys/stat.h>
613#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000614#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000615# include <stdlib.h>
616# include <stddef.h>
617#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000619# include <stdlib.h>
620# endif
621#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000622#ifdef HAVE_STRING_H
623# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000624# include <memory.h>
625# endif
626# include <string.h>
627#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000628#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000629# include <strings.h>
630#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000631#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000632# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000633#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000634#ifdef HAVE_STDINT_H
635# include <stdint.h>
636#endif
637#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000638# include <unistd.h>
639#endif"
640
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000641ac_subst_vars='LTLIBOBJS
Ronald Oussoren5644eb72009-09-20 20:10:02 +0000642SRCDIRS
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
717LIPO_64BIT_FLAGS
718LIPO_32BIT_FLAGS
719ARCH_RUN_32BIT
720UNIVERSALSDK
721CONFIG_ARGS
722SOVERSION
723VERSION
724target_alias
725host_alias
726build_alias
727LIBS
728ECHO_T
729ECHO_N
730ECHO_C
731DEFS
732mandir
733localedir
734libdir
735psdir
736pdfdir
737dvidir
738htmldir
739infodir
740docdir
741oldincludedir
742includedir
743localstatedir
744sharedstatedir
745sysconfdir
746datadir
747datarootdir
748libexecdir
749sbindir
750bindir
751program_transform_name
752prefix
753exec_prefix
754PACKAGE_BUGREPORT
755PACKAGE_STRING
756PACKAGE_VERSION
757PACKAGE_TARNAME
758PACKAGE_NAME
759PATH_SEPARATOR
760SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000761ac_subst_files=''
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000762ac_user_opts='
763enable_option_checking
764enable_universalsdk
765with_universal_archs
766with_framework_name
767enable_framework
768with_gcc
769with_cxx_main
770with_suffix
771enable_shared
772enable_profiling
773with_pydebug
774with_libs
775with_system_ffi
776with_dbmliborder
777with_signal_module
778with_dec_threads
779with_threads
780with_thread
781with_pth
782enable_ipv6
783with_doc_strings
784with_tsc
785with_pymalloc
786with_wctype_functions
787with_fpectl
788with_libm
789with_libc
790enable_big_digits
791with_wide_unicode
792with_computed_gotos
793'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000794 ac_precious_vars='build_alias
795host_alias
796target_alias
797CC
798CFLAGS
799LDFLAGS
800LIBS
801CPPFLAGS
802CPP'
803
Guido van Rossum627b2d71993-12-24 10:39:16 +0000804
Guido van Rossum7f43da71994-08-01 12:15:30 +0000805# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000806ac_init_help=
807ac_init_version=false
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000808ac_unrecognized_opts=
809ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000810# The variables have the same names as the options, with
811# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000812cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000814no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000815no_recursion=
816prefix=NONE
817program_prefix=NONE
818program_suffix=NONE
819program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000821site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000823verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000824x_includes=NONE
825x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000826
827# Installation directory options.
828# These are left unexpanded so users can "make install exec_prefix=/foo"
829# and all the variables that are supposed to be based on exec_prefix
830# by default will actually change.
831# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000832# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000833bindir='${exec_prefix}/bin'
834sbindir='${exec_prefix}/sbin'
835libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000836datarootdir='${prefix}/share'
837datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000838sysconfdir='${prefix}/etc'
839sharedstatedir='${prefix}/com'
840localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000841includedir='${prefix}/include'
842oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000843docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
844infodir='${datarootdir}/info'
845htmldir='${docdir}'
846dvidir='${docdir}'
847pdfdir='${docdir}'
848psdir='${docdir}'
849libdir='${exec_prefix}/lib'
850localedir='${datarootdir}/locale'
851mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000852
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000854ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000856do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000857 # If the previous option needs an argument, assign it.
858 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000859 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000860 ac_prev=
861 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000862 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000863
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000864 case $ac_option in
865 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
866 *) ac_optarg=yes ;;
867 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000868
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000869 # Accept the important Cygnus configure options, so we can diagnose typos.
870
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000871 case $ac_dashdash$ac_option in
872 --)
873 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000874
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000875 -bindir | --bindir | --bindi | --bind | --bin | --bi)
876 ac_prev=bindir ;;
877 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000878 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000879
880 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000881 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000882 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000883 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000884
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000885 -cache-file | --cache-file | --cache-fil | --cache-fi \
886 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
887 ac_prev=cache_file ;;
888 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
889 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000890 cache_file=$ac_optarg ;;
891
892 --config-cache | -C)
893 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000894
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000896 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000897 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000898 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000899
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000900 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
901 | --dataroo | --dataro | --datar)
902 ac_prev=datarootdir ;;
903 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
904 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
905 datarootdir=$ac_optarg ;;
906
Guido van Rossum7f43da71994-08-01 12:15:30 +0000907 -disable-* | --disable-*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000908 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000909 # Reject names that are not valid shell variable names.
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000910 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
911 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000912 { (exit 1); exit 1; }; }
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000913 ac_useropt_orig=$ac_useropt
914 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
915 case $ac_user_opts in
916 *"
917"enable_$ac_useropt"
918"*) ;;
919 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
920 ac_unrecognized_sep=', ';;
921 esac
922 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000923
924 -docdir | --docdir | --docdi | --doc | --do)
925 ac_prev=docdir ;;
926 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
927 docdir=$ac_optarg ;;
928
929 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
930 ac_prev=dvidir ;;
931 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
932 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000933
934 -enable-* | --enable-*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000935 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000936 # Reject names that are not valid shell variable names.
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000937 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
938 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000939 { (exit 1); exit 1; }; }
Benjamin Peterson82af01d2010-05-02 16:45:41 +0000940 ac_useropt_orig=$ac_useropt
941 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
942 case $ac_user_opts in
943 *"
944"enable_$ac_useropt"
945"*) ;;
946 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
947 ac_unrecognized_sep=', ';;
948 esac
949 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950
Guido van Rossum7f43da71994-08-01 12:15:30 +0000951 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
952 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
953 | --exec | --exe | --ex)
954 ac_prev=exec_prefix ;;
955 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
956 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
957 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000958 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000959
960 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000961 # Obsolete; use --with-gas.
962 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000963
Martin v. Löwis11437992002-04-12 09:54:03 +0000964 -help | --help | --hel | --he | -h)
965 ac_init_help=long ;;
966 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
967 ac_init_help=recursive ;;
968 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
969 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000970
971 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000974 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000975
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000976 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
977 ac_prev=htmldir ;;
978 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
979 | --ht=*)
980 htmldir=$ac_optarg ;;
981
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000982 -includedir | --includedir | --includedi | --included | --include \
983 | --includ | --inclu | --incl | --inc)
984 ac_prev=includedir ;;
985 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
986 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000987 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000988
989 -infodir | --infodir | --infodi | --infod | --info | --inf)
990 ac_prev=infodir ;;
991 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000992 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000993
994 -libdir | --libdir | --libdi | --libd)
995 ac_prev=libdir ;;
996 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000997 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000998
999 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1000 | --libexe | --libex | --libe)
1001 ac_prev=libexecdir ;;
1002 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1003 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001004 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001006 -localedir | --localedir | --localedi | --localed | --locale)
1007 ac_prev=localedir ;;
1008 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1009 localedir=$ac_optarg ;;
1010
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001012 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001013 ac_prev=localstatedir ;;
1014 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001015 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001016 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001017
1018 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1019 ac_prev=mandir ;;
1020 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001021 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001022
Guido van Rossum7f43da71994-08-01 12:15:30 +00001023 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001024 # Obsolete; use --without-fp.
1025 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001026
1027 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001028 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001029 no_create=yes ;;
1030
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001031 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1032 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1033 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001034
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001035 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1036 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1037 | --oldin | --oldi | --old | --ol | --o)
1038 ac_prev=oldincludedir ;;
1039 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1040 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1041 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001042 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001043
Guido van Rossum7f43da71994-08-01 12:15:30 +00001044 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1045 ac_prev=prefix ;;
1046 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001047 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001048
1049 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1050 | --program-pre | --program-pr | --program-p)
1051 ac_prev=program_prefix ;;
1052 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1053 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001054 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001055
1056 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1057 | --program-suf | --program-su | --program-s)
1058 ac_prev=program_suffix ;;
1059 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1060 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001061 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001062
1063 -program-transform-name | --program-transform-name \
1064 | --program-transform-nam | --program-transform-na \
1065 | --program-transform-n | --program-transform- \
1066 | --program-transform | --program-transfor \
1067 | --program-transfo | --program-transf \
1068 | --program-trans | --program-tran \
1069 | --progr-tra | --program-tr | --program-t)
1070 ac_prev=program_transform_name ;;
1071 -program-transform-name=* | --program-transform-name=* \
1072 | --program-transform-nam=* | --program-transform-na=* \
1073 | --program-transform-n=* | --program-transform-=* \
1074 | --program-transform=* | --program-transfor=* \
1075 | --program-transfo=* | --program-transf=* \
1076 | --program-trans=* | --program-tran=* \
1077 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001078 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001079
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001080 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1081 ac_prev=pdfdir ;;
1082 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1083 pdfdir=$ac_optarg ;;
1084
1085 -psdir | --psdir | --psdi | --psd | --ps)
1086 ac_prev=psdir ;;
1087 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1088 psdir=$ac_optarg ;;
1089
Guido van Rossum7f43da71994-08-01 12:15:30 +00001090 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1091 | -silent | --silent | --silen | --sile | --sil)
1092 silent=yes ;;
1093
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001094 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1095 ac_prev=sbindir ;;
1096 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1097 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001098 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001099
1100 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1101 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1102 | --sharedst | --shareds | --shared | --share | --shar \
1103 | --sha | --sh)
1104 ac_prev=sharedstatedir ;;
1105 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1106 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1107 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1108 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001109 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001110
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001111 -site | --site | --sit)
1112 ac_prev=site ;;
1113 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001114 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001115
Guido van Rossum7f43da71994-08-01 12:15:30 +00001116 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1117 ac_prev=srcdir ;;
1118 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001119 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001120
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001121 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1122 | --syscon | --sysco | --sysc | --sys | --sy)
1123 ac_prev=sysconfdir ;;
1124 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1125 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001126 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001127
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 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001131 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001132
1133 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1134 verbose=yes ;;
1135
Martin v. Löwis11437992002-04-12 09:54:03 +00001136 -version | --version | --versio | --versi | --vers | -V)
1137 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001138
1139 -with-* | --with-*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001140 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001141 # Reject names that are not valid shell variable names.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001142 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1143 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001144 { (exit 1); exit 1; }; }
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001145 ac_useropt_orig=$ac_useropt
1146 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1147 case $ac_user_opts in
1148 *"
1149"with_$ac_useropt"
1150"*) ;;
1151 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1152 ac_unrecognized_sep=', ';;
1153 esac
1154 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001155
1156 -without-* | --without-*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001157 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001158 # Reject names that are not valid shell variable names.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001159 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1160 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001161 { (exit 1); exit 1; }; }
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001162 ac_useropt_orig=$ac_useropt
1163 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1164 case $ac_user_opts in
1165 *"
1166"with_$ac_useropt"
1167"*) ;;
1168 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1169 ac_unrecognized_sep=', ';;
1170 esac
1171 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001172
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001173 --x)
1174 # Obsolete; use --with-x.
1175 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001176
1177 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1178 | --x-incl | --x-inc | --x-in | --x-i)
1179 ac_prev=x_includes ;;
1180 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1181 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001182 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001183
1184 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1185 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1186 ac_prev=x_libraries ;;
1187 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1188 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001189 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001190
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001191 -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001192Try \`$0 --help' for more information." >&2
1193 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001194 ;;
1195
Martin v. Löwis11437992002-04-12 09:54:03 +00001196 *=*)
1197 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1198 # Reject names that are not valid shell variable names.
1199 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001200 { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001202 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001203 export $ac_envvar ;;
1204
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001205 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 # FIXME: should be removed in autoconf 3.0.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001207 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001209 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001210 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001211 ;;
1212
1213 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001214done
1215
Guido van Rossum7f43da71994-08-01 12:15:30 +00001216if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001218 { $as_echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001219 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001220fi
1221
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001222if test -n "$ac_unrecognized_opts"; then
1223 case $enable_option_checking in
1224 no) ;;
1225 fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1226 { (exit 1); exit 1; }; } ;;
1227 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1228 esac
1229fi
1230
1231# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001232for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1233 datadir sysconfdir sharedstatedir localstatedir includedir \
1234 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1235 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001236do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001237 eval ac_val=\$$ac_var
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001238 # Remove trailing slashes.
1239 case $ac_val in
1240 */ )
1241 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1242 eval $ac_var=\$ac_val;;
1243 esac
1244 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001245 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001246 [\\/$]* | ?:[\\/]* ) continue;;
1247 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001248 esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001249 { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001250 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001251done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001252
Martin v. Löwis11437992002-04-12 09:54:03 +00001253# There might be people who depend on the old broken behavior: `$host'
1254# used to hold the argument of --host etc.
1255# FIXME: To remove some day.
1256build=$build_alias
1257host=$host_alias
1258target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001259
Martin v. Löwis11437992002-04-12 09:54:03 +00001260# FIXME: To remove some day.
1261if test "x$host_alias" != x; then
1262 if test "x$build_alias" = x; then
1263 cross_compiling=maybe
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001264 $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 +00001265 If a cross compiler is detected then cross compile mode will be used." >&2
1266 elif test "x$build_alias" != "x$host_alias"; then
1267 cross_compiling=yes
1268 fi
1269fi
1270
1271ac_tool_prefix=
1272test -n "$host_alias" && ac_tool_prefix=$host_alias-
1273
1274test "$silent" = yes && exec 6>/dev/null
1275
Guido van Rossum627b2d71993-12-24 10:39:16 +00001276
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001277ac_pwd=`pwd` && test -n "$ac_pwd" &&
1278ac_ls_di=`ls -di .` &&
1279ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001280 { $as_echo "$as_me: error: working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001281 { (exit 1); exit 1; }; }
1282test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001283 { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001284 { (exit 1); exit 1; }; }
1285
1286
Guido van Rossum627b2d71993-12-24 10:39:16 +00001287# Find the source files, if location was not specified.
1288if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001289 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001290 # Try the directory containing this script, then the parent directory.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001291 ac_confdir=`$as_dirname -- "$as_myself" ||
1292$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1293 X"$as_myself" : 'X\(//\)[^/]' \| \
1294 X"$as_myself" : 'X\(//\)$' \| \
1295 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1296$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001297 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1298 s//\1/
1299 q
1300 }
1301 /^X\(\/\/\)[^/].*/{
1302 s//\1/
1303 q
1304 }
1305 /^X\(\/\/\)$/{
1306 s//\1/
1307 q
1308 }
1309 /^X\(\/\).*/{
1310 s//\1/
1311 q
1312 }
1313 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001314 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001315 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001316 srcdir=..
1317 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001318else
1319 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001320fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001321if test ! -r "$srcdir/$ac_unique_file"; then
1322 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001323 { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001324 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001325fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001326ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1327ac_abs_confdir=`(
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001328 cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001329 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001330 pwd)`
1331# When building in place, set srcdir=.
1332if test "$ac_abs_confdir" = "$ac_pwd"; then
1333 srcdir=.
1334fi
1335# Remove unnecessary trailing slashes from srcdir.
1336# Double slashes in file names in object file debugging info
1337# mess up M-x gdb in Emacs.
1338case $srcdir in
1339*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1340esac
1341for ac_var in $ac_precious_vars; do
1342 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1343 eval ac_env_${ac_var}_value=\$${ac_var}
1344 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1345 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1346done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001347
Martin v. Löwis11437992002-04-12 09:54:03 +00001348#
1349# Report the --help message.
1350#
1351if test "$ac_init_help" = "long"; then
1352 # Omit some internal or obsolete options to make the list less imposing.
1353 # This message is too long to be a string in the A/UX 3.1 sh.
1354 cat <<_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001355\`configure' configures python 3.1 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001356
1357Usage: $0 [OPTION]... [VAR=VALUE]...
1358
1359To assign environment variables (e.g., CC, CFLAGS...), specify them as
1360VAR=VALUE. See below for descriptions of some of the useful variables.
1361
1362Defaults for the options are specified in brackets.
1363
1364Configuration:
1365 -h, --help display this help and exit
1366 --help=short display options specific to this package
1367 --help=recursive display the short help of all the included packages
1368 -V, --version display version information and exit
1369 -q, --quiet, --silent do not print \`checking...' messages
1370 --cache-file=FILE cache test results in FILE [disabled]
1371 -C, --config-cache alias for \`--cache-file=config.cache'
1372 -n, --no-create do not create output files
1373 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1374
Martin v. Löwis11437992002-04-12 09:54:03 +00001375Installation directories:
1376 --prefix=PREFIX install architecture-independent files in PREFIX
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001377 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001378 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001379 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001380
1381By default, \`make install' will install all the files in
1382\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1383an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1384for instance \`--prefix=\$HOME'.
1385
1386For better control, use the options below.
1387
1388Fine tuning of the installation directories:
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001389 --bindir=DIR user executables [EPREFIX/bin]
1390 --sbindir=DIR system admin executables [EPREFIX/sbin]
1391 --libexecdir=DIR program executables [EPREFIX/libexec]
1392 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1393 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1394 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1395 --libdir=DIR object code libraries [EPREFIX/lib]
1396 --includedir=DIR C header files [PREFIX/include]
1397 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1398 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1399 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1400 --infodir=DIR info documentation [DATAROOTDIR/info]
1401 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1402 --mandir=DIR man documentation [DATAROOTDIR/man]
1403 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1404 --htmldir=DIR html documentation [DOCDIR]
1405 --dvidir=DIR dvi documentation [DOCDIR]
1406 --pdfdir=DIR pdf documentation [DOCDIR]
1407 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001408_ACEOF
1409
1410 cat <<\_ACEOF
1411_ACEOF
1412fi
1413
1414if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001415 case $ac_init_help in
Christian Heimes70e5cab2008-12-03 18:18:23 +00001416 short | recursive ) echo "Configuration of python 3.1:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001417 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001418 cat <<\_ACEOF
1419
1420Optional Features:
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001421 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001422 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1423 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001424 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001425 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001426 --enable-framework[=INSTALLDIR]
1427 Build (MacOSX|Darwin) framework
1428 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001429 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001430 --enable-ipv6 Enable ipv6 (with ipv4) support
1431 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001432 --enable-big-digits[=BITS]
1433 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001434
1435Optional Packages:
1436 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1437 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001438 --with-universal-archs=ARCH
1439 select architectures for universal build ("32-bit",
Ronald Oussoren856624d2009-09-08 07:13:53 +00001440 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001441 --with-framework-name=FRAMEWORK
1442 specify an alternate name of the framework built
1443 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001444 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001445 --with-cxx-main=<compiler>
1446 compile main() and link python executable with C++
1447 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001448 --with-suffix=.exe set executable suffix
1449 --with-pydebug build with Py_DEBUG defined
1450 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001451 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001452 --with-dbmliborder=db1:db2:...
1453 order to check db backends for dbm. Valid value is a
1454 colon separated string with the backend names
1455 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001456 --with-signal-module disable/enable signal module
1457 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1458 --with(out)-threads[=DIRECTORY]
1459 disable/enable thread support
1460 --with(out)-thread[=DIRECTORY]
1461 deprecated; use --with(out)-threads
1462 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001464 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001465 --with(out)-pymalloc disable/enable specialized mallocs
1466 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001467 --with-fpectl enable SIGFPE catching
1468 --with-libm=STRING math library
1469 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001470 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001471 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1472 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001473
1474Some influential environment variables:
1475 CC C compiler command
1476 CFLAGS C compiler flags
1477 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1478 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001479 LIBS libraries to pass to the linker, e.g. -l<library>
1480 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1481 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001482 CPP C preprocessor
1483
1484Use these variables to override the choices made by `configure' or to help
1485it to find libraries and programs with nonstandard names/locations.
1486
Georg Brandle2e15612009-05-20 18:25:10 +00001487Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001488_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001489ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001490fi
1491
1492if test "$ac_init_help" = "recursive"; then
1493 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001494 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001495 test -d "$ac_dir" ||
1496 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1497 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001498 ac_builddir=.
1499
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001500case "$ac_dir" in
1501.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1502*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001503 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 # A ".." for each directory in $ac_dir_suffix.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001505 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001506 case $ac_top_builddir_sub in
1507 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1508 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1509 esac ;;
1510esac
1511ac_abs_top_builddir=$ac_pwd
1512ac_abs_builddir=$ac_pwd$ac_dir_suffix
1513# for backward compatibility:
1514ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001515
1516case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001518 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001519 ac_top_srcdir=$ac_top_builddir_sub
1520 ac_abs_top_srcdir=$ac_pwd ;;
1521 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001522 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001523 ac_top_srcdir=$srcdir
1524 ac_abs_top_srcdir=$srcdir ;;
1525 *) # Relative name.
1526 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1527 ac_top_srcdir=$ac_top_build_prefix$srcdir
1528 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001529esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001531
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001532 cd "$ac_dir" || { ac_status=$?; continue; }
1533 # Check for guested configure.
1534 if test -f "$ac_srcdir/configure.gnu"; then
1535 echo &&
1536 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1537 elif test -f "$ac_srcdir/configure"; then
1538 echo &&
1539 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001540 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001541 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001542 fi || ac_status=$?
1543 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001544 done
1545fi
1546
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001547test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001548if $ac_init_version; then
1549 cat <<\_ACEOF
Christian Heimes70e5cab2008-12-03 18:18:23 +00001550python configure 3.1
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001551generated by GNU Autoconf 2.63
Martin v. Löwis11437992002-04-12 09:54:03 +00001552
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001553Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015542002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001555This configure script is free software; the Free Software Foundation
1556gives unlimited permission to copy, distribute and modify it.
1557_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001559fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001560cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001561This file contains any messages produced by compilers while
1562running configure, to aid debugging if configure makes a mistake.
1563
Christian Heimes70e5cab2008-12-03 18:18:23 +00001564It was created by python $as_me 3.1, which was
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001565generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001566
1567 $ $0 $@
1568
1569_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001570exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001571{
1572cat <<_ASUNAME
1573## --------- ##
1574## Platform. ##
1575## --------- ##
1576
1577hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1578uname -m = `(uname -m) 2>/dev/null || echo unknown`
1579uname -r = `(uname -r) 2>/dev/null || echo unknown`
1580uname -s = `(uname -s) 2>/dev/null || echo unknown`
1581uname -v = `(uname -v) 2>/dev/null || echo unknown`
1582
1583/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1584/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1585
1586/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1587/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1588/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001589/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001590/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1591/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1592/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1593
1594_ASUNAME
1595
1596as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1597for as_dir in $PATH
1598do
1599 IFS=$as_save_IFS
1600 test -z "$as_dir" && as_dir=.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001601 $as_echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001602done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001603IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001604
1605} >&5
1606
1607cat >&5 <<_ACEOF
1608
1609
1610## ----------- ##
1611## Core tests. ##
1612## ----------- ##
1613
1614_ACEOF
1615
1616
1617# Keep a trace of the command line.
1618# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001619# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001620# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001621# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001622ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001623ac_configure_args0=
1624ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001625ac_must_keep_next=false
1626for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001627do
Skip Montanaro6dead952003-09-25 14:50:04 +00001628 for ac_arg
1629 do
1630 case $ac_arg in
1631 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1632 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1633 | -silent | --silent | --silen | --sile | --sil)
1634 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001635 *\'*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001636 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001637 esac
1638 case $ac_pass in
1639 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1640 2)
1641 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1642 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001643 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001644 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001645 case $ac_arg in
1646 *=* | --config-cache | -C | -disable-* | --disable-* \
1647 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1648 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1649 | -with-* | --with-* | -without-* | --without-* | --x)
1650 case "$ac_configure_args0 " in
1651 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1652 esac
1653 ;;
1654 -* ) ac_must_keep_next=true ;;
1655 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001656 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001657 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001658 ;;
1659 esac
1660 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001661done
Skip Montanaro6dead952003-09-25 14:50:04 +00001662$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1663$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 +00001664
1665# When interrupted or exit'd, cleanup temporary files, and complete
1666# config.log. We remove comments because anyway the quotes in there
1667# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001668# WARNING: Use '\'' to represent an apostrophe within the trap.
1669# 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 +00001670trap 'exit_status=$?
1671 # Save into config.log some information that might help in debugging.
1672 {
1673 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001674
Martin v. Löwis11437992002-04-12 09:54:03 +00001675 cat <<\_ASBOX
1676## ---------------- ##
1677## Cache variables. ##
1678## ---------------- ##
1679_ASBOX
1680 echo
1681 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001682(
1683 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1684 eval ac_val=\$$ac_var
1685 case $ac_val in #(
1686 *${as_nl}*)
1687 case $ac_var in #(
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001688 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1689$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001690 esac
1691 case $ac_var in #(
1692 _ | IFS | as_nl) ;; #(
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001693 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001694 *) $as_unset $ac_var ;;
1695 esac ;;
1696 esac
1697 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001698 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001699 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1700 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001701 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001702 "s/'\''/'\''\\\\'\'''\''/g;
1703 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1704 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001705 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001706 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001707 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001708 esac |
1709 sort
1710)
Martin v. Löwis11437992002-04-12 09:54:03 +00001711 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001712
1713 cat <<\_ASBOX
1714## ----------------- ##
1715## Output variables. ##
1716## ----------------- ##
1717_ASBOX
1718 echo
1719 for ac_var in $ac_subst_vars
1720 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001721 eval ac_val=\$$ac_var
1722 case $ac_val in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001723 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001724 esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001725 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001726 done | sort
1727 echo
1728
1729 if test -n "$ac_subst_files"; then
1730 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001731## ------------------- ##
1732## File substitutions. ##
1733## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001734_ASBOX
1735 echo
1736 for ac_var in $ac_subst_files
1737 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001738 eval ac_val=\$$ac_var
1739 case $ac_val in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001740 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001741 esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001742 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001743 done | sort
1744 echo
1745 fi
1746
Martin v. Löwis11437992002-04-12 09:54:03 +00001747 if test -s confdefs.h; then
1748 cat <<\_ASBOX
1749## ----------- ##
1750## confdefs.h. ##
1751## ----------- ##
1752_ASBOX
1753 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001754 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001755 echo
1756 fi
1757 test "$ac_signal" != 0 &&
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001758 $as_echo "$as_me: caught signal $ac_signal"
1759 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001760 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001761 rm -f core *.core core.conftest.* &&
1762 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001763 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001764' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001765for ac_signal in 1 2 13 15; do
1766 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1767done
1768ac_signal=0
1769
1770# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001771rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001772
1773# Predefined preprocessor variables.
1774
1775cat >>confdefs.h <<_ACEOF
1776#define PACKAGE_NAME "$PACKAGE_NAME"
1777_ACEOF
1778
1779
1780cat >>confdefs.h <<_ACEOF
1781#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1782_ACEOF
1783
1784
1785cat >>confdefs.h <<_ACEOF
1786#define PACKAGE_VERSION "$PACKAGE_VERSION"
1787_ACEOF
1788
1789
1790cat >>confdefs.h <<_ACEOF
1791#define PACKAGE_STRING "$PACKAGE_STRING"
1792_ACEOF
1793
1794
1795cat >>confdefs.h <<_ACEOF
1796#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1797_ACEOF
1798
1799
1800# Let the site file select an alternate cache file if it wants to.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001801# Prefer an explicitly selected file to automatically selected ones.
1802ac_site_file1=NONE
1803ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001804if test -n "$CONFIG_SITE"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001805 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001806elif test "x$prefix" != xNONE; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001807 ac_site_file1=$prefix/share/config.site
1808 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001809else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001810 ac_site_file1=$ac_default_prefix/share/config.site
1811 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001812fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001813for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001814do
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001815 test "x$ac_site_file" = xNONE && continue
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001816 if test -r "$ac_site_file"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001817 { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1818$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001819 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001820 . "$ac_site_file"
1821 fi
1822done
1823
1824if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001825 # Some versions of bash will fail to source /dev/null (special
1826 # files actually), so we avoid doing that.
1827 if test -f "$cache_file"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001828 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1829$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001830 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001831 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1832 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001833 esac
1834 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001835else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001836 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1837$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001838 >$cache_file
1839fi
1840
1841# Check that the precious variables saved in the cache have kept the same
1842# value.
1843ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001844for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001845 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1846 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001847 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1848 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001849 case $ac_old_set,$ac_new_set in
1850 set,)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001851 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1852$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 +00001853 ac_cache_corrupted=: ;;
1854 ,set)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001855 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1856$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001857 ac_cache_corrupted=: ;;
1858 ,);;
1859 *)
1860 if test "x$ac_old_val" != "x$ac_new_val"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001861 # differences in whitespace do not lead to failure.
1862 ac_old_val_w=`echo x $ac_old_val`
1863 ac_new_val_w=`echo x $ac_new_val`
1864 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1865 { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1866$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1867 ac_cache_corrupted=:
1868 else
1869 { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1870$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1871 eval $ac_var=\$ac_old_val
1872 fi
1873 { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1874$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1875 { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1876$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001877 fi;;
1878 esac
1879 # Pass precious variables to config.status.
1880 if test "$ac_new_set" = set; then
1881 case $ac_new_val in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001882 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001883 *) ac_arg=$ac_var=$ac_new_val ;;
1884 esac
1885 case " $ac_configure_args " in
1886 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1887 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1888 esac
1889 fi
1890done
1891if $ac_cache_corrupted; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00001892 { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1893$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1894 { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1895$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1896 { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1897$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 +00001898 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001899fi
1900
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
Guido van Rossum7f43da71994-08-01 12:15:30 +00001925ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001926ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001927ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1928ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1929ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001930
Guido van Rossum627b2d71993-12-24 10:39:16 +00001931
Michael W. Hudson54241132001-12-07 15:38:26 +00001932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001933ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001934
1935
Martin v. Löwis11437992002-04-12 09:54:03 +00001936
Benjamin Petersond23f8222009-04-05 19:13:16 +00001937if test "$prefix" != "/"; then
1938 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1939fi
1940
1941
Martin v. Löwis11437992002-04-12 09:54:03 +00001942
1943
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001944
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001945
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001946# We don't use PACKAGE_ variables, and they cause conflicts
1947# with other autoconf-based packages that include Python.h
1948grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1949rm confdefs.h
1950mv confdefs.h.new confdefs.h
1951
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001952
Christian Heimes70e5cab2008-12-03 18:18:23 +00001953VERSION=3.1
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001954
Martin v. Löwis1142de32002-03-29 16:28:31 +00001955
1956SOVERSION=1.0
1957
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001958# The later defininition of _XOPEN_SOURCE disables certain features
1959# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1960
1961cat >>confdefs.h <<\_ACEOF
1962#define _GNU_SOURCE 1
1963_ACEOF
1964
1965
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001966# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1967# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1968# them.
1969
1970cat >>confdefs.h <<\_ACEOF
1971#define _NETBSD_SOURCE 1
1972_ACEOF
1973
1974
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001975# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1976# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1977# them.
1978
1979cat >>confdefs.h <<\_ACEOF
1980#define __BSD_VISIBLE 1
1981_ACEOF
1982
1983
Martin v. Löwisd6320502004-08-12 13:45:08 +00001984# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1985# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1986
1987cat >>confdefs.h <<\_ACEOF
1988#define _BSD_TYPES 1
1989_ACEOF
1990
1991
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001992# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1993# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1994# them.
1995
1996cat >>confdefs.h <<\_ACEOF
1997#define _DARWIN_C_SOURCE 1
1998_ACEOF
1999
2000
2001
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002002define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002003
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002004# Arguments passed to configure.
2005
2006CONFIG_ARGS="$ac_configure_args"
2007
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002008{ $as_echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
2009$as_echo_n "checking for --enable-universalsdk... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002010# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002011if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002012 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002013 case $enableval in
2014 yes)
2015 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussorend5736812010-02-07 12:04:41 +00002016 if test ! -d "${enableval}"
2017 then
2018 enableval=/
2019 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002020 ;;
2021 esac
2022 case $enableval in
2023 no)
2024 UNIVERSALSDK=
2025 enable_universalsdk=
2026 ;;
2027 *)
2028 UNIVERSALSDK=$enableval
Ronald Oussorend5736812010-02-07 12:04:41 +00002029 if test ! -d "${UNIVERSALSDK}"
2030 then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002031 { { $as_echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
2032$as_echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
Ronald Oussorend5736812010-02-07 12:04:41 +00002033 { (exit 1); exit 1; }; }
2034 fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002035 ;;
2036 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002037
Ronald Oussorend5736812010-02-07 12:04:41 +00002038
Thomas Wouters477c8d52006-05-27 19:21:47 +00002039else
2040
2041 UNIVERSALSDK=
2042 enable_universalsdk=
2043
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002044fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002045
Ronald Oussorend5736812010-02-07 12:04:41 +00002046if test -n "${UNIVERSALSDK}"
2047then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002048 { $as_echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
2049$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussorend5736812010-02-07 12:04:41 +00002050else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002051 { $as_echo "$as_me:$LINENO: result: no" >&5
2052$as_echo "no" >&6; }
Ronald Oussorend5736812010-02-07 12:04:41 +00002053fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002054
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002055
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002056
2057
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002058UNIVERSAL_ARCHS="32-bit"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002059
2060
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002061{ $as_echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
2062$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002063
2064# Check whether --with-universal-archs was given.
2065if test "${with_universal_archs+set}" = set; then
2066 withval=$with_universal_archs;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002067 { $as_echo "$as_me:$LINENO: result: $withval" >&5
2068$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002069 UNIVERSAL_ARCHS="$withval"
2070
2071else
2072
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002073 { $as_echo "$as_me:$LINENO: result: 32-bit" >&5
2074$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002075
2076fi
2077
2078
2079
2080
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002081
2082# Check whether --with-framework-name was given.
2083if test "${with_framework_name+set}" = set; then
2084 withval=$with_framework_name;
2085 PYTHONFRAMEWORK=${withval}
2086 PYTHONFRAMEWORKDIR=${withval}.framework
2087 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2088
2089else
2090
2091 PYTHONFRAMEWORK=Python
2092 PYTHONFRAMEWORKDIR=Python.framework
2093 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2094
2095fi
2096
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002097# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002098if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002099 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002100 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002101 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002102 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002103 esac
2104 case $enableval in
2105 no)
2106 PYTHONFRAMEWORK=
2107 PYTHONFRAMEWORKDIR=no-framework
2108 PYTHONFRAMEWORKPREFIX=
2109 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002110 FRAMEWORKINSTALLFIRST=
2111 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002112 FRAMEWORKALTINSTALLFIRST=
2113 FRAMEWORKALTINSTALLLAST=
2114 if test "x${prefix}" = "xNONE"; then
2115 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2116 else
2117 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2118 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002119 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002120 ;;
2121 *)
2122 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002123 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002124 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002125 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002126 case "${UNIVERSAL_ARCHS}" in
2127 all|3-way|intel)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002128 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00002129 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002130 ;;
2131 *)
Ronald Oussorene3918352009-03-30 18:00:28 +00002132 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002133 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00002134 ;;
2135 esac
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002136
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002137 if test "x${prefix}" = "xNONE" ; then
2138 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2139 else
2140 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2141 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002142 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002143
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002144 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002145 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002146 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002147
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002148 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002149
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002150 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2151
2152 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2153
Jack Jansene578a632001-08-15 01:27:14 +00002154 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002155
Guido van Rossum563e7081996-09-10 18:20:48 +00002156else
Martin v. Löwis11437992002-04-12 09:54:03 +00002157
Jack Jansene578a632001-08-15 01:27:14 +00002158 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002159 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002160 PYTHONFRAMEWORKPREFIX=
2161 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002162 FRAMEWORKINSTALLFIRST=
2163 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002164 FRAMEWORKALTINSTALLFIRST=
2165 FRAMEWORKALTINSTALLLAST=
2166 if test "x${prefix}" = "xNONE" ; then
2167 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2168 else
2169 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2170 fi
Jack Jansene578a632001-08-15 01:27:14 +00002171 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002172
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002173 if test "$UNIVERSAL_ARCHS" = "all"
2174 then
2175 FRAMEWORKINSTALLLAST=update4wayuniversal
2176 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2177 fi
2178
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002179fi
2180
Thomas Wouters477c8d52006-05-27 19:21:47 +00002181
2182
Michael W. Hudson54241132001-12-07 15:38:26 +00002183
2184
2185
2186
Jack Jansene578a632001-08-15 01:27:14 +00002187
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002188
2189
2190
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002191
Jack Jansene578a632001-08-15 01:27:14 +00002192##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002193## AC_HELP_STRING(--with-dyld,
2194## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002195##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002196# Set name for machine-dependent library files
2197
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002198{ $as_echo "$as_me:$LINENO: checking MACHDEP" >&5
2199$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002200if test -z "$MACHDEP"
2201then
Guido van Rossum563e7081996-09-10 18:20:48 +00002202 ac_sys_system=`uname -s`
Benjamin Petersona8332062009-09-11 22:36:27 +00002203 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002204 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002205 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002206 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002207 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002208 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002209 ac_md_system=`echo $ac_sys_system |
2210 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2211 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002212 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002213 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002214
Guido van Rossum07397971997-04-29 21:49:50 +00002215 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002216 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002217 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002218 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002219 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002220 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002221 esac
2222fi
Guido van Rossum91922671997-10-09 20:24:13 +00002223
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002224# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2225# disable features if it is defined, without any means to access these
2226# features as extensions. For these systems, we skip the definition of
2227# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2228# some feature, make sure there is no alternative way to access this
2229# feature. Also, when using wildcards, make sure you have verified the
2230# need for not defining _XOPEN_SOURCE on all systems matching the
2231# wildcard, and that the wildcard does not include future systems
2232# (which may remove their limitations).
2233case $ac_sys_system/$ac_sys_release in
2234 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2235 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002236 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002237 # In addition, Stefan Krah confirms that issue #1244610 exists through
2238 # OpenBSD 4.6, but is fixed in 4.7.
2239 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002240 define_xopen_source=no
2241 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2242 # also defined. This can be overridden by defining _BSD_SOURCE
2243 # As this has a different meaning on Linux, only define it on OpenBSD
2244
2245cat >>confdefs.h <<\_ACEOF
2246#define _BSD_SOURCE 1
2247_ACEOF
2248
2249 ;;
Martin v. Löwis4d0a20a2010-02-15 21:46:27 +00002250 OpenBSD/4.[789])
Martin v. Löwisf6594222010-02-15 08:37:47 +00002251 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2252 # also defined. This can be overridden by defining _BSD_SOURCE
2253 # As this has a different meaning on Linux, only define it on OpenBSD
2254
2255cat >>confdefs.h <<\_ACEOF
2256#define _BSD_SOURCE 1
2257_ACEOF
2258
2259 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002260 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2261 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2262 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002263 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 +00002264 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002265 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2266 # of union __?sigval. Reported by Stuart Bishop.
2267 SunOS/5.6)
2268 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002269 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2270 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002271 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002272 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002273 define_xopen_source=no;;
2274 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002275 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002276 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002277 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002278 # On FreeBSD 4, the math functions C89 does not cover are never defined
2279 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2280 FreeBSD/4.*)
2281 define_xopen_source=no;;
2282 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2283 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2284 # identifies itself as Darwin/7.*
2285 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2286 # disables platform specific features beyond repair.
2287 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2288 # has no effect, don't bother defining them
2289 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002290 define_xopen_source=no;;
Ronald Oussorend4be7a22010-03-09 06:41:58 +00002291 Darwin/1[0-9].*)
Ronald Oussoren095d2822010-03-08 07:03:14 +00002292 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002293 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2294 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2295 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002296 AIX/4)
2297 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002298 AIX/5)
2299 if test `uname -r` -eq 1; then
2300 define_xopen_source=no
2301 fi
2302 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002303 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2304 # defining NI_NUMERICHOST.
2305 QNX/6.3.2)
2306 define_xopen_source=no
2307 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002308
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002309esac
2310
2311if test $define_xopen_source = yes
2312then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002313 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2314 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002315 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2316 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002317 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002318 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002319
2320cat >>confdefs.h <<\_ACEOF
2321#define _XOPEN_SOURCE 500
2322_ACEOF
2323
2324 ;;
2325 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002326
2327cat >>confdefs.h <<\_ACEOF
2328#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002329_ACEOF
2330
Skip Montanarof0d5f792004-08-15 14:08:23 +00002331 ;;
2332 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002333
2334 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2335 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2336 # several APIs are not declared. Since this is also needed in some
2337 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002338 # except for Solaris 10, where it must not be defined,
2339 # as it implies XPG4.2
2340 case $ac_sys_system/$ac_sys_release in
2341 SunOS/5.10)
2342 ;;
2343 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002344
2345cat >>confdefs.h <<\_ACEOF
2346#define _XOPEN_SOURCE_EXTENDED 1
2347_ACEOF
2348
Martin v. Löwis7dece662005-11-26 11:38:24 +00002349 ;;
2350 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002351
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002352
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002353cat >>confdefs.h <<\_ACEOF
2354#define _POSIX_C_SOURCE 200112L
2355_ACEOF
2356
2357
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002358fi
2359
Guido van Rossum91922671997-10-09 20:24:13 +00002360#
2361# SGI compilers allow the specification of the both the ABI and the
2362# ISA on the command line. Depending on the values of these switches,
2363# different and often incompatable code will be generated.
2364#
2365# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2366# thus supply support for various ABI/ISA combinations. The MACHDEP
2367# variable is also adjusted.
2368#
2369
2370if test ! -z "$SGI_ABI"
2371then
2372 CC="cc $SGI_ABI"
2373 LDFLAGS="$SGI_ABI $LDFLAGS"
2374 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2375fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002376{ $as_echo "$as_me:$LINENO: result: $MACHDEP" >&5
2377$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002378
Jack Jansen6b08a402004-06-03 12:41:45 +00002379# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2380# it may influence the way we can build extensions, so distutils
2381# needs to check it
2382
Thomas Wouters477c8d52006-05-27 19:21:47 +00002383
Jack Jansen6b08a402004-06-03 12:41:45 +00002384CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002385EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002386
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002387{ $as_echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2388$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002389ac_sys_machine=`uname -m`
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002390{ $as_echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2391$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002392
Guido van Rossum627b2d71993-12-24 10:39:16 +00002393# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002394
2395# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2396# for debug/optimization stuff. BASECFLAGS is for flags that are required
2397# just to get things to compile and link. Users are free to override OPT
2398# when running configure or make. The build should not break if they do.
2399# BASECFLAGS should generally not be messed with, however.
2400
2401# XXX shouldn't some/most/all of this code be merged with the stuff later
2402# on that fiddles with OPT and BASECFLAGS?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002403{ $as_echo "$as_me:$LINENO: checking for --without-gcc" >&5
2404$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002405
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002406# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002407if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002408 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002409 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002410 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002411 without_gcc=yes;;
2412 yes) CC=gcc
2413 without_gcc=no;;
2414 *) CC=$withval
2415 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002416 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002417else
Martin v. Löwis11437992002-04-12 09:54:03 +00002418
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002419 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002420 AIX*) CC=cc_r
2421 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002422 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002423 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002424fi
2425
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002426{ $as_echo "$as_me:$LINENO: result: $without_gcc" >&5
2427$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002428
Guido van Rossum8b131c51995-03-09 14:10:13 +00002429# If the user switches compilers, we can't believe the cache
2430if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2431then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002432 { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002433(it is also a good idea to do 'make clean' before compiling)" >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002434$as_echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002435(it is also a good idea to do 'make clean' before compiling)" >&2;}
2436 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002437fi
2438
Martin v. Löwis11437992002-04-12 09:54:03 +00002439ac_ext=c
2440ac_cpp='$CPP $CPPFLAGS'
2441ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2442ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2443ac_compiler_gnu=$ac_cv_c_compiler_gnu
2444if test -n "$ac_tool_prefix"; then
2445 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2446set dummy ${ac_tool_prefix}gcc; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002447{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2448$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002449if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002450 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002451else
2452 if test -n "$CC"; then
2453 ac_cv_prog_CC="$CC" # Let the user override the test.
2454else
Martin v. Löwis11437992002-04-12 09:54:03 +00002455as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2456for as_dir in $PATH
2457do
2458 IFS=$as_save_IFS
2459 test -z "$as_dir" && as_dir=.
2460 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002461 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 +00002462 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002463 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 break 2
2465 fi
2466done
2467done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002468IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002469
Jack Jansendd19cf82001-12-06 22:36:17 +00002470fi
2471fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002472CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002473if test -n "$CC"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002474 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2475$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002476else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002477 { $as_echo "$as_me:$LINENO: result: no" >&5
2478$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002479fi
2480
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002481
Martin v. Löwis11437992002-04-12 09:54:03 +00002482fi
2483if test -z "$ac_cv_prog_CC"; then
2484 ac_ct_CC=$CC
2485 # Extract the first word of "gcc", so it can be a program name with args.
2486set dummy gcc; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002487{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2488$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002489if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002490 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002491else
2492 if test -n "$ac_ct_CC"; then
2493 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2494else
2495as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2496for as_dir in $PATH
2497do
2498 IFS=$as_save_IFS
2499 test -z "$as_dir" && as_dir=.
2500 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002501 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 +00002502 ac_cv_prog_ac_ct_CC="gcc"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002503 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002504 break 2
2505 fi
2506done
2507done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002508IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002509
2510fi
2511fi
2512ac_ct_CC=$ac_cv_prog_ac_ct_CC
2513if test -n "$ac_ct_CC"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002514 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2515$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002516else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002517 { $as_echo "$as_me:$LINENO: result: no" >&5
2518$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002519fi
2520
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002521 if test "x$ac_ct_CC" = x; then
2522 CC=""
2523 else
2524 case $cross_compiling:$ac_tool_warned in
2525yes:)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002526{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2527$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002528ac_tool_warned=yes ;;
2529esac
2530 CC=$ac_ct_CC
2531 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002532else
2533 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002534fi
2535
Jack Jansendd19cf82001-12-06 22:36:17 +00002536if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002537 if test -n "$ac_tool_prefix"; then
2538 # 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 +00002539set dummy ${ac_tool_prefix}cc; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002540{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2541$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002542if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002543 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002544else
2545 if test -n "$CC"; then
2546 ac_cv_prog_CC="$CC" # Let the user override the test.
2547else
Martin v. Löwis11437992002-04-12 09:54:03 +00002548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2549for as_dir in $PATH
2550do
2551 IFS=$as_save_IFS
2552 test -z "$as_dir" && as_dir=.
2553 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 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 +00002555 ac_cv_prog_CC="${ac_tool_prefix}cc"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002556 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002557 break 2
2558 fi
2559done
2560done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002561IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002562
2563fi
2564fi
2565CC=$ac_cv_prog_CC
2566if test -n "$CC"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002567 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2568$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002569else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002570 { $as_echo "$as_me:$LINENO: result: no" >&5
2571$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002572fi
2573
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002574
Martin v. Löwis11437992002-04-12 09:54:03 +00002575 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002576fi
2577if test -z "$CC"; then
2578 # Extract the first word of "cc", so it can be a program name with args.
2579set dummy cc; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002580{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2581$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002582if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002583 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002584else
2585 if test -n "$CC"; then
2586 ac_cv_prog_CC="$CC" # Let the user override the test.
2587else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002588 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2590for as_dir in $PATH
2591do
2592 IFS=$as_save_IFS
2593 test -z "$as_dir" && as_dir=.
2594 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002595 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 +00002596 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2597 ac_prog_rejected=yes
2598 continue
2599 fi
2600 ac_cv_prog_CC="cc"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002601 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002602 break 2
2603 fi
2604done
2605done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002606IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002607
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002608if test $ac_prog_rejected = yes; then
2609 # We found a bogon in the path, so make sure we never use it.
2610 set dummy $ac_cv_prog_CC
2611 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002612 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002613 # We chose a different compiler from the bogus one.
2614 # However, it has the same basename, so the bogon will be chosen
2615 # first if we set CC to just the basename; use the full file name.
2616 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002617 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002618 fi
2619fi
2620fi
2621fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002622CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002623if test -n "$CC"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002624 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2625$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002626else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002627 { $as_echo "$as_me:$LINENO: result: no" >&5
2628$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002629fi
2630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002631
Martin v. Löwis11437992002-04-12 09:54:03 +00002632fi
2633if test -z "$CC"; then
2634 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002635 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002636 do
2637 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2638set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002639{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2640$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002641if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002642 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002643else
2644 if test -n "$CC"; then
2645 ac_cv_prog_CC="$CC" # Let the user override the test.
2646else
Martin v. Löwis11437992002-04-12 09:54:03 +00002647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2648for as_dir in $PATH
2649do
2650 IFS=$as_save_IFS
2651 test -z "$as_dir" && as_dir=.
2652 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002653 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 +00002654 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002655 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002656 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002657 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002658done
2659done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002660IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002661
2662fi
2663fi
2664CC=$ac_cv_prog_CC
2665if test -n "$CC"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002666 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2667$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002668else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002669 { $as_echo "$as_me:$LINENO: result: no" >&5
2670$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002671fi
2672
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002673
Martin v. Löwis11437992002-04-12 09:54:03 +00002674 test -n "$CC" && break
2675 done
2676fi
2677if test -z "$CC"; then
2678 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002679 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002680do
2681 # Extract the first word of "$ac_prog", so it can be a program name with args.
2682set dummy $ac_prog; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002683{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2684$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002685if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002686 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002687else
2688 if test -n "$ac_ct_CC"; then
2689 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2690else
2691as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2692for as_dir in $PATH
2693do
2694 IFS=$as_save_IFS
2695 test -z "$as_dir" && as_dir=.
2696 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002697 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 +00002698 ac_cv_prog_ac_ct_CC="$ac_prog"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002699 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002700 break 2
2701 fi
2702done
2703done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002704IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002705
Martin v. Löwis11437992002-04-12 09:54:03 +00002706fi
2707fi
2708ac_ct_CC=$ac_cv_prog_ac_ct_CC
2709if test -n "$ac_ct_CC"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002710 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2711$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002712else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002713 { $as_echo "$as_me:$LINENO: result: no" >&5
2714$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002715fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002716
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002717
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 test -n "$ac_ct_CC" && break
2719done
Michael W. Hudson54241132001-12-07 15:38:26 +00002720
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002721 if test "x$ac_ct_CC" = x; then
2722 CC=""
2723 else
2724 case $cross_compiling:$ac_tool_warned in
2725yes:)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002726{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2727$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002728ac_tool_warned=yes ;;
2729esac
2730 CC=$ac_ct_CC
2731 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002732fi
2733
2734fi
2735
2736
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002737test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2738$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2739{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002740See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002741$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002742See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002743 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002744
2745# Provide some information about the compiler.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002746$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2747set X $ac_compile
2748ac_compiler=$2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002749{ (ac_try="$ac_compiler --version >&5"
2750case "(($ac_try" in
2751 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2752 *) ac_try_echo=$ac_try;;
2753esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002754eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2755$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002756 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002757 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002758 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002759 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002760{ (ac_try="$ac_compiler -v >&5"
2761case "(($ac_try" in
2762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2763 *) ac_try_echo=$ac_try;;
2764esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002765eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2766$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002767 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002768 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002769 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002770 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002771{ (ac_try="$ac_compiler -V >&5"
2772case "(($ac_try" in
2773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2774 *) ac_try_echo=$ac_try;;
2775esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002776eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2777$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002778 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002779 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002780 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002781 (exit $ac_status); }
2782
2783cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002784/* confdefs.h. */
2785_ACEOF
2786cat confdefs.h >>conftest.$ac_ext
2787cat >>conftest.$ac_ext <<_ACEOF
2788/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002789
Martin v. Löwis11437992002-04-12 09:54:03 +00002790int
2791main ()
2792{
2793
2794 ;
2795 return 0;
2796}
2797_ACEOF
2798ac_clean_files_save=$ac_clean_files
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002799ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002800# Try to create an executable without -o first, disregard a.out.
2801# It will help us diagnose broken compilers, and finding out an intuition
2802# of exeext.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002803{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2804$as_echo_n "checking for C compiler default output file name... " >&6; }
2805ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2806
2807# The possible output files:
2808ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2809
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002810ac_rmfiles=
2811for ac_file in $ac_files
2812do
2813 case $ac_file in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002814 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002815 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2816 esac
2817done
2818rm -f $ac_rmfiles
2819
2820if { (ac_try="$ac_link_default"
2821case "(($ac_try" in
2822 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2823 *) ac_try_echo=$ac_try;;
2824esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002825eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2826$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002827 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002828 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002829 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002830 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002831 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2832# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2833# in a Makefile. We should not override ac_cv_exeext if it was cached,
2834# so that the user can short-circuit this test for compilers unknown to
2835# Autoconf.
2836for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002837do
2838 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002839 case $ac_file in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002840 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002841 ;;
2842 [ab].out )
2843 # We found the default executable, but exeext='' is most
2844 # certainly right.
2845 break;;
2846 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002847 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2848 then :; else
2849 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2850 fi
2851 # We set ac_cv_exeext here because the later test for it is not
2852 # safe: cross compilers may not add the suffix if given an `-o'
2853 # argument, so we may need to know it at that point already.
2854 # Even if this section looks crufty: it has the advantage of
2855 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002856 break;;
2857 * )
2858 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002859 esac
2860done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002861test "$ac_cv_exeext" = no && ac_cv_exeext=
2862
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002863else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002864 ac_file=''
2865fi
2866
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002867{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2868$as_echo "$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002869if test -z "$ac_file"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002870 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002871sed 's/^/| /' conftest.$ac_ext >&5
2872
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002873{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2875{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002876See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002877$as_echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002878See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002879 { (exit 77); exit 77; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002880fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002881
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002882ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002883
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002884# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002885# the compiler is broken, or we cross compile.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002886{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2887$as_echo_n "checking whether the C compiler works... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002888# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2889# If not cross compiling, check that we can run a simple program.
2890if test "$cross_compiling" != yes; then
2891 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002892 { (case "(($ac_try" in
2893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2894 *) ac_try_echo=$ac_try;;
2895esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002896eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2897$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002898 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002899 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002900 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002901 (exit $ac_status); }; }; then
2902 cross_compiling=no
2903 else
2904 if test "$cross_compiling" = maybe; then
2905 cross_compiling=yes
2906 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002907 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2909{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002910If you meant to cross compile, use \`--host'.
2911See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002912$as_echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002913If you meant to cross compile, use \`--host'.
2914See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002915 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002916 fi
2917 fi
2918fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002919{ $as_echo "$as_me:$LINENO: result: yes" >&5
2920$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002921
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002922rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002923ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002924# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002925# the compiler is broken, or we cross compile.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002926{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2927$as_echo_n "checking whether we are cross compiling... " >&6; }
2928{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
2929$as_echo "$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002930
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002931{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
2932$as_echo_n "checking for suffix of executables... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002933if { (ac_try="$ac_link"
2934case "(($ac_try" in
2935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2936 *) ac_try_echo=$ac_try;;
2937esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002938eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2939$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002940 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002941 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002942 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002943 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002944 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2945# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2946# work properly (i.e., refer to `conftest.exe'), while it won't with
2947# `rm'.
2948for ac_file in conftest.exe conftest conftest.*; do
2949 test -f "$ac_file" || continue
2950 case $ac_file in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002951 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002952 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2953 break;;
2954 * ) break;;
2955 esac
2956done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002957else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002958 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2959$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2960{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002961See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002962$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002963See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002964 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002965fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002966
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002967rm -f conftest$ac_cv_exeext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002968{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2969$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002970
2971rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002972EXEEXT=$ac_cv_exeext
2973ac_exeext=$EXEEXT
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002974{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
2975$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002976if test "${ac_cv_objext+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00002977 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002978else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002979 cat >conftest.$ac_ext <<_ACEOF
2980/* confdefs.h. */
2981_ACEOF
2982cat confdefs.h >>conftest.$ac_ext
2983cat >>conftest.$ac_ext <<_ACEOF
2984/* end confdefs.h. */
2985
2986int
2987main ()
2988{
2989
2990 ;
2991 return 0;
2992}
2993_ACEOF
2994rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002995if { (ac_try="$ac_compile"
2996case "(($ac_try" in
2997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2998 *) ac_try_echo=$ac_try;;
2999esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003000eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3001$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003002 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003003 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003004 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003005 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003006 for ac_file in conftest.o conftest.obj conftest.*; do
3007 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003008 case $ac_file in
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003009 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003010 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3011 break;;
3012 esac
3013done
3014else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003015 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003016sed 's/^/| /' conftest.$ac_ext >&5
3017
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003018{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3020{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00003021See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003022$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00003023See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003024 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003025fi
3026
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00003027rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003028fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003029{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3030$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003031OBJEXT=$ac_cv_objext
3032ac_objext=$OBJEXT
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003033{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3034$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003035if test "${ac_cv_c_compiler_gnu+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003036 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003037else
3038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003039/* confdefs.h. */
3040_ACEOF
3041cat confdefs.h >>conftest.$ac_ext
3042cat >>conftest.$ac_ext <<_ACEOF
3043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003044
Martin v. Löwis11437992002-04-12 09:54:03 +00003045int
3046main ()
3047{
3048#ifndef __GNUC__
3049 choke me
3050#endif
3051
3052 ;
3053 return 0;
3054}
3055_ACEOF
3056rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003057if { (ac_try="$ac_compile"
3058case "(($ac_try" in
3059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3060 *) ac_try_echo=$ac_try;;
3061esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003062eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3063$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003064 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003066 grep -v '^ *+' conftest.er1 >conftest.err
3067 rm -f conftest.er1
3068 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003069 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003070 (exit $ac_status); } && {
3071 test -z "$ac_c_werror_flag" ||
3072 test ! -s conftest.err
3073 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003074 ac_compiler_gnu=yes
3075else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003076 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003077sed 's/^/| /' conftest.$ac_ext >&5
3078
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003080fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003081
3082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003083ac_cv_c_compiler_gnu=$ac_compiler_gnu
3084
3085fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003086{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3087$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3088if test $ac_compiler_gnu = yes; then
3089 GCC=yes
3090else
3091 GCC=
3092fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003093ac_test_CFLAGS=${CFLAGS+set}
3094ac_save_CFLAGS=$CFLAGS
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003095{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3096$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003097if test "${ac_cv_prog_cc_g+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003098 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003099else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003100 ac_save_c_werror_flag=$ac_c_werror_flag
3101 ac_c_werror_flag=yes
3102 ac_cv_prog_cc_g=no
3103 CFLAGS="-g"
3104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003105/* confdefs.h. */
3106_ACEOF
3107cat confdefs.h >>conftest.$ac_ext
3108cat >>conftest.$ac_ext <<_ACEOF
3109/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003110
Martin v. Löwis11437992002-04-12 09:54:03 +00003111int
3112main ()
3113{
3114
3115 ;
3116 return 0;
3117}
3118_ACEOF
3119rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003120if { (ac_try="$ac_compile"
3121case "(($ac_try" in
3122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3123 *) ac_try_echo=$ac_try;;
3124esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003125eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3126$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003127 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003128 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003129 grep -v '^ *+' conftest.er1 >conftest.err
3130 rm -f conftest.er1
3131 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003132 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003133 (exit $ac_status); } && {
3134 test -z "$ac_c_werror_flag" ||
3135 test ! -s conftest.err
3136 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003137 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003138else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003139 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003140sed 's/^/| /' conftest.$ac_ext >&5
3141
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003142 CFLAGS=""
3143 cat >conftest.$ac_ext <<_ACEOF
3144/* confdefs.h. */
3145_ACEOF
3146cat confdefs.h >>conftest.$ac_ext
3147cat >>conftest.$ac_ext <<_ACEOF
3148/* end confdefs.h. */
3149
3150int
3151main ()
3152{
3153
3154 ;
3155 return 0;
3156}
3157_ACEOF
3158rm -f conftest.$ac_objext
3159if { (ac_try="$ac_compile"
3160case "(($ac_try" in
3161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3162 *) ac_try_echo=$ac_try;;
3163esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003164eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3165$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003166 (eval "$ac_compile") 2>conftest.er1
3167 ac_status=$?
3168 grep -v '^ *+' conftest.er1 >conftest.err
3169 rm -f conftest.er1
3170 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003171 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003172 (exit $ac_status); } && {
3173 test -z "$ac_c_werror_flag" ||
3174 test ! -s conftest.err
3175 } && test -s conftest.$ac_objext; then
3176 :
3177else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003178 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003179sed 's/^/| /' conftest.$ac_ext >&5
3180
3181 ac_c_werror_flag=$ac_save_c_werror_flag
3182 CFLAGS="-g"
3183 cat >conftest.$ac_ext <<_ACEOF
3184/* confdefs.h. */
3185_ACEOF
3186cat confdefs.h >>conftest.$ac_ext
3187cat >>conftest.$ac_ext <<_ACEOF
3188/* end confdefs.h. */
3189
3190int
3191main ()
3192{
3193
3194 ;
3195 return 0;
3196}
3197_ACEOF
3198rm -f conftest.$ac_objext
3199if { (ac_try="$ac_compile"
3200case "(($ac_try" in
3201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3202 *) ac_try_echo=$ac_try;;
3203esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003204eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3205$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003206 (eval "$ac_compile") 2>conftest.er1
3207 ac_status=$?
3208 grep -v '^ *+' conftest.er1 >conftest.err
3209 rm -f conftest.er1
3210 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003211 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003212 (exit $ac_status); } && {
3213 test -z "$ac_c_werror_flag" ||
3214 test ! -s conftest.err
3215 } && test -s conftest.$ac_objext; then
3216 ac_cv_prog_cc_g=yes
3217else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003218 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003219sed 's/^/| /' conftest.$ac_ext >&5
3220
3221
Guido van Rossum627b2d71993-12-24 10:39:16 +00003222fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003223
3224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003226
3227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3228fi
3229
3230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3231 ac_c_werror_flag=$ac_save_c_werror_flag
3232fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003233{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3234$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003235if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003236 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003237elif test $ac_cv_prog_cc_g = yes; then
3238 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003239 CFLAGS="-g -O2"
3240 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003241 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003242 fi
3243else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003244 if test "$GCC" = yes; then
3245 CFLAGS="-O2"
3246 else
3247 CFLAGS=
3248 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003249fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003250{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3251$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003252if test "${ac_cv_prog_cc_c89+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003253 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003254else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003255 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003256ac_save_CC=$CC
3257cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003258/* confdefs.h. */
3259_ACEOF
3260cat confdefs.h >>conftest.$ac_ext
3261cat >>conftest.$ac_ext <<_ACEOF
3262/* end confdefs.h. */
3263#include <stdarg.h>
3264#include <stdio.h>
3265#include <sys/types.h>
3266#include <sys/stat.h>
3267/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3268struct buf { int x; };
3269FILE * (*rcsopen) (struct buf *, struct stat *, int);
3270static char *e (p, i)
3271 char **p;
3272 int i;
3273{
3274 return p[i];
3275}
3276static char *f (char * (*g) (char **, int), char **p, ...)
3277{
3278 char *s;
3279 va_list v;
3280 va_start (v,p);
3281 s = g (p, va_arg (v,int));
3282 va_end (v);
3283 return s;
3284}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003285
3286/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3287 function prototypes and stuff, but not '\xHH' hex character constants.
3288 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003289 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003290 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3291 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003292 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003293int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3294
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003295/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3296 inside strings and character constants. */
3297#define FOO(x) 'x'
3298int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3299
Skip Montanaro6dead952003-09-25 14:50:04 +00003300int test (int i, double x);
3301struct s1 {int (*f) (int a);};
3302struct s2 {int (*f) (double a);};
3303int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3304int argc;
3305char **argv;
3306int
3307main ()
3308{
3309return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3310 ;
3311 return 0;
3312}
3313_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003314for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3315 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003316do
3317 CC="$ac_save_CC $ac_arg"
3318 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319if { (ac_try="$ac_compile"
3320case "(($ac_try" in
3321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3322 *) ac_try_echo=$ac_try;;
3323esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003324eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3325$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003326 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003328 grep -v '^ *+' conftest.er1 >conftest.err
3329 rm -f conftest.er1
3330 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003331 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003332 (exit $ac_status); } && {
3333 test -z "$ac_c_werror_flag" ||
3334 test ! -s conftest.err
3335 } && test -s conftest.$ac_objext; then
3336 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003337else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003338 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003339sed 's/^/| /' conftest.$ac_ext >&5
3340
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003341
Skip Montanaro6dead952003-09-25 14:50:04 +00003342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003343
3344rm -f core conftest.err conftest.$ac_objext
3345 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003346done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003347rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003348CC=$ac_save_CC
3349
3350fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003351# AC_CACHE_VAL
3352case "x$ac_cv_prog_cc_c89" in
3353 x)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003354 { $as_echo "$as_me:$LINENO: result: none needed" >&5
3355$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003356 xno)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003357 { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3358$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003359 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003360 CC="$CC $ac_cv_prog_cc_c89"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003361 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3362$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003363esac
3364
Skip Montanaro6dead952003-09-25 14:50:04 +00003365
Martin v. Löwis11437992002-04-12 09:54:03 +00003366ac_ext=c
3367ac_cpp='$CPP $CPPFLAGS'
3368ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3369ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3370ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003371
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003372
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003373
3374
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003375{ $as_echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3376$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003377
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003378# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003379if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003380 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003381
3382 case $withval in
3383 no) with_cxx_main=no
3384 MAINCC='$(CC)';;
3385 yes) with_cxx_main=yes
3386 MAINCC='$(CXX)';;
3387 *) with_cxx_main=yes
3388 MAINCC=$withval
3389 if test -z "$CXX"
3390 then
3391 CXX=$withval
3392 fi;;
3393 esac
3394else
3395
3396 with_cxx_main=no
3397 MAINCC='$(CC)'
3398
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003399fi
3400
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003401{ $as_echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3402$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003403
3404preset_cxx="$CXX"
3405if test -z "$CXX"
3406then
3407 case "$CC" in
3408 gcc) # Extract the first word of "g++", so it can be a program name with args.
3409set dummy g++; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003410{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3411$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003412if test "${ac_cv_path_CXX+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003413 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003414else
3415 case $CXX in
3416 [\\/]* | ?:[\\/]*)
3417 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3418 ;;
3419 *)
3420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3421for as_dir in notfound
3422do
3423 IFS=$as_save_IFS
3424 test -z "$as_dir" && as_dir=.
3425 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003426 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 +00003427 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003428 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003429 break 2
3430 fi
3431done
3432done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003434
3435 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3436 ;;
3437esac
3438fi
3439CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003440if test -n "$CXX"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003441 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3442$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003443else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003444 { $as_echo "$as_me:$LINENO: result: no" >&5
3445$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003448 ;;
3449 cc) # Extract the first word of "c++", so it can be a program name with args.
3450set dummy c++; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003451{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3452$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003453if test "${ac_cv_path_CXX+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003454 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003455else
3456 case $CXX in
3457 [\\/]* | ?:[\\/]*)
3458 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3459 ;;
3460 *)
3461 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3462for as_dir in notfound
3463do
3464 IFS=$as_save_IFS
3465 test -z "$as_dir" && as_dir=.
3466 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003467 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 +00003468 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003469 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003470 break 2
3471 fi
3472done
3473done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003474IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003475
3476 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3477 ;;
3478esac
3479fi
3480CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003481if test -n "$CXX"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003482 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3483$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003484else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003485 { $as_echo "$as_me:$LINENO: result: no" >&5
3486$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003487fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003488
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003489 ;;
3490 esac
3491 if test "$CXX" = "notfound"
3492 then
3493 CXX=""
3494 fi
3495fi
3496if test -z "$CXX"
3497then
3498 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3499do
3500 # Extract the first word of "$ac_prog", so it can be a program name with args.
3501set dummy $ac_prog; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003502{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3503$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003504if test "${ac_cv_prog_CXX+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003505 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003506else
3507 if test -n "$CXX"; then
3508 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3509else
3510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3511for as_dir in $PATH
3512do
3513 IFS=$as_save_IFS
3514 test -z "$as_dir" && as_dir=.
3515 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003516 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 +00003517 ac_cv_prog_CXX="$ac_prog"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003518 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003519 break 2
3520 fi
3521done
3522done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003523IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003524
3525fi
3526fi
3527CXX=$ac_cv_prog_CXX
3528if test -n "$CXX"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003529 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3530$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003531else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003532 { $as_echo "$as_me:$LINENO: result: no" >&5
3533$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003534fi
3535
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003536
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003537 test -n "$CXX" && break
3538done
3539test -n "$CXX" || CXX="notfound"
3540
3541 if test "$CXX" = "notfound"
3542 then
3543 CXX=""
3544 fi
3545fi
3546if test "$preset_cxx" != "$CXX"
3547then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003548 { $as_echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003549
3550 By default, distutils will build C++ extension modules with \"$CXX\".
3551 If this is not intended, then set CXX on the configure command line.
3552 " >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003553$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003554
3555 By default, distutils will build C++ extension modules with \"$CXX\".
3556 If this is not intended, then set CXX on the configure command line.
3557 " >&2;}
3558fi
3559
3560
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003561# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003562
3563ac_ext=c
3564ac_cpp='$CPP $CPPFLAGS'
3565ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3566ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3567ac_compiler_gnu=$ac_cv_c_compiler_gnu
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003568{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3569$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003570# On Suns, sometimes $CPP names a directory.
3571if test -n "$CPP" && test -d "$CPP"; then
3572 CPP=
3573fi
3574if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003575 if test "${ac_cv_prog_CPP+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003576 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003577else
Martin v. Löwis11437992002-04-12 09:54:03 +00003578 # Double quotes because CPP needs to be expanded
3579 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3580 do
3581 ac_preproc_ok=false
3582for ac_c_preproc_warn_flag in '' yes
3583do
3584 # Use a header file that comes with gcc, so configuring glibc
3585 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003586 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3587 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003588 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003589 # not just through cpp. "Syntax error" is here to catch this case.
3590 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003591/* confdefs.h. */
3592_ACEOF
3593cat confdefs.h >>conftest.$ac_ext
3594cat >>conftest.$ac_ext <<_ACEOF
3595/* end confdefs.h. */
3596#ifdef __STDC__
3597# include <limits.h>
3598#else
3599# include <assert.h>
3600#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003601 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003602_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003603if { (ac_try="$ac_cpp conftest.$ac_ext"
3604case "(($ac_try" in
3605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3606 *) ac_try_echo=$ac_try;;
3607esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003608eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3609$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003610 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003611 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003612 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003613 rm -f conftest.er1
3614 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003615 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003616 (exit $ac_status); } >/dev/null && {
3617 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3618 test ! -s conftest.err
3619 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003620 :
3621else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003622 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003623sed 's/^/| /' conftest.$ac_ext >&5
3624
Martin v. Löwis11437992002-04-12 09:54:03 +00003625 # Broken: fails on valid input.
3626continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003628
Martin v. Löwis11437992002-04-12 09:54:03 +00003629rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003630
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003631 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003632 # can be detected and how.
3633 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003634/* confdefs.h. */
3635_ACEOF
3636cat confdefs.h >>conftest.$ac_ext
3637cat >>conftest.$ac_ext <<_ACEOF
3638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003639#include <ac_nonexistent.h>
3640_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003641if { (ac_try="$ac_cpp conftest.$ac_ext"
3642case "(($ac_try" in
3643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3644 *) ac_try_echo=$ac_try;;
3645esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003646eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3647$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003648 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003649 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003650 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003651 rm -f conftest.er1
3652 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003653 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003654 (exit $ac_status); } >/dev/null && {
3655 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3656 test ! -s conftest.err
3657 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003658 # Broken: success on invalid input.
3659continue
3660else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003661 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003662sed 's/^/| /' conftest.$ac_ext >&5
3663
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 # Passes both tests.
3665ac_preproc_ok=:
3666break
3667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003668
Martin v. Löwis11437992002-04-12 09:54:03 +00003669rm -f conftest.err conftest.$ac_ext
3670
3671done
3672# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3673rm -f conftest.err conftest.$ac_ext
3674if $ac_preproc_ok; then
3675 break
3676fi
3677
3678 done
3679 ac_cv_prog_CPP=$CPP
3680
3681fi
3682 CPP=$ac_cv_prog_CPP
3683else
3684 ac_cv_prog_CPP=$CPP
3685fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003686{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
3687$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003688ac_preproc_ok=false
3689for ac_c_preproc_warn_flag in '' yes
3690do
3691 # Use a header file that comes with gcc, so configuring glibc
3692 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003693 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3694 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003695 # On the NeXT, cc -E runs the code through the compiler's parser,
3696 # not just through cpp. "Syntax error" is here to catch this case.
3697 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003698/* confdefs.h. */
3699_ACEOF
3700cat confdefs.h >>conftest.$ac_ext
3701cat >>conftest.$ac_ext <<_ACEOF
3702/* end confdefs.h. */
3703#ifdef __STDC__
3704# include <limits.h>
3705#else
3706# include <assert.h>
3707#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003708 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003709_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003710if { (ac_try="$ac_cpp conftest.$ac_ext"
3711case "(($ac_try" in
3712 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3713 *) ac_try_echo=$ac_try;;
3714esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003715eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3716$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003717 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003718 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003719 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003720 rm -f conftest.er1
3721 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003722 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003723 (exit $ac_status); } >/dev/null && {
3724 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3725 test ! -s conftest.err
3726 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003727 :
3728else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003729 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003730sed 's/^/| /' conftest.$ac_ext >&5
3731
Martin v. Löwis11437992002-04-12 09:54:03 +00003732 # Broken: fails on valid input.
3733continue
3734fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003735
Martin v. Löwis11437992002-04-12 09:54:03 +00003736rm -f conftest.err conftest.$ac_ext
3737
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003738 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003739 # can be detected and how.
3740 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003741/* confdefs.h. */
3742_ACEOF
3743cat confdefs.h >>conftest.$ac_ext
3744cat >>conftest.$ac_ext <<_ACEOF
3745/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003746#include <ac_nonexistent.h>
3747_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003748if { (ac_try="$ac_cpp conftest.$ac_ext"
3749case "(($ac_try" in
3750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3751 *) ac_try_echo=$ac_try;;
3752esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003753eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3754$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003755 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003756 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003757 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003758 rm -f conftest.er1
3759 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003760 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761 (exit $ac_status); } >/dev/null && {
3762 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3763 test ! -s conftest.err
3764 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003765 # Broken: success on invalid input.
3766continue
3767else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003768 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003769sed 's/^/| /' conftest.$ac_ext >&5
3770
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 # Passes both tests.
3772ac_preproc_ok=:
3773break
3774fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003775
Martin v. Löwis11437992002-04-12 09:54:03 +00003776rm -f conftest.err conftest.$ac_ext
3777
3778done
3779# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3780rm -f conftest.err conftest.$ac_ext
3781if $ac_preproc_ok; then
3782 :
3783else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003784 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3785$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3786{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003787See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003788$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003789See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003790 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003791fi
3792
3793ac_ext=c
3794ac_cpp='$CPP $CPPFLAGS'
3795ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3796ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3797ac_compiler_gnu=$ac_cv_c_compiler_gnu
3798
3799
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003800{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3801$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003802if test "${ac_cv_path_GREP+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003803 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003804else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003805 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806 ac_path_GREP_found=false
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003807 # Loop through the user's path and test for each of PROGNAME-LIST
3808 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003809for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3810do
3811 IFS=$as_save_IFS
3812 test -z "$as_dir" && as_dir=.
3813 for ac_prog in grep ggrep; do
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003814 for ac_exec_ext in '' $ac_executable_extensions; do
3815 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3816 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3817# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818 # Check for GNU $ac_path_GREP
3819case `"$ac_path_GREP" --version 2>&1` in
3820*GNU*)
3821 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3822*)
3823 ac_count=0
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003824 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003825 while :
3826 do
3827 cat "conftest.in" "conftest.in" >"conftest.tmp"
3828 mv "conftest.tmp" "conftest.in"
3829 cp "conftest.in" "conftest.nl"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003830 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003831 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3832 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3833 ac_count=`expr $ac_count + 1`
3834 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3835 # Best one so far, save it but keep looking for a better one
3836 ac_cv_path_GREP="$ac_path_GREP"
3837 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003838 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003839 # 10*(2^10) chars as input seems more than enough
3840 test $ac_count -gt 10 && break
3841 done
3842 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3843esac
3844
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003845 $ac_path_GREP_found && break 3
3846 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003847 done
3848done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003849IFS=$as_save_IFS
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003850 if test -z "$ac_cv_path_GREP"; then
3851 { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3852$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 +00003853 { (exit 1); exit 1; }; }
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003854 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003855else
3856 ac_cv_path_GREP=$GREP
3857fi
3858
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003859fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003860{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3861$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003862 GREP="$ac_cv_path_GREP"
3863
3864
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003865{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
3866$as_echo_n "checking for egrep... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003867if test "${ac_cv_path_EGREP+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003868 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003869else
3870 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3871 then ac_cv_path_EGREP="$GREP -E"
3872 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003873 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 ac_path_EGREP_found=false
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003875 # Loop through the user's path and test for each of PROGNAME-LIST
3876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003877for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3878do
3879 IFS=$as_save_IFS
3880 test -z "$as_dir" && as_dir=.
3881 for ac_prog in egrep; do
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003882 for ac_exec_ext in '' $ac_executable_extensions; do
3883 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3884 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3885# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886 # Check for GNU $ac_path_EGREP
3887case `"$ac_path_EGREP" --version 2>&1` in
3888*GNU*)
3889 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3890*)
3891 ac_count=0
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003892 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003893 while :
3894 do
3895 cat "conftest.in" "conftest.in" >"conftest.tmp"
3896 mv "conftest.tmp" "conftest.in"
3897 cp "conftest.in" "conftest.nl"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003898 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003899 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3900 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3901 ac_count=`expr $ac_count + 1`
3902 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3903 # Best one so far, save it but keep looking for a better one
3904 ac_cv_path_EGREP="$ac_path_EGREP"
3905 ac_path_EGREP_max=$ac_count
3906 fi
3907 # 10*(2^10) chars as input seems more than enough
3908 test $ac_count -gt 10 && break
3909 done
3910 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3911esac
3912
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003913 $ac_path_EGREP_found && break 3
3914 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003915 done
3916done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003917IFS=$as_save_IFS
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003918 if test -z "$ac_cv_path_EGREP"; then
3919 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3920$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 +00003921 { (exit 1); exit 1; }; }
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003922 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003923else
3924 ac_cv_path_EGREP=$EGREP
3925fi
3926
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003927 fi
3928fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003929{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3930$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003931 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003932
3933
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003934{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3935$as_echo_n "checking for ANSI C header files... " >&6; }
3936if test "${ac_cv_header_stdc+set}" = set; then
3937 $as_echo_n "(cached) " >&6
3938else
3939 cat >conftest.$ac_ext <<_ACEOF
3940/* confdefs.h. */
3941_ACEOF
3942cat confdefs.h >>conftest.$ac_ext
3943cat >>conftest.$ac_ext <<_ACEOF
3944/* end confdefs.h. */
3945#include <stdlib.h>
3946#include <stdarg.h>
3947#include <string.h>
3948#include <float.h>
Ronald Oussoren5644eb72009-09-20 20:10:02 +00003949
Benjamin Peterson82af01d2010-05-02 16:45:41 +00003950int
3951main ()
3952{
3953
3954 ;
3955 return 0;
3956}
3957_ACEOF
3958rm -f conftest.$ac_objext
3959if { (ac_try="$ac_compile"
3960case "(($ac_try" in
3961 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3962 *) ac_try_echo=$ac_try;;
3963esac
3964eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3965$as_echo "$ac_try_echo") >&5
3966 (eval "$ac_compile") 2>conftest.er1
3967 ac_status=$?
3968 grep -v '^ *+' conftest.er1 >conftest.err
3969 rm -f conftest.er1
3970 cat conftest.err >&5
3971 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3972 (exit $ac_status); } && {
3973 test -z "$ac_c_werror_flag" ||
3974 test ! -s conftest.err
3975 } && test -s conftest.$ac_objext; then
3976 ac_cv_header_stdc=yes
3977else
3978 $as_echo "$as_me: failed program was:" >&5
3979sed 's/^/| /' conftest.$ac_ext >&5
3980
3981 ac_cv_header_stdc=no
3982fi
3983
3984rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3985
3986if test $ac_cv_header_stdc = yes; then
3987 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3988 cat >conftest.$ac_ext <<_ACEOF
3989/* confdefs.h. */
3990_ACEOF
3991cat confdefs.h >>conftest.$ac_ext
3992cat >>conftest.$ac_ext <<_ACEOF
3993/* end confdefs.h. */
3994#include <string.h>
3995
3996_ACEOF
3997if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3998 $EGREP "memchr" >/dev/null 2>&1; then
3999 :
4000else
4001 ac_cv_header_stdc=no
4002fi
4003rm -f conftest*
4004
4005fi
4006
4007if test $ac_cv_header_stdc = yes; then
4008 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4009 cat >conftest.$ac_ext <<_ACEOF
4010/* confdefs.h. */
4011_ACEOF
4012cat confdefs.h >>conftest.$ac_ext
4013cat >>conftest.$ac_ext <<_ACEOF
4014/* end confdefs.h. */
4015#include <stdlib.h>
4016
4017_ACEOF
4018if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4019 $EGREP "free" >/dev/null 2>&1; then
4020 :
4021else
4022 ac_cv_header_stdc=no
4023fi
4024rm -f conftest*
4025
4026fi
4027
4028if test $ac_cv_header_stdc = yes; then
4029 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4030 if test "$cross_compiling" = yes; then
4031 :
4032else
4033 cat >conftest.$ac_ext <<_ACEOF
4034/* confdefs.h. */
4035_ACEOF
4036cat confdefs.h >>conftest.$ac_ext
4037cat >>conftest.$ac_ext <<_ACEOF
4038/* end confdefs.h. */
4039#include <ctype.h>
4040#include <stdlib.h>
4041#if ((' ' & 0x0FF) == 0x020)
4042# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4043# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4044#else
4045# define ISLOWER(c) \
4046 (('a' <= (c) && (c) <= 'i') \
4047 || ('j' <= (c) && (c) <= 'r') \
4048 || ('s' <= (c) && (c) <= 'z'))
4049# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4050#endif
4051
4052#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4053int
4054main ()
4055{
4056 int i;
4057 for (i = 0; i < 256; i++)
4058 if (XOR (islower (i), ISLOWER (i))
4059 || toupper (i) != TOUPPER (i))
4060 return 2;
4061 return 0;
4062}
4063_ACEOF
4064rm -f conftest$ac_exeext
4065if { (ac_try="$ac_link"
4066case "(($ac_try" in
4067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4068 *) ac_try_echo=$ac_try;;
4069esac
4070eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4071$as_echo "$ac_try_echo") >&5
4072 (eval "$ac_link") 2>&5
4073 ac_status=$?
4074 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4075 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4076 { (case "(($ac_try" in
4077 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4078 *) ac_try_echo=$ac_try;;
4079esac
4080eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4081$as_echo "$ac_try_echo") >&5
4082 (eval "$ac_try") 2>&5
4083 ac_status=$?
4084 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4085 (exit $ac_status); }; }; then
4086 :
4087else
4088 $as_echo "$as_me: program exited with status $ac_status" >&5
4089$as_echo "$as_me: failed program was:" >&5
4090sed 's/^/| /' conftest.$ac_ext >&5
4091
4092( exit $ac_status )
4093ac_cv_header_stdc=no
4094fi
4095rm -rf conftest.dSYM
4096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4097fi
4098
4099
4100fi
4101fi
4102{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4103$as_echo "$ac_cv_header_stdc" >&6; }
4104if test $ac_cv_header_stdc = yes; then
4105
4106cat >>confdefs.h <<\_ACEOF
4107#define STDC_HEADERS 1
4108_ACEOF
4109
4110fi
4111
4112# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4123 inttypes.h stdint.h unistd.h
4124do
4125as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4126{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4127$as_echo_n "checking for $ac_header... " >&6; }
4128if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4129 $as_echo_n "(cached) " >&6
4130else
4131 cat >conftest.$ac_ext <<_ACEOF
4132/* confdefs.h. */
4133_ACEOF
4134cat confdefs.h >>conftest.$ac_ext
4135cat >>conftest.$ac_ext <<_ACEOF
4136/* end confdefs.h. */
4137$ac_includes_default
4138
4139#include <$ac_header>
4140_ACEOF
4141rm -f conftest.$ac_objext
4142if { (ac_try="$ac_compile"
4143case "(($ac_try" in
4144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4145 *) ac_try_echo=$ac_try;;
4146esac
4147eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4148$as_echo "$ac_try_echo") >&5
4149 (eval "$ac_compile") 2>conftest.er1
4150 ac_status=$?
4151 grep -v '^ *+' conftest.er1 >conftest.err
4152 rm -f conftest.er1
4153 cat conftest.err >&5
4154 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4155 (exit $ac_status); } && {
4156 test -z "$ac_c_werror_flag" ||
4157 test ! -s conftest.err
4158 } && test -s conftest.$ac_objext; then
4159 eval "$as_ac_Header=yes"
4160else
4161 $as_echo "$as_me: failed program was:" >&5
4162sed 's/^/| /' conftest.$ac_ext >&5
4163
4164 eval "$as_ac_Header=no"
4165fi
4166
4167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4168fi
4169ac_res=`eval 'as_val=${'$as_ac_Header'}
4170 $as_echo "$as_val"'`
4171 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4172$as_echo "$ac_res" >&6; }
4173as_val=`eval 'as_val=${'$as_ac_Header'}
4174 $as_echo "$as_val"'`
4175 if test "x$as_val" = x""yes; then
4176 cat >>confdefs.h <<_ACEOF
4177#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4178_ACEOF
4179
4180fi
4181
4182done
4183
4184
4185
4186 if test "${ac_cv_header_minix_config_h+set}" = set; then
4187 { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4188$as_echo_n "checking for minix/config.h... " >&6; }
4189if test "${ac_cv_header_minix_config_h+set}" = set; then
4190 $as_echo_n "(cached) " >&6
4191fi
4192{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4193$as_echo "$ac_cv_header_minix_config_h" >&6; }
4194else
4195 # Is the header compilable?
4196{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4197$as_echo_n "checking minix/config.h usability... " >&6; }
Ronald Oussoren5644eb72009-09-20 20:10:02 +00004198cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00004199/* confdefs.h. */
4200_ACEOF
4201cat confdefs.h >>conftest.$ac_ext
4202cat >>conftest.$ac_ext <<_ACEOF
4203/* end confdefs.h. */
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004204$ac_includes_default
4205#include <minix/config.h>
Benjamin Petersona8332062009-09-11 22:36:27 +00004206_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004207rm -f conftest.$ac_objext
4208if { (ac_try="$ac_compile"
4209case "(($ac_try" in
4210 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4211 *) ac_try_echo=$ac_try;;
4212esac
4213eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4214$as_echo "$ac_try_echo") >&5
4215 (eval "$ac_compile") 2>conftest.er1
4216 ac_status=$?
4217 grep -v '^ *+' conftest.er1 >conftest.err
4218 rm -f conftest.er1
4219 cat conftest.err >&5
4220 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4221 (exit $ac_status); } && {
4222 test -z "$ac_c_werror_flag" ||
4223 test ! -s conftest.err
4224 } && test -s conftest.$ac_objext; then
4225 ac_header_compiler=yes
4226else
4227 $as_echo "$as_me: failed program was:" >&5
4228sed 's/^/| /' conftest.$ac_ext >&5
4229
4230 ac_header_compiler=no
4231fi
4232
4233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4234{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4235$as_echo "$ac_header_compiler" >&6; }
4236
4237# Is the header present?
4238{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4239$as_echo_n "checking minix/config.h presence... " >&6; }
4240cat >conftest.$ac_ext <<_ACEOF
4241/* confdefs.h. */
4242_ACEOF
4243cat confdefs.h >>conftest.$ac_ext
4244cat >>conftest.$ac_ext <<_ACEOF
4245/* end confdefs.h. */
4246#include <minix/config.h>
4247_ACEOF
4248if { (ac_try="$ac_cpp conftest.$ac_ext"
4249case "(($ac_try" in
4250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4251 *) ac_try_echo=$ac_try;;
4252esac
4253eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4254$as_echo "$ac_try_echo") >&5
4255 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4256 ac_status=$?
4257 grep -v '^ *+' conftest.er1 >conftest.err
4258 rm -f conftest.er1
4259 cat conftest.err >&5
4260 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4261 (exit $ac_status); } >/dev/null && {
4262 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4263 test ! -s conftest.err
4264 }; then
4265 ac_header_preproc=yes
4266else
4267 $as_echo "$as_me: failed program was:" >&5
4268sed 's/^/| /' conftest.$ac_ext >&5
4269
4270 ac_header_preproc=no
4271fi
4272
4273rm -f conftest.err conftest.$ac_ext
4274{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4275$as_echo "$ac_header_preproc" >&6; }
4276
4277# So? What about this header?
4278case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4279 yes:no: )
4280 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4281$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4282 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4283$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4284 ac_header_preproc=yes
4285 ;;
4286 no:yes:* )
4287 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4288$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4289 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4290$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4291 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4292$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4293 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4294$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4295 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4296$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4297 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4298$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4299 ( cat <<\_ASBOX
4300## -------------------------------------- ##
4301## Report this to http://bugs.python.org/ ##
4302## -------------------------------------- ##
4303_ASBOX
4304 ) | sed "s/^/$as_me: WARNING: /" >&2
4305 ;;
4306esac
4307{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4308$as_echo_n "checking for minix/config.h... " >&6; }
4309if test "${ac_cv_header_minix_config_h+set}" = set; then
4310 $as_echo_n "(cached) " >&6
4311else
4312 ac_cv_header_minix_config_h=$ac_header_preproc
4313fi
4314{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4315$as_echo "$ac_cv_header_minix_config_h" >&6; }
4316
4317fi
4318if test "x$ac_cv_header_minix_config_h" = x""yes; then
4319 MINIX=yes
4320else
4321 MINIX=
4322fi
4323
4324
4325 if test "$MINIX" = yes; then
4326
Benjamin Petersona8332062009-09-11 22:36:27 +00004327cat >>confdefs.h <<\_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004328#define _POSIX_SOURCE 1
4329_ACEOF
4330
4331
4332cat >>confdefs.h <<\_ACEOF
4333#define _POSIX_1_SOURCE 2
4334_ACEOF
4335
4336
4337cat >>confdefs.h <<\_ACEOF
4338#define _MINIX 1
4339_ACEOF
4340
4341 fi
4342
4343
4344
4345 { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4346$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4347if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4348 $as_echo_n "(cached) " >&6
4349else
4350 cat >conftest.$ac_ext <<_ACEOF
4351/* confdefs.h. */
4352_ACEOF
4353cat confdefs.h >>conftest.$ac_ext
4354cat >>conftest.$ac_ext <<_ACEOF
4355/* end confdefs.h. */
4356
4357# define __EXTENSIONS__ 1
4358 $ac_includes_default
4359int
4360main ()
4361{
4362
4363 ;
4364 return 0;
4365}
4366_ACEOF
4367rm -f conftest.$ac_objext
4368if { (ac_try="$ac_compile"
4369case "(($ac_try" in
4370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4371 *) ac_try_echo=$ac_try;;
4372esac
4373eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4374$as_echo "$ac_try_echo") >&5
4375 (eval "$ac_compile") 2>conftest.er1
4376 ac_status=$?
4377 grep -v '^ *+' conftest.er1 >conftest.err
4378 rm -f conftest.er1
4379 cat conftest.err >&5
4380 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4381 (exit $ac_status); } && {
4382 test -z "$ac_c_werror_flag" ||
4383 test ! -s conftest.err
4384 } && test -s conftest.$ac_objext; then
4385 ac_cv_safe_to_define___extensions__=yes
4386else
4387 $as_echo "$as_me: failed program was:" >&5
4388sed 's/^/| /' conftest.$ac_ext >&5
4389
4390 ac_cv_safe_to_define___extensions__=no
4391fi
4392
4393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4394fi
4395{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4396$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4397 test $ac_cv_safe_to_define___extensions__ = yes &&
4398 cat >>confdefs.h <<\_ACEOF
4399#define __EXTENSIONS__ 1
4400_ACEOF
4401
4402 cat >>confdefs.h <<\_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00004403#define _ALL_SOURCE 1
4404_ACEOF
4405
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004406 cat >>confdefs.h <<\_ACEOF
4407#define _GNU_SOURCE 1
4408_ACEOF
4409
4410 cat >>confdefs.h <<\_ACEOF
4411#define _POSIX_PTHREAD_SEMANTICS 1
4412_ACEOF
4413
4414 cat >>confdefs.h <<\_ACEOF
4415#define _TANDEM_SOURCE 1
4416_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00004417
4418
4419
4420# Check for unsupported systems
4421case $ac_sys_system/$ac_sys_release in
4422atheos*|Linux*/1*)
4423 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4424 echo See README for details.
4425 exit 1;;
4426esac
4427
4428
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004429{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5
4430$as_echo_n "checking for --with-suffix... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004431
4432# Check whether --with-suffix was given.
4433if test "${with_suffix+set}" = set; then
4434 withval=$with_suffix;
4435 case $withval in
4436 no) EXEEXT=;;
4437 yes) EXEEXT=.exe;;
4438 *) EXEEXT=$withval;;
4439 esac
4440fi
4441
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004442{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5
4443$as_echo "$EXEEXT" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004444
4445# Test whether we're running on a non-case-sensitive system, in which
4446# case we give a warning if no ext is given
4447
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004448{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
4449$as_echo_n "checking for case-insensitive build directory... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004450if test ! -d CaseSensitiveTestDir; then
4451mkdir CaseSensitiveTestDir
4452fi
4453
4454if test -d casesensitivetestdir
4455then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004456 { $as_echo "$as_me:$LINENO: result: yes" >&5
4457$as_echo "yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004458 BUILDEXEEXT=.exe
4459else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004460 { $as_echo "$as_me:$LINENO: result: no" >&5
4461$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004462 BUILDEXEEXT=$EXEEXT
4463fi
4464rmdir CaseSensitiveTestDir
4465
4466case $MACHDEP in
4467bsdos*)
4468 case $CC in
4469 gcc) CC="$CC -D_HAVE_BSDI";;
4470 esac;;
4471esac
4472
4473case $ac_sys_system in
4474hp*|HP*)
4475 case $CC in
4476 cc|*/cc) CC="$CC -Ae";;
4477 esac;;
Antoine Pitrou20327222009-05-24 20:39:11 +00004478SunOS*)
4479 # Some functions have a prototype only with that define, e.g. confstr
4480
4481cat >>confdefs.h <<\_ACEOF
4482#define __EXTENSIONS__ 1
4483_ACEOF
4484
4485 ;;
4486esac
4487
4488
4489
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004490{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5
4491$as_echo_n "checking LIBRARY... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004492if test -z "$LIBRARY"
4493then
4494 LIBRARY='libpython$(VERSION).a'
4495fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004496{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5
4497$as_echo "$LIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004498
4499# LDLIBRARY is the name of the library to link against (as opposed to the
4500# name of the library into which to insert object files). BLDLIBRARY is also
4501# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4502# is blank as the main program is not linked directly against LDLIBRARY.
4503# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4504# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4505# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4506# DLLLIBRARY is the shared (i.e., DLL) library.
4507#
4508# RUNSHARED is used to run shared python without installed libraries
4509#
4510# INSTSONAME is the name of the shared library that will be use to install
4511# on the system - some systems like version suffix, others don't
4512
4513
4514
4515
4516
4517
4518LDLIBRARY="$LIBRARY"
4519BLDLIBRARY='$(LDLIBRARY)'
4520INSTSONAME='$(LDLIBRARY)'
4521DLLLIBRARY=''
4522LDLIBRARYDIR=''
4523RUNSHARED=''
4524
4525# LINKCC is the command that links the python executable -- default is $(CC).
4526# If CXX is set, and if it is needed to link a main function that was
4527# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4528# python might then depend on the C++ runtime
4529# This is altered for AIX in order to build the export list before
4530# linking.
4531
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004532{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5
4533$as_echo_n "checking LINKCC... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004534if test -z "$LINKCC"
4535then
4536 LINKCC='$(PURIFY) $(MAINCC)'
4537 case $ac_sys_system in
4538 AIX*)
4539 exp_extra="\"\""
4540 if test $ac_sys_release -ge 5 -o \
4541 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4542 exp_extra="."
4543 fi
4544 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Antoine Pitrou20327222009-05-24 20:39:11 +00004545 QNX*)
4546 # qcc must be used because the other compilers do not
4547 # support -N.
4548 LINKCC=qcc;;
4549 esac
4550fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004551{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5
4552$as_echo "$LINKCC" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004553
4554# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4555# make sure we default having it set to "no": this is used by
4556# distutils.unixccompiler to know if it should add --enable-new-dtags
4557# to linker command lines, and failing to detect GNU ld simply results
4558# in the same bahaviour as before.
4559
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004560{ $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
4561$as_echo_n "checking for GNU ld... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004562ac_prog=ld
4563if test "$GCC" = yes; then
4564 ac_prog=`$CC -print-prog-name=ld`
4565fi
4566case `"$ac_prog" -V 2>&1 < /dev/null` in
4567 *GNU*)
4568 GNULD=yes;;
4569 *)
4570 GNULD=no;;
4571esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004572{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5
4573$as_echo "$GNULD" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004574
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004575{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5
4576$as_echo_n "checking for --enable-shared... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004577# Check whether --enable-shared was given.
4578if test "${enable_shared+set}" = set; then
4579 enableval=$enable_shared;
4580fi
4581
4582
4583if test -z "$enable_shared"
4584then
4585 case $ac_sys_system in
4586 CYGWIN* | atheos*)
4587 enable_shared="yes";;
4588 *)
4589 enable_shared="no";;
4590 esac
4591fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004592{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
4593$as_echo "$enable_shared" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004594
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004595{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4596$as_echo_n "checking for --enable-profiling... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004597# Check whether --enable-profiling was given.
4598if test "${enable_profiling+set}" = set; then
4599 enableval=$enable_profiling; ac_save_cc="$CC"
4600 CC="$CC -pg"
4601 if test "$cross_compiling" = yes; then
4602 ac_enable_profiling="no"
4603else
4604 cat >conftest.$ac_ext <<_ACEOF
4605/* confdefs.h. */
4606_ACEOF
4607cat confdefs.h >>conftest.$ac_ext
4608cat >>conftest.$ac_ext <<_ACEOF
4609/* end confdefs.h. */
4610int main() { return 0; }
4611_ACEOF
4612rm -f conftest$ac_exeext
4613if { (ac_try="$ac_link"
4614case "(($ac_try" in
4615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4616 *) ac_try_echo=$ac_try;;
4617esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004618eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4619$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004620 (eval "$ac_link") 2>&5
4621 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004622 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004623 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4624 { (case "(($ac_try" in
4625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4626 *) ac_try_echo=$ac_try;;
4627esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004628eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4629$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004630 (eval "$ac_try") 2>&5
4631 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004632 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004633 (exit $ac_status); }; }; then
4634 ac_enable_profiling="yes"
4635else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004636 $as_echo "$as_me: program exited with status $ac_status" >&5
4637$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004638sed 's/^/| /' conftest.$ac_ext >&5
4639
4640( exit $ac_status )
4641ac_enable_profiling="no"
4642fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004643rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00004644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4645fi
4646
4647
4648 CC="$ac_save_cc"
4649fi
4650
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004651{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4652$as_echo "$ac_enable_profiling" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004653
4654case "$ac_enable_profiling" in
4655 "yes")
4656 BASECFLAGS="-pg $BASECFLAGS"
4657 LDFLAGS="-pg $LDFLAGS"
4658 ;;
4659esac
4660
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004661{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4662$as_echo_n "checking LDLIBRARY... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004663
4664# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4665# library that we build, but we do not want to link against it (we
4666# will find it with a -framework option). For this reason there is an
4667# extra variable BLDLIBRARY against which Python and the extension
4668# modules are linked, BLDLIBRARY. This is normally the same as
4669# LDLIBRARY, but empty for MacOSX framework builds.
4670if test "$enable_framework"
4671then
4672 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4673 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4674 BLDLIBRARY=''
4675else
4676 BLDLIBRARY='$(LDLIBRARY)'
4677fi
4678
4679# Other platforms follow
4680if test $enable_shared = "yes"; then
4681
4682cat >>confdefs.h <<\_ACEOF
4683#define Py_ENABLE_SHARED 1
4684_ACEOF
4685
4686 case $ac_sys_system in
4687 CYGWIN*)
4688 LDLIBRARY='libpython$(VERSION).dll.a'
4689 DLLLIBRARY='libpython$(VERSION).dll'
4690 ;;
4691 SunOS*)
4692 LDLIBRARY='libpython$(VERSION).so'
4693 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4694 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4695 INSTSONAME="$LDLIBRARY".$SOVERSION
4696 ;;
4697 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4698 LDLIBRARY='libpython$(VERSION).so'
4699 BLDLIBRARY='-L. -lpython$(VERSION)'
4700 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4701 case $ac_sys_system in
4702 FreeBSD*)
4703 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4704 ;;
4705 esac
4706 INSTSONAME="$LDLIBRARY".$SOVERSION
4707 ;;
4708 hp*|HP*)
4709 case `uname -m` in
4710 ia64)
4711 LDLIBRARY='libpython$(VERSION).so'
4712 ;;
4713 *)
4714 LDLIBRARY='libpython$(VERSION).sl'
4715 ;;
4716 esac
4717 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4718 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4719 ;;
4720 OSF*)
4721 LDLIBRARY='libpython$(VERSION).so'
4722 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4723 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4724 ;;
4725 atheos*)
4726 LDLIBRARY='libpython$(VERSION).so'
4727 BLDLIBRARY='-L. -lpython$(VERSION)'
4728 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4729 ;;
4730 Darwin*)
4731 LDLIBRARY='libpython$(VERSION).dylib'
4732 BLDLIBRARY='-L. -lpython$(VERSION)'
4733 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4734 ;;
4735
4736 esac
4737else # shared is disabled
4738 case $ac_sys_system in
4739 CYGWIN*)
4740 BLDLIBRARY='$(LIBRARY)'
4741 LDLIBRARY='libpython$(VERSION).dll.a'
4742 ;;
4743 esac
4744fi
4745
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004746{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4747$as_echo "$LDLIBRARY" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004748
4749if test -n "$ac_tool_prefix"; then
4750 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4751set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004752{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4753$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004754if test "${ac_cv_prog_RANLIB+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004755 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004756else
4757 if test -n "$RANLIB"; then
4758 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4759else
4760as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4761for as_dir in $PATH
4762do
4763 IFS=$as_save_IFS
4764 test -z "$as_dir" && as_dir=.
4765 for ac_exec_ext in '' $ac_executable_extensions; do
4766 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4767 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004768 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004769 break 2
4770 fi
4771done
4772done
4773IFS=$as_save_IFS
4774
4775fi
4776fi
4777RANLIB=$ac_cv_prog_RANLIB
4778if test -n "$RANLIB"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004779 { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
4780$as_echo "$RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004781else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004782 { $as_echo "$as_me:$LINENO: result: no" >&5
4783$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004784fi
4785
4786
4787fi
4788if test -z "$ac_cv_prog_RANLIB"; then
4789 ac_ct_RANLIB=$RANLIB
4790 # Extract the first word of "ranlib", so it can be a program name with args.
4791set dummy ranlib; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004792{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4793$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004794if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004795 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004796else
4797 if test -n "$ac_ct_RANLIB"; then
4798 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4799else
4800as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4801for as_dir in $PATH
4802do
4803 IFS=$as_save_IFS
4804 test -z "$as_dir" && as_dir=.
4805 for ac_exec_ext in '' $ac_executable_extensions; do
4806 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4807 ac_cv_prog_ac_ct_RANLIB="ranlib"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004808 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004809 break 2
4810 fi
4811done
4812done
4813IFS=$as_save_IFS
4814
4815fi
4816fi
4817ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4818if test -n "$ac_ct_RANLIB"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004819 { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4820$as_echo "$ac_ct_RANLIB" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004821else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004822 { $as_echo "$as_me:$LINENO: result: no" >&5
4823$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004824fi
4825
4826 if test "x$ac_ct_RANLIB" = x; then
4827 RANLIB=":"
4828 else
4829 case $cross_compiling:$ac_tool_warned in
4830yes:)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004831{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
4832$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004833ac_tool_warned=yes ;;
4834esac
4835 RANLIB=$ac_ct_RANLIB
4836 fi
4837else
4838 RANLIB="$ac_cv_prog_RANLIB"
4839fi
4840
4841
4842for ac_prog in ar aal
4843do
4844 # Extract the first word of "$ac_prog", so it can be a program name with args.
4845set dummy $ac_prog; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004846{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4847$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004848if test "${ac_cv_prog_AR+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004849 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004850else
4851 if test -n "$AR"; then
4852 ac_cv_prog_AR="$AR" # Let the user override the test.
4853else
4854as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4855for as_dir in $PATH
4856do
4857 IFS=$as_save_IFS
4858 test -z "$as_dir" && as_dir=.
4859 for ac_exec_ext in '' $ac_executable_extensions; do
4860 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4861 ac_cv_prog_AR="$ac_prog"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004862 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004863 break 2
4864 fi
4865done
4866done
4867IFS=$as_save_IFS
4868
4869fi
4870fi
4871AR=$ac_cv_prog_AR
4872if test -n "$AR"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004873 { $as_echo "$as_me:$LINENO: result: $AR" >&5
4874$as_echo "$AR" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004875else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004876 { $as_echo "$as_me:$LINENO: result: no" >&5
4877$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004878fi
4879
4880
4881 test -n "$AR" && break
4882done
4883test -n "$AR" || AR="ar"
4884
4885
4886# tweak ARFLAGS only if the user didn't set it on the command line
4887
4888if test -z "$ARFLAGS"
4889then
4890 ARFLAGS="rc"
4891fi
4892
4893
4894# Extract the first word of "svnversion", so it can be a program name with args.
4895set dummy svnversion; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004896{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4897$as_echo_n "checking for $ac_word... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004898if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004899 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004900else
4901 if test -n "$SVNVERSION"; then
4902 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4903else
4904as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4905for as_dir in $PATH
4906do
4907 IFS=$as_save_IFS
4908 test -z "$as_dir" && as_dir=.
4909 for ac_exec_ext in '' $ac_executable_extensions; do
4910 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4911 ac_cv_prog_SVNVERSION="found"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004912 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00004913 break 2
4914 fi
4915done
4916done
4917IFS=$as_save_IFS
4918
4919 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4920fi
4921fi
4922SVNVERSION=$ac_cv_prog_SVNVERSION
4923if test -n "$SVNVERSION"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004924 { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4925$as_echo "$SVNVERSION" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004926else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004927 { $as_echo "$as_me:$LINENO: result: no" >&5
4928$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004929fi
4930
4931
4932if test $SVNVERSION = found
4933then
4934 SVNVERSION="svnversion \$(srcdir)"
4935else
4936 SVNVERSION="echo Unversioned directory"
4937fi
4938
4939case $MACHDEP in
4940bsdos*|hp*|HP*)
4941 # install -d does not work on BSDI or HP-UX
4942 if test -z "$INSTALL"
4943 then
4944 INSTALL="${srcdir}/install-sh -c"
4945 fi
4946esac
4947ac_aux_dir=
4948for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4949 if test -f "$ac_dir/install-sh"; then
4950 ac_aux_dir=$ac_dir
4951 ac_install_sh="$ac_aux_dir/install-sh -c"
4952 break
4953 elif test -f "$ac_dir/install.sh"; then
4954 ac_aux_dir=$ac_dir
4955 ac_install_sh="$ac_aux_dir/install.sh -c"
4956 break
4957 elif test -f "$ac_dir/shtool"; then
4958 ac_aux_dir=$ac_dir
4959 ac_install_sh="$ac_aux_dir/shtool install -c"
4960 break
4961 fi
4962done
4963if test -z "$ac_aux_dir"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004964 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4965$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00004966 { (exit 1); exit 1; }; }
4967fi
4968
4969# These three variables are undocumented and unsupported,
4970# and are intended to be withdrawn in a future Autoconf release.
4971# They can cause serious problems if a builder's source tree is in a directory
4972# whose full name contains unusual characters.
4973ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4974ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4975ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4976
4977
4978# Find a good install program. We prefer a C program (faster),
4979# so one script is as good as another. But avoid the broken or
4980# incompatible versions:
4981# SysV /etc/install, /usr/sbin/install
4982# SunOS /usr/etc/install
4983# IRIX /sbin/install
4984# AIX /bin/install
4985# AmigaOS /C/install, which installs bootblocks on floppy discs
4986# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4987# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4988# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4989# OS/2's system install, which has a completely different semantic
4990# ./install, which can be erroneously created by make from ./install.sh.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004991# Reject install programs that cannot install multiple files.
4992{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4993$as_echo_n "checking for a BSD-compatible install... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00004994if test -z "$INSTALL"; then
4995if test "${ac_cv_path_install+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00004996 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00004997else
4998 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4999for as_dir in $PATH
5000do
5001 IFS=$as_save_IFS
5002 test -z "$as_dir" && as_dir=.
5003 # Account for people who put trailing slashes in PATH elements.
5004case $as_dir/ in
5005 ./ | .// | /cC/* | \
5006 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
5007 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
5008 /usr/ucb/* ) ;;
5009 *)
5010 # OSF1 and SCO ODT 3.0 have their own names for install.
5011 # Don't use installbsd from OSF since it installs stuff as root
5012 # by default.
5013 for ac_prog in ginstall scoinst install; do
5014 for ac_exec_ext in '' $ac_executable_extensions; do
5015 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
5016 if test $ac_prog = install &&
5017 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5018 # AIX install. It has an incompatible calling convention.
5019 :
5020 elif test $ac_prog = install &&
5021 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5022 # program-specific install script used by HP pwplus--don't use.
5023 :
5024 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005025 rm -rf conftest.one conftest.two conftest.dir
5026 echo one > conftest.one
5027 echo two > conftest.two
5028 mkdir conftest.dir
5029 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5030 test -s conftest.one && test -s conftest.two &&
5031 test -s conftest.dir/conftest.one &&
5032 test -s conftest.dir/conftest.two
5033 then
5034 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5035 break 3
5036 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005037 fi
5038 fi
5039 done
5040 done
5041 ;;
5042esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005043
Antoine Pitrou20327222009-05-24 20:39:11 +00005044done
5045IFS=$as_save_IFS
5046
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005047rm -rf conftest.one conftest.two conftest.dir
Antoine Pitrou20327222009-05-24 20:39:11 +00005048
5049fi
5050 if test "${ac_cv_path_install+set}" = set; then
5051 INSTALL=$ac_cv_path_install
5052 else
5053 # As a last resort, use the slow shell script. Don't cache a
5054 # value for INSTALL within a source directory, because that will
5055 # break other packages using the cache if that directory is
5056 # removed, or if the value is a relative name.
5057 INSTALL=$ac_install_sh
5058 fi
5059fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005060{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
5061$as_echo "$INSTALL" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005062
5063# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5064# It thinks the first close brace ends the variable substitution.
5065test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5066
5067test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5068
5069test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5070
5071
5072# Not every filesystem supports hard links
5073
5074if test -z "$LN" ; then
5075 case $ac_sys_system in
5076 CYGWIN*) LN="ln -s";;
5077 atheos*) LN="ln -s";;
5078 *) LN=ln;;
5079 esac
5080fi
5081
5082# Check for --with-pydebug
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005083{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5
5084$as_echo_n "checking for --with-pydebug... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005085
5086# Check whether --with-pydebug was given.
5087if test "${with_pydebug+set}" = set; then
5088 withval=$with_pydebug;
5089if test "$withval" != no
5090then
5091
5092cat >>confdefs.h <<\_ACEOF
5093#define Py_DEBUG 1
5094_ACEOF
5095
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005096 { $as_echo "$as_me:$LINENO: result: yes" >&5
5097$as_echo "yes" >&6; };
Antoine Pitrou20327222009-05-24 20:39:11 +00005098 Py_DEBUG='true'
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005099else { $as_echo "$as_me:$LINENO: result: no" >&5
5100$as_echo "no" >&6; }; Py_DEBUG='false'
Antoine Pitrou20327222009-05-24 20:39:11 +00005101fi
5102else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005103 { $as_echo "$as_me:$LINENO: result: no" >&5
5104$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005105fi
5106
5107
5108# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5109# merged with this chunk of code?
5110
5111# Optimizer/debugger flags
5112# ------------------------
5113# (The following bit of code is complicated enough - please keep things
5114# indented properly. Just pretend you're editing Python code. ;-)
5115
5116# There are two parallel sets of case statements below, one that checks to
5117# see if OPT was set and one that does BASECFLAGS setting based upon
5118# compiler and platform. BASECFLAGS tweaks need to be made even if the
5119# user set OPT.
5120
5121# tweak OPT based on compiler and platform, only if the user didn't set
5122# it on the command line
5123
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005124if test "${OPT-unset}" = "unset"
Antoine Pitrou20327222009-05-24 20:39:11 +00005125then
5126 case $GCC in
5127 yes)
5128 if test "$CC" != 'g++' ; then
5129 STRICT_PROTO="-Wstrict-prototypes"
5130 fi
5131 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5132 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5133 WRAP="-fwrapv"
5134 fi
5135 case $ac_cv_prog_cc_g in
5136 yes)
5137 if test "$Py_DEBUG" = 'true' ; then
5138 # Optimization messes up debuggers, so turn it off for
5139 # debug builds.
5140 OPT="-g -Wall $STRICT_PROTO"
5141 else
5142 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5143 fi
5144 ;;
5145 *)
5146 OPT="-O3 -Wall $STRICT_PROTO"
5147 ;;
5148 esac
5149 case $ac_sys_system in
5150 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5151 ;;
5152 esac
5153 ;;
5154
5155 *)
5156 OPT="-O"
5157 ;;
5158 esac
Antoine Pitrou20327222009-05-24 20:39:11 +00005159fi
5160
5161
5162
5163# The -arch flags for universal builds on OSX
5164UNIVERSAL_ARCH_FLAGS=
5165
5166
5167# tweak BASECFLAGS based on compiler and platform
5168case $GCC in
5169yes)
5170 # Python violates C99 rules, by casting between incompatible
5171 # pointer types. GCC may generate bad code as a result of that,
5172 # so use -fno-strict-aliasing if supported.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005173 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
5174$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005175 ac_save_cc="$CC"
5176 CC="$CC -fno-strict-aliasing"
5177 if test "$cross_compiling" = yes; then
5178 ac_cv_no_strict_aliasing_ok=no
5179else
5180 cat >conftest.$ac_ext <<_ACEOF
5181/* confdefs.h. */
5182_ACEOF
5183cat confdefs.h >>conftest.$ac_ext
5184cat >>conftest.$ac_ext <<_ACEOF
5185/* end confdefs.h. */
5186int main() { return 0; }
5187_ACEOF
5188rm -f conftest$ac_exeext
5189if { (ac_try="$ac_link"
5190case "(($ac_try" in
5191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5192 *) ac_try_echo=$ac_try;;
5193esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005194eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5195$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005196 (eval "$ac_link") 2>&5
5197 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005198 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005199 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5200 { (case "(($ac_try" in
5201 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5202 *) ac_try_echo=$ac_try;;
5203esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005204eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5205$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005206 (eval "$ac_try") 2>&5
5207 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005208 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005209 (exit $ac_status); }; }; then
5210 ac_cv_no_strict_aliasing_ok=yes
5211else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005212 $as_echo "$as_me: program exited with status $ac_status" >&5
5213$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005214sed 's/^/| /' conftest.$ac_ext >&5
5215
5216( exit $ac_status )
5217ac_cv_no_strict_aliasing_ok=no
5218fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005219rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005220rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5221fi
5222
5223
5224 CC="$ac_save_cc"
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005225 { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
5226$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005227 if test $ac_cv_no_strict_aliasing_ok = yes
5228 then
5229 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5230 fi
5231
5232 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5233 # support. Without this, treatment of subnormals doesn't follow
5234 # the standard.
5235 case $ac_sys_machine in
5236 alpha*)
5237 BASECFLAGS="$BASECFLAGS -mieee"
5238 ;;
5239 esac
5240
5241 case $ac_sys_system in
5242 SCO_SV*)
5243 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5244 ;;
5245 # is there any other compiler on Darwin besides gcc?
5246 Darwin*)
5247 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5248 # used to be here, but non-Apple gcc doesn't accept them.
Ronald Oussoren79a93512010-04-18 19:08:47 +00005249 if test "${CC}" = gcc
5250 then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005251 { $as_echo "$as_me:$LINENO: checking which compiler should be used" >&5
5252$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussoren79a93512010-04-18 19:08:47 +00005253 case "${UNIVERSALSDK}" in
5254 */MacOSX10.4u.sdk)
5255 # Build using 10.4 SDK, force usage of gcc when the
5256 # compiler is gcc, otherwise the user will get very
5257 # confusing error messages when building on OSX 10.6
5258 CC=gcc-4.0
5259 CPP=cpp-4.0
5260 ;;
5261 esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005262 { $as_echo "$as_me:$LINENO: result: $CC" >&5
5263$as_echo "$CC" >&6; }
Ronald Oussoren79a93512010-04-18 19:08:47 +00005264 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005265
5266
5267 if test "${enable_universalsdk}"; then
5268 UNIVERSAL_ARCH_FLAGS=""
5269 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
Antoine Pitrou20327222009-05-24 20:39:11 +00005270 ARCH_RUN_32BIT=""
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005271 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Antoine Pitrou20327222009-05-24 20:39:11 +00005272
5273 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00005274 ARCH_RUN_32BIT="true"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005275 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Antoine Pitrou20327222009-05-24 20:39:11 +00005276
5277 elif test "$UNIVERSAL_ARCHS" = "all" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00005278 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005279 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5280 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
5281 LIPO_64BIT_FLAGS="-extract x86_64 -extract ppc64"
Antoine Pitrou20327222009-05-24 20:39:11 +00005282
Ronald Oussoren856624d2009-09-08 07:13:53 +00005283 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00005284 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005285 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5286 LIPO_32BIT_FLAGS="-extract i386"
5287 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren856624d2009-09-08 07:13:53 +00005288
5289 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
Ronald Oussorenc8c89c42010-02-11 13:24:45 +00005290 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Benjamin Petersone7e59c22010-03-23 21:05:56 +00005291 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5292 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
5293 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren856624d2009-09-08 07:13:53 +00005294
Antoine Pitrou20327222009-05-24 20:39:11 +00005295 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005296 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
5297$as_echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Antoine Pitrou20327222009-05-24 20:39:11 +00005298 { (exit 1); exit 1; }; }
5299
5300 fi
5301
5302
Ronald Oussoren79a93512010-04-18 19:08:47 +00005303 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5304 if test "${UNIVERSALSDK}" != "/"
5305 then
5306 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5307 LDFLAGS="-isysroot ${UNIVERSALSDK} ${LDFLAGS}"
5308 CPPFLAGSFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Antoine Pitrou20327222009-05-24 20:39:11 +00005309 fi
5310 fi
5311
5312 # Calculate the right deployment target for this build.
5313 #
5314 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5315 if test ${cur_target} '>' 10.2; then
5316 cur_target=10.3
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00005317 if test ${enable_universalsdk}; then
5318 if test "${UNIVERSAL_ARCHS}" = "all"; then
5319 # Ensure that the default platform for a
5320 # 4-way universal build is OSX 10.5,
5321 # that's the first OS release where
5322 # 4-way builds make sense.
5323 cur_target='10.5'
Ronald Oussoren856624d2009-09-08 07:13:53 +00005324
5325 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5326 cur_target='10.5'
5327
5328 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5329 cur_target='10.5'
5330
5331 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5332 cur_target='10.5'
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00005333 fi
5334 else
Ronald Oussoren175a8842010-02-11 13:40:06 +00005335 if test `/usr/bin/arch` = "i386"; then
Ronald Oussorend45ff2c2009-09-06 11:11:04 +00005336 # On Intel macs default to a deployment
5337 # target of 10.4, that's the first OSX
5338 # release with Intel support.
5339 cur_target="10.4"
5340 fi
5341 fi
Antoine Pitrou20327222009-05-24 20:39:11 +00005342 fi
5343 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5344
5345 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5346 # environment with a value that is the same as what we'll use
5347 # in the Makefile to ensure that we'll get the same compiler
5348 # environment during configure and build time.
5349 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5350 export MACOSX_DEPLOYMENT_TARGET
5351 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5352
5353 ;;
5354 OSF*)
5355 BASECFLAGS="$BASECFLAGS -mieee"
5356 ;;
5357 esac
5358 ;;
5359
5360*)
5361 case $ac_sys_system in
5362 OpenUNIX*|UnixWare*)
5363 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5364 ;;
5365 OSF*)
5366 BASECFLAGS="$BASECFLAGS -ieee -std"
5367 ;;
5368 SCO_SV*)
5369 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5370 ;;
5371 esac
5372 ;;
5373esac
5374
5375if test "$Py_DEBUG" = 'true'; then
5376 :
5377else
5378 OPT="-DNDEBUG $OPT"
5379fi
5380
5381if test "$ac_arch_flags"
5382then
5383 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5384fi
5385
5386# disable check for icc since it seems to pass, but generates a warning
5387if test "$CC" = icc
5388then
5389 ac_cv_opt_olimit_ok=no
5390fi
5391
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005392{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
5393$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005394if test "${ac_cv_opt_olimit_ok+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005395 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005396else
5397 ac_save_cc="$CC"
5398CC="$CC -OPT:Olimit=0"
5399if test "$cross_compiling" = yes; then
5400 ac_cv_opt_olimit_ok=no
5401else
5402 cat >conftest.$ac_ext <<_ACEOF
5403/* confdefs.h. */
5404_ACEOF
5405cat confdefs.h >>conftest.$ac_ext
5406cat >>conftest.$ac_ext <<_ACEOF
5407/* end confdefs.h. */
5408int main() { return 0; }
5409_ACEOF
5410rm -f conftest$ac_exeext
5411if { (ac_try="$ac_link"
5412case "(($ac_try" in
5413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5414 *) ac_try_echo=$ac_try;;
5415esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005416eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5417$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005418 (eval "$ac_link") 2>&5
5419 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005420 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005421 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5422 { (case "(($ac_try" in
5423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5424 *) ac_try_echo=$ac_try;;
5425esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005426eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5427$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005428 (eval "$ac_try") 2>&5
5429 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005430 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005431 (exit $ac_status); }; }; then
5432 ac_cv_opt_olimit_ok=yes
5433else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005434 $as_echo "$as_me: program exited with status $ac_status" >&5
5435$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005436sed 's/^/| /' conftest.$ac_ext >&5
5437
5438( exit $ac_status )
5439ac_cv_opt_olimit_ok=no
5440fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005441rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005442rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5443fi
5444
5445
5446CC="$ac_save_cc"
5447fi
5448
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005449{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
5450$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005451if test $ac_cv_opt_olimit_ok = yes; then
5452 case $ac_sys_system in
5453 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5454 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5455 # environment?
5456 Darwin*)
5457 ;;
5458 *)
5459 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5460 ;;
5461 esac
5462else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005463 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
5464$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005465 if test "${ac_cv_olimit_ok+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005466 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005467else
5468 ac_save_cc="$CC"
5469 CC="$CC -Olimit 1500"
5470 if test "$cross_compiling" = yes; then
5471 ac_cv_olimit_ok=no
5472else
5473 cat >conftest.$ac_ext <<_ACEOF
5474/* confdefs.h. */
5475_ACEOF
5476cat confdefs.h >>conftest.$ac_ext
5477cat >>conftest.$ac_ext <<_ACEOF
5478/* end confdefs.h. */
5479int main() { return 0; }
5480_ACEOF
5481rm -f conftest$ac_exeext
5482if { (ac_try="$ac_link"
5483case "(($ac_try" in
5484 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5485 *) ac_try_echo=$ac_try;;
5486esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005487eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5488$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005489 (eval "$ac_link") 2>&5
5490 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005491 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005492 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5493 { (case "(($ac_try" in
5494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5495 *) ac_try_echo=$ac_try;;
5496esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005497eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5498$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005499 (eval "$ac_try") 2>&5
5500 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005501 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005502 (exit $ac_status); }; }; then
5503 ac_cv_olimit_ok=yes
5504else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005505 $as_echo "$as_me: program exited with status $ac_status" >&5
5506$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005507sed 's/^/| /' conftest.$ac_ext >&5
5508
5509( exit $ac_status )
5510ac_cv_olimit_ok=no
5511fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005512rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005513rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5514fi
5515
5516
5517 CC="$ac_save_cc"
5518fi
5519
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005520 { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5521$as_echo "$ac_cv_olimit_ok" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005522 if test $ac_cv_olimit_ok = yes; then
5523 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5524 fi
5525fi
5526
5527# Check whether GCC supports PyArg_ParseTuple format
5528if test "$GCC" = "yes"
5529then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005530 { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5531$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005532 save_CFLAGS=$CFLAGS
5533 CFLAGS="$CFLAGS -Werror"
5534 cat >conftest.$ac_ext <<_ACEOF
5535/* confdefs.h. */
5536_ACEOF
5537cat confdefs.h >>conftest.$ac_ext
5538cat >>conftest.$ac_ext <<_ACEOF
5539/* end confdefs.h. */
5540
5541 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5542
5543int
5544main ()
5545{
5546
5547 ;
5548 return 0;
5549}
5550_ACEOF
5551rm -f conftest.$ac_objext
5552if { (ac_try="$ac_compile"
5553case "(($ac_try" in
5554 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5555 *) ac_try_echo=$ac_try;;
5556esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005557eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5558$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005559 (eval "$ac_compile") 2>conftest.er1
5560 ac_status=$?
5561 grep -v '^ *+' conftest.er1 >conftest.err
5562 rm -f conftest.er1
5563 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005564 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005565 (exit $ac_status); } && {
5566 test -z "$ac_c_werror_flag" ||
5567 test ! -s conftest.err
5568 } && test -s conftest.$ac_objext; then
5569
5570cat >>confdefs.h <<\_ACEOF
5571#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5572_ACEOF
5573
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005574 { $as_echo "$as_me:$LINENO: result: yes" >&5
5575$as_echo "yes" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005576else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005577 $as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005578sed 's/^/| /' conftest.$ac_ext >&5
5579
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005580 { $as_echo "$as_me:$LINENO: result: no" >&5
5581$as_echo "no" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005582
5583fi
5584
5585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5586 CFLAGS=$save_CFLAGS
5587fi
5588
5589# On some compilers, pthreads are available without further options
5590# (e.g. MacOS X). On some of these systems, the compiler will not
5591# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5592# So we have to see first whether pthreads are available without
5593# options before we can check whether -Kpthread improves anything.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005594{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5595$as_echo_n "checking whether pthreads are available without options... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005596if test "${ac_cv_pthread_is_default+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005597 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005598else
5599 if test "$cross_compiling" = yes; then
5600 ac_cv_pthread_is_default=no
5601else
5602 cat >conftest.$ac_ext <<_ACEOF
5603/* confdefs.h. */
5604_ACEOF
5605cat confdefs.h >>conftest.$ac_ext
5606cat >>conftest.$ac_ext <<_ACEOF
5607/* end confdefs.h. */
5608
5609#include <pthread.h>
5610
5611void* routine(void* p){return NULL;}
5612
5613int main(){
5614 pthread_t p;
5615 if(pthread_create(&p,NULL,routine,NULL)!=0)
5616 return 1;
5617 (void)pthread_detach(p);
5618 return 0;
5619}
5620
5621_ACEOF
5622rm -f conftest$ac_exeext
5623if { (ac_try="$ac_link"
5624case "(($ac_try" in
5625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5626 *) ac_try_echo=$ac_try;;
5627esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005628eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5629$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005630 (eval "$ac_link") 2>&5
5631 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005632 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005633 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5634 { (case "(($ac_try" in
5635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5636 *) ac_try_echo=$ac_try;;
5637esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005638eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5639$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005640 (eval "$ac_try") 2>&5
5641 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005642 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005643 (exit $ac_status); }; }; then
5644
5645 ac_cv_pthread_is_default=yes
5646 ac_cv_kthread=no
5647 ac_cv_pthread=no
5648
5649else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005650 $as_echo "$as_me: program exited with status $ac_status" >&5
5651$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005652sed 's/^/| /' conftest.$ac_ext >&5
5653
5654( exit $ac_status )
5655ac_cv_pthread_is_default=no
5656fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005657rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5659fi
5660
5661
5662
5663fi
5664
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005665{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5666$as_echo "$ac_cv_pthread_is_default" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005667
5668
5669if test $ac_cv_pthread_is_default = yes
5670then
5671 ac_cv_kpthread=no
5672else
5673# -Kpthread, if available, provides the right #defines
5674# and linker options to make pthread_create available
5675# Some compilers won't report that they do not support -Kpthread,
5676# so we need to run a program to see whether it really made the
5677# function available.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005678{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5679$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005680if test "${ac_cv_kpthread+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005681 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005682else
5683 ac_save_cc="$CC"
5684CC="$CC -Kpthread"
5685if test "$cross_compiling" = yes; then
5686 ac_cv_kpthread=no
5687else
5688 cat >conftest.$ac_ext <<_ACEOF
5689/* confdefs.h. */
5690_ACEOF
5691cat confdefs.h >>conftest.$ac_ext
5692cat >>conftest.$ac_ext <<_ACEOF
5693/* end confdefs.h. */
5694
5695#include <pthread.h>
5696
5697void* routine(void* p){return NULL;}
5698
5699int main(){
5700 pthread_t p;
5701 if(pthread_create(&p,NULL,routine,NULL)!=0)
5702 return 1;
5703 (void)pthread_detach(p);
5704 return 0;
5705}
5706
5707_ACEOF
5708rm -f conftest$ac_exeext
5709if { (ac_try="$ac_link"
5710case "(($ac_try" in
5711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5712 *) ac_try_echo=$ac_try;;
5713esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005714eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5715$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005716 (eval "$ac_link") 2>&5
5717 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005718 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005719 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5720 { (case "(($ac_try" in
5721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5722 *) ac_try_echo=$ac_try;;
5723esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005724eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5725$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005726 (eval "$ac_try") 2>&5
5727 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005728 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005729 (exit $ac_status); }; }; then
5730 ac_cv_kpthread=yes
5731else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005732 $as_echo "$as_me: program exited with status $ac_status" >&5
5733$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005734sed 's/^/| /' conftest.$ac_ext >&5
5735
5736( exit $ac_status )
5737ac_cv_kpthread=no
5738fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005739rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005740rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5741fi
5742
5743
5744CC="$ac_save_cc"
5745fi
5746
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005747{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5748$as_echo "$ac_cv_kpthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005749fi
5750
5751if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5752then
5753# -Kthread, if available, provides the right #defines
5754# and linker options to make pthread_create available
5755# Some compilers won't report that they do not support -Kthread,
5756# so we need to run a program to see whether it really made the
5757# function available.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005758{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5759$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005760if test "${ac_cv_kthread+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005761 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005762else
5763 ac_save_cc="$CC"
5764CC="$CC -Kthread"
5765if test "$cross_compiling" = yes; then
5766 ac_cv_kthread=no
5767else
5768 cat >conftest.$ac_ext <<_ACEOF
5769/* confdefs.h. */
5770_ACEOF
5771cat confdefs.h >>conftest.$ac_ext
5772cat >>conftest.$ac_ext <<_ACEOF
5773/* end confdefs.h. */
5774
5775#include <pthread.h>
5776
5777void* routine(void* p){return NULL;}
5778
5779int main(){
5780 pthread_t p;
5781 if(pthread_create(&p,NULL,routine,NULL)!=0)
5782 return 1;
5783 (void)pthread_detach(p);
5784 return 0;
5785}
5786
5787_ACEOF
5788rm -f conftest$ac_exeext
5789if { (ac_try="$ac_link"
5790case "(($ac_try" in
5791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5792 *) ac_try_echo=$ac_try;;
5793esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005794eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5795$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005796 (eval "$ac_link") 2>&5
5797 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005798 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005799 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5800 { (case "(($ac_try" in
5801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5802 *) ac_try_echo=$ac_try;;
5803esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005804eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5805$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005806 (eval "$ac_try") 2>&5
5807 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005808 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005809 (exit $ac_status); }; }; then
5810 ac_cv_kthread=yes
5811else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005812 $as_echo "$as_me: program exited with status $ac_status" >&5
5813$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005814sed 's/^/| /' conftest.$ac_ext >&5
5815
5816( exit $ac_status )
5817ac_cv_kthread=no
5818fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005819rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5821fi
5822
5823
5824CC="$ac_save_cc"
5825fi
5826
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005827{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5828$as_echo "$ac_cv_kthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005829fi
5830
5831if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5832then
5833# -pthread, if available, provides the right #defines
5834# and linker options to make pthread_create available
5835# Some compilers won't report that they do not support -pthread,
5836# so we need to run a program to see whether it really made the
5837# function available.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005838{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5839$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005840if test "${ac_cv_thread+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005841 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005842else
5843 ac_save_cc="$CC"
5844CC="$CC -pthread"
5845if test "$cross_compiling" = yes; then
5846 ac_cv_pthread=no
5847else
5848 cat >conftest.$ac_ext <<_ACEOF
5849/* confdefs.h. */
5850_ACEOF
5851cat confdefs.h >>conftest.$ac_ext
5852cat >>conftest.$ac_ext <<_ACEOF
5853/* end confdefs.h. */
5854
5855#include <pthread.h>
5856
5857void* routine(void* p){return NULL;}
5858
5859int main(){
5860 pthread_t p;
5861 if(pthread_create(&p,NULL,routine,NULL)!=0)
5862 return 1;
5863 (void)pthread_detach(p);
5864 return 0;
5865}
5866
5867_ACEOF
5868rm -f conftest$ac_exeext
5869if { (ac_try="$ac_link"
5870case "(($ac_try" in
5871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5872 *) ac_try_echo=$ac_try;;
5873esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005874eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5875$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005876 (eval "$ac_link") 2>&5
5877 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005878 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005879 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5880 { (case "(($ac_try" in
5881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5882 *) ac_try_echo=$ac_try;;
5883esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005884eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5885$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005886 (eval "$ac_try") 2>&5
5887 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005888 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005889 (exit $ac_status); }; }; then
5890 ac_cv_pthread=yes
5891else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005892 $as_echo "$as_me: program exited with status $ac_status" >&5
5893$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005894sed 's/^/| /' conftest.$ac_ext >&5
5895
5896( exit $ac_status )
5897ac_cv_pthread=no
5898fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005899rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00005900rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5901fi
5902
5903
5904CC="$ac_save_cc"
5905fi
5906
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005907{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5908$as_echo "$ac_cv_pthread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005909fi
5910
5911# If we have set a CC compiler flag for thread support then
5912# check if it works for CXX, too.
5913ac_cv_cxx_thread=no
5914if test ! -z "$CXX"
5915then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005916{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5917$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005918ac_save_cxx="$CXX"
5919
5920if test "$ac_cv_kpthread" = "yes"
5921then
5922 CXX="$CXX -Kpthread"
5923 ac_cv_cxx_thread=yes
5924elif test "$ac_cv_kthread" = "yes"
5925then
5926 CXX="$CXX -Kthread"
5927 ac_cv_cxx_thread=yes
5928elif test "$ac_cv_pthread" = "yes"
5929then
5930 CXX="$CXX -pthread"
5931 ac_cv_cxx_thread=yes
5932fi
5933
5934if test $ac_cv_cxx_thread = yes
5935then
5936 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5937 $CXX -c conftest.$ac_ext 2>&5
5938 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5939 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5940 then
5941 ac_cv_cxx_thread=yes
5942 else
5943 ac_cv_cxx_thread=no
5944 fi
5945 rm -fr conftest*
5946fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005947{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5948$as_echo "$ac_cv_cxx_thread" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005949fi
5950CXX="$ac_save_cxx"
5951
5952
5953# checks for header files
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005954{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5955$as_echo_n "checking for ANSI C header files... " >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00005956if test "${ac_cv_header_stdc+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005957 $as_echo_n "(cached) " >&6
Antoine Pitrou20327222009-05-24 20:39:11 +00005958else
5959 cat >conftest.$ac_ext <<_ACEOF
5960/* confdefs.h. */
5961_ACEOF
5962cat confdefs.h >>conftest.$ac_ext
5963cat >>conftest.$ac_ext <<_ACEOF
5964/* end confdefs.h. */
5965#include <stdlib.h>
5966#include <stdarg.h>
5967#include <string.h>
5968#include <float.h>
5969
5970int
5971main ()
5972{
5973
5974 ;
5975 return 0;
5976}
5977_ACEOF
5978rm -f conftest.$ac_objext
5979if { (ac_try="$ac_compile"
5980case "(($ac_try" in
5981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5982 *) ac_try_echo=$ac_try;;
5983esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005984eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5985$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005986 (eval "$ac_compile") 2>conftest.er1
5987 ac_status=$?
5988 grep -v '^ *+' conftest.er1 >conftest.err
5989 rm -f conftest.er1
5990 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005991 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005992 (exit $ac_status); } && {
5993 test -z "$ac_c_werror_flag" ||
5994 test ! -s conftest.err
5995 } && test -s conftest.$ac_objext; then
5996 ac_cv_header_stdc=yes
5997else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00005998 $as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00005999sed 's/^/| /' conftest.$ac_ext >&5
6000
6001 ac_cv_header_stdc=no
6002fi
6003
6004rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6005
6006if test $ac_cv_header_stdc = yes; then
6007 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6008 cat >conftest.$ac_ext <<_ACEOF
6009/* confdefs.h. */
6010_ACEOF
6011cat confdefs.h >>conftest.$ac_ext
6012cat >>conftest.$ac_ext <<_ACEOF
6013/* end confdefs.h. */
6014#include <string.h>
6015
6016_ACEOF
6017if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6018 $EGREP "memchr" >/dev/null 2>&1; then
6019 :
6020else
6021 ac_cv_header_stdc=no
6022fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00006023rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00006024
6025fi
6026
6027if test $ac_cv_header_stdc = yes; then
6028 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6029 cat >conftest.$ac_ext <<_ACEOF
6030/* confdefs.h. */
6031_ACEOF
6032cat confdefs.h >>conftest.$ac_ext
6033cat >>conftest.$ac_ext <<_ACEOF
6034/* end confdefs.h. */
6035#include <stdlib.h>
6036
6037_ACEOF
6038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6039 $EGREP "free" >/dev/null 2>&1; then
6040 :
6041else
6042 ac_cv_header_stdc=no
6043fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00006044rm -f conftest*
Antoine Pitrou20327222009-05-24 20:39:11 +00006045
6046fi
6047
6048if test $ac_cv_header_stdc = yes; then
6049 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6050 if test "$cross_compiling" = yes; then
6051 :
6052else
6053 cat >conftest.$ac_ext <<_ACEOF
6054/* confdefs.h. */
6055_ACEOF
6056cat confdefs.h >>conftest.$ac_ext
6057cat >>conftest.$ac_ext <<_ACEOF
6058/* end confdefs.h. */
6059#include <ctype.h>
6060#include <stdlib.h>
6061#if ((' ' & 0x0FF) == 0x020)
6062# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6063# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6064#else
6065# define ISLOWER(c) \
6066 (('a' <= (c) && (c) <= 'i') \
6067 || ('j' <= (c) && (c) <= 'r') \
6068 || ('s' <= (c) && (c) <= 'z'))
6069# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6070#endif
6071
6072#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6073int
6074main ()
6075{
6076 int i;
6077 for (i = 0; i < 256; i++)
6078 if (XOR (islower (i), ISLOWER (i))
6079 || toupper (i) != TOUPPER (i))
6080 return 2;
6081 return 0;
6082}
6083_ACEOF
6084rm -f conftest$ac_exeext
6085if { (ac_try="$ac_link"
6086case "(($ac_try" in
6087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6088 *) ac_try_echo=$ac_try;;
6089esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006090eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6091$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006092 (eval "$ac_link") 2>&5
6093 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006094 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006095 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6096 { (case "(($ac_try" in
6097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6098 *) ac_try_echo=$ac_try;;
6099esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006100eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6101$as_echo "$ac_try_echo") >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006102 (eval "$ac_try") 2>&5
6103 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006104 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006105 (exit $ac_status); }; }; then
6106 :
6107else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006108 $as_echo "$as_me: program exited with status $ac_status" >&5
6109$as_echo "$as_me: failed program was:" >&5
Antoine Pitrou20327222009-05-24 20:39:11 +00006110sed 's/^/| /' conftest.$ac_ext >&5
6111
6112( exit $ac_status )
6113ac_cv_header_stdc=no
6114fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006115rm -rf conftest.dSYM
Antoine Pitrou20327222009-05-24 20:39:11 +00006116rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6117fi
6118
6119
6120fi
6121fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006122{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6123$as_echo "$ac_cv_header_stdc" >&6; }
Antoine Pitrou20327222009-05-24 20:39:11 +00006124if test $ac_cv_header_stdc = yes; then
6125
6126cat >>confdefs.h <<\_ACEOF
6127#define STDC_HEADERS 1
6128_ACEOF
6129
6130fi
6131
6132
Martin v. Löwis11437992002-04-12 09:54:03 +00006133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
Anthony Baxter8a560de2004-10-13 15:30:56 +00006168
Martin v. Löwisc3001752005-01-23 09:27:24 +00006169
Martin v. Löwis11017b12006-01-14 18:12:57 +00006170
Thomas Wouters477c8d52006-05-27 19:21:47 +00006171
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006172
6173
6174
6175
6176
6177
6178
6179
Thomas Wouters89f507f2006-12-13 04:49:30 +00006180
Christian Heimes043d6f62008-01-07 17:19:16 +00006181
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006182
6183
Christian Heimesbbe741d2008-03-28 10:53:29 +00006184
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006185
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006186for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6187fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006188ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006189shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006190unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006191sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6192sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006193sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006194sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006195sys/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 +00006196sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00006197bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006198do
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006199as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006200if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006201 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6202$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006203if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006204 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006205fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006206ac_res=`eval 'as_val=${'$as_ac_Header'}
6207 $as_echo "$as_val"'`
6208 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6209$as_echo "$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006210else
Martin v. Löwis11437992002-04-12 09:54:03 +00006211 # Is the header compilable?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006212{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6213$as_echo_n "checking $ac_header usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006214cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006215/* confdefs.h. */
6216_ACEOF
6217cat confdefs.h >>conftest.$ac_ext
6218cat >>conftest.$ac_ext <<_ACEOF
6219/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006220$ac_includes_default
6221#include <$ac_header>
6222_ACEOF
6223rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006224if { (ac_try="$ac_compile"
6225case "(($ac_try" in
6226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6227 *) ac_try_echo=$ac_try;;
6228esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006229eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6230$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006233 grep -v '^ *+' conftest.er1 >conftest.err
6234 rm -f conftest.er1
6235 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006236 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006237 (exit $ac_status); } && {
6238 test -z "$ac_c_werror_flag" ||
6239 test ! -s conftest.err
6240 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006241 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00006242else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006243 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006244sed 's/^/| /' conftest.$ac_ext >&5
6245
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006246 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006247fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006248
6249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006250{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6251$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006252
6253# Is the header present?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006254{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6255$as_echo_n "checking $ac_header presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006256cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006257/* confdefs.h. */
6258_ACEOF
6259cat confdefs.h >>conftest.$ac_ext
6260cat >>conftest.$ac_ext <<_ACEOF
6261/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006262#include <$ac_header>
6263_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006264if { (ac_try="$ac_cpp conftest.$ac_ext"
6265case "(($ac_try" in
6266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6267 *) ac_try_echo=$ac_try;;
6268esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006269eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6270$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006271 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006272 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006273 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00006274 rm -f conftest.er1
6275 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006276 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006277 (exit $ac_status); } >/dev/null && {
6278 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6279 test ! -s conftest.err
6280 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006281 ac_header_preproc=yes
6282else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006283 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006284sed 's/^/| /' conftest.$ac_ext >&5
6285
Martin v. Löwis11437992002-04-12 09:54:03 +00006286 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006287fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006288
Martin v. Löwis11437992002-04-12 09:54:03 +00006289rm -f conftest.err conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006290{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6291$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006292
6293# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006294case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6295 yes:no: )
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006296 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6297$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6298 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6299$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006300 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006301 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006302 no:yes:* )
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006303 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6304$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6305 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6306$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6307 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6308$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6309 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6310$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6311 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6312$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6313 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6314$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006315 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006316## -------------------------------------- ##
6317## Report this to http://bugs.python.org/ ##
6318## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006319_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006320 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006321 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00006322esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006323{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6324$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006325if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006326 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006327else
Skip Montanarof0d5f792004-08-15 14:08:23 +00006328 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006329fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006330ac_res=`eval 'as_val=${'$as_ac_Header'}
6331 $as_echo "$as_val"'`
6332 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6333$as_echo "$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006334
6335fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006336as_val=`eval 'as_val=${'$as_ac_Header'}
6337 $as_echo "$as_val"'`
6338 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006339 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006340#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006341_ACEOF
6342
6343fi
6344
Guido van Rossum627b2d71993-12-24 10:39:16 +00006345done
6346
Martin v. Löwis11437992002-04-12 09:54:03 +00006347
6348
6349
6350
6351
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006352ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006353for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006354 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6355{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
6356$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006357if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006358 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006359else
Martin v. Löwis11437992002-04-12 09:54:03 +00006360 cat >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. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006366#include <sys/types.h>
6367#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006368
Martin v. Löwis11437992002-04-12 09:54:03 +00006369int
6370main ()
6371{
6372if ((DIR *) 0)
6373return 0;
6374 ;
6375 return 0;
6376}
6377_ACEOF
6378rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006379if { (ac_try="$ac_compile"
6380case "(($ac_try" in
6381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6382 *) ac_try_echo=$ac_try;;
6383esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006384eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6385$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006386 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006387 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006388 grep -v '^ *+' conftest.er1 >conftest.err
6389 rm -f conftest.er1
6390 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006391 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006392 (exit $ac_status); } && {
6393 test -z "$ac_c_werror_flag" ||
6394 test ! -s conftest.err
6395 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006396 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006397else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006398 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006399sed 's/^/| /' conftest.$ac_ext >&5
6400
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006401 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006402fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006403
6404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006405fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006406ac_res=`eval 'as_val=${'$as_ac_Header'}
6407 $as_echo "$as_val"'`
6408 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6409$as_echo "$ac_res" >&6; }
6410as_val=`eval 'as_val=${'$as_ac_Header'}
6411 $as_echo "$as_val"'`
6412 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006413 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006414#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006415_ACEOF
6416
6417ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006418fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006419
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006420done
6421# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6422if test $ac_header_dirent = dirent.h; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006423 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6424$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006425if test "${ac_cv_search_opendir+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006426 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006427else
Martin v. Löwis11437992002-04-12 09:54:03 +00006428 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006429cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006430/* confdefs.h. */
6431_ACEOF
6432cat confdefs.h >>conftest.$ac_ext
6433cat >>conftest.$ac_ext <<_ACEOF
6434/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006435
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006436/* Override any GCC internal prototype to avoid an error.
6437 Use char because int might match the return type of a GCC
6438 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006439#ifdef __cplusplus
6440extern "C"
6441#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006442char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006443int
6444main ()
6445{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006446return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006447 ;
6448 return 0;
6449}
6450_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006451for ac_lib in '' dir; do
6452 if test -z "$ac_lib"; then
6453 ac_res="none required"
6454 else
6455 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006456 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006457 fi
6458 rm -f conftest.$ac_objext conftest$ac_exeext
6459if { (ac_try="$ac_link"
6460case "(($ac_try" in
6461 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6462 *) ac_try_echo=$ac_try;;
6463esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006464eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6465$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006466 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006467 ac_status=$?
6468 grep -v '^ *+' conftest.er1 >conftest.err
6469 rm -f conftest.er1
6470 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006471 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006472 (exit $ac_status); } && {
6473 test -z "$ac_c_werror_flag" ||
6474 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006475 } && test -s conftest$ac_exeext && {
6476 test "$cross_compiling" = yes ||
6477 $as_test_x conftest$ac_exeext
6478 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006479 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006480else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006481 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006482sed 's/^/| /' conftest.$ac_ext >&5
6483
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006484
Thomas Wouters477c8d52006-05-27 19:21:47 +00006485fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006486
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006487rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006488rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6489 conftest$ac_exeext
6490 if test "${ac_cv_search_opendir+set}" = set; then
6491 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006492fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006493done
6494if test "${ac_cv_search_opendir+set}" = set; then
6495 :
6496else
6497 ac_cv_search_opendir=no
6498fi
6499rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006500LIBS=$ac_func_search_save_LIBS
6501fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006502{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6503$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006504ac_res=$ac_cv_search_opendir
6505if test "$ac_res" != no; then
6506 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006507
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006508fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006509
Michael W. Hudson54241132001-12-07 15:38:26 +00006510else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006511 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6512$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006513if test "${ac_cv_search_opendir+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006514 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006515else
6516 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006517cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006518/* confdefs.h. */
6519_ACEOF
6520cat confdefs.h >>conftest.$ac_ext
6521cat >>conftest.$ac_ext <<_ACEOF
6522/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006523
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006524/* Override any GCC internal prototype to avoid an error.
6525 Use char because int might match the return type of a GCC
6526 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006527#ifdef __cplusplus
6528extern "C"
6529#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006530char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006531int
6532main ()
6533{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006534return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006535 ;
6536 return 0;
6537}
6538_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006539for ac_lib in '' x; do
6540 if test -z "$ac_lib"; then
6541 ac_res="none required"
6542 else
6543 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006544 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006545 fi
6546 rm -f conftest.$ac_objext conftest$ac_exeext
6547if { (ac_try="$ac_link"
6548case "(($ac_try" in
6549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6550 *) ac_try_echo=$ac_try;;
6551esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006552eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6553$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006554 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006555 ac_status=$?
6556 grep -v '^ *+' conftest.er1 >conftest.err
6557 rm -f conftest.er1
6558 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006559 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006560 (exit $ac_status); } && {
6561 test -z "$ac_c_werror_flag" ||
6562 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006563 } && test -s conftest$ac_exeext && {
6564 test "$cross_compiling" = yes ||
6565 $as_test_x conftest$ac_exeext
6566 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006567 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006568else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006569 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006570sed 's/^/| /' conftest.$ac_ext >&5
6571
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006572
Thomas Wouters477c8d52006-05-27 19:21:47 +00006573fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006574
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006575rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6577 conftest$ac_exeext
6578 if test "${ac_cv_search_opendir+set}" = set; then
6579 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006581done
6582if test "${ac_cv_search_opendir+set}" = set; then
6583 :
6584else
6585 ac_cv_search_opendir=no
6586fi
6587rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006588LIBS=$ac_func_search_save_LIBS
6589fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006590{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6591$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006592ac_res=$ac_cv_search_opendir
6593if test "$ac_res" != no; then
6594 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006595
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006596fi
6597
6598fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006599
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006600{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6601$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006602if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006603 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006604else
6605 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006606/* confdefs.h. */
6607_ACEOF
6608cat confdefs.h >>conftest.$ac_ext
6609cat >>conftest.$ac_ext <<_ACEOF
6610/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006611#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006612int
6613main ()
6614{
6615return makedev(0, 0);
6616 ;
6617 return 0;
6618}
6619_ACEOF
6620rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006621if { (ac_try="$ac_link"
6622case "(($ac_try" in
6623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6624 *) ac_try_echo=$ac_try;;
6625esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006626eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6627$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006628 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006629 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006630 grep -v '^ *+' conftest.er1 >conftest.err
6631 rm -f conftest.er1
6632 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006633 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006634 (exit $ac_status); } && {
6635 test -z "$ac_c_werror_flag" ||
6636 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006637 } && test -s conftest$ac_exeext && {
6638 test "$cross_compiling" = yes ||
6639 $as_test_x conftest$ac_exeext
6640 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006641 ac_cv_header_sys_types_h_makedev=yes
6642else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006643 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006644sed 's/^/| /' conftest.$ac_ext >&5
6645
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006646 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006648
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006649rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006650rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006651 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006652
6653fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006654{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6655$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006656
6657if test $ac_cv_header_sys_types_h_makedev = no; then
6658if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006659 { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6660$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006661if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006662 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006663fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006664{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6665$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006666else
6667 # Is the header compilable?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006668{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6669$as_echo_n "checking sys/mkdev.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006670cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006671/* confdefs.h. */
6672_ACEOF
6673cat confdefs.h >>conftest.$ac_ext
6674cat >>conftest.$ac_ext <<_ACEOF
6675/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006676$ac_includes_default
6677#include <sys/mkdev.h>
6678_ACEOF
6679rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006680if { (ac_try="$ac_compile"
6681case "(($ac_try" in
6682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6683 *) ac_try_echo=$ac_try;;
6684esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006685eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6686$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006689 grep -v '^ *+' conftest.er1 >conftest.err
6690 rm -f conftest.er1
6691 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006692 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006693 (exit $ac_status); } && {
6694 test -z "$ac_c_werror_flag" ||
6695 test ! -s conftest.err
6696 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006697 ac_header_compiler=yes
6698else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006699 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006700sed 's/^/| /' conftest.$ac_ext >&5
6701
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006702 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006704
6705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006706{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6707$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006708
6709# Is the header present?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006710{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6711$as_echo_n "checking sys/mkdev.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006712cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006713/* confdefs.h. */
6714_ACEOF
6715cat confdefs.h >>conftest.$ac_ext
6716cat >>conftest.$ac_ext <<_ACEOF
6717/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006718#include <sys/mkdev.h>
6719_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006720if { (ac_try="$ac_cpp conftest.$ac_ext"
6721case "(($ac_try" in
6722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6723 *) ac_try_echo=$ac_try;;
6724esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006725eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6726$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006727 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006728 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006729 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006730 rm -f conftest.er1
6731 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006732 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006733 (exit $ac_status); } >/dev/null && {
6734 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6735 test ! -s conftest.err
6736 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006737 ac_header_preproc=yes
6738else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006739 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006740sed 's/^/| /' conftest.$ac_ext >&5
6741
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006742 ac_header_preproc=no
6743fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006744
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006745rm -f conftest.err conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006746{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6747$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006748
6749# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006750case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6751 yes:no: )
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006752 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6753$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6754 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6755$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006756 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006757 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006758 no:yes:* )
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006759 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6760$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6761 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6762$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6763 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6764$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6765 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6766$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6767 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6768$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6769 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6770$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006771 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006772## -------------------------------------- ##
6773## Report this to http://bugs.python.org/ ##
6774## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006775_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006776 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006777 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006778esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006779{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6780$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006781if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006782 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006783else
6784 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6785fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006786{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6787$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006788
6789fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006790if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006791
6792cat >>confdefs.h <<\_ACEOF
6793#define MAJOR_IN_MKDEV 1
6794_ACEOF
6795
6796fi
6797
6798
6799
6800 if test $ac_cv_header_sys_mkdev_h = no; then
6801 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006802 { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6803$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006804if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006805 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006806fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006807{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6808$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006809else
6810 # Is the header compilable?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006811{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6812$as_echo_n "checking sys/sysmacros.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006813cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006814/* confdefs.h. */
6815_ACEOF
6816cat confdefs.h >>conftest.$ac_ext
6817cat >>conftest.$ac_ext <<_ACEOF
6818/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006819$ac_includes_default
6820#include <sys/sysmacros.h>
6821_ACEOF
6822rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006823if { (ac_try="$ac_compile"
6824case "(($ac_try" in
6825 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6826 *) ac_try_echo=$ac_try;;
6827esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006828eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6829$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006830 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006831 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006832 grep -v '^ *+' conftest.er1 >conftest.err
6833 rm -f conftest.er1
6834 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006835 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006836 (exit $ac_status); } && {
6837 test -z "$ac_c_werror_flag" ||
6838 test ! -s conftest.err
6839 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006840 ac_header_compiler=yes
6841else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006842 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006843sed 's/^/| /' conftest.$ac_ext >&5
6844
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006845 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006846fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006847
6848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006849{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6850$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006851
6852# Is the header present?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006853{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6854$as_echo_n "checking sys/sysmacros.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006855cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006856/* confdefs.h. */
6857_ACEOF
6858cat confdefs.h >>conftest.$ac_ext
6859cat >>conftest.$ac_ext <<_ACEOF
6860/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006861#include <sys/sysmacros.h>
6862_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006863if { (ac_try="$ac_cpp conftest.$ac_ext"
6864case "(($ac_try" in
6865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6866 *) ac_try_echo=$ac_try;;
6867esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006868eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6869$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006870 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006871 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006872 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006873 rm -f conftest.er1
6874 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006875 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006876 (exit $ac_status); } >/dev/null && {
6877 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6878 test ! -s conftest.err
6879 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006880 ac_header_preproc=yes
6881else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006882 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006883sed 's/^/| /' conftest.$ac_ext >&5
6884
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006885 ac_header_preproc=no
6886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006887
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006888rm -f conftest.err conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006889{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6890$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006891
6892# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006893case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6894 yes:no: )
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006895 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6896$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6897 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6898$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006899 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006900 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006901 no:yes:* )
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006902 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6903$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6904 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6905$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6906 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6907$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6908 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6909$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6910 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6911$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6912 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6913$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006914 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006915## -------------------------------------- ##
6916## Report this to http://bugs.python.org/ ##
6917## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006918_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006919 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006920 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006921esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006922{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6923$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006924if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006925 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006926else
6927 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6928fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006929{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6930$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006931
6932fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006933if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006934
6935cat >>confdefs.h <<\_ACEOF
6936#define MAJOR_IN_SYSMACROS 1
6937_ACEOF
6938
6939fi
6940
6941
6942 fi
6943fi
6944
Michael W. Hudson54241132001-12-07 15:38:26 +00006945
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006946# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006947
6948for ac_header in term.h
6949do
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006950as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6951{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6952$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006953if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006954 $as_echo_n "(cached) " >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006955else
6956 cat >conftest.$ac_ext <<_ACEOF
6957/* confdefs.h. */
6958_ACEOF
6959cat confdefs.h >>conftest.$ac_ext
6960cat >>conftest.$ac_ext <<_ACEOF
6961/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006962
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006963#ifdef HAVE_CURSES_H
6964#include <curses.h>
6965#endif
6966
6967
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006968#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006969_ACEOF
6970rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006971if { (ac_try="$ac_compile"
6972case "(($ac_try" in
6973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6974 *) ac_try_echo=$ac_try;;
6975esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006976eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6977$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006978 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006979 ac_status=$?
6980 grep -v '^ *+' conftest.er1 >conftest.err
6981 rm -f conftest.er1
6982 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006983 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006984 (exit $ac_status); } && {
6985 test -z "$ac_c_werror_flag" ||
6986 test ! -s conftest.err
6987 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006988 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006989else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006990 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006991sed 's/^/| /' conftest.$ac_ext >&5
6992
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006993 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006994fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006995
6996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006997fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00006998ac_res=`eval 'as_val=${'$as_ac_Header'}
6999 $as_echo "$as_val"'`
7000 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7001$as_echo "$ac_res" >&6; }
7002as_val=`eval 'as_val=${'$as_ac_Header'}
7003 $as_echo "$as_val"'`
7004 if test "x$as_val" = x""yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007005 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007006#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007007_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007008
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00007009fi
7010
7011done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007012
7013
Martin v. Löwis11017b12006-01-14 18:12:57 +00007014# On Linux, netlink.h requires asm/types.h
7015
7016for ac_header in linux/netlink.h
7017do
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007018as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7019{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
7020$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007021if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007022 $as_echo_n "(cached) " >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00007023else
7024 cat >conftest.$ac_ext <<_ACEOF
7025/* confdefs.h. */
7026_ACEOF
7027cat confdefs.h >>conftest.$ac_ext
7028cat >>conftest.$ac_ext <<_ACEOF
7029/* end confdefs.h. */
7030
7031#ifdef HAVE_ASM_TYPES_H
7032#include <asm/types.h>
7033#endif
7034#ifdef HAVE_SYS_SOCKET_H
7035#include <sys/socket.h>
7036#endif
7037
7038
7039#include <$ac_header>
7040_ACEOF
7041rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007042if { (ac_try="$ac_compile"
7043case "(($ac_try" in
7044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7045 *) ac_try_echo=$ac_try;;
7046esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007047eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7048$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007049 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007050 ac_status=$?
7051 grep -v '^ *+' conftest.er1 >conftest.err
7052 rm -f conftest.er1
7053 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007054 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007055 (exit $ac_status); } && {
7056 test -z "$ac_c_werror_flag" ||
7057 test ! -s conftest.err
7058 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00007059 eval "$as_ac_Header=yes"
7060else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007061 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00007062sed 's/^/| /' conftest.$ac_ext >&5
7063
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007064 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00007065fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007066
7067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00007068fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007069ac_res=`eval 'as_val=${'$as_ac_Header'}
7070 $as_echo "$as_val"'`
7071 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7072$as_echo "$ac_res" >&6; }
7073as_val=`eval 'as_val=${'$as_ac_Header'}
7074 $as_echo "$as_val"'`
7075 if test "x$as_val" = x""yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00007076 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007077#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007078_ACEOF
7079
7080fi
7081
7082done
7083
7084
Guido van Rossum627b2d71993-12-24 10:39:16 +00007085# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007086was_it_defined=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007087{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
7088$as_echo_n "checking for clock_t in time.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007089cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007090/* confdefs.h. */
7091_ACEOF
7092cat confdefs.h >>conftest.$ac_ext
7093cat >>conftest.$ac_ext <<_ACEOF
7094/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007095#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007096
7097_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007098if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007099 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00007100 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007101else
Martin v. Löwis11437992002-04-12 09:54:03 +00007102
7103
7104cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007105#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00007106_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007107
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007108
Guido van Rossum627b2d71993-12-24 10:39:16 +00007109fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00007110rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007111
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007112{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
7113$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007114
Neal Norwitz11690112002-07-30 01:08:28 +00007115# Check whether using makedev requires defining _OSF_SOURCE
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007116{ $as_echo "$as_me:$LINENO: checking for makedev" >&5
7117$as_echo_n "checking for makedev... " >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007119/* confdefs.h. */
7120_ACEOF
7121cat confdefs.h >>conftest.$ac_ext
7122cat >>conftest.$ac_ext <<_ACEOF
7123/* end confdefs.h. */
Jesus Cea0f752ee2010-04-28 12:03:06 +00007124
7125#if defined(MAJOR_IN_MKDEV)
7126#include <sys/mkdev.h>
7127#elif defined(MAJOR_IN_SYSMACROS)
7128#include <sys/sysmacros.h>
7129#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007130#include <sys/types.h>
Jesus Cea0f752ee2010-04-28 12:03:06 +00007131#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007132int
7133main ()
7134{
7135 makedev(0, 0)
7136 ;
7137 return 0;
7138}
7139_ACEOF
7140rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007141if { (ac_try="$ac_link"
7142case "(($ac_try" in
7143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7144 *) ac_try_echo=$ac_try;;
7145esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007146eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7147$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007148 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007150 grep -v '^ *+' conftest.er1 >conftest.err
7151 rm -f conftest.er1
7152 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007153 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007154 (exit $ac_status); } && {
7155 test -z "$ac_c_werror_flag" ||
7156 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007157 } && test -s conftest$ac_exeext && {
7158 test "$cross_compiling" = yes ||
7159 $as_test_x conftest$ac_exeext
7160 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007161 ac_cv_has_makedev=yes
7162else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007163 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007164sed 's/^/| /' conftest.$ac_ext >&5
7165
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007166 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007167fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007168
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007169rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007170rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007171 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007172if test "$ac_cv_has_makedev" = "no"; then
7173 # we didn't link, try if _OSF_SOURCE will allow us to link
7174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007175/* confdefs.h. */
7176_ACEOF
7177cat confdefs.h >>conftest.$ac_ext
7178cat >>conftest.$ac_ext <<_ACEOF
7179/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007180
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007181#define _OSF_SOURCE 1
7182#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007183
Neal Norwitz11690112002-07-30 01:08:28 +00007184int
7185main ()
7186{
7187 makedev(0, 0)
7188 ;
7189 return 0;
7190}
7191_ACEOF
7192rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007193if { (ac_try="$ac_link"
7194case "(($ac_try" in
7195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7196 *) ac_try_echo=$ac_try;;
7197esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007198eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7199$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007200 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007201 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007202 grep -v '^ *+' conftest.er1 >conftest.err
7203 rm -f conftest.er1
7204 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007205 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007206 (exit $ac_status); } && {
7207 test -z "$ac_c_werror_flag" ||
7208 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007209 } && test -s conftest$ac_exeext && {
7210 test "$cross_compiling" = yes ||
7211 $as_test_x conftest$ac_exeext
7212 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007213 ac_cv_has_makedev=yes
7214else
Benjamin Peterson82af01d2010-05-02 16:45:41 +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 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007220
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007221rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007222rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007223 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007224 if test "$ac_cv_has_makedev" = "yes"; then
7225
7226cat >>confdefs.h <<\_ACEOF
7227#define _OSF_SOURCE 1
7228_ACEOF
7229
7230 fi
7231fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007232{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
7233$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007234if test "$ac_cv_has_makedev" = "yes"; then
7235
7236cat >>confdefs.h <<\_ACEOF
7237#define HAVE_MAKEDEV 1
7238_ACEOF
7239
7240fi
7241
Martin v. Löwis399a6892002-10-04 10:22:02 +00007242# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7243# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7244# defined, but the compiler does not support pragma redefine_extname,
7245# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7246# structures (such as rlimit64) without declaring them. As a
7247# work-around, disable LFS on such configurations
7248
7249use_lfs=yes
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007250{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
7251$as_echo_n "checking Solaris LFS bug... " >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007252cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007253/* confdefs.h. */
7254_ACEOF
7255cat confdefs.h >>conftest.$ac_ext
7256cat >>conftest.$ac_ext <<_ACEOF
7257/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007258
7259#define _LARGEFILE_SOURCE 1
7260#define _FILE_OFFSET_BITS 64
7261#include <sys/resource.h>
7262
Martin v. Löwis399a6892002-10-04 10:22:02 +00007263int
7264main ()
7265{
7266struct rlimit foo;
7267 ;
7268 return 0;
7269}
7270_ACEOF
7271rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007272if { (ac_try="$ac_compile"
7273case "(($ac_try" in
7274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7275 *) ac_try_echo=$ac_try;;
7276esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007277eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7278$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00007280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007281 grep -v '^ *+' conftest.er1 >conftest.err
7282 rm -f conftest.er1
7283 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007284 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007285 (exit $ac_status); } && {
7286 test -z "$ac_c_werror_flag" ||
7287 test ! -s conftest.err
7288 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00007289 sol_lfs_bug=no
7290else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007291 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007292sed 's/^/| /' conftest.$ac_ext >&5
7293
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007294 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007296
7297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007298{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
7299$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007300if test "$sol_lfs_bug" = "yes"; then
7301 use_lfs=no
7302fi
7303
7304if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007305# Two defines needed to enable largefile support on various platforms
7306# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00007307
Martin v. Löwis11437992002-04-12 09:54:03 +00007308cat >>confdefs.h <<\_ACEOF
7309#define _LARGEFILE_SOURCE 1
7310_ACEOF
7311
7312
7313cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007314#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00007315_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007316
Martin v. Löwis399a6892002-10-04 10:22:02 +00007317fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007318
Guido van Rossum84e7b241996-08-19 21:59:00 +00007319# Add some code to confdefs.h so that the test for off_t works on SCO
7320cat >> confdefs.h <<\EOF
7321#if defined(SCO_DS)
7322#undef _OFF_T
7323#endif
7324EOF
7325
Guido van Rossumef2255b2000-03-10 22:30:29 +00007326# Type availability checks
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007327{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5
7328$as_echo_n "checking for mode_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007329if test "${ac_cv_type_mode_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007330 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007331else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007332 ac_cv_type_mode_t=no
7333cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00007334/* confdefs.h. */
7335_ACEOF
7336cat confdefs.h >>conftest.$ac_ext
7337cat >>conftest.$ac_ext <<_ACEOF
7338/* end confdefs.h. */
7339$ac_includes_default
7340int
7341main ()
7342{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007343if (sizeof (mode_t))
7344 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007345 ;
7346 return 0;
7347}
7348_ACEOF
7349rm -f conftest.$ac_objext
7350if { (ac_try="$ac_compile"
7351case "(($ac_try" in
7352 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7353 *) ac_try_echo=$ac_try;;
7354esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007355eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7356$as_echo "$ac_try_echo") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007357 (eval "$ac_compile") 2>conftest.er1
7358 ac_status=$?
7359 grep -v '^ *+' conftest.er1 >conftest.err
7360 rm -f conftest.er1
7361 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007362 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007363 (exit $ac_status); } && {
7364 test -z "$ac_c_werror_flag" ||
7365 test ! -s conftest.err
7366 } && test -s conftest.$ac_objext; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007367 cat >conftest.$ac_ext <<_ACEOF
7368/* confdefs.h. */
7369_ACEOF
7370cat confdefs.h >>conftest.$ac_ext
7371cat >>conftest.$ac_ext <<_ACEOF
7372/* end confdefs.h. */
7373$ac_includes_default
7374int
7375main ()
7376{
7377if (sizeof ((mode_t)))
7378 return 0;
7379 ;
7380 return 0;
7381}
7382_ACEOF
7383rm -f conftest.$ac_objext
7384if { (ac_try="$ac_compile"
7385case "(($ac_try" in
7386 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7387 *) ac_try_echo=$ac_try;;
7388esac
7389eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7390$as_echo "$ac_try_echo") >&5
7391 (eval "$ac_compile") 2>conftest.er1
7392 ac_status=$?
7393 grep -v '^ *+' conftest.er1 >conftest.err
7394 rm -f conftest.er1
7395 cat conftest.err >&5
7396 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7397 (exit $ac_status); } && {
7398 test -z "$ac_c_werror_flag" ||
7399 test ! -s conftest.err
7400 } && test -s conftest.$ac_objext; then
7401 :
Jack Jansendd19cf82001-12-06 22:36:17 +00007402else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007403 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007404sed 's/^/| /' conftest.$ac_ext >&5
7405
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007406 ac_cv_type_mode_t=yes
7407fi
7408
7409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7410else
7411 $as_echo "$as_me: failed program was:" >&5
7412sed 's/^/| /' conftest.$ac_ext >&5
7413
7414
Jack Jansendd19cf82001-12-06 22:36:17 +00007415fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007416
7417rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007418fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007419{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
7420$as_echo "$ac_cv_type_mode_t" >&6; }
7421if test "x$ac_cv_type_mode_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007422 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007423else
Martin v. Löwis11437992002-04-12 09:54:03 +00007424
7425cat >>confdefs.h <<_ACEOF
7426#define mode_t int
7427_ACEOF
7428
7429fi
7430
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007431{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
7432$as_echo_n "checking for off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007433if test "${ac_cv_type_off_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007434 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007435else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007436 ac_cv_type_off_t=no
7437cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00007438/* confdefs.h. */
7439_ACEOF
7440cat confdefs.h >>conftest.$ac_ext
7441cat >>conftest.$ac_ext <<_ACEOF
7442/* end confdefs.h. */
7443$ac_includes_default
7444int
7445main ()
7446{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007447if (sizeof (off_t))
7448 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007449 ;
7450 return 0;
7451}
7452_ACEOF
7453rm -f conftest.$ac_objext
7454if { (ac_try="$ac_compile"
7455case "(($ac_try" in
7456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7457 *) ac_try_echo=$ac_try;;
7458esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007459eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7460$as_echo "$ac_try_echo") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007461 (eval "$ac_compile") 2>conftest.er1
7462 ac_status=$?
7463 grep -v '^ *+' conftest.er1 >conftest.err
7464 rm -f conftest.er1
7465 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007466 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007467 (exit $ac_status); } && {
7468 test -z "$ac_c_werror_flag" ||
7469 test ! -s conftest.err
7470 } && test -s conftest.$ac_objext; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007471 cat >conftest.$ac_ext <<_ACEOF
7472/* confdefs.h. */
7473_ACEOF
7474cat confdefs.h >>conftest.$ac_ext
7475cat >>conftest.$ac_ext <<_ACEOF
7476/* end confdefs.h. */
7477$ac_includes_default
7478int
7479main ()
7480{
7481if (sizeof ((off_t)))
7482 return 0;
7483 ;
7484 return 0;
7485}
7486_ACEOF
7487rm -f conftest.$ac_objext
7488if { (ac_try="$ac_compile"
7489case "(($ac_try" in
7490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7491 *) ac_try_echo=$ac_try;;
7492esac
7493eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7494$as_echo "$ac_try_echo") >&5
7495 (eval "$ac_compile") 2>conftest.er1
7496 ac_status=$?
7497 grep -v '^ *+' conftest.er1 >conftest.err
7498 rm -f conftest.er1
7499 cat conftest.err >&5
7500 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7501 (exit $ac_status); } && {
7502 test -z "$ac_c_werror_flag" ||
7503 test ! -s conftest.err
7504 } && test -s conftest.$ac_objext; then
7505 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007506else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007507 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007508sed 's/^/| /' conftest.$ac_ext >&5
7509
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007510 ac_cv_type_off_t=yes
7511fi
7512
7513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7514else
7515 $as_echo "$as_me: failed program was:" >&5
7516sed 's/^/| /' conftest.$ac_ext >&5
7517
7518
Guido van Rossum627b2d71993-12-24 10:39:16 +00007519fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007520
7521rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007522fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007523{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7524$as_echo "$ac_cv_type_off_t" >&6; }
7525if test "x$ac_cv_type_off_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007526 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007527else
Martin v. Löwis11437992002-04-12 09:54:03 +00007528
7529cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007530#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007531_ACEOF
7532
7533fi
7534
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007535{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
7536$as_echo_n "checking for pid_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007537if test "${ac_cv_type_pid_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007538 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007539else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007540 ac_cv_type_pid_t=no
7541cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00007542/* confdefs.h. */
7543_ACEOF
7544cat confdefs.h >>conftest.$ac_ext
7545cat >>conftest.$ac_ext <<_ACEOF
7546/* end confdefs.h. */
7547$ac_includes_default
7548int
7549main ()
7550{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007551if (sizeof (pid_t))
7552 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007553 ;
7554 return 0;
7555}
7556_ACEOF
7557rm -f conftest.$ac_objext
7558if { (ac_try="$ac_compile"
7559case "(($ac_try" in
7560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7561 *) ac_try_echo=$ac_try;;
7562esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007563eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7564$as_echo "$ac_try_echo") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007565 (eval "$ac_compile") 2>conftest.er1
7566 ac_status=$?
7567 grep -v '^ *+' conftest.er1 >conftest.err
7568 rm -f conftest.er1
7569 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007570 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007571 (exit $ac_status); } && {
7572 test -z "$ac_c_werror_flag" ||
7573 test ! -s conftest.err
7574 } && test -s conftest.$ac_objext; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007575 cat >conftest.$ac_ext <<_ACEOF
7576/* confdefs.h. */
7577_ACEOF
7578cat confdefs.h >>conftest.$ac_ext
7579cat >>conftest.$ac_ext <<_ACEOF
7580/* end confdefs.h. */
7581$ac_includes_default
7582int
7583main ()
7584{
7585if (sizeof ((pid_t)))
7586 return 0;
7587 ;
7588 return 0;
7589}
7590_ACEOF
7591rm -f conftest.$ac_objext
7592if { (ac_try="$ac_compile"
7593case "(($ac_try" in
7594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7595 *) ac_try_echo=$ac_try;;
7596esac
7597eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7598$as_echo "$ac_try_echo") >&5
7599 (eval "$ac_compile") 2>conftest.er1
7600 ac_status=$?
7601 grep -v '^ *+' conftest.er1 >conftest.err
7602 rm -f conftest.er1
7603 cat conftest.err >&5
7604 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7605 (exit $ac_status); } && {
7606 test -z "$ac_c_werror_flag" ||
7607 test ! -s conftest.err
7608 } && test -s conftest.$ac_objext; then
7609 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007610else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007611 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007612sed 's/^/| /' conftest.$ac_ext >&5
7613
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007614 ac_cv_type_pid_t=yes
7615fi
7616
7617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7618else
7619 $as_echo "$as_me: failed program was:" >&5
7620sed 's/^/| /' conftest.$ac_ext >&5
7621
7622
Guido van Rossum627b2d71993-12-24 10:39:16 +00007623fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007624
7625rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007626fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007627{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7628$as_echo "$ac_cv_type_pid_t" >&6; }
7629if test "x$ac_cv_type_pid_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007630 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007631else
Martin v. Löwis11437992002-04-12 09:54:03 +00007632
7633cat >>confdefs.h <<_ACEOF
7634#define pid_t int
7635_ACEOF
7636
7637fi
7638
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007639{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7640$as_echo_n "checking return type of signal handlers... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007641if test "${ac_cv_type_signal+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007642 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007643else
7644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007645/* confdefs.h. */
7646_ACEOF
7647cat confdefs.h >>conftest.$ac_ext
7648cat >>conftest.$ac_ext <<_ACEOF
7649/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007650#include <sys/types.h>
7651#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007652
Martin v. Löwis11437992002-04-12 09:54:03 +00007653int
7654main ()
7655{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007656return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007657 ;
7658 return 0;
7659}
7660_ACEOF
7661rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007662if { (ac_try="$ac_compile"
7663case "(($ac_try" in
7664 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7665 *) ac_try_echo=$ac_try;;
7666esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007667eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7668$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007669 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007670 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007671 grep -v '^ *+' conftest.er1 >conftest.err
7672 rm -f conftest.er1
7673 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007674 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007675 (exit $ac_status); } && {
7676 test -z "$ac_c_werror_flag" ||
7677 test ! -s conftest.err
7678 } && test -s conftest.$ac_objext; then
7679 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007680else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007681 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007682sed 's/^/| /' conftest.$ac_ext >&5
7683
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007684 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007686
7687rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007688fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007689{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7690$as_echo "$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007691
Martin v. Löwis11437992002-04-12 09:54:03 +00007692cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007693#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007694_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007695
Michael W. Hudson54241132001-12-07 15:38:26 +00007696
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007697{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
7698$as_echo_n "checking for size_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007699if test "${ac_cv_type_size_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007700 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007701else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007702 ac_cv_type_size_t=no
7703cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00007704/* confdefs.h. */
7705_ACEOF
7706cat confdefs.h >>conftest.$ac_ext
7707cat >>conftest.$ac_ext <<_ACEOF
7708/* end confdefs.h. */
7709$ac_includes_default
7710int
7711main ()
7712{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007713if (sizeof (size_t))
7714 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00007715 ;
7716 return 0;
7717}
7718_ACEOF
7719rm -f conftest.$ac_objext
7720if { (ac_try="$ac_compile"
7721case "(($ac_try" in
7722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7723 *) ac_try_echo=$ac_try;;
7724esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007725eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7726$as_echo "$ac_try_echo") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007727 (eval "$ac_compile") 2>conftest.er1
7728 ac_status=$?
7729 grep -v '^ *+' conftest.er1 >conftest.err
7730 rm -f conftest.er1
7731 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007732 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00007733 (exit $ac_status); } && {
7734 test -z "$ac_c_werror_flag" ||
7735 test ! -s conftest.err
7736 } && test -s conftest.$ac_objext; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007737 cat >conftest.$ac_ext <<_ACEOF
7738/* confdefs.h. */
7739_ACEOF
7740cat confdefs.h >>conftest.$ac_ext
7741cat >>conftest.$ac_ext <<_ACEOF
7742/* end confdefs.h. */
7743$ac_includes_default
7744int
7745main ()
7746{
7747if (sizeof ((size_t)))
7748 return 0;
7749 ;
7750 return 0;
7751}
7752_ACEOF
7753rm -f conftest.$ac_objext
7754if { (ac_try="$ac_compile"
7755case "(($ac_try" in
7756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7757 *) ac_try_echo=$ac_try;;
7758esac
7759eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7760$as_echo "$ac_try_echo") >&5
7761 (eval "$ac_compile") 2>conftest.er1
7762 ac_status=$?
7763 grep -v '^ *+' conftest.er1 >conftest.err
7764 rm -f conftest.er1
7765 cat conftest.err >&5
7766 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7767 (exit $ac_status); } && {
7768 test -z "$ac_c_werror_flag" ||
7769 test ! -s conftest.err
7770 } && test -s conftest.$ac_objext; then
7771 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007772else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007773 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007774sed 's/^/| /' conftest.$ac_ext >&5
7775
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007776 ac_cv_type_size_t=yes
7777fi
7778
7779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7780else
7781 $as_echo "$as_me: failed program was:" >&5
7782sed 's/^/| /' conftest.$ac_ext >&5
7783
7784
Guido van Rossum627b2d71993-12-24 10:39:16 +00007785fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007786
7787rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007788fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007789{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7790$as_echo "$ac_cv_type_size_t" >&6; }
7791if test "x$ac_cv_type_size_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007792 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007793else
Martin v. Löwis11437992002-04-12 09:54:03 +00007794
7795cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007796#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007797_ACEOF
7798
7799fi
7800
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007801{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7802$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007803if test "${ac_cv_type_uid_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007804 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007805else
7806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007807/* confdefs.h. */
7808_ACEOF
7809cat confdefs.h >>conftest.$ac_ext
7810cat >>conftest.$ac_ext <<_ACEOF
7811/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007812#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007813
7814_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007815if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007816 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007817 ac_cv_type_uid_t=yes
7818else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007819 ac_cv_type_uid_t=no
7820fi
Jesus Cea0f752ee2010-04-28 12:03:06 +00007821rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007822
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007823fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007824{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7825$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007826if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007827
Martin v. Löwis11437992002-04-12 09:54:03 +00007828cat >>confdefs.h <<\_ACEOF
7829#define uid_t int
7830_ACEOF
7831
7832
7833cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007834#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007835_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007836
7837fi
7838
Mark Dickinsonbd792642009-03-18 20:06:12 +00007839
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007840 { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
7841$as_echo_n "checking for uint32_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007842if test "${ac_cv_c_uint32_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007843 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007844else
7845 ac_cv_c_uint32_t=no
7846 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7847 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7848 cat >conftest.$ac_ext <<_ACEOF
7849/* confdefs.h. */
7850_ACEOF
7851cat confdefs.h >>conftest.$ac_ext
7852cat >>conftest.$ac_ext <<_ACEOF
7853/* end confdefs.h. */
7854$ac_includes_default
7855int
7856main ()
7857{
7858static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7859test_array [0] = 0
7860
7861 ;
7862 return 0;
7863}
7864_ACEOF
7865rm -f conftest.$ac_objext
7866if { (ac_try="$ac_compile"
7867case "(($ac_try" in
7868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7869 *) ac_try_echo=$ac_try;;
7870esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007871eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7872$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007873 (eval "$ac_compile") 2>conftest.er1
7874 ac_status=$?
7875 grep -v '^ *+' conftest.er1 >conftest.err
7876 rm -f conftest.er1
7877 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007878 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007879 (exit $ac_status); } && {
7880 test -z "$ac_c_werror_flag" ||
7881 test ! -s conftest.err
7882 } && test -s conftest.$ac_objext; then
7883 case $ac_type in
7884 uint32_t) ac_cv_c_uint32_t=yes ;;
7885 *) ac_cv_c_uint32_t=$ac_type ;;
7886esac
7887
7888else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007889 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007890sed 's/^/| /' conftest.$ac_ext >&5
7891
7892
7893fi
7894
7895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7896 test "$ac_cv_c_uint32_t" != no && break
7897 done
7898fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007899{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7900$as_echo "$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007901 case $ac_cv_c_uint32_t in #(
7902 no|yes) ;; #(
7903 *)
7904
7905cat >>confdefs.h <<\_ACEOF
7906#define _UINT32_T 1
7907_ACEOF
7908
7909
7910cat >>confdefs.h <<_ACEOF
7911#define uint32_t $ac_cv_c_uint32_t
7912_ACEOF
7913;;
7914 esac
7915
7916
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007917 { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5
7918$as_echo_n "checking for uint64_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007919if test "${ac_cv_c_uint64_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007920 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007921else
7922 ac_cv_c_uint64_t=no
7923 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7924 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7925 cat >conftest.$ac_ext <<_ACEOF
7926/* confdefs.h. */
7927_ACEOF
7928cat confdefs.h >>conftest.$ac_ext
7929cat >>conftest.$ac_ext <<_ACEOF
7930/* end confdefs.h. */
7931$ac_includes_default
7932int
7933main ()
7934{
7935static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7936test_array [0] = 0
7937
7938 ;
7939 return 0;
7940}
7941_ACEOF
7942rm -f conftest.$ac_objext
7943if { (ac_try="$ac_compile"
7944case "(($ac_try" in
7945 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7946 *) ac_try_echo=$ac_try;;
7947esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007948eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7949$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007950 (eval "$ac_compile") 2>conftest.er1
7951 ac_status=$?
7952 grep -v '^ *+' conftest.er1 >conftest.err
7953 rm -f conftest.er1
7954 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007955 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007956 (exit $ac_status); } && {
7957 test -z "$ac_c_werror_flag" ||
7958 test ! -s conftest.err
7959 } && test -s conftest.$ac_objext; then
7960 case $ac_type in
7961 uint64_t) ac_cv_c_uint64_t=yes ;;
7962 *) ac_cv_c_uint64_t=$ac_type ;;
7963esac
7964
7965else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007966 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007967sed 's/^/| /' conftest.$ac_ext >&5
7968
7969
7970fi
7971
7972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7973 test "$ac_cv_c_uint64_t" != no && break
7974 done
7975fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007976{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7977$as_echo "$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007978 case $ac_cv_c_uint64_t in #(
7979 no|yes) ;; #(
7980 *)
7981
7982cat >>confdefs.h <<\_ACEOF
7983#define _UINT64_T 1
7984_ACEOF
7985
7986
7987cat >>confdefs.h <<_ACEOF
7988#define uint64_t $ac_cv_c_uint64_t
7989_ACEOF
7990;;
7991 esac
7992
7993
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007994 { $as_echo "$as_me:$LINENO: checking for int32_t" >&5
7995$as_echo_n "checking for int32_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007996if test "${ac_cv_c_int32_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00007997 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007998else
7999 ac_cv_c_int32_t=no
8000 for ac_type in 'int32_t' 'int' 'long int' \
8001 'long long int' 'short int' 'signed char'; do
8002 cat >conftest.$ac_ext <<_ACEOF
8003/* confdefs.h. */
8004_ACEOF
8005cat confdefs.h >>conftest.$ac_ext
8006cat >>conftest.$ac_ext <<_ACEOF
8007/* end confdefs.h. */
8008$ac_includes_default
8009int
8010main ()
8011{
8012static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
8013test_array [0] = 0
8014
8015 ;
8016 return 0;
8017}
8018_ACEOF
8019rm -f conftest.$ac_objext
8020if { (ac_try="$ac_compile"
8021case "(($ac_try" in
8022 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8023 *) ac_try_echo=$ac_try;;
8024esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008025eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8026$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008027 (eval "$ac_compile") 2>conftest.er1
8028 ac_status=$?
8029 grep -v '^ *+' conftest.er1 >conftest.err
8030 rm -f conftest.er1
8031 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008032 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008033 (exit $ac_status); } && {
8034 test -z "$ac_c_werror_flag" ||
8035 test ! -s conftest.err
8036 } && test -s conftest.$ac_objext; then
8037 cat >conftest.$ac_ext <<_ACEOF
8038/* confdefs.h. */
8039_ACEOF
8040cat confdefs.h >>conftest.$ac_ext
8041cat >>conftest.$ac_ext <<_ACEOF
8042/* end confdefs.h. */
8043$ac_includes_default
8044int
8045main ()
8046{
8047static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008048 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00008049test_array [0] = 0
8050
8051 ;
8052 return 0;
8053}
8054_ACEOF
8055rm -f conftest.$ac_objext
8056if { (ac_try="$ac_compile"
8057case "(($ac_try" in
8058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8059 *) ac_try_echo=$ac_try;;
8060esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008061eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8062$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008063 (eval "$ac_compile") 2>conftest.er1
8064 ac_status=$?
8065 grep -v '^ *+' conftest.er1 >conftest.err
8066 rm -f conftest.er1
8067 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008068 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008069 (exit $ac_status); } && {
8070 test -z "$ac_c_werror_flag" ||
8071 test ! -s conftest.err
8072 } && test -s conftest.$ac_objext; then
8073 :
8074else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008075 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008076sed 's/^/| /' conftest.$ac_ext >&5
8077
8078 case $ac_type in
8079 int32_t) ac_cv_c_int32_t=yes ;;
8080 *) ac_cv_c_int32_t=$ac_type ;;
8081esac
8082
8083fi
8084
8085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8086else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008087 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008088sed 's/^/| /' conftest.$ac_ext >&5
8089
8090
8091fi
8092
8093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8094 test "$ac_cv_c_int32_t" != no && break
8095 done
8096fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008097{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
8098$as_echo "$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008099 case $ac_cv_c_int32_t in #(
8100 no|yes) ;; #(
8101 *)
8102
8103cat >>confdefs.h <<_ACEOF
8104#define int32_t $ac_cv_c_int32_t
8105_ACEOF
8106;;
8107 esac
8108
8109
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008110 { $as_echo "$as_me:$LINENO: checking for int64_t" >&5
8111$as_echo_n "checking for int64_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008112if test "${ac_cv_c_int64_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008113 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00008114else
8115 ac_cv_c_int64_t=no
8116 for ac_type in 'int64_t' 'int' 'long int' \
8117 'long long int' 'short int' 'signed char'; do
8118 cat >conftest.$ac_ext <<_ACEOF
8119/* confdefs.h. */
8120_ACEOF
8121cat confdefs.h >>conftest.$ac_ext
8122cat >>conftest.$ac_ext <<_ACEOF
8123/* end confdefs.h. */
8124$ac_includes_default
8125int
8126main ()
8127{
8128static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
8129test_array [0] = 0
8130
8131 ;
8132 return 0;
8133}
8134_ACEOF
8135rm -f conftest.$ac_objext
8136if { (ac_try="$ac_compile"
8137case "(($ac_try" in
8138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8139 *) ac_try_echo=$ac_try;;
8140esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008141eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8142$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008143 (eval "$ac_compile") 2>conftest.er1
8144 ac_status=$?
8145 grep -v '^ *+' conftest.er1 >conftest.err
8146 rm -f conftest.er1
8147 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008148 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008149 (exit $ac_status); } && {
8150 test -z "$ac_c_werror_flag" ||
8151 test ! -s conftest.err
8152 } && test -s conftest.$ac_objext; then
8153 cat >conftest.$ac_ext <<_ACEOF
8154/* confdefs.h. */
8155_ACEOF
8156cat confdefs.h >>conftest.$ac_ext
8157cat >>conftest.$ac_ext <<_ACEOF
8158/* end confdefs.h. */
8159$ac_includes_default
8160int
8161main ()
8162{
8163static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008164 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00008165test_array [0] = 0
8166
8167 ;
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
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008177eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8178$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +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
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008184 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008185 (exit $ac_status); } && {
8186 test -z "$ac_c_werror_flag" ||
8187 test ! -s conftest.err
8188 } && test -s conftest.$ac_objext; then
8189 :
8190else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008191 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008192sed 's/^/| /' conftest.$ac_ext >&5
8193
8194 case $ac_type in
8195 int64_t) ac_cv_c_int64_t=yes ;;
8196 *) ac_cv_c_int64_t=$ac_type ;;
8197esac
8198
8199fi
8200
8201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8202else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008203 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008204sed 's/^/| /' conftest.$ac_ext >&5
8205
8206
8207fi
8208
8209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8210 test "$ac_cv_c_int64_t" != no && break
8211 done
8212fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008213{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
8214$as_echo "$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008215 case $ac_cv_c_int64_t in #(
8216 no|yes) ;; #(
8217 *)
8218
8219cat >>confdefs.h <<_ACEOF
8220#define int64_t $ac_cv_c_int64_t
8221_ACEOF
8222;;
8223 esac
8224
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008225{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
8226$as_echo_n "checking for ssize_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00008227if test "${ac_cv_type_ssize_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008228 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008229else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008230 ac_cv_type_ssize_t=no
8231cat >conftest.$ac_ext <<_ACEOF
Benjamin Petersona8332062009-09-11 22:36:27 +00008232/* confdefs.h. */
8233_ACEOF
8234cat confdefs.h >>conftest.$ac_ext
8235cat >>conftest.$ac_ext <<_ACEOF
8236/* end confdefs.h. */
8237$ac_includes_default
8238int
8239main ()
8240{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008241if (sizeof (ssize_t))
8242 return 0;
Benjamin Petersona8332062009-09-11 22:36:27 +00008243 ;
8244 return 0;
8245}
8246_ACEOF
8247rm -f conftest.$ac_objext
8248if { (ac_try="$ac_compile"
8249case "(($ac_try" in
8250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8251 *) ac_try_echo=$ac_try;;
8252esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008253eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8254$as_echo "$ac_try_echo") >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008255 (eval "$ac_compile") 2>conftest.er1
8256 ac_status=$?
8257 grep -v '^ *+' conftest.er1 >conftest.err
8258 rm -f conftest.er1
8259 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008260 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersona8332062009-09-11 22:36:27 +00008261 (exit $ac_status); } && {
8262 test -z "$ac_c_werror_flag" ||
8263 test ! -s conftest.err
8264 } && test -s conftest.$ac_objext; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008265 cat >conftest.$ac_ext <<_ACEOF
8266/* confdefs.h. */
8267_ACEOF
8268cat confdefs.h >>conftest.$ac_ext
8269cat >>conftest.$ac_ext <<_ACEOF
8270/* end confdefs.h. */
8271$ac_includes_default
8272int
8273main ()
8274{
8275if (sizeof ((ssize_t)))
8276 return 0;
8277 ;
8278 return 0;
8279}
8280_ACEOF
8281rm -f conftest.$ac_objext
8282if { (ac_try="$ac_compile"
8283case "(($ac_try" in
8284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8285 *) ac_try_echo=$ac_try;;
8286esac
8287eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8288$as_echo "$ac_try_echo") >&5
8289 (eval "$ac_compile") 2>conftest.er1
8290 ac_status=$?
8291 grep -v '^ *+' conftest.er1 >conftest.err
8292 rm -f conftest.er1
8293 cat conftest.err >&5
8294 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8295 (exit $ac_status); } && {
8296 test -z "$ac_c_werror_flag" ||
8297 test ! -s conftest.err
8298 } && test -s conftest.$ac_objext; then
8299 :
Martin v. Löwis18e16552006-02-15 17:27:45 +00008300else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008301 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00008302sed 's/^/| /' conftest.$ac_ext >&5
8303
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008304 ac_cv_type_ssize_t=yes
8305fi
8306
8307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8308else
8309 $as_echo "$as_me: failed program was:" >&5
8310sed 's/^/| /' conftest.$ac_ext >&5
8311
8312
Martin v. Löwis18e16552006-02-15 17:27:45 +00008313fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008314
8315rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00008316fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008317{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
8318$as_echo "$ac_cv_type_ssize_t" >&6; }
8319if test "x$ac_cv_type_ssize_t" = x""yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00008320
8321cat >>confdefs.h <<\_ACEOF
8322#define HAVE_SSIZE_T 1
8323_ACEOF
8324
8325fi
8326
Jack Jansendd19cf82001-12-06 22:36:17 +00008327
Michael W. Hudson54241132001-12-07 15:38:26 +00008328# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008329# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008330# The cast to long int works around a bug in the HP C Compiler
8331# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8332# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8333# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008334{ $as_echo "$as_me:$LINENO: checking size of int" >&5
8335$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008336if test "${ac_cv_sizeof_int+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008337 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008338else
Martin v. Löwis11437992002-04-12 09:54:03 +00008339 if test "$cross_compiling" = yes; then
8340 # Depending upon the size, compute the lo and hi bounds.
8341cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008342/* confdefs.h. */
8343_ACEOF
8344cat confdefs.h >>conftest.$ac_ext
8345cat >>conftest.$ac_ext <<_ACEOF
8346/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008347$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008348int
8349main ()
8350{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008351static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008352test_array [0] = 0
8353
8354 ;
8355 return 0;
8356}
8357_ACEOF
8358rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008359if { (ac_try="$ac_compile"
8360case "(($ac_try" in
8361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8362 *) ac_try_echo=$ac_try;;
8363esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008364eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8365$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008366 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008367 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008368 grep -v '^ *+' conftest.er1 >conftest.err
8369 rm -f conftest.er1
8370 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008371 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008372 (exit $ac_status); } && {
8373 test -z "$ac_c_werror_flag" ||
8374 test ! -s conftest.err
8375 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008376 ac_lo=0 ac_mid=0
8377 while :; do
8378 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008379/* confdefs.h. */
8380_ACEOF
8381cat confdefs.h >>conftest.$ac_ext
8382cat >>conftest.$ac_ext <<_ACEOF
8383/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008384$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008385int
8386main ()
8387{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008388static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008389test_array [0] = 0
8390
8391 ;
8392 return 0;
8393}
8394_ACEOF
8395rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396if { (ac_try="$ac_compile"
8397case "(($ac_try" in
8398 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8399 *) ac_try_echo=$ac_try;;
8400esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008401eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8402$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008403 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008404 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008405 grep -v '^ *+' conftest.er1 >conftest.err
8406 rm -f conftest.er1
8407 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008408 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008409 (exit $ac_status); } && {
8410 test -z "$ac_c_werror_flag" ||
8411 test ! -s conftest.err
8412 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008413 ac_hi=$ac_mid; break
8414else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008415 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008416sed 's/^/| /' conftest.$ac_ext >&5
8417
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008418 ac_lo=`expr $ac_mid + 1`
8419 if test $ac_lo -le $ac_mid; then
8420 ac_lo= ac_hi=
8421 break
8422 fi
8423 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008424fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008425
8426rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008427 done
8428else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008429 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008430sed 's/^/| /' conftest.$ac_ext >&5
8431
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008432 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008433/* confdefs.h. */
8434_ACEOF
8435cat confdefs.h >>conftest.$ac_ext
8436cat >>conftest.$ac_ext <<_ACEOF
8437/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008438$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008439int
8440main ()
8441{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008442static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008443test_array [0] = 0
8444
8445 ;
8446 return 0;
8447}
8448_ACEOF
8449rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008450if { (ac_try="$ac_compile"
8451case "(($ac_try" in
8452 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8453 *) ac_try_echo=$ac_try;;
8454esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008455eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8456$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008457 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008458 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008459 grep -v '^ *+' conftest.er1 >conftest.err
8460 rm -f conftest.er1
8461 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008462 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008463 (exit $ac_status); } && {
8464 test -z "$ac_c_werror_flag" ||
8465 test ! -s conftest.err
8466 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008467 ac_hi=-1 ac_mid=-1
8468 while :; do
8469 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008470/* confdefs.h. */
8471_ACEOF
8472cat confdefs.h >>conftest.$ac_ext
8473cat >>conftest.$ac_ext <<_ACEOF
8474/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008475$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008476int
8477main ()
8478{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008479static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008480test_array [0] = 0
8481
8482 ;
8483 return 0;
8484}
8485_ACEOF
8486rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008487if { (ac_try="$ac_compile"
8488case "(($ac_try" in
8489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8490 *) ac_try_echo=$ac_try;;
8491esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008492eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8493$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008494 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008495 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008496 grep -v '^ *+' conftest.er1 >conftest.err
8497 rm -f conftest.er1
8498 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008499 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008500 (exit $ac_status); } && {
8501 test -z "$ac_c_werror_flag" ||
8502 test ! -s conftest.err
8503 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008504 ac_lo=$ac_mid; break
8505else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008506 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008507sed 's/^/| /' conftest.$ac_ext >&5
8508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008509 ac_hi=`expr '(' $ac_mid ')' - 1`
8510 if test $ac_mid -le $ac_hi; then
8511 ac_lo= ac_hi=
8512 break
8513 fi
8514 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008515fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008516
8517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008518 done
8519else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008520 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008521sed 's/^/| /' conftest.$ac_ext >&5
8522
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008523 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008524fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008525
8526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008527fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008528
8529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008530# Binary search between lo and hi bounds.
8531while test "x$ac_lo" != "x$ac_hi"; do
8532 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8533 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008534/* confdefs.h. */
8535_ACEOF
8536cat confdefs.h >>conftest.$ac_ext
8537cat >>conftest.$ac_ext <<_ACEOF
8538/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008539$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008540int
8541main ()
8542{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008543static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008544test_array [0] = 0
8545
8546 ;
8547 return 0;
8548}
8549_ACEOF
8550rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008551if { (ac_try="$ac_compile"
8552case "(($ac_try" in
8553 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8554 *) ac_try_echo=$ac_try;;
8555esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008556eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8557$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008558 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008559 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008560 grep -v '^ *+' conftest.er1 >conftest.err
8561 rm -f conftest.er1
8562 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008563 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008564 (exit $ac_status); } && {
8565 test -z "$ac_c_werror_flag" ||
8566 test ! -s conftest.err
8567 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008568 ac_hi=$ac_mid
8569else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008570 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008571sed 's/^/| /' conftest.$ac_ext >&5
8572
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008573 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008574fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008575
8576rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008577done
8578case $ac_lo in
8579?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008580'') if test "$ac_cv_type_int" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008581 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8582$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8583{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008584See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008585$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008586See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008587 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008588 else
8589 ac_cv_sizeof_int=0
8590 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008591esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008592else
Martin v. Löwis11437992002-04-12 09:54:03 +00008593 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008594/* confdefs.h. */
8595_ACEOF
8596cat confdefs.h >>conftest.$ac_ext
8597cat >>conftest.$ac_ext <<_ACEOF
8598/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008599$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008600static long int longval () { return (long int) (sizeof (int)); }
8601static unsigned long int ulongval () { return (long int) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008602#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008603#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008604int
8605main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008606{
Martin v. Löwis11437992002-04-12 09:54:03 +00008607
8608 FILE *f = fopen ("conftest.val", "w");
8609 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008610 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008611 if (((long int) (sizeof (int))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008612 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008613 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008614 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008615 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008616 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008617 }
8618 else
8619 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008620 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008621 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008623 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008624 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008625 /* Do not output a trailing newline, as this causes \r\n confusion
8626 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008627 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008628
8629 ;
8630 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008631}
Martin v. Löwis11437992002-04-12 09:54:03 +00008632_ACEOF
8633rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008634if { (ac_try="$ac_link"
8635case "(($ac_try" in
8636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8637 *) ac_try_echo=$ac_try;;
8638esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008639eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8640$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008641 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008642 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008643 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008644 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008645 { (case "(($ac_try" in
8646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8647 *) ac_try_echo=$ac_try;;
8648esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008649eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8650$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008651 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008652 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008653 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008654 (exit $ac_status); }; }; then
8655 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008656else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008657 $as_echo "$as_me: program exited with status $ac_status" >&5
8658$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008659sed 's/^/| /' conftest.$ac_ext >&5
8660
Martin v. Löwis11437992002-04-12 09:54:03 +00008661( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008662if test "$ac_cv_type_int" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008663 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8664$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8665{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008666See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008667$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008668See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008669 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008670 else
8671 ac_cv_sizeof_int=0
8672 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008673fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008674rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008675rm -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 +00008676fi
8677rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008678fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008679{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8680$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008681
8682
8683
Martin v. Löwis11437992002-04-12 09:54:03 +00008684cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008685#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008686_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008687
8688
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008689# The cast to long int works around a bug in the HP C Compiler
8690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8692# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008693{ $as_echo "$as_me:$LINENO: checking size of long" >&5
8694$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008695if test "${ac_cv_sizeof_long+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008696 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008697else
Martin v. Löwis11437992002-04-12 09:54:03 +00008698 if test "$cross_compiling" = yes; then
8699 # Depending upon the size, compute the lo and hi bounds.
8700cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008701/* confdefs.h. */
8702_ACEOF
8703cat confdefs.h >>conftest.$ac_ext
8704cat >>conftest.$ac_ext <<_ACEOF
8705/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008706$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008707int
8708main ()
8709{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008710static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008711test_array [0] = 0
8712
8713 ;
8714 return 0;
8715}
8716_ACEOF
8717rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008718if { (ac_try="$ac_compile"
8719case "(($ac_try" in
8720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8721 *) ac_try_echo=$ac_try;;
8722esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008723eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8724$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008726 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008727 grep -v '^ *+' conftest.er1 >conftest.err
8728 rm -f conftest.er1
8729 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008730 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008731 (exit $ac_status); } && {
8732 test -z "$ac_c_werror_flag" ||
8733 test ! -s conftest.err
8734 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008735 ac_lo=0 ac_mid=0
8736 while :; do
8737 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008738/* confdefs.h. */
8739_ACEOF
8740cat confdefs.h >>conftest.$ac_ext
8741cat >>conftest.$ac_ext <<_ACEOF
8742/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008743$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008744int
8745main ()
8746{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008747static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008748test_array [0] = 0
8749
8750 ;
8751 return 0;
8752}
8753_ACEOF
8754rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008755if { (ac_try="$ac_compile"
8756case "(($ac_try" in
8757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8758 *) ac_try_echo=$ac_try;;
8759esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008760eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8761$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008762 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008763 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008764 grep -v '^ *+' conftest.er1 >conftest.err
8765 rm -f conftest.er1
8766 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008767 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008768 (exit $ac_status); } && {
8769 test -z "$ac_c_werror_flag" ||
8770 test ! -s conftest.err
8771 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008772 ac_hi=$ac_mid; break
8773else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008774 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008775sed 's/^/| /' conftest.$ac_ext >&5
8776
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008777 ac_lo=`expr $ac_mid + 1`
8778 if test $ac_lo -le $ac_mid; then
8779 ac_lo= ac_hi=
8780 break
8781 fi
8782 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008784
8785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008786 done
8787else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008788 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008789sed 's/^/| /' conftest.$ac_ext >&5
8790
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008792/* confdefs.h. */
8793_ACEOF
8794cat confdefs.h >>conftest.$ac_ext
8795cat >>conftest.$ac_ext <<_ACEOF
8796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008797$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008798int
8799main ()
8800{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008801static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008802test_array [0] = 0
8803
8804 ;
8805 return 0;
8806}
8807_ACEOF
8808rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008809if { (ac_try="$ac_compile"
8810case "(($ac_try" in
8811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8812 *) ac_try_echo=$ac_try;;
8813esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008814eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8815$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008816 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008817 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008818 grep -v '^ *+' conftest.er1 >conftest.err
8819 rm -f conftest.er1
8820 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008821 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008822 (exit $ac_status); } && {
8823 test -z "$ac_c_werror_flag" ||
8824 test ! -s conftest.err
8825 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008826 ac_hi=-1 ac_mid=-1
8827 while :; do
8828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008829/* confdefs.h. */
8830_ACEOF
8831cat confdefs.h >>conftest.$ac_ext
8832cat >>conftest.$ac_ext <<_ACEOF
8833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008834$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008835int
8836main ()
8837{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008838static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008839test_array [0] = 0
8840
8841 ;
8842 return 0;
8843}
8844_ACEOF
8845rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008846if { (ac_try="$ac_compile"
8847case "(($ac_try" in
8848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8849 *) ac_try_echo=$ac_try;;
8850esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008851eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8852$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008855 grep -v '^ *+' conftest.er1 >conftest.err
8856 rm -f conftest.er1
8857 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008858 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008859 (exit $ac_status); } && {
8860 test -z "$ac_c_werror_flag" ||
8861 test ! -s conftest.err
8862 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008863 ac_lo=$ac_mid; break
8864else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008865 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008866sed 's/^/| /' conftest.$ac_ext >&5
8867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008868 ac_hi=`expr '(' $ac_mid ')' - 1`
8869 if test $ac_mid -le $ac_hi; then
8870 ac_lo= ac_hi=
8871 break
8872 fi
8873 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008875
8876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008877 done
8878else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008879 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008880sed 's/^/| /' conftest.$ac_ext >&5
8881
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008882 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008883fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008884
8885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008886fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008887
8888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008889# Binary search between lo and hi bounds.
8890while test "x$ac_lo" != "x$ac_hi"; do
8891 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8892 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008893/* confdefs.h. */
8894_ACEOF
8895cat confdefs.h >>conftest.$ac_ext
8896cat >>conftest.$ac_ext <<_ACEOF
8897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008898$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008899int
8900main ()
8901{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008902static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008903test_array [0] = 0
8904
8905 ;
8906 return 0;
8907}
8908_ACEOF
8909rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008910if { (ac_try="$ac_compile"
8911case "(($ac_try" in
8912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8913 *) ac_try_echo=$ac_try;;
8914esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008915eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8916$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008917 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008919 grep -v '^ *+' conftest.er1 >conftest.err
8920 rm -f conftest.er1
8921 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008922 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008923 (exit $ac_status); } && {
8924 test -z "$ac_c_werror_flag" ||
8925 test ! -s conftest.err
8926 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008927 ac_hi=$ac_mid
8928else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008929 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008930sed 's/^/| /' conftest.$ac_ext >&5
8931
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008932 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008933fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008934
8935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008936done
8937case $ac_lo in
8938?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008939'') if test "$ac_cv_type_long" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008940 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8941$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8942{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008943See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008944$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008945See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008946 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008947 else
8948 ac_cv_sizeof_long=0
8949 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008950esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008951else
Martin v. Löwis11437992002-04-12 09:54:03 +00008952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008953/* confdefs.h. */
8954_ACEOF
8955cat confdefs.h >>conftest.$ac_ext
8956cat >>conftest.$ac_ext <<_ACEOF
8957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008958$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008959static long int longval () { return (long int) (sizeof (long)); }
8960static unsigned long int ulongval () { return (long int) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008961#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008962#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008963int
8964main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008965{
Martin v. Löwis11437992002-04-12 09:54:03 +00008966
8967 FILE *f = fopen ("conftest.val", "w");
8968 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008969 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008970 if (((long int) (sizeof (long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008971 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008972 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008973 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008974 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008975 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008976 }
8977 else
8978 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008979 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008980 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008981 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008982 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008983 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008984 /* Do not output a trailing newline, as this causes \r\n confusion
8985 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008986 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008987
8988 ;
8989 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008990}
Martin v. Löwis11437992002-04-12 09:54:03 +00008991_ACEOF
8992rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008993if { (ac_try="$ac_link"
8994case "(($ac_try" in
8995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8996 *) ac_try_echo=$ac_try;;
8997esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00008998eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8999$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009000 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009001 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009002 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009004 { (case "(($ac_try" in
9005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9006 *) ac_try_echo=$ac_try;;
9007esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009008eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9009$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009010 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009011 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009012 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009013 (exit $ac_status); }; }; then
9014 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009015else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009016 $as_echo "$as_me: program exited with status $ac_status" >&5
9017$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009018sed 's/^/| /' conftest.$ac_ext >&5
9019
Martin v. Löwis11437992002-04-12 09:54:03 +00009020( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009021if test "$ac_cv_type_long" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009022 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9024{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00009025See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009026$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00009027See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009028 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009029 else
9030 ac_cv_sizeof_long=0
9031 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009032fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009033rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009034rm -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 +00009035fi
9036rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009037fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009038{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
9039$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009040
9041
9042
Martin v. Löwis11437992002-04-12 09:54:03 +00009043cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009044#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00009045_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00009046
9047
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009048# The cast to long int works around a bug in the HP C Compiler
9049# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9050# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9051# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009052{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
9053$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009054if test "${ac_cv_sizeof_void_p+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009055 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009056else
Martin v. Löwis11437992002-04-12 09:54:03 +00009057 if test "$cross_compiling" = yes; then
9058 # Depending upon the size, compute the lo and hi bounds.
9059cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009060/* confdefs.h. */
9061_ACEOF
9062cat confdefs.h >>conftest.$ac_ext
9063cat >>conftest.$ac_ext <<_ACEOF
9064/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009065$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009066int
9067main ()
9068{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009069static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009070test_array [0] = 0
9071
9072 ;
9073 return 0;
9074}
9075_ACEOF
9076rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009077if { (ac_try="$ac_compile"
9078case "(($ac_try" in
9079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9080 *) ac_try_echo=$ac_try;;
9081esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009082eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9083$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009084 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009085 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009086 grep -v '^ *+' conftest.er1 >conftest.err
9087 rm -f conftest.er1
9088 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009089 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009090 (exit $ac_status); } && {
9091 test -z "$ac_c_werror_flag" ||
9092 test ! -s conftest.err
9093 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009094 ac_lo=0 ac_mid=0
9095 while :; do
9096 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009097/* confdefs.h. */
9098_ACEOF
9099cat confdefs.h >>conftest.$ac_ext
9100cat >>conftest.$ac_ext <<_ACEOF
9101/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009102$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009103int
9104main ()
9105{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009106static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009107test_array [0] = 0
9108
9109 ;
9110 return 0;
9111}
9112_ACEOF
9113rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009114if { (ac_try="$ac_compile"
9115case "(($ac_try" in
9116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9117 *) ac_try_echo=$ac_try;;
9118esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009119eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9120$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009121 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009123 grep -v '^ *+' conftest.er1 >conftest.err
9124 rm -f conftest.er1
9125 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009126 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009127 (exit $ac_status); } && {
9128 test -z "$ac_c_werror_flag" ||
9129 test ! -s conftest.err
9130 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009131 ac_hi=$ac_mid; break
9132else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009133 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009134sed 's/^/| /' conftest.$ac_ext >&5
9135
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009136 ac_lo=`expr $ac_mid + 1`
9137 if test $ac_lo -le $ac_mid; then
9138 ac_lo= ac_hi=
9139 break
9140 fi
9141 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009143
9144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009145 done
9146else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009147 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009148sed 's/^/| /' conftest.$ac_ext >&5
9149
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009150 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009151/* confdefs.h. */
9152_ACEOF
9153cat confdefs.h >>conftest.$ac_ext
9154cat >>conftest.$ac_ext <<_ACEOF
9155/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009156$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009157int
9158main ()
9159{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009160static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009161test_array [0] = 0
9162
9163 ;
9164 return 0;
9165}
9166_ACEOF
9167rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009168if { (ac_try="$ac_compile"
9169case "(($ac_try" in
9170 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9171 *) ac_try_echo=$ac_try;;
9172esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009173eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9174$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009175 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009176 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009177 grep -v '^ *+' conftest.er1 >conftest.err
9178 rm -f conftest.er1
9179 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009180 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009181 (exit $ac_status); } && {
9182 test -z "$ac_c_werror_flag" ||
9183 test ! -s conftest.err
9184 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009185 ac_hi=-1 ac_mid=-1
9186 while :; do
9187 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009188/* confdefs.h. */
9189_ACEOF
9190cat confdefs.h >>conftest.$ac_ext
9191cat >>conftest.$ac_ext <<_ACEOF
9192/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009193$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009194int
9195main ()
9196{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009197static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009198test_array [0] = 0
9199
9200 ;
9201 return 0;
9202}
9203_ACEOF
9204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009205if { (ac_try="$ac_compile"
9206case "(($ac_try" in
9207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9208 *) ac_try_echo=$ac_try;;
9209esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009210eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9211$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009212 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009214 grep -v '^ *+' conftest.er1 >conftest.err
9215 rm -f conftest.er1
9216 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009217 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009218 (exit $ac_status); } && {
9219 test -z "$ac_c_werror_flag" ||
9220 test ! -s conftest.err
9221 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009222 ac_lo=$ac_mid; break
9223else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009224 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009225sed 's/^/| /' conftest.$ac_ext >&5
9226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009227 ac_hi=`expr '(' $ac_mid ')' - 1`
9228 if test $ac_mid -le $ac_hi; then
9229 ac_lo= ac_hi=
9230 break
9231 fi
9232 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009233fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009234
9235rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009236 done
9237else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009238 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009239sed 's/^/| /' conftest.$ac_ext >&5
9240
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009241 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009242fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009243
9244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009246
9247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009248# Binary search between lo and hi bounds.
9249while test "x$ac_lo" != "x$ac_hi"; do
9250 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009252/* confdefs.h. */
9253_ACEOF
9254cat confdefs.h >>conftest.$ac_ext
9255cat >>conftest.$ac_ext <<_ACEOF
9256/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009257$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009258int
9259main ()
9260{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009261static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009262test_array [0] = 0
9263
9264 ;
9265 return 0;
9266}
9267_ACEOF
9268rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009269if { (ac_try="$ac_compile"
9270case "(($ac_try" in
9271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9272 *) ac_try_echo=$ac_try;;
9273esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009274eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9275$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009276 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009277 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009278 grep -v '^ *+' conftest.er1 >conftest.err
9279 rm -f conftest.er1
9280 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009281 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009282 (exit $ac_status); } && {
9283 test -z "$ac_c_werror_flag" ||
9284 test ! -s conftest.err
9285 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009286 ac_hi=$ac_mid
9287else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009288 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009289sed 's/^/| /' conftest.$ac_ext >&5
9290
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009291 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009292fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009293
9294rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009295done
9296case $ac_lo in
9297?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009298'') if test "$ac_cv_type_void_p" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009299 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9301{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009302See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009303$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009304See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009305 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009306 else
9307 ac_cv_sizeof_void_p=0
9308 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009309esac
Guido van Rossumad678af1998-10-02 14:42:15 +00009310else
Martin v. Löwis11437992002-04-12 09:54:03 +00009311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009312/* confdefs.h. */
9313_ACEOF
9314cat confdefs.h >>conftest.$ac_ext
9315cat >>conftest.$ac_ext <<_ACEOF
9316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009317$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009318static long int longval () { return (long int) (sizeof (void *)); }
9319static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009320#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009321#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009322int
9323main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00009324{
Martin v. Löwis11437992002-04-12 09:54:03 +00009325
9326 FILE *f = fopen ("conftest.val", "w");
9327 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009328 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009329 if (((long int) (sizeof (void *))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009330 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009331 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009332 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009333 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009334 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009335 }
9336 else
9337 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009338 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009339 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009340 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009341 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009342 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009343 /* Do not output a trailing newline, as this causes \r\n confusion
9344 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009345 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009346
9347 ;
9348 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00009349}
Martin v. Löwis11437992002-04-12 09:54:03 +00009350_ACEOF
9351rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009352if { (ac_try="$ac_link"
9353case "(($ac_try" in
9354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9355 *) ac_try_echo=$ac_try;;
9356esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009357eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9358$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009359 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009360 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009361 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009362 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009363 { (case "(($ac_try" in
9364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9365 *) ac_try_echo=$ac_try;;
9366esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009367eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9368$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009370 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009371 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009372 (exit $ac_status); }; }; then
9373 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00009374else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009375 $as_echo "$as_me: program exited with status $ac_status" >&5
9376$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009377sed 's/^/| /' conftest.$ac_ext >&5
9378
Martin v. Löwis11437992002-04-12 09:54:03 +00009379( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009380if test "$ac_cv_type_void_p" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009381 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9382$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9383{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009384See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009385$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009386See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009387 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009388 else
9389 ac_cv_sizeof_void_p=0
9390 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009391fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009392rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009393rm -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 +00009394fi
9395rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00009396fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009397{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
9398$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009399
9400
9401
Martin v. Löwis11437992002-04-12 09:54:03 +00009402cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009403#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00009404_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009405
9406
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009407# The cast to long int works around a bug in the HP C Compiler
9408# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9409# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9410# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009411{ $as_echo "$as_me:$LINENO: checking size of short" >&5
9412$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009413if test "${ac_cv_sizeof_short+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009414 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009415else
Martin v. Löwis11437992002-04-12 09:54:03 +00009416 if test "$cross_compiling" = yes; then
9417 # Depending upon the size, compute the lo and hi bounds.
9418cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009419/* confdefs.h. */
9420_ACEOF
9421cat confdefs.h >>conftest.$ac_ext
9422cat >>conftest.$ac_ext <<_ACEOF
9423/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009424$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009425int
9426main ()
9427{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009428static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009429test_array [0] = 0
9430
9431 ;
9432 return 0;
9433}
9434_ACEOF
9435rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009436if { (ac_try="$ac_compile"
9437case "(($ac_try" in
9438 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9439 *) ac_try_echo=$ac_try;;
9440esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009441eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9442$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009443 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009444 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009445 grep -v '^ *+' conftest.er1 >conftest.err
9446 rm -f conftest.er1
9447 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009448 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009449 (exit $ac_status); } && {
9450 test -z "$ac_c_werror_flag" ||
9451 test ! -s conftest.err
9452 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009453 ac_lo=0 ac_mid=0
9454 while :; do
9455 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009456/* confdefs.h. */
9457_ACEOF
9458cat confdefs.h >>conftest.$ac_ext
9459cat >>conftest.$ac_ext <<_ACEOF
9460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009461$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009462int
9463main ()
9464{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009465static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009466test_array [0] = 0
9467
9468 ;
9469 return 0;
9470}
9471_ACEOF
9472rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473if { (ac_try="$ac_compile"
9474case "(($ac_try" in
9475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9476 *) ac_try_echo=$ac_try;;
9477esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009478eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9479$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009480 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009481 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009482 grep -v '^ *+' conftest.er1 >conftest.err
9483 rm -f conftest.er1
9484 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009485 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009486 (exit $ac_status); } && {
9487 test -z "$ac_c_werror_flag" ||
9488 test ! -s conftest.err
9489 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009490 ac_hi=$ac_mid; break
9491else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009492 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009493sed 's/^/| /' conftest.$ac_ext >&5
9494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009495 ac_lo=`expr $ac_mid + 1`
9496 if test $ac_lo -le $ac_mid; then
9497 ac_lo= ac_hi=
9498 break
9499 fi
9500 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009502
9503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009504 done
9505else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009506 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009507sed 's/^/| /' conftest.$ac_ext >&5
9508
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009510/* confdefs.h. */
9511_ACEOF
9512cat confdefs.h >>conftest.$ac_ext
9513cat >>conftest.$ac_ext <<_ACEOF
9514/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009515$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009516int
9517main ()
9518{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009519static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009520test_array [0] = 0
9521
9522 ;
9523 return 0;
9524}
9525_ACEOF
9526rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009527if { (ac_try="$ac_compile"
9528case "(($ac_try" in
9529 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9530 *) ac_try_echo=$ac_try;;
9531esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009532eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9533$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009534 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009535 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009536 grep -v '^ *+' conftest.er1 >conftest.err
9537 rm -f conftest.er1
9538 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009539 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009540 (exit $ac_status); } && {
9541 test -z "$ac_c_werror_flag" ||
9542 test ! -s conftest.err
9543 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009544 ac_hi=-1 ac_mid=-1
9545 while :; do
9546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009547/* confdefs.h. */
9548_ACEOF
9549cat confdefs.h >>conftest.$ac_ext
9550cat >>conftest.$ac_ext <<_ACEOF
9551/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009552$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009553int
9554main ()
9555{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009556static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009557test_array [0] = 0
9558
9559 ;
9560 return 0;
9561}
9562_ACEOF
9563rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009564if { (ac_try="$ac_compile"
9565case "(($ac_try" in
9566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9567 *) ac_try_echo=$ac_try;;
9568esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009569eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9570$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009571 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009572 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009573 grep -v '^ *+' conftest.er1 >conftest.err
9574 rm -f conftest.er1
9575 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009576 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009577 (exit $ac_status); } && {
9578 test -z "$ac_c_werror_flag" ||
9579 test ! -s conftest.err
9580 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009581 ac_lo=$ac_mid; break
9582else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009583 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009584sed 's/^/| /' conftest.$ac_ext >&5
9585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009586 ac_hi=`expr '(' $ac_mid ')' - 1`
9587 if test $ac_mid -le $ac_hi; then
9588 ac_lo= ac_hi=
9589 break
9590 fi
9591 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009592fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009593
9594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009595 done
9596else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009597 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009598sed 's/^/| /' conftest.$ac_ext >&5
9599
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009600 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009601fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009602
9603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009605
9606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009607# Binary search between lo and hi bounds.
9608while test "x$ac_lo" != "x$ac_hi"; do
9609 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9610 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009611/* confdefs.h. */
9612_ACEOF
9613cat confdefs.h >>conftest.$ac_ext
9614cat >>conftest.$ac_ext <<_ACEOF
9615/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009616$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009617int
9618main ()
9619{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009620static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009621test_array [0] = 0
9622
9623 ;
9624 return 0;
9625}
9626_ACEOF
9627rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009628if { (ac_try="$ac_compile"
9629case "(($ac_try" in
9630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9631 *) ac_try_echo=$ac_try;;
9632esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009633eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9634$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009635 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009636 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009637 grep -v '^ *+' conftest.er1 >conftest.err
9638 rm -f conftest.er1
9639 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009640 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009641 (exit $ac_status); } && {
9642 test -z "$ac_c_werror_flag" ||
9643 test ! -s conftest.err
9644 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009645 ac_hi=$ac_mid
9646else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009647 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009648sed 's/^/| /' conftest.$ac_ext >&5
9649
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009650 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009652
9653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009654done
9655case $ac_lo in
9656?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009657'') if test "$ac_cv_type_short" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009658 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9660{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009661See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009662$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009663See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009664 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009665 else
9666 ac_cv_sizeof_short=0
9667 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009668esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009669else
Martin v. Löwis11437992002-04-12 09:54:03 +00009670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009671/* confdefs.h. */
9672_ACEOF
9673cat confdefs.h >>conftest.$ac_ext
9674cat >>conftest.$ac_ext <<_ACEOF
9675/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009676$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009677static long int longval () { return (long int) (sizeof (short)); }
9678static unsigned long int ulongval () { return (long int) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009679#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009680#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009681int
9682main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009683{
Martin v. Löwis11437992002-04-12 09:54:03 +00009684
9685 FILE *f = fopen ("conftest.val", "w");
9686 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009687 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009688 if (((long int) (sizeof (short))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009689 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009690 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009691 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009692 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009693 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009694 }
9695 else
9696 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009697 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009698 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009699 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009700 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009701 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009702 /* Do not output a trailing newline, as this causes \r\n confusion
9703 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009704 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009705
9706 ;
9707 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009708}
Martin v. Löwis11437992002-04-12 09:54:03 +00009709_ACEOF
9710rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009711if { (ac_try="$ac_link"
9712case "(($ac_try" in
9713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9714 *) ac_try_echo=$ac_try;;
9715esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009716eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9717$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009718 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009719 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009720 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009721 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009722 { (case "(($ac_try" in
9723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9724 *) ac_try_echo=$ac_try;;
9725esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009726eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9727$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009729 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009730 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009731 (exit $ac_status); }; }; then
9732 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009733else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009734 $as_echo "$as_me: program exited with status $ac_status" >&5
9735$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009736sed 's/^/| /' conftest.$ac_ext >&5
9737
Martin v. Löwis11437992002-04-12 09:54:03 +00009738( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009739if test "$ac_cv_type_short" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009740 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9741$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9742{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009743See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009744$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009745See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009746 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009747 else
9748 ac_cv_sizeof_short=0
9749 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009750fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009751rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009752rm -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 +00009753fi
9754rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009755fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009756{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9757$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009758
9759
9760
Martin v. Löwis11437992002-04-12 09:54:03 +00009761cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009762#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009763_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009764
9765
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009766# The cast to long int works around a bug in the HP C Compiler
9767# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9768# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9769# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009770{ $as_echo "$as_me:$LINENO: checking size of float" >&5
9771$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009772if test "${ac_cv_sizeof_float+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009773 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009774else
Martin v. Löwis11437992002-04-12 09:54:03 +00009775 if test "$cross_compiling" = yes; then
9776 # Depending upon the size, compute the lo and hi bounds.
9777cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009778/* confdefs.h. */
9779_ACEOF
9780cat confdefs.h >>conftest.$ac_ext
9781cat >>conftest.$ac_ext <<_ACEOF
9782/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009783$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009784int
9785main ()
9786{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009787static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009788test_array [0] = 0
9789
9790 ;
9791 return 0;
9792}
9793_ACEOF
9794rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009795if { (ac_try="$ac_compile"
9796case "(($ac_try" in
9797 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9798 *) ac_try_echo=$ac_try;;
9799esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009800eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9801$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009802 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009803 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009804 grep -v '^ *+' conftest.er1 >conftest.err
9805 rm -f conftest.er1
9806 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009807 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009808 (exit $ac_status); } && {
9809 test -z "$ac_c_werror_flag" ||
9810 test ! -s conftest.err
9811 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009812 ac_lo=0 ac_mid=0
9813 while :; do
9814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009815/* confdefs.h. */
9816_ACEOF
9817cat confdefs.h >>conftest.$ac_ext
9818cat >>conftest.$ac_ext <<_ACEOF
9819/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009820$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009821int
9822main ()
9823{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009824static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009825test_array [0] = 0
9826
9827 ;
9828 return 0;
9829}
9830_ACEOF
9831rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832if { (ac_try="$ac_compile"
9833case "(($ac_try" in
9834 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9835 *) ac_try_echo=$ac_try;;
9836esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009837eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9838$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009839 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009840 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009841 grep -v '^ *+' conftest.er1 >conftest.err
9842 rm -f conftest.er1
9843 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009844 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009845 (exit $ac_status); } && {
9846 test -z "$ac_c_werror_flag" ||
9847 test ! -s conftest.err
9848 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009849 ac_hi=$ac_mid; break
9850else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009851 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009852sed 's/^/| /' conftest.$ac_ext >&5
9853
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009854 ac_lo=`expr $ac_mid + 1`
9855 if test $ac_lo -le $ac_mid; then
9856 ac_lo= ac_hi=
9857 break
9858 fi
9859 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009860fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009861
9862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009863 done
9864else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009865 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009866sed 's/^/| /' conftest.$ac_ext >&5
9867
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009868 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009869/* confdefs.h. */
9870_ACEOF
9871cat confdefs.h >>conftest.$ac_ext
9872cat >>conftest.$ac_ext <<_ACEOF
9873/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009874$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009875int
9876main ()
9877{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009878static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009879test_array [0] = 0
9880
9881 ;
9882 return 0;
9883}
9884_ACEOF
9885rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009886if { (ac_try="$ac_compile"
9887case "(($ac_try" in
9888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9889 *) ac_try_echo=$ac_try;;
9890esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009891eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9892$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009893 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009894 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009895 grep -v '^ *+' conftest.er1 >conftest.err
9896 rm -f conftest.er1
9897 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009898 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009899 (exit $ac_status); } && {
9900 test -z "$ac_c_werror_flag" ||
9901 test ! -s conftest.err
9902 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009903 ac_hi=-1 ac_mid=-1
9904 while :; do
9905 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009906/* confdefs.h. */
9907_ACEOF
9908cat confdefs.h >>conftest.$ac_ext
9909cat >>conftest.$ac_ext <<_ACEOF
9910/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009911$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009912int
9913main ()
9914{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009915static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009916test_array [0] = 0
9917
9918 ;
9919 return 0;
9920}
9921_ACEOF
9922rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009923if { (ac_try="$ac_compile"
9924case "(($ac_try" in
9925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9926 *) ac_try_echo=$ac_try;;
9927esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009928eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9929$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009930 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009931 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009932 grep -v '^ *+' conftest.er1 >conftest.err
9933 rm -f conftest.er1
9934 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009935 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009936 (exit $ac_status); } && {
9937 test -z "$ac_c_werror_flag" ||
9938 test ! -s conftest.err
9939 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009940 ac_lo=$ac_mid; break
9941else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009942 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009943sed 's/^/| /' conftest.$ac_ext >&5
9944
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009945 ac_hi=`expr '(' $ac_mid ')' - 1`
9946 if test $ac_mid -le $ac_hi; then
9947 ac_lo= ac_hi=
9948 break
9949 fi
9950 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009951fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009952
9953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009954 done
9955else
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009956 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009957sed 's/^/| /' conftest.$ac_ext >&5
9958
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009959 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009961
9962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009964
9965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009966# Binary search between lo and hi bounds.
9967while test "x$ac_lo" != "x$ac_hi"; do
9968 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9969 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009970/* confdefs.h. */
9971_ACEOF
9972cat confdefs.h >>conftest.$ac_ext
9973cat >>conftest.$ac_ext <<_ACEOF
9974/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009975$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009976int
9977main ()
9978{
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009979static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009980test_array [0] = 0
9981
9982 ;
9983 return 0;
9984}
9985_ACEOF
9986rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009987if { (ac_try="$ac_compile"
9988case "(($ac_try" in
9989 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9990 *) ac_try_echo=$ac_try;;
9991esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009992eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9993$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009994 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009995 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009996 grep -v '^ *+' conftest.er1 >conftest.err
9997 rm -f conftest.er1
9998 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +00009999 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010000 (exit $ac_status); } && {
10001 test -z "$ac_c_werror_flag" ||
10002 test ! -s conftest.err
10003 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010004 ac_hi=$ac_mid
10005else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010006 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010007sed 's/^/| /' conftest.$ac_ext >&5
10008
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010009 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010010fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010011
10012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010013done
10014case $ac_lo in
10015?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010016'') if test "$ac_cv_type_float" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010017 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10018$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10019{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010020See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010021$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010022See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010023 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010024 else
10025 ac_cv_sizeof_float=0
10026 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010027esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000010028else
Martin v. Löwis11437992002-04-12 09:54:03 +000010029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010030/* confdefs.h. */
10031_ACEOF
10032cat confdefs.h >>conftest.$ac_ext
10033cat >>conftest.$ac_ext <<_ACEOF
10034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010035$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010036static long int longval () { return (long int) (sizeof (float)); }
10037static unsigned long int ulongval () { return (long int) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010038#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010039#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010040int
10041main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +000010042{
Martin v. Löwis11437992002-04-12 09:54:03 +000010043
10044 FILE *f = fopen ("conftest.val", "w");
10045 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010046 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010047 if (((long int) (sizeof (float))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010048 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010049 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010050 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010051 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010052 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010053 }
10054 else
10055 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010056 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010057 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010059 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010060 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010061 /* Do not output a trailing newline, as this causes \r\n confusion
10062 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010063 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010064
10065 ;
10066 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010067}
Martin v. Löwis11437992002-04-12 09:54:03 +000010068_ACEOF
10069rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010070if { (ac_try="$ac_link"
10071case "(($ac_try" in
10072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10073 *) ac_try_echo=$ac_try;;
10074esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010075eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10076$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010077 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010078 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010079 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010080 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010081 { (case "(($ac_try" in
10082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10083 *) ac_try_echo=$ac_try;;
10084esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010085eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10086$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010088 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010089 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010090 (exit $ac_status); }; }; then
10091 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010092else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010093 $as_echo "$as_me: program exited with status $ac_status" >&5
10094$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010095sed 's/^/| /' conftest.$ac_ext >&5
10096
Martin v. Löwis11437992002-04-12 09:54:03 +000010097( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010098if test "$ac_cv_type_float" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010099 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10100$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10101{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010102See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010103$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010104See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010105 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010106 else
10107 ac_cv_sizeof_float=0
10108 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010109fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010110rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010111rm -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 +000010112fi
10113rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010114fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010115{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
10116$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010117
10118
10119
Martin v. Löwis11437992002-04-12 09:54:03 +000010120cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010121#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +000010122_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010123
10124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010125# The cast to long int works around a bug in the HP C Compiler
10126# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10127# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10128# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010129{ $as_echo "$as_me:$LINENO: checking size of double" >&5
10130$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010131if test "${ac_cv_sizeof_double+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010132 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010133else
Martin v. Löwis11437992002-04-12 09:54:03 +000010134 if test "$cross_compiling" = yes; then
10135 # Depending upon the size, compute the lo and hi bounds.
10136cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010137/* confdefs.h. */
10138_ACEOF
10139cat confdefs.h >>conftest.$ac_ext
10140cat >>conftest.$ac_ext <<_ACEOF
10141/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010142$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010143int
10144main ()
10145{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010146static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010147test_array [0] = 0
10148
10149 ;
10150 return 0;
10151}
10152_ACEOF
10153rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010154if { (ac_try="$ac_compile"
10155case "(($ac_try" in
10156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10157 *) ac_try_echo=$ac_try;;
10158esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010159eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10160$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010161 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010162 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010163 grep -v '^ *+' conftest.er1 >conftest.err
10164 rm -f conftest.er1
10165 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010166 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010167 (exit $ac_status); } && {
10168 test -z "$ac_c_werror_flag" ||
10169 test ! -s conftest.err
10170 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010171 ac_lo=0 ac_mid=0
10172 while :; do
10173 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010174/* confdefs.h. */
10175_ACEOF
10176cat confdefs.h >>conftest.$ac_ext
10177cat >>conftest.$ac_ext <<_ACEOF
10178/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010179$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010180int
10181main ()
10182{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010183static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010184test_array [0] = 0
10185
10186 ;
10187 return 0;
10188}
10189_ACEOF
10190rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191if { (ac_try="$ac_compile"
10192case "(($ac_try" in
10193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10194 *) ac_try_echo=$ac_try;;
10195esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010196eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10197$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010198 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010199 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010200 grep -v '^ *+' conftest.er1 >conftest.err
10201 rm -f conftest.er1
10202 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010203 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010204 (exit $ac_status); } && {
10205 test -z "$ac_c_werror_flag" ||
10206 test ! -s conftest.err
10207 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010208 ac_hi=$ac_mid; break
10209else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010210 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010211sed 's/^/| /' conftest.$ac_ext >&5
10212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010213 ac_lo=`expr $ac_mid + 1`
10214 if test $ac_lo -le $ac_mid; then
10215 ac_lo= ac_hi=
10216 break
10217 fi
10218 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010219fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010220
10221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010222 done
10223else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010224 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010225sed 's/^/| /' conftest.$ac_ext >&5
10226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010228/* confdefs.h. */
10229_ACEOF
10230cat confdefs.h >>conftest.$ac_ext
10231cat >>conftest.$ac_ext <<_ACEOF
10232/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010233$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010234int
10235main ()
10236{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010237static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010238test_array [0] = 0
10239
10240 ;
10241 return 0;
10242}
10243_ACEOF
10244rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010245if { (ac_try="$ac_compile"
10246case "(($ac_try" in
10247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10248 *) ac_try_echo=$ac_try;;
10249esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010250eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10251$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010252 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010253 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010254 grep -v '^ *+' conftest.er1 >conftest.err
10255 rm -f conftest.er1
10256 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010257 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010258 (exit $ac_status); } && {
10259 test -z "$ac_c_werror_flag" ||
10260 test ! -s conftest.err
10261 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010262 ac_hi=-1 ac_mid=-1
10263 while :; do
10264 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010265/* confdefs.h. */
10266_ACEOF
10267cat confdefs.h >>conftest.$ac_ext
10268cat >>conftest.$ac_ext <<_ACEOF
10269/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010270$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010271int
10272main ()
10273{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010274static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010275test_array [0] = 0
10276
10277 ;
10278 return 0;
10279}
10280_ACEOF
10281rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010282if { (ac_try="$ac_compile"
10283case "(($ac_try" in
10284 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10285 *) ac_try_echo=$ac_try;;
10286esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010287eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10288$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010289 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010290 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010291 grep -v '^ *+' conftest.er1 >conftest.err
10292 rm -f conftest.er1
10293 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010294 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010295 (exit $ac_status); } && {
10296 test -z "$ac_c_werror_flag" ||
10297 test ! -s conftest.err
10298 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010299 ac_lo=$ac_mid; break
10300else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010301 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010302sed 's/^/| /' conftest.$ac_ext >&5
10303
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010304 ac_hi=`expr '(' $ac_mid ')' - 1`
10305 if test $ac_mid -le $ac_hi; then
10306 ac_lo= ac_hi=
10307 break
10308 fi
10309 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010310fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010311
10312rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010313 done
10314else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010315 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010316sed 's/^/| /' conftest.$ac_ext >&5
10317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010318 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010319fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010320
10321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010323
10324rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010325# Binary search between lo and hi bounds.
10326while test "x$ac_lo" != "x$ac_hi"; do
10327 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010329/* confdefs.h. */
10330_ACEOF
10331cat confdefs.h >>conftest.$ac_ext
10332cat >>conftest.$ac_ext <<_ACEOF
10333/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010334$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010335int
10336main ()
10337{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010338static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010339test_array [0] = 0
10340
10341 ;
10342 return 0;
10343}
10344_ACEOF
10345rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010346if { (ac_try="$ac_compile"
10347case "(($ac_try" in
10348 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10349 *) ac_try_echo=$ac_try;;
10350esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010351eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10352$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010353 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010354 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010355 grep -v '^ *+' conftest.er1 >conftest.err
10356 rm -f conftest.er1
10357 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010358 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010359 (exit $ac_status); } && {
10360 test -z "$ac_c_werror_flag" ||
10361 test ! -s conftest.err
10362 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010363 ac_hi=$ac_mid
10364else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010365 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010366sed 's/^/| /' conftest.$ac_ext >&5
10367
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010368 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010369fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010370
10371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010372done
10373case $ac_lo in
10374?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010375'') if test "$ac_cv_type_double" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010376 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10377$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10378{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010379See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010380$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010381See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010382 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010383 else
10384 ac_cv_sizeof_double=0
10385 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010386esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000010387else
Martin v. Löwis11437992002-04-12 09:54:03 +000010388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010389/* confdefs.h. */
10390_ACEOF
10391cat confdefs.h >>conftest.$ac_ext
10392cat >>conftest.$ac_ext <<_ACEOF
10393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010394$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010395static long int longval () { return (long int) (sizeof (double)); }
10396static unsigned long int ulongval () { return (long int) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010397#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010398#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010399int
10400main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +000010401{
Martin v. Löwis11437992002-04-12 09:54:03 +000010402
10403 FILE *f = fopen ("conftest.val", "w");
10404 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010405 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010406 if (((long int) (sizeof (double))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010407 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010408 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010409 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010410 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010411 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010412 }
10413 else
10414 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010415 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010416 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010417 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010418 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010419 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010420 /* Do not output a trailing newline, as this causes \r\n confusion
10421 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010422 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010423
10424 ;
10425 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010426}
Martin v. Löwis11437992002-04-12 09:54:03 +000010427_ACEOF
10428rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010429if { (ac_try="$ac_link"
10430case "(($ac_try" in
10431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10432 *) ac_try_echo=$ac_try;;
10433esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010434eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10435$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010436 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010437 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010438 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010439 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010440 { (case "(($ac_try" in
10441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10442 *) ac_try_echo=$ac_try;;
10443esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010444eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10445$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010446 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010447 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010448 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010449 (exit $ac_status); }; }; then
10450 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010451else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010452 $as_echo "$as_me: program exited with status $ac_status" >&5
10453$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010454sed 's/^/| /' conftest.$ac_ext >&5
10455
Martin v. Löwis11437992002-04-12 09:54:03 +000010456( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010457if test "$ac_cv_type_double" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010458 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10459$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10460{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010461See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010462$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010463See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010464 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010465 else
10466 ac_cv_sizeof_double=0
10467 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010468fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010469rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010470rm -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 +000010471fi
10472rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010473fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010474{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10475$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010476
10477
10478
Martin v. Löwis11437992002-04-12 09:54:03 +000010479cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010480#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010481_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010482
10483
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010484# The cast to long int works around a bug in the HP C Compiler
10485# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10486# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10487# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010488{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5
10489$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010490if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010491 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010492else
Martin v. Löwis11437992002-04-12 09:54:03 +000010493 if test "$cross_compiling" = yes; then
10494 # Depending upon the size, compute the lo and hi bounds.
10495cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010496/* confdefs.h. */
10497_ACEOF
10498cat confdefs.h >>conftest.$ac_ext
10499cat >>conftest.$ac_ext <<_ACEOF
10500/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010501$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010502int
10503main ()
10504{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010505static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010506test_array [0] = 0
10507
10508 ;
10509 return 0;
10510}
10511_ACEOF
10512rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010513if { (ac_try="$ac_compile"
10514case "(($ac_try" in
10515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10516 *) ac_try_echo=$ac_try;;
10517esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010518eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10519$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010520 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010522 grep -v '^ *+' conftest.er1 >conftest.err
10523 rm -f conftest.er1
10524 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010525 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010526 (exit $ac_status); } && {
10527 test -z "$ac_c_werror_flag" ||
10528 test ! -s conftest.err
10529 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010530 ac_lo=0 ac_mid=0
10531 while :; do
10532 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010533/* confdefs.h. */
10534_ACEOF
10535cat confdefs.h >>conftest.$ac_ext
10536cat >>conftest.$ac_ext <<_ACEOF
10537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010538$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010539int
10540main ()
10541{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010542static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010543test_array [0] = 0
10544
10545 ;
10546 return 0;
10547}
10548_ACEOF
10549rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010550if { (ac_try="$ac_compile"
10551case "(($ac_try" in
10552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10553 *) ac_try_echo=$ac_try;;
10554esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010555eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10556$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010557 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010558 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010559 grep -v '^ *+' conftest.er1 >conftest.err
10560 rm -f conftest.er1
10561 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010562 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010563 (exit $ac_status); } && {
10564 test -z "$ac_c_werror_flag" ||
10565 test ! -s conftest.err
10566 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010567 ac_hi=$ac_mid; break
10568else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010569 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010570sed 's/^/| /' conftest.$ac_ext >&5
10571
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010572 ac_lo=`expr $ac_mid + 1`
10573 if test $ac_lo -le $ac_mid; then
10574 ac_lo= ac_hi=
10575 break
10576 fi
10577 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010578fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010579
10580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010581 done
10582else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010583 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010584sed 's/^/| /' conftest.$ac_ext >&5
10585
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010586 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010587/* confdefs.h. */
10588_ACEOF
10589cat confdefs.h >>conftest.$ac_ext
10590cat >>conftest.$ac_ext <<_ACEOF
10591/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010592$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010593int
10594main ()
10595{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010596static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010597test_array [0] = 0
10598
10599 ;
10600 return 0;
10601}
10602_ACEOF
10603rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010604if { (ac_try="$ac_compile"
10605case "(($ac_try" in
10606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10607 *) ac_try_echo=$ac_try;;
10608esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010609eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10610$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010611 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010612 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010613 grep -v '^ *+' conftest.er1 >conftest.err
10614 rm -f conftest.er1
10615 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010616 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010617 (exit $ac_status); } && {
10618 test -z "$ac_c_werror_flag" ||
10619 test ! -s conftest.err
10620 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010621 ac_hi=-1 ac_mid=-1
10622 while :; do
10623 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010624/* confdefs.h. */
10625_ACEOF
10626cat confdefs.h >>conftest.$ac_ext
10627cat >>conftest.$ac_ext <<_ACEOF
10628/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010629$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010630int
10631main ()
10632{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010633static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010634test_array [0] = 0
10635
10636 ;
10637 return 0;
10638}
10639_ACEOF
10640rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010641if { (ac_try="$ac_compile"
10642case "(($ac_try" in
10643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10644 *) ac_try_echo=$ac_try;;
10645esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010646eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10647$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010650 grep -v '^ *+' conftest.er1 >conftest.err
10651 rm -f conftest.er1
10652 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010653 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010654 (exit $ac_status); } && {
10655 test -z "$ac_c_werror_flag" ||
10656 test ! -s conftest.err
10657 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010658 ac_lo=$ac_mid; break
10659else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010660 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010661sed 's/^/| /' conftest.$ac_ext >&5
10662
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010663 ac_hi=`expr '(' $ac_mid ')' - 1`
10664 if test $ac_mid -le $ac_hi; then
10665 ac_lo= ac_hi=
10666 break
10667 fi
10668 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010669fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010670
10671rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010672 done
10673else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010674 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010675sed 's/^/| /' conftest.$ac_ext >&5
10676
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010677 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010679
10680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010681fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010682
10683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010684# Binary search between lo and hi bounds.
10685while test "x$ac_lo" != "x$ac_hi"; do
10686 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10687 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010688/* confdefs.h. */
10689_ACEOF
10690cat confdefs.h >>conftest.$ac_ext
10691cat >>conftest.$ac_ext <<_ACEOF
10692/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010693$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010694int
10695main ()
10696{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010697static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010698test_array [0] = 0
10699
10700 ;
10701 return 0;
10702}
10703_ACEOF
10704rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010705if { (ac_try="$ac_compile"
10706case "(($ac_try" in
10707 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10708 *) ac_try_echo=$ac_try;;
10709esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010710eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10711$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010712 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010713 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010714 grep -v '^ *+' conftest.er1 >conftest.err
10715 rm -f conftest.er1
10716 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010717 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010718 (exit $ac_status); } && {
10719 test -z "$ac_c_werror_flag" ||
10720 test ! -s conftest.err
10721 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010722 ac_hi=$ac_mid
10723else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010724 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010725sed 's/^/| /' conftest.$ac_ext >&5
10726
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010727 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010729
10730rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010731done
10732case $ac_lo in
10733?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010734'') if test "$ac_cv_type_fpos_t" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010735 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10736$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10737{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010738See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010739$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010740See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010741 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010742 else
10743 ac_cv_sizeof_fpos_t=0
10744 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010745esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010746else
Martin v. Löwis11437992002-04-12 09:54:03 +000010747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010748/* confdefs.h. */
10749_ACEOF
10750cat confdefs.h >>conftest.$ac_ext
10751cat >>conftest.$ac_ext <<_ACEOF
10752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010753$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010754static long int longval () { return (long int) (sizeof (fpos_t)); }
10755static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010756#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010757#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010758int
10759main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010760{
Martin v. Löwis11437992002-04-12 09:54:03 +000010761
10762 FILE *f = fopen ("conftest.val", "w");
10763 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010764 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010765 if (((long int) (sizeof (fpos_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010766 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010767 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010768 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010769 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010770 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010771 }
10772 else
10773 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010774 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010775 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010777 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010778 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010779 /* Do not output a trailing newline, as this causes \r\n confusion
10780 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010781 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010782
10783 ;
10784 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010785}
Martin v. Löwis11437992002-04-12 09:54:03 +000010786_ACEOF
10787rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010788if { (ac_try="$ac_link"
10789case "(($ac_try" in
10790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10791 *) ac_try_echo=$ac_try;;
10792esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010793eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10794$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010795 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010796 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010797 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010798 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010799 { (case "(($ac_try" in
10800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10801 *) ac_try_echo=$ac_try;;
10802esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010803eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10804$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010805 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010806 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010807 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010808 (exit $ac_status); }; }; then
10809 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010810else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010811 $as_echo "$as_me: program exited with status $ac_status" >&5
10812$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010813sed 's/^/| /' conftest.$ac_ext >&5
10814
Martin v. Löwis11437992002-04-12 09:54:03 +000010815( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010816if test "$ac_cv_type_fpos_t" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010817 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10818$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10819{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010820See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010821$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010822See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010823 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010824 else
10825 ac_cv_sizeof_fpos_t=0
10826 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010827fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010828rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010829rm -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 +000010830fi
10831rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010832fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010833{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10834$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010835
10836
10837
Martin v. Löwis11437992002-04-12 09:54:03 +000010838cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010839#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010840_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010841
Michael W. Hudson54241132001-12-07 15:38:26 +000010842
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010843# The cast to long int works around a bug in the HP C Compiler
10844# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10845# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10846# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010847{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
10848$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010849if test "${ac_cv_sizeof_size_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010850 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010851else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010852 if test "$cross_compiling" = yes; then
10853 # Depending upon the size, compute the lo and hi bounds.
10854cat >conftest.$ac_ext <<_ACEOF
10855/* confdefs.h. */
10856_ACEOF
10857cat confdefs.h >>conftest.$ac_ext
10858cat >>conftest.$ac_ext <<_ACEOF
10859/* end confdefs.h. */
10860$ac_includes_default
10861int
10862main ()
10863{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010864static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010865test_array [0] = 0
10866
10867 ;
10868 return 0;
10869}
10870_ACEOF
10871rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010872if { (ac_try="$ac_compile"
10873case "(($ac_try" in
10874 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10875 *) ac_try_echo=$ac_try;;
10876esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010877eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10878$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010879 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010880 ac_status=$?
10881 grep -v '^ *+' conftest.er1 >conftest.err
10882 rm -f conftest.er1
10883 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010884 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010885 (exit $ac_status); } && {
10886 test -z "$ac_c_werror_flag" ||
10887 test ! -s conftest.err
10888 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010889 ac_lo=0 ac_mid=0
10890 while :; do
10891 cat >conftest.$ac_ext <<_ACEOF
10892/* confdefs.h. */
10893_ACEOF
10894cat confdefs.h >>conftest.$ac_ext
10895cat >>conftest.$ac_ext <<_ACEOF
10896/* end confdefs.h. */
10897$ac_includes_default
10898int
10899main ()
10900{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010901static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010902test_array [0] = 0
10903
10904 ;
10905 return 0;
10906}
10907_ACEOF
10908rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010909if { (ac_try="$ac_compile"
10910case "(($ac_try" in
10911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10912 *) ac_try_echo=$ac_try;;
10913esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010914eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10915$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010916 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010917 ac_status=$?
10918 grep -v '^ *+' conftest.er1 >conftest.err
10919 rm -f conftest.er1
10920 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010921 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010922 (exit $ac_status); } && {
10923 test -z "$ac_c_werror_flag" ||
10924 test ! -s conftest.err
10925 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010926 ac_hi=$ac_mid; break
10927else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010928 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010929sed 's/^/| /' conftest.$ac_ext >&5
10930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010931 ac_lo=`expr $ac_mid + 1`
10932 if test $ac_lo -le $ac_mid; then
10933 ac_lo= ac_hi=
10934 break
10935 fi
10936 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010937fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010938
10939rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010940 done
10941else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010942 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010943sed 's/^/| /' conftest.$ac_ext >&5
10944
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010945 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010946/* confdefs.h. */
10947_ACEOF
10948cat confdefs.h >>conftest.$ac_ext
10949cat >>conftest.$ac_ext <<_ACEOF
10950/* end confdefs.h. */
10951$ac_includes_default
10952int
10953main ()
10954{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010955static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010956test_array [0] = 0
10957
10958 ;
10959 return 0;
10960}
10961_ACEOF
10962rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010963if { (ac_try="$ac_compile"
10964case "(($ac_try" in
10965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10966 *) ac_try_echo=$ac_try;;
10967esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010968eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10969$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010970 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010971 ac_status=$?
10972 grep -v '^ *+' conftest.er1 >conftest.err
10973 rm -f conftest.er1
10974 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010975 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010976 (exit $ac_status); } && {
10977 test -z "$ac_c_werror_flag" ||
10978 test ! -s conftest.err
10979 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010980 ac_hi=-1 ac_mid=-1
10981 while :; do
10982 cat >conftest.$ac_ext <<_ACEOF
10983/* confdefs.h. */
10984_ACEOF
10985cat confdefs.h >>conftest.$ac_ext
10986cat >>conftest.$ac_ext <<_ACEOF
10987/* end confdefs.h. */
10988$ac_includes_default
10989int
10990main ()
10991{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000010992static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010993test_array [0] = 0
10994
10995 ;
10996 return 0;
10997}
10998_ACEOF
10999rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011000if { (ac_try="$ac_compile"
11001case "(($ac_try" in
11002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11003 *) ac_try_echo=$ac_try;;
11004esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011005eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11006$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011007 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011008 ac_status=$?
11009 grep -v '^ *+' conftest.er1 >conftest.err
11010 rm -f conftest.er1
11011 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011012 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011013 (exit $ac_status); } && {
11014 test -z "$ac_c_werror_flag" ||
11015 test ! -s conftest.err
11016 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000011017 ac_lo=$ac_mid; break
11018else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011019 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011020sed 's/^/| /' conftest.$ac_ext >&5
11021
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011022 ac_hi=`expr '(' $ac_mid ')' - 1`
11023 if test $ac_mid -le $ac_hi; then
11024 ac_lo= ac_hi=
11025 break
11026 fi
11027 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011028fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011029
11030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011031 done
11032else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011033 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011034sed 's/^/| /' conftest.$ac_ext >&5
11035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011036 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000011037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011038
11039rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011040fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011041
11042rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011043# Binary search between lo and hi bounds.
11044while test "x$ac_lo" != "x$ac_hi"; do
11045 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11046 cat >conftest.$ac_ext <<_ACEOF
11047/* confdefs.h. */
11048_ACEOF
11049cat confdefs.h >>conftest.$ac_ext
11050cat >>conftest.$ac_ext <<_ACEOF
11051/* end confdefs.h. */
11052$ac_includes_default
11053int
11054main ()
11055{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011056static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000011057test_array [0] = 0
11058
11059 ;
11060 return 0;
11061}
11062_ACEOF
11063rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011064if { (ac_try="$ac_compile"
11065case "(($ac_try" in
11066 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11067 *) ac_try_echo=$ac_try;;
11068esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011069eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11070$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011071 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011072 ac_status=$?
11073 grep -v '^ *+' conftest.er1 >conftest.err
11074 rm -f conftest.er1
11075 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011076 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011077 (exit $ac_status); } && {
11078 test -z "$ac_c_werror_flag" ||
11079 test ! -s conftest.err
11080 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000011081 ac_hi=$ac_mid
11082else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011083 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011084sed 's/^/| /' conftest.$ac_ext >&5
11085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011086 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011088
11089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011090done
11091case $ac_lo in
11092?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011093'') if test "$ac_cv_type_size_t" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011094 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11095$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11096{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011097See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011098$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011099See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011100 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011101 else
11102 ac_cv_sizeof_size_t=0
11103 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011104esac
11105else
Martin v. Löwis18e16552006-02-15 17:27:45 +000011106 cat >conftest.$ac_ext <<_ACEOF
11107/* confdefs.h. */
11108_ACEOF
11109cat confdefs.h >>conftest.$ac_ext
11110cat >>conftest.$ac_ext <<_ACEOF
11111/* end confdefs.h. */
11112$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011113static long int longval () { return (long int) (sizeof (size_t)); }
11114static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011115#include <stdio.h>
11116#include <stdlib.h>
11117int
11118main ()
11119{
11120
11121 FILE *f = fopen ("conftest.val", "w");
11122 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011123 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011124 if (((long int) (sizeof (size_t))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011125 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011126 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011127 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011128 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011129 fprintf (f, "%ld", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000011130 }
11131 else
11132 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011133 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011134 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011135 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011136 fprintf (f, "%lu", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000011137 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011138 /* Do not output a trailing newline, as this causes \r\n confusion
11139 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011140 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011141
11142 ;
11143 return 0;
11144}
11145_ACEOF
11146rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011147if { (ac_try="$ac_link"
11148case "(($ac_try" in
11149 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11150 *) ac_try_echo=$ac_try;;
11151esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011152eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11153$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011154 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011155 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011156 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011157 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011158 { (case "(($ac_try" in
11159 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11160 *) ac_try_echo=$ac_try;;
11161esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011162eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11163$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011164 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011165 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011166 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011167 (exit $ac_status); }; }; then
11168 ac_cv_sizeof_size_t=`cat conftest.val`
11169else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011170 $as_echo "$as_me: program exited with status $ac_status" >&5
11171$as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011172sed 's/^/| /' conftest.$ac_ext >&5
11173
11174( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011175if test "$ac_cv_type_size_t" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011176 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11177$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11178{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011179See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011180$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011181See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011182 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011183 else
11184 ac_cv_sizeof_size_t=0
11185 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000011186fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011187rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011188rm -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 +000011189fi
11190rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000011191fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011192{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
11193$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011194
11195
11196
Martin v. Löwis18e16552006-02-15 17:27:45 +000011197cat >>confdefs.h <<_ACEOF
11198#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
11199_ACEOF
11200
11201
Christian Heimes400adb02008-02-01 08:12:03 +000011202# The cast to long int works around a bug in the HP C Compiler
11203# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11204# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11205# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011206{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5
11207$as_echo_n "checking size of pid_t... " >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011208if test "${ac_cv_sizeof_pid_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011209 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +000011210else
11211 if test "$cross_compiling" = yes; then
11212 # Depending upon the size, compute the lo and hi bounds.
11213cat >conftest.$ac_ext <<_ACEOF
11214/* confdefs.h. */
11215_ACEOF
11216cat confdefs.h >>conftest.$ac_ext
11217cat >>conftest.$ac_ext <<_ACEOF
11218/* end confdefs.h. */
11219$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011220int
11221main ()
11222{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011223static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000011224test_array [0] = 0
11225
11226 ;
11227 return 0;
11228}
11229_ACEOF
11230rm -f conftest.$ac_objext
11231if { (ac_try="$ac_compile"
11232case "(($ac_try" in
11233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11234 *) ac_try_echo=$ac_try;;
11235esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011236eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11237$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011238 (eval "$ac_compile") 2>conftest.er1
11239 ac_status=$?
11240 grep -v '^ *+' conftest.er1 >conftest.err
11241 rm -f conftest.er1
11242 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011243 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011244 (exit $ac_status); } && {
11245 test -z "$ac_c_werror_flag" ||
11246 test ! -s conftest.err
11247 } && test -s conftest.$ac_objext; then
11248 ac_lo=0 ac_mid=0
11249 while :; do
11250 cat >conftest.$ac_ext <<_ACEOF
11251/* confdefs.h. */
11252_ACEOF
11253cat confdefs.h >>conftest.$ac_ext
11254cat >>conftest.$ac_ext <<_ACEOF
11255/* end confdefs.h. */
11256$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011257int
11258main ()
11259{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011260static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011261test_array [0] = 0
11262
11263 ;
11264 return 0;
11265}
11266_ACEOF
11267rm -f conftest.$ac_objext
11268if { (ac_try="$ac_compile"
11269case "(($ac_try" in
11270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11271 *) ac_try_echo=$ac_try;;
11272esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011273eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11274$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011275 (eval "$ac_compile") 2>conftest.er1
11276 ac_status=$?
11277 grep -v '^ *+' conftest.er1 >conftest.err
11278 rm -f conftest.er1
11279 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011280 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011281 (exit $ac_status); } && {
11282 test -z "$ac_c_werror_flag" ||
11283 test ! -s conftest.err
11284 } && test -s conftest.$ac_objext; then
11285 ac_hi=$ac_mid; break
11286else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011287 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011288sed 's/^/| /' conftest.$ac_ext >&5
11289
11290 ac_lo=`expr $ac_mid + 1`
11291 if test $ac_lo -le $ac_mid; then
11292 ac_lo= ac_hi=
11293 break
11294 fi
11295 ac_mid=`expr 2 '*' $ac_mid + 1`
11296fi
11297
11298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11299 done
11300else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011301 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011302sed 's/^/| /' conftest.$ac_ext >&5
11303
11304 cat >conftest.$ac_ext <<_ACEOF
11305/* confdefs.h. */
11306_ACEOF
11307cat confdefs.h >>conftest.$ac_ext
11308cat >>conftest.$ac_ext <<_ACEOF
11309/* end confdefs.h. */
11310$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011311int
11312main ()
11313{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011314static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000011315test_array [0] = 0
11316
11317 ;
11318 return 0;
11319}
11320_ACEOF
11321rm -f conftest.$ac_objext
11322if { (ac_try="$ac_compile"
11323case "(($ac_try" in
11324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11325 *) ac_try_echo=$ac_try;;
11326esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011327eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11328$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011329 (eval "$ac_compile") 2>conftest.er1
11330 ac_status=$?
11331 grep -v '^ *+' conftest.er1 >conftest.err
11332 rm -f conftest.er1
11333 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011334 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011335 (exit $ac_status); } && {
11336 test -z "$ac_c_werror_flag" ||
11337 test ! -s conftest.err
11338 } && test -s conftest.$ac_objext; then
11339 ac_hi=-1 ac_mid=-1
11340 while :; do
11341 cat >conftest.$ac_ext <<_ACEOF
11342/* confdefs.h. */
11343_ACEOF
11344cat confdefs.h >>conftest.$ac_ext
11345cat >>conftest.$ac_ext <<_ACEOF
11346/* end confdefs.h. */
11347$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011348int
11349main ()
11350{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011351static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011352test_array [0] = 0
11353
11354 ;
11355 return 0;
11356}
11357_ACEOF
11358rm -f conftest.$ac_objext
11359if { (ac_try="$ac_compile"
11360case "(($ac_try" in
11361 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11362 *) ac_try_echo=$ac_try;;
11363esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011364eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11365$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011366 (eval "$ac_compile") 2>conftest.er1
11367 ac_status=$?
11368 grep -v '^ *+' conftest.er1 >conftest.err
11369 rm -f conftest.er1
11370 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011371 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011372 (exit $ac_status); } && {
11373 test -z "$ac_c_werror_flag" ||
11374 test ! -s conftest.err
11375 } && test -s conftest.$ac_objext; then
11376 ac_lo=$ac_mid; break
11377else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011378 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011379sed 's/^/| /' conftest.$ac_ext >&5
11380
11381 ac_hi=`expr '(' $ac_mid ')' - 1`
11382 if test $ac_mid -le $ac_hi; then
11383 ac_lo= ac_hi=
11384 break
11385 fi
11386 ac_mid=`expr 2 '*' $ac_mid`
11387fi
11388
11389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11390 done
11391else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011392 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011393sed 's/^/| /' conftest.$ac_ext >&5
11394
11395 ac_lo= ac_hi=
11396fi
11397
11398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11399fi
11400
11401rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11402# Binary search between lo and hi bounds.
11403while test "x$ac_lo" != "x$ac_hi"; do
11404 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11405 cat >conftest.$ac_ext <<_ACEOF
11406/* confdefs.h. */
11407_ACEOF
11408cat confdefs.h >>conftest.$ac_ext
11409cat >>conftest.$ac_ext <<_ACEOF
11410/* end confdefs.h. */
11411$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011412int
11413main ()
11414{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011415static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011416test_array [0] = 0
11417
11418 ;
11419 return 0;
11420}
11421_ACEOF
11422rm -f conftest.$ac_objext
11423if { (ac_try="$ac_compile"
11424case "(($ac_try" in
11425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11426 *) ac_try_echo=$ac_try;;
11427esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011428eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11429$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011430 (eval "$ac_compile") 2>conftest.er1
11431 ac_status=$?
11432 grep -v '^ *+' conftest.er1 >conftest.err
11433 rm -f conftest.er1
11434 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011435 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011436 (exit $ac_status); } && {
11437 test -z "$ac_c_werror_flag" ||
11438 test ! -s conftest.err
11439 } && test -s conftest.$ac_objext; then
11440 ac_hi=$ac_mid
11441else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011442 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011443sed 's/^/| /' conftest.$ac_ext >&5
11444
11445 ac_lo=`expr '(' $ac_mid ')' + 1`
11446fi
11447
11448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11449done
11450case $ac_lo in
11451?*) ac_cv_sizeof_pid_t=$ac_lo;;
11452'') if test "$ac_cv_type_pid_t" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011453 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11454$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11455{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011456See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011457$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011458See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011459 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011460 else
11461 ac_cv_sizeof_pid_t=0
11462 fi ;;
11463esac
11464else
11465 cat >conftest.$ac_ext <<_ACEOF
11466/* confdefs.h. */
11467_ACEOF
11468cat confdefs.h >>conftest.$ac_ext
11469cat >>conftest.$ac_ext <<_ACEOF
11470/* end confdefs.h. */
11471$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011472static long int longval () { return (long int) (sizeof (pid_t)); }
11473static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011474#include <stdio.h>
11475#include <stdlib.h>
11476int
11477main ()
11478{
11479
11480 FILE *f = fopen ("conftest.val", "w");
11481 if (! f)
11482 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011483 if (((long int) (sizeof (pid_t))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011484 {
11485 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011486 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000011487 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011488 fprintf (f, "%ld", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011489 }
11490 else
11491 {
11492 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011493 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000011494 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011495 fprintf (f, "%lu", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011496 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011497 /* Do not output a trailing newline, as this causes \r\n confusion
11498 on some platforms. */
Christian Heimes400adb02008-02-01 08:12:03 +000011499 return ferror (f) || fclose (f) != 0;
11500
11501 ;
11502 return 0;
11503}
11504_ACEOF
11505rm -f conftest$ac_exeext
11506if { (ac_try="$ac_link"
11507case "(($ac_try" in
11508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11509 *) ac_try_echo=$ac_try;;
11510esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011511eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11512$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011513 (eval "$ac_link") 2>&5
11514 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011515 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011516 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11517 { (case "(($ac_try" in
11518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11519 *) ac_try_echo=$ac_try;;
11520esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011521eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11522$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011523 (eval "$ac_try") 2>&5
11524 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011525 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011526 (exit $ac_status); }; }; then
11527 ac_cv_sizeof_pid_t=`cat conftest.val`
11528else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011529 $as_echo "$as_me: program exited with status $ac_status" >&5
11530$as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011531sed 's/^/| /' conftest.$ac_ext >&5
11532
11533( exit $ac_status )
11534if test "$ac_cv_type_pid_t" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011535 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11536$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11537{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011538See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011539$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011540See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011541 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011542 else
11543 ac_cv_sizeof_pid_t=0
11544 fi
11545fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011546rm -rf conftest.dSYM
Christian Heimes400adb02008-02-01 08:12:03 +000011547rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11548fi
11549rm -f conftest.val
11550fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011551{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11552$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011553
11554
11555
11556cat >>confdefs.h <<_ACEOF
11557#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11558_ACEOF
11559
11560
Michael W. Hudson54241132001-12-07 15:38:26 +000011561
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011562{ $as_echo "$as_me:$LINENO: checking for long long support" >&5
11563$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011564have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011565cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011566/* confdefs.h. */
11567_ACEOF
11568cat confdefs.h >>conftest.$ac_ext
11569cat >>conftest.$ac_ext <<_ACEOF
11570/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011571
Martin v. Löwis11437992002-04-12 09:54:03 +000011572int
11573main ()
11574{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011575long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011576 ;
11577 return 0;
11578}
11579_ACEOF
11580rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011581if { (ac_try="$ac_compile"
11582case "(($ac_try" in
11583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11584 *) ac_try_echo=$ac_try;;
11585esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011586eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11587$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011588 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011589 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011590 grep -v '^ *+' conftest.er1 >conftest.err
11591 rm -f conftest.er1
11592 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011593 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011594 (exit $ac_status); } && {
11595 test -z "$ac_c_werror_flag" ||
11596 test ! -s conftest.err
11597 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011598
11599
11600cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011601#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011602_ACEOF
11603
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011604 have_long_long=yes
11605
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011606else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011607 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011608sed 's/^/| /' conftest.$ac_ext >&5
11609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011610
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011612
11613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011614{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5
11615$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011616if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011617# The cast to long int works around a bug in the HP C Compiler
11618# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11619# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11620# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011621{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
11622$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011623if test "${ac_cv_sizeof_long_long+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011624 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011625else
Martin v. Löwis11437992002-04-12 09:54:03 +000011626 if test "$cross_compiling" = yes; then
11627 # Depending upon the size, compute the lo and hi bounds.
11628cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011629/* confdefs.h. */
11630_ACEOF
11631cat confdefs.h >>conftest.$ac_ext
11632cat >>conftest.$ac_ext <<_ACEOF
11633/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011634$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011635int
11636main ()
11637{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011638static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011639test_array [0] = 0
11640
11641 ;
11642 return 0;
11643}
11644_ACEOF
11645rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011646if { (ac_try="$ac_compile"
11647case "(($ac_try" in
11648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11649 *) ac_try_echo=$ac_try;;
11650esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011651eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11652$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011653 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011654 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011655 grep -v '^ *+' conftest.er1 >conftest.err
11656 rm -f conftest.er1
11657 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011658 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011659 (exit $ac_status); } && {
11660 test -z "$ac_c_werror_flag" ||
11661 test ! -s conftest.err
11662 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011663 ac_lo=0 ac_mid=0
11664 while :; do
11665 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011666/* confdefs.h. */
11667_ACEOF
11668cat confdefs.h >>conftest.$ac_ext
11669cat >>conftest.$ac_ext <<_ACEOF
11670/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011671$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011672int
11673main ()
11674{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011675static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011676test_array [0] = 0
11677
11678 ;
11679 return 0;
11680}
11681_ACEOF
11682rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011683if { (ac_try="$ac_compile"
11684case "(($ac_try" in
11685 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11686 *) ac_try_echo=$ac_try;;
11687esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011688eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11689$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011690 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011691 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011692 grep -v '^ *+' conftest.er1 >conftest.err
11693 rm -f conftest.er1
11694 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011695 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011696 (exit $ac_status); } && {
11697 test -z "$ac_c_werror_flag" ||
11698 test ! -s conftest.err
11699 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011700 ac_hi=$ac_mid; break
11701else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011702 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011703sed 's/^/| /' conftest.$ac_ext >&5
11704
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011705 ac_lo=`expr $ac_mid + 1`
11706 if test $ac_lo -le $ac_mid; then
11707 ac_lo= ac_hi=
11708 break
11709 fi
11710 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011711fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011712
11713rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011714 done
11715else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011716 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011717sed 's/^/| /' conftest.$ac_ext >&5
11718
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011719 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011720/* confdefs.h. */
11721_ACEOF
11722cat confdefs.h >>conftest.$ac_ext
11723cat >>conftest.$ac_ext <<_ACEOF
11724/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011725$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011726int
11727main ()
11728{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011729static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011730test_array [0] = 0
11731
11732 ;
11733 return 0;
11734}
11735_ACEOF
11736rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011737if { (ac_try="$ac_compile"
11738case "(($ac_try" in
11739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11740 *) ac_try_echo=$ac_try;;
11741esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011742eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11743$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011744 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011746 grep -v '^ *+' conftest.er1 >conftest.err
11747 rm -f conftest.er1
11748 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011749 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011750 (exit $ac_status); } && {
11751 test -z "$ac_c_werror_flag" ||
11752 test ! -s conftest.err
11753 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011754 ac_hi=-1 ac_mid=-1
11755 while :; do
11756 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011757/* confdefs.h. */
11758_ACEOF
11759cat confdefs.h >>conftest.$ac_ext
11760cat >>conftest.$ac_ext <<_ACEOF
11761/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011762$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011763int
11764main ()
11765{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011766static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011767test_array [0] = 0
11768
11769 ;
11770 return 0;
11771}
11772_ACEOF
11773rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011774if { (ac_try="$ac_compile"
11775case "(($ac_try" in
11776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11777 *) ac_try_echo=$ac_try;;
11778esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011779eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11780$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011781 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011782 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011783 grep -v '^ *+' conftest.er1 >conftest.err
11784 rm -f conftest.er1
11785 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011786 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011787 (exit $ac_status); } && {
11788 test -z "$ac_c_werror_flag" ||
11789 test ! -s conftest.err
11790 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011791 ac_lo=$ac_mid; break
11792else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011793 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011794sed 's/^/| /' conftest.$ac_ext >&5
11795
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011796 ac_hi=`expr '(' $ac_mid ')' - 1`
11797 if test $ac_mid -le $ac_hi; then
11798 ac_lo= ac_hi=
11799 break
11800 fi
11801 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011802fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011803
11804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011805 done
11806else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011807 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011808sed 's/^/| /' conftest.$ac_ext >&5
11809
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011810 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011811fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011812
11813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011814fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011815
11816rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011817# Binary search between lo and hi bounds.
11818while test "x$ac_lo" != "x$ac_hi"; do
11819 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11820 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011821/* confdefs.h. */
11822_ACEOF
11823cat confdefs.h >>conftest.$ac_ext
11824cat >>conftest.$ac_ext <<_ACEOF
11825/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011826$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011827int
11828main ()
11829{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011830static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011831test_array [0] = 0
11832
11833 ;
11834 return 0;
11835}
11836_ACEOF
11837rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011838if { (ac_try="$ac_compile"
11839case "(($ac_try" in
11840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11841 *) ac_try_echo=$ac_try;;
11842esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011843eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11844$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011845 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011846 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011847 grep -v '^ *+' conftest.er1 >conftest.err
11848 rm -f conftest.er1
11849 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011850 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011851 (exit $ac_status); } && {
11852 test -z "$ac_c_werror_flag" ||
11853 test ! -s conftest.err
11854 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011855 ac_hi=$ac_mid
11856else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011857 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011858sed 's/^/| /' conftest.$ac_ext >&5
11859
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011860 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011861fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011862
11863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011864done
11865case $ac_lo in
11866?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011867'') if test "$ac_cv_type_long_long" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011868 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11869$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11870{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011871See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011872$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011873See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011874 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011875 else
11876 ac_cv_sizeof_long_long=0
11877 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011878esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011879else
Martin v. Löwis11437992002-04-12 09:54:03 +000011880 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011881/* confdefs.h. */
11882_ACEOF
11883cat confdefs.h >>conftest.$ac_ext
11884cat >>conftest.$ac_ext <<_ACEOF
11885/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011886$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011887static long int longval () { return (long int) (sizeof (long long)); }
11888static unsigned long int ulongval () { return (long int) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011889#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011890#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011891int
11892main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011893{
Martin v. Löwis11437992002-04-12 09:54:03 +000011894
11895 FILE *f = fopen ("conftest.val", "w");
11896 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011897 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011898 if (((long int) (sizeof (long long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011899 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011900 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011901 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011902 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011903 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011904 }
11905 else
11906 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011907 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011908 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011909 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011910 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011911 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011912 /* Do not output a trailing newline, as this causes \r\n confusion
11913 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011914 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011915
11916 ;
11917 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011918}
Martin v. Löwis11437992002-04-12 09:54:03 +000011919_ACEOF
11920rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011921if { (ac_try="$ac_link"
11922case "(($ac_try" in
11923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11924 *) ac_try_echo=$ac_try;;
11925esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011926eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11927$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011928 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011929 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011930 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011931 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011932 { (case "(($ac_try" in
11933 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11934 *) ac_try_echo=$ac_try;;
11935esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011936eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11937$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011938 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011939 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011940 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011941 (exit $ac_status); }; }; then
11942 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011943else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011944 $as_echo "$as_me: program exited with status $ac_status" >&5
11945$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011946sed 's/^/| /' conftest.$ac_ext >&5
11947
Martin v. Löwis11437992002-04-12 09:54:03 +000011948( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011949if test "$ac_cv_type_long_long" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011950 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11952{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011953See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011954$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011955See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011956 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011957 else
11958 ac_cv_sizeof_long_long=0
11959 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011960fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011961rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011962rm -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 +000011963fi
11964rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011965fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011966{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11967$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011968
11969
11970
Martin v. Löwis11437992002-04-12 09:54:03 +000011971cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011972#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011973_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011974
Michael W. Hudson54241132001-12-07 15:38:26 +000011975
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011976fi
11977
Benjamin Peterson82af01d2010-05-02 16:45:41 +000011978{ $as_echo "$as_me:$LINENO: checking for long double support" >&5
11979$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011980have_long_double=no
11981cat >conftest.$ac_ext <<_ACEOF
11982/* confdefs.h. */
11983_ACEOF
11984cat confdefs.h >>conftest.$ac_ext
11985cat >>conftest.$ac_ext <<_ACEOF
11986/* end confdefs.h. */
11987
11988int
11989main ()
11990{
11991long double x; x = (long double)0;
11992 ;
11993 return 0;
11994}
11995_ACEOF
11996rm -f conftest.$ac_objext
11997if { (ac_try="$ac_compile"
11998case "(($ac_try" in
11999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12000 *) ac_try_echo=$ac_try;;
12001esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012002eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12003$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012004 (eval "$ac_compile") 2>conftest.er1
12005 ac_status=$?
12006 grep -v '^ *+' conftest.er1 >conftest.err
12007 rm -f conftest.er1
12008 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012009 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012010 (exit $ac_status); } && {
12011 test -z "$ac_c_werror_flag" ||
12012 test ! -s conftest.err
12013 } && test -s conftest.$ac_objext; then
12014
12015
12016cat >>confdefs.h <<\_ACEOF
12017#define HAVE_LONG_DOUBLE 1
12018_ACEOF
12019
12020 have_long_double=yes
12021
12022else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012023 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012024sed 's/^/| /' conftest.$ac_ext >&5
12025
12026
12027fi
12028
12029rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012030{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5
12031$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012032if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012033# The cast to long int works around a bug in the HP C Compiler
12034# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12035# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12036# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012037{ $as_echo "$as_me:$LINENO: checking size of long double" >&5
12038$as_echo_n "checking size of long double... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012039if test "${ac_cv_sizeof_long_double+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012040 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012041else
12042 if test "$cross_compiling" = yes; then
12043 # Depending upon the size, compute the lo and hi bounds.
12044cat >conftest.$ac_ext <<_ACEOF
12045/* confdefs.h. */
12046_ACEOF
12047cat confdefs.h >>conftest.$ac_ext
12048cat >>conftest.$ac_ext <<_ACEOF
12049/* end confdefs.h. */
12050$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012051int
12052main ()
12053{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012054static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012055test_array [0] = 0
12056
12057 ;
12058 return 0;
12059}
12060_ACEOF
12061rm -f conftest.$ac_objext
12062if { (ac_try="$ac_compile"
12063case "(($ac_try" in
12064 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12065 *) ac_try_echo=$ac_try;;
12066esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012067eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12068$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012069 (eval "$ac_compile") 2>conftest.er1
12070 ac_status=$?
12071 grep -v '^ *+' conftest.er1 >conftest.err
12072 rm -f conftest.er1
12073 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012074 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012075 (exit $ac_status); } && {
12076 test -z "$ac_c_werror_flag" ||
12077 test ! -s conftest.err
12078 } && test -s conftest.$ac_objext; then
12079 ac_lo=0 ac_mid=0
12080 while :; do
12081 cat >conftest.$ac_ext <<_ACEOF
12082/* confdefs.h. */
12083_ACEOF
12084cat confdefs.h >>conftest.$ac_ext
12085cat >>conftest.$ac_ext <<_ACEOF
12086/* end confdefs.h. */
12087$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012088int
12089main ()
12090{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012091static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012092test_array [0] = 0
12093
12094 ;
12095 return 0;
12096}
12097_ACEOF
12098rm -f conftest.$ac_objext
12099if { (ac_try="$ac_compile"
12100case "(($ac_try" in
12101 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12102 *) ac_try_echo=$ac_try;;
12103esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012104eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12105$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012106 (eval "$ac_compile") 2>conftest.er1
12107 ac_status=$?
12108 grep -v '^ *+' conftest.er1 >conftest.err
12109 rm -f conftest.er1
12110 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012111 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012112 (exit $ac_status); } && {
12113 test -z "$ac_c_werror_flag" ||
12114 test ! -s conftest.err
12115 } && test -s conftest.$ac_objext; then
12116 ac_hi=$ac_mid; break
12117else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012118 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012119sed 's/^/| /' conftest.$ac_ext >&5
12120
12121 ac_lo=`expr $ac_mid + 1`
12122 if test $ac_lo -le $ac_mid; then
12123 ac_lo= ac_hi=
12124 break
12125 fi
12126 ac_mid=`expr 2 '*' $ac_mid + 1`
12127fi
12128
12129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12130 done
12131else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012132 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012133sed 's/^/| /' conftest.$ac_ext >&5
12134
12135 cat >conftest.$ac_ext <<_ACEOF
12136/* confdefs.h. */
12137_ACEOF
12138cat confdefs.h >>conftest.$ac_ext
12139cat >>conftest.$ac_ext <<_ACEOF
12140/* end confdefs.h. */
12141$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012142int
12143main ()
12144{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012145static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012146test_array [0] = 0
12147
12148 ;
12149 return 0;
12150}
12151_ACEOF
12152rm -f conftest.$ac_objext
12153if { (ac_try="$ac_compile"
12154case "(($ac_try" in
12155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12156 *) ac_try_echo=$ac_try;;
12157esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012158eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12159$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012160 (eval "$ac_compile") 2>conftest.er1
12161 ac_status=$?
12162 grep -v '^ *+' conftest.er1 >conftest.err
12163 rm -f conftest.er1
12164 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012165 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012166 (exit $ac_status); } && {
12167 test -z "$ac_c_werror_flag" ||
12168 test ! -s conftest.err
12169 } && test -s conftest.$ac_objext; then
12170 ac_hi=-1 ac_mid=-1
12171 while :; do
12172 cat >conftest.$ac_ext <<_ACEOF
12173/* confdefs.h. */
12174_ACEOF
12175cat confdefs.h >>conftest.$ac_ext
12176cat >>conftest.$ac_ext <<_ACEOF
12177/* end confdefs.h. */
12178$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012179int
12180main ()
12181{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012182static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012183test_array [0] = 0
12184
12185 ;
12186 return 0;
12187}
12188_ACEOF
12189rm -f conftest.$ac_objext
12190if { (ac_try="$ac_compile"
12191case "(($ac_try" in
12192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12193 *) ac_try_echo=$ac_try;;
12194esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012195eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12196$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012197 (eval "$ac_compile") 2>conftest.er1
12198 ac_status=$?
12199 grep -v '^ *+' conftest.er1 >conftest.err
12200 rm -f conftest.er1
12201 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012202 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012203 (exit $ac_status); } && {
12204 test -z "$ac_c_werror_flag" ||
12205 test ! -s conftest.err
12206 } && test -s conftest.$ac_objext; then
12207 ac_lo=$ac_mid; break
12208else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012209 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012210sed 's/^/| /' conftest.$ac_ext >&5
12211
12212 ac_hi=`expr '(' $ac_mid ')' - 1`
12213 if test $ac_mid -le $ac_hi; then
12214 ac_lo= ac_hi=
12215 break
12216 fi
12217 ac_mid=`expr 2 '*' $ac_mid`
12218fi
12219
12220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12221 done
12222else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012223 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012224sed 's/^/| /' conftest.$ac_ext >&5
12225
12226 ac_lo= ac_hi=
12227fi
12228
12229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12230fi
12231
12232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12233# Binary search between lo and hi bounds.
12234while test "x$ac_lo" != "x$ac_hi"; do
12235 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12236 cat >conftest.$ac_ext <<_ACEOF
12237/* confdefs.h. */
12238_ACEOF
12239cat confdefs.h >>conftest.$ac_ext
12240cat >>conftest.$ac_ext <<_ACEOF
12241/* end confdefs.h. */
12242$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012243int
12244main ()
12245{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012246static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012247test_array [0] = 0
12248
12249 ;
12250 return 0;
12251}
12252_ACEOF
12253rm -f conftest.$ac_objext
12254if { (ac_try="$ac_compile"
12255case "(($ac_try" in
12256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12257 *) ac_try_echo=$ac_try;;
12258esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012259eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12260$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012261 (eval "$ac_compile") 2>conftest.er1
12262 ac_status=$?
12263 grep -v '^ *+' conftest.er1 >conftest.err
12264 rm -f conftest.er1
12265 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012266 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012267 (exit $ac_status); } && {
12268 test -z "$ac_c_werror_flag" ||
12269 test ! -s conftest.err
12270 } && test -s conftest.$ac_objext; then
12271 ac_hi=$ac_mid
12272else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012273 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012274sed 's/^/| /' conftest.$ac_ext >&5
12275
12276 ac_lo=`expr '(' $ac_mid ')' + 1`
12277fi
12278
12279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12280done
12281case $ac_lo in
12282?*) ac_cv_sizeof_long_double=$ac_lo;;
12283'') if test "$ac_cv_type_long_double" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012284 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12285$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12286{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012287See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012288$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012289See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012290 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012291 else
12292 ac_cv_sizeof_long_double=0
12293 fi ;;
12294esac
12295else
12296 cat >conftest.$ac_ext <<_ACEOF
12297/* confdefs.h. */
12298_ACEOF
12299cat confdefs.h >>conftest.$ac_ext
12300cat >>conftest.$ac_ext <<_ACEOF
12301/* end confdefs.h. */
12302$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012303static long int longval () { return (long int) (sizeof (long double)); }
12304static unsigned long int ulongval () { return (long int) (sizeof (long double)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012305#include <stdio.h>
12306#include <stdlib.h>
12307int
12308main ()
12309{
12310
12311 FILE *f = fopen ("conftest.val", "w");
12312 if (! f)
12313 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012314 if (((long int) (sizeof (long double))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012315 {
12316 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012317 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012318 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012319 fprintf (f, "%ld", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012320 }
12321 else
12322 {
12323 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012324 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012325 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012326 fprintf (f, "%lu", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012327 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012328 /* Do not output a trailing newline, as this causes \r\n confusion
12329 on some platforms. */
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012330 return ferror (f) || fclose (f) != 0;
12331
12332 ;
12333 return 0;
12334}
12335_ACEOF
12336rm -f conftest$ac_exeext
12337if { (ac_try="$ac_link"
12338case "(($ac_try" in
12339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12340 *) ac_try_echo=$ac_try;;
12341esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012342eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12343$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012344 (eval "$ac_link") 2>&5
12345 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012346 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012347 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12348 { (case "(($ac_try" in
12349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12350 *) ac_try_echo=$ac_try;;
12351esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012352eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12353$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012354 (eval "$ac_try") 2>&5
12355 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012356 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012357 (exit $ac_status); }; }; then
12358 ac_cv_sizeof_long_double=`cat conftest.val`
12359else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012360 $as_echo "$as_me: program exited with status $ac_status" >&5
12361$as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012362sed 's/^/| /' conftest.$ac_ext >&5
12363
12364( exit $ac_status )
12365if test "$ac_cv_type_long_double" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012366 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12367$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12368{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012369See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012370$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012371See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012372 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012373 else
12374 ac_cv_sizeof_long_double=0
12375 fi
12376fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012377rm -rf conftest.dSYM
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012378rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12379fi
12380rm -f conftest.val
12381fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012382{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12383$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012384
12385
12386
12387cat >>confdefs.h <<_ACEOF
12388#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12389_ACEOF
12390
12391
12392fi
12393
12394
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012395{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5
12396$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012397have_c99_bool=no
12398cat >conftest.$ac_ext <<_ACEOF
12399/* confdefs.h. */
12400_ACEOF
12401cat confdefs.h >>conftest.$ac_ext
12402cat >>conftest.$ac_ext <<_ACEOF
12403/* end confdefs.h. */
12404
12405int
12406main ()
12407{
12408_Bool x; x = (_Bool)0;
12409 ;
12410 return 0;
12411}
12412_ACEOF
12413rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012414if { (ac_try="$ac_compile"
12415case "(($ac_try" in
12416 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12417 *) ac_try_echo=$ac_try;;
12418esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012419eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12420$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012421 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012422 ac_status=$?
12423 grep -v '^ *+' conftest.er1 >conftest.err
12424 rm -f conftest.er1
12425 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012426 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012427 (exit $ac_status); } && {
12428 test -z "$ac_c_werror_flag" ||
12429 test ! -s conftest.err
12430 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012431
12432
12433cat >>confdefs.h <<\_ACEOF
12434#define HAVE_C99_BOOL 1
12435_ACEOF
12436
12437 have_c99_bool=yes
12438
12439else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012440 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012441sed 's/^/| /' conftest.$ac_ext >&5
12442
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012443
Thomas Woutersb2137042007-02-01 18:02:27 +000012444fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012445
12446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012447{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12448$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012449if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012450# The cast to long int works around a bug in the HP C Compiler
12451# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12452# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12453# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012454{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5
12455$as_echo_n "checking size of _Bool... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012456if test "${ac_cv_sizeof__Bool+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012457 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012458else
12459 if test "$cross_compiling" = yes; then
12460 # Depending upon the size, compute the lo and hi bounds.
12461cat >conftest.$ac_ext <<_ACEOF
12462/* confdefs.h. */
12463_ACEOF
12464cat confdefs.h >>conftest.$ac_ext
12465cat >>conftest.$ac_ext <<_ACEOF
12466/* end confdefs.h. */
12467$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012468int
12469main ()
12470{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012471static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012472test_array [0] = 0
12473
12474 ;
12475 return 0;
12476}
12477_ACEOF
12478rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012479if { (ac_try="$ac_compile"
12480case "(($ac_try" in
12481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12482 *) ac_try_echo=$ac_try;;
12483esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012484eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12485$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012486 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012487 ac_status=$?
12488 grep -v '^ *+' conftest.er1 >conftest.err
12489 rm -f conftest.er1
12490 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012491 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012492 (exit $ac_status); } && {
12493 test -z "$ac_c_werror_flag" ||
12494 test ! -s conftest.err
12495 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012496 ac_lo=0 ac_mid=0
12497 while :; do
12498 cat >conftest.$ac_ext <<_ACEOF
12499/* confdefs.h. */
12500_ACEOF
12501cat confdefs.h >>conftest.$ac_ext
12502cat >>conftest.$ac_ext <<_ACEOF
12503/* end confdefs.h. */
12504$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012505int
12506main ()
12507{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012508static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012509test_array [0] = 0
12510
12511 ;
12512 return 0;
12513}
12514_ACEOF
12515rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516if { (ac_try="$ac_compile"
12517case "(($ac_try" in
12518 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12519 *) ac_try_echo=$ac_try;;
12520esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012521eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12522$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012523 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012524 ac_status=$?
12525 grep -v '^ *+' conftest.er1 >conftest.err
12526 rm -f conftest.er1
12527 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012528 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012529 (exit $ac_status); } && {
12530 test -z "$ac_c_werror_flag" ||
12531 test ! -s conftest.err
12532 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012533 ac_hi=$ac_mid; break
12534else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012535 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012536sed 's/^/| /' conftest.$ac_ext >&5
12537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012538 ac_lo=`expr $ac_mid + 1`
12539 if test $ac_lo -le $ac_mid; then
12540 ac_lo= ac_hi=
12541 break
12542 fi
12543 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012545
12546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012547 done
12548else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012549 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012550sed 's/^/| /' conftest.$ac_ext >&5
12551
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012552 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012553/* confdefs.h. */
12554_ACEOF
12555cat confdefs.h >>conftest.$ac_ext
12556cat >>conftest.$ac_ext <<_ACEOF
12557/* end confdefs.h. */
12558$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012559int
12560main ()
12561{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012562static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012563test_array [0] = 0
12564
12565 ;
12566 return 0;
12567}
12568_ACEOF
12569rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012570if { (ac_try="$ac_compile"
12571case "(($ac_try" in
12572 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12573 *) ac_try_echo=$ac_try;;
12574esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012575eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12576$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012577 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012578 ac_status=$?
12579 grep -v '^ *+' conftest.er1 >conftest.err
12580 rm -f conftest.er1
12581 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012582 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012583 (exit $ac_status); } && {
12584 test -z "$ac_c_werror_flag" ||
12585 test ! -s conftest.err
12586 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012587 ac_hi=-1 ac_mid=-1
12588 while :; do
12589 cat >conftest.$ac_ext <<_ACEOF
12590/* confdefs.h. */
12591_ACEOF
12592cat confdefs.h >>conftest.$ac_ext
12593cat >>conftest.$ac_ext <<_ACEOF
12594/* end confdefs.h. */
12595$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012596int
12597main ()
12598{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012599static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012600test_array [0] = 0
12601
12602 ;
12603 return 0;
12604}
12605_ACEOF
12606rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012607if { (ac_try="$ac_compile"
12608case "(($ac_try" in
12609 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12610 *) ac_try_echo=$ac_try;;
12611esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012612eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12613$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012614 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012615 ac_status=$?
12616 grep -v '^ *+' conftest.er1 >conftest.err
12617 rm -f conftest.er1
12618 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012619 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012620 (exit $ac_status); } && {
12621 test -z "$ac_c_werror_flag" ||
12622 test ! -s conftest.err
12623 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012624 ac_lo=$ac_mid; break
12625else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012626 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012627sed 's/^/| /' conftest.$ac_ext >&5
12628
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012629 ac_hi=`expr '(' $ac_mid ')' - 1`
12630 if test $ac_mid -le $ac_hi; then
12631 ac_lo= ac_hi=
12632 break
12633 fi
12634 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012635fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012636
12637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012638 done
12639else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012640 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012641sed 's/^/| /' conftest.$ac_ext >&5
12642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012643 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012645
12646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012647fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012648
12649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012650# Binary search between lo and hi bounds.
12651while test "x$ac_lo" != "x$ac_hi"; do
12652 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12653 cat >conftest.$ac_ext <<_ACEOF
12654/* confdefs.h. */
12655_ACEOF
12656cat confdefs.h >>conftest.$ac_ext
12657cat >>conftest.$ac_ext <<_ACEOF
12658/* end confdefs.h. */
12659$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012660int
12661main ()
12662{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012663static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012664test_array [0] = 0
12665
12666 ;
12667 return 0;
12668}
12669_ACEOF
12670rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012671if { (ac_try="$ac_compile"
12672case "(($ac_try" in
12673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12674 *) ac_try_echo=$ac_try;;
12675esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012676eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12677$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012678 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012679 ac_status=$?
12680 grep -v '^ *+' conftest.er1 >conftest.err
12681 rm -f conftest.er1
12682 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012683 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012684 (exit $ac_status); } && {
12685 test -z "$ac_c_werror_flag" ||
12686 test ! -s conftest.err
12687 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012688 ac_hi=$ac_mid
12689else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012690 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012691sed 's/^/| /' conftest.$ac_ext >&5
12692
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012693 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012694fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012695
12696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012697done
12698case $ac_lo in
12699?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012700'') if test "$ac_cv_type__Bool" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012701 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12702$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12703{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012704See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012705$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012706See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012707 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012708 else
12709 ac_cv_sizeof__Bool=0
12710 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012711esac
12712else
12713 cat >conftest.$ac_ext <<_ACEOF
12714/* confdefs.h. */
12715_ACEOF
12716cat confdefs.h >>conftest.$ac_ext
12717cat >>conftest.$ac_ext <<_ACEOF
12718/* end confdefs.h. */
12719$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012720static long int longval () { return (long int) (sizeof (_Bool)); }
12721static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012722#include <stdio.h>
12723#include <stdlib.h>
12724int
12725main ()
12726{
12727
12728 FILE *f = fopen ("conftest.val", "w");
12729 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012730 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012731 if (((long int) (sizeof (_Bool))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012732 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012733 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012734 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012735 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012736 fprintf (f, "%ld", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012737 }
12738 else
12739 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012740 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012741 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012742 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012743 fprintf (f, "%lu", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012744 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012745 /* Do not output a trailing newline, as this causes \r\n confusion
12746 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012747 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012748
12749 ;
12750 return 0;
12751}
12752_ACEOF
12753rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012754if { (ac_try="$ac_link"
12755case "(($ac_try" in
12756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12757 *) ac_try_echo=$ac_try;;
12758esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012759eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12760$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012761 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012762 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012763 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012764 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012765 { (case "(($ac_try" in
12766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12767 *) ac_try_echo=$ac_try;;
12768esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012769eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12770$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012771 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012772 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012773 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012774 (exit $ac_status); }; }; then
12775 ac_cv_sizeof__Bool=`cat conftest.val`
12776else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012777 $as_echo "$as_me: program exited with status $ac_status" >&5
12778$as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012779sed 's/^/| /' conftest.$ac_ext >&5
12780
12781( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012782if test "$ac_cv_type__Bool" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012783 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12784$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12785{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012786See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012787$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012788See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012789 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012790 else
12791 ac_cv_sizeof__Bool=0
12792 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012793fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012794rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012795rm -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 +000012796fi
12797rm -f conftest.val
12798fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012799{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12800$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012801
12802
12803
Thomas Woutersb2137042007-02-01 18:02:27 +000012804cat >>confdefs.h <<_ACEOF
12805#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12806_ACEOF
12807
12808
12809fi
12810
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012811{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
12812$as_echo_n "checking for uintptr_t... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012813if test "${ac_cv_type_uintptr_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012814 $as_echo_n "(cached) " >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012815else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012816 ac_cv_type_uintptr_t=no
12817cat >conftest.$ac_ext <<_ACEOF
12818/* confdefs.h. */
12819_ACEOF
12820cat confdefs.h >>conftest.$ac_ext
12821cat >>conftest.$ac_ext <<_ACEOF
12822/* end confdefs.h. */
12823#ifdef HAVE_STDINT_H
12824 #include <stdint.h>
12825 #endif
12826
12827int
12828main ()
12829{
12830if (sizeof (uintptr_t))
12831 return 0;
12832 ;
12833 return 0;
12834}
12835_ACEOF
12836rm -f conftest.$ac_objext
12837if { (ac_try="$ac_compile"
12838case "(($ac_try" in
12839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12840 *) ac_try_echo=$ac_try;;
12841esac
12842eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12843$as_echo "$ac_try_echo") >&5
12844 (eval "$ac_compile") 2>conftest.er1
12845 ac_status=$?
12846 grep -v '^ *+' conftest.er1 >conftest.err
12847 rm -f conftest.er1
12848 cat conftest.err >&5
12849 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12850 (exit $ac_status); } && {
12851 test -z "$ac_c_werror_flag" ||
12852 test ! -s conftest.err
12853 } && test -s conftest.$ac_objext; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012854 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012855/* confdefs.h. */
12856_ACEOF
12857cat confdefs.h >>conftest.$ac_ext
12858cat >>conftest.$ac_ext <<_ACEOF
12859/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012860#ifdef HAVE_STDINT_H
12861 #include <stdint.h>
12862 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012863
Martin v. Löwis11437992002-04-12 09:54:03 +000012864int
12865main ()
12866{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012867if (sizeof ((uintptr_t)))
12868 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012869 ;
12870 return 0;
12871}
12872_ACEOF
12873rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012874if { (ac_try="$ac_compile"
12875case "(($ac_try" in
12876 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12877 *) ac_try_echo=$ac_try;;
12878esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012879eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12880$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012881 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012882 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012883 grep -v '^ *+' conftest.er1 >conftest.err
12884 rm -f conftest.er1
12885 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012886 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012887 (exit $ac_status); } && {
12888 test -z "$ac_c_werror_flag" ||
12889 test ! -s conftest.err
12890 } && test -s conftest.$ac_objext; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012891 :
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012892else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012893 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012894sed 's/^/| /' conftest.$ac_ext >&5
12895
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012896 ac_cv_type_uintptr_t=yes
12897fi
12898
12899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12900else
12901 $as_echo "$as_me: failed program was:" >&5
12902sed 's/^/| /' conftest.$ac_ext >&5
12903
12904
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012905fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012906
12907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012908fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012909{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12910$as_echo "$ac_cv_type_uintptr_t" >&6; }
12911if test "x$ac_cv_type_uintptr_t" = x""yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012912
12913cat >>confdefs.h <<_ACEOF
12914#define HAVE_UINTPTR_T 1
12915_ACEOF
12916
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012917# The cast to long int works around a bug in the HP C Compiler
12918# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12919# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12920# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012921{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12922$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012923if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012924 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012925else
Martin v. Löwis11437992002-04-12 09:54:03 +000012926 if test "$cross_compiling" = yes; then
12927 # Depending upon the size, compute the lo and hi bounds.
12928cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012929/* confdefs.h. */
12930_ACEOF
12931cat confdefs.h >>conftest.$ac_ext
12932cat >>conftest.$ac_ext <<_ACEOF
12933/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012934$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012935int
12936main ()
12937{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012938static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012939test_array [0] = 0
12940
12941 ;
12942 return 0;
12943}
12944_ACEOF
12945rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012946if { (ac_try="$ac_compile"
12947case "(($ac_try" in
12948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12949 *) ac_try_echo=$ac_try;;
12950esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012951eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12952$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012953 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012954 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012955 grep -v '^ *+' conftest.er1 >conftest.err
12956 rm -f conftest.er1
12957 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012958 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012959 (exit $ac_status); } && {
12960 test -z "$ac_c_werror_flag" ||
12961 test ! -s conftest.err
12962 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012963 ac_lo=0 ac_mid=0
12964 while :; do
12965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012966/* confdefs.h. */
12967_ACEOF
12968cat confdefs.h >>conftest.$ac_ext
12969cat >>conftest.$ac_ext <<_ACEOF
12970/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012971$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012972int
12973main ()
12974{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012975static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012976test_array [0] = 0
12977
12978 ;
12979 return 0;
12980}
12981_ACEOF
12982rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983if { (ac_try="$ac_compile"
12984case "(($ac_try" in
12985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12986 *) ac_try_echo=$ac_try;;
12987esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012988eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12989$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012990 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012991 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012992 grep -v '^ *+' conftest.er1 >conftest.err
12993 rm -f conftest.er1
12994 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000012995 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012996 (exit $ac_status); } && {
12997 test -z "$ac_c_werror_flag" ||
12998 test ! -s conftest.err
12999 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013000 ac_hi=$ac_mid; break
13001else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013002 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013003sed 's/^/| /' conftest.$ac_ext >&5
13004
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013005 ac_lo=`expr $ac_mid + 1`
13006 if test $ac_lo -le $ac_mid; then
13007 ac_lo= ac_hi=
13008 break
13009 fi
13010 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000013011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013012
13013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013014 done
13015else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013016 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013017sed 's/^/| /' conftest.$ac_ext >&5
13018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013019 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013020/* confdefs.h. */
13021_ACEOF
13022cat confdefs.h >>conftest.$ac_ext
13023cat >>conftest.$ac_ext <<_ACEOF
13024/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013025$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013026int
13027main ()
13028{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013029static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000013030test_array [0] = 0
13031
13032 ;
13033 return 0;
13034}
13035_ACEOF
13036rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013037if { (ac_try="$ac_compile"
13038case "(($ac_try" in
13039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13040 *) ac_try_echo=$ac_try;;
13041esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013042eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13043$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013046 grep -v '^ *+' conftest.er1 >conftest.err
13047 rm -f conftest.er1
13048 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013049 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013050 (exit $ac_status); } && {
13051 test -z "$ac_c_werror_flag" ||
13052 test ! -s conftest.err
13053 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013054 ac_hi=-1 ac_mid=-1
13055 while :; do
13056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013057/* confdefs.h. */
13058_ACEOF
13059cat confdefs.h >>conftest.$ac_ext
13060cat >>conftest.$ac_ext <<_ACEOF
13061/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013062$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013063int
13064main ()
13065{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013066static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000013067test_array [0] = 0
13068
13069 ;
13070 return 0;
13071}
13072_ACEOF
13073rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013074if { (ac_try="$ac_compile"
13075case "(($ac_try" in
13076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13077 *) ac_try_echo=$ac_try;;
13078esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013079eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13080$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013081 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013083 grep -v '^ *+' conftest.er1 >conftest.err
13084 rm -f conftest.er1
13085 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013086 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013087 (exit $ac_status); } && {
13088 test -z "$ac_c_werror_flag" ||
13089 test ! -s conftest.err
13090 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013091 ac_lo=$ac_mid; break
13092else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013093 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013094sed 's/^/| /' conftest.$ac_ext >&5
13095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013096 ac_hi=`expr '(' $ac_mid ')' - 1`
13097 if test $ac_mid -le $ac_hi; then
13098 ac_lo= ac_hi=
13099 break
13100 fi
13101 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000013102fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013103
13104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013105 done
13106else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013107 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013108sed 's/^/| /' conftest.$ac_ext >&5
13109
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013110 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000013111fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013112
13113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013114fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013115
13116rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013117# Binary search between lo and hi bounds.
13118while test "x$ac_lo" != "x$ac_hi"; do
13119 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013121/* confdefs.h. */
13122_ACEOF
13123cat confdefs.h >>conftest.$ac_ext
13124cat >>conftest.$ac_ext <<_ACEOF
13125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013126$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013127int
13128main ()
13129{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013130static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000013131test_array [0] = 0
13132
13133 ;
13134 return 0;
13135}
13136_ACEOF
13137rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013138if { (ac_try="$ac_compile"
13139case "(($ac_try" in
13140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13141 *) ac_try_echo=$ac_try;;
13142esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013143eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13144$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013147 grep -v '^ *+' conftest.er1 >conftest.err
13148 rm -f conftest.er1
13149 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013150 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013151 (exit $ac_status); } && {
13152 test -z "$ac_c_werror_flag" ||
13153 test ! -s conftest.err
13154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013155 ac_hi=$ac_mid
13156else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013157 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013158sed 's/^/| /' conftest.$ac_ext >&5
13159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013160 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000013161fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013162
13163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013164done
13165case $ac_lo in
13166?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013167'') if test "$ac_cv_type_uintptr_t" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013168 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13169$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13170{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013171See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013172$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013173See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013174 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013175 else
13176 ac_cv_sizeof_uintptr_t=0
13177 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013178esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013179else
Martin v. Löwis11437992002-04-12 09:54:03 +000013180 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013181/* confdefs.h. */
13182_ACEOF
13183cat confdefs.h >>conftest.$ac_ext
13184cat >>conftest.$ac_ext <<_ACEOF
13185/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013186$ac_includes_default
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013187static long int longval () { return (long int) (sizeof (uintptr_t)); }
13188static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013189#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013190#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013191int
13192main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013193{
Martin v. Löwis11437992002-04-12 09:54:03 +000013194
13195 FILE *f = fopen ("conftest.val", "w");
13196 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013197 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013198 if (((long int) (sizeof (uintptr_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013199 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013200 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013201 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013202 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013203 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013204 }
13205 else
13206 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013207 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013208 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013209 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013210 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013211 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013212 /* Do not output a trailing newline, as this causes \r\n confusion
13213 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013214 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013215
13216 ;
13217 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013218}
Martin v. Löwis11437992002-04-12 09:54:03 +000013219_ACEOF
13220rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013221if { (ac_try="$ac_link"
13222case "(($ac_try" in
13223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13224 *) ac_try_echo=$ac_try;;
13225esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013226eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13227$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013228 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013229 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013230 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013231 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013232 { (case "(($ac_try" in
13233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13234 *) ac_try_echo=$ac_try;;
13235esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013236eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13237$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013238 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013239 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013240 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013241 (exit $ac_status); }; }; then
13242 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013243else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013244 $as_echo "$as_me: program exited with status $ac_status" >&5
13245$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013246sed 's/^/| /' conftest.$ac_ext >&5
13247
Martin v. Löwis11437992002-04-12 09:54:03 +000013248( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013249if test "$ac_cv_type_uintptr_t" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013250 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13251$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13252{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013253See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013254$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013255See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013256 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013257 else
13258 ac_cv_sizeof_uintptr_t=0
13259 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013260fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013261rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013262rm -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 +000013263fi
13264rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013265fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013266{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13267$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013268
13269
13270
Martin v. Löwis11437992002-04-12 09:54:03 +000013271cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013272#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013273_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013274
Michael W. Hudson54241132001-12-07 15:38:26 +000013275
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013276fi
13277
Thomas Wouters89f507f2006-12-13 04:49:30 +000013278
13279
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013280# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013281{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5
13282$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013283if test "${ac_cv_sizeof_off_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013284 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013285else
13286 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013287 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013288else
Martin v. Löwis11437992002-04-12 09:54:03 +000013289 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013290/* confdefs.h. */
13291_ACEOF
13292cat confdefs.h >>conftest.$ac_ext
13293cat >>conftest.$ac_ext <<_ACEOF
13294/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013295#include <stdio.h>
13296#include <sys/types.h>
13297main()
13298{
13299 FILE *f=fopen("conftestval", "w");
13300 if (!f) exit(1);
13301 fprintf(f, "%d\n", sizeof(off_t));
13302 exit(0);
13303}
Martin v. Löwis11437992002-04-12 09:54:03 +000013304_ACEOF
13305rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013306if { (ac_try="$ac_link"
13307case "(($ac_try" in
13308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13309 *) ac_try_echo=$ac_try;;
13310esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013311eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13312$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013313 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013314 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013315 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013316 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013317 { (case "(($ac_try" in
13318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13319 *) ac_try_echo=$ac_try;;
13320esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013321eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13322$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013323 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013324 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013325 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013326 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013327 ac_cv_sizeof_off_t=`cat conftestval`
13328else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013329 $as_echo "$as_me: program exited with status $ac_status" >&5
13330$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013331sed 's/^/| /' conftest.$ac_ext >&5
13332
Martin v. Löwis11437992002-04-12 09:54:03 +000013333( exit $ac_status )
13334ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013335fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013336rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013337rm -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 +000013338fi
13339
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013340
13341
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013342fi
13343
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013344{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13345$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013346
13347cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013348#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013349_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013350
Michael W. Hudson54241132001-12-07 15:38:26 +000013351
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013352{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13353$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013354if test "$have_long_long" = yes
13355then
13356if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013357 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013358
Martin v. Löwis11437992002-04-12 09:54:03 +000013359cat >>confdefs.h <<\_ACEOF
13360#define HAVE_LARGEFILE_SUPPORT 1
13361_ACEOF
13362
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013363 { $as_echo "$as_me:$LINENO: result: yes" >&5
13364$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013365else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013366 { $as_echo "$as_me:$LINENO: result: no" >&5
13367$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013368fi
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013369else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013370 { $as_echo "$as_me:$LINENO: result: no" >&5
13371$as_echo "no" >&6; }
Mark Dickinsonb87f0d02009-12-31 21:25:02 +000013372fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013373
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013374# AC_CHECK_SIZEOF() doesn't include <time.h>.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013375{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5
13376$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013377if test "${ac_cv_sizeof_time_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013378 $as_echo_n "(cached) " >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013379else
13380 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013381 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013382else
Martin v. Löwis11437992002-04-12 09:54:03 +000013383 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013384/* confdefs.h. */
13385_ACEOF
13386cat confdefs.h >>conftest.$ac_ext
13387cat >>conftest.$ac_ext <<_ACEOF
13388/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013389#include <stdio.h>
13390#include <time.h>
13391main()
13392{
13393 FILE *f=fopen("conftestval", "w");
13394 if (!f) exit(1);
13395 fprintf(f, "%d\n", sizeof(time_t));
13396 exit(0);
13397}
Martin v. Löwis11437992002-04-12 09:54:03 +000013398_ACEOF
13399rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013400if { (ac_try="$ac_link"
13401case "(($ac_try" in
13402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13403 *) ac_try_echo=$ac_try;;
13404esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013405eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13406$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013407 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013408 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013409 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013410 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013411 { (case "(($ac_try" in
13412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13413 *) ac_try_echo=$ac_try;;
13414esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013415eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13416$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013417 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013418 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013419 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013420 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013421 ac_cv_sizeof_time_t=`cat conftestval`
13422else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013423 $as_echo "$as_me: program exited with status $ac_status" >&5
13424$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013425sed 's/^/| /' conftest.$ac_ext >&5
13426
Martin v. Löwis11437992002-04-12 09:54:03 +000013427( exit $ac_status )
13428ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013429fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013430rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013431rm -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 +000013432fi
13433
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013434
13435
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013436fi
13437
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013438{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13439$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013440
13441cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013442#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013443_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013444
Michael W. Hudson54241132001-12-07 15:38:26 +000013445
13446
Trent Mick635f6fb2000-08-23 21:33:05 +000013447# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013448ac_save_cc="$CC"
13449if test "$ac_cv_kpthread" = "yes"
13450then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013451elif test "$ac_cv_kthread" = "yes"
13452then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013453elif test "$ac_cv_pthread" = "yes"
13454then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013455fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013456{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5
13457$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013458have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013459cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013460/* confdefs.h. */
13461_ACEOF
13462cat confdefs.h >>conftest.$ac_ext
13463cat >>conftest.$ac_ext <<_ACEOF
13464/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013465#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013466int
13467main ()
13468{
Guido van Rossum12580492000-09-24 16:47:19 +000013469pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013470 ;
13471 return 0;
13472}
13473_ACEOF
13474rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013475if { (ac_try="$ac_compile"
13476case "(($ac_try" in
13477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13478 *) ac_try_echo=$ac_try;;
13479esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013480eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13481$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013482 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013484 grep -v '^ *+' conftest.er1 >conftest.err
13485 rm -f conftest.er1
13486 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013487 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013488 (exit $ac_status); } && {
13489 test -z "$ac_c_werror_flag" ||
13490 test ! -s conftest.err
13491 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013492 have_pthread_t=yes
13493else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013494 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013495sed 's/^/| /' conftest.$ac_ext >&5
13496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013497
Trent Mick635f6fb2000-08-23 21:33:05 +000013498fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013499
13500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013501{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13502$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013503if test "$have_pthread_t" = yes ; then
13504 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013505 { $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5
13506$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013507 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013508 $as_echo_n "(cached) " >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013509else
13510 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013511 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013512else
Martin v. Löwis11437992002-04-12 09:54:03 +000013513 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013514/* confdefs.h. */
13515_ACEOF
13516cat confdefs.h >>conftest.$ac_ext
13517cat >>conftest.$ac_ext <<_ACEOF
13518/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013519#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013520#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013521 main()
13522 {
13523 FILE *f=fopen("conftestval", "w");
13524 if (!f) exit(1);
13525 fprintf(f, "%d\n", sizeof(pthread_t));
13526 exit(0);
13527 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013528_ACEOF
13529rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013530if { (ac_try="$ac_link"
13531case "(($ac_try" in
13532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13533 *) ac_try_echo=$ac_try;;
13534esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013535eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13536$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013537 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013538 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013539 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013541 { (case "(($ac_try" in
13542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13543 *) ac_try_echo=$ac_try;;
13544esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013545eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13546$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013547 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013548 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013549 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013550 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013551 ac_cv_sizeof_pthread_t=`cat conftestval`
13552else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013553 $as_echo "$as_me: program exited with status $ac_status" >&5
13554$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013555sed 's/^/| /' conftest.$ac_ext >&5
13556
Martin v. Löwis11437992002-04-12 09:54:03 +000013557( exit $ac_status )
13558ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013559fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013560rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013561rm -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 +000013562fi
13563
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013564
13565
Trent Mick635f6fb2000-08-23 21:33:05 +000013566fi
13567
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013568 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13569$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013570
13571cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013572#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013573_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013574
13575fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013576CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013577
Michael W. Hudson54241132001-12-07 15:38:26 +000013578
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013579
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013580
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013581case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013582 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013583 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13584 ;;
13585 Darwin/*)
13586 OTHER_LIBTOOL_OPT=""
13587 ;;
13588esac
13589
13590
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013591ARCH_RUN_32BIT=""
13592
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013593case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000013594 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000013595 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13596 if test "${enable_universalsdk}"; then
13597 :
13598 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013599 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013600 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013601 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013602 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013603 Darwin/*)
Ronald Oussoren652f4de2010-02-07 11:54:03 +000013604 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013605 if test ${gcc_version} '<' 4.0
13606 then
13607 LIBTOOL_CRUFT="-lcc_dynamic"
13608 else
13609 LIBTOOL_CRUFT=""
13610 fi
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013611 if test "$cross_compiling" = yes; then
Ronald Oussoren856624d2009-09-08 07:13:53 +000013612 ac_osx_32bit=yes
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013613else
13614 cat >conftest.$ac_ext <<_ACEOF
13615/* confdefs.h. */
13616_ACEOF
13617cat confdefs.h >>conftest.$ac_ext
13618cat >>conftest.$ac_ext <<_ACEOF
13619/* end confdefs.h. */
Ronald Oussoren856624d2009-09-08 07:13:53 +000013620
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013621 #include <unistd.h>
13622 int main(int argc, char*argv[])
13623 {
13624 if (sizeof(long) == 4) {
13625 return 0;
13626 } else {
13627 return 1;
13628 }
Ronald Oussoren856624d2009-09-08 07:13:53 +000013629 }
13630
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013631_ACEOF
13632rm -f conftest$ac_exeext
13633if { (ac_try="$ac_link"
13634case "(($ac_try" in
13635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13636 *) ac_try_echo=$ac_try;;
13637esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013638eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13639$as_echo "$ac_try_echo") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013640 (eval "$ac_link") 2>&5
13641 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013642 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013643 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13644 { (case "(($ac_try" in
13645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13646 *) ac_try_echo=$ac_try;;
13647esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013648eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13649$as_echo "$ac_try_echo") >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013650 (eval "$ac_try") 2>&5
13651 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013652 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013653 (exit $ac_status); }; }; then
13654 ac_osx_32bit=yes
13655else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013656 $as_echo "$as_me: program exited with status $ac_status" >&5
13657$as_echo "$as_me: failed program was:" >&5
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013658sed 's/^/| /' conftest.$ac_ext >&5
13659
13660( exit $ac_status )
13661ac_osx_32bit=no
13662fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013663rm -rf conftest.dSYM
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013664rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13665fi
13666
13667
13668
13669 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussoren175a8842010-02-11 13:40:06 +000013670 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013671 i386)
13672 MACOSX_DEFAULT_ARCH="i386"
13673 ;;
13674 ppc)
13675 MACOSX_DEFAULT_ARCH="ppc"
13676 ;;
13677 *)
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013678 { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13679$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013680 { (exit 1); exit 1; }; }
13681 ;;
13682 esac
13683 else
Ronald Oussoren175a8842010-02-11 13:40:06 +000013684 case `/usr/bin/arch` in
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013685 i386)
13686 MACOSX_DEFAULT_ARCH="x86_64"
13687 ;;
13688 ppc)
13689 MACOSX_DEFAULT_ARCH="ppc64"
13690 ;;
13691 *)
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013692 { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13693$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussorend45ff2c2009-09-06 11:11:04 +000013694 { (exit 1); exit 1; }; }
13695 ;;
13696 esac
13697
13698 #ARCH_RUN_32BIT="true"
13699 fi
13700
13701 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013702 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013703 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013704esac
13705
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013706{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5
13707$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013708if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013709then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013710 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013711 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013712 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013713
Martin v. Löwis11437992002-04-12 09:54:03 +000013714cat >>confdefs.h <<\_ACEOF
13715#define WITH_NEXT_FRAMEWORK 1
13716_ACEOF
13717
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013718 { $as_echo "$as_me:$LINENO: result: yes" >&5
13719$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000013720 if test $enable_shared = "yes"
13721 then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013722 { { $as_echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
13723$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 +000013724 { (exit 1); exit 1; }; }
13725 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013726else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013727 { $as_echo "$as_me:$LINENO: result: no" >&5
13728$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013729fi
13730
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013731{ $as_echo "$as_me:$LINENO: checking for dyld" >&5
13732$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013733case $ac_sys_system/$ac_sys_release in
13734 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013735
Martin v. Löwis11437992002-04-12 09:54:03 +000013736cat >>confdefs.h <<\_ACEOF
13737#define WITH_DYLD 1
13738_ACEOF
13739
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013740 { $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5
13741$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013742 ;;
13743 *)
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013744 { $as_echo "$as_me:$LINENO: result: no" >&5
13745$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013746 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013747esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013748
Guido van Rossum0a516c91994-09-12 10:58:40 +000013749# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013750
Michael W. Hudson54241132001-12-07 15:38:26 +000013751
13752
13753
13754
Guido van Rossum0a516c91994-09-12 10:58:40 +000013755# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013756# -- usually .so, .sl on HP-UX, .dll on Cygwin
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013757{ $as_echo "$as_me:$LINENO: checking SO" >&5
13758$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013759if test -z "$SO"
13760then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013761 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000013762 hp*|HP*)
13763 case `uname -m` in
13764 ia64) SO=.so;;
13765 *) SO=.sl;;
13766 esac
13767 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013768 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013769 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013770 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013771else
13772 # this might also be a termcap variable, see #610332
13773 echo
13774 echo '====================================================================='
13775 echo '+ +'
13776 echo '+ WARNING: You have set SO in your environment. +'
13777 echo '+ Do you really mean to change the extension for shared libraries? +'
13778 echo '+ Continuing in 10 seconds to let you to ponder. +'
13779 echo '+ +'
13780 echo '====================================================================='
13781 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013782fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013783{ $as_echo "$as_me:$LINENO: result: $SO" >&5
13784$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000013785
Georg Brandlb1441c72009-01-03 22:33:39 +000013786
Thomas Wouters477c8d52006-05-27 19:21:47 +000013787cat >>confdefs.h <<_ACEOF
13788#define SHLIB_EXT "$SO"
13789_ACEOF
13790
Guido van Rossum0a516c91994-09-12 10:58:40 +000013791# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013792# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013793# (Shared libraries in this instance are shared modules to be loaded into
13794# Python, as opposed to building Python itself as a shared library.)
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013795{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5
13796$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013797if test -z "$LDSHARED"
13798then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013799 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013800 AIX*)
13801 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013802 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013803 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013804 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013805 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013806 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000013807 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013808 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013809 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000013810 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000013811 hp*|HP*)
13812 if test "$GCC" = "yes"
13813 then LDSHARED='$(CC) -shared'
13814 else LDSHARED='ld -b';
13815 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013816 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013817 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013818 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13819 if test "$enable_framework" ; then
13820 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013821 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13822 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013823 else
13824 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013825 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013826 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013827 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013828 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13829 if test "$enable_framework" ; then
13830 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013831 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13832 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013833 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013834 # No framework, use the Python app as bundle-loader
13835 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013836 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013837 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013838 Darwin/*)
13839 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13840 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000013841
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013842 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013843 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000013844 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000013845 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000013846 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013847 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13848 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013849 else
13850 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13851 if test "$enable_framework" ; then
13852 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013853 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13854 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013855 else
13856 # No framework, use the Python app as bundle-loader
13857 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13858 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13859 fi
13860 fi
13861 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013862 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013863 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013864 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013865 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013866 then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013867 LDSHARED='$(CC) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000013868 else
13869 LDSHARED="ld -Bshareable ${LDFLAGS}"
13870 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000013871 OpenBSD*)
13872 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13873 then
13874 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13875 else
13876 case `uname -r` in
13877 [01].* | 2.[0-7] | 2.[0-7].*)
13878 LDSHARED="ld -Bshareable ${LDFLAGS}"
13879 ;;
13880 *)
13881 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13882 ;;
13883 esac
13884 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013885 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013886 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013887 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013888 then LDSHARED='$(CC) -shared'
13889 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013890 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013891 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013892 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013893 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013894 *) LDSHARED="ld";;
13895 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013896fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013897{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5
13898$as_echo "$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013899BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013900# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013901# library (module) -- this is only needed for a few systems
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013902{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5
13903$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013904if test -z "$CCSHARED"
13905then
Guido van Rossum07397971997-04-29 21:49:50 +000013906 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013907 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000013908 then CCSHARED="-fPIC";
13909 elif test `uname -p` = sparc;
13910 then CCSHARED="-xcode=pic32";
13911 else CCSHARED="-Kpic";
13912 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013913 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013914 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013915 else CCSHARED="+z";
13916 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013917 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013918 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013919 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013920 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013921 if test "$GCC" = "yes"
13922 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013923 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013924 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013925 SCO_SV*)
13926 if test "$GCC" = "yes"
13927 then CCSHARED="-fPIC"
13928 else CCSHARED="-Kpic -belf"
13929 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013930 IRIX*/6*) case $CC in
13931 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013932 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013933 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013934 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013935 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013936fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013937{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5
13938$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013939# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013940# the python executable -- this is only needed for a few systems
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013941{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13942$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013943if test -z "$LINKFORSHARED"
13944then
Guido van Rossum07397971997-04-29 21:49:50 +000013945 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013946 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013947 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013948 LINKFORSHARED="-Wl,-E -Wl,+s";;
13949# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013950 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013951 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013952 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013953 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000013954 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000013955 if test "$enable_framework"
13956 then
Jack Jansenda49e192005-01-07 13:08:22 +000013957 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013958 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013959 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013960 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013961 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013962 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013963 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013964 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13965 then
13966 LINKFORSHARED="-Wl,--export-dynamic"
13967 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013968 SunOS/5*) case $CC in
13969 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013970 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013971 then
13972 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013973 fi;;
13974 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013975 CYGWIN*)
13976 if test $enable_shared = "no"
13977 then
13978 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13979 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000013980 QNX*)
13981 # -Wl,-E causes the symbols to be added to the dynamic
13982 # symbol table so that they can be found when a module
13983 # is loaded. -N 2048K causes the stack size to be set
13984 # to 2048 kilobytes so that the stack doesn't overflow
13985 # when running test_compile.py.
13986 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013987 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013988fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013989{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13990$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013991
Michael W. Hudson54241132001-12-07 15:38:26 +000013992
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000013993
Benjamin Peterson82af01d2010-05-02 16:45:41 +000013994{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13995$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013996if test ! "$LIBRARY" = "$LDLIBRARY"
13997then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013998 case $ac_sys_system in
13999 CYGWIN*)
14000 # Cygwin needs CCSHARED when building extension DLLs
14001 # but not when building the interpreter DLL.
14002 CFLAGSFORSHARED='';;
14003 *)
14004 CFLAGSFORSHARED='$(CCSHARED)'
14005 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014006fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014007{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14008$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014009
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014010# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14011# library (with --enable-shared).
14012# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014013# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14014# if it is not required, since it creates a dependency of the shared library
14015# to LIBS. This, in turn, means that applications linking the shared libpython
14016# don't need to link LIBS explicitly. The default should be only changed
14017# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014018
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014019{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5
14020$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014021case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014022 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014023 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014024esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014025{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5
14026$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014027
14028
Guido van Rossum627b2d71993-12-24 10:39:16 +000014029# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014030
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014031{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14032$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014033if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014034 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014035else
Martin v. Löwis11437992002-04-12 09:54:03 +000014036 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014037LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014038cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014039/* confdefs.h. */
14040_ACEOF
14041cat confdefs.h >>conftest.$ac_ext
14042cat >>conftest.$ac_ext <<_ACEOF
14043/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014044
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014045/* Override any GCC internal prototype to avoid an error.
14046 Use char because int might match the return type of a GCC
14047 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014048#ifdef __cplusplus
14049extern "C"
14050#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014051char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014052int
14053main ()
14054{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014055return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014056 ;
14057 return 0;
14058}
14059_ACEOF
14060rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014061if { (ac_try="$ac_link"
14062case "(($ac_try" in
14063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14064 *) ac_try_echo=$ac_try;;
14065esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014066eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14067$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014068 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014069 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014070 grep -v '^ *+' conftest.er1 >conftest.err
14071 rm -f conftest.er1
14072 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014073 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014074 (exit $ac_status); } && {
14075 test -z "$ac_c_werror_flag" ||
14076 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014077 } && test -s conftest$ac_exeext && {
14078 test "$cross_compiling" = yes ||
14079 $as_test_x conftest$ac_exeext
14080 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014081 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014082else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014083 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014084sed 's/^/| /' conftest.$ac_ext >&5
14085
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014086 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014087fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014088
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014089rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014090rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014091 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014092LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014093fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014094{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14095$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14096if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014097 cat >>confdefs.h <<_ACEOF
14098#define HAVE_LIBDL 1
14099_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014100
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014101 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014102
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014103fi
14104 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000014105
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014106{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
14107$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014108if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014109 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014110else
Martin v. Löwis11437992002-04-12 09:54:03 +000014111 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014112LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014113cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014114/* confdefs.h. */
14115_ACEOF
14116cat confdefs.h >>conftest.$ac_ext
14117cat >>conftest.$ac_ext <<_ACEOF
14118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014119
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014120/* Override any GCC internal prototype to avoid an error.
14121 Use char because int might match the return type of a GCC
14122 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014123#ifdef __cplusplus
14124extern "C"
14125#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014126char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014127int
14128main ()
14129{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014130return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014131 ;
14132 return 0;
14133}
14134_ACEOF
14135rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014136if { (ac_try="$ac_link"
14137case "(($ac_try" in
14138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14139 *) ac_try_echo=$ac_try;;
14140esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014141eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14142$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014143 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014145 grep -v '^ *+' conftest.er1 >conftest.err
14146 rm -f conftest.er1
14147 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014148 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014149 (exit $ac_status); } && {
14150 test -z "$ac_c_werror_flag" ||
14151 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014152 } && test -s conftest$ac_exeext && {
14153 test "$cross_compiling" = yes ||
14154 $as_test_x conftest$ac_exeext
14155 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014156 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014157else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014158 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014159sed 's/^/| /' conftest.$ac_ext >&5
14160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014161 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014163
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014164rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014165rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014166 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014167LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014168fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014169{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
14170$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
14171if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014172 cat >>confdefs.h <<_ACEOF
14173#define HAVE_LIBDLD 1
14174_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014175
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014176 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014177
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014178fi
14179 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000014180
Georg Brandlb1441c72009-01-03 22:33:39 +000014181# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000014182if test "$with_threads" = "yes" -o -z "$with_threads"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014183 { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5
14184$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014185if test "${ac_cv_search_sem_init+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014186 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014187else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014188 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000014189cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014190/* confdefs.h. */
14191_ACEOF
14192cat confdefs.h >>conftest.$ac_ext
14193cat >>conftest.$ac_ext <<_ACEOF
14194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014195
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014196/* Override any GCC internal prototype to avoid an error.
14197 Use char because int might match the return type of a GCC
14198 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014199#ifdef __cplusplus
14200extern "C"
14201#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014202char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014203int
14204main ()
14205{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014206return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014207 ;
14208 return 0;
14209}
14210_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014211for ac_lib in '' pthread rt posix4; do
14212 if test -z "$ac_lib"; then
14213 ac_res="none required"
14214 else
14215 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014216 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014217 fi
14218 rm -f conftest.$ac_objext conftest$ac_exeext
14219if { (ac_try="$ac_link"
14220case "(($ac_try" in
14221 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14222 *) ac_try_echo=$ac_try;;
14223esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014224eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14225$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014226 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014227 ac_status=$?
14228 grep -v '^ *+' conftest.er1 >conftest.err
14229 rm -f conftest.er1
14230 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014231 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014232 (exit $ac_status); } && {
14233 test -z "$ac_c_werror_flag" ||
14234 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014235 } && test -s conftest$ac_exeext && {
14236 test "$cross_compiling" = yes ||
14237 $as_test_x conftest$ac_exeext
14238 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014239 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000014240else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014241 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014242sed 's/^/| /' conftest.$ac_ext >&5
14243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014244
Thomas Wouters477c8d52006-05-27 19:21:47 +000014245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014246
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014247rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014248rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14249 conftest$ac_exeext
14250 if test "${ac_cv_search_sem_init+set}" = set; then
14251 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014253done
14254if test "${ac_cv_search_sem_init+set}" = set; then
14255 :
14256else
14257 ac_cv_search_sem_init=no
14258fi
14259rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000014260LIBS=$ac_func_search_save_LIBS
14261fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014262{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
14263$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014264ac_res=$ac_cv_search_sem_init
14265if test "$ac_res" != no; then
14266 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014267
Martin v. Löwis41933dd2002-03-21 15:10:58 +000014268fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000014269 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000014270 # posix4 on Solaris 2.6
14271 # pthread (first!) on Linux
14272fi
14273
Martin v. Löwis19d17342003-06-14 21:03:05 +000014274# check if we need libintl for locale functions
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014275{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
14276$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000014277if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014278 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000014279else
14280 ac_check_lib_save_LIBS=$LIBS
14281LIBS="-lintl $LIBS"
14282cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014283/* confdefs.h. */
14284_ACEOF
14285cat confdefs.h >>conftest.$ac_ext
14286cat >>conftest.$ac_ext <<_ACEOF
14287/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014289/* Override any GCC internal prototype to avoid an error.
14290 Use char because int might match the return type of a GCC
14291 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000014292#ifdef __cplusplus
14293extern "C"
14294#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000014295char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014296int
14297main ()
14298{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014299return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014300 ;
14301 return 0;
14302}
14303_ACEOF
14304rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014305if { (ac_try="$ac_link"
14306case "(($ac_try" in
14307 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14308 *) ac_try_echo=$ac_try;;
14309esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014310eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14311$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014312 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000014313 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014314 grep -v '^ *+' conftest.er1 >conftest.err
14315 rm -f conftest.er1
14316 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014317 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014318 (exit $ac_status); } && {
14319 test -z "$ac_c_werror_flag" ||
14320 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014321 } && test -s conftest$ac_exeext && {
14322 test "$cross_compiling" = yes ||
14323 $as_test_x conftest$ac_exeext
14324 }; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014325 ac_cv_lib_intl_textdomain=yes
14326else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014327 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014328sed 's/^/| /' conftest.$ac_ext >&5
14329
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014330 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000014331fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014332
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014333rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014334rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014335 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000014336LIBS=$ac_check_lib_save_LIBS
14337fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014338{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
14339$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
14340if test "x$ac_cv_lib_intl_textdomain" = x""yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014341
14342cat >>confdefs.h <<\_ACEOF
14343#define WITH_LIBINTL 1
14344_ACEOF
14345
Brett Cannonc6d936e2009-06-07 20:09:53 +000014346 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000014347fi
14348
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014349
14350# checks for system dependent C++ extensions support
14351case "$ac_sys_system" in
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014352 AIX*) { $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14353$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014354 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014355/* confdefs.h. */
14356_ACEOF
14357cat confdefs.h >>conftest.$ac_ext
14358cat >>conftest.$ac_ext <<_ACEOF
14359/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014360#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014361int
14362main ()
14363{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014364loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014365 ;
14366 return 0;
14367}
14368_ACEOF
14369rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014370if { (ac_try="$ac_link"
14371case "(($ac_try" in
14372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14373 *) ac_try_echo=$ac_try;;
14374esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014375eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14376$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014377 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014379 grep -v '^ *+' conftest.er1 >conftest.err
14380 rm -f conftest.er1
14381 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014382 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014383 (exit $ac_status); } && {
14384 test -z "$ac_c_werror_flag" ||
14385 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014386 } && test -s conftest$ac_exeext && {
14387 test "$cross_compiling" = yes ||
14388 $as_test_x conftest$ac_exeext
14389 }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014390
Martin v. Löwis11437992002-04-12 09:54:03 +000014391cat >>confdefs.h <<\_ACEOF
14392#define AIX_GENUINE_CPLUSPLUS 1
14393_ACEOF
14394
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014395 { $as_echo "$as_me:$LINENO: result: yes" >&5
14396$as_echo "yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014397else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014398 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014399sed 's/^/| /' conftest.$ac_ext >&5
14400
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014401 { $as_echo "$as_me:$LINENO: result: no" >&5
14402$as_echo "no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014403fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014404
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014405rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014406rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014407 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014408 *) ;;
14409esac
14410
Guido van Rossum70c7f481998-03-26 18:44:10 +000014411# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014412{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14413$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014414if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014415 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014416else
Martin v. Löwis11437992002-04-12 09:54:03 +000014417 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014418LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014419cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014420/* confdefs.h. */
14421_ACEOF
14422cat confdefs.h >>conftest.$ac_ext
14423cat >>conftest.$ac_ext <<_ACEOF
14424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426/* Override any GCC internal prototype to avoid an error.
14427 Use char because int might match the return type of a GCC
14428 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014429#ifdef __cplusplus
14430extern "C"
14431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014432char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014433int
14434main ()
14435{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 ;
14438 return 0;
14439}
14440_ACEOF
14441rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014442if { (ac_try="$ac_link"
14443case "(($ac_try" in
14444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14445 *) ac_try_echo=$ac_try;;
14446esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014447eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14448$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014449 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014451 grep -v '^ *+' conftest.er1 >conftest.err
14452 rm -f conftest.er1
14453 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014454 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014455 (exit $ac_status); } && {
14456 test -z "$ac_c_werror_flag" ||
14457 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014458 } && test -s conftest$ac_exeext && {
14459 test "$cross_compiling" = yes ||
14460 $as_test_x conftest$ac_exeext
14461 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014462 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014463else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014464 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014465sed 's/^/| /' conftest.$ac_ext >&5
14466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014467 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014469
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014470rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014472 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014473LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014474fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014475{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14476$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
14477if test "x$ac_cv_lib_nsl_t_open" = x""yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014478 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014479fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014480 # SVR4
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014481{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14482$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014483if test "${ac_cv_lib_socket_socket+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014484 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014485else
Martin v. Löwis11437992002-04-12 09:54:03 +000014486 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014487LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014488cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014489/* confdefs.h. */
14490_ACEOF
14491cat confdefs.h >>conftest.$ac_ext
14492cat >>conftest.$ac_ext <<_ACEOF
14493/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014494
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014495/* Override any GCC internal prototype to avoid an error.
14496 Use char because int might match the return type of a GCC
14497 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014498#ifdef __cplusplus
14499extern "C"
14500#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014501char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014502int
14503main ()
14504{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014505return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014506 ;
14507 return 0;
14508}
14509_ACEOF
14510rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014511if { (ac_try="$ac_link"
14512case "(($ac_try" in
14513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14514 *) ac_try_echo=$ac_try;;
14515esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014516eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14517$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014518 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014519 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014520 grep -v '^ *+' conftest.er1 >conftest.err
14521 rm -f conftest.er1
14522 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014523 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014524 (exit $ac_status); } && {
14525 test -z "$ac_c_werror_flag" ||
14526 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014527 } && test -s conftest$ac_exeext && {
14528 test "$cross_compiling" = yes ||
14529 $as_test_x conftest$ac_exeext
14530 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014531 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014532else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014533 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014534sed 's/^/| /' conftest.$ac_ext >&5
14535
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014536 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014538
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014539rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014541 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014542LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014543fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014544{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14545$as_echo "$ac_cv_lib_socket_socket" >&6; }
14546if test "x$ac_cv_lib_socket_socket" = x""yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014547 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014548fi
14549 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014550
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014551{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5
14552$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014554# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014555if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014556 withval=$with_libs;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014557{ $as_echo "$as_me:$LINENO: result: $withval" >&5
14558$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014559LIBS="$withval $LIBS"
14560
14561else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014562 { $as_echo "$as_me:$LINENO: result: no" >&5
14563$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014564fi
14565
Guido van Rossum7f43da71994-08-01 12:15:30 +000014566
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014567# Check for use of the system libffi library
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014568{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14569$as_echo_n "checking for --with-system-ffi... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014570
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014571# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014572if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014573 withval=$with_system_ffi;
14574fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014575
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014576
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014577{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14578$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014579
Matthias Klose55708cc2009-04-30 08:06:49 +000014580# Check for --with-dbmliborder
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014581{ $as_echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
14582$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014583
14584# Check whether --with-dbmliborder was given.
14585if test "${with_dbmliborder+set}" = set; then
14586 withval=$with_dbmliborder;
14587if test x$with_dbmliborder = xyes
14588then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014589{ { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14590$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014591 { (exit 1); exit 1; }; }
14592else
14593 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
14594 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
14595 then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014596 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
14597$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000014598 { (exit 1); exit 1; }; }
14599 fi
14600 done
14601fi
14602fi
14603
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014604{ $as_echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
14605$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000014606
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014607# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014608
14609
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014610{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14611$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014612
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014613# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014614if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014615 withval=$with_signal_module;
14616fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014617
14618
14619if test -z "$with_signal_module"
14620then with_signal_module="yes"
14621fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014622{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5
14623$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014624
14625if test "${with_signal_module}" = "yes"; then
14626 USE_SIGNAL_MODULE=""
14627 SIGNAL_OBJS=""
14628else
14629 USE_SIGNAL_MODULE="#"
14630 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14631fi
14632
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014633# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014634
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014635USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014636
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014637{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14638$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014639
Guido van Rossumec2f0731997-01-22 20:54:01 +000014640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014641# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014642if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014643 withval=$with_dec_threads;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014644{ $as_echo "$as_me:$LINENO: result: $withval" >&5
14645$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014646LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014647if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014648 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014649fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014650else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014651 { $as_echo "$as_me:$LINENO: result: no" >&5
14652$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014653fi
14654
Martin v. Löwis11437992002-04-12 09:54:03 +000014655
14656# Templates for things AC_DEFINEd more than once.
14657# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014658
14659
Martin v. Löwis11437992002-04-12 09:54:03 +000014660
14661
14662
14663
14664
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014665{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5
14666$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014667
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014668# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014669if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014670 withval=$with_threads;
14671fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014672
14673
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014674# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014676# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014677if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014678 withval=$with_thread; with_threads=$with_thread
14679fi
14680
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014681
14682if test -z "$with_threads"
14683then with_threads="yes"
14684fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014685{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5
14686$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014687
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014688
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000014689if test "$with_threads" = "no"
14690then
14691 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014692elif test "$ac_cv_pthread_is_default" = yes
14693then
Martin v. Löwis11437992002-04-12 09:54:03 +000014694 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014695#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014696_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014697
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014698 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014699 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014700#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014701_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014702
14703 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014704 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014705elif test "$ac_cv_kpthread" = "yes"
14706then
14707 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014708 if test "$ac_cv_cxx_thread" = "yes"; then
14709 CXX="$CXX -Kpthread"
14710 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014711 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014712#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014713_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014714
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014715 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014716 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014717elif test "$ac_cv_kthread" = "yes"
14718then
14719 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014720 if test "$ac_cv_cxx_thread" = "yes"; then
14721 CXX="$CXX -Kthread"
14722 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014723 cat >>confdefs.h <<\_ACEOF
14724#define WITH_THREAD 1
14725_ACEOF
14726
14727 posix_threads=yes
14728 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014729elif test "$ac_cv_pthread" = "yes"
14730then
14731 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014732 if test "$ac_cv_cxx_thread" = "yes"; then
14733 CXX="$CXX -pthread"
14734 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014735 cat >>confdefs.h <<\_ACEOF
14736#define WITH_THREAD 1
14737_ACEOF
14738
14739 posix_threads=yes
14740 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014741else
14742 if test ! -z "$with_threads" -a -d "$with_threads"
14743 then LDFLAGS="$LDFLAGS -L$with_threads"
14744 fi
14745 if test ! -z "$withval" -a -d "$withval"
14746 then LDFLAGS="$LDFLAGS -L$withval"
14747 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014748
14749 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014750 # define _POSIX_THREADS in unistd.h. Some apparently don't
14751 # (e.g. gnu pth with pthread emulation)
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014752 { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14753$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014754 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014755/* confdefs.h. */
14756_ACEOF
14757cat confdefs.h >>conftest.$ac_ext
14758cat >>conftest.$ac_ext <<_ACEOF
14759/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014760
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014761#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014762#ifdef _POSIX_THREADS
14763yes
14764#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014765
14766_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014767if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014768 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014769 unistd_defines_pthreads=yes
14770else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014771 unistd_defines_pthreads=no
14772fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000014773rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014774
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014775 { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14776$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014777
Martin v. Löwis11437992002-04-12 09:54:03 +000014778 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014779#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014780_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014781
Martin v. Löwis11437992002-04-12 09:54:03 +000014782 if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014783 { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
14784$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014785if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014786 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014787fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014788{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14789$as_echo "$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014790else
Martin v. Löwis11437992002-04-12 09:54:03 +000014791 # Is the header compilable?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014792{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14793$as_echo_n "checking cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014794cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014795/* confdefs.h. */
14796_ACEOF
14797cat confdefs.h >>conftest.$ac_ext
14798cat >>conftest.$ac_ext <<_ACEOF
14799/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014800$ac_includes_default
14801#include <cthreads.h>
14802_ACEOF
14803rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014804if { (ac_try="$ac_compile"
14805case "(($ac_try" in
14806 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14807 *) ac_try_echo=$ac_try;;
14808esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014809eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14810$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014811 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014812 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014813 grep -v '^ *+' conftest.er1 >conftest.err
14814 rm -f conftest.er1
14815 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014816 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014817 (exit $ac_status); } && {
14818 test -z "$ac_c_werror_flag" ||
14819 test ! -s conftest.err
14820 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014821 ac_header_compiler=yes
14822else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014823 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014824sed 's/^/| /' conftest.$ac_ext >&5
14825
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014826 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014827fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014828
14829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014830{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14831$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014832
14833# Is the header present?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014834{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14835$as_echo_n "checking cthreads.h presence... " >&6; }
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öwisa6e97582002-01-01 18:41:33 +000014842#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014843_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014844if { (ac_try="$ac_cpp conftest.$ac_ext"
14845case "(($ac_try" in
14846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14847 *) ac_try_echo=$ac_try;;
14848esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014849eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14850$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014851 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014852 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014853 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014854 rm -f conftest.er1
14855 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014856 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014857 (exit $ac_status); } >/dev/null && {
14858 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14859 test ! -s conftest.err
14860 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014861 ac_header_preproc=yes
14862else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014863 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014864sed 's/^/| /' conftest.$ac_ext >&5
14865
Martin v. Löwis11437992002-04-12 09:54:03 +000014866 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014867fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014868
Martin v. Löwis11437992002-04-12 09:54:03 +000014869rm -f conftest.err conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014870{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14871$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014872
14873# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014874case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14875 yes:no: )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014876 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14877$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14878 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14879$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014880 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014881 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014882 no:yes:* )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014883 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14884$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14885 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14886$as_echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14887 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14888$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14889 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14890$as_echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14891 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14892$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14893 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14894$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014895 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000014896## -------------------------------------- ##
14897## Report this to http://bugs.python.org/ ##
14898## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014899_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014900 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014901 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014902esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014903{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
14904$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014905if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014906 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014907else
14908 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014909fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014910{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14911$as_echo "$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014912
14913fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014914if test "x$ac_cv_header_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014915 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014916#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014917_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014918
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014920#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014921_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014922
Martin v. Löwis11437992002-04-12 09:54:03 +000014923
14924cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014925#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014926_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014927
14928 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014929 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014930else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014931
Martin v. Löwis11437992002-04-12 09:54:03 +000014932 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014933 { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14934$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014935if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014936 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014937fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014938{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14939$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014940else
Martin v. Löwis11437992002-04-12 09:54:03 +000014941 # Is the header compilable?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014942{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14943$as_echo_n "checking mach/cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014944cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014945/* confdefs.h. */
14946_ACEOF
14947cat confdefs.h >>conftest.$ac_ext
14948cat >>conftest.$ac_ext <<_ACEOF
14949/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014950$ac_includes_default
14951#include <mach/cthreads.h>
14952_ACEOF
14953rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014954if { (ac_try="$ac_compile"
14955case "(($ac_try" in
14956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14957 *) ac_try_echo=$ac_try;;
14958esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014959eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14960$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014961 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014963 grep -v '^ *+' conftest.er1 >conftest.err
14964 rm -f conftest.er1
14965 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014966 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014967 (exit $ac_status); } && {
14968 test -z "$ac_c_werror_flag" ||
14969 test ! -s conftest.err
14970 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014971 ac_header_compiler=yes
14972else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014973 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014974sed 's/^/| /' conftest.$ac_ext >&5
14975
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014976 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014977fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014978
14979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014980{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14981$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014982
14983# Is the header present?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014984{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14985$as_echo_n "checking mach/cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014986cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014987/* confdefs.h. */
14988_ACEOF
14989cat confdefs.h >>conftest.$ac_ext
14990cat >>conftest.$ac_ext <<_ACEOF
14991/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014992#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014993_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014994if { (ac_try="$ac_cpp conftest.$ac_ext"
14995case "(($ac_try" in
14996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14997 *) ac_try_echo=$ac_try;;
14998esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000014999eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15000$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015001 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015002 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015003 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015004 rm -f conftest.er1
15005 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015006 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015007 (exit $ac_status); } >/dev/null && {
15008 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15009 test ! -s conftest.err
15010 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015011 ac_header_preproc=yes
15012else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015013 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015014sed 's/^/| /' conftest.$ac_ext >&5
15015
Martin v. Löwis11437992002-04-12 09:54:03 +000015016 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015017fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015018
Martin v. Löwis11437992002-04-12 09:54:03 +000015019rm -f conftest.err conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015020{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15021$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015022
15023# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015024case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15025 yes:no: )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015026 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15027$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15028 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15029$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015030 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015031 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015032 no:yes:* )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015033 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15034$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15035 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15036$as_echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15037 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15038$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15039 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15040$as_echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15041 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15042$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15043 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15044$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015045 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015046## -------------------------------------- ##
15047## Report this to http://bugs.python.org/ ##
15048## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015049_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015050 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015051 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015052esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015053{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15054$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015055if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015056 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015057else
15058 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015059fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015060{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15061$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015062
15063fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015064if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015065 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015066#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015067_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015068
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015070#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015071_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015072
Martin v. Löwis11437992002-04-12 09:54:03 +000015073
15074cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015075#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015076_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015077
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015078 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015079else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015080
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015081 { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5
15082$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015083
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015084# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015085if test "${with_pth+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015086 withval=$with_pth; { $as_echo "$as_me:$LINENO: result: $withval" >&5
15087$as_echo "$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015088 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015089#define WITH_THREAD 1
15090_ACEOF
15091
15092
15093cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015094#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015095_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015096
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015097 LIBS="-lpth $LIBS"
15098 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015099else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015100 { $as_echo "$as_me:$LINENO: result: no" >&5
15101$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015102
15103 # Just looking for pthread_create in libpthread is not enough:
15104 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
15105 # So we really have to include pthread.h, and then link.
15106 _libs=$LIBS
15107 LIBS="$LIBS -lpthread"
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015108 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
15109$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015110 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015111/* confdefs.h. */
15112_ACEOF
15113cat confdefs.h >>conftest.$ac_ext
15114cat >>conftest.$ac_ext <<_ACEOF
15115/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015116#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000015117
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015118void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000015119int
15120main ()
15121{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015122
15123pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000015124 ;
15125 return 0;
15126}
15127_ACEOF
15128rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129if { (ac_try="$ac_link"
15130case "(($ac_try" in
15131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15132 *) ac_try_echo=$ac_try;;
15133esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015134eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15135$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015138 grep -v '^ *+' conftest.er1 >conftest.err
15139 rm -f conftest.er1
15140 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015141 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015142 (exit $ac_status); } && {
15143 test -z "$ac_c_werror_flag" ||
15144 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015145 } && test -s conftest$ac_exeext && {
15146 test "$cross_compiling" = yes ||
15147 $as_test_x conftest$ac_exeext
15148 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015149
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015150 { $as_echo "$as_me:$LINENO: result: yes" >&5
15151$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015152 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015153#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015154_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000015155
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015156 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015157 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000015158else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015159 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015160sed 's/^/| /' conftest.$ac_ext >&5
15161
Martin v. Löwis11437992002-04-12 09:54:03 +000015162
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015163 LIBS=$_libs
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015164 { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5
15165$as_echo_n "checking for pthread_detach... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015166if test "${ac_cv_func_pthread_detach+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015167 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000015168else
Martin v. Löwis11437992002-04-12 09:54:03 +000015169 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015170/* confdefs.h. */
15171_ACEOF
15172cat confdefs.h >>conftest.$ac_ext
15173cat >>conftest.$ac_ext <<_ACEOF
15174/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015175/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
15176 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15177#define pthread_detach innocuous_pthread_detach
15178
Guido van Rossumad678af1998-10-02 14:42:15 +000015179/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015180 which can conflict with char pthread_detach (); below.
15181 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015182 <limits.h> exists even on freestanding compilers. */
15183
15184#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015185# include <limits.h>
15186#else
15187# include <assert.h>
15188#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015189
15190#undef pthread_detach
15191
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015192/* Override any GCC internal prototype to avoid an error.
15193 Use char because int might match the return type of a GCC
15194 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015195#ifdef __cplusplus
15196extern "C"
15197#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015198char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000015199/* The GNU C library defines this for functions which it implements
15200 to always fail with ENOSYS. Some functions are actually named
15201 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000015203choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000015204#endif
15205
Skip Montanaro6dead952003-09-25 14:50:04 +000015206int
15207main ()
15208{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015210 ;
15211 return 0;
15212}
15213_ACEOF
15214rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215if { (ac_try="$ac_link"
15216case "(($ac_try" in
15217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15218 *) ac_try_echo=$ac_try;;
15219esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015220eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15221$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015222 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015224 grep -v '^ *+' conftest.er1 >conftest.err
15225 rm -f conftest.er1
15226 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015227 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015228 (exit $ac_status); } && {
15229 test -z "$ac_c_werror_flag" ||
15230 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015231 } && test -s conftest$ac_exeext && {
15232 test "$cross_compiling" = yes ||
15233 $as_test_x conftest$ac_exeext
15234 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015235 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000015236else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015237 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015238sed 's/^/| /' conftest.$ac_ext >&5
15239
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015240 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000015241fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015242
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015243rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015244rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015245 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000015246fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015247{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
15248$as_echo "$ac_cv_func_pthread_detach" >&6; }
15249if test "x$ac_cv_func_pthread_detach" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015250 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015251#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015252_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015253
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015254 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015255 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015256else
Guido van Rossumad678af1998-10-02 14:42:15 +000015257
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015258 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015259 { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15260$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015261if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015262 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015263fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015264{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15265$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015266else
15267 # Is the header compilable?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015268{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
15269$as_echo_n "checking atheos/threads.h usability... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015270cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015271/* confdefs.h. */
15272_ACEOF
15273cat confdefs.h >>conftest.$ac_ext
15274cat >>conftest.$ac_ext <<_ACEOF
15275/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015276$ac_includes_default
15277#include <atheos/threads.h>
15278_ACEOF
15279rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280if { (ac_try="$ac_compile"
15281case "(($ac_try" in
15282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15283 *) ac_try_echo=$ac_try;;
15284esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015285eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15286$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015287 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015288 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015289 grep -v '^ *+' conftest.er1 >conftest.err
15290 rm -f conftest.er1
15291 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015292 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015293 (exit $ac_status); } && {
15294 test -z "$ac_c_werror_flag" ||
15295 test ! -s conftest.err
15296 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015297 ac_header_compiler=yes
15298else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015299 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015300sed 's/^/| /' conftest.$ac_ext >&5
15301
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015302 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015303fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015304
15305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015306{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15307$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015308
15309# Is the header present?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015310{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
15311$as_echo_n "checking atheos/threads.h presence... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015312cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015313/* confdefs.h. */
15314_ACEOF
15315cat confdefs.h >>conftest.$ac_ext
15316cat >>conftest.$ac_ext <<_ACEOF
15317/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015318#include <atheos/threads.h>
15319_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015320if { (ac_try="$ac_cpp conftest.$ac_ext"
15321case "(($ac_try" in
15322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15323 *) ac_try_echo=$ac_try;;
15324esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015325eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15326$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015327 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015328 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015329 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015330 rm -f conftest.er1
15331 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015332 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333 (exit $ac_status); } >/dev/null && {
15334 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15335 test ! -s conftest.err
15336 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015337 ac_header_preproc=yes
15338else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015339 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015340sed 's/^/| /' conftest.$ac_ext >&5
15341
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015342 ac_header_preproc=no
15343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015344
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015345rm -f conftest.err conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015346{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15347$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015348
15349# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015350case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15351 yes:no: )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015352 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15353$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15354 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15355$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015356 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015357 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015358 no:yes:* )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015359 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15360$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
15361 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15362$as_echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15363 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15364$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15365 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15366$as_echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15367 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15368$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15369 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15370$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015371 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015372## -------------------------------------- ##
15373## Report this to http://bugs.python.org/ ##
15374## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015375_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015376 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015377 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015378esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015379{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15380$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015381if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015382 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015383else
15384 ac_cv_header_atheos_threads_h=$ac_header_preproc
15385fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015386{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15387$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015388
15389fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015390if test "x$ac_cv_header_atheos_threads_h" = x""yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015391 cat >>confdefs.h <<\_ACEOF
15392#define WITH_THREAD 1
15393_ACEOF
15394
15395
15396cat >>confdefs.h <<\_ACEOF
15397#define ATHEOS_THREADS 1
15398_ACEOF
15399
15400 THREADOBJ="Python/thread.o"
15401else
15402
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015403 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15404$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015405if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015406 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015407else
Martin v. Löwis11437992002-04-12 09:54:03 +000015408 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015409LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015410cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015411/* confdefs.h. */
15412_ACEOF
15413cat confdefs.h >>conftest.$ac_ext
15414cat >>conftest.$ac_ext <<_ACEOF
15415/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015417/* Override any GCC internal prototype to avoid an error.
15418 Use char because int might match the return type of a GCC
15419 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015420#ifdef __cplusplus
15421extern "C"
15422#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015423char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015424int
15425main ()
15426{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015427return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015428 ;
15429 return 0;
15430}
15431_ACEOF
15432rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015433if { (ac_try="$ac_link"
15434case "(($ac_try" in
15435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15436 *) ac_try_echo=$ac_try;;
15437esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015438eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15439$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015440 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015441 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015442 grep -v '^ *+' conftest.er1 >conftest.err
15443 rm -f conftest.er1
15444 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015445 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015446 (exit $ac_status); } && {
15447 test -z "$ac_c_werror_flag" ||
15448 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015449 } && test -s conftest$ac_exeext && {
15450 test "$cross_compiling" = yes ||
15451 $as_test_x conftest$ac_exeext
15452 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015454else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015455 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015456sed 's/^/| /' conftest.$ac_ext >&5
15457
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015458 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015459fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015460
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015461rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015462rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015463 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015464LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015465fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015466{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15467$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
15468if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015469 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015470#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015471_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015472
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015473 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015474 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015475 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015476else
Greg Steinadf63d62000-07-05 10:38:09 +000015477
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015478 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15479$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015480if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015481 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015482else
Martin v. Löwis11437992002-04-12 09:54:03 +000015483 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015484LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015485cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015486/* confdefs.h. */
15487_ACEOF
15488cat confdefs.h >>conftest.$ac_ext
15489cat >>conftest.$ac_ext <<_ACEOF
15490/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015491
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015492/* Override any GCC internal prototype to avoid an error.
15493 Use char because int might match the return type of a GCC
15494 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015495#ifdef __cplusplus
15496extern "C"
15497#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015498char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015499int
15500main ()
15501{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015502return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015503 ;
15504 return 0;
15505}
15506_ACEOF
15507rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015508if { (ac_try="$ac_link"
15509case "(($ac_try" in
15510 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15511 *) ac_try_echo=$ac_try;;
15512esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015513eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15514$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015515 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015516 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015517 grep -v '^ *+' conftest.er1 >conftest.err
15518 rm -f conftest.er1
15519 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015520 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015521 (exit $ac_status); } && {
15522 test -z "$ac_c_werror_flag" ||
15523 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015524 } && test -s conftest$ac_exeext && {
15525 test "$cross_compiling" = yes ||
15526 $as_test_x conftest$ac_exeext
15527 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015529else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015530 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015531sed 's/^/| /' conftest.$ac_ext >&5
15532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015533 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015535
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015536rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015538 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015539LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015540fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015541{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15542$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
15543if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015544 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015545#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015546_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015547
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015548 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015549 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015550 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015551else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015552
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015553 { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15554$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015555if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015556 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015557else
Martin v. Löwis11437992002-04-12 09:54:03 +000015558 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015559LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015560cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015561/* confdefs.h. */
15562_ACEOF
15563cat confdefs.h >>conftest.$ac_ext
15564cat >>conftest.$ac_ext <<_ACEOF
15565/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015566
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567/* Override any GCC internal prototype to avoid an error.
15568 Use char because int might match the return type of a GCC
15569 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015570#ifdef __cplusplus
15571extern "C"
15572#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015573char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015574int
15575main ()
15576{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015577return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015578 ;
15579 return 0;
15580}
15581_ACEOF
15582rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015583if { (ac_try="$ac_link"
15584case "(($ac_try" in
15585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15586 *) ac_try_echo=$ac_try;;
15587esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015588eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15589$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015590 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015592 grep -v '^ *+' conftest.er1 >conftest.err
15593 rm -f conftest.er1
15594 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015595 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015596 (exit $ac_status); } && {
15597 test -z "$ac_c_werror_flag" ||
15598 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015599 } && test -s conftest$ac_exeext && {
15600 test "$cross_compiling" = yes ||
15601 $as_test_x conftest$ac_exeext
15602 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015603 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015604else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015605 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015606sed 's/^/| /' conftest.$ac_ext >&5
15607
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015608 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015609fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015610
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015611rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015612rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015613 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015614LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015615fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015616{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15617$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
15618if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015619 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015620#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015621_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015622
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015623 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015624 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015625 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015626else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015627
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015628 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15629$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015630if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015631 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015632else
Martin v. Löwis11437992002-04-12 09:54:03 +000015633 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015634LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015635cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015636/* confdefs.h. */
15637_ACEOF
15638cat confdefs.h >>conftest.$ac_ext
15639cat >>conftest.$ac_ext <<_ACEOF
15640/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015641
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015642/* Override any GCC internal prototype to avoid an error.
15643 Use char because int might match the return type of a GCC
15644 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015645#ifdef __cplusplus
15646extern "C"
15647#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015648char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015649int
15650main ()
15651{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015652return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015653 ;
15654 return 0;
15655}
15656_ACEOF
15657rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015658if { (ac_try="$ac_link"
15659case "(($ac_try" in
15660 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15661 *) ac_try_echo=$ac_try;;
15662esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015663eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15664$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015665 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015666 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015667 grep -v '^ *+' conftest.er1 >conftest.err
15668 rm -f conftest.er1
15669 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015670 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015671 (exit $ac_status); } && {
15672 test -z "$ac_c_werror_flag" ||
15673 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015674 } && test -s conftest$ac_exeext && {
15675 test "$cross_compiling" = yes ||
15676 $as_test_x conftest$ac_exeext
15677 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015678 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015679else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015680 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015681sed 's/^/| /' conftest.$ac_ext >&5
15682
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015683 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015684fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015685
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015686rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015687rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015688 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015689LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015690fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015691{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15692$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
15693if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015694 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015695#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015696_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015697
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015698 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015699 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015700 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015701else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015702
Martin v. Löwis130fb172001-07-19 11:00:41 +000015703 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015704fi
15705
Guido van Rossum627b2d71993-12-24 10:39:16 +000015706
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015707fi
15708
Guido van Rossum0be3e491997-05-22 20:33:33 +000015709fi
15710
Guido van Rossum49545951997-12-02 19:28:29 +000015711fi
15712
Guido van Rossumb93a8621998-05-07 13:27:32 +000015713fi
15714
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015715
Michael W. Hudson54241132001-12-07 15:38:26 +000015716fi
15717
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015719
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015720rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015721rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015722 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723fi
15724
Martin v. Löwis11437992002-04-12 09:54:03 +000015725fi
15726
15727
15728fi
15729
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015730
Michael W. Hudson54241132001-12-07 15:38:26 +000015731
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015732 { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15733$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015734if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015735 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015736else
Martin v. Löwis11437992002-04-12 09:54:03 +000015737 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015738LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015739cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015740/* confdefs.h. */
15741_ACEOF
15742cat confdefs.h >>conftest.$ac_ext
15743cat >>conftest.$ac_ext <<_ACEOF
15744/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015745
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015746/* Override any GCC internal prototype to avoid an error.
15747 Use char because int might match the return type of a GCC
15748 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015749#ifdef __cplusplus
15750extern "C"
15751#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015752char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015753int
15754main ()
15755{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015756return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 ;
15758 return 0;
15759}
15760_ACEOF
15761rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015762if { (ac_try="$ac_link"
15763case "(($ac_try" in
15764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15765 *) ac_try_echo=$ac_try;;
15766esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015767eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15768$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015769 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015771 grep -v '^ *+' conftest.er1 >conftest.err
15772 rm -f conftest.er1
15773 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015774 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015775 (exit $ac_status); } && {
15776 test -z "$ac_c_werror_flag" ||
15777 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015778 } && test -s conftest$ac_exeext && {
15779 test "$cross_compiling" = yes ||
15780 $as_test_x conftest$ac_exeext
15781 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015782 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015783else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015784 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015785sed 's/^/| /' conftest.$ac_ext >&5
15786
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015787 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015788fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015789
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015790rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015791rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015792 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015793LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015794fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015795{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15796$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
15797if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015798 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015799#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015800_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015801
Martin v. Löwis130fb172001-07-19 11:00:41 +000015802 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015803 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015804 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015805fi
15806
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015807
Neal Norwitza978ab02002-11-02 16:58:05 +000015808 if test "$posix_threads" != "yes"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015809 { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15810$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015811if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015812 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015813else
Martin v. Löwis11437992002-04-12 09:54:03 +000015814 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015815LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015817/* confdefs.h. */
15818_ACEOF
15819cat confdefs.h >>conftest.$ac_ext
15820cat >>conftest.$ac_ext <<_ACEOF
15821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015823/* Override any GCC internal prototype to avoid an error.
15824 Use char because int might match the return type of a GCC
15825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015826#ifdef __cplusplus
15827extern "C"
15828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015829char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015830int
15831main ()
15832{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015833return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015834 ;
15835 return 0;
15836}
15837_ACEOF
15838rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015839if { (ac_try="$ac_link"
15840case "(($ac_try" in
15841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15842 *) ac_try_echo=$ac_try;;
15843esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015844eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15845$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015846 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015848 grep -v '^ *+' conftest.er1 >conftest.err
15849 rm -f conftest.er1
15850 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015851 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015852 (exit $ac_status); } && {
15853 test -z "$ac_c_werror_flag" ||
15854 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015855 } && test -s conftest$ac_exeext && {
15856 test "$cross_compiling" = yes ||
15857 $as_test_x conftest$ac_exeext
15858 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015859 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015860else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015861 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015862sed 's/^/| /' conftest.$ac_ext >&5
15863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015865fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015866
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015867rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015868rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015869 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015870LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015871fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015872{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15873$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
15874if test "x$ac_cv_lib_thread_thr_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015875 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015876#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015877_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015878
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015879 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015880 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015881 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015882fi
15883
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015884 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015885
Martin v. Löwis130fb172001-07-19 11:00:41 +000015886 if test "$USE_THREAD_MODULE" != "#"
15887 then
15888 # If the above checks didn't disable threads, (at least) OSF1
15889 # needs this '-threads' argument during linking.
15890 case $ac_sys_system in
15891 OSF1) LDLAST=-threads;;
15892 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015893 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015894fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015895
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015896if test "$posix_threads" = "yes"; then
15897 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015898
15899cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015900#define _POSIX_THREADS 1
15901_ACEOF
15902
15903 fi
15904
15905 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15906 case $ac_sys_system/$ac_sys_release in
15907 SunOS/5.6)
15908cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015909#define HAVE_PTHREAD_DESTRUCTOR 1
15910_ACEOF
15911
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015912 ;;
15913 SunOS/5.8)
15914cat >>confdefs.h <<\_ACEOF
15915#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15916_ACEOF
15917
15918 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000015919 AIX/5)
15920cat >>confdefs.h <<\_ACEOF
15921#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15922_ACEOF
15923
15924 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015925 esac
15926
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015927 { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15928$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015929 if test "${ac_cv_pthread_system_supported+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015930 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015931else
15932 if test "$cross_compiling" = yes; then
15933 ac_cv_pthread_system_supported=no
15934else
15935 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015936/* confdefs.h. */
15937_ACEOF
15938cat confdefs.h >>conftest.$ac_ext
15939cat >>conftest.$ac_ext <<_ACEOF
15940/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015941#include <pthread.h>
15942 void *foo(void *parm) {
15943 return NULL;
15944 }
15945 main() {
15946 pthread_attr_t attr;
15947 pthread_t id;
15948 if (pthread_attr_init(&attr)) exit(-1);
15949 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15950 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15951 exit(0);
15952 }
15953_ACEOF
15954rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015955if { (ac_try="$ac_link"
15956case "(($ac_try" in
15957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15958 *) ac_try_echo=$ac_try;;
15959esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015960eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15961$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015962 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015963 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015964 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015965 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015966 { (case "(($ac_try" in
15967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15968 *) ac_try_echo=$ac_try;;
15969esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015970eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15971$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015972 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015973 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015974 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015975 (exit $ac_status); }; }; then
15976 ac_cv_pthread_system_supported=yes
15977else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015978 $as_echo "$as_me: program exited with status $ac_status" >&5
15979$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015980sed 's/^/| /' conftest.$ac_ext >&5
15981
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015982( exit $ac_status )
15983ac_cv_pthread_system_supported=no
15984fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015985rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015986rm -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 +000015987fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015988
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015989
15990
Guido van Rossum627b2d71993-12-24 10:39:16 +000015991fi
15992
Benjamin Peterson82af01d2010-05-02 16:45:41 +000015993 { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15994$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015995 if test "$ac_cv_pthread_system_supported" = "yes"; then
15996
15997cat >>confdefs.h <<\_ACEOF
15998#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15999_ACEOF
16000
16001 fi
16002
16003for ac_func in pthread_sigmask
16004do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016005as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16006{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16007$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016008if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016009 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016010else
16011 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016012/* confdefs.h. */
16013_ACEOF
16014cat confdefs.h >>conftest.$ac_ext
16015cat >>conftest.$ac_ext <<_ACEOF
16016/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016017/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16018 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16019#define $ac_func innocuous_$ac_func
16020
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016021/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016022 which can conflict with char $ac_func (); below.
16023 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016024 <limits.h> exists even on freestanding compilers. */
16025
16026#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016027# include <limits.h>
16028#else
16029# include <assert.h>
16030#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016031
16032#undef $ac_func
16033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016034/* Override any GCC internal prototype to avoid an error.
16035 Use char because int might match the return type of a GCC
16036 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016037#ifdef __cplusplus
16038extern "C"
16039#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016040char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016041/* The GNU C library defines this for functions which it implements
16042 to always fail with ENOSYS. Some functions are actually named
16043 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016044#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016045choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016046#endif
16047
Skip Montanaro6dead952003-09-25 14:50:04 +000016048int
16049main ()
16050{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016051return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016052 ;
16053 return 0;
16054}
16055_ACEOF
16056rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016057if { (ac_try="$ac_link"
16058case "(($ac_try" in
16059 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16060 *) ac_try_echo=$ac_try;;
16061esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016062eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16063$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016064 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016065 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016066 grep -v '^ *+' conftest.er1 >conftest.err
16067 rm -f conftest.er1
16068 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016069 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016070 (exit $ac_status); } && {
16071 test -z "$ac_c_werror_flag" ||
16072 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016073 } && test -s conftest$ac_exeext && {
16074 test "$cross_compiling" = yes ||
16075 $as_test_x conftest$ac_exeext
16076 }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016077 eval "$as_ac_var=yes"
16078else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016079 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016080sed 's/^/| /' conftest.$ac_ext >&5
16081
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016082 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016083fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016084
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016085rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016086rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016087 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016088fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016089ac_res=`eval 'as_val=${'$as_ac_var'}
16090 $as_echo "$as_val"'`
16091 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16092$as_echo "$ac_res" >&6; }
16093as_val=`eval 'as_val=${'$as_ac_var'}
16094 $as_echo "$as_val"'`
16095 if test "x$as_val" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016096 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016097#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016098_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016099 case $ac_sys_system in
16100 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016101
Jason Tishlerfac083d2003-07-22 15:20:49 +000016102cat >>confdefs.h <<\_ACEOF
16103#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16104_ACEOF
16105
16106 ;;
16107 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016108fi
16109done
16110
16111fi
16112
16113
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016114# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016115
16116
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016117{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16118$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016120if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016121 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016122 no)
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016123 { $as_echo "$as_me:$LINENO: result: no" >&5
16124$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016125 ipv6=no
16126 ;;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016127 *) { $as_echo "$as_me:$LINENO: result: yes" >&5
16128$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016129 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016130#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016131_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016132
16133 ipv6=yes
16134 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016135 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016136else
Martin v. Löwis11437992002-04-12 09:54:03 +000016137
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016138 if test "$cross_compiling" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016139 { $as_echo "$as_me:$LINENO: result: no" >&5
16140$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016141 ipv6=no
16142
16143else
Martin v. Löwis11437992002-04-12 09:54:03 +000016144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016145/* confdefs.h. */
16146_ACEOF
16147cat confdefs.h >>conftest.$ac_ext
16148cat >>conftest.$ac_ext <<_ACEOF
16149/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016150 /* AF_INET6 available check */
16151#include <sys/types.h>
16152#include <sys/socket.h>
16153main()
16154{
16155 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16156 exit(1);
16157 else
16158 exit(0);
16159}
16160
Martin v. Löwis11437992002-04-12 09:54:03 +000016161_ACEOF
16162rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016163if { (ac_try="$ac_link"
16164case "(($ac_try" in
16165 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16166 *) ac_try_echo=$ac_try;;
16167esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016168eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16169$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016170 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016171 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016172 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016173 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016174 { (case "(($ac_try" in
16175 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16176 *) ac_try_echo=$ac_try;;
16177esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016178eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16179$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016180 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016181 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016182 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016183 (exit $ac_status); }; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016184 { $as_echo "$as_me:$LINENO: result: yes" >&5
16185$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016186 ipv6=yes
16187else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016188 $as_echo "$as_me: program exited with status $ac_status" >&5
16189$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016190sed 's/^/| /' conftest.$ac_ext >&5
16191
Martin v. Löwis11437992002-04-12 09:54:03 +000016192( exit $ac_status )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016193{ $as_echo "$as_me:$LINENO: result: no" >&5
16194$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016195 ipv6=no
16196fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016197rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016198rm -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 +000016199fi
16200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016201
16202
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016203if test "$ipv6" = "yes"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016204 { $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16205$as_echo_n "checking if RFC2553 API is available... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016206 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016207/* confdefs.h. */
16208_ACEOF
16209cat confdefs.h >>conftest.$ac_ext
16210cat >>conftest.$ac_ext <<_ACEOF
16211/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016212#include <sys/types.h>
16213#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016214int
16215main ()
16216{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016217struct sockaddr_in6 x;
16218x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016219 ;
16220 return 0;
16221}
16222_ACEOF
16223rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224if { (ac_try="$ac_compile"
16225case "(($ac_try" in
16226 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16227 *) ac_try_echo=$ac_try;;
16228esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016229eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16230$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016231 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016232 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016233 grep -v '^ *+' conftest.er1 >conftest.err
16234 rm -f conftest.er1
16235 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016236 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016237 (exit $ac_status); } && {
16238 test -z "$ac_c_werror_flag" ||
16239 test ! -s conftest.err
16240 } && test -s conftest.$ac_objext; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016241 { $as_echo "$as_me:$LINENO: result: yes" >&5
16242$as_echo "yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016243 ipv6=yes
16244else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016245 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016246sed 's/^/| /' conftest.$ac_ext >&5
16247
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016248 { $as_echo "$as_me:$LINENO: result: no" >&5
16249$as_echo "no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016250 ipv6=no
16251fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016252
16253rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016254fi
16255
16256if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016257 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016258#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016259_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016260
16261fi
16262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016263fi
16264
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016265
16266ipv6type=unknown
16267ipv6lib=none
16268ipv6trylibc=no
16269
16270if test "$ipv6" = "yes"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016271 { $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16272$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016273 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16274 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016275 case $i in
16276 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016277 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016278/* confdefs.h. */
16279_ACEOF
16280cat confdefs.h >>conftest.$ac_ext
16281cat >>conftest.$ac_ext <<_ACEOF
16282/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016283
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016284#include <netinet/in.h>
16285#ifdef IPV6_INRIA_VERSION
16286yes
16287#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016288_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016289if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016290 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016291 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016292fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000016293rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016294
16295 ;;
16296 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016297 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016298/* confdefs.h. */
16299_ACEOF
16300cat confdefs.h >>conftest.$ac_ext
16301cat >>conftest.$ac_ext <<_ACEOF
16302/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016303
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016304#include <netinet/in.h>
16305#ifdef __KAME__
16306yes
16307#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016308_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016309if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016310 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016311 ipv6type=$i;
16312 ipv6lib=inet6
16313 ipv6libdir=/usr/local/v6/lib
16314 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016315fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000016316rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016317
16318 ;;
16319 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016321/* confdefs.h. */
16322_ACEOF
16323cat confdefs.h >>conftest.$ac_ext
16324cat >>conftest.$ac_ext <<_ACEOF
16325/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016326
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016327#include <features.h>
16328#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16329yes
16330#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016331_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016333 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016334 ipv6type=$i;
16335 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016336fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000016337rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016338
16339 ;;
16340 linux-inet6)
16341 if test -d /usr/inet6; then
16342 ipv6type=$i
16343 ipv6lib=inet6
16344 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016345 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016346 fi
16347 ;;
16348 solaris)
16349 if test -f /etc/netconfig; then
16350 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16351 ipv6type=$i
16352 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016353 fi
16354 fi
16355 ;;
16356 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016357 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016358/* confdefs.h. */
16359_ACEOF
16360cat confdefs.h >>conftest.$ac_ext
16361cat >>conftest.$ac_ext <<_ACEOF
16362/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016363
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016364#include <sys/param.h>
16365#ifdef _TOSHIBA_INET6
16366yes
16367#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016368_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016369if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016370 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016371 ipv6type=$i;
16372 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016373 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016374fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000016375rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016376
16377 ;;
16378 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000016379 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016380/* confdefs.h. */
16381_ACEOF
16382cat confdefs.h >>conftest.$ac_ext
16383cat >>conftest.$ac_ext <<_ACEOF
16384/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016385
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016386#include </usr/local/v6/include/sys/v6config.h>
16387#ifdef __V6D__
16388yes
16389#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016390_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016391if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016392 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016393 ipv6type=$i;
16394 ipv6lib=v6;
16395 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016396 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016397fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000016398rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016399
16400 ;;
16401 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016403/* confdefs.h. */
16404_ACEOF
16405cat confdefs.h >>conftest.$ac_ext
16406cat >>conftest.$ac_ext <<_ACEOF
16407/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016408
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016409#include <sys/param.h>
16410#ifdef _ZETA_MINAMI_INET6
16411yes
16412#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016413_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016415 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016416 ipv6type=$i;
16417 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016418 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016419fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000016420rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016421
16422 ;;
16423 esac
16424 if test "$ipv6type" != "unknown"; then
16425 break
16426 fi
16427 done
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016428 { $as_echo "$as_me:$LINENO: result: $ipv6type" >&5
16429$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016430fi
16431
16432if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16433 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16434 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16435 echo "using lib$ipv6lib"
16436 else
16437 if test $ipv6trylibc = "yes"; then
16438 echo "using libc"
16439 else
16440 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16441 echo "You need to fetch lib$ipv6lib.a from appropriate"
16442 echo 'ipv6 kit and compile beforehand.'
16443 exit 1
16444 fi
16445 fi
16446fi
16447
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016448{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16449$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016450cat >conftest.$ac_ext <<_ACEOF
16451/* confdefs.h. */
16452_ACEOF
16453cat confdefs.h >>conftest.$ac_ext
16454cat >>conftest.$ac_ext <<_ACEOF
16455/* end confdefs.h. */
16456#include <Carbon/Carbon.h>
16457int
16458main ()
16459{
16460FSIORefNum fRef = 0
16461 ;
16462 return 0;
16463}
16464_ACEOF
16465rm -f conftest.$ac_objext
16466if { (ac_try="$ac_compile"
16467case "(($ac_try" in
16468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16469 *) ac_try_echo=$ac_try;;
16470esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016471eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16472$as_echo "$ac_try_echo") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016473 (eval "$ac_compile") 2>conftest.er1
16474 ac_status=$?
16475 grep -v '^ *+' conftest.er1 >conftest.err
16476 rm -f conftest.er1
16477 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016478 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016479 (exit $ac_status); } && {
16480 test -z "$ac_c_werror_flag" ||
16481 test ! -s conftest.err
16482 } && test -s conftest.$ac_objext; then
16483
16484cat >>confdefs.h <<\_ACEOF
16485#define HAVE_OSX105_SDK 1
16486_ACEOF
16487
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016488 { $as_echo "$as_me:$LINENO: result: yes" >&5
16489$as_echo "yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016490else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016491 $as_echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016492sed 's/^/| /' conftest.$ac_ext >&5
16493
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016494 { $as_echo "$as_me:$LINENO: result: no" >&5
16495$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000016496
16497fi
16498
16499rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16500
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016501# Check for --with-doc-strings
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016502{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16503$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016505# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016506if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507 withval=$with_doc_strings;
16508fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016509
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016510
16511if test -z "$with_doc_strings"
16512then with_doc_strings="yes"
16513fi
16514if test "$with_doc_strings" != "no"
16515then
16516
16517cat >>confdefs.h <<\_ACEOF
16518#define WITH_DOC_STRINGS 1
16519_ACEOF
16520
16521fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016522{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16523$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016524
Neil Schemenauera35c6882001-02-27 04:45:05 +000016525# Check for Python-specific malloc support
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016526{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5
16527$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016529# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016530if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016531 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016532if test "$withval" != no
16533then
16534
16535cat >>confdefs.h <<\_ACEOF
16536#define WITH_TSC 1
16537_ACEOF
16538
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016539 { $as_echo "$as_me:$LINENO: result: yes" >&5
16540$as_echo "yes" >&6; }
16541else { $as_echo "$as_me:$LINENO: result: no" >&5
16542$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016543fi
16544else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016545 { $as_echo "$as_me:$LINENO: result: no" >&5
16546$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016547fi
16548
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016549
16550# Check for Python-specific malloc support
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016551{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16552$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016553
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016554# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016555if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016556 withval=$with_pymalloc;
16557fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016558
Neil Schemenauera35c6882001-02-27 04:45:05 +000016559
Neil Schemenauer16c22972002-03-22 15:34:49 +000016560if test -z "$with_pymalloc"
16561then with_pymalloc="yes"
16562fi
16563if test "$with_pymalloc" != "no"
16564then
Martin v. Löwis11437992002-04-12 09:54:03 +000016565
16566cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016567#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016568_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016569
16570fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016571{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16572$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016573
Barry Warsawef82cd72000-06-30 16:21:01 +000016574# Check for --with-wctype-functions
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016575{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16576$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016577
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016578# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016579if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016580 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016581if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016582then
16583
16584cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016585#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016586_ACEOF
16587
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016588 { $as_echo "$as_me:$LINENO: result: yes" >&5
16589$as_echo "yes" >&6; }
16590else { $as_echo "$as_me:$LINENO: result: no" >&5
16591$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016592fi
16593else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016594 { $as_echo "$as_me:$LINENO: result: no" >&5
16595$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016596fi
16597
Barry Warsawef82cd72000-06-30 16:21:01 +000016598
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016599# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016600
Guido van Rossum98935bf2001-09-05 19:13:16 +000016601DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016602
Guido van Rossume97ee181999-12-20 21:27:22 +000016603# the dlopen() function means we might want to use dynload_shlib.o. some
16604# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016605
Thomas Wouters3a584202000-08-05 23:28:51 +000016606for ac_func in dlopen
16607do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016608as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16609{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16610$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016611if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016612 $as_echo_n "(cached) " >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016613else
Martin v. Löwis11437992002-04-12 09:54:03 +000016614 cat >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öwis4ddc78a2006-01-29 09:53:44 +000016620/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16621 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16622#define $ac_func innocuous_$ac_func
16623
Guido van Rossume97ee181999-12-20 21:27:22 +000016624/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016625 which can conflict with char $ac_func (); below.
16626 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016627 <limits.h> exists even on freestanding compilers. */
16628
16629#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016630# include <limits.h>
16631#else
16632# include <assert.h>
16633#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016634
16635#undef $ac_func
16636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016637/* Override any GCC internal prototype to avoid an error.
16638 Use char because int might match the return type of a GCC
16639 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016640#ifdef __cplusplus
16641extern "C"
16642#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016643char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016644/* The GNU C library defines this for functions which it implements
16645 to always fail with ENOSYS. Some functions are actually named
16646 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016647#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016648choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016649#endif
16650
Skip Montanaro6dead952003-09-25 14:50:04 +000016651int
16652main ()
16653{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016654return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016655 ;
16656 return 0;
16657}
16658_ACEOF
16659rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016660if { (ac_try="$ac_link"
16661case "(($ac_try" in
16662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16663 *) ac_try_echo=$ac_try;;
16664esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016665eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16666$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016667 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016669 grep -v '^ *+' conftest.er1 >conftest.err
16670 rm -f conftest.er1
16671 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016672 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016673 (exit $ac_status); } && {
16674 test -z "$ac_c_werror_flag" ||
16675 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016676 } && test -s conftest$ac_exeext && {
16677 test "$cross_compiling" = yes ||
16678 $as_test_x conftest$ac_exeext
16679 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016680 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016681else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016682 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016683sed 's/^/| /' conftest.$ac_ext >&5
16684
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016685 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016686fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016687
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016688rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016689rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016690 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016691fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016692ac_res=`eval 'as_val=${'$as_ac_var'}
16693 $as_echo "$as_val"'`
16694 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16695$as_echo "$ac_res" >&6; }
16696as_val=`eval 'as_val=${'$as_ac_var'}
16697 $as_echo "$as_val"'`
16698 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016699 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016700#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016701_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016702
Guido van Rossume97ee181999-12-20 21:27:22 +000016703fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016704done
Guido van Rossume97ee181999-12-20 21:27:22 +000016705
Michael W. Hudson54241132001-12-07 15:38:26 +000016706
Guido van Rossume97ee181999-12-20 21:27:22 +000016707# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16708# loading of modules.
16709
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016710{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16711$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016712if test -z "$DYNLOADFILE"
16713then
16714 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016715 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16716 if test "$ac_cv_func_dlopen" = yes
16717 then DYNLOADFILE="dynload_shlib.o"
16718 else DYNLOADFILE="dynload_aix.o"
16719 fi
16720 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016721 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016722 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16723 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016724 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016725 *)
16726 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16727 # out any dynamic loading
16728 if test "$ac_cv_func_dlopen" = yes
16729 then DYNLOADFILE="dynload_shlib.o"
16730 else DYNLOADFILE="dynload_stub.o"
16731 fi
16732 ;;
16733 esac
16734fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016735{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16736$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016737if test "$DYNLOADFILE" != "dynload_stub.o"
16738then
Martin v. Löwis11437992002-04-12 09:54:03 +000016739
16740cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016741#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016742_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016743
16744fi
16745
Neil Schemenauer4e425612001-06-19 15:44:15 +000016746# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16747
Michael W. Hudson54241132001-12-07 15:38:26 +000016748
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016749{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16750$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016751if test -z "$MACHDEP_OBJS"
16752then
Jack Jansene578a632001-08-15 01:27:14 +000016753 MACHDEP_OBJS=$extra_machdep_objs
16754else
16755 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016756fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016757{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16758$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016759
Guido van Rossum627b2d71993-12-24 10:39:16 +000016760# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016761
16762
16763
16764
16765
16766
16767
16768
16769
16770
16771
16772
16773
16774
16775
16776
16777
16778
16779
16780
16781
16782
16783
16784
16785
16786
16787
16788
16789
16790
16791
16792
16793
16794
16795
16796
16797
16798
16799
16800
16801
16802
16803
16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
Martin v. Löwisd6320502004-08-12 13:45:08 +000016832
Martin v. Löwisc3001752005-01-23 09:27:24 +000016833
16834
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000016835
16836
Thomas Wouterscf297e42007-02-23 15:07:44 +000016837
16838
Gregory P. Smith25523d22007-09-03 16:44:55 +000016839
Christian Heimes4e30a842007-11-30 22:12:06 +000016840
Martin v. Löwis92fab752008-03-08 10:40:41 +000016841
Martin v. Löwis823725e2008-03-24 13:39:54 +000016842
16843
Benjamin Peterson965ce872009-04-05 21:24:58 +000016844
16845
16846
16847
Martin v. Löwis011e8422009-05-05 04:43:17 +000016848
Martin v. Löwis113a0852009-05-29 17:25:39 +000016849
Martin v. Löwis823725e2008-03-24 13:39:54 +000016850for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16851 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016852 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016853 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000016854 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016855 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016856 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000016857 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
16858 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016859 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000016860 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016861 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000016862 truncate uname unsetenv utimes waitpid wait3 wait4 \
16863 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016864do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016865as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16866{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16867$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016868if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016869 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016870else
Martin v. Löwis11437992002-04-12 09:54:03 +000016871 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016872/* confdefs.h. */
16873_ACEOF
16874cat confdefs.h >>conftest.$ac_ext
16875cat >>conftest.$ac_ext <<_ACEOF
16876/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016877/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16878 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16879#define $ac_func innocuous_$ac_func
16880
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016881/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016882 which can conflict with char $ac_func (); below.
16883 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016884 <limits.h> exists even on freestanding compilers. */
16885
16886#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016887# include <limits.h>
16888#else
16889# include <assert.h>
16890#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016891
16892#undef $ac_func
16893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016894/* Override any GCC internal prototype to avoid an error.
16895 Use char because int might match the return type of a GCC
16896 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016897#ifdef __cplusplus
16898extern "C"
16899#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016900char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016901/* The GNU C library defines this for functions which it implements
16902 to always fail with ENOSYS. Some functions are actually named
16903 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016904#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016905choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016906#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016907
Skip Montanaro6dead952003-09-25 14:50:04 +000016908int
16909main ()
16910{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016911return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016912 ;
16913 return 0;
16914}
16915_ACEOF
16916rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016917if { (ac_try="$ac_link"
16918case "(($ac_try" in
16919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16920 *) ac_try_echo=$ac_try;;
16921esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016922eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16923$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016924 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016926 grep -v '^ *+' conftest.er1 >conftest.err
16927 rm -f conftest.er1
16928 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016929 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016930 (exit $ac_status); } && {
16931 test -z "$ac_c_werror_flag" ||
16932 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016933 } && test -s conftest$ac_exeext && {
16934 test "$cross_compiling" = yes ||
16935 $as_test_x conftest$ac_exeext
16936 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016937 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016938else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016939 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016940sed 's/^/| /' conftest.$ac_ext >&5
16941
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016942 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016944
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016945rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016946rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016947 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016948fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016949ac_res=`eval 'as_val=${'$as_ac_var'}
16950 $as_echo "$as_val"'`
16951 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16952$as_echo "$ac_res" >&6; }
16953as_val=`eval 'as_val=${'$as_ac_var'}
16954 $as_echo "$as_val"'`
16955 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016956 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016957#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016958_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016959
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016960fi
16961done
16962
Michael W. Hudson54241132001-12-07 15:38:26 +000016963
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016964# For some functions, having a definition is not sufficient, since
16965# we want to take their address.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016966{ $as_echo "$as_me:$LINENO: checking for chroot" >&5
16967$as_echo_n "checking for chroot... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016969/* confdefs.h. */
16970_ACEOF
16971cat confdefs.h >>conftest.$ac_ext
16972cat >>conftest.$ac_ext <<_ACEOF
16973/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016974#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016975int
16976main ()
16977{
16978void *x=chroot
16979 ;
16980 return 0;
16981}
16982_ACEOF
16983rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016984if { (ac_try="$ac_compile"
16985case "(($ac_try" in
16986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16987 *) ac_try_echo=$ac_try;;
16988esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016989eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16990$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016991 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016992 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016993 grep -v '^ *+' conftest.er1 >conftest.err
16994 rm -f conftest.er1
16995 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000016996 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016997 (exit $ac_status); } && {
16998 test -z "$ac_c_werror_flag" ||
16999 test ! -s conftest.err
17000 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017001
17002cat >>confdefs.h <<\_ACEOF
17003#define HAVE_CHROOT 1
17004_ACEOF
17005
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017006 { $as_echo "$as_me:$LINENO: result: yes" >&5
17007$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017008else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017009 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017010sed 's/^/| /' conftest.$ac_ext >&5
17011
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017012 { $as_echo "$as_me:$LINENO: result: no" >&5
17013$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017014
17015fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016
17017rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017018{ $as_echo "$as_me:$LINENO: checking for link" >&5
17019$as_echo_n "checking for link... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017021/* confdefs.h. */
17022_ACEOF
17023cat confdefs.h >>conftest.$ac_ext
17024cat >>conftest.$ac_ext <<_ACEOF
17025/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017026#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017027int
17028main ()
17029{
17030void *x=link
17031 ;
17032 return 0;
17033}
17034_ACEOF
17035rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017036if { (ac_try="$ac_compile"
17037case "(($ac_try" in
17038 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17039 *) ac_try_echo=$ac_try;;
17040esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017041eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17042$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017043 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017044 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017045 grep -v '^ *+' conftest.er1 >conftest.err
17046 rm -f conftest.er1
17047 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017048 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017049 (exit $ac_status); } && {
17050 test -z "$ac_c_werror_flag" ||
17051 test ! -s conftest.err
17052 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017053
17054cat >>confdefs.h <<\_ACEOF
17055#define HAVE_LINK 1
17056_ACEOF
17057
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017058 { $as_echo "$as_me:$LINENO: result: yes" >&5
17059$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017060else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017061 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017062sed 's/^/| /' conftest.$ac_ext >&5
17063
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017064 { $as_echo "$as_me:$LINENO: result: no" >&5
17065$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017066
17067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017068
17069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017070{ $as_echo "$as_me:$LINENO: checking for symlink" >&5
17071$as_echo_n "checking for symlink... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017072cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017073/* confdefs.h. */
17074_ACEOF
17075cat confdefs.h >>conftest.$ac_ext
17076cat >>conftest.$ac_ext <<_ACEOF
17077/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017078#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017079int
17080main ()
17081{
17082void *x=symlink
17083 ;
17084 return 0;
17085}
17086_ACEOF
17087rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017088if { (ac_try="$ac_compile"
17089case "(($ac_try" in
17090 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17091 *) ac_try_echo=$ac_try;;
17092esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017093eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17094$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017096 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017097 grep -v '^ *+' conftest.er1 >conftest.err
17098 rm -f conftest.er1
17099 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017100 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017101 (exit $ac_status); } && {
17102 test -z "$ac_c_werror_flag" ||
17103 test ! -s conftest.err
17104 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017105
17106cat >>confdefs.h <<\_ACEOF
17107#define HAVE_SYMLINK 1
17108_ACEOF
17109
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017110 { $as_echo "$as_me:$LINENO: result: yes" >&5
17111$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017112else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017113 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017114sed 's/^/| /' conftest.$ac_ext >&5
17115
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017116 { $as_echo "$as_me:$LINENO: result: no" >&5
17117$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017118
17119fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017120
17121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017122{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5
17123$as_echo_n "checking for fchdir... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017124cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017125/* confdefs.h. */
17126_ACEOF
17127cat confdefs.h >>conftest.$ac_ext
17128cat >>conftest.$ac_ext <<_ACEOF
17129/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017130#include <unistd.h>
17131int
17132main ()
17133{
17134void *x=fchdir
17135 ;
17136 return 0;
17137}
17138_ACEOF
17139rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017140if { (ac_try="$ac_compile"
17141case "(($ac_try" in
17142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17143 *) ac_try_echo=$ac_try;;
17144esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017145eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17146$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017147 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017148 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017149 grep -v '^ *+' conftest.er1 >conftest.err
17150 rm -f conftest.er1
17151 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017152 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017153 (exit $ac_status); } && {
17154 test -z "$ac_c_werror_flag" ||
17155 test ! -s conftest.err
17156 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017157
17158cat >>confdefs.h <<\_ACEOF
17159#define HAVE_FCHDIR 1
17160_ACEOF
17161
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017162 { $as_echo "$as_me:$LINENO: result: yes" >&5
17163$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017164else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017165 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017166sed 's/^/| /' conftest.$ac_ext >&5
17167
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017168 { $as_echo "$as_me:$LINENO: result: no" >&5
17169$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017170
17171fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017172
17173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017174{ $as_echo "$as_me:$LINENO: checking for fsync" >&5
17175$as_echo_n "checking for fsync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017177/* confdefs.h. */
17178_ACEOF
17179cat confdefs.h >>conftest.$ac_ext
17180cat >>conftest.$ac_ext <<_ACEOF
17181/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017182#include <unistd.h>
17183int
17184main ()
17185{
17186void *x=fsync
17187 ;
17188 return 0;
17189}
17190_ACEOF
17191rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017192if { (ac_try="$ac_compile"
17193case "(($ac_try" in
17194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17195 *) ac_try_echo=$ac_try;;
17196esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017197eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17198$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017199 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017200 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017201 grep -v '^ *+' conftest.er1 >conftest.err
17202 rm -f conftest.er1
17203 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017204 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017205 (exit $ac_status); } && {
17206 test -z "$ac_c_werror_flag" ||
17207 test ! -s conftest.err
17208 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017209
17210cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017211#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017212_ACEOF
17213
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017214 { $as_echo "$as_me:$LINENO: result: yes" >&5
17215$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017216else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017217 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017218sed 's/^/| /' conftest.$ac_ext >&5
17219
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017220 { $as_echo "$as_me:$LINENO: result: no" >&5
17221$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017222
17223fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017224
17225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017226{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5
17227$as_echo_n "checking for fdatasync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017228cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017229/* confdefs.h. */
17230_ACEOF
17231cat confdefs.h >>conftest.$ac_ext
17232cat >>conftest.$ac_ext <<_ACEOF
17233/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017234#include <unistd.h>
17235int
17236main ()
17237{
17238void *x=fdatasync
17239 ;
17240 return 0;
17241}
17242_ACEOF
17243rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017244if { (ac_try="$ac_compile"
17245case "(($ac_try" in
17246 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17247 *) ac_try_echo=$ac_try;;
17248esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017249eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17250$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017251 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017252 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017253 grep -v '^ *+' conftest.er1 >conftest.err
17254 rm -f conftest.er1
17255 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017256 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017257 (exit $ac_status); } && {
17258 test -z "$ac_c_werror_flag" ||
17259 test ! -s conftest.err
17260 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017261
17262cat >>confdefs.h <<\_ACEOF
17263#define HAVE_FDATASYNC 1
17264_ACEOF
17265
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017266 { $as_echo "$as_me:$LINENO: result: yes" >&5
17267$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017268else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017269 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017270sed 's/^/| /' conftest.$ac_ext >&5
17271
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017272 { $as_echo "$as_me:$LINENO: result: no" >&5
17273$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017274
17275fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017276
17277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017278{ $as_echo "$as_me:$LINENO: checking for epoll" >&5
17279$as_echo_n "checking for epoll... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017280cat >conftest.$ac_ext <<_ACEOF
17281/* confdefs.h. */
17282_ACEOF
17283cat confdefs.h >>conftest.$ac_ext
17284cat >>conftest.$ac_ext <<_ACEOF
17285/* end confdefs.h. */
17286#include <sys/epoll.h>
17287int
17288main ()
17289{
17290void *x=epoll_create
17291 ;
17292 return 0;
17293}
17294_ACEOF
17295rm -f conftest.$ac_objext
17296if { (ac_try="$ac_compile"
17297case "(($ac_try" in
17298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17299 *) ac_try_echo=$ac_try;;
17300esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017301eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17302$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017303 (eval "$ac_compile") 2>conftest.er1
17304 ac_status=$?
17305 grep -v '^ *+' conftest.er1 >conftest.err
17306 rm -f conftest.er1
17307 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017308 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017309 (exit $ac_status); } && {
17310 test -z "$ac_c_werror_flag" ||
17311 test ! -s conftest.err
17312 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017313
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017314cat >>confdefs.h <<\_ACEOF
17315#define HAVE_EPOLL 1
17316_ACEOF
17317
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017318 { $as_echo "$as_me:$LINENO: result: yes" >&5
17319$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017320else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017321 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017322sed 's/^/| /' conftest.$ac_ext >&5
17323
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017324 { $as_echo "$as_me:$LINENO: result: no" >&5
17325$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017326
17327fi
17328
17329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017330{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5
17331$as_echo_n "checking for kqueue... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017332cat >conftest.$ac_ext <<_ACEOF
17333/* confdefs.h. */
17334_ACEOF
17335cat confdefs.h >>conftest.$ac_ext
17336cat >>conftest.$ac_ext <<_ACEOF
17337/* end confdefs.h. */
17338
17339#include <sys/types.h>
17340#include <sys/event.h>
17341
17342int
17343main ()
17344{
17345int x=kqueue()
17346 ;
17347 return 0;
17348}
17349_ACEOF
17350rm -f conftest.$ac_objext
17351if { (ac_try="$ac_compile"
17352case "(($ac_try" in
17353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17354 *) ac_try_echo=$ac_try;;
17355esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017356eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17357$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017358 (eval "$ac_compile") 2>conftest.er1
17359 ac_status=$?
17360 grep -v '^ *+' conftest.er1 >conftest.err
17361 rm -f conftest.er1
17362 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017363 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017364 (exit $ac_status); } && {
17365 test -z "$ac_c_werror_flag" ||
17366 test ! -s conftest.err
17367 } && test -s conftest.$ac_objext; then
17368
17369cat >>confdefs.h <<\_ACEOF
17370#define HAVE_KQUEUE 1
17371_ACEOF
17372
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017373 { $as_echo "$as_me:$LINENO: result: yes" >&5
17374$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017375else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017376 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017377sed 's/^/| /' conftest.$ac_ext >&5
17378
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017379 { $as_echo "$as_me:$LINENO: result: no" >&5
17380$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000017381
17382fi
17383
17384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017385# On some systems (eg. FreeBSD 5), we would find a definition of the
17386# functions ctermid_r, setgroups in the library, but no prototype
17387# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17388# address to avoid compiler warnings and potential miscompilations
17389# because of the missing prototypes.
17390
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017391{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5
17392$as_echo_n "checking for ctermid_r... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017393cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017394/* confdefs.h. */
17395_ACEOF
17396cat confdefs.h >>conftest.$ac_ext
17397cat >>conftest.$ac_ext <<_ACEOF
17398/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017399
17400#include "confdefs.h"
17401#include <stdio.h>
17402
Martin v. Löwisd5843682002-11-21 20:41:28 +000017403int
17404main ()
17405{
17406void* p = ctermid_r
17407 ;
17408 return 0;
17409}
17410_ACEOF
17411rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017412if { (ac_try="$ac_compile"
17413case "(($ac_try" in
17414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17415 *) ac_try_echo=$ac_try;;
17416esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017417eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17418$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017421 grep -v '^ *+' conftest.er1 >conftest.err
17422 rm -f conftest.er1
17423 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017424 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017425 (exit $ac_status); } && {
17426 test -z "$ac_c_werror_flag" ||
17427 test ! -s conftest.err
17428 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017429
17430cat >>confdefs.h <<\_ACEOF
17431#define HAVE_CTERMID_R 1
17432_ACEOF
17433
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017434 { $as_echo "$as_me:$LINENO: result: yes" >&5
17435$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017436else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017437 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017438sed 's/^/| /' conftest.$ac_ext >&5
17439
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017440 { $as_echo "$as_me:$LINENO: result: no" >&5
17441$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017442
17443fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017444
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17446
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017447{ $as_echo "$as_me:$LINENO: checking for flock" >&5
17448$as_echo_n "checking for flock... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017449cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017450/* confdefs.h. */
17451_ACEOF
17452cat confdefs.h >>conftest.$ac_ext
17453cat >>conftest.$ac_ext <<_ACEOF
17454/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017455
17456#include "confdefs.h"
17457#include <sys/file.h>
17458
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017459int
17460main ()
17461{
17462void* p = flock
17463 ;
17464 return 0;
17465}
17466_ACEOF
17467rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017468if { (ac_try="$ac_compile"
17469case "(($ac_try" in
17470 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17471 *) ac_try_echo=$ac_try;;
17472esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017473eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17474$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017476 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017477 grep -v '^ *+' conftest.er1 >conftest.err
17478 rm -f conftest.er1
17479 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017480 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017481 (exit $ac_status); } && {
17482 test -z "$ac_c_werror_flag" ||
17483 test ! -s conftest.err
17484 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017485
17486cat >>confdefs.h <<\_ACEOF
17487#define HAVE_FLOCK 1
17488_ACEOF
17489
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017490 { $as_echo "$as_me:$LINENO: result: yes" >&5
17491$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017492else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017493 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017494sed 's/^/| /' conftest.$ac_ext >&5
17495
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017496 { $as_echo "$as_me:$LINENO: result: no" >&5
17497$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017498
17499fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000017500
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17502
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017503{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5
17504$as_echo_n "checking for getpagesize... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017505cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017506/* confdefs.h. */
17507_ACEOF
17508cat confdefs.h >>conftest.$ac_ext
17509cat >>conftest.$ac_ext <<_ACEOF
17510/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017511
17512#include "confdefs.h"
17513#include <unistd.h>
17514
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017515int
17516main ()
17517{
17518void* p = getpagesize
17519 ;
17520 return 0;
17521}
17522_ACEOF
17523rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017524if { (ac_try="$ac_compile"
17525case "(($ac_try" in
17526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17527 *) ac_try_echo=$ac_try;;
17528esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017529eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17530$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017531 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017532 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017533 grep -v '^ *+' conftest.er1 >conftest.err
17534 rm -f conftest.er1
17535 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017536 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017537 (exit $ac_status); } && {
17538 test -z "$ac_c_werror_flag" ||
17539 test ! -s conftest.err
17540 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017541
17542cat >>confdefs.h <<\_ACEOF
17543#define HAVE_GETPAGESIZE 1
17544_ACEOF
17545
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017546 { $as_echo "$as_me:$LINENO: result: yes" >&5
17547$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017548else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017549 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017550sed 's/^/| /' conftest.$ac_ext >&5
17551
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017552 { $as_echo "$as_me:$LINENO: result: no" >&5
17553$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017554
17555fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017556
17557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017558
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017559for ac_prog in true
17560do
17561 # Extract the first word of "$ac_prog", so it can be a program name with args.
17562set dummy $ac_prog; ac_word=$2
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017563{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
17564$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017565if test "${ac_cv_prog_TRUE+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017566 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017567else
17568 if test -n "$TRUE"; then
17569 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17570else
17571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17572for as_dir in $PATH
17573do
17574 IFS=$as_save_IFS
17575 test -z "$as_dir" && as_dir=.
17576 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017577 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 +000017578 ac_cv_prog_TRUE="$ac_prog"
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017579 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017580 break 2
17581 fi
17582done
17583done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017585
17586fi
17587fi
17588TRUE=$ac_cv_prog_TRUE
17589if test -n "$TRUE"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017590 { $as_echo "$as_me:$LINENO: result: $TRUE" >&5
17591$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017592else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017593 { $as_echo "$as_me:$LINENO: result: no" >&5
17594$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017595fi
17596
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017597
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017598 test -n "$TRUE" && break
17599done
17600test -n "$TRUE" || TRUE="/bin/true"
17601
17602
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017603{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17604$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017605if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017606 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017607else
17608 ac_check_lib_save_LIBS=$LIBS
17609LIBS="-lc $LIBS"
17610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017611/* confdefs.h. */
17612_ACEOF
17613cat confdefs.h >>conftest.$ac_ext
17614cat >>conftest.$ac_ext <<_ACEOF
17615/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017617/* Override any GCC internal prototype to avoid an error.
17618 Use char because int might match the return type of a GCC
17619 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017620#ifdef __cplusplus
17621extern "C"
17622#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017623char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017624int
17625main ()
17626{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017627return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017628 ;
17629 return 0;
17630}
17631_ACEOF
17632rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017633if { (ac_try="$ac_link"
17634case "(($ac_try" in
17635 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17636 *) ac_try_echo=$ac_try;;
17637esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017638eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17639$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017640 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017641 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017642 grep -v '^ *+' conftest.er1 >conftest.err
17643 rm -f conftest.er1
17644 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017645 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017646 (exit $ac_status); } && {
17647 test -z "$ac_c_werror_flag" ||
17648 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017649 } && test -s conftest$ac_exeext && {
17650 test "$cross_compiling" = yes ||
17651 $as_test_x conftest$ac_exeext
17652 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017653 ac_cv_lib_c_inet_aton=yes
17654else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017655 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017656sed 's/^/| /' conftest.$ac_ext >&5
17657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017658 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017660
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017661rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017662rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017663 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017664LIBS=$ac_check_lib_save_LIBS
17665fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017666{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17667$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
17668if test "x$ac_cv_lib_c_inet_aton" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017669 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017670else
17671
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017672{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17673$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017674if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017675 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017676else
17677 ac_check_lib_save_LIBS=$LIBS
17678LIBS="-lresolv $LIBS"
17679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017680/* confdefs.h. */
17681_ACEOF
17682cat confdefs.h >>conftest.$ac_ext
17683cat >>conftest.$ac_ext <<_ACEOF
17684/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017685
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017686/* Override any GCC internal prototype to avoid an error.
17687 Use char because int might match the return type of a GCC
17688 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017689#ifdef __cplusplus
17690extern "C"
17691#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017692char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017693int
17694main ()
17695{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017696return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017697 ;
17698 return 0;
17699}
17700_ACEOF
17701rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017702if { (ac_try="$ac_link"
17703case "(($ac_try" in
17704 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17705 *) ac_try_echo=$ac_try;;
17706esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017707eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17708$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017709 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017710 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017711 grep -v '^ *+' conftest.er1 >conftest.err
17712 rm -f conftest.er1
17713 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017714 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017715 (exit $ac_status); } && {
17716 test -z "$ac_c_werror_flag" ||
17717 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017718 } && test -s conftest$ac_exeext && {
17719 test "$cross_compiling" = yes ||
17720 $as_test_x conftest$ac_exeext
17721 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017722 ac_cv_lib_resolv_inet_aton=yes
17723else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017724 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017725sed 's/^/| /' conftest.$ac_ext >&5
17726
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017727 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017728fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017729
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017730rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017731rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017732 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017733LIBS=$ac_check_lib_save_LIBS
17734fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017735{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17736$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
17737if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017738 cat >>confdefs.h <<_ACEOF
17739#define HAVE_LIBRESOLV 1
17740_ACEOF
17741
17742 LIBS="-lresolv $LIBS"
17743
17744fi
17745
17746
17747fi
17748
17749
Christian Heimesd0764e22007-12-04 15:00:33 +000017750# On Tru64, chflags seems to be present, but calling it will
17751# exit Python
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017752{ $as_echo "$as_me:$LINENO: checking for chflags" >&5
17753$as_echo_n "checking for chflags... " >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017754if test "${ac_cv_have_chflags+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017755 $as_echo_n "(cached) " >&6
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017756else
17757 if test "$cross_compiling" = yes; then
17758 ac_cv_have_chflags=cross
Christian Heimesd0764e22007-12-04 15:00:33 +000017759else
17760 cat >conftest.$ac_ext <<_ACEOF
17761/* confdefs.h. */
17762_ACEOF
17763cat confdefs.h >>conftest.$ac_ext
17764cat >>conftest.$ac_ext <<_ACEOF
17765/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017766[
Christian Heimesd0764e22007-12-04 15:00:33 +000017767#include <sys/stat.h>
17768#include <unistd.h>
17769int main(int argc, char*argv[])
17770{
17771 if(chflags(argv[0], 0) != 0)
17772 return 1;
17773 return 0;
17774}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017775]
Christian Heimesd0764e22007-12-04 15:00:33 +000017776_ACEOF
17777rm -f conftest$ac_exeext
17778if { (ac_try="$ac_link"
17779case "(($ac_try" in
17780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17781 *) ac_try_echo=$ac_try;;
17782esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017783eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17784$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017785 (eval "$ac_link") 2>&5
17786 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017787 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017788 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17789 { (case "(($ac_try" in
17790 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17791 *) ac_try_echo=$ac_try;;
17792esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017793eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17794$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017795 (eval "$ac_try") 2>&5
17796 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017797 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017798 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017799 ac_cv_have_chflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017800else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017801 $as_echo "$as_me: program exited with status $ac_status" >&5
17802$as_echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017803sed 's/^/| /' conftest.$ac_ext >&5
17804
17805( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017806ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017807fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017808rm -rf conftest.dSYM
Christian Heimesd0764e22007-12-04 15:00:33 +000017809rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17810fi
17811
17812
17813
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017814fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017815{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
17816$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017817if test "$ac_cv_have_chflags" = cross ; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017818 { $as_echo "$as_me:$LINENO: checking for chflags" >&5
17819$as_echo_n "checking for chflags... " >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017820if test "${ac_cv_func_chflags+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017821 $as_echo_n "(cached) " >&6
Christian Heimesd0764e22007-12-04 15:00:33 +000017822else
17823 cat >conftest.$ac_ext <<_ACEOF
17824/* confdefs.h. */
17825_ACEOF
17826cat confdefs.h >>conftest.$ac_ext
17827cat >>conftest.$ac_ext <<_ACEOF
17828/* end confdefs.h. */
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017829/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
17830 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17831#define chflags innocuous_chflags
Christian Heimesd0764e22007-12-04 15:00:33 +000017832
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017833/* System header to define __stub macros and hopefully few prototypes,
17834 which can conflict with char chflags (); below.
17835 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17836 <limits.h> exists even on freestanding compilers. */
17837
17838#ifdef __STDC__
17839# include <limits.h>
17840#else
17841# include <assert.h>
17842#endif
17843
17844#undef chflags
17845
17846/* Override any GCC internal prototype to avoid an error.
17847 Use char because int might match the return type of a GCC
17848 builtin and then its argument prototype would still apply. */
17849#ifdef __cplusplus
17850extern "C"
17851#endif
17852char chflags ();
17853/* The GNU C library defines this for functions which it implements
17854 to always fail with ENOSYS. Some functions are actually named
17855 something starting with __ and the normal name is an alias. */
17856#if defined __stub_chflags || defined __stub___chflags
17857choke me
17858#endif
17859
17860int
17861main ()
17862{
17863return chflags ();
17864 ;
17865 return 0;
17866}
17867_ACEOF
17868rm -f conftest.$ac_objext conftest$ac_exeext
17869if { (ac_try="$ac_link"
17870case "(($ac_try" in
17871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17872 *) ac_try_echo=$ac_try;;
17873esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017874eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17875$as_echo "$ac_try_echo") >&5
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017876 (eval "$ac_link") 2>conftest.er1
17877 ac_status=$?
17878 grep -v '^ *+' conftest.er1 >conftest.err
17879 rm -f conftest.er1
17880 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017881 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017882 (exit $ac_status); } && {
17883 test -z "$ac_c_werror_flag" ||
17884 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017885 } && test -s conftest$ac_exeext && {
17886 test "$cross_compiling" = yes ||
17887 $as_test_x conftest$ac_exeext
17888 }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017889 ac_cv_func_chflags=yes
17890else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017891 $as_echo "$as_me: failed program was:" >&5
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017892sed 's/^/| /' conftest.$ac_ext >&5
17893
17894 ac_cv_func_chflags=no
17895fi
17896
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017897rm -rf conftest.dSYM
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017898rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17899 conftest$ac_exeext conftest.$ac_ext
17900fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017901{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
17902$as_echo "$ac_cv_func_chflags" >&6; }
17903if test "x$ac_cv_func_chflags" = x""yes; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017904 ac_cv_have_chflags="yes"
17905else
17906 ac_cv_have_chflags="no"
17907fi
17908
17909fi
17910if test "$ac_cv_have_chflags" = yes ; then
17911
17912cat >>confdefs.h <<\_ACEOF
17913#define HAVE_CHFLAGS 1
17914_ACEOF
17915
17916fi
17917
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017918{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5
17919$as_echo_n "checking for lchflags... " >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017920if test "${ac_cv_have_lchflags+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017921 $as_echo_n "(cached) " >&6
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017922else
17923 if test "$cross_compiling" = yes; then
17924 ac_cv_have_lchflags=cross
17925else
17926 cat >conftest.$ac_ext <<_ACEOF
17927/* confdefs.h. */
17928_ACEOF
17929cat confdefs.h >>conftest.$ac_ext
17930cat >>conftest.$ac_ext <<_ACEOF
17931/* end confdefs.h. */
17932[
Christian Heimesd0764e22007-12-04 15:00:33 +000017933#include <sys/stat.h>
17934#include <unistd.h>
17935int main(int argc, char*argv[])
17936{
17937 if(lchflags(argv[0], 0) != 0)
17938 return 1;
17939 return 0;
17940}
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017941]
Christian Heimesd0764e22007-12-04 15:00:33 +000017942_ACEOF
17943rm -f conftest$ac_exeext
17944if { (ac_try="$ac_link"
17945case "(($ac_try" in
17946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17947 *) ac_try_echo=$ac_try;;
17948esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017949eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17950$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017951 (eval "$ac_link") 2>&5
17952 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017953 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017954 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17955 { (case "(($ac_try" in
17956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17957 *) ac_try_echo=$ac_try;;
17958esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017959eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17960$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017961 (eval "$ac_try") 2>&5
17962 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017963 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017964 (exit $ac_status); }; }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017965 ac_cv_have_lchflags=yes
Christian Heimesd0764e22007-12-04 15:00:33 +000017966else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017967 $as_echo "$as_me: program exited with status $ac_status" >&5
17968$as_echo "$as_me: failed program was:" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000017969sed 's/^/| /' conftest.$ac_ext >&5
17970
17971( exit $ac_status )
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017972ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000017973fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017974rm -rf conftest.dSYM
Christian Heimesd0764e22007-12-04 15:00:33 +000017975rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17976fi
17977
17978
17979
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017980fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017981{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
17982$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017983if test "$ac_cv_have_lchflags" = cross ; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017984 { $as_echo "$as_me:$LINENO: checking for lchflags" >&5
17985$as_echo_n "checking for lchflags... " >&6; }
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017986if test "${ac_cv_func_lchflags+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000017987 $as_echo_n "(cached) " >&6
Benjamin Peterson08fd6722010-01-30 19:51:43 +000017988else
17989 cat >conftest.$ac_ext <<_ACEOF
17990/* confdefs.h. */
17991_ACEOF
17992cat confdefs.h >>conftest.$ac_ext
17993cat >>conftest.$ac_ext <<_ACEOF
17994/* end confdefs.h. */
17995/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
17996 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17997#define lchflags innocuous_lchflags
17998
17999/* System header to define __stub macros and hopefully few prototypes,
18000 which can conflict with char lchflags (); below.
18001 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18002 <limits.h> exists even on freestanding compilers. */
18003
18004#ifdef __STDC__
18005# include <limits.h>
18006#else
18007# include <assert.h>
18008#endif
18009
18010#undef lchflags
18011
18012/* Override any GCC internal prototype to avoid an error.
18013 Use char because int might match the return type of a GCC
18014 builtin and then its argument prototype would still apply. */
18015#ifdef __cplusplus
18016extern "C"
18017#endif
18018char lchflags ();
18019/* The GNU C library defines this for functions which it implements
18020 to always fail with ENOSYS. Some functions are actually named
18021 something starting with __ and the normal name is an alias. */
18022#if defined __stub_lchflags || defined __stub___lchflags
18023choke me
18024#endif
18025
18026int
18027main ()
18028{
18029return lchflags ();
18030 ;
18031 return 0;
18032}
18033_ACEOF
18034rm -f conftest.$ac_objext conftest$ac_exeext
18035if { (ac_try="$ac_link"
18036case "(($ac_try" in
18037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18038 *) ac_try_echo=$ac_try;;
18039esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018040eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18041$as_echo "$ac_try_echo") >&5
Benjamin Peterson08fd6722010-01-30 19:51:43 +000018042 (eval "$ac_link") 2>conftest.er1
18043 ac_status=$?
18044 grep -v '^ *+' conftest.er1 >conftest.err
18045 rm -f conftest.er1
18046 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018047 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson08fd6722010-01-30 19:51:43 +000018048 (exit $ac_status); } && {
18049 test -z "$ac_c_werror_flag" ||
18050 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018051 } && test -s conftest$ac_exeext && {
18052 test "$cross_compiling" = yes ||
18053 $as_test_x conftest$ac_exeext
18054 }; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000018055 ac_cv_func_lchflags=yes
18056else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018057 $as_echo "$as_me: failed program was:" >&5
Benjamin Peterson08fd6722010-01-30 19:51:43 +000018058sed 's/^/| /' conftest.$ac_ext >&5
18059
18060 ac_cv_func_lchflags=no
18061fi
18062
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018063rm -rf conftest.dSYM
Benjamin Peterson08fd6722010-01-30 19:51:43 +000018064rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18065 conftest$ac_exeext conftest.$ac_ext
18066fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018067{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
18068$as_echo "$ac_cv_func_lchflags" >&6; }
18069if test "x$ac_cv_func_lchflags" = x""yes; then
Benjamin Peterson08fd6722010-01-30 19:51:43 +000018070 ac_cv_have_lchflags="yes"
18071else
18072 ac_cv_have_lchflags="no"
18073fi
18074
18075fi
18076if test "$ac_cv_have_lchflags" = yes ; then
18077
18078cat >>confdefs.h <<\_ACEOF
18079#define HAVE_LCHFLAGS 1
18080_ACEOF
18081
18082fi
18083
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018084case $ac_sys_system/$ac_sys_release in
18085Darwin/*)
18086 _CUR_CFLAGS="${CFLAGS}"
18087 _CUR_LDFLAGS="${LDFLAGS}"
18088 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18089 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18090 ;;
18091esac
18092
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018093{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18094$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018095if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018096 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018097else
18098 ac_check_lib_save_LIBS=$LIBS
18099LIBS="-lz $LIBS"
18100cat >conftest.$ac_ext <<_ACEOF
18101/* confdefs.h. */
18102_ACEOF
18103cat confdefs.h >>conftest.$ac_ext
18104cat >>conftest.$ac_ext <<_ACEOF
18105/* end confdefs.h. */
18106
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018107/* Override any GCC internal prototype to avoid an error.
18108 Use char because int might match the return type of a GCC
18109 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018110#ifdef __cplusplus
18111extern "C"
18112#endif
18113char inflateCopy ();
18114int
18115main ()
18116{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018117return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018118 ;
18119 return 0;
18120}
18121_ACEOF
18122rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018123if { (ac_try="$ac_link"
18124case "(($ac_try" in
18125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18126 *) ac_try_echo=$ac_try;;
18127esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018128eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18129$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018130 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018131 ac_status=$?
18132 grep -v '^ *+' conftest.er1 >conftest.err
18133 rm -f conftest.er1
18134 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018135 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018136 (exit $ac_status); } && {
18137 test -z "$ac_c_werror_flag" ||
18138 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018139 } && test -s conftest$ac_exeext && {
18140 test "$cross_compiling" = yes ||
18141 $as_test_x conftest$ac_exeext
18142 }; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018143 ac_cv_lib_z_inflateCopy=yes
18144else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018145 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018146sed 's/^/| /' conftest.$ac_ext >&5
18147
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018150
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018151rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018152rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018153 conftest$ac_exeext conftest.$ac_ext
18154LIBS=$ac_check_lib_save_LIBS
18155fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018156{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18157$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
18158if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018159
18160cat >>confdefs.h <<\_ACEOF
18161#define HAVE_ZLIB_COPY 1
18162_ACEOF
18163
18164fi
18165
18166
18167case $ac_sys_system/$ac_sys_release in
18168Darwin/*)
18169 CFLAGS="${_CUR_CFLAGS}"
18170 LDFLAGS="${_CUR_LDFLAGS}"
18171 ;;
18172esac
18173
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018174{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5
18175$as_echo_n "checking for hstrerror... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018176cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018177/* confdefs.h. */
18178_ACEOF
18179cat confdefs.h >>conftest.$ac_ext
18180cat >>conftest.$ac_ext <<_ACEOF
18181/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018182
18183#include "confdefs.h"
18184#include <netdb.h>
18185
Martin v. Löwise9416172003-05-03 10:12:45 +000018186int
18187main ()
18188{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018189void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018190 ;
18191 return 0;
18192}
18193_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018194rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018195if { (ac_try="$ac_link"
18196case "(($ac_try" in
18197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18198 *) ac_try_echo=$ac_try;;
18199esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018200eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18201$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018202 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018203 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018204 grep -v '^ *+' conftest.er1 >conftest.err
18205 rm -f conftest.er1
18206 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018207 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018208 (exit $ac_status); } && {
18209 test -z "$ac_c_werror_flag" ||
18210 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018211 } && test -s conftest$ac_exeext && {
18212 test "$cross_compiling" = yes ||
18213 $as_test_x conftest$ac_exeext
18214 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018215
18216cat >>confdefs.h <<\_ACEOF
18217#define HAVE_HSTRERROR 1
18218_ACEOF
18219
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018220 { $as_echo "$as_me:$LINENO: result: yes" >&5
18221$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018222else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018223 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018224sed 's/^/| /' conftest.$ac_ext >&5
18225
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018226 { $as_echo "$as_me:$LINENO: result: no" >&5
18227$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018228
18229fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018230
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018231rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018232rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018233 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018234
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018235{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5
18236$as_echo_n "checking for inet_aton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018237cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018238/* confdefs.h. */
18239_ACEOF
18240cat confdefs.h >>conftest.$ac_ext
18241cat >>conftest.$ac_ext <<_ACEOF
18242/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018243
18244#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018245#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018246#include <sys/socket.h>
18247#include <netinet/in.h>
18248#include <arpa/inet.h>
18249
Martin v. Löwise9416172003-05-03 10:12:45 +000018250int
18251main ()
18252{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018253void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018254 ;
18255 return 0;
18256}
18257_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018258rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018259if { (ac_try="$ac_link"
18260case "(($ac_try" in
18261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18262 *) ac_try_echo=$ac_try;;
18263esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018264eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18265$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018266 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018267 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018268 grep -v '^ *+' conftest.er1 >conftest.err
18269 rm -f conftest.er1
18270 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018271 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018272 (exit $ac_status); } && {
18273 test -z "$ac_c_werror_flag" ||
18274 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018275 } && test -s conftest$ac_exeext && {
18276 test "$cross_compiling" = yes ||
18277 $as_test_x conftest$ac_exeext
18278 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018279
18280cat >>confdefs.h <<\_ACEOF
18281#define HAVE_INET_ATON 1
18282_ACEOF
18283
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018284 { $as_echo "$as_me:$LINENO: result: yes" >&5
18285$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018286else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018287 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018288sed 's/^/| /' conftest.$ac_ext >&5
18289
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018290 { $as_echo "$as_me:$LINENO: result: no" >&5
18291$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018292
18293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018294
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018295rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018298
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018299{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5
18300$as_echo_n "checking for inet_pton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018301cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018302/* confdefs.h. */
18303_ACEOF
18304cat confdefs.h >>conftest.$ac_ext
18305cat >>conftest.$ac_ext <<_ACEOF
18306/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018307
18308#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018309#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018310#include <sys/socket.h>
18311#include <netinet/in.h>
18312#include <arpa/inet.h>
18313
Martin v. Löwise9416172003-05-03 10:12:45 +000018314int
18315main ()
18316{
18317void* p = inet_pton
18318 ;
18319 return 0;
18320}
18321_ACEOF
18322rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018323if { (ac_try="$ac_compile"
18324case "(($ac_try" in
18325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18326 *) ac_try_echo=$ac_try;;
18327esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018328eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18329$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018330 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018331 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018332 grep -v '^ *+' conftest.er1 >conftest.err
18333 rm -f conftest.er1
18334 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018335 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018336 (exit $ac_status); } && {
18337 test -z "$ac_c_werror_flag" ||
18338 test ! -s conftest.err
18339 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018340
18341cat >>confdefs.h <<\_ACEOF
18342#define HAVE_INET_PTON 1
18343_ACEOF
18344
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018345 { $as_echo "$as_me:$LINENO: result: yes" >&5
18346$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018347else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018348 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018349sed 's/^/| /' conftest.$ac_ext >&5
18350
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018351 { $as_echo "$as_me:$LINENO: result: no" >&5
18352$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018353
18354fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018355
18356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018357
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018358# On some systems, setgroups is in unistd.h, on others, in grp.h
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018359{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5
18360$as_echo_n "checking for setgroups... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018361cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018362/* confdefs.h. */
18363_ACEOF
18364cat confdefs.h >>conftest.$ac_ext
18365cat >>conftest.$ac_ext <<_ACEOF
18366/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018367
18368#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018369#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018370#ifdef HAVE_GRP_H
18371#include <grp.h>
18372#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018373
Martin v. Löwisd5843682002-11-21 20:41:28 +000018374int
18375main ()
18376{
18377void* p = setgroups
18378 ;
18379 return 0;
18380}
18381_ACEOF
18382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018383if { (ac_try="$ac_compile"
18384case "(($ac_try" in
18385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18386 *) ac_try_echo=$ac_try;;
18387esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018388eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18389$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018392 grep -v '^ *+' conftest.er1 >conftest.err
18393 rm -f conftest.er1
18394 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018395 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018396 (exit $ac_status); } && {
18397 test -z "$ac_c_werror_flag" ||
18398 test ! -s conftest.err
18399 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018400
18401cat >>confdefs.h <<\_ACEOF
18402#define HAVE_SETGROUPS 1
18403_ACEOF
18404
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018405 { $as_echo "$as_me:$LINENO: result: yes" >&5
18406$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018407else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018408 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018409sed 's/^/| /' conftest.$ac_ext >&5
18410
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018411 { $as_echo "$as_me:$LINENO: result: no" >&5
18412$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018413
18414fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018415
18416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018417
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018418# check for openpty and forkpty
18419
Martin v. Löwis11437992002-04-12 09:54:03 +000018420
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018421for ac_func in openpty
18422do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018423as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18424{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18425$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018426if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018427 $as_echo_n "(cached) " >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018428else
Martin v. Löwis11437992002-04-12 09:54:03 +000018429 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018430/* confdefs.h. */
18431_ACEOF
18432cat confdefs.h >>conftest.$ac_ext
18433cat >>conftest.$ac_ext <<_ACEOF
18434/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018435/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18436 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18437#define $ac_func innocuous_$ac_func
18438
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018439/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018440 which can conflict with char $ac_func (); below.
18441 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018442 <limits.h> exists even on freestanding compilers. */
18443
18444#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018445# include <limits.h>
18446#else
18447# include <assert.h>
18448#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018449
18450#undef $ac_func
18451
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018452/* Override any GCC internal prototype to avoid an error.
18453 Use char because int might match the return type of a GCC
18454 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018455#ifdef __cplusplus
18456extern "C"
18457#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018458char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018459/* The GNU C library defines this for functions which it implements
18460 to always fail with ENOSYS. Some functions are actually named
18461 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018462#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018463choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018464#endif
18465
Skip Montanaro6dead952003-09-25 14:50:04 +000018466int
18467main ()
18468{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018469return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018470 ;
18471 return 0;
18472}
18473_ACEOF
18474rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018475if { (ac_try="$ac_link"
18476case "(($ac_try" in
18477 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18478 *) ac_try_echo=$ac_try;;
18479esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018480eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18481$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018482 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018483 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018484 grep -v '^ *+' conftest.er1 >conftest.err
18485 rm -f conftest.er1
18486 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018487 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018488 (exit $ac_status); } && {
18489 test -z "$ac_c_werror_flag" ||
18490 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018491 } && test -s conftest$ac_exeext && {
18492 test "$cross_compiling" = yes ||
18493 $as_test_x conftest$ac_exeext
18494 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018495 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018496else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018497 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018498sed 's/^/| /' conftest.$ac_ext >&5
18499
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018500 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018501fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018502
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018503rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018504rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018505 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018506fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018507ac_res=`eval 'as_val=${'$as_ac_var'}
18508 $as_echo "$as_val"'`
18509 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18510$as_echo "$ac_res" >&6; }
18511as_val=`eval 'as_val=${'$as_ac_var'}
18512 $as_echo "$as_val"'`
18513 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018514 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018515#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018516_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018517
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018518else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018519 { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18520$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018521if test "${ac_cv_lib_util_openpty+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018522 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018523else
Martin v. Löwis11437992002-04-12 09:54:03 +000018524 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018525LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018526cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018527/* confdefs.h. */
18528_ACEOF
18529cat confdefs.h >>conftest.$ac_ext
18530cat >>conftest.$ac_ext <<_ACEOF
18531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018532
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018533/* Override any GCC internal prototype to avoid an error.
18534 Use char because int might match the return type of a GCC
18535 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018536#ifdef __cplusplus
18537extern "C"
18538#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018539char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018540int
18541main ()
18542{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018543return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018544 ;
18545 return 0;
18546}
18547_ACEOF
18548rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018549if { (ac_try="$ac_link"
18550case "(($ac_try" in
18551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18552 *) ac_try_echo=$ac_try;;
18553esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018554eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18555$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018556 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018557 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018558 grep -v '^ *+' conftest.er1 >conftest.err
18559 rm -f conftest.er1
18560 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018561 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018562 (exit $ac_status); } && {
18563 test -z "$ac_c_werror_flag" ||
18564 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018565 } && test -s conftest$ac_exeext && {
18566 test "$cross_compiling" = yes ||
18567 $as_test_x conftest$ac_exeext
18568 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018569 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018570else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018571 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018572sed 's/^/| /' conftest.$ac_ext >&5
18573
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018574 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018575fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018576
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018577rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018578rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018579 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018580LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018581fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018582{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18583$as_echo "$ac_cv_lib_util_openpty" >&6; }
18584if test "x$ac_cv_lib_util_openpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018585 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018586#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018587_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018588 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018589else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018590 { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18591$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018592if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018593 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018594else
18595 ac_check_lib_save_LIBS=$LIBS
18596LIBS="-lbsd $LIBS"
18597cat >conftest.$ac_ext <<_ACEOF
18598/* confdefs.h. */
18599_ACEOF
18600cat confdefs.h >>conftest.$ac_ext
18601cat >>conftest.$ac_ext <<_ACEOF
18602/* end confdefs.h. */
18603
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018604/* Override any GCC internal prototype to avoid an error.
18605 Use char because int might match the return type of a GCC
18606 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018607#ifdef __cplusplus
18608extern "C"
18609#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018610char openpty ();
18611int
18612main ()
18613{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018614return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018615 ;
18616 return 0;
18617}
18618_ACEOF
18619rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018620if { (ac_try="$ac_link"
18621case "(($ac_try" in
18622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18623 *) ac_try_echo=$ac_try;;
18624esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018625eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18626$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018627 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018628 ac_status=$?
18629 grep -v '^ *+' conftest.er1 >conftest.err
18630 rm -f conftest.er1
18631 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018632 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018633 (exit $ac_status); } && {
18634 test -z "$ac_c_werror_flag" ||
18635 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018636 } && test -s conftest$ac_exeext && {
18637 test "$cross_compiling" = yes ||
18638 $as_test_x conftest$ac_exeext
18639 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018640 ac_cv_lib_bsd_openpty=yes
18641else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018642 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018643sed 's/^/| /' conftest.$ac_ext >&5
18644
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018645 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018646fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018647
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018648rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018649rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018650 conftest$ac_exeext conftest.$ac_ext
18651LIBS=$ac_check_lib_save_LIBS
18652fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018653{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18654$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
18655if test "x$ac_cv_lib_bsd_openpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018656 cat >>confdefs.h <<\_ACEOF
18657#define HAVE_OPENPTY 1
18658_ACEOF
18659 LIBS="$LIBS -lbsd"
18660fi
18661
18662
18663fi
18664
Fred Drake8cef4cf2000-06-28 16:40:38 +000018665
18666fi
18667done
18668
Martin v. Löwis11437992002-04-12 09:54:03 +000018669
Fred Drake8cef4cf2000-06-28 16:40:38 +000018670for ac_func in forkpty
18671do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018672as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18673{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18674$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018675if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018676 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018677else
Martin v. Löwis11437992002-04-12 09:54:03 +000018678 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018679/* confdefs.h. */
18680_ACEOF
18681cat confdefs.h >>conftest.$ac_ext
18682cat >>conftest.$ac_ext <<_ACEOF
18683/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018684/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18685 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18686#define $ac_func innocuous_$ac_func
18687
Fred Drake8cef4cf2000-06-28 16:40:38 +000018688/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018689 which can conflict with char $ac_func (); below.
18690 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018691 <limits.h> exists even on freestanding compilers. */
18692
18693#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018694# include <limits.h>
18695#else
18696# include <assert.h>
18697#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018698
18699#undef $ac_func
18700
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018701/* Override any GCC internal prototype to avoid an error.
18702 Use char because int might match the return type of a GCC
18703 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018704#ifdef __cplusplus
18705extern "C"
18706#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018707char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018708/* The GNU C library defines this for functions which it implements
18709 to always fail with ENOSYS. Some functions are actually named
18710 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018711#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018712choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018713#endif
18714
Skip Montanaro6dead952003-09-25 14:50:04 +000018715int
18716main ()
18717{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018718return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018719 ;
18720 return 0;
18721}
18722_ACEOF
18723rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018724if { (ac_try="$ac_link"
18725case "(($ac_try" in
18726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18727 *) ac_try_echo=$ac_try;;
18728esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018729eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18730$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018731 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018732 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018733 grep -v '^ *+' conftest.er1 >conftest.err
18734 rm -f conftest.er1
18735 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018736 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018737 (exit $ac_status); } && {
18738 test -z "$ac_c_werror_flag" ||
18739 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018740 } && test -s conftest$ac_exeext && {
18741 test "$cross_compiling" = yes ||
18742 $as_test_x conftest$ac_exeext
18743 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018744 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018745else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018746 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018747sed 's/^/| /' conftest.$ac_ext >&5
18748
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018749 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018750fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018751
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018752rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018753rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018754 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018755fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018756ac_res=`eval 'as_val=${'$as_ac_var'}
18757 $as_echo "$as_val"'`
18758 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18759$as_echo "$ac_res" >&6; }
18760as_val=`eval 'as_val=${'$as_ac_var'}
18761 $as_echo "$as_val"'`
18762 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018763 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018764#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018765_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018766
Fred Drake8cef4cf2000-06-28 16:40:38 +000018767else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018768 { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18769$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018770if test "${ac_cv_lib_util_forkpty+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018771 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018772else
Martin v. Löwis11437992002-04-12 09:54:03 +000018773 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018774LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018775cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018776/* confdefs.h. */
18777_ACEOF
18778cat confdefs.h >>conftest.$ac_ext
18779cat >>conftest.$ac_ext <<_ACEOF
18780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018781
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018782/* Override any GCC internal prototype to avoid an error.
18783 Use char because int might match the return type of a GCC
18784 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018785#ifdef __cplusplus
18786extern "C"
18787#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018788char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018789int
18790main ()
18791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018792return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018793 ;
18794 return 0;
18795}
18796_ACEOF
18797rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018798if { (ac_try="$ac_link"
18799case "(($ac_try" in
18800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18801 *) ac_try_echo=$ac_try;;
18802esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018803eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18804$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018805 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018807 grep -v '^ *+' conftest.er1 >conftest.err
18808 rm -f conftest.er1
18809 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018810 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018811 (exit $ac_status); } && {
18812 test -z "$ac_c_werror_flag" ||
18813 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018814 } && test -s conftest$ac_exeext && {
18815 test "$cross_compiling" = yes ||
18816 $as_test_x conftest$ac_exeext
18817 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018818 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018819else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018820 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018821sed 's/^/| /' conftest.$ac_ext >&5
18822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018823 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018825
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018826rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018827rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018828 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018829LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018830fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018831{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18832$as_echo "$ac_cv_lib_util_forkpty" >&6; }
18833if test "x$ac_cv_lib_util_forkpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018834 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018835#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018836_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018837 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018838else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018839 { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18840$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018841if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018842 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018843else
18844 ac_check_lib_save_LIBS=$LIBS
18845LIBS="-lbsd $LIBS"
18846cat >conftest.$ac_ext <<_ACEOF
18847/* confdefs.h. */
18848_ACEOF
18849cat confdefs.h >>conftest.$ac_ext
18850cat >>conftest.$ac_ext <<_ACEOF
18851/* end confdefs.h. */
18852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018853/* Override any GCC internal prototype to avoid an error.
18854 Use char because int might match the return type of a GCC
18855 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018856#ifdef __cplusplus
18857extern "C"
18858#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018859char forkpty ();
18860int
18861main ()
18862{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018863return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018864 ;
18865 return 0;
18866}
18867_ACEOF
18868rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018869if { (ac_try="$ac_link"
18870case "(($ac_try" in
18871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18872 *) ac_try_echo=$ac_try;;
18873esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018874eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18875$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018876 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018877 ac_status=$?
18878 grep -v '^ *+' conftest.er1 >conftest.err
18879 rm -f conftest.er1
18880 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018881 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018882 (exit $ac_status); } && {
18883 test -z "$ac_c_werror_flag" ||
18884 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018885 } && test -s conftest$ac_exeext && {
18886 test "$cross_compiling" = yes ||
18887 $as_test_x conftest$ac_exeext
18888 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018889 ac_cv_lib_bsd_forkpty=yes
18890else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018891 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018892sed 's/^/| /' conftest.$ac_ext >&5
18893
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018894 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018895fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018896
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018897rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018898rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018899 conftest$ac_exeext conftest.$ac_ext
18900LIBS=$ac_check_lib_save_LIBS
18901fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018902{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18903$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
18904if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018905 cat >>confdefs.h <<\_ACEOF
18906#define HAVE_FORKPTY 1
18907_ACEOF
18908 LIBS="$LIBS -lbsd"
18909fi
18910
18911
18912fi
18913
Fred Drake8cef4cf2000-06-28 16:40:38 +000018914
18915fi
18916done
18917
Jack Jansendd19cf82001-12-06 22:36:17 +000018918
Christian Heimesb186d002008-03-18 15:15:01 +000018919# Stuff for expat.
18920
18921for ac_func in memmove
18922do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018923as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18924{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18925$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000018926if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018927 $as_echo_n "(cached) " >&6
Christian Heimesb186d002008-03-18 15:15:01 +000018928else
18929 cat >conftest.$ac_ext <<_ACEOF
18930/* confdefs.h. */
18931_ACEOF
18932cat confdefs.h >>conftest.$ac_ext
18933cat >>conftest.$ac_ext <<_ACEOF
18934/* end confdefs.h. */
18935/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18936 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18937#define $ac_func innocuous_$ac_func
18938
18939/* System header to define __stub macros and hopefully few prototypes,
18940 which can conflict with char $ac_func (); below.
18941 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18942 <limits.h> exists even on freestanding compilers. */
18943
18944#ifdef __STDC__
18945# include <limits.h>
18946#else
18947# include <assert.h>
18948#endif
18949
18950#undef $ac_func
18951
18952/* Override any GCC internal prototype to avoid an error.
18953 Use char because int might match the return type of a GCC
18954 builtin and then its argument prototype would still apply. */
18955#ifdef __cplusplus
18956extern "C"
18957#endif
18958char $ac_func ();
18959/* The GNU C library defines this for functions which it implements
18960 to always fail with ENOSYS. Some functions are actually named
18961 something starting with __ and the normal name is an alias. */
18962#if defined __stub_$ac_func || defined __stub___$ac_func
18963choke me
18964#endif
18965
18966int
18967main ()
18968{
18969return $ac_func ();
18970 ;
18971 return 0;
18972}
18973_ACEOF
18974rm -f conftest.$ac_objext conftest$ac_exeext
18975if { (ac_try="$ac_link"
18976case "(($ac_try" in
18977 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18978 *) ac_try_echo=$ac_try;;
18979esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018980eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18981$as_echo "$ac_try_echo") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018982 (eval "$ac_link") 2>conftest.er1
18983 ac_status=$?
18984 grep -v '^ *+' conftest.er1 >conftest.err
18985 rm -f conftest.er1
18986 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018987 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018988 (exit $ac_status); } && {
18989 test -z "$ac_c_werror_flag" ||
18990 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018991 } && test -s conftest$ac_exeext && {
18992 test "$cross_compiling" = yes ||
18993 $as_test_x conftest$ac_exeext
18994 }; then
Christian Heimesb186d002008-03-18 15:15:01 +000018995 eval "$as_ac_var=yes"
18996else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000018997 $as_echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000018998sed 's/^/| /' conftest.$ac_ext >&5
18999
19000 eval "$as_ac_var=no"
19001fi
19002
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019003rm -rf conftest.dSYM
Christian Heimesb186d002008-03-18 15:15:01 +000019004rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19005 conftest$ac_exeext conftest.$ac_ext
19006fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019007ac_res=`eval 'as_val=${'$as_ac_var'}
19008 $as_echo "$as_val"'`
19009 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19010$as_echo "$ac_res" >&6; }
19011as_val=`eval 'as_val=${'$as_ac_var'}
19012 $as_echo "$as_val"'`
19013 if test "x$as_val" = x""yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019014 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019015#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019016_ACEOF
19017
19018fi
19019done
19020
19021
Michael W. Hudson54241132001-12-07 15:38:26 +000019022# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019023
19024
19025
19026
19027
19028
Fred Drake8cef4cf2000-06-28 16:40:38 +000019029for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19030do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019031as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19032{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19033$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019034if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019035 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019036else
Martin v. Löwis11437992002-04-12 09:54:03 +000019037 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019038/* confdefs.h. */
19039_ACEOF
19040cat confdefs.h >>conftest.$ac_ext
19041cat >>conftest.$ac_ext <<_ACEOF
19042/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019043/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19044 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19045#define $ac_func innocuous_$ac_func
19046
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019047/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019048 which can conflict with char $ac_func (); below.
19049 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019050 <limits.h> exists even on freestanding compilers. */
19051
19052#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019053# include <limits.h>
19054#else
19055# include <assert.h>
19056#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019057
19058#undef $ac_func
19059
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019060/* Override any GCC internal prototype to avoid an error.
19061 Use char because int might match the return type of a GCC
19062 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019063#ifdef __cplusplus
19064extern "C"
19065#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019066char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019067/* The GNU C library defines this for functions which it implements
19068 to always fail with ENOSYS. Some functions are actually named
19069 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019070#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019071choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019072#endif
19073
Skip Montanaro6dead952003-09-25 14:50:04 +000019074int
19075main ()
19076{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019077return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019078 ;
19079 return 0;
19080}
19081_ACEOF
19082rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019083if { (ac_try="$ac_link"
19084case "(($ac_try" in
19085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19086 *) ac_try_echo=$ac_try;;
19087esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019088eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19089$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019090 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019091 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019092 grep -v '^ *+' conftest.er1 >conftest.err
19093 rm -f conftest.er1
19094 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019095 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019096 (exit $ac_status); } && {
19097 test -z "$ac_c_werror_flag" ||
19098 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019099 } && test -s conftest$ac_exeext && {
19100 test "$cross_compiling" = yes ||
19101 $as_test_x conftest$ac_exeext
19102 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019103 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019104else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019105 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019106sed 's/^/| /' conftest.$ac_ext >&5
19107
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019108 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019109fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019110
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019111rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019112rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019113 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019114fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019115ac_res=`eval 'as_val=${'$as_ac_var'}
19116 $as_echo "$as_val"'`
19117 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19118$as_echo "$ac_res" >&6; }
19119as_val=`eval 'as_val=${'$as_ac_var'}
19120 $as_echo "$as_val"'`
19121 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019122 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019123#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019124_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019125
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019126fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019127done
19128
Michael W. Hudson54241132001-12-07 15:38:26 +000019129
Martin v. Löwis11437992002-04-12 09:54:03 +000019130
19131
19132
Christian Heimesb186d002008-03-18 15:15:01 +000019133for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019134do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019135as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19136{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19137$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019138if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019139 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019140else
Martin v. Löwis11437992002-04-12 09:54:03 +000019141 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019142/* confdefs.h. */
19143_ACEOF
19144cat confdefs.h >>conftest.$ac_ext
19145cat >>conftest.$ac_ext <<_ACEOF
19146/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019147/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19148 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19149#define $ac_func innocuous_$ac_func
19150
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019151/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019152 which can conflict with char $ac_func (); below.
19153 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019154 <limits.h> exists even on freestanding compilers. */
19155
19156#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019157# include <limits.h>
19158#else
19159# include <assert.h>
19160#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019161
19162#undef $ac_func
19163
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019164/* Override any GCC internal prototype to avoid an error.
19165 Use char because int might match the return type of a GCC
19166 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019167#ifdef __cplusplus
19168extern "C"
19169#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019170char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019171/* The GNU C library defines this for functions which it implements
19172 to always fail with ENOSYS. Some functions are actually named
19173 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019174#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019175choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019176#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019177
Skip Montanaro6dead952003-09-25 14:50:04 +000019178int
19179main ()
19180{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019181return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019182 ;
19183 return 0;
19184}
19185_ACEOF
19186rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019187if { (ac_try="$ac_link"
19188case "(($ac_try" in
19189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19190 *) ac_try_echo=$ac_try;;
19191esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019192eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19193$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019194 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019195 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019196 grep -v '^ *+' conftest.er1 >conftest.err
19197 rm -f conftest.er1
19198 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019199 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019200 (exit $ac_status); } && {
19201 test -z "$ac_c_werror_flag" ||
19202 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019203 } && test -s conftest$ac_exeext && {
19204 test "$cross_compiling" = yes ||
19205 $as_test_x conftest$ac_exeext
19206 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019207 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019208else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019209 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019210sed 's/^/| /' conftest.$ac_ext >&5
19211
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019212 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019213fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019214
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019215rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019216rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019217 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019218fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019219ac_res=`eval 'as_val=${'$as_ac_var'}
19220 $as_echo "$as_val"'`
19221 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19222$as_echo "$ac_res" >&6; }
19223as_val=`eval 'as_val=${'$as_ac_var'}
19224 $as_echo "$as_val"'`
19225 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019226 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019227#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019228_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019229
Martin v. Löwis1142de32002-03-29 16:28:31 +000019230else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019231 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019232 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019233 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19234 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019235esac
19236
Martin v. Löwis1142de32002-03-29 16:28:31 +000019237fi
19238done
19239
19240
Martin v. Löwis11437992002-04-12 09:54:03 +000019241
Martin v. Löwis1142de32002-03-29 16:28:31 +000019242for ac_func in getpgrp
19243do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019244as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19245{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19246$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019247if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019248 $as_echo_n "(cached) " >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019249else
Martin v. Löwis11437992002-04-12 09:54:03 +000019250 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019251/* confdefs.h. */
19252_ACEOF
19253cat confdefs.h >>conftest.$ac_ext
19254cat >>conftest.$ac_ext <<_ACEOF
19255/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019256/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19257 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19258#define $ac_func innocuous_$ac_func
19259
Martin v. Löwis1142de32002-03-29 16:28:31 +000019260/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019261 which can conflict with char $ac_func (); below.
19262 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019263 <limits.h> exists even on freestanding compilers. */
19264
19265#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019266# include <limits.h>
19267#else
19268# include <assert.h>
19269#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019270
19271#undef $ac_func
19272
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019273/* Override any GCC internal prototype to avoid an error.
19274 Use char because int might match the return type of a GCC
19275 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019276#ifdef __cplusplus
19277extern "C"
19278#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019279char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019280/* The GNU C library defines this for functions which it implements
19281 to always fail with ENOSYS. Some functions are actually named
19282 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019283#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019284choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019285#endif
19286
Skip Montanaro6dead952003-09-25 14:50:04 +000019287int
19288main ()
19289{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019290return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019291 ;
19292 return 0;
19293}
19294_ACEOF
19295rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019296if { (ac_try="$ac_link"
19297case "(($ac_try" in
19298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19299 *) ac_try_echo=$ac_try;;
19300esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019301eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19302$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019303 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019305 grep -v '^ *+' conftest.er1 >conftest.err
19306 rm -f conftest.er1
19307 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019308 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019309 (exit $ac_status); } && {
19310 test -z "$ac_c_werror_flag" ||
19311 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019312 } && test -s conftest$ac_exeext && {
19313 test "$cross_compiling" = yes ||
19314 $as_test_x conftest$ac_exeext
19315 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019316 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019317else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019318 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019319sed 's/^/| /' conftest.$ac_ext >&5
19320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019321 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019322fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019323
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019324rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019325rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019326 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019327fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019328ac_res=`eval 'as_val=${'$as_ac_var'}
19329 $as_echo "$as_val"'`
19330 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19331$as_echo "$ac_res" >&6; }
19332as_val=`eval 'as_val=${'$as_ac_var'}
19333 $as_echo "$as_val"'`
19334 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019335 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019336#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019337_ACEOF
19338 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019339/* confdefs.h. */
19340_ACEOF
19341cat confdefs.h >>conftest.$ac_ext
19342cat >>conftest.$ac_ext <<_ACEOF
19343/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019344#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019345int
19346main ()
19347{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019348getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019349 ;
19350 return 0;
19351}
19352_ACEOF
19353rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019354if { (ac_try="$ac_compile"
19355case "(($ac_try" in
19356 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19357 *) ac_try_echo=$ac_try;;
19358esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019359eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19360$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019361 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019362 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019363 grep -v '^ *+' conftest.er1 >conftest.err
19364 rm -f conftest.er1
19365 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019366 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019367 (exit $ac_status); } && {
19368 test -z "$ac_c_werror_flag" ||
19369 test ! -s conftest.err
19370 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019371
19372cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019373#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019374_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019375
Martin v. Löwis11437992002-04-12 09:54:03 +000019376
Guido van Rossumf78abae1997-01-21 22:02:36 +000019377else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019378 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019379sed 's/^/| /' conftest.$ac_ext >&5
19380
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019381
Guido van Rossum627b2d71993-12-24 10:39:16 +000019382fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019383
19384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019385
Guido van Rossum627b2d71993-12-24 10:39:16 +000019386fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019387done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019388
Jack Jansen150753c2003-03-29 22:07:47 +000019389
19390for ac_func in setpgrp
19391do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019392as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19393{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19394$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019395if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019396 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019397else
Martin v. Löwis11437992002-04-12 09:54:03 +000019398 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019399/* confdefs.h. */
19400_ACEOF
19401cat confdefs.h >>conftest.$ac_ext
19402cat >>conftest.$ac_ext <<_ACEOF
19403/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019404/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19405 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19406#define $ac_func innocuous_$ac_func
19407
Jack Jansen150753c2003-03-29 22:07:47 +000019408/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019409 which can conflict with char $ac_func (); below.
19410 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019411 <limits.h> exists even on freestanding compilers. */
19412
19413#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019414# include <limits.h>
19415#else
19416# include <assert.h>
19417#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019418
19419#undef $ac_func
19420
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019421/* Override any GCC internal prototype to avoid an error.
19422 Use char because int might match the return type of a GCC
19423 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019424#ifdef __cplusplus
19425extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019426#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019427char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019428/* The GNU C library defines this for functions which it implements
19429 to always fail with ENOSYS. Some functions are actually named
19430 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019431#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019432choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019433#endif
19434
Skip Montanaro6dead952003-09-25 14:50:04 +000019435int
19436main ()
19437{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019438return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019439 ;
19440 return 0;
19441}
19442_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019443rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019444if { (ac_try="$ac_link"
19445case "(($ac_try" in
19446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19447 *) ac_try_echo=$ac_try;;
19448esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019449eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19450$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019451 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019452 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019453 grep -v '^ *+' conftest.er1 >conftest.err
19454 rm -f conftest.er1
19455 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019456 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019457 (exit $ac_status); } && {
19458 test -z "$ac_c_werror_flag" ||
19459 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019460 } && test -s conftest$ac_exeext && {
19461 test "$cross_compiling" = yes ||
19462 $as_test_x conftest$ac_exeext
19463 }; then
Jack Jansen150753c2003-03-29 22:07:47 +000019464 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019465else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019466 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019467sed 's/^/| /' conftest.$ac_ext >&5
19468
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019469 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019470fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019471
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019472rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019473rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019474 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019475fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019476ac_res=`eval 'as_val=${'$as_ac_var'}
19477 $as_echo "$as_val"'`
19478 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19479$as_echo "$ac_res" >&6; }
19480as_val=`eval 'as_val=${'$as_ac_var'}
19481 $as_echo "$as_val"'`
19482 if test "x$as_val" = x""yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019483 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019484#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019485_ACEOF
19486 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019487/* confdefs.h. */
19488_ACEOF
19489cat confdefs.h >>conftest.$ac_ext
19490cat >>conftest.$ac_ext <<_ACEOF
19491/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019492#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019493int
19494main ()
19495{
19496setpgrp(0,0);
19497 ;
19498 return 0;
19499}
19500_ACEOF
19501rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019502if { (ac_try="$ac_compile"
19503case "(($ac_try" in
19504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19505 *) ac_try_echo=$ac_try;;
19506esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019507eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19508$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019509 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019511 grep -v '^ *+' conftest.er1 >conftest.err
19512 rm -f conftest.er1
19513 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019514 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019515 (exit $ac_status); } && {
19516 test -z "$ac_c_werror_flag" ||
19517 test ! -s conftest.err
19518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019519
19520cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019521#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019522_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019523
Jack Jansen150753c2003-03-29 22:07:47 +000019524
19525else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019526 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019527sed 's/^/| /' conftest.$ac_ext >&5
19528
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019529
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019530fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019531
19532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019533
19534fi
19535done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019536
Martin v. Löwis11437992002-04-12 09:54:03 +000019537
Thomas Wouters3a584202000-08-05 23:28:51 +000019538for ac_func in gettimeofday
19539do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019540as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19541{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19542$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019543if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019544 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019545else
Martin v. Löwis11437992002-04-12 09:54:03 +000019546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019547/* confdefs.h. */
19548_ACEOF
19549cat confdefs.h >>conftest.$ac_ext
19550cat >>conftest.$ac_ext <<_ACEOF
19551/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019552/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19553 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19554#define $ac_func innocuous_$ac_func
19555
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019556/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019557 which can conflict with char $ac_func (); below.
19558 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019559 <limits.h> exists even on freestanding compilers. */
19560
19561#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019562# include <limits.h>
19563#else
19564# include <assert.h>
19565#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019566
19567#undef $ac_func
19568
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019569/* Override any GCC internal prototype to avoid an error.
19570 Use char because int might match the return type of a GCC
19571 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019572#ifdef __cplusplus
19573extern "C"
19574#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019575char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019576/* The GNU C library defines this for functions which it implements
19577 to always fail with ENOSYS. Some functions are actually named
19578 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019579#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019580choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019581#endif
19582
Skip Montanaro6dead952003-09-25 14:50:04 +000019583int
19584main ()
19585{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019586return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019587 ;
19588 return 0;
19589}
19590_ACEOF
19591rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019592if { (ac_try="$ac_link"
19593case "(($ac_try" in
19594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19595 *) ac_try_echo=$ac_try;;
19596esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019597eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19598$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019599 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019600 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019601 grep -v '^ *+' conftest.er1 >conftest.err
19602 rm -f conftest.er1
19603 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019604 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019605 (exit $ac_status); } && {
19606 test -z "$ac_c_werror_flag" ||
19607 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019608 } && test -s conftest$ac_exeext && {
19609 test "$cross_compiling" = yes ||
19610 $as_test_x conftest$ac_exeext
19611 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019612 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019613else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019614 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019615sed 's/^/| /' conftest.$ac_ext >&5
19616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019617 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019619
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019620rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019621rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019622 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019623fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019624ac_res=`eval 'as_val=${'$as_ac_var'}
19625 $as_echo "$as_val"'`
19626 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19627$as_echo "$ac_res" >&6; }
19628as_val=`eval 'as_val=${'$as_ac_var'}
19629 $as_echo "$as_val"'`
19630 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019631 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019632#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019633_ACEOF
19634 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019635/* confdefs.h. */
19636_ACEOF
19637cat confdefs.h >>conftest.$ac_ext
19638cat >>conftest.$ac_ext <<_ACEOF
19639/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019640#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019641int
19642main ()
19643{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019644gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019645 ;
19646 return 0;
19647}
19648_ACEOF
19649rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019650if { (ac_try="$ac_compile"
19651case "(($ac_try" in
19652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19653 *) ac_try_echo=$ac_try;;
19654esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019655eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19656$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019658 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019659 grep -v '^ *+' conftest.er1 >conftest.err
19660 rm -f conftest.er1
19661 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019662 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019663 (exit $ac_status); } && {
19664 test -z "$ac_c_werror_flag" ||
19665 test ! -s conftest.err
19666 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019667 :
19668else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019669 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019670sed 's/^/| /' conftest.$ac_ext >&5
19671
Martin v. Löwis11437992002-04-12 09:54:03 +000019672
19673cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019674#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019675_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019676
Martin v. Löwis11437992002-04-12 09:54:03 +000019677
Guido van Rossum627b2d71993-12-24 10:39:16 +000019678fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019679
19680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019681
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019682fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019683done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019684
Michael W. Hudson54241132001-12-07 15:38:26 +000019685
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019686{ $as_echo "$as_me:$LINENO: checking for major" >&5
19687$as_echo_n "checking for major... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019688cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019689/* confdefs.h. */
19690_ACEOF
19691cat confdefs.h >>conftest.$ac_ext
19692cat >>conftest.$ac_ext <<_ACEOF
19693/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019694
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019695#if defined(MAJOR_IN_MKDEV)
19696#include <sys/mkdev.h>
19697#elif defined(MAJOR_IN_SYSMACROS)
19698#include <sys/sysmacros.h>
19699#else
19700#include <sys/types.h>
19701#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019702
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019703int
19704main ()
19705{
19706
19707 makedev(major(0),minor(0));
19708
19709 ;
19710 return 0;
19711}
19712_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019713rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019714if { (ac_try="$ac_link"
19715case "(($ac_try" in
19716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19717 *) ac_try_echo=$ac_try;;
19718esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019719eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19720$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019721 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019723 grep -v '^ *+' conftest.er1 >conftest.err
19724 rm -f conftest.er1
19725 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019726 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019727 (exit $ac_status); } && {
19728 test -z "$ac_c_werror_flag" ||
19729 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019730 } && test -s conftest$ac_exeext && {
19731 test "$cross_compiling" = yes ||
19732 $as_test_x conftest$ac_exeext
19733 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019734
19735
19736cat >>confdefs.h <<\_ACEOF
19737#define HAVE_DEVICE_MACROS 1
19738_ACEOF
19739
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019740 { $as_echo "$as_me:$LINENO: result: yes" >&5
19741$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019742
19743else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019744 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019745sed 's/^/| /' conftest.$ac_ext >&5
19746
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019747
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019748 { $as_echo "$as_me:$LINENO: result: no" >&5
19749$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019750
19751fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019752
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019753rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019754rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019755 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019756
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019757# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019758# for [no]getaddrinfo in netdb.h.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019759{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19760$as_echo_n "checking for getaddrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019761cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019762/* confdefs.h. */
19763_ACEOF
19764cat confdefs.h >>conftest.$ac_ext
19765cat >>conftest.$ac_ext <<_ACEOF
19766/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019767
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019768#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019769#include <sys/socket.h>
19770#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019771#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019772
Martin v. Löwis11437992002-04-12 09:54:03 +000019773int
19774main ()
19775{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019776
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019777getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019778
Martin v. Löwis11437992002-04-12 09:54:03 +000019779 ;
19780 return 0;
19781}
19782_ACEOF
19783rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019784if { (ac_try="$ac_link"
19785case "(($ac_try" in
19786 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19787 *) ac_try_echo=$ac_try;;
19788esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019789eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19790$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019791 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019792 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019793 grep -v '^ *+' conftest.er1 >conftest.err
19794 rm -f conftest.er1
19795 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019796 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019797 (exit $ac_status); } && {
19798 test -z "$ac_c_werror_flag" ||
19799 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019800 } && test -s conftest$ac_exeext && {
19801 test "$cross_compiling" = yes ||
19802 $as_test_x conftest$ac_exeext
19803 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019804
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019805{ $as_echo "$as_me:$LINENO: result: yes" >&5
19806$as_echo "yes" >&6; }
19807{ $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19808$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019809if test "$cross_compiling" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019810 { $as_echo "$as_me:$LINENO: result: buggy" >&5
19811$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019812buggygetaddrinfo=yes
19813else
Martin v. Löwis11437992002-04-12 09:54:03 +000019814 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019815/* confdefs.h. */
19816_ACEOF
19817cat confdefs.h >>conftest.$ac_ext
19818cat >>conftest.$ac_ext <<_ACEOF
19819/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019820
19821#include <sys/types.h>
19822#include <netdb.h>
19823#include <string.h>
19824#include <sys/socket.h>
19825#include <netinet/in.h>
19826
19827main()
19828{
19829 int passive, gaierr, inet4 = 0, inet6 = 0;
19830 struct addrinfo hints, *ai, *aitop;
19831 char straddr[INET6_ADDRSTRLEN], strport[16];
19832
19833 for (passive = 0; passive <= 1; passive++) {
19834 memset(&hints, 0, sizeof(hints));
19835 hints.ai_family = AF_UNSPEC;
19836 hints.ai_flags = passive ? AI_PASSIVE : 0;
19837 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019838 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019839 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19840 (void)gai_strerror(gaierr);
19841 goto bad;
19842 }
19843 for (ai = aitop; ai; ai = ai->ai_next) {
19844 if (ai->ai_addr == NULL ||
19845 ai->ai_addrlen == 0 ||
19846 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19847 straddr, sizeof(straddr), strport, sizeof(strport),
19848 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19849 goto bad;
19850 }
19851 switch (ai->ai_family) {
19852 case AF_INET:
19853 if (strcmp(strport, "54321") != 0) {
19854 goto bad;
19855 }
19856 if (passive) {
19857 if (strcmp(straddr, "0.0.0.0") != 0) {
19858 goto bad;
19859 }
19860 } else {
19861 if (strcmp(straddr, "127.0.0.1") != 0) {
19862 goto bad;
19863 }
19864 }
19865 inet4++;
19866 break;
19867 case AF_INET6:
19868 if (strcmp(strport, "54321") != 0) {
19869 goto bad;
19870 }
19871 if (passive) {
19872 if (strcmp(straddr, "::") != 0) {
19873 goto bad;
19874 }
19875 } else {
19876 if (strcmp(straddr, "::1") != 0) {
19877 goto bad;
19878 }
19879 }
19880 inet6++;
19881 break;
19882 case AF_UNSPEC:
19883 goto bad;
19884 break;
19885 default:
19886 /* another family support? */
19887 break;
19888 }
19889 }
19890 }
19891
19892 if (!(inet4 == 0 || inet4 == 2))
19893 goto bad;
19894 if (!(inet6 == 0 || inet6 == 2))
19895 goto bad;
19896
19897 if (aitop)
19898 freeaddrinfo(aitop);
19899 exit(0);
19900
19901 bad:
19902 if (aitop)
19903 freeaddrinfo(aitop);
19904 exit(1);
19905}
19906
Martin v. Löwis11437992002-04-12 09:54:03 +000019907_ACEOF
19908rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019909if { (ac_try="$ac_link"
19910case "(($ac_try" in
19911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19912 *) ac_try_echo=$ac_try;;
19913esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019914eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19915$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019916 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019917 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019918 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019919 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019920 { (case "(($ac_try" in
19921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19922 *) ac_try_echo=$ac_try;;
19923esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019924eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19925$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019926 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019927 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019928 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019929 (exit $ac_status); }; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019930 { $as_echo "$as_me:$LINENO: result: good" >&5
19931$as_echo "good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019932buggygetaddrinfo=no
19933else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019934 $as_echo "$as_me: program exited with status $ac_status" >&5
19935$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019936sed 's/^/| /' conftest.$ac_ext >&5
19937
Martin v. Löwis11437992002-04-12 09:54:03 +000019938( exit $ac_status )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019939{ $as_echo "$as_me:$LINENO: result: buggy" >&5
19940$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019941buggygetaddrinfo=yes
19942fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019943rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019944rm -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 +000019945fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019946
19947
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019948else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019949 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019950sed 's/^/| /' conftest.$ac_ext >&5
19951
Martin v. Löwis11437992002-04-12 09:54:03 +000019952
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019953{ $as_echo "$as_me:$LINENO: result: no" >&5
19954$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019955buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019956
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019957fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019958
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019959rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019960rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019961 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019962
19963if test "$buggygetaddrinfo" = "yes"; then
19964 if test "$ipv6" = "yes"; then
19965 echo 'Fatal: You must get working getaddrinfo() function.'
19966 echo ' or you can specify "--disable-ipv6"'.
19967 exit 1
19968 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019969else
Martin v. Löwis11437992002-04-12 09:54:03 +000019970
19971cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019972#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019973_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019974
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019975fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019976
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019977for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019978do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019979as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19980{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19981$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019982if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000019983 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019984else
Martin v. Löwis11437992002-04-12 09:54:03 +000019985 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019986/* confdefs.h. */
19987_ACEOF
19988cat confdefs.h >>conftest.$ac_ext
19989cat >>conftest.$ac_ext <<_ACEOF
19990/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019991/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19992 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19993#define $ac_func innocuous_$ac_func
19994
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019995/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019996 which can conflict with char $ac_func (); below.
19997 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019998 <limits.h> exists even on freestanding compilers. */
19999
20000#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020001# include <limits.h>
20002#else
20003# include <assert.h>
20004#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020005
20006#undef $ac_func
20007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020008/* Override any GCC internal prototype to avoid an error.
20009 Use char because int might match the return type of a GCC
20010 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020011#ifdef __cplusplus
20012extern "C"
20013#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020014char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020015/* The GNU C library defines this for functions which it implements
20016 to always fail with ENOSYS. Some functions are actually named
20017 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020018#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020019choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020020#endif
20021
Skip Montanaro6dead952003-09-25 14:50:04 +000020022int
20023main ()
20024{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020025return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020026 ;
20027 return 0;
20028}
20029_ACEOF
20030rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020031if { (ac_try="$ac_link"
20032case "(($ac_try" in
20033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20034 *) ac_try_echo=$ac_try;;
20035esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020036eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20037$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020038 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020039 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020040 grep -v '^ *+' conftest.er1 >conftest.err
20041 rm -f conftest.er1
20042 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020043 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020044 (exit $ac_status); } && {
20045 test -z "$ac_c_werror_flag" ||
20046 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020047 } && test -s conftest$ac_exeext && {
20048 test "$cross_compiling" = yes ||
20049 $as_test_x conftest$ac_exeext
20050 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020051 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020052else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020053 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020054sed 's/^/| /' conftest.$ac_ext >&5
20055
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020056 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020057fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020058
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020059rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020060rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020061 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020062fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020063ac_res=`eval 'as_val=${'$as_ac_var'}
20064 $as_echo "$as_val"'`
20065 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20066$as_echo "$ac_res" >&6; }
20067as_val=`eval 'as_val=${'$as_ac_var'}
20068 $as_echo "$as_val"'`
20069 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020070 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020071#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020072_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020073
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020074fi
20075done
20076
Michael W. Hudson54241132001-12-07 15:38:26 +000020077
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020078# checks for structures
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020079{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20080$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 +000020081if test "${ac_cv_header_time+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020082 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020083else
Martin v. Löwis11437992002-04-12 09:54:03 +000020084 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020085/* confdefs.h. */
20086_ACEOF
20087cat confdefs.h >>conftest.$ac_ext
20088cat >>conftest.$ac_ext <<_ACEOF
20089/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020090#include <sys/types.h>
20091#include <sys/time.h>
20092#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020093
Martin v. Löwis11437992002-04-12 09:54:03 +000020094int
20095main ()
20096{
20097if ((struct tm *) 0)
20098return 0;
20099 ;
20100 return 0;
20101}
20102_ACEOF
20103rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020104if { (ac_try="$ac_compile"
20105case "(($ac_try" in
20106 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20107 *) ac_try_echo=$ac_try;;
20108esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020109eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20110$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020111 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020112 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020113 grep -v '^ *+' conftest.er1 >conftest.err
20114 rm -f conftest.er1
20115 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020116 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020117 (exit $ac_status); } && {
20118 test -z "$ac_c_werror_flag" ||
20119 test ! -s conftest.err
20120 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020121 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020122else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020123 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020124sed 's/^/| /' conftest.$ac_ext >&5
20125
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020126 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020127fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020128
20129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020130fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020131{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20132$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020133if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020134
20135cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020136#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020137_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020138
20139fi
20140
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020141{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20142$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 +000020143if test "${ac_cv_struct_tm+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020144 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020145else
Martin v. Löwis11437992002-04-12 09:54:03 +000020146 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020147/* confdefs.h. */
20148_ACEOF
20149cat confdefs.h >>conftest.$ac_ext
20150cat >>conftest.$ac_ext <<_ACEOF
20151/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020152#include <sys/types.h>
20153#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020154
Martin v. Löwis11437992002-04-12 09:54:03 +000020155int
20156main ()
20157{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020158struct tm tm;
20159 int *p = &tm.tm_sec;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020160 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020161 ;
20162 return 0;
20163}
20164_ACEOF
20165rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020166if { (ac_try="$ac_compile"
20167case "(($ac_try" in
20168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20169 *) ac_try_echo=$ac_try;;
20170esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020171eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20172$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020173 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020174 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020175 grep -v '^ *+' conftest.er1 >conftest.err
20176 rm -f conftest.er1
20177 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020178 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020179 (exit $ac_status); } && {
20180 test -z "$ac_c_werror_flag" ||
20181 test ! -s conftest.err
20182 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020183 ac_cv_struct_tm=time.h
20184else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020185 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020186sed 's/^/| /' conftest.$ac_ext >&5
20187
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020188 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020189fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020190
20191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020192fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020193{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20194$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020195if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020196
20197cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020198#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020199_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020200
20201fi
20202
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020203{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20204$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020205if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020206 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020207else
Martin v. Löwis11437992002-04-12 09:54:03 +000020208 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020209/* confdefs.h. */
20210_ACEOF
20211cat confdefs.h >>conftest.$ac_ext
20212cat >>conftest.$ac_ext <<_ACEOF
20213/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020214#include <sys/types.h>
20215#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020216
20217
Martin v. Löwis11437992002-04-12 09:54:03 +000020218int
20219main ()
20220{
20221static struct tm ac_aggr;
20222if (ac_aggr.tm_zone)
20223return 0;
20224 ;
20225 return 0;
20226}
20227_ACEOF
20228rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020229if { (ac_try="$ac_compile"
20230case "(($ac_try" in
20231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20232 *) ac_try_echo=$ac_try;;
20233esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020234eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20235$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020236 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020237 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020238 grep -v '^ *+' conftest.er1 >conftest.err
20239 rm -f conftest.er1
20240 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020241 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020242 (exit $ac_status); } && {
20243 test -z "$ac_c_werror_flag" ||
20244 test ! -s conftest.err
20245 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020246 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020247else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020248 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020249sed 's/^/| /' conftest.$ac_ext >&5
20250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020252/* confdefs.h. */
20253_ACEOF
20254cat confdefs.h >>conftest.$ac_ext
20255cat >>conftest.$ac_ext <<_ACEOF
20256/* end confdefs.h. */
20257#include <sys/types.h>
20258#include <$ac_cv_struct_tm>
20259
20260
20261int
20262main ()
20263{
20264static struct tm ac_aggr;
20265if (sizeof ac_aggr.tm_zone)
20266return 0;
20267 ;
20268 return 0;
20269}
20270_ACEOF
20271rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020272if { (ac_try="$ac_compile"
20273case "(($ac_try" in
20274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20275 *) ac_try_echo=$ac_try;;
20276esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020277eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20278$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020279 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020281 grep -v '^ *+' conftest.er1 >conftest.err
20282 rm -f conftest.er1
20283 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020284 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020285 (exit $ac_status); } && {
20286 test -z "$ac_c_werror_flag" ||
20287 test ! -s conftest.err
20288 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020289 ac_cv_member_struct_tm_tm_zone=yes
20290else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020291 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020292sed 's/^/| /' conftest.$ac_ext >&5
20293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020294 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020295fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020296
20297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020298fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020299
20300rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020301fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020302{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20303$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
20304if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020305
20306cat >>confdefs.h <<_ACEOF
20307#define HAVE_STRUCT_TM_TM_ZONE 1
20308_ACEOF
20309
20310
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020311fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020312
Martin v. Löwis11437992002-04-12 09:54:03 +000020313if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20314
20315cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020316#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020317_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020318
20319else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020320 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20321$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020322if test "${ac_cv_have_decl_tzname+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020323 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020324else
20325 cat >conftest.$ac_ext <<_ACEOF
20326/* confdefs.h. */
20327_ACEOF
20328cat confdefs.h >>conftest.$ac_ext
20329cat >>conftest.$ac_ext <<_ACEOF
20330/* end confdefs.h. */
20331#include <time.h>
20332
20333int
20334main ()
20335{
20336#ifndef tzname
20337 (void) tzname;
20338#endif
20339
20340 ;
20341 return 0;
20342}
20343_ACEOF
20344rm -f conftest.$ac_objext
20345if { (ac_try="$ac_compile"
20346case "(($ac_try" in
20347 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20348 *) ac_try_echo=$ac_try;;
20349esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020350eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20351$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020352 (eval "$ac_compile") 2>conftest.er1
20353 ac_status=$?
20354 grep -v '^ *+' conftest.er1 >conftest.err
20355 rm -f conftest.er1
20356 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020357 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020358 (exit $ac_status); } && {
20359 test -z "$ac_c_werror_flag" ||
20360 test ! -s conftest.err
20361 } && test -s conftest.$ac_objext; then
20362 ac_cv_have_decl_tzname=yes
20363else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020364 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020365sed 's/^/| /' conftest.$ac_ext >&5
20366
20367 ac_cv_have_decl_tzname=no
20368fi
20369
20370rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20371fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020372{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20373$as_echo "$ac_cv_have_decl_tzname" >&6; }
20374if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020375
20376cat >>confdefs.h <<_ACEOF
20377#define HAVE_DECL_TZNAME 1
20378_ACEOF
20379
20380
20381else
20382 cat >>confdefs.h <<_ACEOF
20383#define HAVE_DECL_TZNAME 0
20384_ACEOF
20385
20386
20387fi
20388
20389
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020390 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
20391$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020392if test "${ac_cv_var_tzname+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020393 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020394else
Martin v. Löwis11437992002-04-12 09:54:03 +000020395 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020396/* confdefs.h. */
20397_ACEOF
20398cat confdefs.h >>conftest.$ac_ext
20399cat >>conftest.$ac_ext <<_ACEOF
20400/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020401#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020402#if !HAVE_DECL_TZNAME
20403extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020404#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020405
Martin v. Löwis11437992002-04-12 09:54:03 +000020406int
20407main ()
20408{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020409return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020410 ;
20411 return 0;
20412}
20413_ACEOF
20414rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020415if { (ac_try="$ac_link"
20416case "(($ac_try" in
20417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20418 *) ac_try_echo=$ac_try;;
20419esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020420eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20421$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020422 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020423 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020424 grep -v '^ *+' conftest.er1 >conftest.err
20425 rm -f conftest.er1
20426 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020427 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020428 (exit $ac_status); } && {
20429 test -z "$ac_c_werror_flag" ||
20430 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020431 } && test -s conftest$ac_exeext && {
20432 test "$cross_compiling" = yes ||
20433 $as_test_x conftest$ac_exeext
20434 }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020435 ac_cv_var_tzname=yes
20436else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020437 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020438sed 's/^/| /' conftest.$ac_ext >&5
20439
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020440 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020441fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020442
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020443rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020444rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020445 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020446fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020447{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20448$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020449 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020450
20451cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020452#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020453_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020454
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020455 fi
20456fi
20457
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020458{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20459$as_echo_n "checking for struct stat.st_rdev... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020460if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020461 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020462else
20463 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020464/* confdefs.h. */
20465_ACEOF
20466cat confdefs.h >>conftest.$ac_ext
20467cat >>conftest.$ac_ext <<_ACEOF
20468/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020469$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020470int
20471main ()
20472{
20473static struct stat ac_aggr;
20474if (ac_aggr.st_rdev)
20475return 0;
20476 ;
20477 return 0;
20478}
20479_ACEOF
20480rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020481if { (ac_try="$ac_compile"
20482case "(($ac_try" in
20483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20484 *) ac_try_echo=$ac_try;;
20485esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020486eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20487$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020488 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020490 grep -v '^ *+' conftest.er1 >conftest.err
20491 rm -f conftest.er1
20492 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020493 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020494 (exit $ac_status); } && {
20495 test -z "$ac_c_werror_flag" ||
20496 test ! -s conftest.err
20497 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020498 ac_cv_member_struct_stat_st_rdev=yes
20499else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020500 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020501sed 's/^/| /' conftest.$ac_ext >&5
20502
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020504/* confdefs.h. */
20505_ACEOF
20506cat confdefs.h >>conftest.$ac_ext
20507cat >>conftest.$ac_ext <<_ACEOF
20508/* end confdefs.h. */
20509$ac_includes_default
20510int
20511main ()
20512{
20513static struct stat ac_aggr;
20514if (sizeof ac_aggr.st_rdev)
20515return 0;
20516 ;
20517 return 0;
20518}
20519_ACEOF
20520rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020521if { (ac_try="$ac_compile"
20522case "(($ac_try" in
20523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20524 *) ac_try_echo=$ac_try;;
20525esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020526eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20527$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020528 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020530 grep -v '^ *+' conftest.er1 >conftest.err
20531 rm -f conftest.er1
20532 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020533 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020534 (exit $ac_status); } && {
20535 test -z "$ac_c_werror_flag" ||
20536 test ! -s conftest.err
20537 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020538 ac_cv_member_struct_stat_st_rdev=yes
20539else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020540 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020541sed 's/^/| /' conftest.$ac_ext >&5
20542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020543 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020545
20546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020547fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020548
20549rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020550fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020551{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20552$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; }
20553if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020554
20555cat >>confdefs.h <<_ACEOF
20556#define HAVE_STRUCT_STAT_ST_RDEV 1
20557_ACEOF
20558
20559
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020560fi
20561
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020562{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20563$as_echo_n "checking for struct stat.st_blksize... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020564if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020565 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020566else
Martin v. Löwis11437992002-04-12 09:54:03 +000020567 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020568/* confdefs.h. */
20569_ACEOF
20570cat confdefs.h >>conftest.$ac_ext
20571cat >>conftest.$ac_ext <<_ACEOF
20572/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020573$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020574int
20575main ()
20576{
20577static struct stat ac_aggr;
20578if (ac_aggr.st_blksize)
20579return 0;
20580 ;
20581 return 0;
20582}
20583_ACEOF
20584rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020585if { (ac_try="$ac_compile"
20586case "(($ac_try" in
20587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20588 *) ac_try_echo=$ac_try;;
20589esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020590eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20591$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020592 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020593 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020594 grep -v '^ *+' conftest.er1 >conftest.err
20595 rm -f conftest.er1
20596 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020597 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020598 (exit $ac_status); } && {
20599 test -z "$ac_c_werror_flag" ||
20600 test ! -s conftest.err
20601 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020602 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020603else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020604 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020605sed 's/^/| /' conftest.$ac_ext >&5
20606
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020607 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020608/* confdefs.h. */
20609_ACEOF
20610cat confdefs.h >>conftest.$ac_ext
20611cat >>conftest.$ac_ext <<_ACEOF
20612/* end confdefs.h. */
20613$ac_includes_default
20614int
20615main ()
20616{
20617static struct stat ac_aggr;
20618if (sizeof ac_aggr.st_blksize)
20619return 0;
20620 ;
20621 return 0;
20622}
20623_ACEOF
20624rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020625if { (ac_try="$ac_compile"
20626case "(($ac_try" in
20627 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20628 *) ac_try_echo=$ac_try;;
20629esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020630eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20631$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020632 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020633 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020634 grep -v '^ *+' conftest.er1 >conftest.err
20635 rm -f conftest.er1
20636 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020637 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020638 (exit $ac_status); } && {
20639 test -z "$ac_c_werror_flag" ||
20640 test ! -s conftest.err
20641 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020642 ac_cv_member_struct_stat_st_blksize=yes
20643else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020644 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020645sed 's/^/| /' conftest.$ac_ext >&5
20646
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020647 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020648fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020649
20650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020651fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020652
20653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020654fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020655{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20656$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; }
20657if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020658
Martin v. Löwis11437992002-04-12 09:54:03 +000020659cat >>confdefs.h <<_ACEOF
20660#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20661_ACEOF
20662
20663
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020664fi
20665
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020666{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20667$as_echo_n "checking for struct stat.st_flags... " >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020668if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020669 $as_echo_n "(cached) " >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020670else
20671 cat >conftest.$ac_ext <<_ACEOF
20672/* confdefs.h. */
20673_ACEOF
20674cat confdefs.h >>conftest.$ac_ext
20675cat >>conftest.$ac_ext <<_ACEOF
20676/* end confdefs.h. */
20677$ac_includes_default
20678int
20679main ()
20680{
20681static struct stat ac_aggr;
20682if (ac_aggr.st_flags)
20683return 0;
20684 ;
20685 return 0;
20686}
20687_ACEOF
20688rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020689if { (ac_try="$ac_compile"
20690case "(($ac_try" in
20691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20692 *) ac_try_echo=$ac_try;;
20693esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020694eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20695$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020696 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020697 ac_status=$?
20698 grep -v '^ *+' conftest.er1 >conftest.err
20699 rm -f conftest.er1
20700 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020701 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020702 (exit $ac_status); } && {
20703 test -z "$ac_c_werror_flag" ||
20704 test ! -s conftest.err
20705 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020706 ac_cv_member_struct_stat_st_flags=yes
20707else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020708 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020709sed 's/^/| /' conftest.$ac_ext >&5
20710
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020711 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020712/* confdefs.h. */
20713_ACEOF
20714cat confdefs.h >>conftest.$ac_ext
20715cat >>conftest.$ac_ext <<_ACEOF
20716/* end confdefs.h. */
20717$ac_includes_default
20718int
20719main ()
20720{
20721static struct stat ac_aggr;
20722if (sizeof ac_aggr.st_flags)
20723return 0;
20724 ;
20725 return 0;
20726}
20727_ACEOF
20728rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020729if { (ac_try="$ac_compile"
20730case "(($ac_try" in
20731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20732 *) ac_try_echo=$ac_try;;
20733esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020734eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20735$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020736 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020737 ac_status=$?
20738 grep -v '^ *+' conftest.er1 >conftest.err
20739 rm -f conftest.er1
20740 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020741 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020742 (exit $ac_status); } && {
20743 test -z "$ac_c_werror_flag" ||
20744 test ! -s conftest.err
20745 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020746 ac_cv_member_struct_stat_st_flags=yes
20747else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020748 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020749sed 's/^/| /' conftest.$ac_ext >&5
20750
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020751 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020752fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020753
20754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020755fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020756
20757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020758fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020759{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20760$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; }
20761if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020762
20763cat >>confdefs.h <<_ACEOF
20764#define HAVE_STRUCT_STAT_ST_FLAGS 1
20765_ACEOF
20766
20767
20768fi
20769
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020770{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20771$as_echo_n "checking for struct stat.st_gen... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020772if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020773 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020774else
20775 cat >conftest.$ac_ext <<_ACEOF
20776/* confdefs.h. */
20777_ACEOF
20778cat confdefs.h >>conftest.$ac_ext
20779cat >>conftest.$ac_ext <<_ACEOF
20780/* end confdefs.h. */
20781$ac_includes_default
20782int
20783main ()
20784{
20785static struct stat ac_aggr;
20786if (ac_aggr.st_gen)
20787return 0;
20788 ;
20789 return 0;
20790}
20791_ACEOF
20792rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020793if { (ac_try="$ac_compile"
20794case "(($ac_try" in
20795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20796 *) ac_try_echo=$ac_try;;
20797esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020798eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20799$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020801 ac_status=$?
20802 grep -v '^ *+' conftest.er1 >conftest.err
20803 rm -f conftest.er1
20804 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020805 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020806 (exit $ac_status); } && {
20807 test -z "$ac_c_werror_flag" ||
20808 test ! -s conftest.err
20809 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020810 ac_cv_member_struct_stat_st_gen=yes
20811else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020812 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020813sed 's/^/| /' conftest.$ac_ext >&5
20814
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020815 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020816/* confdefs.h. */
20817_ACEOF
20818cat confdefs.h >>conftest.$ac_ext
20819cat >>conftest.$ac_ext <<_ACEOF
20820/* end confdefs.h. */
20821$ac_includes_default
20822int
20823main ()
20824{
20825static struct stat ac_aggr;
20826if (sizeof ac_aggr.st_gen)
20827return 0;
20828 ;
20829 return 0;
20830}
20831_ACEOF
20832rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020833if { (ac_try="$ac_compile"
20834case "(($ac_try" in
20835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20836 *) ac_try_echo=$ac_try;;
20837esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020838eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20839$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020840 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020841 ac_status=$?
20842 grep -v '^ *+' conftest.er1 >conftest.err
20843 rm -f conftest.er1
20844 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020845 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020846 (exit $ac_status); } && {
20847 test -z "$ac_c_werror_flag" ||
20848 test ! -s conftest.err
20849 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020850 ac_cv_member_struct_stat_st_gen=yes
20851else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020852 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020853sed 's/^/| /' conftest.$ac_ext >&5
20854
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020855 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020856fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020857
20858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020859fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020860
20861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020862fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020863{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20864$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; }
20865if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020866
20867cat >>confdefs.h <<_ACEOF
20868#define HAVE_STRUCT_STAT_ST_GEN 1
20869_ACEOF
20870
20871
20872fi
20873
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020874{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20875$as_echo_n "checking for struct stat.st_birthtime... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020876if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020877 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020878else
20879 cat >conftest.$ac_ext <<_ACEOF
20880/* confdefs.h. */
20881_ACEOF
20882cat confdefs.h >>conftest.$ac_ext
20883cat >>conftest.$ac_ext <<_ACEOF
20884/* end confdefs.h. */
20885$ac_includes_default
20886int
20887main ()
20888{
20889static struct stat ac_aggr;
20890if (ac_aggr.st_birthtime)
20891return 0;
20892 ;
20893 return 0;
20894}
20895_ACEOF
20896rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020897if { (ac_try="$ac_compile"
20898case "(($ac_try" in
20899 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20900 *) ac_try_echo=$ac_try;;
20901esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020902eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20903$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020904 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020905 ac_status=$?
20906 grep -v '^ *+' conftest.er1 >conftest.err
20907 rm -f conftest.er1
20908 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020909 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020910 (exit $ac_status); } && {
20911 test -z "$ac_c_werror_flag" ||
20912 test ! -s conftest.err
20913 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020914 ac_cv_member_struct_stat_st_birthtime=yes
20915else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020916 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020917sed 's/^/| /' conftest.$ac_ext >&5
20918
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020919 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020920/* confdefs.h. */
20921_ACEOF
20922cat confdefs.h >>conftest.$ac_ext
20923cat >>conftest.$ac_ext <<_ACEOF
20924/* end confdefs.h. */
20925$ac_includes_default
20926int
20927main ()
20928{
20929static struct stat ac_aggr;
20930if (sizeof ac_aggr.st_birthtime)
20931return 0;
20932 ;
20933 return 0;
20934}
20935_ACEOF
20936rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020937if { (ac_try="$ac_compile"
20938case "(($ac_try" in
20939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20940 *) ac_try_echo=$ac_try;;
20941esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020942eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20943$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020944 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020945 ac_status=$?
20946 grep -v '^ *+' conftest.er1 >conftest.err
20947 rm -f conftest.er1
20948 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020949 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020950 (exit $ac_status); } && {
20951 test -z "$ac_c_werror_flag" ||
20952 test ! -s conftest.err
20953 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020954 ac_cv_member_struct_stat_st_birthtime=yes
20955else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020956 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020957sed 's/^/| /' conftest.$ac_ext >&5
20958
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020959 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020960fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020961
20962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020963fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020964
20965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020966fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020967{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20968$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; }
20969if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020970
20971cat >>confdefs.h <<_ACEOF
20972#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20973_ACEOF
20974
20975
20976fi
20977
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020978{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20979$as_echo_n "checking for struct stat.st_blocks... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020980if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000020981 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020982else
Martin v. Löwis11437992002-04-12 09:54:03 +000020983 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020984/* confdefs.h. */
20985_ACEOF
20986cat confdefs.h >>conftest.$ac_ext
20987cat >>conftest.$ac_ext <<_ACEOF
20988/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020989$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020990int
20991main ()
20992{
20993static struct stat ac_aggr;
20994if (ac_aggr.st_blocks)
20995return 0;
20996 ;
20997 return 0;
20998}
20999_ACEOF
21000rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021001if { (ac_try="$ac_compile"
21002case "(($ac_try" in
21003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21004 *) ac_try_echo=$ac_try;;
21005esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021006eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21007$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021008 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021009 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021010 grep -v '^ *+' conftest.er1 >conftest.err
21011 rm -f conftest.er1
21012 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021013 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021014 (exit $ac_status); } && {
21015 test -z "$ac_c_werror_flag" ||
21016 test ! -s conftest.err
21017 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021018 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021019else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021020 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021021sed 's/^/| /' conftest.$ac_ext >&5
21022
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021023 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021024/* confdefs.h. */
21025_ACEOF
21026cat confdefs.h >>conftest.$ac_ext
21027cat >>conftest.$ac_ext <<_ACEOF
21028/* end confdefs.h. */
21029$ac_includes_default
21030int
21031main ()
21032{
21033static struct stat ac_aggr;
21034if (sizeof ac_aggr.st_blocks)
21035return 0;
21036 ;
21037 return 0;
21038}
21039_ACEOF
21040rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021041if { (ac_try="$ac_compile"
21042case "(($ac_try" in
21043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21044 *) ac_try_echo=$ac_try;;
21045esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021046eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21047$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021048 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021049 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021050 grep -v '^ *+' conftest.er1 >conftest.err
21051 rm -f conftest.er1
21052 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021053 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021054 (exit $ac_status); } && {
21055 test -z "$ac_c_werror_flag" ||
21056 test ! -s conftest.err
21057 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021058 ac_cv_member_struct_stat_st_blocks=yes
21059else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021060 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021061sed 's/^/| /' conftest.$ac_ext >&5
21062
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021063 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021064fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021065
21066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021067fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021068
21069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021070fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021071{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21072$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; }
21073if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021074
Martin v. Löwis11437992002-04-12 09:54:03 +000021075cat >>confdefs.h <<_ACEOF
21076#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21077_ACEOF
21078
21079
21080cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021081#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021082_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021083
21084else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021085 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021086 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021087 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21088 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021089esac
21090
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021091fi
21092
Michael W. Hudson54241132001-12-07 15:38:26 +000021093
Martin v. Löwis11437992002-04-12 09:54:03 +000021094
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021095{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21096$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021097if test "${ac_cv_header_time_altzone+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021098 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021099else
Martin v. Löwis11437992002-04-12 09:54:03 +000021100 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021101/* confdefs.h. */
21102_ACEOF
21103cat confdefs.h >>conftest.$ac_ext
21104cat >>conftest.$ac_ext <<_ACEOF
21105/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021106#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021107int
21108main ()
21109{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021110return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021111 ;
21112 return 0;
21113}
21114_ACEOF
21115rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021116if { (ac_try="$ac_compile"
21117case "(($ac_try" in
21118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21119 *) ac_try_echo=$ac_try;;
21120esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021121eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21122$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021123 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021124 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021125 grep -v '^ *+' conftest.er1 >conftest.err
21126 rm -f conftest.er1
21127 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021128 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021129 (exit $ac_status); } && {
21130 test -z "$ac_c_werror_flag" ||
21131 test ! -s conftest.err
21132 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021133 ac_cv_header_time_altzone=yes
21134else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021135 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021136sed 's/^/| /' conftest.$ac_ext >&5
21137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021138 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021139fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21142fi
21143
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021144{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21145$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021146if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021147
21148cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021149#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021150_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021151
21152fi
21153
Guido van Rossumda88dad1995-01-26 00:46:29 +000021154was_it_defined=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021155{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21156$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 +000021157cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021158/* confdefs.h. */
21159_ACEOF
21160cat confdefs.h >>conftest.$ac_ext
21161cat >>conftest.$ac_ext <<_ACEOF
21162/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021163
21164#include <sys/types.h>
21165#include <sys/select.h>
21166#include <sys/time.h>
21167
Martin v. Löwis11437992002-04-12 09:54:03 +000021168int
21169main ()
21170{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021171;
Martin v. Löwis11437992002-04-12 09:54:03 +000021172 ;
21173 return 0;
21174}
21175_ACEOF
21176rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021177if { (ac_try="$ac_compile"
21178case "(($ac_try" in
21179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21180 *) ac_try_echo=$ac_try;;
21181esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021182eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21183$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021186 grep -v '^ *+' conftest.er1 >conftest.err
21187 rm -f conftest.er1
21188 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021189 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021190 (exit $ac_status); } && {
21191 test -z "$ac_c_werror_flag" ||
21192 test ! -s conftest.err
21193 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021194
21195
21196cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021197#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021198_ACEOF
21199
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021200 was_it_defined=yes
21201
Guido van Rossumf78abae1997-01-21 22:02:36 +000021202else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021203 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021204sed 's/^/| /' conftest.$ac_ext >&5
21205
Thomas Wouters477c8d52006-05-27 19:21:47 +000021206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021207fi
21208
21209rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021210{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
21211$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021212
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021213{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5
21214$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021215if test "${ac_cv_struct_addrinfo+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021216 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021217else
Martin v. Löwis11437992002-04-12 09:54:03 +000021218 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021219/* confdefs.h. */
21220_ACEOF
21221cat confdefs.h >>conftest.$ac_ext
21222cat >>conftest.$ac_ext <<_ACEOF
21223/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021224
21225# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021226int
21227main ()
21228{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021229struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021230 ;
21231 return 0;
21232}
21233_ACEOF
21234rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021235if { (ac_try="$ac_compile"
21236case "(($ac_try" in
21237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21238 *) ac_try_echo=$ac_try;;
21239esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021240eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21241$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021242 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021244 grep -v '^ *+' conftest.er1 >conftest.err
21245 rm -f conftest.er1
21246 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021247 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021248 (exit $ac_status); } && {
21249 test -z "$ac_c_werror_flag" ||
21250 test ! -s conftest.err
21251 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021252 ac_cv_struct_addrinfo=yes
21253else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021254 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021255sed 's/^/| /' conftest.$ac_ext >&5
21256
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021257 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021258fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021259
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21261fi
21262
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021263{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21264$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021265if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021266
21267cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021268#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021269_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021270
21271fi
21272
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021273{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21274$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021275if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021276 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021277else
Martin v. Löwis11437992002-04-12 09:54:03 +000021278 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021279/* confdefs.h. */
21280_ACEOF
21281cat confdefs.h >>conftest.$ac_ext
21282cat >>conftest.$ac_ext <<_ACEOF
21283/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021284
21285# include <sys/types.h>
21286# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021287int
21288main ()
21289{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021290struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021291 ;
21292 return 0;
21293}
21294_ACEOF
21295rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021296if { (ac_try="$ac_compile"
21297case "(($ac_try" in
21298 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21299 *) ac_try_echo=$ac_try;;
21300esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021301eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21302$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021303 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021304 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021305 grep -v '^ *+' conftest.er1 >conftest.err
21306 rm -f conftest.er1
21307 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021308 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021309 (exit $ac_status); } && {
21310 test -z "$ac_c_werror_flag" ||
21311 test ! -s conftest.err
21312 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021313 ac_cv_struct_sockaddr_storage=yes
21314else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021315 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021316sed 's/^/| /' conftest.$ac_ext >&5
21317
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021318 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021319fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021320
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21322fi
21323
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021324{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21325$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021326if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021327
21328cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021329#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021330_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021331
21332fi
21333
Guido van Rossum627b2d71993-12-24 10:39:16 +000021334# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021335
Michael W. Hudson54241132001-12-07 15:38:26 +000021336
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021337{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21338$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021339if test "${ac_cv_c_char_unsigned+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021340 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021341else
Martin v. Löwis11437992002-04-12 09:54:03 +000021342 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021343/* confdefs.h. */
21344_ACEOF
21345cat confdefs.h >>conftest.$ac_ext
21346cat >>conftest.$ac_ext <<_ACEOF
21347/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021348$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021349int
21350main ()
21351{
21352static int test_array [1 - 2 * !(((char) -1) < 0)];
21353test_array [0] = 0
21354
21355 ;
21356 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021357}
Martin v. Löwis11437992002-04-12 09:54:03 +000021358_ACEOF
21359rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021360if { (ac_try="$ac_compile"
21361case "(($ac_try" in
21362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21363 *) ac_try_echo=$ac_try;;
21364esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021365eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21366$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021367 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021368 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021369 grep -v '^ *+' conftest.er1 >conftest.err
21370 rm -f conftest.er1
21371 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021372 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021373 (exit $ac_status); } && {
21374 test -z "$ac_c_werror_flag" ||
21375 test ! -s conftest.err
21376 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021377 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021378else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021379 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021380sed 's/^/| /' conftest.$ac_ext >&5
21381
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021382 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021383fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021384
21385rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021386fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021387{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21388$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021389if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021390 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021391#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021392_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021393
21394fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021395
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021396{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21397$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021398if test "${ac_cv_c_const+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021399 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021400else
21401 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021402/* confdefs.h. */
21403_ACEOF
21404cat confdefs.h >>conftest.$ac_ext
21405cat >>conftest.$ac_ext <<_ACEOF
21406/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021407
Martin v. Löwis11437992002-04-12 09:54:03 +000021408int
21409main ()
21410{
21411/* FIXME: Include the comments suggested by Paul. */
21412#ifndef __cplusplus
21413 /* Ultrix mips cc rejects this. */
21414 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021415 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021416 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021417 char const *const *pcpcc;
21418 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021419 /* NEC SVR4.0.2 mips cc rejects this. */
21420 struct point {int x, y;};
21421 static struct point const zero = {0,0};
21422 /* AIX XL C 1.02.0.0 rejects this.
21423 It does not let you subtract one const X* pointer from another in
21424 an arm of an if-expression whose if-part is not a constant
21425 expression */
21426 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021427 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021428 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021429 ++pcpcc;
21430 ppc = (char**) pcpcc;
21431 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021432 { /* SCO 3.2v4 cc rejects this. */
21433 char *t;
21434 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021435
Martin v. Löwis11437992002-04-12 09:54:03 +000021436 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021437 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021438 }
21439 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21440 int x[] = {25, 17};
21441 const int *foo = &x[0];
21442 ++foo;
21443 }
21444 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21445 typedef const int *iptr;
21446 iptr p = 0;
21447 ++p;
21448 }
21449 { /* AIX XL C 1.02.0.0 rejects this saying
21450 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21451 struct s { int j; const int *ap[3]; };
21452 struct s *b; b->j = 5;
21453 }
21454 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21455 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021456 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021457 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021458 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021459#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021460
Martin v. Löwis11437992002-04-12 09:54:03 +000021461 ;
21462 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021463}
Martin v. Löwis11437992002-04-12 09:54:03 +000021464_ACEOF
21465rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021466if { (ac_try="$ac_compile"
21467case "(($ac_try" in
21468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21469 *) ac_try_echo=$ac_try;;
21470esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021471eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21472$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021473 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021475 grep -v '^ *+' conftest.er1 >conftest.err
21476 rm -f conftest.er1
21477 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021478 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021479 (exit $ac_status); } && {
21480 test -z "$ac_c_werror_flag" ||
21481 test ! -s conftest.err
21482 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021483 ac_cv_c_const=yes
21484else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021485 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021486sed 's/^/| /' conftest.$ac_ext >&5
21487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021488 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021489fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021490
21491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021492fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021493{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21494$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021495if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021496
21497cat >>confdefs.h <<\_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021498#define const /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021499_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021500
21501fi
21502
Michael W. Hudson54241132001-12-07 15:38:26 +000021503
Guido van Rossumda88dad1995-01-26 00:46:29 +000021504works=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021505{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
21506$as_echo_n "checking for working volatile... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021508/* confdefs.h. */
21509_ACEOF
21510cat confdefs.h >>conftest.$ac_ext
21511cat >>conftest.$ac_ext <<_ACEOF
21512/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021513
Martin v. Löwis11437992002-04-12 09:54:03 +000021514int
21515main ()
21516{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021517volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021518 ;
21519 return 0;
21520}
21521_ACEOF
21522rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021523if { (ac_try="$ac_compile"
21524case "(($ac_try" in
21525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21526 *) ac_try_echo=$ac_try;;
21527esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021528eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21529$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021530 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021531 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021532 grep -v '^ *+' conftest.er1 >conftest.err
21533 rm -f conftest.er1
21534 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021535 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021536 (exit $ac_status); } && {
21537 test -z "$ac_c_werror_flag" ||
21538 test ! -s conftest.err
21539 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021540 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021541else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021542 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021543sed 's/^/| /' conftest.$ac_ext >&5
21544
Martin v. Löwis11437992002-04-12 09:54:03 +000021545
21546cat >>confdefs.h <<\_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021547#define volatile /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021548_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021549
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021550
Guido van Rossum627b2d71993-12-24 10:39:16 +000021551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021552
21553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021554{ $as_echo "$as_me:$LINENO: result: $works" >&5
21555$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021556
Guido van Rossumda88dad1995-01-26 00:46:29 +000021557works=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021558{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5
21559$as_echo_n "checking for working signed char... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021560cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021561/* confdefs.h. */
21562_ACEOF
21563cat confdefs.h >>conftest.$ac_ext
21564cat >>conftest.$ac_ext <<_ACEOF
21565/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021566
Martin v. Löwis11437992002-04-12 09:54:03 +000021567int
21568main ()
21569{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021570signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021571 ;
21572 return 0;
21573}
21574_ACEOF
21575rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021576if { (ac_try="$ac_compile"
21577case "(($ac_try" in
21578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21579 *) ac_try_echo=$ac_try;;
21580esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021581eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21582$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021583 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021584 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021585 grep -v '^ *+' conftest.er1 >conftest.err
21586 rm -f conftest.er1
21587 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021588 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021589 (exit $ac_status); } && {
21590 test -z "$ac_c_werror_flag" ||
21591 test ! -s conftest.err
21592 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021593 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021594else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021595 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021596sed 's/^/| /' conftest.$ac_ext >&5
21597
Martin v. Löwis11437992002-04-12 09:54:03 +000021598
21599cat >>confdefs.h <<\_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021600#define signed /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021601_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021602
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021603
Guido van Rossum7f43da71994-08-01 12:15:30 +000021604fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021605
21606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021607{ $as_echo "$as_me:$LINENO: result: $works" >&5
21608$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021609
Guido van Rossumda88dad1995-01-26 00:46:29 +000021610have_prototypes=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021611{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5
21612$as_echo_n "checking for prototypes... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021613cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021614/* confdefs.h. */
21615_ACEOF
21616cat confdefs.h >>conftest.$ac_ext
21617cat >>conftest.$ac_ext <<_ACEOF
21618/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021619int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021620int
21621main ()
21622{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021623return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021624 ;
21625 return 0;
21626}
21627_ACEOF
21628rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021629if { (ac_try="$ac_compile"
21630case "(($ac_try" in
21631 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21632 *) ac_try_echo=$ac_try;;
21633esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021634eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21635$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021636 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021637 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021638 grep -v '^ *+' conftest.er1 >conftest.err
21639 rm -f conftest.er1
21640 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021641 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021642 (exit $ac_status); } && {
21643 test -z "$ac_c_werror_flag" ||
21644 test ! -s conftest.err
21645 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021646
21647
21648cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021649#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021650_ACEOF
21651
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021652 have_prototypes=yes
21653
Guido van Rossumf78abae1997-01-21 22:02:36 +000021654else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021655 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021656sed 's/^/| /' conftest.$ac_ext >&5
21657
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021658
Guido van Rossum7f43da71994-08-01 12:15:30 +000021659fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021660
21661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021662{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5
21663$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021664
Guido van Rossumda88dad1995-01-26 00:46:29 +000021665works=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021666{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21667$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021668cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021669/* confdefs.h. */
21670_ACEOF
21671cat confdefs.h >>conftest.$ac_ext
21672cat >>conftest.$ac_ext <<_ACEOF
21673/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021674
21675#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021676int foo(int x, ...) {
21677 va_list va;
21678 va_start(va, x);
21679 va_arg(va, int);
21680 va_arg(va, char *);
21681 va_arg(va, double);
21682 return 0;
21683}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021684
Martin v. Löwis11437992002-04-12 09:54:03 +000021685int
21686main ()
21687{
Guido van Rossum90eea071996-08-30 20:58:57 +000021688return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021689 ;
21690 return 0;
21691}
21692_ACEOF
21693rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021694if { (ac_try="$ac_compile"
21695case "(($ac_try" in
21696 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21697 *) ac_try_echo=$ac_try;;
21698esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021699eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21700$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021701 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021702 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021703 grep -v '^ *+' conftest.er1 >conftest.err
21704 rm -f conftest.er1
21705 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021706 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021707 (exit $ac_status); } && {
21708 test -z "$ac_c_werror_flag" ||
21709 test ! -s conftest.err
21710 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021711
21712
21713cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021714#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021715_ACEOF
21716
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021717 works=yes
21718
Guido van Rossumf78abae1997-01-21 22:02:36 +000021719else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021720 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021721sed 's/^/| /' conftest.$ac_ext >&5
21722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021723
Guido van Rossum627b2d71993-12-24 10:39:16 +000021724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021725
21726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021727{ $as_echo "$as_me:$LINENO: result: $works" >&5
21728$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021729
Martin v. Löwisd6320502004-08-12 13:45:08 +000021730# check for socketpair
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021731{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5
21732$as_echo_n "checking for socketpair... " >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021733cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021734/* confdefs.h. */
21735_ACEOF
21736cat confdefs.h >>conftest.$ac_ext
21737cat >>conftest.$ac_ext <<_ACEOF
21738/* end confdefs.h. */
21739
21740#include <sys/types.h>
21741#include <sys/socket.h>
21742
21743int
21744main ()
21745{
21746void *x=socketpair
21747 ;
21748 return 0;
21749}
21750_ACEOF
21751rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021752if { (ac_try="$ac_compile"
21753case "(($ac_try" in
21754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21755 *) ac_try_echo=$ac_try;;
21756esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021757eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21758$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021759 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021760 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021761 grep -v '^ *+' conftest.er1 >conftest.err
21762 rm -f conftest.er1
21763 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021764 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021765 (exit $ac_status); } && {
21766 test -z "$ac_c_werror_flag" ||
21767 test ! -s conftest.err
21768 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021769
21770cat >>confdefs.h <<\_ACEOF
21771#define HAVE_SOCKETPAIR 1
21772_ACEOF
21773
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021774 { $as_echo "$as_me:$LINENO: result: yes" >&5
21775$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021776else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021777 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021778sed 's/^/| /' conftest.$ac_ext >&5
21779
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021780 { $as_echo "$as_me:$LINENO: result: no" >&5
21781$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021782
21783fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021784
21785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021786
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021787# check if sockaddr has sa_len member
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021788{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21789$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021790cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021791/* confdefs.h. */
21792_ACEOF
21793cat confdefs.h >>conftest.$ac_ext
21794cat >>conftest.$ac_ext <<_ACEOF
21795/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021796#include <sys/types.h>
21797#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021798int
21799main ()
21800{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021801struct sockaddr x;
21802x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021803 ;
21804 return 0;
21805}
21806_ACEOF
21807rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021808if { (ac_try="$ac_compile"
21809case "(($ac_try" in
21810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21811 *) ac_try_echo=$ac_try;;
21812esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021813eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21814$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021815 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021816 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021817 grep -v '^ *+' conftest.er1 >conftest.err
21818 rm -f conftest.er1
21819 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021820 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021821 (exit $ac_status); } && {
21822 test -z "$ac_c_werror_flag" ||
21823 test ! -s conftest.err
21824 } && test -s conftest.$ac_objext; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021825 { $as_echo "$as_me:$LINENO: result: yes" >&5
21826$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021827
21828cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021829#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021830_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021831
21832else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021833 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021834sed 's/^/| /' conftest.$ac_ext >&5
21835
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021836 { $as_echo "$as_me:$LINENO: result: no" >&5
21837$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021839
21840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021841
Guido van Rossumda88dad1995-01-26 00:46:29 +000021842va_list_is_array=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021843{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21844$as_echo_n "checking whether va_list is an array... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021845cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021846/* confdefs.h. */
21847_ACEOF
21848cat confdefs.h >>conftest.$ac_ext
21849cat >>conftest.$ac_ext <<_ACEOF
21850/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021851
21852#ifdef HAVE_STDARG_PROTOTYPES
21853#include <stdarg.h>
21854#else
21855#include <varargs.h>
21856#endif
21857
Martin v. Löwis11437992002-04-12 09:54:03 +000021858int
21859main ()
21860{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021861va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021862 ;
21863 return 0;
21864}
21865_ACEOF
21866rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021867if { (ac_try="$ac_compile"
21868case "(($ac_try" in
21869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21870 *) ac_try_echo=$ac_try;;
21871esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021872eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21873$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021874 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021875 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021876 grep -v '^ *+' conftest.er1 >conftest.err
21877 rm -f conftest.er1
21878 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021879 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021880 (exit $ac_status); } && {
21881 test -z "$ac_c_werror_flag" ||
21882 test ! -s conftest.err
21883 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021884 :
21885else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021886 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021887sed 's/^/| /' conftest.$ac_ext >&5
21888
Martin v. Löwis11437992002-04-12 09:54:03 +000021889
21890
21891cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021892#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021893_ACEOF
21894
Guido van Rossumda88dad1995-01-26 00:46:29 +000021895 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021896
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021897fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021898
21899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021900{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21901$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021902
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021903# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021904
21905
21906
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021907{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21908$as_echo_n "checking for gethostbyname_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021909if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021910 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021911else
Martin v. Löwis11437992002-04-12 09:54:03 +000021912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021913/* confdefs.h. */
21914_ACEOF
21915cat confdefs.h >>conftest.$ac_ext
21916cat >>conftest.$ac_ext <<_ACEOF
21917/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021918/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21919 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21920#define gethostbyname_r innocuous_gethostbyname_r
21921
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021922/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021923 which can conflict with char gethostbyname_r (); below.
21924 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021925 <limits.h> exists even on freestanding compilers. */
21926
21927#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021928# include <limits.h>
21929#else
21930# include <assert.h>
21931#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021932
21933#undef gethostbyname_r
21934
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021935/* Override any GCC internal prototype to avoid an error.
21936 Use char because int might match the return type of a GCC
21937 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021938#ifdef __cplusplus
21939extern "C"
21940#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021941char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021942/* The GNU C library defines this for functions which it implements
21943 to always fail with ENOSYS. Some functions are actually named
21944 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021945#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021946choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021947#endif
21948
Skip Montanaro6dead952003-09-25 14:50:04 +000021949int
21950main ()
21951{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021952return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021953 ;
21954 return 0;
21955}
21956_ACEOF
21957rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021958if { (ac_try="$ac_link"
21959case "(($ac_try" in
21960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21961 *) ac_try_echo=$ac_try;;
21962esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021963eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21964$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021965 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021967 grep -v '^ *+' conftest.er1 >conftest.err
21968 rm -f conftest.er1
21969 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021970 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021971 (exit $ac_status); } && {
21972 test -z "$ac_c_werror_flag" ||
21973 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021974 } && test -s conftest$ac_exeext && {
21975 test "$cross_compiling" = yes ||
21976 $as_test_x conftest$ac_exeext
21977 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021978 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021979else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021980 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021981sed 's/^/| /' conftest.$ac_ext >&5
21982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021983 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021985
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021986rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021987rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021988 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021989fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021990{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21991$as_echo "$ac_cv_func_gethostbyname_r" >&6; }
21992if test "x$ac_cv_func_gethostbyname_r" = x""yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021993
Martin v. Löwis11437992002-04-12 09:54:03 +000021994 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021995#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021996_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021997
Benjamin Peterson82af01d2010-05-02 16:45:41 +000021998 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21999$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022000 OLD_CFLAGS=$CFLAGS
22001 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022002 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022003/* confdefs.h. */
22004_ACEOF
22005cat confdefs.h >>conftest.$ac_ext
22006cat >>conftest.$ac_ext <<_ACEOF
22007/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022008
22009# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022010
Martin v. Löwis11437992002-04-12 09:54:03 +000022011int
22012main ()
22013{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022014
22015 char *name;
22016 struct hostent *he, *res;
22017 char buffer[2048];
22018 int buflen = 2048;
22019 int h_errnop;
22020
22021 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022022
22023 ;
22024 return 0;
22025}
22026_ACEOF
22027rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022028if { (ac_try="$ac_compile"
22029case "(($ac_try" in
22030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22031 *) ac_try_echo=$ac_try;;
22032esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022033eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22034$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022035 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022036 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022037 grep -v '^ *+' conftest.er1 >conftest.err
22038 rm -f conftest.er1
22039 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022040 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022041 (exit $ac_status); } && {
22042 test -z "$ac_c_werror_flag" ||
22043 test ! -s conftest.err
22044 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022045
22046 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022047#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022048_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022049
Martin v. Löwis11437992002-04-12 09:54:03 +000022050
22051cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022052#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022053_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022054
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022055 { $as_echo "$as_me:$LINENO: result: yes" >&5
22056$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022057
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022058else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022059 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022060sed 's/^/| /' conftest.$ac_ext >&5
22061
Martin v. Löwis11437992002-04-12 09:54:03 +000022062
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022063 { $as_echo "$as_me:$LINENO: result: no" >&5
22064$as_echo "no" >&6; }
22065 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22066$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022067 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022068/* confdefs.h. */
22069_ACEOF
22070cat confdefs.h >>conftest.$ac_ext
22071cat >>conftest.$ac_ext <<_ACEOF
22072/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022073
22074# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022075
Martin v. Löwis11437992002-04-12 09:54:03 +000022076int
22077main ()
22078{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022079
22080 char *name;
22081 struct hostent *he;
22082 char buffer[2048];
22083 int buflen = 2048;
22084 int h_errnop;
22085
22086 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022087
22088 ;
22089 return 0;
22090}
22091_ACEOF
22092rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022093if { (ac_try="$ac_compile"
22094case "(($ac_try" in
22095 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22096 *) ac_try_echo=$ac_try;;
22097esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022098eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22099$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022100 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022101 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022102 grep -v '^ *+' conftest.er1 >conftest.err
22103 rm -f conftest.er1
22104 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022105 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022106 (exit $ac_status); } && {
22107 test -z "$ac_c_werror_flag" ||
22108 test ! -s conftest.err
22109 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022110
22111 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022112#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022113_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022114
Martin v. Löwis11437992002-04-12 09:54:03 +000022115
22116cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022117#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022118_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022119
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022120 { $as_echo "$as_me:$LINENO: result: yes" >&5
22121$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022122
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022123else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022124 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022125sed 's/^/| /' conftest.$ac_ext >&5
22126
Martin v. Löwis11437992002-04-12 09:54:03 +000022127
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022128 { $as_echo "$as_me:$LINENO: result: no" >&5
22129$as_echo "no" >&6; }
22130 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22131$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022132 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022133/* confdefs.h. */
22134_ACEOF
22135cat confdefs.h >>conftest.$ac_ext
22136cat >>conftest.$ac_ext <<_ACEOF
22137/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022138
22139# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022140
Martin v. Löwis11437992002-04-12 09:54:03 +000022141int
22142main ()
22143{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022144
22145 char *name;
22146 struct hostent *he;
22147 struct hostent_data data;
22148
22149 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022150
22151 ;
22152 return 0;
22153}
22154_ACEOF
22155rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022156if { (ac_try="$ac_compile"
22157case "(($ac_try" in
22158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22159 *) ac_try_echo=$ac_try;;
22160esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022161eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22162$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022163 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022164 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022165 grep -v '^ *+' conftest.er1 >conftest.err
22166 rm -f conftest.er1
22167 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022168 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022169 (exit $ac_status); } && {
22170 test -z "$ac_c_werror_flag" ||
22171 test ! -s conftest.err
22172 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022173
22174 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022175#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022176_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022177
Martin v. Löwis11437992002-04-12 09:54:03 +000022178
22179cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022180#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022181_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022182
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022183 { $as_echo "$as_me:$LINENO: result: yes" >&5
22184$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022185
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022186else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022187 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022188sed 's/^/| /' conftest.$ac_ext >&5
22189
Martin v. Löwis11437992002-04-12 09:54:03 +000022190
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022191 { $as_echo "$as_me:$LINENO: result: no" >&5
22192$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022193
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022194fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022195
22196rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022197
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022198fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022199
22200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022201
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022203
22204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022205 CFLAGS=$OLD_CFLAGS
22206
22207else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022208
Martin v. Löwis11437992002-04-12 09:54:03 +000022209
22210for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022211do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022212as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22213{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22214$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022215if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022216 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022217else
Martin v. Löwis11437992002-04-12 09:54:03 +000022218 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022219/* confdefs.h. */
22220_ACEOF
22221cat confdefs.h >>conftest.$ac_ext
22222cat >>conftest.$ac_ext <<_ACEOF
22223/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022224/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22225 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22226#define $ac_func innocuous_$ac_func
22227
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022228/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022229 which can conflict with char $ac_func (); below.
22230 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022231 <limits.h> exists even on freestanding compilers. */
22232
22233#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022234# include <limits.h>
22235#else
22236# include <assert.h>
22237#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022238
22239#undef $ac_func
22240
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022241/* Override any GCC internal prototype to avoid an error.
22242 Use char because int might match the return type of a GCC
22243 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022244#ifdef __cplusplus
22245extern "C"
22246#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022247char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022248/* The GNU C library defines this for functions which it implements
22249 to always fail with ENOSYS. Some functions are actually named
22250 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022251#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022252choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022253#endif
22254
Skip Montanaro6dead952003-09-25 14:50:04 +000022255int
22256main ()
22257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022258return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022259 ;
22260 return 0;
22261}
22262_ACEOF
22263rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022264if { (ac_try="$ac_link"
22265case "(($ac_try" in
22266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22267 *) ac_try_echo=$ac_try;;
22268esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022269eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22270$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022271 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022273 grep -v '^ *+' conftest.er1 >conftest.err
22274 rm -f conftest.er1
22275 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022276 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022277 (exit $ac_status); } && {
22278 test -z "$ac_c_werror_flag" ||
22279 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022280 } && test -s conftest$ac_exeext && {
22281 test "$cross_compiling" = yes ||
22282 $as_test_x conftest$ac_exeext
22283 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022284 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022285else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022286 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022287sed 's/^/| /' conftest.$ac_ext >&5
22288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022289 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022291
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022292rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022294 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022295fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022296ac_res=`eval 'as_val=${'$as_ac_var'}
22297 $as_echo "$as_val"'`
22298 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22299$as_echo "$ac_res" >&6; }
22300as_val=`eval 'as_val=${'$as_ac_var'}
22301 $as_echo "$as_val"'`
22302 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022303 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022304#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022305_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022306
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022307fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022308done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022309
Michael W. Hudson54241132001-12-07 15:38:26 +000022310
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022311fi
22312
Michael W. Hudson54241132001-12-07 15:38:26 +000022313
22314
22315
22316
22317
22318
Guido van Rossum627b2d71993-12-24 10:39:16 +000022319# checks for system services
22320# (none yet)
22321
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022322# Linux requires this for correct f.p. operations
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022323{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5
22324$as_echo_n "checking for __fpu_control... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022325if test "${ac_cv_func___fpu_control+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022326 $as_echo_n "(cached) " >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022327else
Martin v. Löwis11437992002-04-12 09:54:03 +000022328 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022329/* confdefs.h. */
22330_ACEOF
22331cat confdefs.h >>conftest.$ac_ext
22332cat >>conftest.$ac_ext <<_ACEOF
22333/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022334/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22335 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22336#define __fpu_control innocuous___fpu_control
22337
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022338/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022339 which can conflict with char __fpu_control (); below.
22340 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022341 <limits.h> exists even on freestanding compilers. */
22342
22343#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022344# include <limits.h>
22345#else
22346# include <assert.h>
22347#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022348
22349#undef __fpu_control
22350
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022351/* Override any GCC internal prototype to avoid an error.
22352 Use char because int might match the return type of a GCC
22353 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022354#ifdef __cplusplus
22355extern "C"
22356#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022357char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022358/* The GNU C library defines this for functions which it implements
22359 to always fail with ENOSYS. Some functions are actually named
22360 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022361#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022362choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022363#endif
22364
Skip Montanaro6dead952003-09-25 14:50:04 +000022365int
22366main ()
22367{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022368return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022369 ;
22370 return 0;
22371}
22372_ACEOF
22373rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022374if { (ac_try="$ac_link"
22375case "(($ac_try" in
22376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22377 *) ac_try_echo=$ac_try;;
22378esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022379eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22380$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022381 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022383 grep -v '^ *+' conftest.er1 >conftest.err
22384 rm -f conftest.er1
22385 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022386 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022387 (exit $ac_status); } && {
22388 test -z "$ac_c_werror_flag" ||
22389 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022390 } && test -s conftest$ac_exeext && {
22391 test "$cross_compiling" = yes ||
22392 $as_test_x conftest$ac_exeext
22393 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022394 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022395else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022396 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022397sed 's/^/| /' conftest.$ac_ext >&5
22398
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022399 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022400fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022401
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022402rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022403rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022404 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022405fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022406{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22407$as_echo "$ac_cv_func___fpu_control" >&6; }
22408if test "x$ac_cv_func___fpu_control" = x""yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022409 :
22410else
Martin v. Löwis11437992002-04-12 09:54:03 +000022411
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022412{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22413$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022414if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022415 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022416else
Martin v. Löwis11437992002-04-12 09:54:03 +000022417 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022418LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022419cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022420/* confdefs.h. */
22421_ACEOF
22422cat confdefs.h >>conftest.$ac_ext
22423cat >>conftest.$ac_ext <<_ACEOF
22424/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022426/* Override any GCC internal prototype to avoid an error.
22427 Use char because int might match the return type of a GCC
22428 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022429#ifdef __cplusplus
22430extern "C"
22431#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022432char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022433int
22434main ()
22435{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022436return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022437 ;
22438 return 0;
22439}
22440_ACEOF
22441rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022442if { (ac_try="$ac_link"
22443case "(($ac_try" in
22444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22445 *) ac_try_echo=$ac_try;;
22446esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022447eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22448$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022449 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022450 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022451 grep -v '^ *+' conftest.er1 >conftest.err
22452 rm -f conftest.er1
22453 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022454 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022455 (exit $ac_status); } && {
22456 test -z "$ac_c_werror_flag" ||
22457 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022458 } && test -s conftest$ac_exeext && {
22459 test "$cross_compiling" = yes ||
22460 $as_test_x conftest$ac_exeext
22461 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022462 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022463else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022464 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022465sed 's/^/| /' conftest.$ac_ext >&5
22466
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022467 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022469
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022470rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022471rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022472 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022473LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022474fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022475{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22476$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
22477if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022478 cat >>confdefs.h <<_ACEOF
22479#define HAVE_LIBIEEE 1
22480_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022481
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022482 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022483
Guido van Rossum627b2d71993-12-24 10:39:16 +000022484fi
22485
Michael W. Hudson54241132001-12-07 15:38:26 +000022486
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022487fi
22488
Michael W. Hudson54241132001-12-07 15:38:26 +000022489
Guido van Rossum7f253911997-05-09 02:42:48 +000022490# Check for --with-fpectl
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022491{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22492$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022494# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022495if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022496 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022497if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022498then
22499
22500cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022501#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022502_ACEOF
22503
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022504 { $as_echo "$as_me:$LINENO: result: yes" >&5
22505$as_echo "yes" >&6; }
22506else { $as_echo "$as_me:$LINENO: result: no" >&5
22507$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022508fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022509else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022510 { $as_echo "$as_me:$LINENO: result: no" >&5
22511$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022512fi
22513
Guido van Rossum7f253911997-05-09 02:42:48 +000022514
Guido van Rossum7f43da71994-08-01 12:15:30 +000022515# check for --with-libm=...
22516
Guido van Rossum563e7081996-09-10 18:20:48 +000022517case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022518Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022519*) LIBM=-lm
22520esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022521{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22522$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022523
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022524# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022525if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022526 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022527if test "$withval" = no
22528then LIBM=
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022529 { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5
22530$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022531elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022532then LIBM=$withval
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022533 { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22534$as_echo "set LIBM=\"$withval\"" >&6; }
22535else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22536$as_echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022537 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022538fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022539else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022540 { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22541$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022542fi
22543
Guido van Rossum7f43da71994-08-01 12:15:30 +000022544
22545# check for --with-libc=...
22546
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022547{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22548$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022549
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022550# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022551if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022552 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022553if test "$withval" = no
22554then LIBC=
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022555 { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5
22556$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022557elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022558then LIBC=$withval
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022559 { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22560$as_echo "set LIBC=\"$withval\"" >&6; }
22561else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22562$as_echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022563 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022564fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022565else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022566 { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22567$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022568fi
22569
Guido van Rossum7f43da71994-08-01 12:15:30 +000022570
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022571# **************************************************
22572# * Check for various properties of floating point *
22573# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022574
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022575{ $as_echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
22576$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022577if test "${ac_cv_little_endian_double+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022578 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022579else
22580
22581if test "$cross_compiling" = yes; then
22582 ac_cv_little_endian_double=no
22583else
22584 cat >conftest.$ac_ext <<_ACEOF
22585/* confdefs.h. */
22586_ACEOF
22587cat confdefs.h >>conftest.$ac_ext
22588cat >>conftest.$ac_ext <<_ACEOF
22589/* end confdefs.h. */
22590
22591#include <string.h>
22592int main() {
22593 double x = 9006104071832581.0;
22594 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
22595 return 0;
22596 else
22597 return 1;
22598}
22599
22600_ACEOF
22601rm -f conftest$ac_exeext
22602if { (ac_try="$ac_link"
22603case "(($ac_try" in
22604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22605 *) ac_try_echo=$ac_try;;
22606esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022607eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22608$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022609 (eval "$ac_link") 2>&5
22610 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022611 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022612 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22613 { (case "(($ac_try" in
22614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22615 *) ac_try_echo=$ac_try;;
22616esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022617eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22618$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022619 (eval "$ac_try") 2>&5
22620 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022621 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022622 (exit $ac_status); }; }; then
22623 ac_cv_little_endian_double=yes
22624else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022625 $as_echo "$as_me: program exited with status $ac_status" >&5
22626$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022627sed 's/^/| /' conftest.$ac_ext >&5
22628
22629( exit $ac_status )
22630ac_cv_little_endian_double=no
22631fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022632rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022633rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22634fi
22635
22636
22637fi
22638
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022639{ $as_echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
22640$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022641if test "$ac_cv_little_endian_double" = yes
22642then
22643
22644cat >>confdefs.h <<\_ACEOF
22645#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
22646_ACEOF
22647
22648fi
22649
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022650{ $as_echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
22651$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022652if test "${ac_cv_big_endian_double+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022653 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022654else
22655
22656if test "$cross_compiling" = yes; then
22657 ac_cv_big_endian_double=no
22658else
22659 cat >conftest.$ac_ext <<_ACEOF
22660/* confdefs.h. */
22661_ACEOF
22662cat confdefs.h >>conftest.$ac_ext
22663cat >>conftest.$ac_ext <<_ACEOF
22664/* end confdefs.h. */
22665
22666#include <string.h>
22667int main() {
22668 double x = 9006104071832581.0;
22669 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
22670 return 0;
22671 else
22672 return 1;
22673}
22674
22675_ACEOF
22676rm -f conftest$ac_exeext
22677if { (ac_try="$ac_link"
22678case "(($ac_try" in
22679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22680 *) ac_try_echo=$ac_try;;
22681esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022682eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22683$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022684 (eval "$ac_link") 2>&5
22685 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022686 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022687 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22688 { (case "(($ac_try" in
22689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22690 *) ac_try_echo=$ac_try;;
22691esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022692eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22693$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022694 (eval "$ac_try") 2>&5
22695 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022696 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022697 (exit $ac_status); }; }; then
22698 ac_cv_big_endian_double=yes
22699else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022700 $as_echo "$as_me: program exited with status $ac_status" >&5
22701$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022702sed 's/^/| /' conftest.$ac_ext >&5
22703
22704( exit $ac_status )
22705ac_cv_big_endian_double=no
22706fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022707rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022708rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22709fi
22710
22711
22712fi
22713
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022714{ $as_echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
22715$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022716if test "$ac_cv_big_endian_double" = yes
22717then
22718
22719cat >>confdefs.h <<\_ACEOF
22720#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
22721_ACEOF
22722
22723fi
22724
22725# Some ARM platforms use a mixed-endian representation for doubles.
22726# While Python doesn't currently have full support for these platforms
22727# (see e.g., issue 1762561), we can at least make sure that float <-> string
22728# conversions work.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022729{ $as_echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
22730$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022731if test "${ac_cv_mixed_endian_double+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022732 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022733else
22734
22735if test "$cross_compiling" = yes; then
22736 ac_cv_mixed_endian_double=no
22737else
22738 cat >conftest.$ac_ext <<_ACEOF
22739/* confdefs.h. */
22740_ACEOF
22741cat confdefs.h >>conftest.$ac_ext
22742cat >>conftest.$ac_ext <<_ACEOF
22743/* end confdefs.h. */
22744
22745#include <string.h>
22746int main() {
22747 double x = 9006104071832581.0;
22748 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
22749 return 0;
22750 else
22751 return 1;
22752}
22753
22754_ACEOF
22755rm -f conftest$ac_exeext
22756if { (ac_try="$ac_link"
22757case "(($ac_try" in
22758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22759 *) ac_try_echo=$ac_try;;
22760esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022761eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22762$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022763 (eval "$ac_link") 2>&5
22764 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022765 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022766 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22767 { (case "(($ac_try" in
22768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22769 *) ac_try_echo=$ac_try;;
22770esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022771eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22772$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022773 (eval "$ac_try") 2>&5
22774 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022775 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022776 (exit $ac_status); }; }; then
22777 ac_cv_mixed_endian_double=yes
22778else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022779 $as_echo "$as_me: program exited with status $ac_status" >&5
22780$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022781sed 's/^/| /' conftest.$ac_ext >&5
22782
22783( exit $ac_status )
22784ac_cv_mixed_endian_double=no
22785fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022786rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22788fi
22789
22790
22791fi
22792
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022793{ $as_echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
22794$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022795if test "$ac_cv_mixed_endian_double" = yes
22796then
22797
22798cat >>confdefs.h <<\_ACEOF
22799#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
22800_ACEOF
22801
22802fi
22803
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022804# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000022805# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022806# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000022807# rounding; this is a problem on x86, where the x87 FPU has a default
22808# rounding precision of 64 bits. For gcc/x86, we try to fix this by
22809# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022810if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
22811then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022812 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000022813 # x87 control word. It should be, but you never know...
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022814 { $as_echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
22815$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 +000022816 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022817/* confdefs.h. */
22818_ACEOF
22819cat confdefs.h >>conftest.$ac_ext
22820cat >>conftest.$ac_ext <<_ACEOF
22821/* end confdefs.h. */
22822
22823int
22824main ()
22825{
22826
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022827 unsigned short cw;
22828 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
22829 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022830
22831 ;
22832 return 0;
22833}
22834_ACEOF
22835rm -f conftest.$ac_objext
22836if { (ac_try="$ac_compile"
22837case "(($ac_try" in
22838 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22839 *) ac_try_echo=$ac_try;;
22840esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022841eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22842$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022843 (eval "$ac_compile") 2>conftest.er1
22844 ac_status=$?
22845 grep -v '^ *+' conftest.er1 >conftest.err
22846 rm -f conftest.er1
22847 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022848 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022849 (exit $ac_status); } && {
22850 test -z "$ac_c_werror_flag" ||
22851 test ! -s conftest.err
22852 } && test -s conftest.$ac_objext; then
22853 have_gcc_asm_for_x87=yes
22854else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022855 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022856sed 's/^/| /' conftest.$ac_ext >&5
22857
22858 have_gcc_asm_for_x87=no
22859fi
22860
22861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022862 { $as_echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
22863$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000022864 if test "$have_gcc_asm_for_x87" = yes
22865 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022866
22867cat >>confdefs.h <<\_ACEOF
22868#define HAVE_GCC_ASM_FOR_X87 1
22869_ACEOF
22870
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022871 fi
22872fi
Martin v. Löwis11437992002-04-12 09:54:03 +000022873
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022874# Detect whether system arithmetic is subject to x87-style double
22875# rounding issues. The result of this test has little meaning on non
22876# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22877# mode is round-to-nearest and double rounding issues are present, and
22878# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022879{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22880$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022881# $BASECFLAGS may affect the result
22882ac_save_cc="$CC"
22883CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022884if test "$cross_compiling" = yes; then
22885 ac_cv_x87_double_rounding=no
22886else
22887 cat >conftest.$ac_ext <<_ACEOF
22888/* confdefs.h. */
22889_ACEOF
22890cat confdefs.h >>conftest.$ac_ext
22891cat >>conftest.$ac_ext <<_ACEOF
22892/* end confdefs.h. */
22893
22894#include <stdlib.h>
22895#include <math.h>
22896int main() {
22897 volatile double x, y, z;
22898 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22899 x = 0.99999999999999989; /* 1-2**-53 */
22900 y = 1./x;
22901 if (y != 1.)
22902 exit(0);
22903 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22904 x = 1e16;
22905 y = 2.99999;
22906 z = x + y;
22907 if (z != 1e16+4.)
22908 exit(0);
22909 /* both tests show evidence of double rounding */
22910 exit(1);
22911}
22912
22913_ACEOF
22914rm -f conftest$ac_exeext
22915if { (ac_try="$ac_link"
22916case "(($ac_try" in
22917 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22918 *) ac_try_echo=$ac_try;;
22919esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022920eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22921$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022922 (eval "$ac_link") 2>&5
22923 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022924 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022925 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22926 { (case "(($ac_try" in
22927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22928 *) ac_try_echo=$ac_try;;
22929esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022930eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22931$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022932 (eval "$ac_try") 2>&5
22933 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022934 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022935 (exit $ac_status); }; }; then
22936 ac_cv_x87_double_rounding=no
22937else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022938 $as_echo "$as_me: program exited with status $ac_status" >&5
22939$as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022940sed 's/^/| /' conftest.$ac_ext >&5
22941
22942( exit $ac_status )
22943ac_cv_x87_double_rounding=yes
22944fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022945rm -rf conftest.dSYM
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022946rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22947fi
22948
22949
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022950CC="$ac_save_cc"
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022951{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22952$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000022953if test "$ac_cv_x87_double_rounding" = yes
22954then
22955
22956cat >>confdefs.h <<\_ACEOF
22957#define X87_DOUBLE_ROUNDING 1
22958_ACEOF
22959
22960fi
22961
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000022962# ************************************
22963# * Check for mathematical functions *
22964# ************************************
22965
22966LIBS_SAVE=$LIBS
22967LIBS="$LIBS $LIBM"
22968
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022969# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22970# -0. on some architectures.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022971{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22972$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022973if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000022974 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000022975else
22976
22977if test "$cross_compiling" = yes; then
22978 ac_cv_tanh_preserves_zero_sign=no
22979else
22980 cat >conftest.$ac_ext <<_ACEOF
22981/* confdefs.h. */
22982_ACEOF
22983cat confdefs.h >>conftest.$ac_ext
22984cat >>conftest.$ac_ext <<_ACEOF
22985/* end confdefs.h. */
22986
22987#include <math.h>
22988#include <stdlib.h>
22989int main() {
22990 /* return 0 if either negative zeros don't exist
22991 on this platform or if negative zeros exist
22992 and tanh(-0.) == -0. */
22993 if (atan2(0., -1.) == atan2(-0., -1.) ||
22994 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22995 else exit(1);
22996}
22997
22998_ACEOF
22999rm -f conftest$ac_exeext
23000if { (ac_try="$ac_link"
23001case "(($ac_try" in
23002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23003 *) ac_try_echo=$ac_try;;
23004esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023005eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23006$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023007 (eval "$ac_link") 2>&5
23008 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023009 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023010 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23011 { (case "(($ac_try" in
23012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23013 *) ac_try_echo=$ac_try;;
23014esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023015eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23016$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023017 (eval "$ac_try") 2>&5
23018 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023019 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023020 (exit $ac_status); }; }; then
23021 ac_cv_tanh_preserves_zero_sign=yes
23022else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023023 $as_echo "$as_me: program exited with status $ac_status" >&5
23024$as_echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023025sed 's/^/| /' conftest.$ac_ext >&5
23026
23027( exit $ac_status )
23028ac_cv_tanh_preserves_zero_sign=no
23029fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023030rm -rf conftest.dSYM
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023031rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23032fi
23033
23034
23035fi
23036
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023037{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23038$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023039if test "$ac_cv_tanh_preserves_zero_sign" = yes
23040then
23041
23042cat >>confdefs.h <<\_ACEOF
23043#define TANH_PRESERVES_ZERO_SIGN 1
23044_ACEOF
23045
23046fi
23047
23048
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023049
Michael W. Hudson54241132001-12-07 15:38:26 +000023050
Christian Heimes99170a52007-12-19 02:07:34 +000023051
23052
23053
23054
23055
Mark Dickinsonf2537862009-04-18 13:58:18 +000023056
23057for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p round
Christian Heimes99170a52007-12-19 02:07:34 +000023058do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023059as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23060{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
23061$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023062if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023063 $as_echo_n "(cached) " >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023064else
23065 cat >conftest.$ac_ext <<_ACEOF
23066/* confdefs.h. */
23067_ACEOF
23068cat confdefs.h >>conftest.$ac_ext
23069cat >>conftest.$ac_ext <<_ACEOF
23070/* end confdefs.h. */
23071/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23072 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23073#define $ac_func innocuous_$ac_func
23074
23075/* System header to define __stub macros and hopefully few prototypes,
23076 which can conflict with char $ac_func (); below.
23077 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23078 <limits.h> exists even on freestanding compilers. */
23079
23080#ifdef __STDC__
23081# include <limits.h>
23082#else
23083# include <assert.h>
23084#endif
23085
23086#undef $ac_func
23087
23088/* Override any GCC internal prototype to avoid an error.
23089 Use char because int might match the return type of a GCC
23090 builtin and then its argument prototype would still apply. */
23091#ifdef __cplusplus
23092extern "C"
23093#endif
23094char $ac_func ();
23095/* The GNU C library defines this for functions which it implements
23096 to always fail with ENOSYS. Some functions are actually named
23097 something starting with __ and the normal name is an alias. */
23098#if defined __stub_$ac_func || defined __stub___$ac_func
23099choke me
23100#endif
23101
23102int
23103main ()
23104{
23105return $ac_func ();
23106 ;
23107 return 0;
23108}
23109_ACEOF
23110rm -f conftest.$ac_objext conftest$ac_exeext
23111if { (ac_try="$ac_link"
23112case "(($ac_try" in
23113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23114 *) ac_try_echo=$ac_try;;
23115esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023116eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23117$as_echo "$ac_try_echo") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023118 (eval "$ac_link") 2>conftest.er1
23119 ac_status=$?
23120 grep -v '^ *+' conftest.er1 >conftest.err
23121 rm -f conftest.er1
23122 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023123 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023124 (exit $ac_status); } && {
23125 test -z "$ac_c_werror_flag" ||
23126 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023127 } && test -s conftest$ac_exeext && {
23128 test "$cross_compiling" = yes ||
23129 $as_test_x conftest$ac_exeext
23130 }; then
Christian Heimes99170a52007-12-19 02:07:34 +000023131 eval "$as_ac_var=yes"
23132else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023133 $as_echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023134sed 's/^/| /' conftest.$ac_ext >&5
23135
23136 eval "$as_ac_var=no"
23137fi
23138
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023139rm -rf conftest.dSYM
Christian Heimes99170a52007-12-19 02:07:34 +000023140rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23141 conftest$ac_exeext conftest.$ac_ext
23142fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023143ac_res=`eval 'as_val=${'$as_ac_var'}
23144 $as_echo "$as_val"'`
23145 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
23146$as_echo "$ac_res" >&6; }
23147as_val=`eval 'as_val=${'$as_ac_var'}
23148 $as_echo "$as_val"'`
23149 if test "x$as_val" = x""yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023150 cat >>confdefs.h <<_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023151#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023152_ACEOF
23153
23154fi
23155done
23156
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023157{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23158$as_echo_n "checking whether isinf is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023159if test "${ac_cv_have_decl_isinf+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023160 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023161else
23162 cat >conftest.$ac_ext <<_ACEOF
23163/* confdefs.h. */
23164_ACEOF
23165cat confdefs.h >>conftest.$ac_ext
23166cat >>conftest.$ac_ext <<_ACEOF
23167/* end confdefs.h. */
23168#include <math.h>
23169
23170int
23171main ()
23172{
23173#ifndef isinf
23174 (void) isinf;
23175#endif
23176
23177 ;
23178 return 0;
23179}
23180_ACEOF
23181rm -f conftest.$ac_objext
23182if { (ac_try="$ac_compile"
23183case "(($ac_try" in
23184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23185 *) ac_try_echo=$ac_try;;
23186esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023187eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23188$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023189 (eval "$ac_compile") 2>conftest.er1
23190 ac_status=$?
23191 grep -v '^ *+' conftest.er1 >conftest.err
23192 rm -f conftest.er1
23193 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023194 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023195 (exit $ac_status); } && {
23196 test -z "$ac_c_werror_flag" ||
23197 test ! -s conftest.err
23198 } && test -s conftest.$ac_objext; then
23199 ac_cv_have_decl_isinf=yes
23200else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023201 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023202sed 's/^/| /' conftest.$ac_ext >&5
23203
23204 ac_cv_have_decl_isinf=no
23205fi
23206
23207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23208fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023209{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
23210$as_echo "$ac_cv_have_decl_isinf" >&6; }
23211if test "x$ac_cv_have_decl_isinf" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023212
23213cat >>confdefs.h <<_ACEOF
23214#define HAVE_DECL_ISINF 1
23215_ACEOF
23216
23217
23218else
23219 cat >>confdefs.h <<_ACEOF
23220#define HAVE_DECL_ISINF 0
23221_ACEOF
23222
23223
23224fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023225{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5
23226$as_echo_n "checking whether isnan is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023227if test "${ac_cv_have_decl_isnan+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023228 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023229else
23230 cat >conftest.$ac_ext <<_ACEOF
23231/* confdefs.h. */
23232_ACEOF
23233cat confdefs.h >>conftest.$ac_ext
23234cat >>conftest.$ac_ext <<_ACEOF
23235/* end confdefs.h. */
23236#include <math.h>
23237
23238int
23239main ()
23240{
23241#ifndef isnan
23242 (void) isnan;
23243#endif
23244
23245 ;
23246 return 0;
23247}
23248_ACEOF
23249rm -f conftest.$ac_objext
23250if { (ac_try="$ac_compile"
23251case "(($ac_try" in
23252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23253 *) ac_try_echo=$ac_try;;
23254esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023255eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23256$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023257 (eval "$ac_compile") 2>conftest.er1
23258 ac_status=$?
23259 grep -v '^ *+' conftest.er1 >conftest.err
23260 rm -f conftest.er1
23261 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023262 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023263 (exit $ac_status); } && {
23264 test -z "$ac_c_werror_flag" ||
23265 test ! -s conftest.err
23266 } && test -s conftest.$ac_objext; then
23267 ac_cv_have_decl_isnan=yes
23268else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023269 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023270sed 's/^/| /' conftest.$ac_ext >&5
23271
23272 ac_cv_have_decl_isnan=no
23273fi
23274
23275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23276fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023277{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
23278$as_echo "$ac_cv_have_decl_isnan" >&6; }
23279if test "x$ac_cv_have_decl_isnan" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023280
23281cat >>confdefs.h <<_ACEOF
23282#define HAVE_DECL_ISNAN 1
23283_ACEOF
23284
23285
23286else
23287 cat >>confdefs.h <<_ACEOF
23288#define HAVE_DECL_ISNAN 0
23289_ACEOF
23290
23291
23292fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023293{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
23294$as_echo_n "checking whether isfinite is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023295if test "${ac_cv_have_decl_isfinite+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023296 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023297else
23298 cat >conftest.$ac_ext <<_ACEOF
23299/* confdefs.h. */
23300_ACEOF
23301cat confdefs.h >>conftest.$ac_ext
23302cat >>conftest.$ac_ext <<_ACEOF
23303/* end confdefs.h. */
23304#include <math.h>
23305
23306int
23307main ()
23308{
23309#ifndef isfinite
23310 (void) isfinite;
23311#endif
23312
23313 ;
23314 return 0;
23315}
23316_ACEOF
23317rm -f conftest.$ac_objext
23318if { (ac_try="$ac_compile"
23319case "(($ac_try" in
23320 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23321 *) ac_try_echo=$ac_try;;
23322esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023323eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23324$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023325 (eval "$ac_compile") 2>conftest.er1
23326 ac_status=$?
23327 grep -v '^ *+' conftest.er1 >conftest.err
23328 rm -f conftest.er1
23329 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023330 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023331 (exit $ac_status); } && {
23332 test -z "$ac_c_werror_flag" ||
23333 test ! -s conftest.err
23334 } && test -s conftest.$ac_objext; then
23335 ac_cv_have_decl_isfinite=yes
23336else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023337 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023338sed 's/^/| /' conftest.$ac_ext >&5
23339
23340 ac_cv_have_decl_isfinite=no
23341fi
23342
23343rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23344fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023345{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
23346$as_echo "$ac_cv_have_decl_isfinite" >&6; }
23347if test "x$ac_cv_have_decl_isfinite" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023348
23349cat >>confdefs.h <<_ACEOF
23350#define HAVE_DECL_ISFINITE 1
23351_ACEOF
23352
23353
23354else
23355 cat >>confdefs.h <<_ACEOF
23356#define HAVE_DECL_ISFINITE 0
23357_ACEOF
23358
23359
23360fi
23361
23362
Christian Heimes99170a52007-12-19 02:07:34 +000023363
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000023364LIBS=$LIBS_SAVE
23365
Mark Dickinson875ada42009-11-28 12:52:39 +000023366# For multiprocessing module, check that sem_open
23367# actually works. For FreeBSD versions <= 7.2,
23368# the kernel module that provides POSIX semaphores
23369# isn't loaded by default, so an attempt to call
23370# sem_open results in a 'Signal 12' error.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023371{ $as_echo "$as_me:$LINENO: checking whether POSIX semaphores are enabled" >&5
23372$as_echo_n "checking whether POSIX semaphores are enabled... " >&6; }
Mark Dickinson875ada42009-11-28 12:52:39 +000023373if test "${ac_cv_posix_semaphores_enabled+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023374 $as_echo_n "(cached) " >&6
Mark Dickinson875ada42009-11-28 12:52:39 +000023375else
23376 if test "$cross_compiling" = yes; then
23377 ac_cv_posix_semaphores_enabled=yes
23378else
23379 cat >conftest.$ac_ext <<_ACEOF
23380/* confdefs.h. */
23381_ACEOF
23382cat confdefs.h >>conftest.$ac_ext
23383cat >>conftest.$ac_ext <<_ACEOF
23384/* end confdefs.h. */
23385
23386#include <unistd.h>
23387#include <fcntl.h>
23388#include <stdio.h>
23389#include <semaphore.h>
23390#include <sys/stat.h>
23391
23392int main(void) {
23393 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
23394 if (a == SEM_FAILED) {
23395 perror("sem_open");
23396 return 1;
23397 }
23398 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000023399 sem_unlink("/autoconf");
Mark Dickinson875ada42009-11-28 12:52:39 +000023400 return 0;
23401}
23402
23403_ACEOF
23404rm -f conftest$ac_exeext
23405if { (ac_try="$ac_link"
23406case "(($ac_try" in
23407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23408 *) ac_try_echo=$ac_try;;
23409esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023410eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23411$as_echo "$ac_try_echo") >&5
Mark Dickinson875ada42009-11-28 12:52:39 +000023412 (eval "$ac_link") 2>&5
23413 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023414 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson875ada42009-11-28 12:52:39 +000023415 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23416 { (case "(($ac_try" in
23417 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23418 *) ac_try_echo=$ac_try;;
23419esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023420eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23421$as_echo "$ac_try_echo") >&5
Mark Dickinson875ada42009-11-28 12:52:39 +000023422 (eval "$ac_try") 2>&5
23423 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023424 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson875ada42009-11-28 12:52:39 +000023425 (exit $ac_status); }; }; then
23426 ac_cv_posix_semaphores_enabled=yes
23427else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023428 $as_echo "$as_me: program exited with status $ac_status" >&5
23429$as_echo "$as_me: failed program was:" >&5
Mark Dickinson875ada42009-11-28 12:52:39 +000023430sed 's/^/| /' conftest.$ac_ext >&5
23431
23432( exit $ac_status )
23433ac_cv_posix_semaphores_enabled=no
23434fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023435rm -rf conftest.dSYM
Mark Dickinson875ada42009-11-28 12:52:39 +000023436rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23437fi
23438
23439
23440
23441fi
23442
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023443{ $as_echo "$as_me:$LINENO: result: $ac_cv_posix_semaphores_enabled" >&5
23444$as_echo "$ac_cv_posix_semaphores_enabled" >&6; }
Mark Dickinson875ada42009-11-28 12:52:39 +000023445if test $ac_cv_posix_semaphores_enabled = no
23446then
23447
23448cat >>confdefs.h <<\_ACEOF
23449#define POSIX_SEMAPHORES_NOT_ENABLED 1
23450_ACEOF
23451
23452fi
23453
Mark Dickinson10683072009-04-18 21:18:19 +000023454# Multiprocessing check for broken sem_getvalue
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023455{ $as_echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
23456$as_echo_n "checking for broken sem_getvalue... " >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000023457if test "$cross_compiling" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023458 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23459$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23460{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000023461See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023462$as_echo "$as_me: error: cannot run test program while cross compiling
Mark Dickinson10683072009-04-18 21:18:19 +000023463See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023464 { (exit 1); exit 1; }; }; }
Mark Dickinson10683072009-04-18 21:18:19 +000023465else
23466 cat >conftest.$ac_ext <<_ACEOF
23467/* confdefs.h. */
23468_ACEOF
23469cat confdefs.h >>conftest.$ac_ext
23470cat >>conftest.$ac_ext <<_ACEOF
23471/* end confdefs.h. */
23472
23473#include <unistd.h>
23474#include <fcntl.h>
23475#include <stdio.h>
23476#include <semaphore.h>
23477#include <sys/stat.h>
23478
23479int main(void){
Mark Dickinson62eda4d2009-12-13 21:18:16 +000023480 sem_t *a = sem_open("/autocftw", O_CREAT, S_IRUSR|S_IWUSR, 0);
Mark Dickinson10683072009-04-18 21:18:19 +000023481 int count;
23482 int res;
23483 if(a==SEM_FAILED){
23484 perror("sem_open");
23485 return 1;
23486
23487 }
23488 res = sem_getvalue(a, &count);
23489 sem_close(a);
Mark Dickinson62eda4d2009-12-13 21:18:16 +000023490 sem_unlink("/autocftw");
Mark Dickinson10683072009-04-18 21:18:19 +000023491 return res==-1 ? 1 : 0;
23492}
23493
23494
23495_ACEOF
23496rm -f conftest$ac_exeext
23497if { (ac_try="$ac_link"
23498case "(($ac_try" in
23499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23500 *) ac_try_echo=$ac_try;;
23501esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023502eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23503$as_echo "$ac_try_echo") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023504 (eval "$ac_link") 2>&5
23505 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023506 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023507 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23508 { (case "(($ac_try" in
23509 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23510 *) ac_try_echo=$ac_try;;
23511esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023512eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23513$as_echo "$ac_try_echo") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023514 (eval "$ac_try") 2>&5
23515 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023516 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023517 (exit $ac_status); }; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023518 { $as_echo "$as_me:$LINENO: result: no" >&5
23519$as_echo "no" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000023520else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023521 $as_echo "$as_me: program exited with status $ac_status" >&5
23522$as_echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000023523sed 's/^/| /' conftest.$ac_ext >&5
23524
23525( exit $ac_status )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023526{ $as_echo "$as_me:$LINENO: result: yes" >&5
23527$as_echo "yes" >&6; }
Mark Dickinson10683072009-04-18 21:18:19 +000023528
23529cat >>confdefs.h <<\_ACEOF
23530#define HAVE_BROKEN_SEM_GETVALUE 1
23531_ACEOF
23532
23533
23534fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023535rm -rf conftest.dSYM
Mark Dickinson10683072009-04-18 21:18:19 +000023536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23537fi
23538
23539
23540
Mark Dickinsonbd792642009-03-18 20:06:12 +000023541# determine what size digit to use for Python's longs
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023542{ $as_echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
23543$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023544# Check whether --enable-big-digits was given.
23545if test "${enable_big_digits+set}" = set; then
23546 enableval=$enable_big_digits; case $enable_big_digits in
23547yes)
23548 enable_big_digits=30 ;;
23549no)
23550 enable_big_digits=15 ;;
2355115|30)
23552 ;;
23553*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023554 { { $as_echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
23555$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 +000023556 { (exit 1); exit 1; }; } ;;
23557esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023558{ $as_echo "$as_me:$LINENO: result: $enable_big_digits" >&5
23559$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023560
23561cat >>confdefs.h <<_ACEOF
23562#define PYLONG_BITS_IN_DIGIT $enable_big_digits
23563_ACEOF
23564
23565
23566else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023567 { $as_echo "$as_me:$LINENO: result: no value specified" >&5
23568$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000023569fi
23570
23571
Guido van Rossumef2255b2000-03-10 22:30:29 +000023572# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000023573if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023574 { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
23575$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023576if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023577 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023578fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023579{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23580$as_echo "$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000023581else
Martin v. Löwis11437992002-04-12 09:54:03 +000023582 # Is the header compilable?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023583{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5
23584$as_echo_n "checking wchar.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023585cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023586/* confdefs.h. */
23587_ACEOF
23588cat confdefs.h >>conftest.$ac_ext
23589cat >>conftest.$ac_ext <<_ACEOF
23590/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023591$ac_includes_default
23592#include <wchar.h>
23593_ACEOF
23594rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023595if { (ac_try="$ac_compile"
23596case "(($ac_try" in
23597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23598 *) ac_try_echo=$ac_try;;
23599esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023600eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23601$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023604 grep -v '^ *+' conftest.er1 >conftest.err
23605 rm -f conftest.er1
23606 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023607 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023608 (exit $ac_status); } && {
23609 test -z "$ac_c_werror_flag" ||
23610 test ! -s conftest.err
23611 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023612 ac_header_compiler=yes
23613else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023614 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023615sed 's/^/| /' conftest.$ac_ext >&5
23616
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023617 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023619
23620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023621{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23622$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023623
23624# Is the header present?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023625{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5
23626$as_echo_n "checking wchar.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023627cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023628/* confdefs.h. */
23629_ACEOF
23630cat confdefs.h >>conftest.$ac_ext
23631cat >>conftest.$ac_ext <<_ACEOF
23632/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023633#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023634_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023635if { (ac_try="$ac_cpp conftest.$ac_ext"
23636case "(($ac_try" in
23637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23638 *) ac_try_echo=$ac_try;;
23639esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023640eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23641$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023642 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023643 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023644 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023645 rm -f conftest.er1
23646 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023647 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023648 (exit $ac_status); } >/dev/null && {
23649 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23650 test ! -s conftest.err
23651 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023652 ac_header_preproc=yes
23653else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023654 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023655sed 's/^/| /' conftest.$ac_ext >&5
23656
Martin v. Löwis11437992002-04-12 09:54:03 +000023657 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023658fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023659
Martin v. Löwis11437992002-04-12 09:54:03 +000023660rm -f conftest.err conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023661{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23662$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023663
23664# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023665case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23666 yes:no: )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023667 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23668$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23669 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23670$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023671 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023672 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023673 no:yes:* )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023674 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23675$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23676 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23677$as_echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23678 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23679$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23680 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23681$as_echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23682 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23683$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23684 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23685$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023686 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000023687## -------------------------------------- ##
23688## Report this to http://bugs.python.org/ ##
23689## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023690_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023691 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023692 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023693esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023694{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
23695$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023696if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023697 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023698else
23699 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023700fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023701{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23702$as_echo "$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023703
23704fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023705if test "x$ac_cv_header_wchar_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023706
23707
23708cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023709#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023710_ACEOF
23711
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023712 wchar_h="yes"
23713
Guido van Rossumef2255b2000-03-10 22:30:29 +000023714else
Martin v. Löwis11437992002-04-12 09:54:03 +000023715 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023716
23717fi
23718
Michael W. Hudson54241132001-12-07 15:38:26 +000023719
Martin v. Löwis11437992002-04-12 09:54:03 +000023720
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023721# determine wchar_t size
23722if test "$wchar_h" = yes
23723then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023724 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023725# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23726# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23727# This bug is HP SR number 8606223364.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023728{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5
23729$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023730if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023731 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023732else
Martin v. Löwis11437992002-04-12 09:54:03 +000023733 if test "$cross_compiling" = yes; then
23734 # Depending upon the size, compute the lo and hi bounds.
23735cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023736/* confdefs.h. */
23737_ACEOF
23738cat confdefs.h >>conftest.$ac_ext
23739cat >>conftest.$ac_ext <<_ACEOF
23740/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023741#include <wchar.h>
23742
Martin v. Löwis11437992002-04-12 09:54:03 +000023743int
23744main ()
23745{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023746static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023747test_array [0] = 0
23748
23749 ;
23750 return 0;
23751}
23752_ACEOF
23753rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023754if { (ac_try="$ac_compile"
23755case "(($ac_try" in
23756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23757 *) ac_try_echo=$ac_try;;
23758esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023759eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23760$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023761 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023763 grep -v '^ *+' conftest.er1 >conftest.err
23764 rm -f conftest.er1
23765 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023766 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023767 (exit $ac_status); } && {
23768 test -z "$ac_c_werror_flag" ||
23769 test ! -s conftest.err
23770 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023771 ac_lo=0 ac_mid=0
23772 while :; do
23773 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023774/* confdefs.h. */
23775_ACEOF
23776cat confdefs.h >>conftest.$ac_ext
23777cat >>conftest.$ac_ext <<_ACEOF
23778/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023779#include <wchar.h>
23780
Martin v. Löwis11437992002-04-12 09:54:03 +000023781int
23782main ()
23783{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023784static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023785test_array [0] = 0
23786
23787 ;
23788 return 0;
23789}
23790_ACEOF
23791rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023792if { (ac_try="$ac_compile"
23793case "(($ac_try" in
23794 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23795 *) ac_try_echo=$ac_try;;
23796esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023797eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23798$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023799 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023800 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023801 grep -v '^ *+' conftest.er1 >conftest.err
23802 rm -f conftest.er1
23803 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023804 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023805 (exit $ac_status); } && {
23806 test -z "$ac_c_werror_flag" ||
23807 test ! -s conftest.err
23808 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023809 ac_hi=$ac_mid; break
23810else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023811 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023812sed 's/^/| /' conftest.$ac_ext >&5
23813
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023814 ac_lo=`expr $ac_mid + 1`
23815 if test $ac_lo -le $ac_mid; then
23816 ac_lo= ac_hi=
23817 break
23818 fi
23819 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023820fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023821
23822rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023823 done
23824else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023825 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023826sed 's/^/| /' conftest.$ac_ext >&5
23827
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023828 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023829/* confdefs.h. */
23830_ACEOF
23831cat confdefs.h >>conftest.$ac_ext
23832cat >>conftest.$ac_ext <<_ACEOF
23833/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023834#include <wchar.h>
23835
Martin v. Löwis11437992002-04-12 09:54:03 +000023836int
23837main ()
23838{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023839static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023840test_array [0] = 0
23841
23842 ;
23843 return 0;
23844}
23845_ACEOF
23846rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023847if { (ac_try="$ac_compile"
23848case "(($ac_try" in
23849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23850 *) ac_try_echo=$ac_try;;
23851esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023852eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23853$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023854 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023856 grep -v '^ *+' conftest.er1 >conftest.err
23857 rm -f conftest.er1
23858 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023859 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023860 (exit $ac_status); } && {
23861 test -z "$ac_c_werror_flag" ||
23862 test ! -s conftest.err
23863 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023864 ac_hi=-1 ac_mid=-1
23865 while :; do
23866 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023867/* confdefs.h. */
23868_ACEOF
23869cat confdefs.h >>conftest.$ac_ext
23870cat >>conftest.$ac_ext <<_ACEOF
23871/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023872#include <wchar.h>
23873
Martin v. Löwis11437992002-04-12 09:54:03 +000023874int
23875main ()
23876{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023877static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023878test_array [0] = 0
23879
23880 ;
23881 return 0;
23882}
23883_ACEOF
23884rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023885if { (ac_try="$ac_compile"
23886case "(($ac_try" in
23887 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23888 *) ac_try_echo=$ac_try;;
23889esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023890eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23891$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023892 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023893 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023894 grep -v '^ *+' conftest.er1 >conftest.err
23895 rm -f conftest.er1
23896 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023897 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023898 (exit $ac_status); } && {
23899 test -z "$ac_c_werror_flag" ||
23900 test ! -s conftest.err
23901 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023902 ac_lo=$ac_mid; break
23903else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023904 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023905sed 's/^/| /' conftest.$ac_ext >&5
23906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023907 ac_hi=`expr '(' $ac_mid ')' - 1`
23908 if test $ac_mid -le $ac_hi; then
23909 ac_lo= ac_hi=
23910 break
23911 fi
23912 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023913fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023914
23915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023916 done
23917else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023918 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023919sed 's/^/| /' conftest.$ac_ext >&5
23920
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023921 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023922fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023923
23924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023925fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023926
23927rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023928# Binary search between lo and hi bounds.
23929while test "x$ac_lo" != "x$ac_hi"; do
23930 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023932/* confdefs.h. */
23933_ACEOF
23934cat confdefs.h >>conftest.$ac_ext
23935cat >>conftest.$ac_ext <<_ACEOF
23936/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023937#include <wchar.h>
23938
Martin v. Löwis11437992002-04-12 09:54:03 +000023939int
23940main ()
23941{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023942static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023943test_array [0] = 0
23944
23945 ;
23946 return 0;
23947}
23948_ACEOF
23949rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023950if { (ac_try="$ac_compile"
23951case "(($ac_try" in
23952 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23953 *) ac_try_echo=$ac_try;;
23954esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023955eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23956$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023957 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023958 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023959 grep -v '^ *+' conftest.er1 >conftest.err
23960 rm -f conftest.er1
23961 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023962 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023963 (exit $ac_status); } && {
23964 test -z "$ac_c_werror_flag" ||
23965 test ! -s conftest.err
23966 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023967 ac_hi=$ac_mid
23968else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023969 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023970sed 's/^/| /' conftest.$ac_ext >&5
23971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023972 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023974
23975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023976done
23977case $ac_lo in
23978?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023979'') if test "$ac_cv_type_wchar_t" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023980 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23981$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23982{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023983See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023984$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023985See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000023986 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023987 else
23988 ac_cv_sizeof_wchar_t=0
23989 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023990esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023991else
Martin v. Löwis11437992002-04-12 09:54:03 +000023992 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023993/* confdefs.h. */
23994_ACEOF
23995cat confdefs.h >>conftest.$ac_ext
23996cat >>conftest.$ac_ext <<_ACEOF
23997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023998#include <wchar.h>
23999
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024000static long int longval () { return (long int) (sizeof (wchar_t)); }
24001static unsigned long int ulongval () { return (long int) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024002#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024003#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024004int
24005main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024006{
Martin v. Löwis11437992002-04-12 09:54:03 +000024007
24008 FILE *f = fopen ("conftest.val", "w");
24009 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024010 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024011 if (((long int) (sizeof (wchar_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024012 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024013 long int i = longval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024014 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024015 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024016 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024017 }
24018 else
24019 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024020 unsigned long int i = ulongval ();
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024021 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024022 return 1;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024023 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024024 }
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024025 /* Do not output a trailing newline, as this causes \r\n confusion
24026 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024027 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024028
24029 ;
24030 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024031}
Martin v. Löwis11437992002-04-12 09:54:03 +000024032_ACEOF
24033rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024034if { (ac_try="$ac_link"
24035case "(($ac_try" in
24036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24037 *) ac_try_echo=$ac_try;;
24038esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024039eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24040$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024041 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024042 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024043 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024044 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024045 { (case "(($ac_try" in
24046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24047 *) ac_try_echo=$ac_try;;
24048esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024049eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24050$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024051 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024052 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024053 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024054 (exit $ac_status); }; }; then
24055 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024056else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024057 $as_echo "$as_me: program exited with status $ac_status" >&5
24058$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024059sed 's/^/| /' conftest.$ac_ext >&5
24060
Martin v. Löwis11437992002-04-12 09:54:03 +000024061( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024062if test "$ac_cv_type_wchar_t" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024063 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24064$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24065{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024066See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024067$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024068See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024069 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024070 else
24071 ac_cv_sizeof_wchar_t=0
24072 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024073fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024074rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024075rm -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 +000024076fi
24077rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024078fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024079{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24080$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024081
24082
24083
Martin v. Löwis11437992002-04-12 09:54:03 +000024084cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024085#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024086_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024087
Michael W. Hudson54241132001-12-07 15:38:26 +000024088
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024089fi
24090
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024091{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24092$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024093have_ucs4_tcl=no
24094cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024095/* confdefs.h. */
24096_ACEOF
24097cat confdefs.h >>conftest.$ac_ext
24098cat >>conftest.$ac_ext <<_ACEOF
24099/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024100
24101#include <tcl.h>
24102#if TCL_UTF_MAX != 6
24103# error "NOT UCS4_TCL"
24104#endif
24105int
24106main ()
24107{
24108
24109 ;
24110 return 0;
24111}
24112_ACEOF
24113rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024114if { (ac_try="$ac_compile"
24115case "(($ac_try" in
24116 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24117 *) ac_try_echo=$ac_try;;
24118esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024119eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24120$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024121 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024122 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024123 grep -v '^ *+' conftest.er1 >conftest.err
24124 rm -f conftest.er1
24125 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024126 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024127 (exit $ac_status); } && {
24128 test -z "$ac_c_werror_flag" ||
24129 test ! -s conftest.err
24130 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024131
24132
24133cat >>confdefs.h <<\_ACEOF
24134#define HAVE_UCS4_TCL 1
24135_ACEOF
24136
24137 have_ucs4_tcl=yes
24138
24139else
Benjamin Peterson82af01d2010-05-02 16:45:41 +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
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024144fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024145
24146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024147{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24148$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024149
Skip Montanaro6dead952003-09-25 14:50:04 +000024150# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024151if test "$wchar_h" = yes
24152then
24153 # check whether wchar_t is signed or not
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024154 { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24155$as_echo_n "checking whether wchar_t is signed... " >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024156 if test "${ac_cv_wchar_t_signed+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024157 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024158else
24159
24160 if test "$cross_compiling" = yes; then
24161 ac_cv_wchar_t_signed=yes
24162else
24163 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024164/* confdefs.h. */
24165_ACEOF
24166cat confdefs.h >>conftest.$ac_ext
24167cat >>conftest.$ac_ext <<_ACEOF
24168/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024169
24170 #include <wchar.h>
24171 int main()
24172 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024173 /* Success: exit code 0 */
24174 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024175 }
24176
24177_ACEOF
24178rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024179if { (ac_try="$ac_link"
24180case "(($ac_try" in
24181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24182 *) ac_try_echo=$ac_try;;
24183esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024184eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24185$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024186 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024187 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024188 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024189 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024190 { (case "(($ac_try" in
24191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24192 *) ac_try_echo=$ac_try;;
24193esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024194eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24195$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024196 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024197 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024198 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024199 (exit $ac_status); }; }; then
24200 ac_cv_wchar_t_signed=yes
24201else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024202 $as_echo "$as_me: program exited with status $ac_status" >&5
24203$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024204sed 's/^/| /' conftest.$ac_ext >&5
24205
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024206( exit $ac_status )
24207ac_cv_wchar_t_signed=no
24208fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024209rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024210rm -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 +000024211fi
24212
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024213
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024214fi
24215
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024216 { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24217$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024218fi
24219
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024220{ $as_echo "$as_me:$LINENO: checking what type to use for str" >&5
24221$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024222
24223# Check whether --with-wide-unicode was given.
24224if test "${with_wide_unicode+set}" = set; then
24225 withval=$with_wide_unicode;
24226if test "$withval" != no
24227then unicode_size="4"
24228else unicode_size="2"
24229fi
24230
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024231else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024232
Georg Brandl52d168a2008-01-07 18:10:24 +000024233case "$have_ucs4_tcl" in
24234 yes) unicode_size="4" ;;
24235 *) unicode_size="2" ;;
24236esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024237
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024238fi
24239
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024240
24241
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024242
Georg Brandl52d168a2008-01-07 18:10:24 +000024243case "$unicode_size" in
24244 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024245#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024246_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024247 ;;
24248 *) cat >>confdefs.h <<\_ACEOF
24249#define Py_UNICODE_SIZE 2
24250_ACEOF
24251 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024252esac
24253
Michael W. Hudson54241132001-12-07 15:38:26 +000024254
Martin v. Löwis11437992002-04-12 09:54:03 +000024255
24256
Georg Brandl52d168a2008-01-07 18:10:24 +000024257# wchar_t is only usable if it maps to an unsigned type
24258if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024259 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024260then
24261 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024262
Martin v. Löwis11437992002-04-12 09:54:03 +000024263cat >>confdefs.h <<\_ACEOF
24264#define HAVE_USABLE_WCHAR_T 1
24265_ACEOF
24266
Georg Brandl52d168a2008-01-07 18:10:24 +000024267 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024268#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024269_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024270
Georg Brandl52d168a2008-01-07 18:10:24 +000024271elif test "$ac_cv_sizeof_short" = "$unicode_size"
24272then
24273 PY_UNICODE_TYPE="unsigned short"
24274 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024275#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000024276_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024277
Georg Brandl52d168a2008-01-07 18:10:24 +000024278elif test "$ac_cv_sizeof_long" = "$unicode_size"
24279then
24280 PY_UNICODE_TYPE="unsigned long"
24281 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024282#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000024283_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024284
Georg Brandl52d168a2008-01-07 18:10:24 +000024285else
24286 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024287fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024288{ $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
24289$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024290
24291# check for endianness
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024292
24293 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
24294$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024295if test "${ac_cv_c_bigendian+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024296 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000024297else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024298 ac_cv_c_bigendian=unknown
24299 # See if we're dealing with a universal compiler.
24300 cat >conftest.$ac_ext <<_ACEOF
24301/* confdefs.h. */
24302_ACEOF
24303cat confdefs.h >>conftest.$ac_ext
24304cat >>conftest.$ac_ext <<_ACEOF
24305/* end confdefs.h. */
24306#ifndef __APPLE_CC__
24307 not a universal capable compiler
24308 #endif
24309 typedef int dummy;
24310
24311_ACEOF
24312rm -f conftest.$ac_objext
24313if { (ac_try="$ac_compile"
24314case "(($ac_try" in
24315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24316 *) ac_try_echo=$ac_try;;
24317esac
24318eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24319$as_echo "$ac_try_echo") >&5
24320 (eval "$ac_compile") 2>conftest.er1
24321 ac_status=$?
24322 grep -v '^ *+' conftest.er1 >conftest.err
24323 rm -f conftest.er1
24324 cat conftest.err >&5
24325 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24326 (exit $ac_status); } && {
24327 test -z "$ac_c_werror_flag" ||
24328 test ! -s conftest.err
24329 } && test -s conftest.$ac_objext; then
24330
24331 # Check for potential -arch flags. It is not universal unless
24332 # there are some -arch flags. Note that *ppc* also matches
24333 # ppc64. This check is also rather less than ideal.
24334 case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
24335 *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
24336 esac
24337else
24338 $as_echo "$as_me: failed program was:" >&5
24339sed 's/^/| /' conftest.$ac_ext >&5
24340
24341
24342fi
24343
24344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24345 if test $ac_cv_c_bigendian = unknown; then
24346 # See if sys/param.h defines the BYTE_ORDER macro.
24347 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024348/* confdefs.h. */
24349_ACEOF
24350cat confdefs.h >>conftest.$ac_ext
24351cat >>conftest.$ac_ext <<_ACEOF
24352/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024353#include <sys/types.h>
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024354 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024355
Martin v. Löwis11437992002-04-12 09:54:03 +000024356int
24357main ()
24358{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024359#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
24360 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
24361 && LITTLE_ENDIAN)
24362 bogus endian macros
24363 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024364
24365 ;
24366 return 0;
24367}
24368_ACEOF
24369rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024370if { (ac_try="$ac_compile"
24371case "(($ac_try" in
24372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24373 *) ac_try_echo=$ac_try;;
24374esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024375eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24376$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024379 grep -v '^ *+' conftest.er1 >conftest.err
24380 rm -f conftest.er1
24381 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024382 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024383 (exit $ac_status); } && {
24384 test -z "$ac_c_werror_flag" ||
24385 test ! -s conftest.err
24386 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024387 # It does; now see whether it defined to BIG_ENDIAN or not.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024389/* confdefs.h. */
24390_ACEOF
24391cat confdefs.h >>conftest.$ac_ext
24392cat >>conftest.$ac_ext <<_ACEOF
24393/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024394#include <sys/types.h>
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024395 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000024396
Martin v. Löwis11437992002-04-12 09:54:03 +000024397int
24398main ()
24399{
Guido van Rossumef2255b2000-03-10 22:30:29 +000024400#if BYTE_ORDER != BIG_ENDIAN
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024401 not big endian
24402 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024403
24404 ;
24405 return 0;
24406}
24407_ACEOF
24408rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024409if { (ac_try="$ac_compile"
24410case "(($ac_try" in
24411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24412 *) ac_try_echo=$ac_try;;
24413esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024414eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24415$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024416 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024417 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024418 grep -v '^ *+' conftest.er1 >conftest.err
24419 rm -f conftest.er1
24420 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024421 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024422 (exit $ac_status); } && {
24423 test -z "$ac_c_werror_flag" ||
24424 test ! -s conftest.err
24425 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024426 ac_cv_c_bigendian=yes
24427else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024428 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024429sed 's/^/| /' conftest.$ac_ext >&5
24430
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024431 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024433
24434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000024435else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024436 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024437sed 's/^/| /' conftest.$ac_ext >&5
24438
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024439
24440fi
24441
24442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24443 fi
24444 if test $ac_cv_c_bigendian = unknown; then
24445 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
24446 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024447/* confdefs.h. */
24448_ACEOF
24449cat confdefs.h >>conftest.$ac_ext
24450cat >>conftest.$ac_ext <<_ACEOF
24451/* end confdefs.h. */
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024452#include <limits.h>
24453
Martin v. Löwis11437992002-04-12 09:54:03 +000024454int
24455main ()
24456{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024457#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
24458 bogus endian macros
24459 #endif
24460
Martin v. Löwis11437992002-04-12 09:54:03 +000024461 ;
24462 return 0;
24463}
24464_ACEOF
24465rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024466if { (ac_try="$ac_compile"
24467case "(($ac_try" in
24468 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24469 *) ac_try_echo=$ac_try;;
24470esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024471eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24472$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024473 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024474 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024475 grep -v '^ *+' conftest.er1 >conftest.err
24476 rm -f conftest.er1
24477 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024478 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024479 (exit $ac_status); } && {
24480 test -z "$ac_c_werror_flag" ||
24481 test ! -s conftest.err
24482 } && test -s conftest.$ac_objext; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024483 # It does; now see whether it defined to _BIG_ENDIAN or not.
24484 cat >conftest.$ac_ext <<_ACEOF
24485/* confdefs.h. */
24486_ACEOF
24487cat confdefs.h >>conftest.$ac_ext
24488cat >>conftest.$ac_ext <<_ACEOF
24489/* end confdefs.h. */
24490#include <limits.h>
24491
24492int
24493main ()
24494{
24495#ifndef _BIG_ENDIAN
24496 not big endian
24497 #endif
24498
24499 ;
24500 return 0;
24501}
24502_ACEOF
24503rm -f conftest.$ac_objext
24504if { (ac_try="$ac_compile"
24505case "(($ac_try" in
24506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24507 *) ac_try_echo=$ac_try;;
24508esac
24509eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24510$as_echo "$ac_try_echo") >&5
24511 (eval "$ac_compile") 2>conftest.er1
24512 ac_status=$?
24513 grep -v '^ *+' conftest.er1 >conftest.err
24514 rm -f conftest.er1
24515 cat conftest.err >&5
24516 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24517 (exit $ac_status); } && {
24518 test -z "$ac_c_werror_flag" ||
24519 test ! -s conftest.err
24520 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024521 ac_cv_c_bigendian=yes
Benjamin Petersona8332062009-09-11 22:36:27 +000024522else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024523 $as_echo "$as_me: failed program was:" >&5
24524sed 's/^/| /' conftest.$ac_ext >&5
24525
24526 ac_cv_c_bigendian=no
24527fi
24528
24529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24530else
24531 $as_echo "$as_me: failed program was:" >&5
24532sed 's/^/| /' conftest.$ac_ext >&5
24533
24534
24535fi
24536
24537rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24538 fi
24539 if test $ac_cv_c_bigendian = unknown; then
24540 # Compile a test program.
24541 if test "$cross_compiling" = yes; then
24542 # Try to guess by grepping values from an object file.
24543 cat >conftest.$ac_ext <<_ACEOF
24544/* confdefs.h. */
24545_ACEOF
24546cat confdefs.h >>conftest.$ac_ext
24547cat >>conftest.$ac_ext <<_ACEOF
24548/* end confdefs.h. */
24549short int ascii_mm[] =
24550 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
24551 short int ascii_ii[] =
24552 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
24553 int use_ascii (int i) {
24554 return ascii_mm[i] + ascii_ii[i];
24555 }
24556 short int ebcdic_ii[] =
24557 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
24558 short int ebcdic_mm[] =
24559 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
24560 int use_ebcdic (int i) {
24561 return ebcdic_mm[i] + ebcdic_ii[i];
24562 }
24563 extern int foo;
24564
24565int
24566main ()
24567{
24568return use_ascii (foo) == use_ebcdic (foo);
24569 ;
24570 return 0;
24571}
24572_ACEOF
24573rm -f conftest.$ac_objext
24574if { (ac_try="$ac_compile"
24575case "(($ac_try" in
24576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24577 *) ac_try_echo=$ac_try;;
24578esac
24579eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24580$as_echo "$ac_try_echo") >&5
24581 (eval "$ac_compile") 2>conftest.er1
24582 ac_status=$?
24583 grep -v '^ *+' conftest.er1 >conftest.err
24584 rm -f conftest.er1
24585 cat conftest.err >&5
24586 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
24587 (exit $ac_status); } && {
24588 test -z "$ac_c_werror_flag" ||
24589 test ! -s conftest.err
24590 } && test -s conftest.$ac_objext; then
24591 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
24592 ac_cv_c_bigendian=yes
24593 fi
24594 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24595 if test "$ac_cv_c_bigendian" = unknown; then
24596 ac_cv_c_bigendian=no
24597 else
24598 # finding both strings is unlikely to happen, but who knows?
24599 ac_cv_c_bigendian=unknown
24600 fi
24601 fi
24602else
24603 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024604sed 's/^/| /' conftest.$ac_ext >&5
24605
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024606
Martin v. Löwis11437992002-04-12 09:54:03 +000024607fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024608
24609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024610else
24611 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024612/* confdefs.h. */
24613_ACEOF
24614cat confdefs.h >>conftest.$ac_ext
24615cat >>conftest.$ac_ext <<_ACEOF
24616/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024617$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024618int
24619main ()
24620{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024621
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024622 /* Are we little or big endian? From Harbison&Steele. */
24623 union
24624 {
24625 long int l;
24626 char c[sizeof (long int)];
24627 } u;
24628 u.l = 1;
24629 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024630
24631 ;
24632 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024633}
Martin v. Löwis11437992002-04-12 09:54:03 +000024634_ACEOF
24635rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024636if { (ac_try="$ac_link"
24637case "(($ac_try" in
24638 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24639 *) ac_try_echo=$ac_try;;
24640esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024641eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24642$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024643 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024644 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024645 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024646 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024647 { (case "(($ac_try" in
24648 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24649 *) ac_try_echo=$ac_try;;
24650esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024651eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24652$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024653 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024654 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024655 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024656 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024657 ac_cv_c_bigendian=no
24658else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024659 $as_echo "$as_me: program exited with status $ac_status" >&5
24660$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024661sed 's/^/| /' conftest.$ac_ext >&5
24662
Martin v. Löwis11437992002-04-12 09:54:03 +000024663( exit $ac_status )
24664ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024665fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024666rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024667rm -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 +000024668fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024669
24670
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024671 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024672fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024673{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24674$as_echo "$ac_cv_c_bigendian" >&6; }
24675 case $ac_cv_c_bigendian in #(
24676 yes)
24677 cat >>confdefs.h <<\_ACEOF
Ronald Oussoren5644eb72009-09-20 20:10:02 +000024678#define WORDS_BIGENDIAN 1
Benjamin Petersona8332062009-09-11 22:36:27 +000024679_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024680;; #(
24681 no)
24682 ;; #(
24683 universal)
24684
24685cat >>confdefs.h <<\_ACEOF
24686#define AC_APPLE_UNIVERSAL_BUILD 1
24687_ACEOF
24688
24689 ;; #(
24690 *)
24691 { { $as_echo "$as_me:$LINENO: error: unknown endianness
24692 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24693$as_echo "$as_me: error: unknown endianness
24694 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024695 { (exit 1); exit 1; }; } ;;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024696 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024697
Michael W. Hudson54241132001-12-07 15:38:26 +000024698
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024699# Check whether right shifting a negative integer extends the sign bit
24700# or fills with zeros (like the Cray J90, according to Tim Peters).
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024701{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24702$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024703if test "${ac_cv_rshift_extends_sign+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024704 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024705else
Martin v. Löwis11437992002-04-12 09:54:03 +000024706
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024707if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024708 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024709else
Martin v. Löwis11437992002-04-12 09:54:03 +000024710 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024711/* confdefs.h. */
24712_ACEOF
24713cat confdefs.h >>conftest.$ac_ext
24714cat >>conftest.$ac_ext <<_ACEOF
24715/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024716
24717int main()
24718{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024719 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024720}
24721
Martin v. Löwis11437992002-04-12 09:54:03 +000024722_ACEOF
24723rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024724if { (ac_try="$ac_link"
24725case "(($ac_try" in
24726 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24727 *) ac_try_echo=$ac_try;;
24728esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024729eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24730$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024731 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024732 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024733 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024734 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024735 { (case "(($ac_try" in
24736 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24737 *) ac_try_echo=$ac_try;;
24738esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024739eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24740$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024741 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024742 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024743 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024744 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024745 ac_cv_rshift_extends_sign=yes
24746else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024747 $as_echo "$as_me: program exited with status $ac_status" >&5
24748$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024749sed 's/^/| /' conftest.$ac_ext >&5
24750
Martin v. Löwis11437992002-04-12 09:54:03 +000024751( exit $ac_status )
24752ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024753fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024754rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024755rm -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 +000024756fi
24757
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024758
24759fi
24760
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024761{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24762$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024763if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024764then
Martin v. Löwis11437992002-04-12 09:54:03 +000024765
24766cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024767#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024768_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024769
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024770fi
24771
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024772# check for getc_unlocked and related locking functions
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024773{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24774$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024775if test "${ac_cv_have_getc_unlocked+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024776 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024777else
Martin v. Löwis11437992002-04-12 09:54:03 +000024778
24779cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024780/* confdefs.h. */
24781_ACEOF
24782cat confdefs.h >>conftest.$ac_ext
24783cat >>conftest.$ac_ext <<_ACEOF
24784/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024785#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024786int
24787main ()
24788{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024789
24790 FILE *f = fopen("/dev/null", "r");
24791 flockfile(f);
24792 getc_unlocked(f);
24793 funlockfile(f);
24794
Martin v. Löwis11437992002-04-12 09:54:03 +000024795 ;
24796 return 0;
24797}
24798_ACEOF
24799rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024800if { (ac_try="$ac_link"
24801case "(($ac_try" in
24802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24803 *) ac_try_echo=$ac_try;;
24804esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024805eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24806$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024807 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024808 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024809 grep -v '^ *+' conftest.er1 >conftest.err
24810 rm -f conftest.er1
24811 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024812 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024813 (exit $ac_status); } && {
24814 test -z "$ac_c_werror_flag" ||
24815 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024816 } && test -s conftest$ac_exeext && {
24817 test "$cross_compiling" = yes ||
24818 $as_test_x conftest$ac_exeext
24819 }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024820 ac_cv_have_getc_unlocked=yes
24821else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024822 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024823sed 's/^/| /' conftest.$ac_ext >&5
24824
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024825 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024827
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024828rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024829rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024830 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024831fi
24832
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024833{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24834$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024835if test "$ac_cv_have_getc_unlocked" = yes
24836then
Martin v. Löwis11437992002-04-12 09:54:03 +000024837
24838cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024839#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024840_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024841
24842fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024843
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024844# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024845# save the value of LIBS so we don't actually link Python with readline
24846LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024847
Gregory P. Smith18820942008-09-07 06:24:49 +000024848# On some systems we need to link readline to a termcap compatible
24849# library. NOTE: Keep the precedence of listed libraries synchronised
24850# with setup.py.
24851py_cv_lib_readline=no
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024852{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5
24853$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024854for py_libtermcap in "" ncursesw ncurses curses termcap; do
24855 if test -z "$py_libtermcap"; then
24856 READLINE_LIBS="-lreadline"
24857 else
24858 READLINE_LIBS="-lreadline -l$py_libtermcap"
24859 fi
24860 LIBS="$READLINE_LIBS $LIBS_no_readline"
24861 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024862/* confdefs.h. */
24863_ACEOF
24864cat confdefs.h >>conftest.$ac_ext
24865cat >>conftest.$ac_ext <<_ACEOF
24866/* end confdefs.h. */
24867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024868/* Override any GCC internal prototype to avoid an error.
24869 Use char because int might match the return type of a GCC
24870 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024871#ifdef __cplusplus
24872extern "C"
24873#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024874char readline ();
24875int
24876main ()
24877{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024878return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024879 ;
24880 return 0;
24881}
24882_ACEOF
24883rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024884if { (ac_try="$ac_link"
24885case "(($ac_try" in
24886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24887 *) ac_try_echo=$ac_try;;
24888esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024889eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24890$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024891 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024892 ac_status=$?
24893 grep -v '^ *+' conftest.er1 >conftest.err
24894 rm -f conftest.er1
24895 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024896 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024897 (exit $ac_status); } && {
24898 test -z "$ac_c_werror_flag" ||
24899 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024900 } && test -s conftest$ac_exeext && {
24901 test "$cross_compiling" = yes ||
24902 $as_test_x conftest$ac_exeext
24903 }; then
Gregory P. Smith18820942008-09-07 06:24:49 +000024904 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024905else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024906 $as_echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024907sed 's/^/| /' conftest.$ac_ext >&5
24908
Gregory P. Smith18820942008-09-07 06:24:49 +000024909
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024910fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024911
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024912rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024913rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024914 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000024915 if test $py_cv_lib_readline = yes; then
24916 break
24917 fi
24918done
24919# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24920#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000024921if test $py_cv_lib_readline = no; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024922 { $as_echo "$as_me:$LINENO: result: none" >&5
24923$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024924else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024925 { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24926$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000024927
24928cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024929#define HAVE_LIBREADLINE 1
24930_ACEOF
24931
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024932fi
24933
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024934# check for readline 2.1
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024935{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24936$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024937if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024938 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024939else
24940 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000024941LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024942cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024943/* confdefs.h. */
24944_ACEOF
24945cat confdefs.h >>conftest.$ac_ext
24946cat >>conftest.$ac_ext <<_ACEOF
24947/* end confdefs.h. */
24948
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024949/* Override any GCC internal prototype to avoid an error.
24950 Use char because int might match the return type of a GCC
24951 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024952#ifdef __cplusplus
24953extern "C"
24954#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024955char rl_callback_handler_install ();
24956int
24957main ()
24958{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024959return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024960 ;
24961 return 0;
24962}
24963_ACEOF
24964rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024965if { (ac_try="$ac_link"
24966case "(($ac_try" in
24967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24968 *) ac_try_echo=$ac_try;;
24969esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024970eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24971$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024972 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024974 grep -v '^ *+' conftest.er1 >conftest.err
24975 rm -f conftest.er1
24976 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024977 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024978 (exit $ac_status); } && {
24979 test -z "$ac_c_werror_flag" ||
24980 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024981 } && test -s conftest$ac_exeext && {
24982 test "$cross_compiling" = yes ||
24983 $as_test_x conftest$ac_exeext
24984 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024985 ac_cv_lib_readline_rl_callback_handler_install=yes
24986else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024987 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024988sed 's/^/| /' conftest.$ac_ext >&5
24989
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024990 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024991fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024992
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024993rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024994rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024995 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024996LIBS=$ac_check_lib_save_LIBS
24997fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000024998{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24999$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25000if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025001
25002cat >>confdefs.h <<\_ACEOF
25003#define HAVE_RL_CALLBACK 1
25004_ACEOF
25005
25006fi
25007
25008
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025009# check for readline 2.2
25010cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025011/* confdefs.h. */
25012_ACEOF
25013cat confdefs.h >>conftest.$ac_ext
25014cat >>conftest.$ac_ext <<_ACEOF
25015/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025016#include <readline/readline.h>
25017_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025018if { (ac_try="$ac_cpp conftest.$ac_ext"
25019case "(($ac_try" in
25020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25021 *) ac_try_echo=$ac_try;;
25022esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025023eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25024$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025025 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025026 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025027 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025028 rm -f conftest.er1
25029 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025030 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025031 (exit $ac_status); } >/dev/null && {
25032 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25033 test ! -s conftest.err
25034 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025035 have_readline=yes
25036else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025037 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025038sed 's/^/| /' conftest.$ac_ext >&5
25039
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025040 have_readline=no
25041fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025042
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025043rm -f conftest.err conftest.$ac_ext
25044if test $have_readline = yes
25045then
25046 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025047/* confdefs.h. */
25048_ACEOF
25049cat confdefs.h >>conftest.$ac_ext
25050cat >>conftest.$ac_ext <<_ACEOF
25051/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025052#include <readline/readline.h>
25053
25054_ACEOF
25055if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025056 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025057
25058cat >>confdefs.h <<\_ACEOF
25059#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25060_ACEOF
25061
25062fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000025063rm -f conftest*
Antoine Pitrou37276002009-10-26 19:32:51 +000025064
25065 cat >conftest.$ac_ext <<_ACEOF
25066/* confdefs.h. */
25067_ACEOF
25068cat confdefs.h >>conftest.$ac_ext
25069cat >>conftest.$ac_ext <<_ACEOF
25070/* end confdefs.h. */
25071#include <readline/readline.h>
25072
25073_ACEOF
25074if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25075 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
25076
25077cat >>confdefs.h <<\_ACEOF
25078#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
25079_ACEOF
25080
25081fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000025082rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025083
25084fi
25085
Martin v. Löwis0daad592001-09-30 21:09:59 +000025086# check for readline 4.0
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025087{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25088$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025089if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025090 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025091else
Martin v. Löwis11437992002-04-12 09:54:03 +000025092 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025093LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025094cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025095/* confdefs.h. */
25096_ACEOF
25097cat confdefs.h >>conftest.$ac_ext
25098cat >>conftest.$ac_ext <<_ACEOF
25099/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025100
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025101/* Override any GCC internal prototype to avoid an error.
25102 Use char because int might match the return type of a GCC
25103 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025104#ifdef __cplusplus
25105extern "C"
25106#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025107char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025108int
25109main ()
25110{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025111return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025112 ;
25113 return 0;
25114}
25115_ACEOF
25116rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025117if { (ac_try="$ac_link"
25118case "(($ac_try" in
25119 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25120 *) ac_try_echo=$ac_try;;
25121esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025122eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25123$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025124 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025125 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025126 grep -v '^ *+' conftest.er1 >conftest.err
25127 rm -f conftest.er1
25128 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025129 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025130 (exit $ac_status); } && {
25131 test -z "$ac_c_werror_flag" ||
25132 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025133 } && test -s conftest$ac_exeext && {
25134 test "$cross_compiling" = yes ||
25135 $as_test_x conftest$ac_exeext
25136 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025137 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025138else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025139 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025140sed 's/^/| /' conftest.$ac_ext >&5
25141
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025142 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025143fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025144
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025145rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025146rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025147 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025148LIBS=$ac_check_lib_save_LIBS
25149fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025150{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25151$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25152if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025153
Martin v. Löwis11437992002-04-12 09:54:03 +000025154cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025155#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025156_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025157
Martin v. Löwis0daad592001-09-30 21:09:59 +000025158fi
25159
Michael W. Hudson54241132001-12-07 15:38:26 +000025160
Thomas Wouters89d996e2007-09-08 17:39:28 +000025161# also in 4.0
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025162{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25163$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025164if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025165 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025166else
25167 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025168LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025169cat >conftest.$ac_ext <<_ACEOF
25170/* confdefs.h. */
25171_ACEOF
25172cat confdefs.h >>conftest.$ac_ext
25173cat >>conftest.$ac_ext <<_ACEOF
25174/* end confdefs.h. */
25175
25176/* Override any GCC internal prototype to avoid an error.
25177 Use char because int might match the return type of a GCC
25178 builtin and then its argument prototype would still apply. */
25179#ifdef __cplusplus
25180extern "C"
25181#endif
25182char rl_completion_display_matches_hook ();
25183int
25184main ()
25185{
25186return rl_completion_display_matches_hook ();
25187 ;
25188 return 0;
25189}
25190_ACEOF
25191rm -f conftest.$ac_objext conftest$ac_exeext
25192if { (ac_try="$ac_link"
25193case "(($ac_try" in
25194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25195 *) ac_try_echo=$ac_try;;
25196esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025197eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25198$as_echo "$ac_try_echo") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025199 (eval "$ac_link") 2>conftest.er1
25200 ac_status=$?
25201 grep -v '^ *+' conftest.er1 >conftest.err
25202 rm -f conftest.er1
25203 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025204 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025205 (exit $ac_status); } && {
25206 test -z "$ac_c_werror_flag" ||
25207 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025208 } && test -s conftest$ac_exeext && {
25209 test "$cross_compiling" = yes ||
25210 $as_test_x conftest$ac_exeext
25211 }; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025212 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25213else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025214 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025215sed 's/^/| /' conftest.$ac_ext >&5
25216
25217 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25218fi
25219
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025220rm -rf conftest.dSYM
Thomas Wouters89d996e2007-09-08 17:39:28 +000025221rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25222 conftest$ac_exeext conftest.$ac_ext
25223LIBS=$ac_check_lib_save_LIBS
25224fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025225{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25226$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25227if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025228
25229cat >>confdefs.h <<\_ACEOF
25230#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25231_ACEOF
25232
25233fi
25234
25235
Martin v. Löwis0daad592001-09-30 21:09:59 +000025236# check for readline 4.2
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025237{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25238$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025239if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025240 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025241else
Martin v. Löwis11437992002-04-12 09:54:03 +000025242 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025243LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025244cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025245/* confdefs.h. */
25246_ACEOF
25247cat confdefs.h >>conftest.$ac_ext
25248cat >>conftest.$ac_ext <<_ACEOF
25249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025251/* Override any GCC internal prototype to avoid an error.
25252 Use char because int might match the return type of a GCC
25253 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025254#ifdef __cplusplus
25255extern "C"
25256#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025257char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025258int
25259main ()
25260{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025261return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025262 ;
25263 return 0;
25264}
25265_ACEOF
25266rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025267if { (ac_try="$ac_link"
25268case "(($ac_try" in
25269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25270 *) ac_try_echo=$ac_try;;
25271esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025272eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25273$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025274 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025276 grep -v '^ *+' conftest.er1 >conftest.err
25277 rm -f conftest.er1
25278 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025279 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025280 (exit $ac_status); } && {
25281 test -z "$ac_c_werror_flag" ||
25282 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025283 } && test -s conftest$ac_exeext && {
25284 test "$cross_compiling" = yes ||
25285 $as_test_x conftest$ac_exeext
25286 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025287 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025288else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025289 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025290sed 's/^/| /' conftest.$ac_ext >&5
25291
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025292 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000025293fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025294
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025295rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025296rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025297 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025298LIBS=$ac_check_lib_save_LIBS
25299fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025300{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
25301$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
25302if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025303
Martin v. Löwis11437992002-04-12 09:54:03 +000025304cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025305#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025306_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000025307
Guido van Rossum353ae582001-07-10 16:45:32 +000025308fi
25309
Jack Jansendd19cf82001-12-06 22:36:17 +000025310
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025311# also in readline 4.2
25312cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025313/* confdefs.h. */
25314_ACEOF
25315cat confdefs.h >>conftest.$ac_ext
25316cat >>conftest.$ac_ext <<_ACEOF
25317/* end confdefs.h. */
25318#include <readline/readline.h>
25319_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025320if { (ac_try="$ac_cpp conftest.$ac_ext"
25321case "(($ac_try" in
25322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25323 *) ac_try_echo=$ac_try;;
25324esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025325eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25326$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025327 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025328 ac_status=$?
25329 grep -v '^ *+' conftest.er1 >conftest.err
25330 rm -f conftest.er1
25331 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025332 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025333 (exit $ac_status); } >/dev/null && {
25334 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25335 test ! -s conftest.err
25336 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025337 have_readline=yes
25338else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025339 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025340sed 's/^/| /' conftest.$ac_ext >&5
25341
25342 have_readline=no
25343fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025344
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025345rm -f conftest.err conftest.$ac_ext
25346if test $have_readline = yes
25347then
25348 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025349/* confdefs.h. */
25350_ACEOF
25351cat confdefs.h >>conftest.$ac_ext
25352cat >>conftest.$ac_ext <<_ACEOF
25353/* end confdefs.h. */
25354#include <readline/readline.h>
25355
25356_ACEOF
25357if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25358 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
25359
25360cat >>confdefs.h <<\_ACEOF
25361#define HAVE_RL_CATCH_SIGNAL 1
25362_ACEOF
25363
25364fi
Jesus Cea0f752ee2010-04-28 12:03:06 +000025365rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025366
25367fi
25368
Martin v. Löwis82bca632006-02-10 20:49:30 +000025369# End of readline checks: restore LIBS
25370LIBS=$LIBS_no_readline
25371
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025372{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5
25373$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025374if test "${ac_cv_broken_nice+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025375 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000025376else
Martin v. Löwis11437992002-04-12 09:54:03 +000025377
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025378if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025379 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025380else
Martin v. Löwis11437992002-04-12 09:54:03 +000025381 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025382/* confdefs.h. */
25383_ACEOF
25384cat confdefs.h >>conftest.$ac_ext
25385cat >>conftest.$ac_ext <<_ACEOF
25386/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025387
25388int main()
25389{
25390 int val1 = nice(1);
25391 if (val1 != -1 && val1 == nice(2))
25392 exit(0);
25393 exit(1);
25394}
25395
Martin v. Löwis11437992002-04-12 09:54:03 +000025396_ACEOF
25397rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025398if { (ac_try="$ac_link"
25399case "(($ac_try" in
25400 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25401 *) ac_try_echo=$ac_try;;
25402esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025403eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25404$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025405 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025406 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025407 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025408 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025409 { (case "(($ac_try" in
25410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25411 *) ac_try_echo=$ac_try;;
25412esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025413eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25414$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025415 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025416 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025417 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025418 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025419 ac_cv_broken_nice=yes
25420else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025421 $as_echo "$as_me: program exited with status $ac_status" >&5
25422$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025423sed 's/^/| /' conftest.$ac_ext >&5
25424
Martin v. Löwis11437992002-04-12 09:54:03 +000025425( exit $ac_status )
25426ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025427fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025428rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025429rm -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 +000025430fi
25431
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025432
25433fi
25434
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025435{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
25436$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025437if test "$ac_cv_broken_nice" = yes
25438then
Martin v. Löwis11437992002-04-12 09:54:03 +000025439
25440cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025441#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025442_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000025443
25444fi
25445
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025446{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5
25447$as_echo_n "checking for broken poll()... " >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025448if test "$cross_compiling" = yes; then
25449 ac_cv_broken_poll=no
25450else
25451 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025452/* confdefs.h. */
25453_ACEOF
25454cat confdefs.h >>conftest.$ac_ext
25455cat >>conftest.$ac_ext <<_ACEOF
25456/* end confdefs.h. */
25457
25458#include <poll.h>
25459
25460int main (void)
25461 {
25462 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
25463
25464 close (42);
25465
25466 int poll_test = poll (&poll_struct, 1, 0);
25467
25468 if (poll_test < 0)
25469 {
25470 exit(0);
25471 }
25472 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
25473 {
25474 exit(0);
25475 }
25476 else
25477 {
25478 exit(1);
25479 }
25480 }
25481
25482_ACEOF
25483rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025484if { (ac_try="$ac_link"
25485case "(($ac_try" in
25486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25487 *) ac_try_echo=$ac_try;;
25488esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025489eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25490$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025491 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025492 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025493 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025494 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025495 { (case "(($ac_try" in
25496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25497 *) ac_try_echo=$ac_try;;
25498esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025499eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25500$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025501 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025502 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025503 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025504 (exit $ac_status); }; }; then
25505 ac_cv_broken_poll=yes
25506else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025507 $as_echo "$as_me: program exited with status $ac_status" >&5
25508$as_echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025509sed 's/^/| /' conftest.$ac_ext >&5
25510
25511( exit $ac_status )
25512ac_cv_broken_poll=no
25513fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025514rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025515rm -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 +000025516fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025517
25518
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025519{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
25520$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025521if test "$ac_cv_broken_poll" = yes
25522then
25523
25524cat >>confdefs.h <<\_ACEOF
25525#define HAVE_BROKEN_POLL 1
25526_ACEOF
25527
25528fi
25529
Brett Cannon43802422005-02-10 20:48:03 +000025530# 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 +000025531# (which is not required by ISO C or UNIX spec) and/or if we support
25532# tzname[]
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025533{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
25534$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025535if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025536 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000025537else
25538 cat >conftest.$ac_ext <<_ACEOF
25539/* confdefs.h. */
25540_ACEOF
25541cat confdefs.h >>conftest.$ac_ext
25542cat >>conftest.$ac_ext <<_ACEOF
25543/* end confdefs.h. */
25544#include <sys/types.h>
25545#include <$ac_cv_struct_tm>
25546
25547
25548int
25549main ()
25550{
25551static struct tm ac_aggr;
25552if (ac_aggr.tm_zone)
25553return 0;
25554 ;
25555 return 0;
25556}
25557_ACEOF
25558rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025559if { (ac_try="$ac_compile"
25560case "(($ac_try" in
25561 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25562 *) ac_try_echo=$ac_try;;
25563esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025564eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25565$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025566 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025567 ac_status=$?
25568 grep -v '^ *+' conftest.er1 >conftest.err
25569 rm -f conftest.er1
25570 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025571 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025572 (exit $ac_status); } && {
25573 test -z "$ac_c_werror_flag" ||
25574 test ! -s conftest.err
25575 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025576 ac_cv_member_struct_tm_tm_zone=yes
25577else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025578 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025579sed 's/^/| /' conftest.$ac_ext >&5
25580
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025581 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000025582/* confdefs.h. */
25583_ACEOF
25584cat confdefs.h >>conftest.$ac_ext
25585cat >>conftest.$ac_ext <<_ACEOF
25586/* end confdefs.h. */
25587#include <sys/types.h>
25588#include <$ac_cv_struct_tm>
25589
25590
25591int
25592main ()
25593{
25594static struct tm ac_aggr;
25595if (sizeof ac_aggr.tm_zone)
25596return 0;
25597 ;
25598 return 0;
25599}
25600_ACEOF
25601rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025602if { (ac_try="$ac_compile"
25603case "(($ac_try" in
25604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25605 *) ac_try_echo=$ac_try;;
25606esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025607eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25608$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025609 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025610 ac_status=$?
25611 grep -v '^ *+' conftest.er1 >conftest.err
25612 rm -f conftest.er1
25613 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025614 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025615 (exit $ac_status); } && {
25616 test -z "$ac_c_werror_flag" ||
25617 test ! -s conftest.err
25618 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025619 ac_cv_member_struct_tm_tm_zone=yes
25620else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025621 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025622sed 's/^/| /' conftest.$ac_ext >&5
25623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025624 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025626
25627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025628fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025629
25630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025631fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025632{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25633$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
25634if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025635
25636cat >>confdefs.h <<_ACEOF
25637#define HAVE_STRUCT_TM_TM_ZONE 1
25638_ACEOF
25639
25640
25641fi
25642
25643if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25644
25645cat >>confdefs.h <<\_ACEOF
25646#define HAVE_TM_ZONE 1
25647_ACEOF
25648
25649else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025650 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25651$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025652if test "${ac_cv_have_decl_tzname+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025653 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025654else
25655 cat >conftest.$ac_ext <<_ACEOF
25656/* confdefs.h. */
25657_ACEOF
25658cat confdefs.h >>conftest.$ac_ext
25659cat >>conftest.$ac_ext <<_ACEOF
25660/* end confdefs.h. */
25661#include <time.h>
25662
25663int
25664main ()
25665{
25666#ifndef tzname
25667 (void) tzname;
25668#endif
25669
25670 ;
25671 return 0;
25672}
25673_ACEOF
25674rm -f conftest.$ac_objext
25675if { (ac_try="$ac_compile"
25676case "(($ac_try" in
25677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25678 *) ac_try_echo=$ac_try;;
25679esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025680eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25681$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025682 (eval "$ac_compile") 2>conftest.er1
25683 ac_status=$?
25684 grep -v '^ *+' conftest.er1 >conftest.err
25685 rm -f conftest.er1
25686 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025687 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025688 (exit $ac_status); } && {
25689 test -z "$ac_c_werror_flag" ||
25690 test ! -s conftest.err
25691 } && test -s conftest.$ac_objext; then
25692 ac_cv_have_decl_tzname=yes
25693else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025694 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025695sed 's/^/| /' conftest.$ac_ext >&5
25696
25697 ac_cv_have_decl_tzname=no
25698fi
25699
25700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25701fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025702{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25703$as_echo "$ac_cv_have_decl_tzname" >&6; }
25704if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025705
25706cat >>confdefs.h <<_ACEOF
25707#define HAVE_DECL_TZNAME 1
25708_ACEOF
25709
25710
25711else
25712 cat >>confdefs.h <<_ACEOF
25713#define HAVE_DECL_TZNAME 0
25714_ACEOF
25715
25716
25717fi
25718
25719
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025720 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
25721$as_echo_n "checking for tzname... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025722if test "${ac_cv_var_tzname+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025723 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000025724else
25725 cat >conftest.$ac_ext <<_ACEOF
25726/* confdefs.h. */
25727_ACEOF
25728cat confdefs.h >>conftest.$ac_ext
25729cat >>conftest.$ac_ext <<_ACEOF
25730/* end confdefs.h. */
25731#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025732#if !HAVE_DECL_TZNAME
25733extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025734#endif
25735
25736int
25737main ()
25738{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025739return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025740 ;
25741 return 0;
25742}
25743_ACEOF
25744rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025745if { (ac_try="$ac_link"
25746case "(($ac_try" in
25747 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25748 *) ac_try_echo=$ac_try;;
25749esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025750eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25751$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025752 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025753 ac_status=$?
25754 grep -v '^ *+' conftest.er1 >conftest.err
25755 rm -f conftest.er1
25756 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025757 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025758 (exit $ac_status); } && {
25759 test -z "$ac_c_werror_flag" ||
25760 test ! -s conftest.err
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025761 } && test -s conftest$ac_exeext && {
25762 test "$cross_compiling" = yes ||
25763 $as_test_x conftest$ac_exeext
25764 }; then
Brett Cannon43802422005-02-10 20:48:03 +000025765 ac_cv_var_tzname=yes
25766else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025767 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025768sed 's/^/| /' conftest.$ac_ext >&5
25769
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025770 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025772
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025773rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025774rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025775 conftest$ac_exeext conftest.$ac_ext
25776fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025777{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25778$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025779 if test $ac_cv_var_tzname = yes; then
25780
25781cat >>confdefs.h <<\_ACEOF
25782#define HAVE_TZNAME 1
25783_ACEOF
25784
25785 fi
25786fi
25787
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025788
Martin v. Löwis1d459062005-03-14 21:23:33 +000025789# check tzset(3) exists and works like we expect it to
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025790{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5
25791$as_echo_n "checking for working tzset()... " >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025792if test "${ac_cv_working_tzset+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025793 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025794else
25795
25796if test "$cross_compiling" = yes; then
25797 ac_cv_working_tzset=no
25798else
25799 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025800/* confdefs.h. */
25801_ACEOF
25802cat confdefs.h >>conftest.$ac_ext
25803cat >>conftest.$ac_ext <<_ACEOF
25804/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025805
25806#include <stdlib.h>
25807#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025808#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025809
25810#if HAVE_TZNAME
25811extern char *tzname[];
25812#endif
25813
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025814int main()
25815{
Brett Cannon18367812003-09-19 00:59:16 +000025816 /* Note that we need to ensure that not only does tzset(3)
25817 do 'something' with localtime, but it works as documented
25818 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025819 This includes making sure that tzname is set properly if
25820 tm->tm_zone does not exist since it is the alternative way
25821 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025822
25823 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025824 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025825 */
25826
Martin v. Löwis1d459062005-03-14 21:23:33 +000025827 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025828 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25829
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025830 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025831 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025832 if (localtime(&groundhogday)->tm_hour != 0)
25833 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025834#if HAVE_TZNAME
25835 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25836 if (strcmp(tzname[0], "UTC") ||
25837 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25838 exit(1);
25839#endif
Brett Cannon18367812003-09-19 00:59:16 +000025840
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025841 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025842 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025843 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025844 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025845#if HAVE_TZNAME
25846 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25847 exit(1);
25848#endif
Brett Cannon18367812003-09-19 00:59:16 +000025849
25850 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25851 tzset();
25852 if (localtime(&groundhogday)->tm_hour != 11)
25853 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025854#if HAVE_TZNAME
25855 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25856 exit(1);
25857#endif
25858
25859#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025860 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25861 exit(1);
25862 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25863 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025864#endif
Brett Cannon18367812003-09-19 00:59:16 +000025865
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025866 exit(0);
25867}
25868
25869_ACEOF
25870rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025871if { (ac_try="$ac_link"
25872case "(($ac_try" in
25873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25874 *) ac_try_echo=$ac_try;;
25875esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025876eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25877$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025878 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025879 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025880 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025881 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025882 { (case "(($ac_try" in
25883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25884 *) ac_try_echo=$ac_try;;
25885esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025886eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25887$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025888 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025889 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025890 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025891 (exit $ac_status); }; }; then
25892 ac_cv_working_tzset=yes
25893else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025894 $as_echo "$as_me: program exited with status $ac_status" >&5
25895$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025896sed 's/^/| /' conftest.$ac_ext >&5
25897
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025898( exit $ac_status )
25899ac_cv_working_tzset=no
25900fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025901rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025902rm -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 +000025903fi
25904
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025905
25906fi
25907
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025908{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25909$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025910if test "$ac_cv_working_tzset" = yes
25911then
25912
25913cat >>confdefs.h <<\_ACEOF
25914#define HAVE_WORKING_TZSET 1
25915_ACEOF
25916
25917fi
25918
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025919# Look for subsecond timestamps in struct stat
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025920{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25921$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025922if test "${ac_cv_stat_tv_nsec+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025923 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025924else
25925 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025926/* confdefs.h. */
25927_ACEOF
25928cat confdefs.h >>conftest.$ac_ext
25929cat >>conftest.$ac_ext <<_ACEOF
25930/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025931#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025932int
25933main ()
25934{
25935
25936struct stat st;
25937st.st_mtim.tv_nsec = 1;
25938
25939 ;
25940 return 0;
25941}
25942_ACEOF
25943rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025944if { (ac_try="$ac_compile"
25945case "(($ac_try" in
25946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25947 *) ac_try_echo=$ac_try;;
25948esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025949eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25950$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025952 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025953 grep -v '^ *+' conftest.er1 >conftest.err
25954 rm -f conftest.er1
25955 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025956 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025957 (exit $ac_status); } && {
25958 test -z "$ac_c_werror_flag" ||
25959 test ! -s conftest.err
25960 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025961 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025962else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025963 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025964sed 's/^/| /' conftest.$ac_ext >&5
25965
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025966 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025967fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000025968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25970fi
25971
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025972{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25973$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025974if test "$ac_cv_stat_tv_nsec" = yes
25975then
25976
25977cat >>confdefs.h <<\_ACEOF
25978#define HAVE_STAT_TV_NSEC 1
25979_ACEOF
25980
25981fi
25982
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025983# Look for BSD style subsecond timestamps in struct stat
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025984{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25985$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025986if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000025987 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025988else
25989 cat >conftest.$ac_ext <<_ACEOF
25990/* confdefs.h. */
25991_ACEOF
25992cat confdefs.h >>conftest.$ac_ext
25993cat >>conftest.$ac_ext <<_ACEOF
25994/* end confdefs.h. */
25995#include <sys/stat.h>
25996int
25997main ()
25998{
25999
26000struct stat st;
26001st.st_mtimespec.tv_nsec = 1;
26002
26003 ;
26004 return 0;
26005}
26006_ACEOF
26007rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026008if { (ac_try="$ac_compile"
26009case "(($ac_try" in
26010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26011 *) ac_try_echo=$ac_try;;
26012esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026013eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26014$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026015 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026016 ac_status=$?
26017 grep -v '^ *+' conftest.er1 >conftest.err
26018 rm -f conftest.er1
26019 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026020 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026021 (exit $ac_status); } && {
26022 test -z "$ac_c_werror_flag" ||
26023 test ! -s conftest.err
26024 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026025 ac_cv_stat_tv_nsec2=yes
26026else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026027 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026028sed 's/^/| /' conftest.$ac_ext >&5
26029
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026030 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026031fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26034fi
26035
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026036{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26037$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026038if test "$ac_cv_stat_tv_nsec2" = yes
26039then
26040
26041cat >>confdefs.h <<\_ACEOF
26042#define HAVE_STAT_TV_NSEC2 1
26043_ACEOF
26044
26045fi
26046
Jack Jansen666b1e72001-10-31 12:11:48 +000026047# On HP/UX 11.0, mvwdelch is a block with a return statement
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026048{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26049$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026050if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026051 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026052else
Martin v. Löwis11437992002-04-12 09:54:03 +000026053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026054/* confdefs.h. */
26055_ACEOF
26056cat confdefs.h >>conftest.$ac_ext
26057cat >>conftest.$ac_ext <<_ACEOF
26058/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026059#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026060int
26061main ()
26062{
Jack Jansen666b1e72001-10-31 12:11:48 +000026063
26064 int rtn;
26065 rtn = mvwdelch(0,0,0);
26066
Martin v. Löwis11437992002-04-12 09:54:03 +000026067 ;
26068 return 0;
26069}
26070_ACEOF
26071rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026072if { (ac_try="$ac_compile"
26073case "(($ac_try" in
26074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26075 *) ac_try_echo=$ac_try;;
26076esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026077eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26078$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026079 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026081 grep -v '^ *+' conftest.er1 >conftest.err
26082 rm -f conftest.er1
26083 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026084 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026085 (exit $ac_status); } && {
26086 test -z "$ac_c_werror_flag" ||
26087 test ! -s conftest.err
26088 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026089 ac_cv_mvwdelch_is_expression=yes
26090else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026091 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026092sed 's/^/| /' conftest.$ac_ext >&5
26093
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026094 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026095fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026096
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26098fi
26099
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026100{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26101$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026102
26103if test "$ac_cv_mvwdelch_is_expression" = yes
26104then
Martin v. Löwis11437992002-04-12 09:54:03 +000026105
26106cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026107#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026108_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026109
26110fi
26111
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026112{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26113$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026114if test "${ac_cv_window_has_flags+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026115 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026116else
Martin v. Löwis11437992002-04-12 09:54:03 +000026117 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026118/* confdefs.h. */
26119_ACEOF
26120cat confdefs.h >>conftest.$ac_ext
26121cat >>conftest.$ac_ext <<_ACEOF
26122/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026123#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026124int
26125main ()
26126{
Jack Jansen666b1e72001-10-31 12:11:48 +000026127
26128 WINDOW *w;
26129 w->_flags = 0;
26130
Martin v. Löwis11437992002-04-12 09:54:03 +000026131 ;
26132 return 0;
26133}
26134_ACEOF
26135rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026136if { (ac_try="$ac_compile"
26137case "(($ac_try" in
26138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26139 *) ac_try_echo=$ac_try;;
26140esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026141eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26142$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026143 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026144 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026145 grep -v '^ *+' conftest.er1 >conftest.err
26146 rm -f conftest.er1
26147 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026148 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026149 (exit $ac_status); } && {
26150 test -z "$ac_c_werror_flag" ||
26151 test ! -s conftest.err
26152 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026153 ac_cv_window_has_flags=yes
26154else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026155 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026156sed 's/^/| /' conftest.$ac_ext >&5
26157
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026158 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026159fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26162fi
26163
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026164{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26165$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026166
Jack Jansen666b1e72001-10-31 12:11:48 +000026167
26168if test "$ac_cv_window_has_flags" = yes
26169then
Martin v. Löwis11437992002-04-12 09:54:03 +000026170
26171cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026172#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026173_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026174
26175fi
26176
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026177{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5
26178$as_echo_n "checking for is_term_resized... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026179cat >conftest.$ac_ext <<_ACEOF
26180/* confdefs.h. */
26181_ACEOF
26182cat confdefs.h >>conftest.$ac_ext
26183cat >>conftest.$ac_ext <<_ACEOF
26184/* end confdefs.h. */
26185#include <curses.h>
26186int
26187main ()
26188{
26189void *x=is_term_resized
26190 ;
26191 return 0;
26192}
26193_ACEOF
26194rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026195if { (ac_try="$ac_compile"
26196case "(($ac_try" in
26197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26198 *) ac_try_echo=$ac_try;;
26199esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026200eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26201$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026202 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026203 ac_status=$?
26204 grep -v '^ *+' conftest.er1 >conftest.err
26205 rm -f conftest.er1
26206 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026207 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026208 (exit $ac_status); } && {
26209 test -z "$ac_c_werror_flag" ||
26210 test ! -s conftest.err
26211 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026212
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026213cat >>confdefs.h <<\_ACEOF
26214#define HAVE_CURSES_IS_TERM_RESIZED 1
26215_ACEOF
26216
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026217 { $as_echo "$as_me:$LINENO: result: yes" >&5
26218$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026219else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026220 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026221sed 's/^/| /' conftest.$ac_ext >&5
26222
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026223 { $as_echo "$as_me:$LINENO: result: no" >&5
26224$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026225
26226fi
26227
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26229
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026230{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5
26231$as_echo_n "checking for resize_term... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026232cat >conftest.$ac_ext <<_ACEOF
26233/* confdefs.h. */
26234_ACEOF
26235cat confdefs.h >>conftest.$ac_ext
26236cat >>conftest.$ac_ext <<_ACEOF
26237/* end confdefs.h. */
26238#include <curses.h>
26239int
26240main ()
26241{
26242void *x=resize_term
26243 ;
26244 return 0;
26245}
26246_ACEOF
26247rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026248if { (ac_try="$ac_compile"
26249case "(($ac_try" in
26250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26251 *) ac_try_echo=$ac_try;;
26252esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026253eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26254$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026255 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026256 ac_status=$?
26257 grep -v '^ *+' conftest.er1 >conftest.err
26258 rm -f conftest.er1
26259 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026260 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026261 (exit $ac_status); } && {
26262 test -z "$ac_c_werror_flag" ||
26263 test ! -s conftest.err
26264 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026265
26266cat >>confdefs.h <<\_ACEOF
26267#define HAVE_CURSES_RESIZE_TERM 1
26268_ACEOF
26269
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026270 { $as_echo "$as_me:$LINENO: result: yes" >&5
26271$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026272else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026273 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026274sed 's/^/| /' conftest.$ac_ext >&5
26275
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026276 { $as_echo "$as_me:$LINENO: result: no" >&5
26277$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026278
26279fi
26280
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26282
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026283{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5
26284$as_echo_n "checking for resizeterm... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026285cat >conftest.$ac_ext <<_ACEOF
26286/* confdefs.h. */
26287_ACEOF
26288cat confdefs.h >>conftest.$ac_ext
26289cat >>conftest.$ac_ext <<_ACEOF
26290/* end confdefs.h. */
26291#include <curses.h>
26292int
26293main ()
26294{
26295void *x=resizeterm
26296 ;
26297 return 0;
26298}
26299_ACEOF
26300rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026301if { (ac_try="$ac_compile"
26302case "(($ac_try" in
26303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26304 *) ac_try_echo=$ac_try;;
26305esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026306eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26307$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026308 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026309 ac_status=$?
26310 grep -v '^ *+' conftest.er1 >conftest.err
26311 rm -f conftest.er1
26312 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026313 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026314 (exit $ac_status); } && {
26315 test -z "$ac_c_werror_flag" ||
26316 test ! -s conftest.err
26317 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026318
26319cat >>confdefs.h <<\_ACEOF
26320#define HAVE_CURSES_RESIZETERM 1
26321_ACEOF
26322
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026323 { $as_echo "$as_me:$LINENO: result: yes" >&5
26324$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026325else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026326 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026327sed 's/^/| /' conftest.$ac_ext >&5
26328
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026329 { $as_echo "$as_me:$LINENO: result: no" >&5
26330$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026331
26332fi
26333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26335
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026336{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
26337$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026338
26339if test -r /dev/ptmx
26340then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026341 { $as_echo "$as_me:$LINENO: result: yes" >&5
26342$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026343
26344cat >>confdefs.h <<\_ACEOF
26345#define HAVE_DEV_PTMX 1
26346_ACEOF
26347
Thomas Wouters89f507f2006-12-13 04:49:30 +000026348else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026349 { $as_echo "$as_me:$LINENO: result: no" >&5
26350$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026351fi
26352
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026353{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5
26354$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000026355
26356if test -r /dev/ptc
26357then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026358 { $as_echo "$as_me:$LINENO: result: yes" >&5
26359$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026360
26361cat >>confdefs.h <<\_ACEOF
26362#define HAVE_DEV_PTC 1
26363_ACEOF
26364
Thomas Wouters89f507f2006-12-13 04:49:30 +000026365else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026366 { $as_echo "$as_me:$LINENO: result: no" >&5
26367$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000026368fi
26369
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026370{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
26371$as_echo_n "checking for %zd printf() format support... " >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000026372if test "$cross_compiling" = yes; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026373 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
26374$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
26375{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000026376See \`config.log' for more details." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026377$as_echo "$as_me: error: cannot run test program while cross compiling
Thomas Wouters477c8d52006-05-27 19:21:47 +000026378See \`config.log' for more details." >&2;}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026379 { (exit 1); exit 1; }; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000026380else
26381 cat >conftest.$ac_ext <<_ACEOF
26382/* confdefs.h. */
26383_ACEOF
26384cat confdefs.h >>conftest.$ac_ext
26385cat >>conftest.$ac_ext <<_ACEOF
26386/* end confdefs.h. */
26387#include <stdio.h>
26388#include <stddef.h>
26389#include <string.h>
26390
Christian Heimes2c181612007-12-17 20:04:13 +000026391#ifdef HAVE_SYS_TYPES_H
26392#include <sys/types.h>
26393#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000026394
26395#ifdef HAVE_SSIZE_T
26396typedef ssize_t Py_ssize_t;
26397#elif SIZEOF_VOID_P == SIZEOF_LONG
26398typedef long Py_ssize_t;
26399#else
26400typedef int Py_ssize_t;
26401#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000026402
Christian Heimes2c181612007-12-17 20:04:13 +000026403int main()
26404{
26405 char buffer[256];
26406
Thomas Wouters477c8d52006-05-27 19:21:47 +000026407 if(sprintf(buffer, "%zd", (size_t)123) < 0)
26408 return 1;
26409
Thomas Wouters89f507f2006-12-13 04:49:30 +000026410 if (strcmp(buffer, "123"))
26411 return 1;
26412
26413 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
26414 return 1;
26415
26416 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000026417 return 1;
26418
26419 return 0;
26420}
26421_ACEOF
26422rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026423if { (ac_try="$ac_link"
26424case "(($ac_try" in
26425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26426 *) ac_try_echo=$ac_try;;
26427esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026428eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26429$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026430 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026431 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026432 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026433 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026434 { (case "(($ac_try" in
26435 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26436 *) ac_try_echo=$ac_try;;
26437esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026438eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26439$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026440 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026441 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026442 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026443 (exit $ac_status); }; }; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026444 { $as_echo "$as_me:$LINENO: result: yes" >&5
26445$as_echo "yes" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000026446
26447cat >>confdefs.h <<\_ACEOF
26448#define PY_FORMAT_SIZE_T "z"
26449_ACEOF
26450
26451else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026452 $as_echo "$as_me: program exited with status $ac_status" >&5
26453$as_echo "$as_me: failed program was:" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000026454sed 's/^/| /' conftest.$ac_ext >&5
26455
26456( exit $ac_status )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026457{ $as_echo "$as_me:$LINENO: result: no" >&5
26458$as_echo "no" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000026459fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026460rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026461rm -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 +000026462fi
26463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026464
26465
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026466{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
26467$as_echo_n "checking for socklen_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026468if test "${ac_cv_type_socklen_t+set}" = set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026469 $as_echo_n "(cached) " >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000026470else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026471 ac_cv_type_socklen_t=no
26472cat >conftest.$ac_ext <<_ACEOF
26473/* confdefs.h. */
26474_ACEOF
26475cat confdefs.h >>conftest.$ac_ext
26476cat >>conftest.$ac_ext <<_ACEOF
26477/* end confdefs.h. */
26478
26479#ifdef HAVE_SYS_TYPES_H
26480#include <sys/types.h>
26481#endif
26482#ifdef HAVE_SYS_SOCKET_H
26483#include <sys/socket.h>
26484#endif
26485
26486
26487int
26488main ()
26489{
26490if (sizeof (socklen_t))
26491 return 0;
26492 ;
26493 return 0;
26494}
26495_ACEOF
26496rm -f conftest.$ac_objext
26497if { (ac_try="$ac_compile"
26498case "(($ac_try" in
26499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26500 *) ac_try_echo=$ac_try;;
26501esac
26502eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26503$as_echo "$ac_try_echo") >&5
26504 (eval "$ac_compile") 2>conftest.er1
26505 ac_status=$?
26506 grep -v '^ *+' conftest.er1 >conftest.err
26507 rm -f conftest.er1
26508 cat conftest.err >&5
26509 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
26510 (exit $ac_status); } && {
26511 test -z "$ac_c_werror_flag" ||
26512 test ! -s conftest.err
26513 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026514 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026515/* confdefs.h. */
26516_ACEOF
26517cat confdefs.h >>conftest.$ac_ext
26518cat >>conftest.$ac_ext <<_ACEOF
26519/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000026520
26521#ifdef HAVE_SYS_TYPES_H
26522#include <sys/types.h>
26523#endif
26524#ifdef HAVE_SYS_SOCKET_H
26525#include <sys/socket.h>
26526#endif
26527
26528
Martin v. Löwis11437992002-04-12 09:54:03 +000026529int
26530main ()
26531{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026532if (sizeof ((socklen_t)))
26533 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000026534 ;
26535 return 0;
26536}
26537_ACEOF
26538rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026539if { (ac_try="$ac_compile"
26540case "(($ac_try" in
26541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26542 *) ac_try_echo=$ac_try;;
26543esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026544eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26545$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026548 grep -v '^ *+' conftest.er1 >conftest.err
26549 rm -f conftest.er1
26550 cat conftest.err >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026551 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026552 (exit $ac_status); } && {
26553 test -z "$ac_c_werror_flag" ||
26554 test ! -s conftest.err
26555 } && test -s conftest.$ac_objext; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026556 :
Guido van Rossum95713eb2000-05-18 20:53:31 +000026557else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026558 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026559sed 's/^/| /' conftest.$ac_ext >&5
26560
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026561 ac_cv_type_socklen_t=yes
26562fi
26563
26564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26565else
26566 $as_echo "$as_me: failed program was:" >&5
26567sed 's/^/| /' conftest.$ac_ext >&5
26568
26569
Guido van Rossum95713eb2000-05-18 20:53:31 +000026570fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026571
26572rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026573fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026574{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
26575$as_echo "$ac_cv_type_socklen_t" >&6; }
26576if test "x$ac_cv_type_socklen_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026577 :
26578else
Guido van Rossum95713eb2000-05-18 20:53:31 +000026579
Martin v. Löwis01c04012002-11-11 14:58:44 +000026580cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026581#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000026582_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000026583
26584fi
26585
Michael W. Hudson54241132001-12-07 15:38:26 +000026586
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026587{ $as_echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
26588$as_echo_n "checking for broken mbstowcs... " >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026589if test "$cross_compiling" = yes; then
26590 ac_cv_broken_mbstowcs=no
26591else
26592 cat >conftest.$ac_ext <<_ACEOF
26593/* confdefs.h. */
26594_ACEOF
26595cat confdefs.h >>conftest.$ac_ext
26596cat >>conftest.$ac_ext <<_ACEOF
26597/* end confdefs.h. */
26598
26599#include<stdlib.h>
26600int main() {
26601 size_t len = -1;
26602 const char *str = "text";
26603 len = mbstowcs(NULL, str, 0);
26604 return (len != 4);
26605}
26606
26607_ACEOF
26608rm -f conftest$ac_exeext
26609if { (ac_try="$ac_link"
26610case "(($ac_try" in
26611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26612 *) ac_try_echo=$ac_try;;
26613esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026614eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26615$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026616 (eval "$ac_link") 2>&5
26617 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026618 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026619 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26620 { (case "(($ac_try" in
26621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26622 *) ac_try_echo=$ac_try;;
26623esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026624eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26625$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026626 (eval "$ac_try") 2>&5
26627 ac_status=$?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026628 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026629 (exit $ac_status); }; }; then
26630 ac_cv_broken_mbstowcs=no
26631else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026632 $as_echo "$as_me: program exited with status $ac_status" >&5
26633$as_echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000026634sed 's/^/| /' conftest.$ac_ext >&5
26635
26636( exit $ac_status )
26637ac_cv_broken_mbstowcs=yes
26638fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026639rm -rf conftest.dSYM
Antoine Pitroufff95302008-09-03 18:58:51 +000026640rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26641fi
26642
26643
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026644{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
26645$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000026646if test "$ac_cv_broken_mbstowcs" = yes
26647then
26648
26649cat >>confdefs.h <<\_ACEOF
26650#define HAVE_BROKEN_MBSTOWCS 1
26651_ACEOF
26652
26653fi
26654
Antoine Pitroub52ec782009-01-25 16:34:23 +000026655# Check for --with-computed-gotos
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026656{ $as_echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
26657$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026658
26659# Check whether --with-computed-gotos was given.
26660if test "${with_computed_gotos+set}" = set; then
26661 withval=$with_computed_gotos;
26662if test "$withval" != no
26663then
26664
26665cat >>confdefs.h <<\_ACEOF
26666#define USE_COMPUTED_GOTOS 1
26667_ACEOF
26668
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026669 { $as_echo "$as_me:$LINENO: result: yes" >&5
26670$as_echo "yes" >&6; }
26671else { $as_echo "$as_me:$LINENO: result: no" >&5
26672$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026673fi
26674else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026675 { $as_echo "$as_me:$LINENO: result: no" >&5
26676$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000026677fi
26678
26679
Ronald Oussoren1b2cad02009-11-19 17:30:05 +000026680if test $ac_sys_system = Darwin
26681then
26682 LIBS="$LIBS -framework CoreFoundation"
26683fi
26684
26685
Antoine Pitroub52ec782009-01-25 16:34:23 +000026686
Michael W. Hudson54241132001-12-07 15:38:26 +000026687
26688
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000026689for h in `(cd $srcdir;echo Python/thread_*.h)`
26690do
26691 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
26692done
26693
Michael W. Hudson54241132001-12-07 15:38:26 +000026694
Neal Norwitzd24499d2005-12-18 21:36:39 +000026695SRCDIRS="Parser Grammar Objects Python Modules Mac"
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026696{ $as_echo "$as_me:$LINENO: checking for build directories" >&5
26697$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026698for dir in $SRCDIRS; do
26699 if test ! -d $dir; then
26700 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026701 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026702done
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026703{ $as_echo "$as_me:$LINENO: result: done" >&5
26704$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026705
Guido van Rossum627b2d71993-12-24 10:39:16 +000026706# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000026707ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026708
Martin v. Löwis11437992002-04-12 09:54:03 +000026709cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026710# This file is a shell script that caches the results of configure
26711# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026712# scripts and configure runs, see configure's option --config-cache.
26713# It is not useful on other systems. If it contains results you don't
26714# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026715#
Martin v. Löwis11437992002-04-12 09:54:03 +000026716# config.status only pays attention to the cache file if you give it
26717# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026718#
Skip Montanaro6dead952003-09-25 14:50:04 +000026719# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026720# loading this file, other *unset* `ac_cv_foo' will be assigned the
26721# following values.
26722
26723_ACEOF
26724
Guido van Rossumf78abae1997-01-21 22:02:36 +000026725# The following way of writing the cache mishandles newlines in values,
26726# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026727# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026728# Ultrix sh set writes to stderr and can't be redirected directly,
26729# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026730(
26731 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26732 eval ac_val=\$$ac_var
26733 case $ac_val in #(
26734 *${as_nl}*)
26735 case $ac_var in #(
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026736 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
26737$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026738 esac
26739 case $ac_var in #(
26740 _ | IFS | as_nl) ;; #(
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026741 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026742 *) $as_unset $ac_var ;;
26743 esac ;;
26744 esac
26745 done
26746
Martin v. Löwis11437992002-04-12 09:54:03 +000026747 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026748 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26749 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026750 # `set' does not quote correctly, so add quotes (double-quote
26751 # substitution turns \\\\ into \\, and sed turns \\ into \).
26752 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026753 "s/'/'\\\\''/g;
26754 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026755 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026756 *)
26757 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026758 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026759 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026760 esac |
26761 sort
26762) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026763 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026764 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026765 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026766 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026767 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26768 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026769 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26770 :end' >>confcache
26771if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26772 if test -w "$cache_file"; then
26773 test "x$cache_file" != "x/dev/null" &&
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026774 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
26775$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026776 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026777 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026778 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26779$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026780 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026781fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026782rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026783
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026784test "x$prefix" = xNONE && prefix=$ac_default_prefix
26785# Let make expand exec_prefix.
26786test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026787
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026788DEFS=-DHAVE_CONFIG_H
26789
Skip Montanaro6dead952003-09-25 14:50:04 +000026790ac_libobjs=
26791ac_ltlibobjs=
26792for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26793 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026794 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026795 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026796 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26797 # will be set to the directory where LIBOBJS objects are built.
26798 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26799 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026800done
26801LIBOBJS=$ac_libobjs
26802
26803LTLIBOBJS=$ac_ltlibobjs
26804
26805
Martin v. Löwis11437992002-04-12 09:54:03 +000026806
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026807
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026808: ${CONFIG_STATUS=./config.status}
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026809ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000026810ac_clean_files_save=$ac_clean_files
26811ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026812{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26813$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
26814cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026815#! $SHELL
26816# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026817# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026818# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026819# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026820
Martin v. Löwis11437992002-04-12 09:54:03 +000026821debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026822ac_cs_recheck=false
26823ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026824SHELL=\${CONFIG_SHELL-$SHELL}
26825_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026826
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026827cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026828## --------------------- ##
26829## M4sh Initialization. ##
26830## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026831
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026832# Be more Bourne compatible
26833DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026834if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26835 emulate sh
26836 NULLCMD=:
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026837 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026838 # is contrary to our usage. Disable this feature.
26839 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026840 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000026841else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026842 case `(set -o) 2>/dev/null` in
26843 *posix*) set -o posix ;;
26844esac
26845
Michael W. Hudson54241132001-12-07 15:38:26 +000026846fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000026847
26848
Michael W. Hudson54241132001-12-07 15:38:26 +000026849
Michael W. Hudson54241132001-12-07 15:38:26 +000026850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026851# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026852# Avoid depending upon Character Ranges.
26853as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26854as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26855as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26856as_cr_digits='0123456789'
26857as_cr_alnum=$as_cr_Letters$as_cr_digits
26858
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026859as_nl='
26860'
26861export as_nl
26862# Printing a long string crashes Solaris 7 /usr/bin/printf.
26863as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26864as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26865as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26866if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26867 as_echo='printf %s\n'
26868 as_echo_n='printf %s'
26869else
26870 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26871 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26872 as_echo_n='/usr/ucb/echo -n'
26873 else
26874 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26875 as_echo_n_body='eval
26876 arg=$1;
26877 case $arg in
26878 *"$as_nl"*)
26879 expr "X$arg" : "X\\(.*\\)$as_nl";
26880 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26881 esac;
26882 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26883 '
26884 export as_echo_n_body
26885 as_echo_n='sh -c $as_echo_n_body as_echo'
26886 fi
26887 export as_echo_body
26888 as_echo='sh -c $as_echo_body as_echo'
26889fi
26890
Martin v. Löwis11437992002-04-12 09:54:03 +000026891# The user is always right.
26892if test "${PATH_SEPARATOR+set}" != set; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026893 PATH_SEPARATOR=:
26894 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26895 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26896 PATH_SEPARATOR=';'
26897 }
Martin v. Löwis11437992002-04-12 09:54:03 +000026898fi
26899
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026900# Support unset when possible.
26901if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26902 as_unset=unset
26903else
26904 as_unset=false
26905fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026906
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026907
26908# IFS
26909# We need space, tab and new line, in precisely that order. Quoting is
26910# there to prevent editors from complaining about space-tab.
26911# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26912# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026913IFS=" "" $as_nl"
26914
26915# Find who we are. Look in the path if we contain no directory separator.
26916case $0 in
26917 *[\\/]* ) as_myself=$0 ;;
26918 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026919for as_dir in $PATH
26920do
26921 IFS=$as_save_IFS
26922 test -z "$as_dir" && as_dir=.
26923 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26924done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026925IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026927 ;;
26928esac
26929# We did not find ourselves, most probably we were run as `sh COMMAND'
26930# in which case we are not to be found in the path.
26931if test "x$as_myself" = x; then
26932 as_myself=$0
26933fi
26934if test ! -f "$as_myself"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026935 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026936 { (exit 1); exit 1; }
26937fi
26938
26939# Work around bugs in pre-3.0 UWIN ksh.
26940for as_var in ENV MAIL MAILPATH
26941do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26942done
26943PS1='$ '
26944PS2='> '
26945PS4='+ '
26946
26947# NLS nuisances.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026948LC_ALL=C
26949export LC_ALL
26950LANGUAGE=C
26951export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026952
26953# Required to use basename.
26954if expr a : '\(a\)' >/dev/null 2>&1 &&
26955 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26956 as_expr=expr
26957else
26958 as_expr=false
26959fi
26960
26961if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26962 as_basename=basename
26963else
26964 as_basename=false
26965fi
26966
26967
26968# Name of the executable.
26969as_me=`$as_basename -- "$0" ||
26970$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26971 X"$0" : 'X\(//\)$' \| \
26972 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +000026973$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026974 sed '/^.*\/\([^/][^/]*\)\/*$/{
26975 s//\1/
26976 q
26977 }
26978 /^X\/\(\/\/\)$/{
26979 s//\1/
26980 q
26981 }
26982 /^X\/\(\/\).*/{
26983 s//\1/
26984 q
26985 }
26986 s/.*/./; q'`
26987
26988# CDPATH.
26989$as_unset CDPATH
26990
26991
26992
Martin v. Löwis11437992002-04-12 09:54:03 +000026993 as_lineno_1=$LINENO
26994 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026995 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026996 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026997
Martin v. Löwis11437992002-04-12 09:54:03 +000026998 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26999 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027000 # line-number line after each line using $LINENO; the second 'sed'
27001 # does the real work. The second script uses 'N' to pair each
27002 # line-number line with the line containing $LINENO, and appends
27003 # trailing '-' during substitution so that $LINENO is not a special
27004 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027005 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027006 # scripts with optimization help from Paolo Bonzini. Blame Lee
27007 # E. McMahon (1931-1989) for sed's syntax. :-)
27008 sed -n '
27009 p
27010 /[$]LINENO/=
27011 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027012 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027013 s/[$]LINENO.*/&-/
27014 t lineno
27015 b
27016 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027017 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027018 :loop
27019 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027020 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027021 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027022 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027023 chmod +x "$as_me.lineno" ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027024 { $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 +000027025 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027026
Martin v. Löwis11437992002-04-12 09:54:03 +000027027 # Don't try to exec as it changes $[0], causing all sort of problems
27028 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027029 # original and so on. Autoconf is especially sensitive to this).
27030 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027031 # Exit status is that of the last command.
27032 exit
27033}
27034
27035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027036if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27037 as_dirname=dirname
27038else
27039 as_dirname=false
27040fi
27041
27042ECHO_C= ECHO_N= ECHO_T=
27043case `echo -n x` in
27044-n*)
27045 case `echo 'x\c'` in
27046 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27047 *) ECHO_C='\c';;
27048 esac;;
27049*)
27050 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027051esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027052if expr a : '\(a\)' >/dev/null 2>&1 &&
27053 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027054 as_expr=expr
27055else
27056 as_expr=false
27057fi
27058
27059rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027060if test -d conf$$.dir; then
27061 rm -f conf$$.dir/conf$$.file
27062else
27063 rm -f conf$$.dir
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027064 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027065fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027066if (echo >conf$$.file) 2>/dev/null; then
27067 if ln -s conf$$.file conf$$ 2>/dev/null; then
27068 as_ln_s='ln -s'
27069 # ... but there are two gotchas:
27070 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27071 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27072 # In both cases, we have to default to `cp -p'.
27073 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
27074 as_ln_s='cp -p'
27075 elif ln conf$$.file conf$$ 2>/dev/null; then
27076 as_ln_s=ln
27077 else
Martin v. Löwis11437992002-04-12 09:54:03 +000027078 as_ln_s='cp -p'
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027079 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027080else
27081 as_ln_s='cp -p'
27082fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027083rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27084rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027085
Skip Montanaro6dead952003-09-25 14:50:04 +000027086if mkdir -p . 2>/dev/null; then
27087 as_mkdir_p=:
27088else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027089 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027090 as_mkdir_p=false
27091fi
27092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027093if test -x / >/dev/null 2>&1; then
27094 as_test_x='test -x'
27095else
27096 if ls -dL / >/dev/null 2>&1; then
27097 as_ls_L_option=L
27098 else
27099 as_ls_L_option=
27100 fi
27101 as_test_x='
27102 eval sh -c '\''
27103 if test -d "$1"; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027104 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027105 else
27106 case $1 in
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027107 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027108 esac;
27109 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27110 ???[sx]*):;;*)false;;esac;fi
27111 '\'' sh
27112 '
27113fi
27114as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027115
27116# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027117as_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 +000027118
27119# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027120as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027121
27122
Martin v. Löwis11437992002-04-12 09:54:03 +000027123exec 6>&1
27124
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027125# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027126# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027127# values after options handling.
27128ac_log="
Christian Heimes70e5cab2008-12-03 18:18:23 +000027129This file was extended by python $as_me 3.1, which was
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027130generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027131
27132 CONFIG_FILES = $CONFIG_FILES
27133 CONFIG_HEADERS = $CONFIG_HEADERS
27134 CONFIG_LINKS = $CONFIG_LINKS
27135 CONFIG_COMMANDS = $CONFIG_COMMANDS
27136 $ $0 $@
27137
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027138on `(hostname || uname -n) 2>/dev/null | sed 1q`
27139"
27140
Martin v. Löwis11437992002-04-12 09:54:03 +000027141_ACEOF
27142
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027143case $ac_config_files in *"
27144"*) set x $ac_config_files; shift; ac_config_files=$*;;
27145esac
27146
27147case $ac_config_headers in *"
27148"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
27149esac
27150
27151
27152cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027153# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027154config_files="$ac_config_files"
27155config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027156
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027157_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027158
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027159cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027160ac_cs_usage="\
27161\`$as_me' instantiates files from templates according to the
27162current configuration.
27163
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027164Usage: $0 [OPTION]... [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027165
27166 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027167 -V, --version print version number and configuration settings, then exit
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027168 -q, --quiet, --silent
27169 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027170 -d, --debug don't remove temporary files
27171 --recheck update $as_me by reconfiguring in the same conditions
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027172 --file=FILE[:TEMPLATE]
27173 instantiate the configuration file FILE
27174 --header=FILE[:TEMPLATE]
27175 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027176
27177Configuration files:
27178$config_files
27179
27180Configuration headers:
27181$config_headers
27182
27183Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027184
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027185_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027186cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027187ac_cs_version="\\
Christian Heimes70e5cab2008-12-03 18:18:23 +000027188python config.status 3.1
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027189configured by $0, generated by GNU Autoconf 2.63,
27190 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027191
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027192Copyright (C) 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027193This config.status script is free software; the Free Software Foundation
27194gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027195
27196ac_pwd='$ac_pwd'
27197srcdir='$srcdir'
27198INSTALL='$INSTALL'
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027199test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000027200_ACEOF
27201
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027202cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27203# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000027204ac_need_defaults=:
27205while test $# != 0
27206do
27207 case $1 in
27208 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027209 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27210 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027211 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027212 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027213 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027214 ac_option=$1
27215 ac_optarg=$2
27216 ac_shift=shift
27217 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027218 esac
27219
Skip Montanaro6dead952003-09-25 14:50:04 +000027220 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027221 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027222 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27223 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027224 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027225 $as_echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027226 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027227 debug=: ;;
27228 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027229 $ac_shift
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027230 case $ac_optarg in
27231 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27232 esac
27233 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027234 ac_need_defaults=false;;
27235 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027236 $ac_shift
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027237 case $ac_optarg in
27238 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27239 esac
27240 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027241 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027242 --he | --h)
27243 # Conflict between --help and --header
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027244 { $as_echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027245Try \`$0 --help' for more information." >&2
27246 { (exit 1); exit 1; }; };;
27247 --help | --hel | -h )
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027248 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027249 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27250 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27251 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027252
27253 # This is an error.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027254 -*) { $as_echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027255Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027256 { (exit 1); exit 1; }; } ;;
27257
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027258 *) ac_config_targets="$ac_config_targets $1"
27259 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027260
27261 esac
27262 shift
27263done
27264
Skip Montanaro6dead952003-09-25 14:50:04 +000027265ac_configure_extra_args=
27266
27267if $ac_cs_silent; then
27268 exec 6>/dev/null
27269 ac_configure_extra_args="$ac_configure_extra_args --silent"
27270fi
27271
27272_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027273cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000027274if \$ac_cs_recheck; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027275 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27276 shift
27277 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27278 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027279 export CONFIG_SHELL
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027280 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000027281fi
27282
Martin v. Löwis11437992002-04-12 09:54:03 +000027283_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027284cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027285exec 5>>config.log
27286{
27287 echo
27288 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
27289## Running $as_me. ##
27290_ASBOX
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027291 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027292} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000027293
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027294_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027295cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027296_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027297
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027298cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027299
27300# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000027301for ac_config_target in $ac_config_targets
27302do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027303 case $ac_config_target in
27304 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
27305 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
27306 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000027307 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
27308 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027309 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
27310 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000027311 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027312
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027313 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
27314$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027315 { (exit 1); exit 1; }; };;
27316 esac
27317done
27318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027319
Martin v. Löwis11437992002-04-12 09:54:03 +000027320# If the user did not use the arguments to specify the items to instantiate,
27321# then the envvar interface is used. Set only those that are not.
27322# We use the long form for the default assignment because of an extremely
27323# bizarre bug on SunOS 4.1.3.
27324if $ac_need_defaults; then
27325 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
27326 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
27327fi
27328
Skip Montanaro6dead952003-09-25 14:50:04 +000027329# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027330# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000027331# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027332# Hook for its removal unless debugging.
27333# Note that there is a small window in which the directory will not be cleaned:
27334# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000027335$debug ||
27336{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027337 tmp=
27338 trap 'exit_status=$?
27339 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
27340' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000027341 trap '{ (exit 1); exit 1; }' 1 2 13 15
27342}
Martin v. Löwis11437992002-04-12 09:54:03 +000027343# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000027344
Martin v. Löwis11437992002-04-12 09:54:03 +000027345{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027346 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027347 test -n "$tmp" && test -d "$tmp"
27348} ||
27349{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027350 tmp=./conf$$-$RANDOM
27351 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000027352} ||
27353{
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027354 $as_echo "$as_me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027355 { (exit 1); exit 1; }
27356}
27357
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027358# Set up the scripts for CONFIG_FILES section.
27359# No need to generate them if there are no CONFIG_FILES.
27360# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027361if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027362
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027363
27364ac_cr='
27365'
27366ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
27367if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
27368 ac_cs_awk_cr='\\r'
27369else
27370 ac_cs_awk_cr=$ac_cr
27371fi
27372
27373echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000027374_ACEOF
27375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027376
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027377{
27378 echo "cat >conf$$subs.awk <<_ACEOF" &&
27379 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
27380 echo "_ACEOF"
27381} >conf$$subs.sh ||
27382 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27383$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
27384 { (exit 1); exit 1; }; }
27385ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027386ac_delim='%!_!# '
27387for ac_last_try in false false false false false :; do
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027388 . ./conf$$subs.sh ||
27389 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27390$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
27391 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027392
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027393 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
27394 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027395 break
27396 elif $ac_last_try; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027397 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
27398$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027399 { (exit 1); exit 1; }; }
27400 else
27401 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000027402 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027403done
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027404rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027405
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027406cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27407cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027408_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027409sed -n '
27410h
27411s/^/S["/; s/!.*/"]=/
27412p
27413g
27414s/^[^!]*!//
27415:repl
27416t repl
27417s/'"$ac_delim"'$//
27418t delim
27419:nl
27420h
27421s/\(.\{148\}\).*/\1/
27422t more1
27423s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
27424p
27425n
27426b repl
27427:more1
27428s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27429p
27430g
27431s/.\{148\}//
27432t nl
27433:delim
27434h
27435s/\(.\{148\}\).*/\1/
27436t more2
27437s/["\\]/\\&/g; s/^/"/; s/$/"/
27438p
27439b
27440:more2
27441s/["\\]/\\&/g; s/^/"/; s/$/"\\/
27442p
27443g
27444s/.\{148\}//
27445t delim
27446' <conf$$subs.awk | sed '
27447/^[^""]/{
27448 N
27449 s/\n//
27450}
27451' >>$CONFIG_STATUS || ac_write_fail=1
27452rm -f conf$$subs.awk
27453cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27454_ACAWK
27455cat >>"\$tmp/subs1.awk" <<_ACAWK &&
27456 for (key in S) S_is_set[key] = 1
27457 FS = ""
27458
27459}
27460{
27461 line = $ 0
27462 nfields = split(line, field, "@")
27463 substed = 0
27464 len = length(field[1])
27465 for (i = 2; i < nfields; i++) {
27466 key = field[i]
27467 keylen = length(key)
27468 if (S_is_set[key]) {
27469 value = S[key]
27470 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
27471 len += length(value) + length(field[++i])
27472 substed = 1
27473 } else
27474 len += 1 + keylen
27475 }
27476
27477 print line
27478}
27479
27480_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027481_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027482cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27483if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
27484 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
27485else
27486 cat
27487fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
27488 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
27489$as_echo "$as_me: error: could not setup config files machinery" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027490 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027491_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027492
27493# VPATH may cause trouble with some makes, so we remove $(srcdir),
27494# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
27495# trailing colons and then remove the whole line if VPATH becomes empty
27496# (actually we leave an empty line to preserve line numbers).
27497if test "x$srcdir" = x.; then
27498 ac_vpsub='/^[ ]*VPATH[ ]*=/{
27499s/:*\$(srcdir):*/:/
27500s/:*\${srcdir}:*/:/
27501s/:*@srcdir@:*/:/
27502s/^\([^=]*=[ ]*\):*/\1/
27503s/:*$//
27504s/^[^=]*=[ ]*$//
27505}'
27506fi
27507
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027508cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027509fi # test -n "$CONFIG_FILES"
27510
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027511# Set up the scripts for CONFIG_HEADERS section.
27512# No need to generate them if there are no CONFIG_HEADERS.
27513# This happens for instance with `./config.status Makefile'.
27514if test -n "$CONFIG_HEADERS"; then
27515cat >"$tmp/defines.awk" <<\_ACAWK ||
27516BEGIN {
27517_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027518
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027519# Transform confdefs.h into an awk script `defines.awk', embedded as
27520# here-document in config.status, that substitutes the proper values into
27521# config.h.in to produce config.h.
27522
27523# Create a delimiter string that does not exist in confdefs.h, to ease
27524# handling of long lines.
27525ac_delim='%!_!# '
27526for ac_last_try in false false :; do
27527 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
27528 if test -z "$ac_t"; then
27529 break
27530 elif $ac_last_try; then
27531 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
27532$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
27533 { (exit 1); exit 1; }; }
27534 else
27535 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
27536 fi
27537done
27538
27539# For the awk script, D is an array of macro values keyed by name,
27540# likewise P contains macro parameters if any. Preserve backslash
27541# newline sequences.
27542
27543ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
27544sed -n '
27545s/.\{148\}/&'"$ac_delim"'/g
27546t rset
27547:rset
27548s/^[ ]*#[ ]*define[ ][ ]*/ /
27549t def
27550d
27551:def
27552s/\\$//
27553t bsnl
27554s/["\\]/\\&/g
27555s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27556D["\1"]=" \3"/p
27557s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
27558d
27559:bsnl
27560s/["\\]/\\&/g
27561s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
27562D["\1"]=" \3\\\\\\n"\\/p
27563t cont
27564s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
27565t cont
27566d
27567:cont
27568n
27569s/.\{148\}/&'"$ac_delim"'/g
27570t clear
27571:clear
27572s/\\$//
27573t bsnlc
27574s/["\\]/\\&/g; s/^/"/; s/$/"/p
27575d
27576:bsnlc
27577s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
27578b cont
27579' <confdefs.h | sed '
27580s/'"$ac_delim"'/"\\\
27581"/g' >>$CONFIG_STATUS || ac_write_fail=1
27582
27583cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27584 for (key in D) D_is_set[key] = 1
27585 FS = ""
27586}
27587/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
27588 line = \$ 0
27589 split(line, arg, " ")
27590 if (arg[1] == "#") {
27591 defundef = arg[2]
27592 mac1 = arg[3]
27593 } else {
27594 defundef = substr(arg[1], 2)
27595 mac1 = arg[2]
27596 }
27597 split(mac1, mac2, "(") #)
27598 macro = mac2[1]
27599 prefix = substr(line, 1, index(line, defundef) - 1)
27600 if (D_is_set[macro]) {
27601 # Preserve the white space surrounding the "#".
27602 print prefix "define", macro P[macro] D[macro]
27603 next
27604 } else {
27605 # Replace #undef with comments. This is necessary, for example,
27606 # in the case of _POSIX_SOURCE, which is predefined and required
27607 # on some systems where configure will not decide to define it.
27608 if (defundef == "undef") {
27609 print "/*", prefix defundef, macro, "*/"
27610 next
27611 }
27612 }
27613}
27614{ print }
27615_ACAWK
27616_ACEOF
27617cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27618 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
27619$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
27620 { (exit 1); exit 1; }; }
27621fi # test -n "$CONFIG_HEADERS"
27622
27623
27624eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
27625shift
27626for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027627do
27628 case $ac_tag in
27629 :[FHLC]) ac_mode=$ac_tag; continue;;
27630 esac
27631 case $ac_mode$ac_tag in
27632 :[FHL]*:*);;
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027633 :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
27634$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027635 { (exit 1); exit 1; }; };;
27636 :[FH]-) ac_tag=-:-;;
27637 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
27638 esac
27639 ac_save_IFS=$IFS
27640 IFS=:
27641 set x $ac_tag
27642 IFS=$ac_save_IFS
27643 shift
27644 ac_file=$1
27645 shift
27646
27647 case $ac_mode in
27648 :L) ac_source=$1;;
27649 :[FH])
27650 ac_file_inputs=
27651 for ac_f
27652 do
27653 case $ac_f in
27654 -) ac_f="$tmp/stdin";;
27655 *) # Look for the file first in the build tree, then in the source tree
27656 # (if the path is not absolute). The absolute path cannot be DOS-style,
27657 # because $ac_f cannot contain `:'.
27658 test -f "$ac_f" ||
27659 case $ac_f in
27660 [\\/$]*) false;;
27661 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
27662 esac ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027663 { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
27664$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027665 { (exit 1); exit 1; }; };;
27666 esac
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027667 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
27668 ac_file_inputs="$ac_file_inputs '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027669 done
27670
27671 # Let's still pretend it is `configure' which instantiates (i.e., don't
27672 # use $as_me), people would be surprised to read:
27673 # /* config.h. Generated by config.status. */
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027674 configure_input='Generated from '`
27675 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
27676 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027677 if test x"$ac_file" != x-; then
27678 configure_input="$ac_file. $configure_input"
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027679 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
27680$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027681 fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027682 # Neutralize special characters interpreted by sed in replacement strings.
27683 case $configure_input in #(
27684 *\&* | *\|* | *\\* )
27685 ac_sed_conf_input=`$as_echo "$configure_input" |
27686 sed 's/[\\\\&|]/\\\\&/g'`;; #(
27687 *) ac_sed_conf_input=$configure_input;;
27688 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027689
27690 case $ac_tag in
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027691 *:-:* | *:-) cat >"$tmp/stdin" \
27692 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27693$as_echo "$as_me: error: could not create $ac_file" >&2;}
27694 { (exit 1); exit 1; }; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027695 esac
27696 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027697 esac
27698
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027699 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027700$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027701 X"$ac_file" : 'X\(//\)[^/]' \| \
27702 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027703 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027704$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027705 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27706 s//\1/
27707 q
27708 }
27709 /^X\(\/\/\)[^/].*/{
27710 s//\1/
27711 q
27712 }
27713 /^X\(\/\/\)$/{
27714 s//\1/
27715 q
27716 }
27717 /^X\(\/\).*/{
27718 s//\1/
27719 q
27720 }
27721 s/.*/./; q'`
27722 { as_dir="$ac_dir"
27723 case $as_dir in #(
27724 -*) as_dir=./$as_dir;;
27725 esac
27726 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027727 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027728 while :; do
27729 case $as_dir in #(
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027730 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027731 *) as_qdir=$as_dir;;
27732 esac
27733 as_dirs="'$as_qdir' $as_dirs"
27734 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027735$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027736 X"$as_dir" : 'X\(//\)[^/]' \| \
27737 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027738 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027739$as_echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027740 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27741 s//\1/
27742 q
27743 }
27744 /^X\(\/\/\)[^/].*/{
27745 s//\1/
27746 q
27747 }
27748 /^X\(\/\/\)$/{
27749 s//\1/
27750 q
27751 }
27752 /^X\(\/\).*/{
27753 s//\1/
27754 q
27755 }
27756 s/.*/./; q'`
27757 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027758 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027759 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027760 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27761$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027762 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027763 ac_builddir=.
27764
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027765case "$ac_dir" in
27766.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27767*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027768 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027769 # A ".." for each directory in $ac_dir_suffix.
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027770 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027771 case $ac_top_builddir_sub in
27772 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27773 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27774 esac ;;
27775esac
27776ac_abs_top_builddir=$ac_pwd
27777ac_abs_builddir=$ac_pwd$ac_dir_suffix
27778# for backward compatibility:
27779ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027780
27781case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027782 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027783 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027784 ac_top_srcdir=$ac_top_builddir_sub
27785 ac_abs_top_srcdir=$ac_pwd ;;
27786 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027787 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027788 ac_top_srcdir=$srcdir
27789 ac_abs_top_srcdir=$srcdir ;;
27790 *) # Relative name.
27791 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27792 ac_top_srcdir=$ac_top_build_prefix$srcdir
27793 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027794esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027795ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027796
Martin v. Löwis11437992002-04-12 09:54:03 +000027797
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027798 case $ac_mode in
27799 :F)
27800 #
27801 # CONFIG_FILE
27802 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027803
27804 case $INSTALL in
27805 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027806 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027807 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000027808_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027809
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027810cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027811# If the template does not know about datarootdir, expand it.
27812# FIXME: This hack should be removed a few years after 2.60.
27813ac_datarootdir_hack=; ac_datarootdir_seen=
27814
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027815ac_sed_dataroot='
27816/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027817 p
27818 q
27819}
27820/@datadir@/p
27821/@docdir@/p
27822/@infodir@/p
27823/@localedir@/p
27824/@mandir@/p
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027825'
27826case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027827*datarootdir*) ac_datarootdir_seen=yes;;
27828*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027829 { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27830$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027831_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027832cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027833 ac_datarootdir_hack='
27834 s&@datadir@&$datadir&g
27835 s&@docdir@&$docdir&g
27836 s&@infodir@&$infodir&g
27837 s&@localedir@&$localedir&g
27838 s&@mandir@&$mandir&g
27839 s&\\\${datarootdir}&$datarootdir&g' ;;
27840esac
27841_ACEOF
27842
27843# Neutralize VPATH when `$srcdir' = `.'.
27844# Shell code in configure.ac might set extrasub.
27845# FIXME: do we really want to maintain this feature?
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027846cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27847ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027848$extrasub
27849_ACEOF
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027850cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027851:t
27852/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027853s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027854s&@top_builddir@&$ac_top_builddir_sub&;t t
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027855s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027856s&@srcdir@&$ac_srcdir&;t t
27857s&@abs_srcdir@&$ac_abs_srcdir&;t t
27858s&@top_srcdir@&$ac_top_srcdir&;t t
27859s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27860s&@builddir@&$ac_builddir&;t t
27861s&@abs_builddir@&$ac_abs_builddir&;t t
27862s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27863s&@INSTALL@&$ac_INSTALL&;t t
27864$ac_datarootdir_hack
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027865"
27866eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
27867 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27868$as_echo "$as_me: error: could not create $ac_file" >&2;}
27869 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027871test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27872 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27873 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027874 { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027875which seems to be undefined. Please make sure it is defined." >&5
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027876$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027877which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000027878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027879 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027880 case $ac_file in
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027881 -) cat "$tmp/out" && rm -f "$tmp/out";;
27882 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
27883 esac \
27884 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27885$as_echo "$as_me: error: could not create $ac_file" >&2;}
27886 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027887 ;;
27888 :H)
27889 #
27890 # CONFIG_HEADER
27891 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027892 if test x"$ac_file" != x-; then
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027893 {
27894 $as_echo "/* $configure_input */" \
27895 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
27896 } >"$tmp/config.h" \
27897 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27898$as_echo "$as_me: error: could not create $ac_file" >&2;}
27899 { (exit 1); exit 1; }; }
27900 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
27901 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27902$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027903 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027904 rm -f "$ac_file"
27905 mv "$tmp/config.h" "$ac_file" \
27906 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27907$as_echo "$as_me: error: could not create $ac_file" >&2;}
27908 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027909 fi
27910 else
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027911 $as_echo "/* $configure_input */" \
27912 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
27913 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
27914$as_echo "$as_me: error: could not create -" >&2;}
27915 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027916 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027917 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027918
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027919
27920 esac
27921
27922done # for ac_tag
27923
Guido van Rossum627b2d71993-12-24 10:39:16 +000027924
Martin v. Löwis11437992002-04-12 09:54:03 +000027925{ (exit 0); exit 0; }
27926_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027927chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027928ac_clean_files=$ac_clean_files_save
27929
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027930test $ac_write_fail = 0 ||
27931 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
27932$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
27933 { (exit 1); exit 1; }; }
27934
Martin v. Löwis11437992002-04-12 09:54:03 +000027935
27936# configure is writing to config.log, and then calls config.status.
27937# config.status does its own redirection, appending to config.log.
27938# Unfortunately, on DOS this fails, as config.log is still kept open
27939# by configure, so config.status won't be able to write to it; its
27940# output is simply discarded. So we exec the FD to /dev/null,
27941# effectively closing config.log, so it can be properly (re)opened and
27942# appended to by config.status. When coming back to configure, we
27943# need to make the FD available again.
27944if test "$no_create" != yes; then
27945 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027946 ac_config_status_args=
27947 test "$silent" = yes &&
27948 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027949 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027950 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027951 exec 5>>config.log
27952 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27953 # would make configure fail if this is the last instruction.
27954 $ac_cs_success || { (exit 1); exit 1; }
27955fi
Benjamin Peterson82af01d2010-05-02 16:45:41 +000027956if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27957 { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27958$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
27959fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027960
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027961
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027962echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027963if test ! -f Modules/Setup
27964then
27965 cp $srcdir/Modules/Setup.dist Modules/Setup
27966fi
27967
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000027968echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027969if test ! -f Modules/Setup.local
27970then
27971 echo "# Edit this file for local setup changes" >Modules/Setup.local
27972fi
27973
27974echo "creating Makefile"
27975$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27976 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027977 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027978mv config.c Modules