blob: 914dbbdb59215b9e9e02a2dbd159decac8502ad2 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson697cd212010-05-02 16:45:11 +00002# From configure.in Revision: 80575 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Peterson697cd212010-05-02 16:45:11 +00004# Generated by GNU Autoconf 2.63 for python 2.6.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Martin v. Löwis1d459062005-03-14 21:23:33 +00006# Report bugs to <http://www.python.org/python-bugs>.
7#
Martin v. Löwiseba40652007-08-30 20:10:57 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Peterson697cd212010-05-02 16:45:11 +00009# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Martin v. Löwiseba40652007-08-30 20:10:57 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Benjamin Peterson697cd212010-05-02 16:45:11 +000021 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000025else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
31
Skip Montanaro6dead952003-09-25 14:50:04 +000032
Martin v. Löwis11437992002-04-12 09:54:03 +000033
34
Martin v. Löwiseba40652007-08-30 20:10:57 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
Benjamin Peterson697cd212010-05-02 16:45:11 +000043as_nl='
44'
45export as_nl
46# Printing a long string crashes Solaris 7 /usr/bin/printf.
47as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
50if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
74
Martin v. Löwis11437992002-04-12 09:54:03 +000075# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwis11437992002-04-12 09:54:03 +000082fi
83
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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.)
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000109IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000110
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Peterson697cd212010-05-02 16:45:11 +0000119 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Peterson697cd212010-05-02 16:45:11 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Peterson697cd212010-05-02 16:45:11 +0000157$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Peterson697cd212010-05-02 16:45:11 +0000183 if test $as_have_required = yes && (eval ":
Martin v. Löwiseba40652007-08-30 20:10:57 +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
244for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
245do
246 IFS=$as_save_IFS
247 test -z "$as_dir" && as_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000248 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000249 /*)
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Peterson697cd212010-05-02 16:45:11 +0000265 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Peterson697cd212010-05-02 16:45:11 +0000286 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Montanaro89e975f2007-08-22 19:05:21 +0000350 as_lineno_1=$LINENO
351 as_lineno_2=$LINENO
Skip Montanaro89e975f2007-08-22 19:05:21 +0000352 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Peterson697cd212010-05-02 16:45:11 +0000366 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
367 done
368 export CONFIG_SHELL
369 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Peterson697cd212010-05-02 16:45:11 +0000438 echo Please tell bug-autoconf@gnu.org about your system,
439 echo including any error possibly output before this message.
440 echo This can help us improve future autoconf versions.
441 echo Configuration will now proceed without shell functions.
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 '
Martin v. Löwiseba40652007-08-30 20:10:57 +0000466 s/[$]LINENO.*/&-/
467 t lineno
468 b
469 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000470 N
Martin v. Löwiseba40652007-08-30 20:10:57 +0000471 :loop
472 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000473 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +0000474 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000475 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +0000476 chmod +x "$as_me.lineno" ||
Benjamin Peterson697cd212010-05-02 16:45:11 +0000477 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 { (exit 1); exit 1; }; }
479
480 # Don't try to exec as it changes $[0], causing all sort of problems
481 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000513if test -d conf$$.dir; then
514 rm -f conf$$.dir/conf$$.file
515else
516 rm -f conf$$.dir
Benjamin Peterson697cd212010-05-02 16:45:11 +0000517 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +0000518fi
Benjamin Peterson697cd212010-05-02 16:45:11 +0000519if (echo >conf$$.file) 2>/dev/null; then
520 if ln -s conf$$.file conf$$ 2>/dev/null; then
521 as_ln_s='ln -s'
522 # ... but there are two gotchas:
523 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
524 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
525 # In both cases, we have to default to `cp -p'.
526 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
527 as_ln_s='cp -p'
528 elif ln conf$$.file conf$$ 2>/dev/null; then
529 as_ln_s=ln
530 else
Martin v. Löwis11437992002-04-12 09:54:03 +0000531 as_ln_s='cp -p'
Benjamin Peterson697cd212010-05-02 16:45:11 +0000532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000533else
534 as_ln_s='cp -p'
535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Peterson697cd212010-05-02 16:45:11 +0000557 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +0000558 else
559 case $1 in
Benjamin Peterson697cd212010-05-02 16:45:11 +0000560 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000588ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000589ac_config_libobj_dir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +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'
Neal Norwitz9be57322006-08-18 05:39:20 +0000600PACKAGE_VERSION='2.6'
601PACKAGE_STRING='python 2.6'
Martin v. Löwis1d459062005-03-14 21:23:33 +0000602PACKAGE_BUGREPORT='http://www.python.org/python-bugs'
Martin v. Löwis11437992002-04-12 09:54:03 +0000603
604ac_unique_file="Include/object.h"
605# Factoring default headers for most tests.
606ac_includes_default="\
607#include <stdio.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +0000608#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <sys/types.h>
610#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000611#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000612# include <sys/stat.h>
613#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000614#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000615# include <stdlib.h>
616# include <stddef.h>
617#else
Martin v. Löwiseba40652007-08-30 20:10:57 +0000618# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000619# include <stdlib.h>
620# endif
621#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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
Martin v. Löwiseba40652007-08-30 20:10:57 +0000628#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000629# include <strings.h>
630#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +0000631#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000632# include <inttypes.h>
Martin v. Löwis11437992002-04-12 09:54:03 +0000633#endif
Martin v. Löwiseba40652007-08-30 20:10:57 +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 Peterson697cd212010-05-02 16:45:11 +0000641ac_subst_vars='LTLIBOBJS
Martin v. Löwiseba40652007-08-30 20:10:57 +0000642SRCDIRS
Benjamin Peterson697cd212010-05-02 16:45:11 +0000643THREADHEADERS
644UNICODE_OBJS
645LIBC
646LIBM
647HAVE_GETHOSTBYNAME
648HAVE_GETHOSTBYNAME_R
649HAVE_GETHOSTBYNAME_R_3_ARG
650HAVE_GETHOSTBYNAME_R_5_ARG
651HAVE_GETHOSTBYNAME_R_6_ARG
652LIBOBJS
653TRUE
654MACHDEP_OBJS
655DYNLOADFILE
656DLINCLDIR
657THREADOBJ
658LDLAST
659USE_THREAD_MODULE
660SIGNAL_OBJS
661USE_SIGNAL_MODULE
662SHLIBS
663CFLAGSFORSHARED
664LINKFORSHARED
665CCSHARED
666BLDSHARED
667LDSHARED
668SO
669LIBTOOL_CRUFT
670OTHER_LIBTOOL_OPT
671UNIVERSAL_ARCH_FLAGS
672BASECFLAGS
673OPT
674LN
675INSTALL_DATA
676INSTALL_SCRIPT
677INSTALL_PROGRAM
678SVNVERSION
679AR
680RANLIB
681LINKCC
682RUNSHARED
683INSTSONAME
684LDLIBRARYDIR
685BLDLIBRARY
686DLLLIBRARY
687LDLIBRARY
688LIBRARY
689BUILDEXEEXT
690EGREP
691GREP
692CPP
693MAINCC
694CXX
695OBJEXT
696EXEEXT
697ac_ct_CC
698CPPFLAGS
699LDFLAGS
700CFLAGS
701CC
702EXPORT_MACOSX_DEPLOYMENT_TARGET
703CONFIGURE_MACOSX_DEPLOYMENT_TARGET
704EXTRAMACHDEPPATH
705EXTRAPLATDIR
706SGI_ABI
707MACHDEP
708FRAMEWORKUNIXTOOLSPREFIX
709FRAMEWORKALTINSTALLLAST
710FRAMEWORKALTINSTALLFIRST
711FRAMEWORKINSTALLLAST
712FRAMEWORKINSTALLFIRST
713PYTHONFRAMEWORKINSTALLDIR
714PYTHONFRAMEWORKPREFIX
715PYTHONFRAMEWORKDIR
716PYTHONFRAMEWORKIDENTIFIER
717PYTHONFRAMEWORK
718LIPO_64BIT_FLAGS
719LIPO_32BIT_FLAGS
720ARCH_RUN_32BIT
721UNIVERSALSDK
722CONFIG_ARGS
723SOVERSION
724VERSION
725target_alias
726host_alias
727build_alias
728LIBS
729ECHO_T
730ECHO_N
731ECHO_C
732DEFS
733mandir
734localedir
735libdir
736psdir
737pdfdir
738dvidir
739htmldir
740infodir
741docdir
742oldincludedir
743includedir
744localstatedir
745sharedstatedir
746sysconfdir
747datadir
748datarootdir
749libexecdir
750sbindir
751bindir
752program_transform_name
753prefix
754exec_prefix
755PACKAGE_BUGREPORT
756PACKAGE_STRING
757PACKAGE_VERSION
758PACKAGE_TARNAME
759PACKAGE_NAME
760PATH_SEPARATOR
761SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000762ac_subst_files=''
Benjamin Peterson697cd212010-05-02 16:45:11 +0000763ac_user_opts='
764enable_option_checking
765enable_universalsdk
766with_universal_archs
767with_framework_name
768enable_framework
769with_gcc
770with_cxx_main
771with_suffix
772enable_shared
773enable_profiling
774with_pydebug
775enable_toolbox_glue
776with_libs
777with_system_ffi
778with_signal_module
779with_dec_threads
780with_threads
781with_thread
782with_pth
783enable_ipv6
784with_doc_strings
785with_tsc
786with_pymalloc
787with_wctype_functions
788with_fpectl
789with_libm
790with_libc
791enable_unicode
792'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000793 ac_precious_vars='build_alias
794host_alias
795target_alias
796CC
797CFLAGS
798LDFLAGS
799LIBS
800CPPFLAGS
801CPP'
802
Guido van Rossum627b2d71993-12-24 10:39:16 +0000803
Guido van Rossum7f43da71994-08-01 12:15:30 +0000804# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000805ac_init_help=
806ac_init_version=false
Benjamin Peterson697cd212010-05-02 16:45:11 +0000807ac_unrecognized_opts=
808ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000809# The variables have the same names as the options, with
810# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000811cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000812exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000813no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000814no_recursion=
815prefix=NONE
816program_prefix=NONE
817program_suffix=NONE
818program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000819silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000820site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000822verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000823x_includes=NONE
824x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000825
826# Installation directory options.
827# These are left unexpanded so users can "make install exec_prefix=/foo"
828# and all the variables that are supposed to be based on exec_prefix
829# by default will actually change.
830# Use braces instead of parens because sh, perl, etc. also accept them.
Martin v. Löwiseba40652007-08-30 20:10:57 +0000831# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000832bindir='${exec_prefix}/bin'
833sbindir='${exec_prefix}/sbin'
834libexecdir='${exec_prefix}/libexec'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000835datarootdir='${prefix}/share'
836datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000837sysconfdir='${prefix}/etc'
838sharedstatedir='${prefix}/com'
839localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000840includedir='${prefix}/include'
841oldincludedir='/usr/include'
Martin v. Löwiseba40652007-08-30 20:10:57 +0000842docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
843infodir='${datarootdir}/info'
844htmldir='${docdir}'
845dvidir='${docdir}'
846pdfdir='${docdir}'
847psdir='${docdir}'
848libdir='${exec_prefix}/lib'
849localedir='${datarootdir}/locale'
850mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000851
Guido van Rossum7f43da71994-08-01 12:15:30 +0000852ac_prev=
Martin v. Löwiseba40652007-08-30 20:10:57 +0000853ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000854for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000855do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000856 # If the previous option needs an argument, assign it.
857 if test -n "$ac_prev"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +0000858 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000859 ac_prev=
860 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000861 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000862
Martin v. Löwiseba40652007-08-30 20:10:57 +0000863 case $ac_option in
864 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
865 *) ac_optarg=yes ;;
866 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000867
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000868 # Accept the important Cygnus configure options, so we can diagnose typos.
869
Martin v. Löwiseba40652007-08-30 20:10:57 +0000870 case $ac_dashdash$ac_option in
871 --)
872 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000873
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000874 -bindir | --bindir | --bindi | --bind | --bin | --bi)
875 ac_prev=bindir ;;
876 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000877 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000878
879 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000880 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000881 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000882 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000883
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000884 -cache-file | --cache-file | --cache-fil | --cache-fi \
885 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
886 ac_prev=cache_file ;;
887 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
888 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000889 cache_file=$ac_optarg ;;
890
891 --config-cache | -C)
892 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000893
Martin v. Löwiseba40652007-08-30 20:10:57 +0000894 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000895 ac_prev=datadir ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000896 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000897 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000898
Martin v. Löwiseba40652007-08-30 20:10:57 +0000899 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
900 | --dataroo | --dataro | --datar)
901 ac_prev=datarootdir ;;
902 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
903 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
904 datarootdir=$ac_optarg ;;
905
Guido van Rossum7f43da71994-08-01 12:15:30 +0000906 -disable-* | --disable-*)
Benjamin Peterson697cd212010-05-02 16:45:11 +0000907 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000908 # Reject names that are not valid shell variable names.
Benjamin Peterson697cd212010-05-02 16:45:11 +0000909 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
910 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000911 { (exit 1); exit 1; }; }
Benjamin Peterson697cd212010-05-02 16:45:11 +0000912 ac_useropt_orig=$ac_useropt
913 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
914 case $ac_user_opts in
915 *"
916"enable_$ac_useropt"
917"*) ;;
918 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
919 ac_unrecognized_sep=', ';;
920 esac
921 eval enable_$ac_useropt=no ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +0000922
923 -docdir | --docdir | --docdi | --doc | --do)
924 ac_prev=docdir ;;
925 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
926 docdir=$ac_optarg ;;
927
928 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
929 ac_prev=dvidir ;;
930 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
931 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000932
933 -enable-* | --enable-*)
Benjamin Peterson697cd212010-05-02 16:45:11 +0000934 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000935 # Reject names that are not valid shell variable names.
Benjamin Peterson697cd212010-05-02 16:45:11 +0000936 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
937 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000938 { (exit 1); exit 1; }; }
Benjamin Peterson697cd212010-05-02 16:45:11 +0000939 ac_useropt_orig=$ac_useropt
940 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
941 case $ac_user_opts in
942 *"
943"enable_$ac_useropt"
944"*) ;;
945 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
946 ac_unrecognized_sep=', ';;
947 esac
948 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949
Guido van Rossum7f43da71994-08-01 12:15:30 +0000950 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
951 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
952 | --exec | --exe | --ex)
953 ac_prev=exec_prefix ;;
954 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
955 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
956 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000957 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000958
959 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000960 # Obsolete; use --with-gas.
961 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000962
Martin v. Löwis11437992002-04-12 09:54:03 +0000963 -help | --help | --hel | --he | -h)
964 ac_init_help=long ;;
965 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
966 ac_init_help=recursive ;;
967 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
968 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000969
970 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000971 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000972 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000973 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000974
Martin v. Löwiseba40652007-08-30 20:10:57 +0000975 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
976 ac_prev=htmldir ;;
977 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
978 | --ht=*)
979 htmldir=$ac_optarg ;;
980
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000981 -includedir | --includedir | --includedi | --included | --include \
982 | --includ | --inclu | --incl | --inc)
983 ac_prev=includedir ;;
984 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
985 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000986 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000987
988 -infodir | --infodir | --infodi | --infod | --info | --inf)
989 ac_prev=infodir ;;
990 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000991 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000992
993 -libdir | --libdir | --libdi | --libd)
994 ac_prev=libdir ;;
995 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000996 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000997
998 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
999 | --libexe | --libex | --libe)
1000 ac_prev=libexecdir ;;
1001 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1002 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001003 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001004
Martin v. Löwiseba40652007-08-30 20:10:57 +00001005 -localedir | --localedir | --localedi | --localed | --locale)
1006 ac_prev=localedir ;;
1007 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1008 localedir=$ac_optarg ;;
1009
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001010 -localstatedir | --localstatedir | --localstatedi | --localstated \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001011 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001012 ac_prev=localstatedir ;;
1013 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001014 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001015 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001016
1017 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1018 ac_prev=mandir ;;
1019 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001020 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001021
Guido van Rossum7f43da71994-08-01 12:15:30 +00001022 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001023 # Obsolete; use --without-fp.
1024 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001025
1026 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001027 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001028 no_create=yes ;;
1029
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001030 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1031 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1032 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001033
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001034 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1035 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1036 | --oldin | --oldi | --old | --ol | --o)
1037 ac_prev=oldincludedir ;;
1038 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1039 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1040 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001041 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001042
Guido van Rossum7f43da71994-08-01 12:15:30 +00001043 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1044 ac_prev=prefix ;;
1045 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001046 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001047
1048 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1049 | --program-pre | --program-pr | --program-p)
1050 ac_prev=program_prefix ;;
1051 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1052 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001053 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001054
1055 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1056 | --program-suf | --program-su | --program-s)
1057 ac_prev=program_suffix ;;
1058 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1059 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001060 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001061
1062 -program-transform-name | --program-transform-name \
1063 | --program-transform-nam | --program-transform-na \
1064 | --program-transform-n | --program-transform- \
1065 | --program-transform | --program-transfor \
1066 | --program-transfo | --program-transf \
1067 | --program-trans | --program-tran \
1068 | --progr-tra | --program-tr | --program-t)
1069 ac_prev=program_transform_name ;;
1070 -program-transform-name=* | --program-transform-name=* \
1071 | --program-transform-nam=* | --program-transform-na=* \
1072 | --program-transform-n=* | --program-transform-=* \
1073 | --program-transform=* | --program-transfor=* \
1074 | --program-transfo=* | --program-transf=* \
1075 | --program-trans=* | --program-tran=* \
1076 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001077 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001078
Martin v. Löwiseba40652007-08-30 20:10:57 +00001079 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1080 ac_prev=pdfdir ;;
1081 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1082 pdfdir=$ac_optarg ;;
1083
1084 -psdir | --psdir | --psdi | --psd | --ps)
1085 ac_prev=psdir ;;
1086 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1087 psdir=$ac_optarg ;;
1088
Guido van Rossum7f43da71994-08-01 12:15:30 +00001089 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1090 | -silent | --silent | --silen | --sile | --sil)
1091 silent=yes ;;
1092
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001093 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1094 ac_prev=sbindir ;;
1095 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1096 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001097 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001098
1099 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1100 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1101 | --sharedst | --shareds | --shared | --share | --shar \
1102 | --sha | --sh)
1103 ac_prev=sharedstatedir ;;
1104 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1105 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1106 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1107 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001108 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001109
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001110 -site | --site | --sit)
1111 ac_prev=site ;;
1112 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001113 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001114
Guido van Rossum7f43da71994-08-01 12:15:30 +00001115 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1116 ac_prev=srcdir ;;
1117 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001118 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001119
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001120 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1121 | --syscon | --sysco | --sysc | --sys | --sy)
1122 ac_prev=sysconfdir ;;
1123 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1124 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001125 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001126
Guido van Rossum7f43da71994-08-01 12:15:30 +00001127 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001128 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001129 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001130 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001131
1132 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1133 verbose=yes ;;
1134
Martin v. Löwis11437992002-04-12 09:54:03 +00001135 -version | --version | --versio | --versi | --vers | -V)
1136 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001137
1138 -with-* | --with-*)
Benjamin Peterson697cd212010-05-02 16:45:11 +00001139 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001140 # Reject names that are not valid shell variable names.
Benjamin Peterson697cd212010-05-02 16:45:11 +00001141 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1142 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001143 { (exit 1); exit 1; }; }
Benjamin Peterson697cd212010-05-02 16:45:11 +00001144 ac_useropt_orig=$ac_useropt
1145 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1146 case $ac_user_opts in
1147 *"
1148"with_$ac_useropt"
1149"*) ;;
1150 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1151 ac_unrecognized_sep=', ';;
1152 esac
1153 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001154
1155 -without-* | --without-*)
Benjamin Peterson697cd212010-05-02 16:45:11 +00001156 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001157 # Reject names that are not valid shell variable names.
Benjamin Peterson697cd212010-05-02 16:45:11 +00001158 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1159 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001160 { (exit 1); exit 1; }; }
Benjamin Peterson697cd212010-05-02 16:45:11 +00001161 ac_useropt_orig=$ac_useropt
1162 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1163 case $ac_user_opts in
1164 *"
1165"with_$ac_useropt"
1166"*) ;;
1167 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1168 ac_unrecognized_sep=', ';;
1169 esac
1170 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001171
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001172 --x)
1173 # Obsolete; use --with-x.
1174 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001175
1176 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1177 | --x-incl | --x-inc | --x-in | --x-i)
1178 ac_prev=x_includes ;;
1179 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1180 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001181 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001182
1183 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1184 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1185 ac_prev=x_libraries ;;
1186 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1187 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001188 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001189
Benjamin Peterson697cd212010-05-02 16:45:11 +00001190 -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001191Try \`$0 --help' for more information." >&2
1192 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001193 ;;
1194
Martin v. Löwis11437992002-04-12 09:54:03 +00001195 *=*)
1196 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1197 # Reject names that are not valid shell variable names.
1198 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Benjamin Peterson697cd212010-05-02 16:45:11 +00001199 { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001200 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001201 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001202 export $ac_envvar ;;
1203
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001204 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001205 # FIXME: should be removed in autoconf 3.0.
Benjamin Peterson697cd212010-05-02 16:45:11 +00001206 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001207 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson697cd212010-05-02 16:45:11 +00001208 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001209 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001210 ;;
1211
1212 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001213done
1214
Guido van Rossum7f43da71994-08-01 12:15:30 +00001215if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001216 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Peterson697cd212010-05-02 16:45:11 +00001217 { $as_echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001218 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001219fi
1220
Benjamin Peterson697cd212010-05-02 16:45:11 +00001221if test -n "$ac_unrecognized_opts"; then
1222 case $enable_option_checking in
1223 no) ;;
1224 fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1225 { (exit 1); exit 1; }; } ;;
1226 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1227 esac
1228fi
1229
1230# Check all directory arguments for consistency.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001231for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1232 datadir sysconfdir sharedstatedir localstatedir includedir \
1233 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1234 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001235do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001236 eval ac_val=\$$ac_var
Benjamin Peterson697cd212010-05-02 16:45:11 +00001237 # Remove trailing slashes.
1238 case $ac_val in
1239 */ )
1240 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1241 eval $ac_var=\$ac_val;;
1242 esac
1243 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001244 case $ac_val in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001245 [\\/$]* | ?:[\\/]* ) continue;;
1246 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001247 esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00001248 { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001249 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001250done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001251
Martin v. Löwis11437992002-04-12 09:54:03 +00001252# There might be people who depend on the old broken behavior: `$host'
1253# used to hold the argument of --host etc.
1254# FIXME: To remove some day.
1255build=$build_alias
1256host=$host_alias
1257target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001258
Martin v. Löwis11437992002-04-12 09:54:03 +00001259# FIXME: To remove some day.
1260if test "x$host_alias" != x; then
1261 if test "x$build_alias" = x; then
1262 cross_compiling=maybe
Benjamin Peterson697cd212010-05-02 16:45:11 +00001263 $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 +00001264 If a cross compiler is detected then cross compile mode will be used." >&2
1265 elif test "x$build_alias" != "x$host_alias"; then
1266 cross_compiling=yes
1267 fi
1268fi
1269
1270ac_tool_prefix=
1271test -n "$host_alias" && ac_tool_prefix=$host_alias-
1272
1273test "$silent" = yes && exec 6>/dev/null
1274
Guido van Rossum627b2d71993-12-24 10:39:16 +00001275
Martin v. Löwiseba40652007-08-30 20:10:57 +00001276ac_pwd=`pwd` && test -n "$ac_pwd" &&
1277ac_ls_di=`ls -di .` &&
1278ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Peterson697cd212010-05-02 16:45:11 +00001279 { $as_echo "$as_me: error: working directory cannot be determined" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001280 { (exit 1); exit 1; }; }
1281test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Peterson697cd212010-05-02 16:45:11 +00001282 { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001283 { (exit 1); exit 1; }; }
1284
1285
Guido van Rossum627b2d71993-12-24 10:39:16 +00001286# Find the source files, if location was not specified.
1287if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001288 ac_srcdir_defaulted=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +00001289 # Try the directory containing this script, then the parent directory.
Benjamin Peterson697cd212010-05-02 16:45:11 +00001290 ac_confdir=`$as_dirname -- "$as_myself" ||
1291$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1292 X"$as_myself" : 'X\(//\)[^/]' \| \
1293 X"$as_myself" : 'X\(//\)$' \| \
1294 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1295$as_echo X"$as_myself" |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001296 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1297 s//\1/
1298 q
1299 }
1300 /^X\(\/\/\)[^/].*/{
1301 s//\1/
1302 q
1303 }
1304 /^X\(\/\/\)$/{
1305 s//\1/
1306 q
1307 }
1308 /^X\(\/\).*/{
1309 s//\1/
1310 q
1311 }
1312 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001313 srcdir=$ac_confdir
Martin v. Löwiseba40652007-08-30 20:10:57 +00001314 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001315 srcdir=..
1316 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001317else
1318 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001319fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001320if test ! -r "$srcdir/$ac_unique_file"; then
1321 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Peterson697cd212010-05-02 16:45:11 +00001322 { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001323 { (exit 1); exit 1; }; }
Brett Cannon19fab762007-06-02 03:02:29 +00001324fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001325ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1326ac_abs_confdir=`(
Benjamin Peterson697cd212010-05-02 16:45:11 +00001327 cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
Skip Montanaro89e975f2007-08-22 19:05:21 +00001328 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001329 pwd)`
1330# When building in place, set srcdir=.
1331if test "$ac_abs_confdir" = "$ac_pwd"; then
1332 srcdir=.
1333fi
1334# Remove unnecessary trailing slashes from srcdir.
1335# Double slashes in file names in object file debugging info
1336# mess up M-x gdb in Emacs.
1337case $srcdir in
1338*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1339esac
1340for ac_var in $ac_precious_vars; do
1341 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1342 eval ac_env_${ac_var}_value=\$${ac_var}
1343 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1344 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1345done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001346
Martin v. Löwis11437992002-04-12 09:54:03 +00001347#
1348# Report the --help message.
1349#
1350if test "$ac_init_help" = "long"; then
1351 # Omit some internal or obsolete options to make the list less imposing.
1352 # This message is too long to be a string in the A/UX 3.1 sh.
1353 cat <<_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001354\`configure' configures python 2.6 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001355
1356Usage: $0 [OPTION]... [VAR=VALUE]...
1357
1358To assign environment variables (e.g., CC, CFLAGS...), specify them as
1359VAR=VALUE. See below for descriptions of some of the useful variables.
1360
1361Defaults for the options are specified in brackets.
1362
1363Configuration:
1364 -h, --help display this help and exit
1365 --help=short display options specific to this package
1366 --help=recursive display the short help of all the included packages
1367 -V, --version display version information and exit
1368 -q, --quiet, --silent do not print \`checking...' messages
1369 --cache-file=FILE cache test results in FILE [disabled]
1370 -C, --config-cache alias for \`--cache-file=config.cache'
1371 -n, --no-create do not create output files
1372 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1373
Martin v. Löwis11437992002-04-12 09:54:03 +00001374Installation directories:
1375 --prefix=PREFIX install architecture-independent files in PREFIX
Benjamin Peterson697cd212010-05-02 16:45:11 +00001376 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001377 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Benjamin Peterson697cd212010-05-02 16:45:11 +00001378 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001379
1380By default, \`make install' will install all the files in
1381\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1382an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1383for instance \`--prefix=\$HOME'.
1384
1385For better control, use the options below.
1386
1387Fine tuning of the installation directories:
Benjamin Peterson697cd212010-05-02 16:45:11 +00001388 --bindir=DIR user executables [EPREFIX/bin]
1389 --sbindir=DIR system admin executables [EPREFIX/sbin]
1390 --libexecdir=DIR program executables [EPREFIX/libexec]
1391 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1392 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1393 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1394 --libdir=DIR object code libraries [EPREFIX/lib]
1395 --includedir=DIR C header files [PREFIX/include]
1396 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1397 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1398 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1399 --infodir=DIR info documentation [DATAROOTDIR/info]
1400 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1401 --mandir=DIR man documentation [DATAROOTDIR/man]
1402 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1403 --htmldir=DIR html documentation [DOCDIR]
1404 --dvidir=DIR dvi documentation [DOCDIR]
1405 --pdfdir=DIR pdf documentation [DOCDIR]
1406 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001407_ACEOF
1408
1409 cat <<\_ACEOF
1410_ACEOF
1411fi
1412
1413if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001414 case $ac_init_help in
Neal Norwitz9be57322006-08-18 05:39:20 +00001415 short | recursive ) echo "Configuration of python 2.6:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001416 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001417 cat <<\_ACEOF
1418
1419Optional Features:
Benjamin Peterson697cd212010-05-02 16:45:11 +00001420 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001421 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1422 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Brett Cannon91a1dec2008-02-13 19:15:44 +00001423 --enable-universalsdk[=SDKDIR]
Brett Cannon9a8bb0e2008-02-03 02:07:55 +00001424 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001425 --enable-framework[=INSTALLDIR]
1426 Build (MacOSX|Darwin) framework
1427 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001428 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001429 --enable-toolbox-glue disable/enable MacOSX glue code for extensions
1430 --enable-ipv6 Enable ipv6 (with ipv4) support
1431 --disable-ipv6 Disable ipv6 support
1432 --enable-unicode[=ucs[24]]
1433 Enable Unicode strings (default is yes)
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)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001438 --with-universal-archs=ARCH
1439 select architectures for universal build ("32-bit",
Ronald Oussoren7ab74352009-09-08 07:10:07 +00001440 "64-bit", "3-way", "intel" or "all")
Ronald Oussoren580c7fe2008-05-02 19:45:11 +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
Martin v. Löwis0f48d982006-04-14 14:34:26 +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
Martin v. Löwis9176fc12006-04-11 11:12:43 +00001451 --with-system-ffi build _ctypes module using an installed ffi library
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001452 --with-signal-module disable/enable signal module
1453 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1454 --with(out)-threads[=DIRECTORY]
1455 disable/enable thread support
1456 --with(out)-thread[=DIRECTORY]
1457 deprecated; use --with(out)-threads
1458 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001459 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001460 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --with(out)-pymalloc disable/enable specialized mallocs
1462 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --with-fpectl enable SIGFPE catching
1464 --with-libm=STRING math library
1465 --with-libc=STRING C library
Martin v. Löwis11437992002-04-12 09:54:03 +00001466
1467Some influential environment variables:
1468 CC C compiler command
1469 CFLAGS C compiler flags
1470 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1471 nonstandard directory <lib dir>
Martin v. Löwiseba40652007-08-30 20:10:57 +00001472 LIBS libraries to pass to the linker, e.g. -l<library>
1473 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1474 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001475 CPP C preprocessor
1476
1477Use these variables to override the choices made by `configure' or to help
1478it to find libraries and programs with nonstandard names/locations.
1479
Martin v. Löwis1d459062005-03-14 21:23:33 +00001480Report bugs to <http://www.python.org/python-bugs>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001481_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001482ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001483fi
1484
1485if test "$ac_init_help" = "recursive"; then
1486 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001487 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Benjamin Peterson697cd212010-05-02 16:45:11 +00001488 test -d "$ac_dir" ||
1489 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1490 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001491 ac_builddir=.
1492
Martin v. Löwiseba40652007-08-30 20:10:57 +00001493case "$ac_dir" in
1494.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1495*)
Benjamin Peterson697cd212010-05-02 16:45:11 +00001496 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001497 # A ".." for each directory in $ac_dir_suffix.
Benjamin Peterson697cd212010-05-02 16:45:11 +00001498 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001499 case $ac_top_builddir_sub in
1500 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1501 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1502 esac ;;
1503esac
1504ac_abs_top_builddir=$ac_pwd
1505ac_abs_builddir=$ac_pwd$ac_dir_suffix
1506# for backward compatibility:
1507ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001508
1509case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001510 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001511 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001512 ac_top_srcdir=$ac_top_builddir_sub
1513 ac_abs_top_srcdir=$ac_pwd ;;
1514 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001515 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001516 ac_top_srcdir=$srcdir
1517 ac_abs_top_srcdir=$srcdir ;;
1518 *) # Relative name.
1519 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1520 ac_top_srcdir=$ac_top_build_prefix$srcdir
1521 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001522esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00001523ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001524
Martin v. Löwiseba40652007-08-30 20:10:57 +00001525 cd "$ac_dir" || { ac_status=$?; continue; }
1526 # Check for guested configure.
1527 if test -f "$ac_srcdir/configure.gnu"; then
1528 echo &&
1529 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1530 elif test -f "$ac_srcdir/configure"; then
1531 echo &&
1532 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001533 else
Benjamin Peterson697cd212010-05-02 16:45:11 +00001534 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +00001535 fi || ac_status=$?
1536 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001537 done
1538fi
1539
Martin v. Löwiseba40652007-08-30 20:10:57 +00001540test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001541if $ac_init_version; then
1542 cat <<\_ACEOF
Neal Norwitz9be57322006-08-18 05:39:20 +00001543python configure 2.6
Benjamin Peterson697cd212010-05-02 16:45:11 +00001544generated by GNU Autoconf 2.63
Martin v. Löwis11437992002-04-12 09:54:03 +00001545
Martin v. Löwiseba40652007-08-30 20:10:57 +00001546Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Peterson697cd212010-05-02 16:45:11 +000015472002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001548This configure script is free software; the Free Software Foundation
1549gives unlimited permission to copy, distribute and modify it.
1550_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001551 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001552fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001553cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001554This file contains any messages produced by compilers while
1555running configure, to aid debugging if configure makes a mistake.
1556
Neal Norwitz9be57322006-08-18 05:39:20 +00001557It was created by python $as_me 2.6, which was
Benjamin Peterson697cd212010-05-02 16:45:11 +00001558generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001559
1560 $ $0 $@
1561
1562_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00001563exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001564{
1565cat <<_ASUNAME
1566## --------- ##
1567## Platform. ##
1568## --------- ##
1569
1570hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1571uname -m = `(uname -m) 2>/dev/null || echo unknown`
1572uname -r = `(uname -r) 2>/dev/null || echo unknown`
1573uname -s = `(uname -s) 2>/dev/null || echo unknown`
1574uname -v = `(uname -v) 2>/dev/null || echo unknown`
1575
1576/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1577/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1578
1579/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1580/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1581/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Martin v. Löwiseba40652007-08-30 20:10:57 +00001582/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001583/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1584/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1585/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1586
1587_ASUNAME
1588
1589as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1590for as_dir in $PATH
1591do
1592 IFS=$as_save_IFS
1593 test -z "$as_dir" && as_dir=.
Benjamin Peterson697cd212010-05-02 16:45:11 +00001594 $as_echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001595done
Martin v. Löwiseba40652007-08-30 20:10:57 +00001596IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001597
1598} >&5
1599
1600cat >&5 <<_ACEOF
1601
1602
1603## ----------- ##
1604## Core tests. ##
1605## ----------- ##
1606
1607_ACEOF
1608
1609
1610# Keep a trace of the command line.
1611# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001612# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001613# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001614# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001615ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001616ac_configure_args0=
1617ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001618ac_must_keep_next=false
1619for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001620do
Skip Montanaro6dead952003-09-25 14:50:04 +00001621 for ac_arg
1622 do
1623 case $ac_arg in
1624 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1625 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1626 | -silent | --silent | --silen | --sile | --sil)
1627 continue ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001628 *\'*)
Benjamin Peterson697cd212010-05-02 16:45:11 +00001629 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001630 esac
1631 case $ac_pass in
1632 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1633 2)
1634 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1635 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001636 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001637 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001638 case $ac_arg in
1639 *=* | --config-cache | -C | -disable-* | --disable-* \
1640 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1641 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1642 | -with-* | --with-* | -without-* | --without-* | --x)
1643 case "$ac_configure_args0 " in
1644 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1645 esac
1646 ;;
1647 -* ) ac_must_keep_next=true ;;
1648 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001649 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00001650 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001651 ;;
1652 esac
1653 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001654done
Skip Montanaro6dead952003-09-25 14:50:04 +00001655$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1656$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 +00001657
1658# When interrupted or exit'd, cleanup temporary files, and complete
1659# config.log. We remove comments because anyway the quotes in there
1660# would cause problems or look ugly.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001661# WARNING: Use '\'' to represent an apostrophe within the trap.
1662# 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 +00001663trap 'exit_status=$?
1664 # Save into config.log some information that might help in debugging.
1665 {
1666 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001667
Martin v. Löwis11437992002-04-12 09:54:03 +00001668 cat <<\_ASBOX
1669## ---------------- ##
1670## Cache variables. ##
1671## ---------------- ##
1672_ASBOX
1673 echo
1674 # The following way of writing the cache mishandles newlines in values,
Martin v. Löwiseba40652007-08-30 20:10:57 +00001675(
1676 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1677 eval ac_val=\$$ac_var
1678 case $ac_val in #(
1679 *${as_nl}*)
1680 case $ac_var in #(
Benjamin Peterson697cd212010-05-02 16:45:11 +00001681 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1682$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001683 esac
1684 case $ac_var in #(
1685 _ | IFS | as_nl) ;; #(
Benjamin Peterson697cd212010-05-02 16:45:11 +00001686 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +00001687 *) $as_unset $ac_var ;;
1688 esac ;;
1689 esac
1690 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001691 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +00001692 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1693 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001694 sed -n \
Martin v. Löwiseba40652007-08-30 20:10:57 +00001695 "s/'\''/'\''\\\\'\'''\''/g;
1696 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1697 ;; #(
Skip Montanaro89e975f2007-08-22 19:05:21 +00001698 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00001699 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaro89e975f2007-08-22 19:05:21 +00001700 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001701 esac |
1702 sort
1703)
Martin v. Löwis11437992002-04-12 09:54:03 +00001704 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001705
1706 cat <<\_ASBOX
1707## ----------------- ##
1708## Output variables. ##
1709## ----------------- ##
1710_ASBOX
1711 echo
1712 for ac_var in $ac_subst_vars
1713 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001714 eval ac_val=\$$ac_var
1715 case $ac_val in
Benjamin Peterson697cd212010-05-02 16:45:11 +00001716 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001717 esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00001718 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001719 done | sort
1720 echo
1721
1722 if test -n "$ac_subst_files"; then
1723 cat <<\_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00001724## ------------------- ##
1725## File substitutions. ##
1726## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001727_ASBOX
1728 echo
1729 for ac_var in $ac_subst_files
1730 do
Martin v. Löwiseba40652007-08-30 20:10:57 +00001731 eval ac_val=\$$ac_var
1732 case $ac_val in
Benjamin Peterson697cd212010-05-02 16:45:11 +00001733 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00001734 esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00001735 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001736 done | sort
1737 echo
1738 fi
1739
Martin v. Löwis11437992002-04-12 09:54:03 +00001740 if test -s confdefs.h; then
1741 cat <<\_ASBOX
1742## ----------- ##
1743## confdefs.h. ##
1744## ----------- ##
1745_ASBOX
1746 echo
Martin v. Löwiseba40652007-08-30 20:10:57 +00001747 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001748 echo
1749 fi
1750 test "$ac_signal" != 0 &&
Benjamin Peterson697cd212010-05-02 16:45:11 +00001751 $as_echo "$as_me: caught signal $ac_signal"
1752 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001753 } >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00001754 rm -f core *.core core.conftest.* &&
1755 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001756 exit $exit_status
Martin v. Löwiseba40652007-08-30 20:10:57 +00001757' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001758for ac_signal in 1 2 13 15; do
1759 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1760done
1761ac_signal=0
1762
1763# confdefs.h avoids OS command line length limits that DEFS can exceed.
Martin v. Löwiseba40652007-08-30 20:10:57 +00001764rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001765
1766# Predefined preprocessor variables.
1767
1768cat >>confdefs.h <<_ACEOF
1769#define PACKAGE_NAME "$PACKAGE_NAME"
1770_ACEOF
1771
1772
1773cat >>confdefs.h <<_ACEOF
1774#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1775_ACEOF
1776
1777
1778cat >>confdefs.h <<_ACEOF
1779#define PACKAGE_VERSION "$PACKAGE_VERSION"
1780_ACEOF
1781
1782
1783cat >>confdefs.h <<_ACEOF
1784#define PACKAGE_STRING "$PACKAGE_STRING"
1785_ACEOF
1786
1787
1788cat >>confdefs.h <<_ACEOF
1789#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1790_ACEOF
1791
1792
1793# Let the site file select an alternate cache file if it wants to.
Benjamin Peterson697cd212010-05-02 16:45:11 +00001794# Prefer an explicitly selected file to automatically selected ones.
1795ac_site_file1=NONE
1796ac_site_file2=NONE
Martin v. Löwiseba40652007-08-30 20:10:57 +00001797if test -n "$CONFIG_SITE"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00001798 ac_site_file1=$CONFIG_SITE
Martin v. Löwiseba40652007-08-30 20:10:57 +00001799elif test "x$prefix" != xNONE; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00001800 ac_site_file1=$prefix/share/config.site
1801 ac_site_file2=$prefix/etc/config.site
Martin v. Löwiseba40652007-08-30 20:10:57 +00001802else
Benjamin Peterson697cd212010-05-02 16:45:11 +00001803 ac_site_file1=$ac_default_prefix/share/config.site
1804 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001805fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00001806for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Martin v. Löwiseba40652007-08-30 20:10:57 +00001807do
Benjamin Peterson697cd212010-05-02 16:45:11 +00001808 test "x$ac_site_file" = xNONE && continue
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001809 if test -r "$ac_site_file"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00001810 { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1811$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001812 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001813 . "$ac_site_file"
1814 fi
1815done
1816
1817if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001818 # Some versions of bash will fail to source /dev/null (special
1819 # files actually), so we avoid doing that.
1820 if test -f "$cache_file"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00001821 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1822$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 case $cache_file in
Martin v. Löwiseba40652007-08-30 20:10:57 +00001824 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1825 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001826 esac
1827 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001828else
Benjamin Peterson697cd212010-05-02 16:45:11 +00001829 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1830$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001831 >$cache_file
1832fi
1833
1834# Check that the precious variables saved in the cache have kept the same
1835# value.
1836ac_cache_corrupted=false
Martin v. Löwiseba40652007-08-30 20:10:57 +00001837for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001838 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1839 eval ac_new_set=\$ac_env_${ac_var}_set
Martin v. Löwiseba40652007-08-30 20:10:57 +00001840 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1841 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001842 case $ac_old_set,$ac_new_set in
1843 set,)
Benjamin Peterson697cd212010-05-02 16:45:11 +00001844 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1845$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 +00001846 ac_cache_corrupted=: ;;
1847 ,set)
Benjamin Peterson697cd212010-05-02 16:45:11 +00001848 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1849$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001850 ac_cache_corrupted=: ;;
1851 ,);;
1852 *)
1853 if test "x$ac_old_val" != "x$ac_new_val"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00001854 # differences in whitespace do not lead to failure.
1855 ac_old_val_w=`echo x $ac_old_val`
1856 ac_new_val_w=`echo x $ac_new_val`
1857 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1858 { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1859$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1860 ac_cache_corrupted=:
1861 else
1862 { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1863$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1864 eval $ac_var=\$ac_old_val
1865 fi
1866 { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1867$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1868 { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1869$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001870 fi;;
1871 esac
1872 # Pass precious variables to config.status.
1873 if test "$ac_new_set" = set; then
1874 case $ac_new_val in
Benjamin Peterson697cd212010-05-02 16:45:11 +00001875 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001876 *) ac_arg=$ac_var=$ac_new_val ;;
1877 esac
1878 case " $ac_configure_args " in
1879 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1880 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1881 esac
1882 fi
1883done
1884if $ac_cache_corrupted; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00001885 { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1886$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1887 { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1888$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1889 { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1890$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 +00001891 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001892fi
1893
Martin v. Löwiseba40652007-08-30 20:10:57 +00001894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
Guido van Rossum7f43da71994-08-01 12:15:30 +00001918ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001919ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001920ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1921ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1922ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001923
Guido van Rossum627b2d71993-12-24 10:39:16 +00001924
Michael W. Hudson54241132001-12-07 15:38:26 +00001925
Martin v. Löwiseba40652007-08-30 20:10:57 +00001926ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001927
1928
Martin v. Löwis11437992002-04-12 09:54:03 +00001929
1930
1931
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001932
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001933
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001934# We don't use PACKAGE_ variables, and they cause conflicts
1935# with other autoconf-based packages that include Python.h
1936grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1937rm confdefs.h
1938mv confdefs.h.new confdefs.h
1939
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001940
Neal Norwitz9be57322006-08-18 05:39:20 +00001941VERSION=2.6
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001942
Martin v. Löwis1142de32002-03-29 16:28:31 +00001943
1944SOVERSION=1.0
1945
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001946# The later defininition of _XOPEN_SOURCE disables certain features
1947# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1948
1949cat >>confdefs.h <<\_ACEOF
1950#define _GNU_SOURCE 1
1951_ACEOF
1952
1953
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001954# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1955# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1956# them.
1957
1958cat >>confdefs.h <<\_ACEOF
1959#define _NETBSD_SOURCE 1
1960_ACEOF
1961
1962
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001963# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1964# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1965# them.
1966
1967cat >>confdefs.h <<\_ACEOF
1968#define __BSD_VISIBLE 1
1969_ACEOF
1970
1971
Martin v. Löwisd6320502004-08-12 13:45:08 +00001972# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1973# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1974
1975cat >>confdefs.h <<\_ACEOF
1976#define _BSD_TYPES 1
1977_ACEOF
1978
1979
Ronald Oussoren5640ce22008-06-05 12:58:24 +00001980# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1981# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1982# them.
1983
1984cat >>confdefs.h <<\_ACEOF
1985#define _DARWIN_C_SOURCE 1
1986_ACEOF
1987
1988
1989
Martin v. Löwis35195ad2002-11-11 13:26:51 +00001990define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001991
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00001992# Arguments passed to configure.
1993
1994CONFIG_ARGS="$ac_configure_args"
1995
Benjamin Peterson697cd212010-05-02 16:45:11 +00001996{ $as_echo "$as_me:$LINENO: checking for --enable-universalsdk" >&5
1997$as_echo_n "checking for --enable-universalsdk... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00001998# Check whether --enable-universalsdk was given.
Ronald Oussoren988117f2006-04-29 11:31:35 +00001999if test "${enable_universalsdk+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002000 enableval=$enable_universalsdk;
Ronald Oussoren988117f2006-04-29 11:31:35 +00002001 case $enableval in
2002 yes)
2003 enableval=/Developer/SDKs/MacOSX10.4u.sdk
Ronald Oussoren9b831f42010-02-07 11:57:14 +00002004 if test ! -d "${enableval}"
2005 then
2006 enableval=/
2007 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002008 ;;
2009 esac
2010 case $enableval in
2011 no)
2012 UNIVERSALSDK=
2013 enable_universalsdk=
2014 ;;
2015 *)
2016 UNIVERSALSDK=$enableval
Ronald Oussoren9b831f42010-02-07 11:57:14 +00002017 if test ! -d "${UNIVERSALSDK}"
2018 then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002019 { { $as_echo "$as_me:$LINENO: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&5
2020$as_echo "$as_me: error: --enable-universalsdk specifies non-existing SDK: ${UNIVERSALSDK}" >&2;}
Ronald Oussoren9b831f42010-02-07 11:57:14 +00002021 { (exit 1); exit 1; }; }
2022 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002023 ;;
2024 esac
2025
Ronald Oussoren9b831f42010-02-07 11:57:14 +00002026
Ronald Oussoren988117f2006-04-29 11:31:35 +00002027else
2028
2029 UNIVERSALSDK=
2030 enable_universalsdk=
2031
Martin v. Löwiseba40652007-08-30 20:10:57 +00002032fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002033
Ronald Oussoren9b831f42010-02-07 11:57:14 +00002034if test -n "${UNIVERSALSDK}"
2035then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002036 { $as_echo "$as_me:$LINENO: result: ${UNIVERSALSDK}" >&5
2037$as_echo "${UNIVERSALSDK}" >&6; }
Ronald Oussoren9b831f42010-02-07 11:57:14 +00002038else
Benjamin Peterson697cd212010-05-02 16:45:11 +00002039 { $as_echo "$as_me:$LINENO: result: no" >&5
2040$as_echo "no" >&6; }
Ronald Oussoren9b831f42010-02-07 11:57:14 +00002041fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00002042
Martin v. Löwiseba40652007-08-30 20:10:57 +00002043
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00002044
2045
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002046UNIVERSAL_ARCHS="32-bit"
Ronald Oussorenea580e12010-03-09 10:36:28 +00002047
2048
Benjamin Peterson697cd212010-05-02 16:45:11 +00002049{ $as_echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
2050$as_echo_n "checking for --with-universal-archs... " >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002051
2052# Check whether --with-universal-archs was given.
2053if test "${with_universal_archs+set}" = set; then
2054 withval=$with_universal_archs;
Benjamin Peterson697cd212010-05-02 16:45:11 +00002055 { $as_echo "$as_me:$LINENO: result: $withval" >&5
2056$as_echo "$withval" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002057 UNIVERSAL_ARCHS="$withval"
Ronald Oussorend0841712009-09-29 13:01:59 +00002058 if test "${enable_universalsdk}" ; then
2059 :
2060 else
Benjamin Peterson697cd212010-05-02 16:45:11 +00002061 { { $as_echo "$as_me:$LINENO: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&5
2062$as_echo "$as_me: error: --with-universal-archs without --enable-universalsdk. See Mac/README" >&2;}
Ronald Oussorend0841712009-09-29 13:01:59 +00002063 { (exit 1); exit 1; }; }
2064 fi
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002065
2066else
2067
Benjamin Peterson697cd212010-05-02 16:45:11 +00002068 { $as_echo "$as_me:$LINENO: result: 32-bit" >&5
2069$as_echo "32-bit" >&6; }
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002070
2071fi
2072
2073
2074
2075
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002076
2077# Check whether --with-framework-name was given.
2078if test "${with_framework_name+set}" = set; then
2079 withval=$with_framework_name;
Ronald Oussorend0841712009-09-29 13:01:59 +00002080 if test "${enable_framework}"; then
2081 :
2082 else
Benjamin Peterson697cd212010-05-02 16:45:11 +00002083 { { $as_echo "$as_me:$LINENO: error: --with-framework-name without --enable-framework. See Mac/README" >&5
2084$as_echo "$as_me: error: --with-framework-name without --enable-framework. See Mac/README" >&2;}
Ronald Oussorend0841712009-09-29 13:01:59 +00002085 { (exit 1); exit 1; }; }
2086 fi
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002087 PYTHONFRAMEWORK=${withval}
2088 PYTHONFRAMEWORKDIR=${withval}.framework
2089 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2090
2091else
2092
2093 PYTHONFRAMEWORK=Python
2094 PYTHONFRAMEWORKDIR=Python.framework
2095 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2096
2097fi
2098
Martin v. Löwiseba40652007-08-30 20:10:57 +00002099# Check whether --enable-framework was given.
Jack Jansene578a632001-08-15 01:27:14 +00002100if test "${enable_framework+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002101 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002102 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002103 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002104 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002105 esac
2106 case $enableval in
2107 no)
2108 PYTHONFRAMEWORK=
2109 PYTHONFRAMEWORKDIR=no-framework
2110 PYTHONFRAMEWORKPREFIX=
2111 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002112 FRAMEWORKINSTALLFIRST=
2113 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002114 FRAMEWORKALTINSTALLFIRST=
2115 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002116 if test "x${prefix}" = "xNONE"; then
2117 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2118 else
2119 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2120 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002121 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002122 ;;
2123 *)
2124 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002125 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002126 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002127 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure bininstall maninstall"
Ronald Oussorenea580e12010-03-09 10:36:28 +00002128 case "${UNIVERSAL_ARCHS}" in
2129 all|3-way|intel)
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002130 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussoren75d83852009-03-30 17:56:14 +00002131 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Ronald Oussorenea580e12010-03-09 10:36:28 +00002132 ;;
2133 *)
Ronald Oussoren75d83852009-03-30 17:56:14 +00002134 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002135 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
Ronald Oussorenea580e12010-03-09 10:36:28 +00002136 ;;
2137 esac
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002138
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002139 if test "x${prefix}" = "xNONE" ; then
2140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2141 else
2142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2143 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002144 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Ronald Oussoren836b0392006-05-14 19:56:34 +00002145
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002146 # Add files for Mac specific code to the list of output
Ronald Oussoren836b0392006-05-14 19:56:34 +00002147 # files:
Martin v. Löwiseba40652007-08-30 20:10:57 +00002148 ac_config_files="$ac_config_files Mac/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002149
Martin v. Löwiseba40652007-08-30 20:10:57 +00002150 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002151
Martin v. Löwiseba40652007-08-30 20:10:57 +00002152 ac_config_files="$ac_config_files Mac/IDLE/Makefile"
Ronald Oussoren836b0392006-05-14 19:56:34 +00002153
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002154 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2155
2156 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2157
Jack Jansene578a632001-08-15 01:27:14 +00002158 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002159
Guido van Rossum563e7081996-09-10 18:20:48 +00002160else
Martin v. Löwis11437992002-04-12 09:54:03 +00002161
Jack Jansene578a632001-08-15 01:27:14 +00002162 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002163 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002164 PYTHONFRAMEWORKPREFIX=
2165 PYTHONFRAMEWORKINSTALLDIR=
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002166 FRAMEWORKINSTALLFIRST=
2167 FRAMEWORKINSTALLLAST=
Ronald Oussoren5b787322006-06-06 19:50:24 +00002168 FRAMEWORKALTINSTALLFIRST=
2169 FRAMEWORKALTINSTALLLAST=
Ronald Oussoren2db3a8f2006-06-07 19:06:01 +00002170 if test "x${prefix}" = "xNONE" ; then
2171 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2172 else
2173 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2174 fi
Jack Jansene578a632001-08-15 01:27:14 +00002175 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002176
Ronald Oussoren5640ce22008-06-05 12:58:24 +00002177 if test "$UNIVERSAL_ARCHS" = "all"
2178 then
2179 FRAMEWORKINSTALLLAST=update4wayuniversal
2180 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2181 fi
2182
Martin v. Löwiseba40652007-08-30 20:10:57 +00002183fi
2184
Michael W. Hudson54241132001-12-07 15:38:26 +00002185
2186
2187
2188
Jack Jansene578a632001-08-15 01:27:14 +00002189
Ronald Oussoren567a8ff2006-05-26 11:43:26 +00002190
2191
Ronald Oussoren5b787322006-06-06 19:50:24 +00002192
2193
2194
Ronald Oussoren580c7fe2008-05-02 19:45:11 +00002195
Jack Jansene578a632001-08-15 01:27:14 +00002196##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002197## AC_HELP_STRING(--with-dyld,
2198## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002199##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002200# Set name for machine-dependent library files
2201
Benjamin Peterson697cd212010-05-02 16:45:11 +00002202{ $as_echo "$as_me:$LINENO: checking MACHDEP" >&5
2203$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002204if test -z "$MACHDEP"
2205then
Guido van Rossum563e7081996-09-10 18:20:48 +00002206 ac_sys_system=`uname -s`
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002207 if test "$ac_sys_system" = "AIX" -o "$ac_sys_system" = "Monterey64" \
2208 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002209 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002210 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002211 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002212 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002213 ac_md_system=`echo $ac_sys_system |
2214 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2215 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002216 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002217 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002218
Guido van Rossum07397971997-04-29 21:49:50 +00002219 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002220 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002221 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002222 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002223 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002224 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002225 esac
2226fi
Guido van Rossum91922671997-10-09 20:24:13 +00002227
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002228# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2229# disable features if it is defined, without any means to access these
2230# features as extensions. For these systems, we skip the definition of
2231# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2232# some feature, make sure there is no alternative way to access this
2233# feature. Also, when using wildcards, make sure you have verified the
2234# need for not defining _XOPEN_SOURCE on all systems matching the
2235# wildcard, and that the wildcard does not include future systems
2236# (which may remove their limitations).
2237case $ac_sys_system/$ac_sys_release in
2238 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2239 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002240 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Martin v. Löwis4c5e2c82010-02-15 21:43:41 +00002241 # In addition, Stefan Krah confirms that issue #1244610 exists through
2242 # OpenBSD 4.6, but is fixed in 4.7.
2243 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123456])
Martin v. Löwiscb78de62007-12-29 18:49:21 +00002244 define_xopen_source=no
2245 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2246 # also defined. This can be overridden by defining _BSD_SOURCE
2247 # As this has a different meaning on Linux, only define it on OpenBSD
2248
2249cat >>confdefs.h <<\_ACEOF
2250#define _BSD_SOURCE 1
2251_ACEOF
2252
2253 ;;
Martin v. Löwis4c5e2c82010-02-15 21:43:41 +00002254 OpenBSD/4.[789])
Martin v. Löwis4bacaca2010-02-15 08:34:34 +00002255 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2256 # also defined. This can be overridden by defining _BSD_SOURCE
2257 # As this has a different meaning on Linux, only define it on OpenBSD
2258
2259cat >>confdefs.h <<\_ACEOF
2260#define _BSD_SOURCE 1
2261_ACEOF
2262
2263 ;;
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002264 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2265 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2266 # Marc Recht
Benjamin Petersonf9c08882008-11-16 17:57:10 +00002267 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis4d542ec2006-11-25 15:39:19 +00002268 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002269 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2270 # of union __?sigval. Reported by Stuart Bishop.
2271 SunOS/5.6)
2272 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002273 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2274 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002275 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002276 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002277 define_xopen_source=no;;
2278 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002279 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002280 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002281 define_xopen_source=no;;
Martin v. Löwis7f08c1f2008-11-04 20:43:31 +00002282 # On FreeBSD 4, the math functions C89 does not cover are never defined
2283 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2284 FreeBSD/4.*)
2285 define_xopen_source=no;;
2286 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2287 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2288 # identifies itself as Darwin/7.*
2289 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2290 # disables platform specific features beyond repair.
2291 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2292 # has no effect, don't bother defining them
2293 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002294 define_xopen_source=no;;
Ronald Oussoren668907d2010-03-08 18:21:19 +00002295 Darwin/1[0-9].*)
Ronald Oussoren09416212010-03-08 07:00:08 +00002296 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002297 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2298 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2299 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002300 AIX/4)
2301 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002302 AIX/5)
2303 if test `uname -r` -eq 1; then
2304 define_xopen_source=no
2305 fi
2306 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00002307 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2308 # defining NI_NUMERICHOST.
2309 QNX/6.3.2)
2310 define_xopen_source=no
2311 ;;
Martin v. Löwisa0588362006-04-04 06:03:50 +00002312
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002313esac
2314
2315if test $define_xopen_source = yes
2316then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002317 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2318 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002319 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2320 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002321 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002322 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002323
2324cat >>confdefs.h <<\_ACEOF
2325#define _XOPEN_SOURCE 500
2326_ACEOF
2327
2328 ;;
2329 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002330
2331cat >>confdefs.h <<\_ACEOF
2332#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002333_ACEOF
2334
Skip Montanarof0d5f792004-08-15 14:08:23 +00002335 ;;
2336 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002337
2338 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2339 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2340 # several APIs are not declared. Since this is also needed in some
2341 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002342 # except for Solaris 10, where it must not be defined,
2343 # as it implies XPG4.2
2344 case $ac_sys_system/$ac_sys_release in
2345 SunOS/5.10)
2346 ;;
2347 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002348
2349cat >>confdefs.h <<\_ACEOF
2350#define _XOPEN_SOURCE_EXTENDED 1
2351_ACEOF
2352
Martin v. Löwis7dece662005-11-26 11:38:24 +00002353 ;;
2354 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002355
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002356
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002357cat >>confdefs.h <<\_ACEOF
2358#define _POSIX_C_SOURCE 200112L
2359_ACEOF
2360
2361
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002362fi
2363
Guido van Rossum91922671997-10-09 20:24:13 +00002364#
2365# SGI compilers allow the specification of the both the ABI and the
2366# ISA on the command line. Depending on the values of these switches,
2367# different and often incompatable code will be generated.
2368#
2369# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2370# thus supply support for various ABI/ISA combinations. The MACHDEP
2371# variable is also adjusted.
2372#
2373
2374if test ! -z "$SGI_ABI"
2375then
2376 CC="cc $SGI_ABI"
2377 LDFLAGS="$SGI_ABI $LDFLAGS"
2378 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2379fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00002380{ $as_echo "$as_me:$LINENO: result: $MACHDEP" >&5
2381$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002382
Jack Jansen83f898c2002-12-30 22:23:40 +00002383# And add extra plat-mac for darwin
2384
Jack Jansen7b59b422003-03-17 15:44:10 +00002385
Benjamin Peterson697cd212010-05-02 16:45:11 +00002386{ $as_echo "$as_me:$LINENO: checking EXTRAPLATDIR" >&5
2387$as_echo_n "checking EXTRAPLATDIR... " >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002388if test -z "$EXTRAPLATDIR"
2389then
2390 case $MACHDEP in
Jack Jansen7b59b422003-03-17 15:44:10 +00002391 darwin)
2392 EXTRAPLATDIR="\$(PLATMACDIRS)"
2393 EXTRAMACHDEPPATH="\$(PLATMACPATH)"
2394 ;;
2395 *)
2396 EXTRAPLATDIR=""
2397 EXTRAMACHDEPPATH=""
2398 ;;
Jack Jansen83f898c2002-12-30 22:23:40 +00002399 esac
2400fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00002401{ $as_echo "$as_me:$LINENO: result: $EXTRAPLATDIR" >&5
2402$as_echo "$EXTRAPLATDIR" >&6; }
Jack Jansen83f898c2002-12-30 22:23:40 +00002403
Jack Jansen6b08a402004-06-03 12:41:45 +00002404# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2405# it may influence the way we can build extensions, so distutils
2406# needs to check it
2407
Ronald Oussoren988117f2006-04-29 11:31:35 +00002408
Jack Jansen6b08a402004-06-03 12:41:45 +00002409CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Ronald Oussoren988117f2006-04-29 11:31:35 +00002410EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002411
Benjamin Peterson697cd212010-05-02 16:45:11 +00002412{ $as_echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2413$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002414ac_sys_machine=`uname -m`
Benjamin Peterson697cd212010-05-02 16:45:11 +00002415{ $as_echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2416$as_echo "$ac_sys_machine" >&6; }
Mark Dickinson65134662008-04-25 16:11:04 +00002417
Guido van Rossum627b2d71993-12-24 10:39:16 +00002418# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002419
2420# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2421# for debug/optimization stuff. BASECFLAGS is for flags that are required
2422# just to get things to compile and link. Users are free to override OPT
2423# when running configure or make. The build should not break if they do.
2424# BASECFLAGS should generally not be messed with, however.
2425
2426# XXX shouldn't some/most/all of this code be merged with the stuff later
2427# on that fiddles with OPT and BASECFLAGS?
Benjamin Peterson697cd212010-05-02 16:45:11 +00002428{ $as_echo "$as_me:$LINENO: checking for --without-gcc" >&5
2429$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002430
Martin v. Löwiseba40652007-08-30 20:10:57 +00002431# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002432if test "${with_gcc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002433 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002434 case $withval in
Ronald Oussoren75d83852009-03-30 17:56:14 +00002435 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002436 without_gcc=yes;;
2437 yes) CC=gcc
2438 without_gcc=no;;
2439 *) CC=$withval
2440 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002441 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002442else
Martin v. Löwis11437992002-04-12 09:54:03 +00002443
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002444 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002445 AIX*) CC=cc_r
2446 without_gcc=;;
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002447 BeOS*)
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002448 case $BE_HOST_CPU in
2449 ppc)
Fred Drake5790be12000-10-09 17:06:13 +00002450 CC=mwcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002451 without_gcc=yes
Skip Montanarodecc6a42003-01-01 20:07:49 +00002452 BASECFLAGS="$BASECFLAGS -export pragma"
2453 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002454 LDFLAGS="$LDFLAGS -nodup"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002455 ;;
2456 x86)
Fred Drake5790be12000-10-09 17:06:13 +00002457 CC=gcc
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002458 without_gcc=no
Skip Montanarodecc6a42003-01-01 20:07:49 +00002459 OPT="$OPT -O"
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002460 ;;
2461 *)
Benjamin Peterson697cd212010-05-02 16:45:11 +00002462 { { $as_echo "$as_me:$LINENO: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&5
2463$as_echo "$as_me: error: Unknown BeOS platform \"$BE_HOST_CPU\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00002464 { (exit 1); exit 1; }; }
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002465 ;;
2466 esac
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002467 AR="\$(srcdir)/Modules/ar_beos"
2468 RANLIB=:
Guido van Rossum7a5f4201999-01-12 20:30:23 +00002469 ;;
Trent Mick635f6fb2000-08-23 21:33:05 +00002470 Monterey*)
2471 RANLIB=:
Martin v. Löwis130fb172001-07-19 11:00:41 +00002472 without_gcc=;;
2473 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002474 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00002475fi
2476
Benjamin Peterson697cd212010-05-02 16:45:11 +00002477{ $as_echo "$as_me:$LINENO: result: $without_gcc" >&5
2478$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002479
Guido van Rossum8b131c51995-03-09 14:10:13 +00002480# If the user switches compilers, we can't believe the cache
2481if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2482then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002483 { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002484(it is also a good idea to do 'make clean' before compiling)" >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00002485$as_echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002486(it is also a good idea to do 'make clean' before compiling)" >&2;}
2487 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002488fi
2489
Martin v. Löwis11437992002-04-12 09:54:03 +00002490ac_ext=c
2491ac_cpp='$CPP $CPPFLAGS'
2492ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2493ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2494ac_compiler_gnu=$ac_cv_c_compiler_gnu
2495if test -n "$ac_tool_prefix"; then
2496 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2497set dummy ${ac_tool_prefix}gcc; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00002498{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2499$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002500if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002501 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002502else
2503 if test -n "$CC"; then
2504 ac_cv_prog_CC="$CC" # Let the user override the test.
2505else
Martin v. Löwis11437992002-04-12 09:54:03 +00002506as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2507for as_dir in $PATH
2508do
2509 IFS=$as_save_IFS
2510 test -z "$as_dir" && as_dir=.
2511 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002512 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 +00002513 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Benjamin Peterson697cd212010-05-02 16:45:11 +00002514 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002515 break 2
2516 fi
2517done
2518done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002519IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002520
Jack Jansendd19cf82001-12-06 22:36:17 +00002521fi
2522fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002523CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002524if test -n "$CC"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002525 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2526$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002527else
Benjamin Peterson697cd212010-05-02 16:45:11 +00002528 { $as_echo "$as_me:$LINENO: result: no" >&5
2529$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002530fi
2531
Martin v. Löwiseba40652007-08-30 20:10:57 +00002532
Martin v. Löwis11437992002-04-12 09:54:03 +00002533fi
2534if test -z "$ac_cv_prog_CC"; then
2535 ac_ct_CC=$CC
2536 # Extract the first word of "gcc", so it can be a program name with args.
2537set dummy gcc; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00002538{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2539$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002540if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002541 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002542else
2543 if test -n "$ac_ct_CC"; then
2544 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2545else
2546as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2547for as_dir in $PATH
2548do
2549 IFS=$as_save_IFS
2550 test -z "$as_dir" && as_dir=.
2551 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002552 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 +00002553 ac_cv_prog_ac_ct_CC="gcc"
Benjamin Peterson697cd212010-05-02 16:45:11 +00002554 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 break 2
2556 fi
2557done
2558done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002559IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002560
2561fi
2562fi
2563ac_ct_CC=$ac_cv_prog_ac_ct_CC
2564if test -n "$ac_ct_CC"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002565 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2566$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002567else
Benjamin Peterson697cd212010-05-02 16:45:11 +00002568 { $as_echo "$as_me:$LINENO: result: no" >&5
2569$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002570fi
2571
Martin v. Löwiseba40652007-08-30 20:10:57 +00002572 if test "x$ac_ct_CC" = x; then
2573 CC=""
2574 else
2575 case $cross_compiling:$ac_tool_warned in
2576yes:)
Benjamin Peterson697cd212010-05-02 16:45:11 +00002577{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2578$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002579ac_tool_warned=yes ;;
2580esac
2581 CC=$ac_ct_CC
2582 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002583else
2584 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002585fi
2586
Jack Jansendd19cf82001-12-06 22:36:17 +00002587if test -z "$CC"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002588 if test -n "$ac_tool_prefix"; then
2589 # 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 +00002590set dummy ${ac_tool_prefix}cc; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00002591{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2592$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002593if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002594 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002595else
2596 if test -n "$CC"; then
2597 ac_cv_prog_CC="$CC" # Let the user override the test.
2598else
Martin v. Löwis11437992002-04-12 09:54:03 +00002599as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2600for as_dir in $PATH
2601do
2602 IFS=$as_save_IFS
2603 test -z "$as_dir" && as_dir=.
2604 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002605 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 +00002606 ac_cv_prog_CC="${ac_tool_prefix}cc"
Benjamin Peterson697cd212010-05-02 16:45:11 +00002607 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002608 break 2
2609 fi
2610done
2611done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002612IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002613
2614fi
2615fi
2616CC=$ac_cv_prog_CC
2617if test -n "$CC"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002618 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2619$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002620else
Benjamin Peterson697cd212010-05-02 16:45:11 +00002621 { $as_echo "$as_me:$LINENO: result: no" >&5
2622$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002623fi
2624
Martin v. Löwiseba40652007-08-30 20:10:57 +00002625
Martin v. Löwis11437992002-04-12 09:54:03 +00002626 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002627fi
2628if test -z "$CC"; then
2629 # Extract the first word of "cc", so it can be a program name with args.
2630set dummy cc; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00002631{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2632$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002633if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002634 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002635else
2636 if test -n "$CC"; then
2637 ac_cv_prog_CC="$CC" # Let the user override the test.
2638else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002639 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2641for as_dir in $PATH
2642do
2643 IFS=$as_save_IFS
2644 test -z "$as_dir" && as_dir=.
2645 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002646 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 +00002647 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2648 ac_prog_rejected=yes
2649 continue
2650 fi
2651 ac_cv_prog_CC="cc"
Benjamin Peterson697cd212010-05-02 16:45:11 +00002652 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002653 break 2
2654 fi
2655done
2656done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002657IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002658
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002659if test $ac_prog_rejected = yes; then
2660 # We found a bogon in the path, so make sure we never use it.
2661 set dummy $ac_cv_prog_CC
2662 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002663 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002664 # We chose a different compiler from the bogus one.
2665 # However, it has the same basename, so the bogon will be chosen
2666 # first if we set CC to just the basename; use the full file name.
2667 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002668 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002669 fi
2670fi
2671fi
2672fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002673CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002674if test -n "$CC"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002675 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2676$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002677else
Benjamin Peterson697cd212010-05-02 16:45:11 +00002678 { $as_echo "$as_me:$LINENO: result: no" >&5
2679$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002680fi
2681
Martin v. Löwiseba40652007-08-30 20:10:57 +00002682
Martin v. Löwis11437992002-04-12 09:54:03 +00002683fi
2684if test -z "$CC"; then
2685 if test -n "$ac_tool_prefix"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002686 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002687 do
2688 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2689set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00002690{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2691$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002692if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002693 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002694else
2695 if test -n "$CC"; then
2696 ac_cv_prog_CC="$CC" # Let the user override the test.
2697else
Martin v. Löwis11437992002-04-12 09:54:03 +00002698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2699for as_dir in $PATH
2700do
2701 IFS=$as_save_IFS
2702 test -z "$as_dir" && as_dir=.
2703 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002704 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 +00002705 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Benjamin Peterson697cd212010-05-02 16:45:11 +00002706 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002707 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002708 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002709done
2710done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002711IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002712
2713fi
2714fi
2715CC=$ac_cv_prog_CC
2716if test -n "$CC"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002717 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2718$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002719else
Benjamin Peterson697cd212010-05-02 16:45:11 +00002720 { $as_echo "$as_me:$LINENO: result: no" >&5
2721$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002722fi
2723
Martin v. Löwiseba40652007-08-30 20:10:57 +00002724
Martin v. Löwis11437992002-04-12 09:54:03 +00002725 test -n "$CC" && break
2726 done
2727fi
2728if test -z "$CC"; then
2729 ac_ct_CC=$CC
Martin v. Löwiseba40652007-08-30 20:10:57 +00002730 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002731do
2732 # Extract the first word of "$ac_prog", so it can be a program name with args.
2733set dummy $ac_prog; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00002734{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2735$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002736if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002737 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002738else
2739 if test -n "$ac_ct_CC"; then
2740 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2741else
2742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2743for as_dir in $PATH
2744do
2745 IFS=$as_save_IFS
2746 test -z "$as_dir" && as_dir=.
2747 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00002748 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 +00002749 ac_cv_prog_ac_ct_CC="$ac_prog"
Benjamin Peterson697cd212010-05-02 16:45:11 +00002750 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002751 break 2
2752 fi
2753done
2754done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002755IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002756
Martin v. Löwis11437992002-04-12 09:54:03 +00002757fi
2758fi
2759ac_ct_CC=$ac_cv_prog_ac_ct_CC
2760if test -n "$ac_ct_CC"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002761 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2762$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002763else
Benjamin Peterson697cd212010-05-02 16:45:11 +00002764 { $as_echo "$as_me:$LINENO: result: no" >&5
2765$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002766fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002767
Martin v. Löwiseba40652007-08-30 20:10:57 +00002768
Martin v. Löwis11437992002-04-12 09:54:03 +00002769 test -n "$ac_ct_CC" && break
2770done
Michael W. Hudson54241132001-12-07 15:38:26 +00002771
Martin v. Löwiseba40652007-08-30 20:10:57 +00002772 if test "x$ac_ct_CC" = x; then
2773 CC=""
2774 else
2775 case $cross_compiling:$ac_tool_warned in
2776yes:)
Benjamin Peterson697cd212010-05-02 16:45:11 +00002777{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2778$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00002779ac_tool_warned=yes ;;
2780esac
2781 CC=$ac_ct_CC
2782 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002783fi
2784
2785fi
2786
2787
Benjamin Peterson697cd212010-05-02 16:45:11 +00002788test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2789$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2790{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002791See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00002792$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002793See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00002794 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002795
2796# Provide some information about the compiler.
Benjamin Peterson697cd212010-05-02 16:45:11 +00002797$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2798set X $ac_compile
2799ac_compiler=$2
Martin v. Löwiseba40652007-08-30 20:10:57 +00002800{ (ac_try="$ac_compiler --version >&5"
2801case "(($ac_try" in
2802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2803 *) ac_try_echo=$ac_try;;
2804esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00002805eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2806$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002807 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002808 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00002809 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002810 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002811{ (ac_try="$ac_compiler -v >&5"
2812case "(($ac_try" in
2813 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2814 *) ac_try_echo=$ac_try;;
2815esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00002816eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2817$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002818 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002819 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00002820 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002821 (exit $ac_status); }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002822{ (ac_try="$ac_compiler -V >&5"
2823case "(($ac_try" in
2824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2825 *) ac_try_echo=$ac_try;;
2826esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00002827eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2828$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002829 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002830 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00002831 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002832 (exit $ac_status); }
2833
2834cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002835/* confdefs.h. */
2836_ACEOF
2837cat confdefs.h >>conftest.$ac_ext
2838cat >>conftest.$ac_ext <<_ACEOF
2839/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002840
Martin v. Löwis11437992002-04-12 09:54:03 +00002841int
2842main ()
2843{
2844
2845 ;
2846 return 0;
2847}
2848_ACEOF
2849ac_clean_files_save=$ac_clean_files
Benjamin Peterson697cd212010-05-02 16:45:11 +00002850ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002851# Try to create an executable without -o first, disregard a.out.
2852# It will help us diagnose broken compilers, and finding out an intuition
2853# of exeext.
Benjamin Peterson697cd212010-05-02 16:45:11 +00002854{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2855$as_echo_n "checking for C compiler default output file name... " >&6; }
2856ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2857
2858# The possible output files:
2859ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2860
Martin v. Löwiseba40652007-08-30 20:10:57 +00002861ac_rmfiles=
2862for ac_file in $ac_files
2863do
2864 case $ac_file in
Benjamin Peterson697cd212010-05-02 16:45:11 +00002865 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00002866 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2867 esac
2868done
2869rm -f $ac_rmfiles
2870
2871if { (ac_try="$ac_link_default"
2872case "(($ac_try" in
2873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2874 *) ac_try_echo=$ac_try;;
2875esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00002876eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2877$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002878 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002879 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00002880 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002881 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00002882 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2883# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2884# in a Makefile. We should not override ac_cv_exeext if it was cached,
2885# so that the user can short-circuit this test for compilers unknown to
2886# Autoconf.
2887for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002888do
2889 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002890 case $ac_file in
Benjamin Peterson697cd212010-05-02 16:45:11 +00002891 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002892 ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002893 [ab].out )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002894 # We found the default executable, but exeext='' is most
2895 # certainly right.
2896 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002897 *.* )
Martin v. Löwiseba40652007-08-30 20:10:57 +00002898 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2899 then :; else
2900 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2901 fi
2902 # We set ac_cv_exeext here because the later test for it is not
2903 # safe: cross compilers may not add the suffix if given an `-o'
2904 # argument, so we may need to know it at that point already.
2905 # Even if this section looks crufty: it has the advantage of
2906 # actually working.
Skip Montanarof0d5f792004-08-15 14:08:23 +00002907 break;;
Skip Montanaro6dead952003-09-25 14:50:04 +00002908 * )
Skip Montanarof0d5f792004-08-15 14:08:23 +00002909 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002910 esac
2911done
Martin v. Löwiseba40652007-08-30 20:10:57 +00002912test "$ac_cv_exeext" = no && ac_cv_exeext=
2913
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002914else
Martin v. Löwiseba40652007-08-30 20:10:57 +00002915 ac_file=''
2916fi
2917
Benjamin Peterson697cd212010-05-02 16:45:11 +00002918{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2919$as_echo "$ac_file" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002920if test -z "$ac_file"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00002921 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002922sed 's/^/| /' conftest.$ac_ext >&5
2923
Benjamin Peterson697cd212010-05-02 16:45:11 +00002924{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2925$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2926{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002927See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00002928$as_echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002929See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00002930 { (exit 77); exit 77; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002931fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002932
Martin v. Löwis11437992002-04-12 09:54:03 +00002933ac_exeext=$ac_cv_exeext
Michael W. Hudson54241132001-12-07 15:38:26 +00002934
Martin v. Löwiseba40652007-08-30 20:10:57 +00002935# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002936# the compiler is broken, or we cross compile.
Benjamin Peterson697cd212010-05-02 16:45:11 +00002937{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2938$as_echo_n "checking whether the C compiler works... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002939# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2940# If not cross compiling, check that we can run a simple program.
2941if test "$cross_compiling" != yes; then
2942 if { ac_try='./$ac_file'
Martin v. Löwiseba40652007-08-30 20:10:57 +00002943 { (case "(($ac_try" in
2944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2945 *) ac_try_echo=$ac_try;;
2946esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00002947eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2948$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002949 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002950 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00002951 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002952 (exit $ac_status); }; }; then
2953 cross_compiling=no
2954 else
2955 if test "$cross_compiling" = maybe; then
2956 cross_compiling=yes
2957 else
Benjamin Peterson697cd212010-05-02 16:45:11 +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 run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002961If you meant to cross compile, use \`--host'.
2962See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00002963$as_echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002964If you meant to cross compile, use \`--host'.
2965See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00002966 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002967 fi
2968 fi
2969fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00002970{ $as_echo "$as_me:$LINENO: result: yes" >&5
2971$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002972
Benjamin Peterson697cd212010-05-02 16:45:11 +00002973rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Martin v. Löwis11437992002-04-12 09:54:03 +00002974ac_clean_files=$ac_clean_files_save
Martin v. Löwiseba40652007-08-30 20:10:57 +00002975# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002976# the compiler is broken, or we cross compile.
Benjamin Peterson697cd212010-05-02 16:45:11 +00002977{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2978$as_echo_n "checking whether we are cross compiling... " >&6; }
2979{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
2980$as_echo "$cross_compiling" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002981
Benjamin Peterson697cd212010-05-02 16:45:11 +00002982{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
2983$as_echo_n "checking for suffix of executables... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00002984if { (ac_try="$ac_link"
2985case "(($ac_try" in
2986 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2987 *) ac_try_echo=$ac_try;;
2988esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00002989eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2990$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00002991 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002992 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00002993 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002994 (exit $ac_status); }; then
2995 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2996# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2997# work properly (i.e., refer to `conftest.exe'), while it won't with
2998# `rm'.
Skip Montanaro6dead952003-09-25 14:50:04 +00002999for ac_file in conftest.exe conftest conftest.*; do
3000 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00003001 case $ac_file in
Benjamin Peterson697cd212010-05-02 16:45:11 +00003002 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003003 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
Skip Montanarof0d5f792004-08-15 14:08:23 +00003004 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003005 * ) break;;
3006 esac
3007done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003008else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003009 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3010$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3011{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00003012See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003013$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00003014See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00003015 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00003016fi
Jack Jansendd19cf82001-12-06 22:36:17 +00003017
Martin v. Löwis11437992002-04-12 09:54:03 +00003018rm -f conftest$ac_cv_exeext
Benjamin Peterson697cd212010-05-02 16:45:11 +00003019{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
3020$as_echo "$ac_cv_exeext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003021
3022rm -f conftest.$ac_ext
3023EXEEXT=$ac_cv_exeext
3024ac_exeext=$EXEEXT
Benjamin Peterson697cd212010-05-02 16:45:11 +00003025{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
3026$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003027if test "${ac_cv_objext+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003028 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00003029else
Martin v. Löwis11437992002-04-12 09:54:03 +00003030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003031/* confdefs.h. */
3032_ACEOF
3033cat confdefs.h >>conftest.$ac_ext
3034cat >>conftest.$ac_ext <<_ACEOF
3035/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003036
Martin v. Löwis11437992002-04-12 09:54:03 +00003037int
3038main ()
3039{
3040
3041 ;
3042 return 0;
3043}
3044_ACEOF
3045rm -f conftest.o conftest.obj
Martin v. Löwiseba40652007-08-30 20:10:57 +00003046if { (ac_try="$ac_compile"
3047case "(($ac_try" in
3048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3049 *) ac_try_echo=$ac_try;;
3050esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00003051eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3052$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003053 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003054 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00003055 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00003056 (exit $ac_status); }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003057 for ac_file in conftest.o conftest.obj conftest.*; do
3058 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00003059 case $ac_file in
Benjamin Peterson697cd212010-05-02 16:45:11 +00003060 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00003061 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3062 break;;
3063 esac
3064done
3065else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003066 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003067sed 's/^/| /' conftest.$ac_ext >&5
3068
Benjamin Peterson697cd212010-05-02 16:45:11 +00003069{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3071{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00003072See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003073$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00003074See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00003075 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003076fi
3077
3078rm -f conftest.$ac_cv_objext conftest.$ac_ext
3079fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00003080{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
3081$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003082OBJEXT=$ac_cv_objext
3083ac_objext=$OBJEXT
Benjamin Peterson697cd212010-05-02 16:45:11 +00003084{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
3085$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003086if test "${ac_cv_c_compiler_gnu+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003087 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003088else
3089 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003090/* confdefs.h. */
3091_ACEOF
3092cat confdefs.h >>conftest.$ac_ext
3093cat >>conftest.$ac_ext <<_ACEOF
3094/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003095
Martin v. Löwis11437992002-04-12 09:54:03 +00003096int
3097main ()
3098{
3099#ifndef __GNUC__
3100 choke me
3101#endif
3102
3103 ;
3104 return 0;
3105}
3106_ACEOF
3107rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003108if { (ac_try="$ac_compile"
3109case "(($ac_try" in
3110 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3111 *) ac_try_echo=$ac_try;;
3112esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00003113eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3114$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003115 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003116 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003117 grep -v '^ *+' conftest.er1 >conftest.err
3118 rm -f conftest.er1
3119 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003120 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003121 (exit $ac_status); } && {
3122 test -z "$ac_c_werror_flag" ||
3123 test ! -s conftest.err
3124 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003125 ac_compiler_gnu=yes
3126else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003127 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003128sed 's/^/| /' conftest.$ac_ext >&5
3129
Martin v. Löwiseba40652007-08-30 20:10:57 +00003130 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003131fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003132
3133rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003134ac_cv_c_compiler_gnu=$ac_compiler_gnu
3135
3136fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00003137{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3138$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3139if test $ac_compiler_gnu = yes; then
3140 GCC=yes
3141else
3142 GCC=
3143fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003144ac_test_CFLAGS=${CFLAGS+set}
3145ac_save_CFLAGS=$CFLAGS
Benjamin Peterson697cd212010-05-02 16:45:11 +00003146{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3147$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003148if test "${ac_cv_prog_cc_g+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003149 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003150else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003151 ac_save_c_werror_flag=$ac_c_werror_flag
3152 ac_c_werror_flag=yes
3153 ac_cv_prog_cc_g=no
3154 CFLAGS="-g"
3155 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003156/* confdefs.h. */
3157_ACEOF
3158cat confdefs.h >>conftest.$ac_ext
3159cat >>conftest.$ac_ext <<_ACEOF
3160/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003161
Martin v. Löwis11437992002-04-12 09:54:03 +00003162int
3163main ()
3164{
3165
3166 ;
3167 return 0;
3168}
3169_ACEOF
3170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003171if { (ac_try="$ac_compile"
3172case "(($ac_try" in
3173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3174 *) ac_try_echo=$ac_try;;
3175esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00003176eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3177$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003179 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003180 grep -v '^ *+' conftest.er1 >conftest.err
3181 rm -f conftest.er1
3182 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003183 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003184 (exit $ac_status); } && {
3185 test -z "$ac_c_werror_flag" ||
3186 test ! -s conftest.err
3187 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003188 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003189else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003190 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003191sed 's/^/| /' conftest.$ac_ext >&5
3192
Martin v. Löwiseba40652007-08-30 20:10:57 +00003193 CFLAGS=""
3194 cat >conftest.$ac_ext <<_ACEOF
3195/* confdefs.h. */
3196_ACEOF
3197cat confdefs.h >>conftest.$ac_ext
3198cat >>conftest.$ac_ext <<_ACEOF
3199/* end confdefs.h. */
3200
3201int
3202main ()
3203{
3204
3205 ;
3206 return 0;
3207}
3208_ACEOF
3209rm -f conftest.$ac_objext
3210if { (ac_try="$ac_compile"
3211case "(($ac_try" in
3212 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3213 *) ac_try_echo=$ac_try;;
3214esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00003215eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3216$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003217 (eval "$ac_compile") 2>conftest.er1
3218 ac_status=$?
3219 grep -v '^ *+' conftest.er1 >conftest.err
3220 rm -f conftest.er1
3221 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003222 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003223 (exit $ac_status); } && {
3224 test -z "$ac_c_werror_flag" ||
3225 test ! -s conftest.err
3226 } && test -s conftest.$ac_objext; then
3227 :
3228else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003229 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003230sed 's/^/| /' conftest.$ac_ext >&5
3231
3232 ac_c_werror_flag=$ac_save_c_werror_flag
3233 CFLAGS="-g"
3234 cat >conftest.$ac_ext <<_ACEOF
3235/* confdefs.h. */
3236_ACEOF
3237cat confdefs.h >>conftest.$ac_ext
3238cat >>conftest.$ac_ext <<_ACEOF
3239/* end confdefs.h. */
3240
3241int
3242main ()
3243{
3244
3245 ;
3246 return 0;
3247}
3248_ACEOF
3249rm -f conftest.$ac_objext
3250if { (ac_try="$ac_compile"
3251case "(($ac_try" in
3252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3253 *) ac_try_echo=$ac_try;;
3254esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00003255eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3256$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003257 (eval "$ac_compile") 2>conftest.er1
3258 ac_status=$?
3259 grep -v '^ *+' conftest.er1 >conftest.err
3260 rm -f conftest.er1
3261 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003262 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003263 (exit $ac_status); } && {
3264 test -z "$ac_c_werror_flag" ||
3265 test ! -s conftest.err
3266 } && test -s conftest.$ac_objext; then
3267 ac_cv_prog_cc_g=yes
3268else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003269 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003270sed 's/^/| /' conftest.$ac_ext >&5
3271
3272
Guido van Rossum627b2d71993-12-24 10:39:16 +00003273fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003274
3275rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003276fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003277
3278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3279fi
3280
3281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3282 ac_c_werror_flag=$ac_save_c_werror_flag
3283fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00003284{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3285$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003286if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003287 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003288elif test $ac_cv_prog_cc_g = yes; then
3289 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003290 CFLAGS="-g -O2"
3291 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003292 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003293 fi
3294else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003295 if test "$GCC" = yes; then
3296 CFLAGS="-O2"
3297 else
3298 CFLAGS=
3299 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003300fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00003301{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3302$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003303if test "${ac_cv_prog_cc_c89+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003304 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003305else
Martin v. Löwiseba40652007-08-30 20:10:57 +00003306 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003307ac_save_CC=$CC
3308cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003309/* confdefs.h. */
3310_ACEOF
3311cat confdefs.h >>conftest.$ac_ext
3312cat >>conftest.$ac_ext <<_ACEOF
3313/* end confdefs.h. */
3314#include <stdarg.h>
3315#include <stdio.h>
3316#include <sys/types.h>
3317#include <sys/stat.h>
3318/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3319struct buf { int x; };
3320FILE * (*rcsopen) (struct buf *, struct stat *, int);
3321static char *e (p, i)
3322 char **p;
3323 int i;
3324{
3325 return p[i];
3326}
3327static char *f (char * (*g) (char **, int), char **p, ...)
3328{
3329 char *s;
3330 va_list v;
3331 va_start (v,p);
3332 s = g (p, va_arg (v,int));
3333 va_end (v);
3334 return s;
3335}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003336
3337/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3338 function prototypes and stuff, but not '\xHH' hex character constants.
3339 These don't provoke an error unfortunately, instead are silently treated
Martin v. Löwiseba40652007-08-30 20:10:57 +00003340 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003341 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3342 array size at least. It's necessary to write '\x00'==0 to get something
Martin v. Löwiseba40652007-08-30 20:10:57 +00003343 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003344int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3345
Martin v. Löwiseba40652007-08-30 20:10:57 +00003346/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3347 inside strings and character constants. */
3348#define FOO(x) 'x'
3349int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3350
Skip Montanaro6dead952003-09-25 14:50:04 +00003351int test (int i, double x);
3352struct s1 {int (*f) (int a);};
3353struct s2 {int (*f) (double a);};
3354int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3355int argc;
3356char **argv;
3357int
3358main ()
3359{
3360return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3361 ;
3362 return 0;
3363}
3364_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003365for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3366 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003367do
3368 CC="$ac_save_CC $ac_arg"
3369 rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00003370if { (ac_try="$ac_compile"
3371case "(($ac_try" in
3372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3373 *) ac_try_echo=$ac_try;;
3374esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00003375eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3376$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003377 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003379 grep -v '^ *+' conftest.er1 >conftest.err
3380 rm -f conftest.er1
3381 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003382 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003383 (exit $ac_status); } && {
3384 test -z "$ac_c_werror_flag" ||
3385 test ! -s conftest.err
3386 } && test -s conftest.$ac_objext; then
3387 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003388else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003389 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003390sed 's/^/| /' conftest.$ac_ext >&5
3391
Martin v. Löwiseba40652007-08-30 20:10:57 +00003392
Skip Montanaro6dead952003-09-25 14:50:04 +00003393fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003394
3395rm -f core conftest.err conftest.$ac_objext
3396 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003397done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003398rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003399CC=$ac_save_CC
3400
3401fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003402# AC_CACHE_VAL
3403case "x$ac_cv_prog_cc_c89" in
3404 x)
Benjamin Peterson697cd212010-05-02 16:45:11 +00003405 { $as_echo "$as_me:$LINENO: result: none needed" >&5
3406$as_echo "none needed" >&6; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00003407 xno)
Benjamin Peterson697cd212010-05-02 16:45:11 +00003408 { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3409$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003410 *)
Martin v. Löwiseba40652007-08-30 20:10:57 +00003411 CC="$CC $ac_cv_prog_cc_c89"
Benjamin Peterson697cd212010-05-02 16:45:11 +00003412 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3413$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003414esac
3415
Skip Montanaro6dead952003-09-25 14:50:04 +00003416
Martin v. Löwis11437992002-04-12 09:54:03 +00003417ac_ext=c
3418ac_cpp='$CPP $CPPFLAGS'
3419ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3420ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3421ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003422
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003423
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003424
3425
Benjamin Peterson697cd212010-05-02 16:45:11 +00003426{ $as_echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3427$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003428
Martin v. Löwiseba40652007-08-30 20:10:57 +00003429# Check whether --with-cxx_main was given.
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003430if test "${with_cxx_main+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003431 withval=$with_cxx_main;
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003432
3433 case $withval in
3434 no) with_cxx_main=no
3435 MAINCC='$(CC)';;
3436 yes) with_cxx_main=yes
3437 MAINCC='$(CXX)';;
3438 *) with_cxx_main=yes
3439 MAINCC=$withval
3440 if test -z "$CXX"
3441 then
3442 CXX=$withval
3443 fi;;
3444 esac
3445else
3446
3447 with_cxx_main=no
3448 MAINCC='$(CC)'
3449
Martin v. Löwiseba40652007-08-30 20:10:57 +00003450fi
3451
Benjamin Peterson697cd212010-05-02 16:45:11 +00003452{ $as_echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3453$as_echo "$with_cxx_main" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003454
3455preset_cxx="$CXX"
3456if test -z "$CXX"
3457then
3458 case "$CC" in
3459 gcc) # Extract the first word of "g++", so it can be a program name with args.
3460set dummy g++; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00003461{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3462$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003463if test "${ac_cv_path_CXX+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003464 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003465else
3466 case $CXX in
3467 [\\/]* | ?:[\\/]*)
3468 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3469 ;;
3470 *)
3471 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3472for as_dir in notfound
3473do
3474 IFS=$as_save_IFS
3475 test -z "$as_dir" && as_dir=.
3476 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003477 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003478 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Benjamin Peterson697cd212010-05-02 16:45:11 +00003479 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003480 break 2
3481 fi
3482done
3483done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003484IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003485
3486 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3487 ;;
3488esac
3489fi
3490CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003491if test -n "$CXX"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003492 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3493$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003494else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003495 { $as_echo "$as_me:$LINENO: result: no" >&5
3496$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003497fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003498
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003499 ;;
3500 cc) # Extract the first word of "c++", so it can be a program name with args.
3501set dummy c++; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00003502{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3503$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003504if test "${ac_cv_path_CXX+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003505 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003506else
3507 case $CXX in
3508 [\\/]* | ?:[\\/]*)
3509 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3510 ;;
3511 *)
3512 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3513for as_dir in notfound
3514do
3515 IFS=$as_save_IFS
3516 test -z "$as_dir" && as_dir=.
3517 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003518 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003519 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Benjamin Peterson697cd212010-05-02 16:45:11 +00003520 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003521 break 2
3522 fi
3523done
3524done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003525IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003526
3527 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3528 ;;
3529esac
3530fi
3531CXX=$ac_cv_path_CXX
Skip Montanaro89e975f2007-08-22 19:05:21 +00003532if test -n "$CXX"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003533 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3534$as_echo "$CXX" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003535else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003536 { $as_echo "$as_me:$LINENO: result: no" >&5
3537$as_echo "no" >&6; }
Skip Montanaro89e975f2007-08-22 19:05:21 +00003538fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003539
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003540 ;;
3541 esac
3542 if test "$CXX" = "notfound"
3543 then
3544 CXX=""
3545 fi
3546fi
3547if test -z "$CXX"
3548then
3549 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3550do
3551 # Extract the first word of "$ac_prog", so it can be a program name with args.
3552set dummy $ac_prog; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00003553{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3554$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003555if test "${ac_cv_prog_CXX+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003556 $as_echo_n "(cached) " >&6
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003557else
3558 if test -n "$CXX"; then
3559 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3560else
3561as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3562for as_dir in $PATH
3563do
3564 IFS=$as_save_IFS
3565 test -z "$as_dir" && as_dir=.
3566 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00003567 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003568 ac_cv_prog_CXX="$ac_prog"
Benjamin Peterson697cd212010-05-02 16:45:11 +00003569 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003570 break 2
3571 fi
3572done
3573done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003574IFS=$as_save_IFS
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003575
3576fi
3577fi
3578CXX=$ac_cv_prog_CXX
3579if test -n "$CXX"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003580 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3581$as_echo "$CXX" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003582else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003583 { $as_echo "$as_me:$LINENO: result: no" >&5
3584$as_echo "no" >&6; }
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003585fi
3586
Martin v. Löwiseba40652007-08-30 20:10:57 +00003587
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003588 test -n "$CXX" && break
3589done
3590test -n "$CXX" || CXX="notfound"
3591
3592 if test "$CXX" = "notfound"
3593 then
3594 CXX=""
3595 fi
3596fi
3597if test "$preset_cxx" != "$CXX"
3598then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003599 { $as_echo "$as_me:$LINENO: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003600
3601 By default, distutils will build C++ extension modules with \"$CXX\".
3602 If this is not intended, then set CXX on the configure command line.
3603 " >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003604$as_echo "$as_me: WARNING:
Martin v. Löwis0f48d982006-04-14 14:34:26 +00003605
3606 By default, distutils will build C++ extension modules with \"$CXX\".
3607 If this is not intended, then set CXX on the configure command line.
3608 " >&2;}
3609fi
3610
3611
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003612# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003613
3614ac_ext=c
3615ac_cpp='$CPP $CPPFLAGS'
3616ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3617ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3618ac_compiler_gnu=$ac_cv_c_compiler_gnu
Benjamin Peterson697cd212010-05-02 16:45:11 +00003619{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3620$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003621# On Suns, sometimes $CPP names a directory.
3622if test -n "$CPP" && test -d "$CPP"; then
3623 CPP=
3624fi
3625if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003626 if test "${ac_cv_prog_CPP+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003627 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003628else
Martin v. Löwis11437992002-04-12 09:54:03 +00003629 # Double quotes because CPP needs to be expanded
3630 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3631 do
3632 ac_preproc_ok=false
3633for ac_c_preproc_warn_flag in '' yes
3634do
3635 # Use a header file that comes with gcc, so configuring glibc
3636 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003637 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3638 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003639 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003640 # not just through cpp. "Syntax error" is here to catch this case.
3641 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003642/* confdefs.h. */
3643_ACEOF
3644cat confdefs.h >>conftest.$ac_ext
3645cat >>conftest.$ac_ext <<_ACEOF
3646/* end confdefs.h. */
3647#ifdef __STDC__
3648# include <limits.h>
3649#else
3650# include <assert.h>
3651#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003652 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003653_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003654if { (ac_try="$ac_cpp conftest.$ac_ext"
3655case "(($ac_try" in
3656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3657 *) ac_try_echo=$ac_try;;
3658esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00003659eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3660$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003661 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003662 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003663 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003664 rm -f conftest.er1
3665 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003666 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003667 (exit $ac_status); } >/dev/null && {
3668 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3669 test ! -s conftest.err
3670 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003671 :
3672else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003673 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003674sed 's/^/| /' conftest.$ac_ext >&5
3675
Martin v. Löwis11437992002-04-12 09:54:03 +00003676 # Broken: fails on valid input.
3677continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003678fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003679
Martin v. Löwis11437992002-04-12 09:54:03 +00003680rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003681
Martin v. Löwiseba40652007-08-30 20:10:57 +00003682 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003683 # can be detected and how.
3684 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003685/* confdefs.h. */
3686_ACEOF
3687cat confdefs.h >>conftest.$ac_ext
3688cat >>conftest.$ac_ext <<_ACEOF
3689/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003690#include <ac_nonexistent.h>
3691_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003692if { (ac_try="$ac_cpp conftest.$ac_ext"
3693case "(($ac_try" in
3694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3695 *) ac_try_echo=$ac_try;;
3696esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00003697eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3698$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003699 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003700 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003701 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003702 rm -f conftest.er1
3703 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003704 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003705 (exit $ac_status); } >/dev/null && {
3706 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3707 test ! -s conftest.err
3708 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003709 # Broken: success on invalid input.
3710continue
3711else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003712 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003713sed 's/^/| /' conftest.$ac_ext >&5
3714
Martin v. Löwis11437992002-04-12 09:54:03 +00003715 # Passes both tests.
3716ac_preproc_ok=:
3717break
3718fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003719
Martin v. Löwis11437992002-04-12 09:54:03 +00003720rm -f conftest.err conftest.$ac_ext
3721
3722done
3723# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3724rm -f conftest.err conftest.$ac_ext
3725if $ac_preproc_ok; then
3726 break
3727fi
3728
3729 done
3730 ac_cv_prog_CPP=$CPP
3731
3732fi
3733 CPP=$ac_cv_prog_CPP
3734else
3735 ac_cv_prog_CPP=$CPP
3736fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00003737{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
3738$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003739ac_preproc_ok=false
3740for ac_c_preproc_warn_flag in '' yes
3741do
3742 # Use a header file that comes with gcc, so configuring glibc
3743 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003744 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3745 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003746 # On the NeXT, cc -E runs the code through the compiler's parser,
3747 # not just through cpp. "Syntax error" is here to catch this case.
3748 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003749/* confdefs.h. */
3750_ACEOF
3751cat confdefs.h >>conftest.$ac_ext
3752cat >>conftest.$ac_ext <<_ACEOF
3753/* end confdefs.h. */
3754#ifdef __STDC__
3755# include <limits.h>
3756#else
3757# include <assert.h>
3758#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003759 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003760_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003761if { (ac_try="$ac_cpp conftest.$ac_ext"
3762case "(($ac_try" in
3763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3764 *) ac_try_echo=$ac_try;;
3765esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00003766eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3767$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003768 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003769 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003770 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003771 rm -f conftest.er1
3772 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003773 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003774 (exit $ac_status); } >/dev/null && {
3775 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3776 test ! -s conftest.err
3777 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003778 :
3779else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003780 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003781sed 's/^/| /' conftest.$ac_ext >&5
3782
Martin v. Löwis11437992002-04-12 09:54:03 +00003783 # Broken: fails on valid input.
3784continue
3785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003786
Martin v. Löwis11437992002-04-12 09:54:03 +00003787rm -f conftest.err conftest.$ac_ext
3788
Martin v. Löwiseba40652007-08-30 20:10:57 +00003789 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003790 # can be detected and how.
3791 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003792/* confdefs.h. */
3793_ACEOF
3794cat confdefs.h >>conftest.$ac_ext
3795cat >>conftest.$ac_ext <<_ACEOF
3796/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003797#include <ac_nonexistent.h>
3798_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00003799if { (ac_try="$ac_cpp conftest.$ac_ext"
3800case "(($ac_try" in
3801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3802 *) ac_try_echo=$ac_try;;
3803esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00003804eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3805$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003806 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003807 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003808 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003809 rm -f conftest.er1
3810 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003811 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00003812 (exit $ac_status); } >/dev/null && {
3813 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3814 test ! -s conftest.err
3815 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003816 # Broken: success on invalid input.
3817continue
3818else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003819 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003820sed 's/^/| /' conftest.$ac_ext >&5
3821
Martin v. Löwis11437992002-04-12 09:54:03 +00003822 # Passes both tests.
3823ac_preproc_ok=:
3824break
3825fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003826
Martin v. Löwis11437992002-04-12 09:54:03 +00003827rm -f conftest.err conftest.$ac_ext
3828
3829done
3830# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3831rm -f conftest.err conftest.$ac_ext
3832if $ac_preproc_ok; then
3833 :
3834else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003835 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3836$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3837{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003838See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00003839$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003840See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00003841 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003842fi
3843
3844ac_ext=c
3845ac_cpp='$CPP $CPPFLAGS'
3846ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3847ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3848ac_compiler_gnu=$ac_cv_c_compiler_gnu
3849
3850
Benjamin Peterson697cd212010-05-02 16:45:11 +00003851{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3852$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003853if test "${ac_cv_path_GREP+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003854 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003855else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003856 if test -z "$GREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003857 ac_path_GREP_found=false
Benjamin Peterson697cd212010-05-02 16:45:11 +00003858 # Loop through the user's path and test for each of PROGNAME-LIST
3859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003860for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3861do
3862 IFS=$as_save_IFS
3863 test -z "$as_dir" && as_dir=.
3864 for ac_prog in grep ggrep; do
Benjamin Peterson697cd212010-05-02 16:45:11 +00003865 for ac_exec_ext in '' $ac_executable_extensions; do
3866 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3867 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3868# Check for GNU ac_path_GREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003869 # Check for GNU $ac_path_GREP
3870case `"$ac_path_GREP" --version 2>&1` in
3871*GNU*)
3872 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3873*)
3874 ac_count=0
Benjamin Peterson697cd212010-05-02 16:45:11 +00003875 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003876 while :
3877 do
3878 cat "conftest.in" "conftest.in" >"conftest.tmp"
3879 mv "conftest.tmp" "conftest.in"
3880 cp "conftest.in" "conftest.nl"
Benjamin Peterson697cd212010-05-02 16:45:11 +00003881 $as_echo 'GREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003882 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3883 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3884 ac_count=`expr $ac_count + 1`
3885 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3886 # Best one so far, save it but keep looking for a better one
3887 ac_cv_path_GREP="$ac_path_GREP"
3888 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003889 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003890 # 10*(2^10) chars as input seems more than enough
3891 test $ac_count -gt 10 && break
3892 done
3893 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3894esac
3895
Benjamin Peterson697cd212010-05-02 16:45:11 +00003896 $ac_path_GREP_found && break 3
3897 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003898 done
3899done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003900IFS=$as_save_IFS
Benjamin Peterson697cd212010-05-02 16:45:11 +00003901 if test -z "$ac_cv_path_GREP"; then
3902 { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3903$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003904 { (exit 1); exit 1; }; }
Benjamin Peterson697cd212010-05-02 16:45:11 +00003905 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003906else
3907 ac_cv_path_GREP=$GREP
3908fi
3909
Martin v. Löwiseba40652007-08-30 20:10:57 +00003910fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00003911{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3912$as_echo "$ac_cv_path_GREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003913 GREP="$ac_cv_path_GREP"
3914
3915
Benjamin Peterson697cd212010-05-02 16:45:11 +00003916{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
3917$as_echo_n "checking for egrep... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003918if test "${ac_cv_path_EGREP+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00003919 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +00003920else
3921 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3922 then ac_cv_path_EGREP="$GREP -E"
3923 else
Benjamin Peterson697cd212010-05-02 16:45:11 +00003924 if test -z "$EGREP"; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00003925 ac_path_EGREP_found=false
Benjamin Peterson697cd212010-05-02 16:45:11 +00003926 # Loop through the user's path and test for each of PROGNAME-LIST
3927 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwiseba40652007-08-30 20:10:57 +00003928for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3929do
3930 IFS=$as_save_IFS
3931 test -z "$as_dir" && as_dir=.
3932 for ac_prog in egrep; do
Benjamin Peterson697cd212010-05-02 16:45:11 +00003933 for ac_exec_ext in '' $ac_executable_extensions; do
3934 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3935 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3936# Check for GNU ac_path_EGREP and select it if it is found.
Martin v. Löwiseba40652007-08-30 20:10:57 +00003937 # Check for GNU $ac_path_EGREP
3938case `"$ac_path_EGREP" --version 2>&1` in
3939*GNU*)
3940 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3941*)
3942 ac_count=0
Benjamin Peterson697cd212010-05-02 16:45:11 +00003943 $as_echo_n 0123456789 >"conftest.in"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003944 while :
3945 do
3946 cat "conftest.in" "conftest.in" >"conftest.tmp"
3947 mv "conftest.tmp" "conftest.in"
3948 cp "conftest.in" "conftest.nl"
Benjamin Peterson697cd212010-05-02 16:45:11 +00003949 $as_echo 'EGREP' >> "conftest.nl"
Martin v. Löwiseba40652007-08-30 20:10:57 +00003950 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3951 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3952 ac_count=`expr $ac_count + 1`
3953 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3954 # Best one so far, save it but keep looking for a better one
3955 ac_cv_path_EGREP="$ac_path_EGREP"
3956 ac_path_EGREP_max=$ac_count
3957 fi
3958 # 10*(2^10) chars as input seems more than enough
3959 test $ac_count -gt 10 && break
3960 done
3961 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3962esac
3963
Benjamin Peterson697cd212010-05-02 16:45:11 +00003964 $ac_path_EGREP_found && break 3
3965 done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003966 done
3967done
Martin v. Löwiseba40652007-08-30 20:10:57 +00003968IFS=$as_save_IFS
Benjamin Peterson697cd212010-05-02 16:45:11 +00003969 if test -z "$ac_cv_path_EGREP"; then
3970 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3971$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00003972 { (exit 1); exit 1; }; }
Benjamin Peterson697cd212010-05-02 16:45:11 +00003973 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00003974else
3975 ac_cv_path_EGREP=$EGREP
3976fi
3977
Martin v. Löwiseba40652007-08-30 20:10:57 +00003978 fi
3979fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00003980{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3981$as_echo "$ac_cv_path_EGREP" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00003982 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003983
3984
Benjamin Peterson697cd212010-05-02 16:45:11 +00003985{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3986$as_echo_n "checking for ANSI C header files... " >&6; }
3987if test "${ac_cv_header_stdc+set}" = set; then
3988 $as_echo_n "(cached) " >&6
3989else
3990 cat >conftest.$ac_ext <<_ACEOF
3991/* confdefs.h. */
3992_ACEOF
3993cat confdefs.h >>conftest.$ac_ext
3994cat >>conftest.$ac_ext <<_ACEOF
3995/* end confdefs.h. */
3996#include <stdlib.h>
3997#include <stdarg.h>
3998#include <string.h>
3999#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004000
Benjamin Peterson697cd212010-05-02 16:45:11 +00004001int
4002main ()
4003{
4004
4005 ;
4006 return 0;
4007}
4008_ACEOF
4009rm -f conftest.$ac_objext
4010if { (ac_try="$ac_compile"
4011case "(($ac_try" in
4012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4013 *) ac_try_echo=$ac_try;;
4014esac
4015eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4016$as_echo "$ac_try_echo") >&5
4017 (eval "$ac_compile") 2>conftest.er1
4018 ac_status=$?
4019 grep -v '^ *+' conftest.er1 >conftest.err
4020 rm -f conftest.er1
4021 cat conftest.err >&5
4022 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4023 (exit $ac_status); } && {
4024 test -z "$ac_c_werror_flag" ||
4025 test ! -s conftest.err
4026 } && test -s conftest.$ac_objext; then
4027 ac_cv_header_stdc=yes
4028else
4029 $as_echo "$as_me: failed program was:" >&5
4030sed 's/^/| /' conftest.$ac_ext >&5
4031
4032 ac_cv_header_stdc=no
4033fi
4034
4035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4036
4037if test $ac_cv_header_stdc = yes; then
4038 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4039 cat >conftest.$ac_ext <<_ACEOF
4040/* confdefs.h. */
4041_ACEOF
4042cat confdefs.h >>conftest.$ac_ext
4043cat >>conftest.$ac_ext <<_ACEOF
4044/* end confdefs.h. */
4045#include <string.h>
4046
4047_ACEOF
4048if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4049 $EGREP "memchr" >/dev/null 2>&1; then
4050 :
4051else
4052 ac_cv_header_stdc=no
4053fi
4054rm -f conftest*
4055
4056fi
4057
4058if test $ac_cv_header_stdc = yes; then
4059 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4060 cat >conftest.$ac_ext <<_ACEOF
4061/* confdefs.h. */
4062_ACEOF
4063cat confdefs.h >>conftest.$ac_ext
4064cat >>conftest.$ac_ext <<_ACEOF
4065/* end confdefs.h. */
4066#include <stdlib.h>
4067
4068_ACEOF
4069if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4070 $EGREP "free" >/dev/null 2>&1; then
4071 :
4072else
4073 ac_cv_header_stdc=no
4074fi
4075rm -f conftest*
4076
4077fi
4078
4079if test $ac_cv_header_stdc = yes; then
4080 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4081 if test "$cross_compiling" = yes; then
4082 :
4083else
4084 cat >conftest.$ac_ext <<_ACEOF
4085/* confdefs.h. */
4086_ACEOF
4087cat confdefs.h >>conftest.$ac_ext
4088cat >>conftest.$ac_ext <<_ACEOF
4089/* end confdefs.h. */
4090#include <ctype.h>
4091#include <stdlib.h>
4092#if ((' ' & 0x0FF) == 0x020)
4093# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4094# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4095#else
4096# define ISLOWER(c) \
4097 (('a' <= (c) && (c) <= 'i') \
4098 || ('j' <= (c) && (c) <= 'r') \
4099 || ('s' <= (c) && (c) <= 'z'))
4100# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4101#endif
4102
4103#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4104int
4105main ()
4106{
4107 int i;
4108 for (i = 0; i < 256; i++)
4109 if (XOR (islower (i), ISLOWER (i))
4110 || toupper (i) != TOUPPER (i))
4111 return 2;
4112 return 0;
4113}
4114_ACEOF
4115rm -f conftest$ac_exeext
4116if { (ac_try="$ac_link"
4117case "(($ac_try" in
4118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4119 *) ac_try_echo=$ac_try;;
4120esac
4121eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4122$as_echo "$ac_try_echo") >&5
4123 (eval "$ac_link") 2>&5
4124 ac_status=$?
4125 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4126 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4127 { (case "(($ac_try" in
4128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4129 *) ac_try_echo=$ac_try;;
4130esac
4131eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4132$as_echo "$ac_try_echo") >&5
4133 (eval "$ac_try") 2>&5
4134 ac_status=$?
4135 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4136 (exit $ac_status); }; }; then
4137 :
4138else
4139 $as_echo "$as_me: program exited with status $ac_status" >&5
4140$as_echo "$as_me: failed program was:" >&5
4141sed 's/^/| /' conftest.$ac_ext >&5
4142
4143( exit $ac_status )
4144ac_cv_header_stdc=no
4145fi
4146rm -rf conftest.dSYM
4147rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4148fi
4149
4150
4151fi
4152fi
4153{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4154$as_echo "$ac_cv_header_stdc" >&6; }
4155if test $ac_cv_header_stdc = yes; then
4156
4157cat >>confdefs.h <<\_ACEOF
4158#define STDC_HEADERS 1
4159_ACEOF
4160
4161fi
4162
4163# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4174 inttypes.h stdint.h unistd.h
4175do
4176as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4177{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4178$as_echo_n "checking for $ac_header... " >&6; }
4179if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4180 $as_echo_n "(cached) " >&6
4181else
4182 cat >conftest.$ac_ext <<_ACEOF
4183/* confdefs.h. */
4184_ACEOF
4185cat confdefs.h >>conftest.$ac_ext
4186cat >>conftest.$ac_ext <<_ACEOF
4187/* end confdefs.h. */
4188$ac_includes_default
4189
4190#include <$ac_header>
4191_ACEOF
4192rm -f conftest.$ac_objext
4193if { (ac_try="$ac_compile"
4194case "(($ac_try" in
4195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4196 *) ac_try_echo=$ac_try;;
4197esac
4198eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4199$as_echo "$ac_try_echo") >&5
4200 (eval "$ac_compile") 2>conftest.er1
4201 ac_status=$?
4202 grep -v '^ *+' conftest.er1 >conftest.err
4203 rm -f conftest.er1
4204 cat conftest.err >&5
4205 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4206 (exit $ac_status); } && {
4207 test -z "$ac_c_werror_flag" ||
4208 test ! -s conftest.err
4209 } && test -s conftest.$ac_objext; then
4210 eval "$as_ac_Header=yes"
4211else
4212 $as_echo "$as_me: failed program was:" >&5
4213sed 's/^/| /' conftest.$ac_ext >&5
4214
4215 eval "$as_ac_Header=no"
4216fi
4217
4218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4219fi
4220ac_res=`eval 'as_val=${'$as_ac_Header'}
4221 $as_echo "$as_val"'`
4222 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4223$as_echo "$ac_res" >&6; }
4224as_val=`eval 'as_val=${'$as_ac_Header'}
4225 $as_echo "$as_val"'`
4226 if test "x$as_val" = x""yes; then
4227 cat >>confdefs.h <<_ACEOF
4228#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4229_ACEOF
4230
4231fi
4232
4233done
4234
4235
4236
4237 if test "${ac_cv_header_minix_config_h+set}" = set; then
4238 { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4239$as_echo_n "checking for minix/config.h... " >&6; }
4240if test "${ac_cv_header_minix_config_h+set}" = set; then
4241 $as_echo_n "(cached) " >&6
4242fi
4243{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4244$as_echo "$ac_cv_header_minix_config_h" >&6; }
4245else
4246 # Is the header compilable?
4247{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4248$as_echo_n "checking minix/config.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004249cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00004250/* confdefs.h. */
4251_ACEOF
4252cat confdefs.h >>conftest.$ac_ext
4253cat >>conftest.$ac_ext <<_ACEOF
4254/* end confdefs.h. */
Benjamin Peterson697cd212010-05-02 16:45:11 +00004255$ac_includes_default
4256#include <minix/config.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00004257_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +00004258rm -f conftest.$ac_objext
4259if { (ac_try="$ac_compile"
4260case "(($ac_try" in
4261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4262 *) ac_try_echo=$ac_try;;
4263esac
4264eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4265$as_echo "$ac_try_echo") >&5
4266 (eval "$ac_compile") 2>conftest.er1
4267 ac_status=$?
4268 grep -v '^ *+' conftest.er1 >conftest.err
4269 rm -f conftest.er1
4270 cat conftest.err >&5
4271 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4272 (exit $ac_status); } && {
4273 test -z "$ac_c_werror_flag" ||
4274 test ! -s conftest.err
4275 } && test -s conftest.$ac_objext; then
4276 ac_header_compiler=yes
4277else
4278 $as_echo "$as_me: failed program was:" >&5
4279sed 's/^/| /' conftest.$ac_ext >&5
4280
4281 ac_header_compiler=no
4282fi
4283
4284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4285{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4286$as_echo "$ac_header_compiler" >&6; }
4287
4288# Is the header present?
4289{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4290$as_echo_n "checking minix/config.h presence... " >&6; }
4291cat >conftest.$ac_ext <<_ACEOF
4292/* confdefs.h. */
4293_ACEOF
4294cat confdefs.h >>conftest.$ac_ext
4295cat >>conftest.$ac_ext <<_ACEOF
4296/* end confdefs.h. */
4297#include <minix/config.h>
4298_ACEOF
4299if { (ac_try="$ac_cpp conftest.$ac_ext"
4300case "(($ac_try" in
4301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4302 *) ac_try_echo=$ac_try;;
4303esac
4304eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4305$as_echo "$ac_try_echo") >&5
4306 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4307 ac_status=$?
4308 grep -v '^ *+' conftest.er1 >conftest.err
4309 rm -f conftest.er1
4310 cat conftest.err >&5
4311 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4312 (exit $ac_status); } >/dev/null && {
4313 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4314 test ! -s conftest.err
4315 }; then
4316 ac_header_preproc=yes
4317else
4318 $as_echo "$as_me: failed program was:" >&5
4319sed 's/^/| /' conftest.$ac_ext >&5
4320
4321 ac_header_preproc=no
4322fi
4323
4324rm -f conftest.err conftest.$ac_ext
4325{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4326$as_echo "$ac_header_preproc" >&6; }
4327
4328# So? What about this header?
4329case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4330 yes:no: )
4331 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4332$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4333 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4334$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4335 ac_header_preproc=yes
4336 ;;
4337 no:yes:* )
4338 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4339$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4340 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4341$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4342 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4343$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4344 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4345$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4346 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4347$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4348 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4349$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4350 ( cat <<\_ASBOX
4351## ------------------------------------------------ ##
4352## Report this to http://www.python.org/python-bugs ##
4353## ------------------------------------------------ ##
4354_ASBOX
4355 ) | sed "s/^/$as_me: WARNING: /" >&2
4356 ;;
4357esac
4358{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4359$as_echo_n "checking for minix/config.h... " >&6; }
4360if test "${ac_cv_header_minix_config_h+set}" = set; then
4361 $as_echo_n "(cached) " >&6
4362else
4363 ac_cv_header_minix_config_h=$ac_header_preproc
4364fi
4365{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4366$as_echo "$ac_cv_header_minix_config_h" >&6; }
4367
4368fi
4369if test "x$ac_cv_header_minix_config_h" = x""yes; then
4370 MINIX=yes
4371else
4372 MINIX=
4373fi
4374
4375
4376 if test "$MINIX" = yes; then
4377
Martin v. Löwis11437992002-04-12 09:54:03 +00004378cat >>confdefs.h <<\_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +00004379#define _POSIX_SOURCE 1
4380_ACEOF
4381
4382
4383cat >>confdefs.h <<\_ACEOF
4384#define _POSIX_1_SOURCE 2
4385_ACEOF
4386
4387
4388cat >>confdefs.h <<\_ACEOF
4389#define _MINIX 1
4390_ACEOF
4391
4392 fi
4393
4394
4395
4396 { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4397$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4398if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4399 $as_echo_n "(cached) " >&6
4400else
4401 cat >conftest.$ac_ext <<_ACEOF
4402/* confdefs.h. */
4403_ACEOF
4404cat confdefs.h >>conftest.$ac_ext
4405cat >>conftest.$ac_ext <<_ACEOF
4406/* end confdefs.h. */
4407
4408# define __EXTENSIONS__ 1
4409 $ac_includes_default
4410int
4411main ()
4412{
4413
4414 ;
4415 return 0;
4416}
4417_ACEOF
4418rm -f conftest.$ac_objext
4419if { (ac_try="$ac_compile"
4420case "(($ac_try" in
4421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4422 *) ac_try_echo=$ac_try;;
4423esac
4424eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4425$as_echo "$ac_try_echo") >&5
4426 (eval "$ac_compile") 2>conftest.er1
4427 ac_status=$?
4428 grep -v '^ *+' conftest.er1 >conftest.err
4429 rm -f conftest.er1
4430 cat conftest.err >&5
4431 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4432 (exit $ac_status); } && {
4433 test -z "$ac_c_werror_flag" ||
4434 test ! -s conftest.err
4435 } && test -s conftest.$ac_objext; then
4436 ac_cv_safe_to_define___extensions__=yes
4437else
4438 $as_echo "$as_me: failed program was:" >&5
4439sed 's/^/| /' conftest.$ac_ext >&5
4440
4441 ac_cv_safe_to_define___extensions__=no
4442fi
4443
4444rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4445fi
4446{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4447$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4448 test $ac_cv_safe_to_define___extensions__ = yes &&
4449 cat >>confdefs.h <<\_ACEOF
4450#define __EXTENSIONS__ 1
4451_ACEOF
4452
4453 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004454#define _ALL_SOURCE 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004455_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004456
Benjamin Peterson697cd212010-05-02 16:45:11 +00004457 cat >>confdefs.h <<\_ACEOF
4458#define _GNU_SOURCE 1
4459_ACEOF
4460
4461 cat >>confdefs.h <<\_ACEOF
4462#define _POSIX_PTHREAD_SEMANTICS 1
4463_ACEOF
4464
4465 cat >>confdefs.h <<\_ACEOF
4466#define _TANDEM_SOURCE 1
4467_ACEOF
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004468
Michael W. Hudson54241132001-12-07 15:38:26 +00004469
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00004470
Martin v. Löwis779ffc02002-12-02 22:17:01 +00004471# Check for unsupported systems
4472case $ac_sys_system/$ac_sys_release in
Brett Cannon19fab762007-06-02 03:02:29 +00004473atheos*|Linux*/1*)
Martin v. Löwis779ffc02002-12-02 22:17:01 +00004474 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4475 echo See README for details.
4476 exit 1;;
4477esac
4478
Michael W. Hudson54241132001-12-07 15:38:26 +00004479
Benjamin Peterson697cd212010-05-02 16:45:11 +00004480{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5
4481$as_echo_n "checking for --with-suffix... " >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00004482
Martin v. Löwiseba40652007-08-30 20:10:57 +00004483# Check whether --with-suffix was given.
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00004484if test "${with_suffix+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004485 withval=$with_suffix;
Neil Schemenauerdfb38e42001-01-27 06:57:08 +00004486 case $withval in
4487 no) EXEEXT=;;
4488 yes) EXEEXT=.exe;;
4489 *) EXEEXT=$withval;;
4490 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +00004491fi
4492
Benjamin Peterson697cd212010-05-02 16:45:11 +00004493{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5
4494$as_echo "$EXEEXT" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00004495
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004496# Test whether we're running on a non-case-sensitive system, in which
4497# case we give a warning if no ext is given
Jack Jansen1999ef42001-12-06 21:47:20 +00004498
Benjamin Peterson697cd212010-05-02 16:45:11 +00004499{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
4500$as_echo_n "checking for case-insensitive build directory... " >&6; }
Jack Jansen3c2c4332002-11-06 13:33:32 +00004501if test ! -d CaseSensitiveTestDir; then
4502mkdir CaseSensitiveTestDir
4503fi
4504
4505if test -d casesensitivetestdir
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004506then
Benjamin Peterson697cd212010-05-02 16:45:11 +00004507 { $as_echo "$as_me:$LINENO: result: yes" >&5
4508$as_echo "yes" >&6; }
Jack Jansen1999ef42001-12-06 21:47:20 +00004509 BUILDEXEEXT=.exe
4510else
Benjamin Peterson697cd212010-05-02 16:45:11 +00004511 { $as_echo "$as_me:$LINENO: result: no" >&5
4512$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00004513 BUILDEXEEXT=$EXEEXT
Jack Jansen9a66b6d2001-08-08 13:56:14 +00004514fi
Jack Jansen3c2c4332002-11-06 13:33:32 +00004515rmdir CaseSensitiveTestDir
Guido van Rossumff555e32000-09-22 15:38:21 +00004516
Guido van Rossumdd997f71998-10-07 19:58:26 +00004517case $MACHDEP in
4518bsdos*)
4519 case $CC in
4520 gcc) CC="$CC -D_HAVE_BSDI";;
4521 esac;;
4522esac
4523
Guido van Rossum24b1e751997-08-21 02:29:16 +00004524case $ac_sys_system in
4525hp*|HP*)
4526 case $CC in
Guido van Rossumcd5ff9f2000-09-22 16:15:54 +00004527 cc|*/cc) CC="$CC -Ae";;
Guido van Rossum24b1e751997-08-21 02:29:16 +00004528 esac;;
Trent Mick635f6fb2000-08-23 21:33:05 +00004529Monterey*)
4530 case $CC in
4531 cc) CC="$CC -Wl,-Bexport";;
4532 esac;;
Martin v. Löwisa30c1002001-03-06 12:10:20 +00004533SunOS*)
4534 # Some functions have a prototype only with that define, e.g. confstr
Martin v. Löwis11437992002-04-12 09:54:03 +00004535
4536cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00004537#define __EXTENSIONS__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +00004538_ACEOF
Martin v. Löwisa30c1002001-03-06 12:10:20 +00004539
4540 ;;
Guido van Rossum24b1e751997-08-21 02:29:16 +00004541esac
4542
Michael W. Hudson54241132001-12-07 15:38:26 +00004543
4544
Benjamin Peterson697cd212010-05-02 16:45:11 +00004545{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5
4546$as_echo_n "checking LIBRARY... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00004547if test -z "$LIBRARY"
4548then
4549 LIBRARY='libpython$(VERSION).a'
4550fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00004551{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5
4552$as_echo "$LIBRARY" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00004553
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004554# LDLIBRARY is the name of the library to link against (as opposed to the
Jack Jansene578a632001-08-15 01:27:14 +00004555# name of the library into which to insert object files). BLDLIBRARY is also
4556# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4557# is blank as the main program is not linked directly against LDLIBRARY.
4558# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4559# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4560# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4561# DLLLIBRARY is the shared (i.e., DLL) library.
Martin v. Löwis11437992002-04-12 09:54:03 +00004562#
Martin v. Löwis1142de32002-03-29 16:28:31 +00004563# RUNSHARED is used to run shared python without installed libraries
4564#
4565# INSTSONAME is the name of the shared library that will be use to install
4566# on the system - some systems like version suffix, others don't
4567
4568
Michael W. Hudson54241132001-12-07 15:38:26 +00004569
4570
4571
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004572
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +00004573LDLIBRARY="$LIBRARY"
Jack Jansene578a632001-08-15 01:27:14 +00004574BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis09bdf722002-05-08 08:51:29 +00004575INSTSONAME='$(LDLIBRARY)'
Guido van Rossumca563f22001-01-23 01:52:44 +00004576DLLLIBRARY=''
Jack Jansene578a632001-08-15 01:27:14 +00004577LDLIBRARYDIR=''
Martin v. Löwis1142de32002-03-29 16:28:31 +00004578RUNSHARED=''
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004579
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004580# LINKCC is the command that links the python executable -- default is $(CC).
Martin v. Löwisb7da67a2001-10-18 15:35:38 +00004581# If CXX is set, and if it is needed to link a main function that was
4582# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4583# python might then depend on the C++ runtime
Martin v. Löwis11437992002-04-12 09:54:03 +00004584# This is altered for AIX in order to build the export list before
Guido van Rossumec95c7b1998-08-04 17:59:56 +00004585# linking.
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004586
Benjamin Peterson697cd212010-05-02 16:45:11 +00004587{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5
4588$as_echo_n "checking LINKCC... " >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004589if test -z "$LINKCC"
4590then
Martin v. Löwis0f48d982006-04-14 14:34:26 +00004591 LINKCC='$(PURIFY) $(MAINCC)'
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004592 case $ac_sys_system in
4593 AIX*)
Neal Norwitz0b27ff92003-03-31 15:53:49 +00004594 exp_extra="\"\""
4595 if test $ac_sys_release -ge 5 -o \
4596 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4597 exp_extra="."
4598 fi
4599 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Trent Mick635f6fb2000-08-23 21:33:05 +00004600 Monterey64*)
Martin v. Löwis4e732dc2002-03-19 15:15:32 +00004601 LINKCC="$LINKCC -L/usr/lib/ia64l64";;
Martin v. Löwis8c255e42008-05-23 15:06:50 +00004602 QNX*)
4603 # qcc must be used because the other compilers do not
4604 # support -N.
4605 LINKCC=qcc;;
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004606 esac
4607fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00004608{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5
4609$as_echo "$LINKCC" >&6; }
Guido van Rossum76c5fe21997-08-14 19:45:07 +00004610
Benjamin Peterson697cd212010-05-02 16:45:11 +00004611{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5
4612$as_echo_n "checking for --enable-shared... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004613# Check whether --enable-shared was given.
Martin v. Löwis1142de32002-03-29 16:28:31 +00004614if test "${enable_shared+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004615 enableval=$enable_shared;
4616fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004617
Martin v. Löwis1142de32002-03-29 16:28:31 +00004618
4619if test -z "$enable_shared"
Martin v. Löwis11437992002-04-12 09:54:03 +00004620then
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004621 case $ac_sys_system in
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004622 CYGWIN* | atheos*)
Martin v. Löwisb51033d2002-05-03 05:53:15 +00004623 enable_shared="yes";;
4624 *)
4625 enable_shared="no";;
4626 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004627fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00004628{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
4629$as_echo "$enable_shared" >&6; }
Martin v. Löwis1142de32002-03-29 16:28:31 +00004630
Benjamin Peterson697cd212010-05-02 16:45:11 +00004631{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4632$as_echo_n "checking for --enable-profiling... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00004633# Check whether --enable-profiling was given.
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004634if test "${enable_profiling+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00004635 enableval=$enable_profiling; ac_save_cc="$CC"
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004636 CC="$CC -pg"
4637 if test "$cross_compiling" = yes; then
4638 ac_enable_profiling="no"
4639else
4640 cat >conftest.$ac_ext <<_ACEOF
4641/* confdefs.h. */
4642_ACEOF
4643cat confdefs.h >>conftest.$ac_ext
4644cat >>conftest.$ac_ext <<_ACEOF
4645/* end confdefs.h. */
4646int main() { return 0; }
4647_ACEOF
4648rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00004649if { (ac_try="$ac_link"
4650case "(($ac_try" in
4651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4652 *) ac_try_echo=$ac_try;;
4653esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00004654eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4655$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004656 (eval "$ac_link") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004657 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00004658 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004659 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00004660 { (case "(($ac_try" in
4661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4662 *) ac_try_echo=$ac_try;;
4663esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00004664eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4665$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00004666 (eval "$ac_try") 2>&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004667 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00004668 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004669 (exit $ac_status); }; }; then
4670 ac_enable_profiling="yes"
4671else
Benjamin Peterson697cd212010-05-02 16:45:11 +00004672 $as_echo "$as_me: program exited with status $ac_status" >&5
4673$as_echo "$as_me: failed program was:" >&5
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004674sed 's/^/| /' conftest.$ac_ext >&5
4675
4676( exit $ac_status )
4677ac_enable_profiling="no"
4678fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00004679rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00004680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004681fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00004682
4683
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004684 CC="$ac_save_cc"
Martin v. Löwiseba40652007-08-30 20:10:57 +00004685fi
4686
Benjamin Peterson697cd212010-05-02 16:45:11 +00004687{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4688$as_echo "$ac_enable_profiling" >&6; }
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00004689
4690case "$ac_enable_profiling" in
4691 "yes")
4692 BASECFLAGS="-pg $BASECFLAGS"
4693 LDFLAGS="-pg $LDFLAGS"
4694 ;;
4695esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004696
Benjamin Peterson697cd212010-05-02 16:45:11 +00004697{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4698$as_echo_n "checking LDLIBRARY... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +00004699
Guido van Rossumb8552162001-09-05 14:58:11 +00004700# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4701# library that we build, but we do not want to link against it (we
4702# will find it with a -framework option). For this reason there is an
4703# extra variable BLDLIBRARY against which Python and the extension
4704# modules are linked, BLDLIBRARY. This is normally the same as
4705# LDLIBRARY, but empty for MacOSX framework builds.
Jack Jansene578a632001-08-15 01:27:14 +00004706if test "$enable_framework"
4707then
4708 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen66b84832003-07-04 12:14:39 +00004709 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
Jack Jansene578a632001-08-15 01:27:14 +00004710 BLDLIBRARY=''
4711else
4712 BLDLIBRARY='$(LDLIBRARY)'
Martin v. Löwis11437992002-04-12 09:54:03 +00004713fi
Jack Jansene578a632001-08-15 01:27:14 +00004714
Martin v. Löwis1142de32002-03-29 16:28:31 +00004715# Other platforms follow
4716if test $enable_shared = "yes"; then
Mark Hammond8235ea12002-07-19 06:55:41 +00004717
4718cat >>confdefs.h <<\_ACEOF
4719#define Py_ENABLE_SHARED 1
4720_ACEOF
4721
Martin v. Löwis1142de32002-03-29 16:28:31 +00004722 case $ac_sys_system in
4723 BeOS*)
4724 LDLIBRARY='libpython$(VERSION).so'
4725 ;;
4726 CYGWIN*)
4727 LDLIBRARY='libpython$(VERSION).dll.a'
4728 DLLLIBRARY='libpython$(VERSION).dll'
4729 ;;
4730 SunOS*)
4731 LDLIBRARY='libpython$(VERSION).so'
Martin v. Löwisd141a8c2003-06-14 15:20:28 +00004732 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004733 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis2389c412003-10-31 15:42:07 +00004734 INSTSONAME="$LDLIBRARY".$SOVERSION
Martin v. Löwis1142de32002-03-29 16:28:31 +00004735 ;;
Martin v. Löwis86d66262006-02-17 08:40:11 +00004736 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
Martin v. Löwis1142de32002-03-29 16:28:31 +00004737 LDLIBRARY='libpython$(VERSION).so'
4738 BLDLIBRARY='-L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004739 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Hye-Shik Chang33761492004-10-26 09:53:46 +00004740 case $ac_sys_system in
4741 FreeBSD*)
4742 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4743 ;;
4744 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004745 INSTSONAME="$LDLIBRARY".$SOVERSION
4746 ;;
4747 hp*|HP*)
Neal Norwitz58e28882006-05-19 07:00:58 +00004748 case `uname -m` in
4749 ia64)
4750 LDLIBRARY='libpython$(VERSION).so'
4751 ;;
4752 *)
4753 LDLIBRARY='libpython$(VERSION).sl'
4754 ;;
4755 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004756 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004757 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004758 ;;
4759 OSF*)
4760 LDLIBRARY='libpython$(VERSION).so'
Neal Norwitz671b9e32006-01-09 07:07:12 +00004761 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
Martin v. Löwisfc9b75f2003-08-09 09:06:52 +00004762 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
Martin v. Löwis1142de32002-03-29 16:28:31 +00004763 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00004764 atheos*)
4765 LDLIBRARY='libpython$(VERSION).so'
4766 BLDLIBRARY='-L. -lpython$(VERSION)'
4767 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4768 ;;
Ronald Oussorene9cce8e2009-01-02 10:46:42 +00004769 Darwin*)
4770 LDLIBRARY='libpython$(VERSION).dylib'
4771 BLDLIBRARY='-L. -lpython$(VERSION)'
4772 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4773 ;;
4774
Martin v. Löwis1142de32002-03-29 16:28:31 +00004775 esac
Jason Tishler30765592003-09-04 11:04:06 +00004776else # shared is disabled
4777 case $ac_sys_system in
4778 CYGWIN*)
4779 BLDLIBRARY='$(LIBRARY)'
4780 LDLIBRARY='libpython$(VERSION).dll.a'
4781 ;;
4782 esac
Martin v. Löwis1142de32002-03-29 16:28:31 +00004783fi
4784
Benjamin Peterson697cd212010-05-02 16:45:11 +00004785{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4786$as_echo "$LDLIBRARY" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +00004787
Martin v. Löwis11437992002-04-12 09:54:03 +00004788if test -n "$ac_tool_prefix"; then
4789 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4790set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00004791{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4792$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004793if test "${ac_cv_prog_RANLIB+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00004794 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004795else
4796 if test -n "$RANLIB"; then
4797 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4798else
Martin v. Löwis11437992002-04-12 09:54:03 +00004799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4800for as_dir in $PATH
4801do
4802 IFS=$as_save_IFS
4803 test -z "$as_dir" && as_dir=.
4804 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004805 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 +00004806 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Benjamin Peterson697cd212010-05-02 16:45:11 +00004807 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004808 break 2
4809 fi
4810done
4811done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004812IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004813
Guido van Rossum627b2d71993-12-24 10:39:16 +00004814fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004815fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004816RANLIB=$ac_cv_prog_RANLIB
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004817if test -n "$RANLIB"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00004818 { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
4819$as_echo "$RANLIB" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004820else
Benjamin Peterson697cd212010-05-02 16:45:11 +00004821 { $as_echo "$as_me:$LINENO: result: no" >&5
4822$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004823fi
4824
Martin v. Löwiseba40652007-08-30 20:10:57 +00004825
Martin v. Löwis11437992002-04-12 09:54:03 +00004826fi
4827if test -z "$ac_cv_prog_RANLIB"; then
4828 ac_ct_RANLIB=$RANLIB
4829 # Extract the first word of "ranlib", so it can be a program name with args.
4830set dummy ranlib; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00004831{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4832$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004833if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00004834 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00004835else
4836 if test -n "$ac_ct_RANLIB"; then
4837 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4838else
4839as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4840for as_dir in $PATH
4841do
4842 IFS=$as_save_IFS
4843 test -z "$as_dir" && as_dir=.
4844 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004845 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 +00004846 ac_cv_prog_ac_ct_RANLIB="ranlib"
Benjamin Peterson697cd212010-05-02 16:45:11 +00004847 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004848 break 2
4849 fi
4850done
4851done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004852IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004853
Martin v. Löwis11437992002-04-12 09:54:03 +00004854fi
4855fi
4856ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4857if test -n "$ac_ct_RANLIB"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00004858 { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4859$as_echo "$ac_ct_RANLIB" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004860else
Benjamin Peterson697cd212010-05-02 16:45:11 +00004861 { $as_echo "$as_me:$LINENO: result: no" >&5
4862$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004863fi
4864
Martin v. Löwiseba40652007-08-30 20:10:57 +00004865 if test "x$ac_ct_RANLIB" = x; then
4866 RANLIB=":"
4867 else
4868 case $cross_compiling:$ac_tool_warned in
4869yes:)
Benjamin Peterson697cd212010-05-02 16:45:11 +00004870{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
4871$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00004872ac_tool_warned=yes ;;
4873esac
4874 RANLIB=$ac_ct_RANLIB
4875 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004876else
4877 RANLIB="$ac_cv_prog_RANLIB"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004878fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00004879
4880
Guido van Rossum7f43da71994-08-01 12:15:30 +00004881for ac_prog in ar aal
4882do
Martin v. Löwis11437992002-04-12 09:54:03 +00004883 # Extract the first word of "$ac_prog", so it can be a program name with args.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004884set dummy $ac_prog; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00004885{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4886$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00004887if test "${ac_cv_prog_AR+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00004888 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004889else
4890 if test -n "$AR"; then
4891 ac_cv_prog_AR="$AR" # Let the user override the test.
4892else
Martin v. Löwis11437992002-04-12 09:54:03 +00004893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4894for as_dir in $PATH
4895do
4896 IFS=$as_save_IFS
4897 test -z "$as_dir" && as_dir=.
4898 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004899 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 +00004900 ac_cv_prog_AR="$ac_prog"
Benjamin Peterson697cd212010-05-02 16:45:11 +00004901 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00004902 break 2
4903 fi
4904done
4905done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004906IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00004907
Guido van Rossum7f43da71994-08-01 12:15:30 +00004908fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004909fi
Martin v. Löwis11437992002-04-12 09:54:03 +00004910AR=$ac_cv_prog_AR
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004911if test -n "$AR"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00004912 { $as_echo "$as_me:$LINENO: result: $AR" >&5
4913$as_echo "$AR" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004914else
Benjamin Peterson697cd212010-05-02 16:45:11 +00004915 { $as_echo "$as_me:$LINENO: result: no" >&5
4916$as_echo "no" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00004917fi
Guido van Rossum7f43da71994-08-01 12:15:30 +00004918
Martin v. Löwiseba40652007-08-30 20:10:57 +00004919
Martin v. Löwis11437992002-04-12 09:54:03 +00004920 test -n "$AR" && break
Guido van Rossum7f43da71994-08-01 12:15:30 +00004921done
4922test -n "$AR" || AR="ar"
4923
Michael W. Hudson54241132001-12-07 15:38:26 +00004924
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004925
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004926# Extract the first word of "svnversion", so it can be a program name with args.
4927set dummy svnversion; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +00004928{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4929$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004930if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00004931 $as_echo_n "(cached) " >&6
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004932else
4933 if test -n "$SVNVERSION"; then
4934 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4935else
4936as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4937for as_dir in $PATH
4938do
4939 IFS=$as_save_IFS
4940 test -z "$as_dir" && as_dir=.
4941 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00004942 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004943 ac_cv_prog_SVNVERSION="found"
Benjamin Peterson697cd212010-05-02 16:45:11 +00004944 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004945 break 2
4946 fi
4947done
4948done
Martin v. Löwiseba40652007-08-30 20:10:57 +00004949IFS=$as_save_IFS
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004950
Martin v. Löwisff600232006-04-03 19:12:32 +00004951 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004952fi
4953fi
4954SVNVERSION=$ac_cv_prog_SVNVERSION
4955if test -n "$SVNVERSION"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00004956 { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4957$as_echo "$SVNVERSION" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004958else
Benjamin Peterson697cd212010-05-02 16:45:11 +00004959 { $as_echo "$as_me:$LINENO: result: no" >&5
4960$as_echo "no" >&6; }
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004961fi
4962
Martin v. Löwiseba40652007-08-30 20:10:57 +00004963
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004964if test $SVNVERSION = found
4965then
4966 SVNVERSION="svnversion \$(srcdir)"
4967else
Benjamin Peterson2eb65452009-05-23 19:35:33 +00004968 SVNVERSION="echo Unversioned directory"
Martin v. Löwisc5bf5a02006-01-05 10:33:59 +00004969fi
Martin v. Löwisdea59e52006-01-05 10:00:36 +00004970
Neil Schemenauera42c8272001-03-31 00:01:55 +00004971case $MACHDEP in
Neil Schemenaueraf5567f2001-10-21 22:32:04 +00004972bsdos*|hp*|HP*)
4973 # install -d does not work on BSDI or HP-UX
Neil Schemenauera42c8272001-03-31 00:01:55 +00004974 if test -z "$INSTALL"
4975 then
4976 INSTALL="${srcdir}/install-sh -c"
4977 fi
4978esac
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004979ac_aux_dir=
Martin v. Löwiseba40652007-08-30 20:10:57 +00004980for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4981 if test -f "$ac_dir/install-sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004982 ac_aux_dir=$ac_dir
4983 ac_install_sh="$ac_aux_dir/install-sh -c"
4984 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004985 elif test -f "$ac_dir/install.sh"; then
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004986 ac_aux_dir=$ac_dir
4987 ac_install_sh="$ac_aux_dir/install.sh -c"
4988 break
Martin v. Löwiseba40652007-08-30 20:10:57 +00004989 elif test -f "$ac_dir/shtool"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00004990 ac_aux_dir=$ac_dir
4991 ac_install_sh="$ac_aux_dir/shtool install -c"
4992 break
Neil Schemenauerd32c2492001-01-24 17:25:28 +00004993 fi
4994done
4995if test -z "$ac_aux_dir"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00004996 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4997$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00004998 { (exit 1); exit 1; }; }
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00004999fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005000
5001# These three variables are undocumented and unsupported,
5002# and are intended to be withdrawn in a future Autoconf release.
5003# They can cause serious problems if a builder's source tree is in a directory
5004# whose full name contains unusual characters.
5005ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5006ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5007ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5008
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005009
5010# Find a good install program. We prefer a C program (faster),
5011# so one script is as good as another. But avoid the broken or
5012# incompatible versions:
5013# SysV /etc/install, /usr/sbin/install
5014# SunOS /usr/etc/install
5015# IRIX /sbin/install
5016# AIX /bin/install
Martin v. Löwis11437992002-04-12 09:54:03 +00005017# AmigaOS /C/install, which installs bootblocks on floppy discs
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005018# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
5019# AFS /usr/afsws/bin/install, which mishandles nonexistent args
5020# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
Skip Montanarof0d5f792004-08-15 14:08:23 +00005021# OS/2's system install, which has a completely different semantic
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005022# ./install, which can be erroneously created by make from ./install.sh.
Benjamin Peterson697cd212010-05-02 16:45:11 +00005023# Reject install programs that cannot install multiple files.
5024{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
5025$as_echo_n "checking for a BSD-compatible install... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005026if test -z "$INSTALL"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005027if test "${ac_cv_path_install+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00005028 $as_echo_n "(cached) " >&6
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005029else
Martin v. Löwis11437992002-04-12 09:54:03 +00005030 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5031for as_dir in $PATH
5032do
5033 IFS=$as_save_IFS
5034 test -z "$as_dir" && as_dir=.
5035 # Account for people who put trailing slashes in PATH elements.
5036case $as_dir/ in
5037 ./ | .// | /cC/* | \
5038 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Skip Montanarof0d5f792004-08-15 14:08:23 +00005039 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
Martin v. Löwis11437992002-04-12 09:54:03 +00005040 /usr/ucb/* ) ;;
5041 *)
5042 # OSF1 and SCO ODT 3.0 have their own names for install.
5043 # Don't use installbsd from OSF since it installs stuff as root
5044 # by default.
5045 for ac_prog in ginstall scoinst install; do
5046 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +00005047 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00005048 if test $ac_prog = install &&
5049 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5050 # AIX install. It has an incompatible calling convention.
5051 :
5052 elif test $ac_prog = install &&
5053 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
5054 # program-specific install script used by HP pwplus--don't use.
5055 :
5056 else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005057 rm -rf conftest.one conftest.two conftest.dir
5058 echo one > conftest.one
5059 echo two > conftest.two
5060 mkdir conftest.dir
5061 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
5062 test -s conftest.one && test -s conftest.two &&
5063 test -s conftest.dir/conftest.one &&
5064 test -s conftest.dir/conftest.two
5065 then
5066 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
5067 break 3
5068 fi
Skip Montanarof0d5f792004-08-15 14:08:23 +00005069 fi
5070 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005071 done
Martin v. Löwis11437992002-04-12 09:54:03 +00005072 done
5073 ;;
5074esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005075
Martin v. Löwis11437992002-04-12 09:54:03 +00005076done
Martin v. Löwiseba40652007-08-30 20:10:57 +00005077IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00005078
Benjamin Peterson697cd212010-05-02 16:45:11 +00005079rm -rf conftest.one conftest.two conftest.dir
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005080
5081fi
5082 if test "${ac_cv_path_install+set}" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00005083 INSTALL=$ac_cv_path_install
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005084 else
Martin v. Löwiseba40652007-08-30 20:10:57 +00005085 # As a last resort, use the slow shell script. Don't cache a
5086 # value for INSTALL within a source directory, because that will
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005087 # break other packages using the cache if that directory is
Martin v. Löwiseba40652007-08-30 20:10:57 +00005088 # removed, or if the value is a relative name.
Martin v. Löwis11437992002-04-12 09:54:03 +00005089 INSTALL=$ac_install_sh
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005090 fi
5091fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00005092{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
5093$as_echo "$INSTALL" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005094
5095# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5096# It thinks the first close brace ends the variable substitution.
5097test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5098
Martin v. Löwis11437992002-04-12 09:54:03 +00005099test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005100
5101test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5102
Michael W. Hudson54241132001-12-07 15:38:26 +00005103
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005104# Not every filesystem supports hard links
5105
5106if test -z "$LN" ; then
5107 case $ac_sys_system in
5108 BeOS*) LN="ln -s";;
Guido van Rossumaef734b2001-01-10 21:09:12 +00005109 CYGWIN*) LN="ln -s";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00005110 atheos*) LN="ln -s";;
Guido van Rossumec95c7b1998-08-04 17:59:56 +00005111 *) LN=ln;;
5112 esac
5113fi
5114
Fred Drake109d9862001-07-11 06:27:56 +00005115# Check for --with-pydebug
Benjamin Peterson697cd212010-05-02 16:45:11 +00005116{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5
5117$as_echo_n "checking for --with-pydebug... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005118
Martin v. Löwiseba40652007-08-30 20:10:57 +00005119# Check whether --with-pydebug was given.
Fred Drake109d9862001-07-11 06:27:56 +00005120if test "${with_pydebug+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00005121 withval=$with_pydebug;
Fred Drake109d9862001-07-11 06:27:56 +00005122if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +00005123then
5124
5125cat >>confdefs.h <<\_ACEOF
Fred Drake109d9862001-07-11 06:27:56 +00005126#define Py_DEBUG 1
Martin v. Löwis11437992002-04-12 09:54:03 +00005127_ACEOF
5128
Benjamin Peterson697cd212010-05-02 16:45:11 +00005129 { $as_echo "$as_me:$LINENO: result: yes" >&5
5130$as_echo "yes" >&6; };
Martin v. Löwisc45929e2002-04-06 10:10:49 +00005131 Py_DEBUG='true'
Benjamin Peterson697cd212010-05-02 16:45:11 +00005132else { $as_echo "$as_me:$LINENO: result: no" >&5
5133$as_echo "no" >&6; }; Py_DEBUG='false'
Fred Drake109d9862001-07-11 06:27:56 +00005134fi
5135else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005136 { $as_echo "$as_me:$LINENO: result: no" >&5
5137$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00005138fi
5139
Fred Drake109d9862001-07-11 06:27:56 +00005140
Skip Montanarodecc6a42003-01-01 20:07:49 +00005141# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5142# merged with this chunk of code?
5143
Neil Schemenauerd32c2492001-01-24 17:25:28 +00005144# Optimizer/debugger flags
Skip Montanarodecc6a42003-01-01 20:07:49 +00005145# ------------------------
5146# (The following bit of code is complicated enough - please keep things
5147# indented properly. Just pretend you're editing Python code. ;-)
5148
5149# There are two parallel sets of case statements below, one that checks to
5150# see if OPT was set and one that does BASECFLAGS setting based upon
5151# compiler and platform. BASECFLAGS tweaks need to be made even if the
5152# user set OPT.
5153
5154# tweak OPT based on compiler and platform, only if the user didn't set
5155# it on the command line
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005156
Benjamin Peterson5d39ab02010-03-23 21:02:50 +00005157if test "${OPT-unset}" = "unset"
Guido van Rossum7b3853f1996-07-30 18:09:35 +00005158then
Skip Montanarodecc6a42003-01-01 20:07:49 +00005159 case $GCC in
5160 yes)
Skip Montanaro288a5be2006-04-13 02:00:56 +00005161 if test "$CC" != 'g++' ; then
5162 STRICT_PROTO="-Wstrict-prototypes"
5163 fi
Thomas Hellere5529592007-12-13 21:20:29 +00005164 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5165 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5166 WRAP="-fwrapv"
5167 fi
Skip Montanarodecc6a42003-01-01 20:07:49 +00005168 case $ac_cv_prog_cc_g in
Guido van Rossum2242f2f2001-04-11 20:58:20 +00005169 yes)
Fred Drake109d9862001-07-11 06:27:56 +00005170 if test "$Py_DEBUG" = 'true' ; then
5171 # Optimization messes up debuggers, so turn it off for
5172 # debug builds.
Skip Montanaro288a5be2006-04-13 02:00:56 +00005173 OPT="-g -Wall $STRICT_PROTO"
Fred Drake109d9862001-07-11 06:27:56 +00005174 else
Thomas Hellere5529592007-12-13 21:20:29 +00005175 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00005176 fi
5177 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00005178 *)
Skip Montanaro288a5be2006-04-13 02:00:56 +00005179 OPT="-O3 -Wall $STRICT_PROTO"
Skip Montanarodecc6a42003-01-01 20:07:49 +00005180 ;;
Fred Drake109d9862001-07-11 06:27:56 +00005181 esac
Martin v. Löwis21ee4092002-09-30 16:19:48 +00005182 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00005183 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5184 ;;
5185 esac
Fred Drake109d9862001-07-11 06:27:56 +00005186 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00005187
Guido van Rossum2242f2f2001-04-11 20:58:20 +00005188 *)
Skip Montanarodecc6a42003-01-01 20:07:49 +00005189 OPT="-O"
5190 ;;
Guido van Rossum2242f2f2001-04-11 20:58:20 +00005191 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00005192
5193 # The current (beta) Monterey compiler dies with optimizations
5194 # XXX what is Monterey? Does it still die w/ -O? Can we get rid of this?
Jack Jansenca06bc62001-08-03 15:32:23 +00005195 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00005196 Monterey*)
5197 OPT=""
5198 ;;
Jack Jansenca06bc62001-08-03 15:32:23 +00005199 esac
Skip Montanarodecc6a42003-01-01 20:07:49 +00005200
Guido van Rossumb1ba03f1994-08-19 15:34:50 +00005201fi
5202
Skip Montanarodecc6a42003-01-01 20:07:49 +00005203
Ronald Oussoren5640ce22008-06-05 12:58:24 +00005204
5205# The -arch flags for universal builds on OSX
5206UNIVERSAL_ARCH_FLAGS=
5207
5208
Skip Montanarodecc6a42003-01-01 20:07:49 +00005209# tweak BASECFLAGS based on compiler and platform
5210case $GCC in
5211yes)
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00005212 # Python violates C99 rules, by casting between incompatible
5213 # pointer types. GCC may generate bad code as a result of that,
5214 # so use -fno-strict-aliasing if supported.
Benjamin Peterson697cd212010-05-02 16:45:11 +00005215 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
5216$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00005217 ac_save_cc="$CC"
5218 CC="$CC -fno-strict-aliasing"
5219 if test "$cross_compiling" = yes; then
5220 ac_cv_no_strict_aliasing_ok=no
5221else
5222 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005223/* confdefs.h. */
5224_ACEOF
5225cat confdefs.h >>conftest.$ac_ext
5226cat >>conftest.$ac_ext <<_ACEOF
5227/* end confdefs.h. */
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00005228int main() { return 0; }
5229_ACEOF
5230rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005231if { (ac_try="$ac_link"
5232case "(($ac_try" in
5233 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5234 *) ac_try_echo=$ac_try;;
5235esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005236eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5237$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005238 (eval "$ac_link") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00005239 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005240 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00005241 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005242 { (case "(($ac_try" in
5243 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5244 *) ac_try_echo=$ac_try;;
5245esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005246eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5247$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005248 (eval "$ac_try") 2>&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00005249 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005250 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00005251 (exit $ac_status); }; }; then
5252 ac_cv_no_strict_aliasing_ok=yes
5253else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005254 $as_echo "$as_me: program exited with status $ac_status" >&5
5255$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005256sed 's/^/| /' conftest.$ac_ext >&5
5257
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00005258( exit $ac_status )
5259ac_cv_no_strict_aliasing_ok=no
5260fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00005261rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00005262rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00005263fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005264
5265
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00005266 CC="$ac_save_cc"
Benjamin Peterson697cd212010-05-02 16:45:11 +00005267 { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
5268$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Martin v. Löwis70fedcd2003-07-07 21:26:19 +00005269 if test $ac_cv_no_strict_aliasing_ok = yes
5270 then
5271 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5272 fi
Mark Dickinson65134662008-04-25 16:11:04 +00005273
5274 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5275 # support. Without this, treatment of subnormals doesn't follow
5276 # the standard.
5277 case $ac_sys_machine in
5278 alpha*)
5279 BASECFLAGS="$BASECFLAGS -mieee"
5280 ;;
5281 esac
5282
Skip Montanarodecc6a42003-01-01 20:07:49 +00005283 case $ac_sys_system in
5284 SCO_SV*)
5285 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5286 ;;
5287 # is there any other compiler on Darwin besides gcc?
5288 Darwin*)
Jeffrey Yasskin1b4e45b2008-03-17 14:40:53 +00005289 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5290 # used to be here, but non-Apple gcc doesn't accept them.
Benjamin Peterson4347c442008-07-17 15:59:24 +00005291
Ronald Oussorene3eaf312010-04-18 18:21:03 +00005292 if test "${CC}" = gcc
5293 then
Benjamin Peterson697cd212010-05-02 16:45:11 +00005294 { $as_echo "$as_me:$LINENO: checking which compiler should be used" >&5
5295$as_echo_n "checking which compiler should be used... " >&6; }
Ronald Oussorene3eaf312010-04-18 18:21:03 +00005296 case "${UNIVERSALSDK}" in
5297 */MacOSX10.4u.sdk)
5298 # Build using 10.4 SDK, force usage of gcc when the
5299 # compiler is gcc, otherwise the user will get very
5300 # confusing error messages when building on OSX 10.6
5301 CC=gcc-4.0
5302 CPP=cpp-4.0
5303 ;;
5304 esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005305 { $as_echo "$as_me:$LINENO: result: $CC" >&5
5306$as_echo "$CC" >&6; }
Ronald Oussorene3eaf312010-04-18 18:21:03 +00005307 fi
5308
5309
Ronald Oussoren988117f2006-04-29 11:31:35 +00005310 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +00005311 UNIVERSAL_ARCH_FLAGS=""
5312 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
Benjamin Peterson0e6ea5d2008-07-16 20:17:04 +00005313 ARCH_RUN_32BIT=""
Ronald Oussorenea580e12010-03-09 10:36:28 +00005314 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00005315
5316 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
Ronald Oussoren7ab74352009-09-08 07:10:07 +00005317 ARCH_RUN_32BIT="true"
Ronald Oussorenea580e12010-03-09 10:36:28 +00005318 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00005319
5320 elif test "$UNIVERSAL_ARCHS" = "all" ; then
Ronald Oussorend8244f52010-02-11 13:22:03 +00005321 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorenea580e12010-03-09 10:36:28 +00005322 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
Ronald Oussorenea580e12010-03-09 10:36:28 +00005323 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
5324 LIPO_64BIT_FLAGS="-extract x86_64 -extract ppc64"
Ronald Oussoren5640ce22008-06-05 12:58:24 +00005325
Ronald Oussoren7ab74352009-09-08 07:10:07 +00005326 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
Ronald Oussorend8244f52010-02-11 13:22:03 +00005327 ARCH_RUN_32BIT="/usr/bin/arch -i386"
Ronald Oussorenea580e12010-03-09 10:36:28 +00005328 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
Ronald Oussorenea580e12010-03-09 10:36:28 +00005329 LIPO_32BIT_FLAGS="-extract i386"
5330 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren7ab74352009-09-08 07:10:07 +00005331
5332 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
Ronald Oussorend8244f52010-02-11 13:22:03 +00005333 ARCH_RUN_32BIT="/usr/bin/arch -i386 -ppc"
Ronald Oussorenea580e12010-03-09 10:36:28 +00005334 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
Ronald Oussorenea580e12010-03-09 10:36:28 +00005335 LIPO_32BIT_FLAGS="-extract i386 -extract ppc7400"
5336 LIPO_64BIT_FLAGS="-extract x86_64"
Ronald Oussoren7ab74352009-09-08 07:10:07 +00005337
Ronald Oussoren5640ce22008-06-05 12:58:24 +00005338 else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005339 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&5
5340$as_echo "$as_me: error: proper usage is --with-universal-arch=32-bit|64-bit|all|intel|3-way" >&2;}
Ronald Oussoren5640ce22008-06-05 12:58:24 +00005341 { (exit 1); exit 1; }; }
5342
5343 fi
5344
5345
Ronald Oussorene3eaf312010-04-18 18:21:03 +00005346 CFLAGS="${UNIVERSAL_ARCH_FLAGS} ${CFLAGS}"
5347 if test "${UNIVERSALSDK}" != "/"
5348 then
5349 CFLAGS="-isysroot ${UNIVERSALSDK} ${CFLAGS}"
5350 CPPFLAGS="-isysroot ${UNIVERSALSDK} ${CPPFLAGS}"
Benjamin Peterson4347c442008-07-17 15:59:24 +00005351 fi
Ronald Oussoren988117f2006-04-29 11:31:35 +00005352 fi
5353
Benjamin Peterson4347c442008-07-17 15:59:24 +00005354 # Calculate the right deployment target for this build.
5355 #
5356 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5357 if test ${cur_target} '>' 10.2; then
5358 cur_target=10.3
Ronald Oussoren7ab74352009-09-08 07:10:07 +00005359 if test ${enable_universalsdk}; then
5360 if test "${UNIVERSAL_ARCHS}" = "all"; then
5361 # Ensure that the default platform for a
5362 # 4-way universal build is OSX 10.5,
5363 # that's the first OS release where
5364 # 4-way builds make sense.
5365 cur_target='10.5'
5366
5367 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5368 cur_target='10.5'
5369
5370 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5371 cur_target='10.5'
5372
5373 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5374 cur_target='10.5'
5375 fi
5376 else
Ronald Oussoren25e192c2010-02-11 13:27:59 +00005377 if test `/usr/bin/arch` = "i386"; then
Ronald Oussoren7ab74352009-09-08 07:10:07 +00005378 # On Intel macs default to a deployment
5379 # target of 10.4, that's the first OSX
5380 # release with Intel support.
5381 cur_target="10.4"
5382 fi
5383 fi
Benjamin Peterson4347c442008-07-17 15:59:24 +00005384 fi
5385 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5386
5387 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5388 # environment with a value that is the same as what we'll use
5389 # in the Makefile to ensure that we'll get the same compiler
5390 # environment during configure and build time.
5391 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5392 export MACOSX_DEPLOYMENT_TARGET
5393 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5394
Skip Montanarodecc6a42003-01-01 20:07:49 +00005395 ;;
Neal Norwitzdedeeaa2006-03-31 06:54:45 +00005396 OSF*)
5397 BASECFLAGS="$BASECFLAGS -mieee"
5398 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00005399 esac
5400 ;;
5401
5402*)
5403 case $ac_sys_system in
5404 OpenUNIX*|UnixWare*)
5405 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5406 ;;
Neal Norwitzb44f1652003-05-26 14:11:55 +00005407 OSF*)
5408 BASECFLAGS="$BASECFLAGS -ieee -std"
5409 ;;
Skip Montanarodecc6a42003-01-01 20:07:49 +00005410 SCO_SV*)
5411 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5412 ;;
5413 esac
5414 ;;
5415esac
5416
Fred Drakee1ceaa02001-12-04 20:55:47 +00005417if test "$Py_DEBUG" = 'true'; then
5418 :
5419else
5420 OPT="-DNDEBUG $OPT"
5421fi
5422
Guido van Rossum563e7081996-09-10 18:20:48 +00005423if test "$ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00005424then
Skip Montanarodecc6a42003-01-01 20:07:49 +00005425 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
Guido van Rossuma68acba1996-07-31 17:36:39 +00005426fi
Guido van Rossumda88dad1995-01-26 00:46:29 +00005427
Neal Norwitz020c46a2006-01-07 21:39:28 +00005428# disable check for icc since it seems to pass, but generates a warning
5429if test "$CC" = icc
5430then
5431 ac_cv_opt_olimit_ok=no
5432fi
5433
Benjamin Peterson697cd212010-05-02 16:45:11 +00005434{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
5435$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005436if test "${ac_cv_opt_olimit_ok+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00005437 $as_echo_n "(cached) " >&6
Guido van Rossum91922671997-10-09 20:24:13 +00005438else
5439 ac_save_cc="$CC"
5440CC="$CC -OPT:Olimit=0"
5441if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00005442 ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00005443else
Martin v. Löwis11437992002-04-12 09:54:03 +00005444 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005445/* confdefs.h. */
5446_ACEOF
5447cat confdefs.h >>conftest.$ac_ext
5448cat >>conftest.$ac_ext <<_ACEOF
5449/* end confdefs.h. */
Guido van Rossum91922671997-10-09 20:24:13 +00005450int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005451_ACEOF
5452rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005453if { (ac_try="$ac_link"
5454case "(($ac_try" in
5455 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5456 *) ac_try_echo=$ac_try;;
5457esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005458eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5459$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005460 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005461 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005462 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005463 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005464 { (case "(($ac_try" in
5465 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5466 *) ac_try_echo=$ac_try;;
5467esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005468eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5469$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005470 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005471 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005472 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005473 (exit $ac_status); }; }; then
Guido van Rossum91922671997-10-09 20:24:13 +00005474 ac_cv_opt_olimit_ok=yes
5475else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005476 $as_echo "$as_me: program exited with status $ac_status" >&5
5477$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005478sed 's/^/| /' conftest.$ac_ext >&5
5479
Martin v. Löwis11437992002-04-12 09:54:03 +00005480( exit $ac_status )
5481ac_cv_opt_olimit_ok=no
Guido van Rossum91922671997-10-09 20:24:13 +00005482fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00005483rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00005484rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum91922671997-10-09 20:24:13 +00005485fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005486
5487
Guido van Rossum91922671997-10-09 20:24:13 +00005488CC="$ac_save_cc"
5489fi
5490
Benjamin Peterson697cd212010-05-02 16:45:11 +00005491{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
5492$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Guido van Rossum2efa34b1997-10-23 17:43:11 +00005493if test $ac_cv_opt_olimit_ok = yes; then
Guido van Rossum5839e582000-10-09 19:52:35 +00005494 case $ac_sys_system in
Skip Montanarodecc6a42003-01-01 20:07:49 +00005495 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5496 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5497 # environment?
5498 Darwin*)
5499 ;;
5500 *)
5501 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5502 ;;
Guido van Rossum5839e582000-10-09 19:52:35 +00005503 esac
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00005504else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005505 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
5506$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005507 if test "${ac_cv_olimit_ok+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00005508 $as_echo_n "(cached) " >&6
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00005509else
5510 ac_save_cc="$CC"
5511 CC="$CC -Olimit 1500"
5512 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +00005513 ac_cv_olimit_ok=no
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00005514else
Martin v. Löwis11437992002-04-12 09:54:03 +00005515 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005516/* confdefs.h. */
5517_ACEOF
5518cat confdefs.h >>conftest.$ac_ext
5519cat >>conftest.$ac_ext <<_ACEOF
5520/* end confdefs.h. */
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00005521int main() { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005522_ACEOF
5523rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005524if { (ac_try="$ac_link"
5525case "(($ac_try" in
5526 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5527 *) ac_try_echo=$ac_try;;
5528esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005529eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5530$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005531 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005532 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005533 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005534 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005535 { (case "(($ac_try" in
5536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5537 *) ac_try_echo=$ac_try;;
5538esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005539eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5540$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005541 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005542 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005543 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005544 (exit $ac_status); }; }; then
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00005545 ac_cv_olimit_ok=yes
5546else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005547 $as_echo "$as_me: program exited with status $ac_status" >&5
5548$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005549sed 's/^/| /' conftest.$ac_ext >&5
5550
Martin v. Löwis11437992002-04-12 09:54:03 +00005551( exit $ac_status )
5552ac_cv_olimit_ok=no
Guido van Rossum201afe51997-05-14 21:14:44 +00005553fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00005554rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00005555rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00005556fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005557
5558
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00005559 CC="$ac_save_cc"
5560fi
5561
Benjamin Peterson697cd212010-05-02 16:45:11 +00005562 { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5563$as_echo "$ac_cv_olimit_ok" >&6; }
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00005564 if test $ac_cv_olimit_ok = yes; then
Skip Montanarodecc6a42003-01-01 20:07:49 +00005565 BASECFLAGS="$BASECFLAGS -Olimit 1500"
Guido van Rossum6b3d77e1998-07-07 21:11:02 +00005566 fi
5567fi
5568
Martin v. Löwisaac13162006-10-19 10:58:46 +00005569# Check whether GCC supports PyArg_ParseTuple format
5570if test "$GCC" = "yes"
5571then
Benjamin Peterson697cd212010-05-02 16:45:11 +00005572 { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5573$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00005574 save_CFLAGS=$CFLAGS
5575 CFLAGS="$CFLAGS -Werror"
5576 cat >conftest.$ac_ext <<_ACEOF
5577/* confdefs.h. */
5578_ACEOF
5579cat confdefs.h >>conftest.$ac_ext
5580cat >>conftest.$ac_ext <<_ACEOF
5581/* end confdefs.h. */
5582
5583 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5584
5585int
5586main ()
5587{
5588
5589 ;
5590 return 0;
5591}
5592_ACEOF
5593rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005594if { (ac_try="$ac_compile"
5595case "(($ac_try" in
5596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5597 *) ac_try_echo=$ac_try;;
5598esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005599eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5600$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005601 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaac13162006-10-19 10:58:46 +00005602 ac_status=$?
5603 grep -v '^ *+' conftest.er1 >conftest.err
5604 rm -f conftest.er1
5605 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00005606 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005607 (exit $ac_status); } && {
5608 test -z "$ac_c_werror_flag" ||
5609 test ! -s conftest.err
5610 } && test -s conftest.$ac_objext; then
Martin v. Löwisaac13162006-10-19 10:58:46 +00005611
5612cat >>confdefs.h <<\_ACEOF
5613#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5614_ACEOF
5615
Benjamin Peterson697cd212010-05-02 16:45:11 +00005616 { $as_echo "$as_me:$LINENO: result: yes" >&5
5617$as_echo "yes" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00005618else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005619 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisaac13162006-10-19 10:58:46 +00005620sed 's/^/| /' conftest.$ac_ext >&5
5621
Benjamin Peterson697cd212010-05-02 16:45:11 +00005622 { $as_echo "$as_me:$LINENO: result: no" >&5
5623$as_echo "no" >&6; }
Martin v. Löwisaac13162006-10-19 10:58:46 +00005624
5625fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005626
5627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc1d75972006-10-19 16:01:37 +00005628 CFLAGS=$save_CFLAGS
Martin v. Löwisaac13162006-10-19 10:58:46 +00005629fi
5630
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005631# On some compilers, pthreads are available without further options
5632# (e.g. MacOS X). On some of these systems, the compiler will not
5633# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5634# So we have to see first whether pthreads are available without
5635# options before we can check whether -Kpthread improves anything.
Benjamin Peterson697cd212010-05-02 16:45:11 +00005636{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5637$as_echo_n "checking whether pthreads are available without options... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005638if test "${ac_cv_pthread_is_default+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00005639 $as_echo_n "(cached) " >&6
Martin v. Löwis130fb172001-07-19 11:00:41 +00005640else
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005641 if test "$cross_compiling" = yes; then
5642 ac_cv_pthread_is_default=no
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005643else
Martin v. Löwis11437992002-04-12 09:54:03 +00005644 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005645/* confdefs.h. */
5646_ACEOF
5647cat confdefs.h >>conftest.$ac_ext
5648cat >>conftest.$ac_ext <<_ACEOF
5649/* end confdefs.h. */
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005650
Martin v. Löwis130fb172001-07-19 11:00:41 +00005651#include <pthread.h>
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005652
5653void* routine(void* p){return NULL;}
5654
5655int main(){
5656 pthread_t p;
5657 if(pthread_create(&p,NULL,routine,NULL)!=0)
5658 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005659 (void)pthread_detach(p);
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005660 return 0;
5661}
5662
Martin v. Löwis11437992002-04-12 09:54:03 +00005663_ACEOF
5664rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005665if { (ac_try="$ac_link"
5666case "(($ac_try" in
5667 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5668 *) ac_try_echo=$ac_try;;
5669esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005670eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5671$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005672 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005673 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005674 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005675 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005676 { (case "(($ac_try" in
5677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5678 *) ac_try_echo=$ac_try;;
5679esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005680eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5681$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005682 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005683 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005684 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005685 (exit $ac_status); }; }; then
Skip Montanarod8d39a02003-07-10 20:44:10 +00005686
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005687 ac_cv_pthread_is_default=yes
Skip Montanarod8d39a02003-07-10 20:44:10 +00005688 ac_cv_kthread=no
5689 ac_cv_pthread=no
5690
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005691else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005692 $as_echo "$as_me: program exited with status $ac_status" >&5
5693$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005694sed 's/^/| /' conftest.$ac_ext >&5
5695
Martin v. Löwis11437992002-04-12 09:54:03 +00005696( exit $ac_status )
5697ac_cv_pthread_is_default=no
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005698fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00005699rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00005700rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005701fi
5702
Martin v. Löwiseba40652007-08-30 20:10:57 +00005703
5704
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005705fi
5706
Benjamin Peterson697cd212010-05-02 16:45:11 +00005707{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5708$as_echo "$ac_cv_pthread_is_default" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005709
Michael W. Hudson54241132001-12-07 15:38:26 +00005710
Martin v. Löwis11437992002-04-12 09:54:03 +00005711if test $ac_cv_pthread_is_default = yes
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005712then
5713 ac_cv_kpthread=no
5714else
5715# -Kpthread, if available, provides the right #defines
5716# and linker options to make pthread_create available
5717# Some compilers won't report that they do not support -Kpthread,
5718# so we need to run a program to see whether it really made the
5719# function available.
Benjamin Peterson697cd212010-05-02 16:45:11 +00005720{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5721$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005722if test "${ac_cv_kpthread+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00005723 $as_echo_n "(cached) " >&6
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005724else
5725 ac_save_cc="$CC"
5726CC="$CC -Kpthread"
5727if test "$cross_compiling" = yes; then
5728 ac_cv_kpthread=no
5729else
Martin v. Löwis11437992002-04-12 09:54:03 +00005730 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005731/* confdefs.h. */
5732_ACEOF
5733cat confdefs.h >>conftest.$ac_ext
5734cat >>conftest.$ac_ext <<_ACEOF
5735/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005736
5737#include <pthread.h>
5738
5739void* routine(void* p){return NULL;}
5740
5741int main(){
5742 pthread_t p;
5743 if(pthread_create(&p,NULL,routine,NULL)!=0)
5744 return 1;
Jack Jansen4f8d0542002-03-08 13:43:01 +00005745 (void)pthread_detach(p);
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005746 return 0;
5747}
5748
Martin v. Löwis11437992002-04-12 09:54:03 +00005749_ACEOF
5750rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005751if { (ac_try="$ac_link"
5752case "(($ac_try" in
5753 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5754 *) ac_try_echo=$ac_try;;
5755esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005756eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5757$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005758 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005759 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005760 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005762 { (case "(($ac_try" in
5763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5764 *) ac_try_echo=$ac_try;;
5765esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005766eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5767$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005768 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005769 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005770 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00005771 (exit $ac_status); }; }; then
Martin v. Löwis130fb172001-07-19 11:00:41 +00005772 ac_cv_kpthread=yes
5773else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005774 $as_echo "$as_me: program exited with status $ac_status" >&5
5775$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005776sed 's/^/| /' conftest.$ac_ext >&5
5777
Martin v. Löwis11437992002-04-12 09:54:03 +00005778( exit $ac_status )
5779ac_cv_kpthread=no
Martin v. Löwis130fb172001-07-19 11:00:41 +00005780fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00005781rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00005782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis260aecc2001-10-07 08:14:41 +00005783fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005784
5785
Martin v. Löwis130fb172001-07-19 11:00:41 +00005786CC="$ac_save_cc"
5787fi
5788
Benjamin Peterson697cd212010-05-02 16:45:11 +00005789{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5790$as_echo "$ac_cv_kpthread" >&6; }
Martin v. Löwisa5f73f92001-10-15 08:06:29 +00005791fi
Martin v. Löwis130fb172001-07-19 11:00:41 +00005792
Skip Montanarod8d39a02003-07-10 20:44:10 +00005793if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005794then
5795# -Kthread, if available, provides the right #defines
5796# and linker options to make pthread_create available
5797# Some compilers won't report that they do not support -Kthread,
5798# so we need to run a program to see whether it really made the
5799# function available.
Benjamin Peterson697cd212010-05-02 16:45:11 +00005800{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5801$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005802if test "${ac_cv_kthread+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00005803 $as_echo_n "(cached) " >&6
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005804else
5805 ac_save_cc="$CC"
5806CC="$CC -Kthread"
5807if test "$cross_compiling" = yes; then
5808 ac_cv_kthread=no
5809else
5810 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005811/* confdefs.h. */
5812_ACEOF
5813cat confdefs.h >>conftest.$ac_ext
5814cat >>conftest.$ac_ext <<_ACEOF
5815/* end confdefs.h. */
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005816
5817#include <pthread.h>
5818
5819void* routine(void* p){return NULL;}
5820
5821int main(){
5822 pthread_t p;
5823 if(pthread_create(&p,NULL,routine,NULL)!=0)
5824 return 1;
5825 (void)pthread_detach(p);
5826 return 0;
5827}
5828
5829_ACEOF
5830rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005831if { (ac_try="$ac_link"
5832case "(($ac_try" in
5833 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5834 *) ac_try_echo=$ac_try;;
5835esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005836eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5837$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005838 (eval "$ac_link") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005839 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005840 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005841 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005842 { (case "(($ac_try" in
5843 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5844 *) ac_try_echo=$ac_try;;
5845esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005846eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5847$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005848 (eval "$ac_try") 2>&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005849 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005850 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005851 (exit $ac_status); }; }; then
5852 ac_cv_kthread=yes
5853else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005854 $as_echo "$as_me: program exited with status $ac_status" >&5
5855$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005856sed 's/^/| /' conftest.$ac_ext >&5
5857
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005858( exit $ac_status )
5859ac_cv_kthread=no
5860fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00005861rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00005862rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005863fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005864
5865
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005866CC="$ac_save_cc"
5867fi
5868
Benjamin Peterson697cd212010-05-02 16:45:11 +00005869{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5870$as_echo "$ac_cv_kthread" >&6; }
Martin v. Löwis5f433f02003-05-05 05:05:30 +00005871fi
5872
Skip Montanarod8d39a02003-07-10 20:44:10 +00005873if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005874then
5875# -pthread, if available, provides the right #defines
5876# and linker options to make pthread_create available
5877# Some compilers won't report that they do not support -pthread,
5878# so we need to run a program to see whether it really made the
5879# function available.
Benjamin Peterson697cd212010-05-02 16:45:11 +00005880{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5881$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005882if test "${ac_cv_thread+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00005883 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005884else
5885 ac_save_cc="$CC"
5886CC="$CC -pthread"
5887if test "$cross_compiling" = yes; then
5888 ac_cv_pthread=no
5889else
5890 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00005891/* confdefs.h. */
5892_ACEOF
5893cat confdefs.h >>conftest.$ac_ext
5894cat >>conftest.$ac_ext <<_ACEOF
5895/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005896
5897#include <pthread.h>
5898
5899void* routine(void* p){return NULL;}
5900
5901int main(){
5902 pthread_t p;
5903 if(pthread_create(&p,NULL,routine,NULL)!=0)
5904 return 1;
5905 (void)pthread_detach(p);
5906 return 0;
5907}
5908
5909_ACEOF
5910rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00005911if { (ac_try="$ac_link"
5912case "(($ac_try" in
5913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5914 *) ac_try_echo=$ac_try;;
5915esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005916eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5917$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005918 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005919 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005920 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005921 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00005922 { (case "(($ac_try" in
5923 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5924 *) ac_try_echo=$ac_try;;
5925esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00005926eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5927$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00005928 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005929 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00005930 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005931 (exit $ac_status); }; }; then
5932 ac_cv_pthread=yes
5933else
Benjamin Peterson697cd212010-05-02 16:45:11 +00005934 $as_echo "$as_me: program exited with status $ac_status" >&5
5935$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00005936sed 's/^/| /' conftest.$ac_ext >&5
5937
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005938( exit $ac_status )
5939ac_cv_pthread=no
5940fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00005941rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00005942rm -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 +00005943fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00005944
5945
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005946CC="$ac_save_cc"
5947fi
5948
Benjamin Peterson697cd212010-05-02 16:45:11 +00005949{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5950$as_echo "$ac_cv_pthread" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +00005951fi
5952
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005953# If we have set a CC compiler flag for thread support then
5954# check if it works for CXX, too.
5955ac_cv_cxx_thread=no
5956if test ! -z "$CXX"
5957then
Benjamin Peterson697cd212010-05-02 16:45:11 +00005958{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5959$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005960ac_save_cxx="$CXX"
5961
5962if test "$ac_cv_kpthread" = "yes"
5963then
5964 CXX="$CXX -Kpthread"
5965 ac_cv_cxx_thread=yes
5966elif test "$ac_cv_kthread" = "yes"
5967then
5968 CXX="$CXX -Kthread"
5969 ac_cv_cxx_thread=yes
5970elif test "$ac_cv_pthread" = "yes"
5971then
5972 CXX="$CXX -pthread"
5973 ac_cv_cxx_thread=yes
5974fi
5975
5976if test $ac_cv_cxx_thread = yes
5977then
5978 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5979 $CXX -c conftest.$ac_ext 2>&5
5980 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5981 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5982 then
5983 ac_cv_cxx_thread=yes
5984 else
5985 ac_cv_cxx_thread=no
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005986 fi
5987 rm -fr conftest*
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005988fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00005989{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5990$as_echo "$ac_cv_cxx_thread" >&6; }
Brett Cannonc601e0f2004-11-07 01:24:12 +00005991fi
5992CXX="$ac_save_cxx"
Martin v. Löwisab1e5852003-06-28 07:46:38 +00005993
Michael W. Hudson54241132001-12-07 15:38:26 +00005994
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00005995# checks for header files
Benjamin Peterson697cd212010-05-02 16:45:11 +00005996{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5997$as_echo_n "checking for ANSI C header files... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00005998if test "${ac_cv_header_stdc+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00005999 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006000else
Martin v. Löwis11437992002-04-12 09:54:03 +00006001 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006002/* confdefs.h. */
6003_ACEOF
6004cat confdefs.h >>conftest.$ac_ext
6005cat >>conftest.$ac_ext <<_ACEOF
6006/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006007#include <stdlib.h>
6008#include <stdarg.h>
6009#include <string.h>
6010#include <float.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006011
Skip Montanaro6dead952003-09-25 14:50:04 +00006012int
6013main ()
6014{
6015
6016 ;
6017 return 0;
6018}
Martin v. Löwis11437992002-04-12 09:54:03 +00006019_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006020rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006021if { (ac_try="$ac_compile"
6022case "(($ac_try" in
6023 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6024 *) ac_try_echo=$ac_try;;
6025esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006026eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6027$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006028 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006029 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006030 grep -v '^ *+' conftest.er1 >conftest.err
6031 rm -f conftest.er1
6032 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00006033 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006034 (exit $ac_status); } && {
6035 test -z "$ac_c_werror_flag" ||
6036 test ! -s conftest.err
6037 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006038 ac_cv_header_stdc=yes
6039else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006040 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006041sed 's/^/| /' conftest.$ac_ext >&5
6042
Martin v. Löwiseba40652007-08-30 20:10:57 +00006043 ac_cv_header_stdc=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006044fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006045
6046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006047
6048if test $ac_cv_header_stdc = yes; then
6049 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00006050 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006051/* confdefs.h. */
6052_ACEOF
6053cat confdefs.h >>conftest.$ac_ext
6054cat >>conftest.$ac_ext <<_ACEOF
6055/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006056#include <string.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006057
6058_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006059if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006060 $EGREP "memchr" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006061 :
6062else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006063 ac_cv_header_stdc=no
6064fi
Jesus Cead54cdf02010-04-28 11:11:36 +00006065rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006066
6067fi
6068
6069if test $ac_cv_header_stdc = yes; then
6070 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Martin v. Löwis11437992002-04-12 09:54:03 +00006071 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006072/* confdefs.h. */
6073_ACEOF
6074cat confdefs.h >>conftest.$ac_ext
6075cat >>conftest.$ac_ext <<_ACEOF
6076/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006077#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006078
6079_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006080if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00006081 $EGREP "free" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006082 :
6083else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006084 ac_cv_header_stdc=no
6085fi
Jesus Cead54cdf02010-04-28 11:11:36 +00006086rm -f conftest*
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006087
6088fi
6089
6090if test $ac_cv_header_stdc = yes; then
6091 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Martin v. Löwis11437992002-04-12 09:54:03 +00006092 if test "$cross_compiling" = yes; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00006093 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006094else
Martin v. Löwis11437992002-04-12 09:54:03 +00006095 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006096/* confdefs.h. */
6097_ACEOF
6098cat confdefs.h >>conftest.$ac_ext
6099cat >>conftest.$ac_ext <<_ACEOF
6100/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00006101#include <ctype.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +00006102#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00006103#if ((' ' & 0x0FF) == 0x020)
6104# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6105# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6106#else
Skip Montanaro6dead952003-09-25 14:50:04 +00006107# define ISLOWER(c) \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006108 (('a' <= (c) && (c) <= 'i') \
6109 || ('j' <= (c) && (c) <= 'r') \
6110 || ('s' <= (c) && (c) <= 'z'))
Martin v. Löwis11437992002-04-12 09:54:03 +00006111# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6112#endif
Michael W. Hudson54241132001-12-07 15:38:26 +00006113
Martin v. Löwis11437992002-04-12 09:54:03 +00006114#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6115int
6116main ()
6117{
6118 int i;
6119 for (i = 0; i < 256; i++)
6120 if (XOR (islower (i), ISLOWER (i))
Skip Montanarof0d5f792004-08-15 14:08:23 +00006121 || toupper (i) != TOUPPER (i))
Martin v. Löwiseba40652007-08-30 20:10:57 +00006122 return 2;
6123 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00006124}
6125_ACEOF
6126rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006127if { (ac_try="$ac_link"
6128case "(($ac_try" in
6129 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6130 *) ac_try_echo=$ac_try;;
6131esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006132eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6133$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006134 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006135 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00006136 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006137 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00006138 { (case "(($ac_try" in
6139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6140 *) ac_try_echo=$ac_try;;
6141esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006142eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6143$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006144 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006145 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00006146 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00006147 (exit $ac_status); }; }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006148 :
6149else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006150 $as_echo "$as_me: program exited with status $ac_status" >&5
6151$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006152sed 's/^/| /' conftest.$ac_ext >&5
6153
Martin v. Löwis11437992002-04-12 09:54:03 +00006154( exit $ac_status )
6155ac_cv_header_stdc=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00006156fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006157rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00006158rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6159fi
6160
6161
Michael W. Hudson54241132001-12-07 15:38:26 +00006162fi
6163fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006164{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6165$as_echo "$ac_cv_header_stdc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00006166if test $ac_cv_header_stdc = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006167
6168cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006169#define STDC_HEADERS 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006170_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00006171
6172fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006173
Martin v. Löwis11437992002-04-12 09:54:03 +00006174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
Anthony Baxter8a560de2004-10-13 15:30:56 +00006210
Martin v. Löwisc3001752005-01-23 09:27:24 +00006211
Martin v. Löwis11017b12006-01-14 18:12:57 +00006212
Martin v. Löwis5f5d99c2006-05-16 07:05:37 +00006213
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006214
6215
6216
6217
6218
6219
6220
6221
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006222
Christian Heimesfb2d25a2008-01-07 16:12:44 +00006223
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006224
6225
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006226
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006227
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006228for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6229fcntl.h grp.h \
Neal Norwitz9fdfaaf2008-03-28 05:34:59 +00006230ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Martin v. Löwis40e9aed2006-10-02 15:20:37 +00006231shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006232unistd.h utime.h \
Christian Heimes0e9ab5f2008-03-21 23:49:44 +00006233sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6234sys/lock.h sys/mkdev.h sys/modem.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006235sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Martin v. Löwis8c255e42008-05-23 15:06:50 +00006236sys/termio.h sys/time.h \
Martin v. Löwis0e8bd7e2006-06-10 12:23:46 +00006237sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Martin v. Löwis0347a9a2006-10-27 07:06:52 +00006238sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimesfb2d25a2008-01-07 16:12:44 +00006239bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006240do
Benjamin Peterson697cd212010-05-02 16:45:11 +00006241as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
Martin v. Löwiseba40652007-08-30 20:10:57 +00006242if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006243 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6244$as_echo_n "checking for $ac_header... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006245if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006246 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006247fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006248ac_res=`eval 'as_val=${'$as_ac_Header'}
6249 $as_echo "$as_val"'`
6250 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6251$as_echo "$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006252else
Martin v. Löwis11437992002-04-12 09:54:03 +00006253 # Is the header compilable?
Benjamin Peterson697cd212010-05-02 16:45:11 +00006254{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6255$as_echo_n "checking $ac_header usability... " >&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$ac_includes_default
6263#include <$ac_header>
6264_ACEOF
6265rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006266if { (ac_try="$ac_compile"
6267case "(($ac_try" in
6268 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6269 *) ac_try_echo=$ac_try;;
6270esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006271eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6272$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006273 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006274 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006275 grep -v '^ *+' conftest.er1 >conftest.err
6276 rm -f conftest.er1
6277 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00006278 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006279 (exit $ac_status); } && {
6280 test -z "$ac_c_werror_flag" ||
6281 test ! -s conftest.err
6282 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006283 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00006284else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006285 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006286sed 's/^/| /' conftest.$ac_ext >&5
6287
Martin v. Löwiseba40652007-08-30 20:10:57 +00006288 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006290
6291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +00006292{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6293$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006294
6295# Is the header present?
Benjamin Peterson697cd212010-05-02 16:45:11 +00006296{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6297$as_echo_n "checking $ac_header presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006298cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006299/* confdefs.h. */
6300_ACEOF
6301cat confdefs.h >>conftest.$ac_ext
6302cat >>conftest.$ac_ext <<_ACEOF
6303/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006304#include <$ac_header>
6305_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006306if { (ac_try="$ac_cpp conftest.$ac_ext"
6307case "(($ac_try" in
6308 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6309 *) ac_try_echo=$ac_try;;
6310esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006311eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6312$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006313 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006314 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006315 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00006316 rm -f conftest.er1
6317 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00006318 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006319 (exit $ac_status); } >/dev/null && {
6320 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6321 test ! -s conftest.err
6322 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006323 ac_header_preproc=yes
6324else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006325 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006326sed 's/^/| /' conftest.$ac_ext >&5
6327
Martin v. Löwis11437992002-04-12 09:54:03 +00006328 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006329fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006330
Martin v. Löwis11437992002-04-12 09:54:03 +00006331rm -f conftest.err conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +00006332{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6333$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006334
6335# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006336case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6337 yes:no: )
Benjamin Peterson697cd212010-05-02 16:45:11 +00006338 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6339$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6340 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6341$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006342 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006343 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006344 no:yes:* )
Benjamin Peterson697cd212010-05-02 16:45:11 +00006345 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6346$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6347 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6348$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6349 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6350$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6351 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6352$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6353 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6354$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6355 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6356$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006357 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006358## ------------------------------------------------ ##
6359## Report this to http://www.python.org/python-bugs ##
6360## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006361_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006362 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006363 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00006364esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006365{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6366$as_echo_n "checking for $ac_header... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006367if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006368 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006369else
Skip Montanarof0d5f792004-08-15 14:08:23 +00006370 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006371fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006372ac_res=`eval 'as_val=${'$as_ac_Header'}
6373 $as_echo "$as_val"'`
6374 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6375$as_echo "$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006376
6377fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006378as_val=`eval 'as_val=${'$as_ac_Header'}
6379 $as_echo "$as_val"'`
6380 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006381 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +00006382#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006383_ACEOF
6384
6385fi
6386
Guido van Rossum627b2d71993-12-24 10:39:16 +00006387done
6388
Martin v. Löwis11437992002-04-12 09:54:03 +00006389
6390
6391
6392
6393
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006394ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006395for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Benjamin Peterson697cd212010-05-02 16:45:11 +00006396 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6397{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
6398$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006399if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006400 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006401else
Martin v. Löwis11437992002-04-12 09:54:03 +00006402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006403/* confdefs.h. */
6404_ACEOF
6405cat confdefs.h >>conftest.$ac_ext
6406cat >>conftest.$ac_ext <<_ACEOF
6407/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006408#include <sys/types.h>
6409#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006410
Martin v. Löwis11437992002-04-12 09:54:03 +00006411int
6412main ()
6413{
6414if ((DIR *) 0)
6415return 0;
6416 ;
6417 return 0;
6418}
6419_ACEOF
6420rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006421if { (ac_try="$ac_compile"
6422case "(($ac_try" in
6423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6424 *) ac_try_echo=$ac_try;;
6425esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006426eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6427$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006430 grep -v '^ *+' conftest.er1 >conftest.err
6431 rm -f conftest.er1
6432 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00006433 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006434 (exit $ac_status); } && {
6435 test -z "$ac_c_werror_flag" ||
6436 test ! -s conftest.err
6437 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006438 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006439else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006440 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006441sed 's/^/| /' conftest.$ac_ext >&5
6442
Martin v. Löwiseba40652007-08-30 20:10:57 +00006443 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006445
6446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006447fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006448ac_res=`eval 'as_val=${'$as_ac_Header'}
6449 $as_echo "$as_val"'`
6450 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6451$as_echo "$ac_res" >&6; }
6452as_val=`eval 'as_val=${'$as_ac_Header'}
6453 $as_echo "$as_val"'`
6454 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006455 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +00006456#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006457_ACEOF
6458
6459ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006460fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006461
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006462done
6463# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6464if test $ac_header_dirent = dirent.h; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006465 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6466$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006467if test "${ac_cv_search_opendir+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006468 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006469else
Martin v. Löwis11437992002-04-12 09:54:03 +00006470 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006471cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006472/* confdefs.h. */
6473_ACEOF
6474cat confdefs.h >>conftest.$ac_ext
6475cat >>conftest.$ac_ext <<_ACEOF
6476/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006477
Martin v. Löwiseba40652007-08-30 20:10:57 +00006478/* Override any GCC internal prototype to avoid an error.
6479 Use char because int might match the return type of a GCC
6480 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006481#ifdef __cplusplus
6482extern "C"
6483#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006484char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006485int
6486main ()
6487{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006488return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006489 ;
6490 return 0;
6491}
6492_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006493for ac_lib in '' dir; do
6494 if test -z "$ac_lib"; then
6495 ac_res="none required"
6496 else
6497 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006498 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006499 fi
6500 rm -f conftest.$ac_objext conftest$ac_exeext
6501if { (ac_try="$ac_link"
6502case "(($ac_try" in
6503 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6504 *) ac_try_echo=$ac_try;;
6505esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006506eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6507$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006508 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006509 ac_status=$?
6510 grep -v '^ *+' conftest.er1 >conftest.err
6511 rm -f conftest.er1
6512 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00006513 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006514 (exit $ac_status); } && {
6515 test -z "$ac_c_werror_flag" ||
6516 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +00006517 } && test -s conftest$ac_exeext && {
6518 test "$cross_compiling" = yes ||
6519 $as_test_x conftest$ac_exeext
6520 }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006521 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006522else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006523 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006524sed 's/^/| /' conftest.$ac_ext >&5
6525
Martin v. Löwiseba40652007-08-30 20:10:57 +00006526
Brett Cannon19fab762007-06-02 03:02:29 +00006527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006528
Benjamin Peterson697cd212010-05-02 16:45:11 +00006529rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00006530rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6531 conftest$ac_exeext
6532 if test "${ac_cv_search_opendir+set}" = set; then
6533 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006534fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006535done
6536if test "${ac_cv_search_opendir+set}" = set; then
6537 :
6538else
6539 ac_cv_search_opendir=no
6540fi
6541rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006542LIBS=$ac_func_search_save_LIBS
6543fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006544{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6545$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006546ac_res=$ac_cv_search_opendir
6547if test "$ac_res" != no; then
6548 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006549
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006550fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006551
Michael W. Hudson54241132001-12-07 15:38:26 +00006552else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006553 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6554$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006555if test "${ac_cv_search_opendir+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006556 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006557else
6558 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006559cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006560/* confdefs.h. */
6561_ACEOF
6562cat confdefs.h >>conftest.$ac_ext
6563cat >>conftest.$ac_ext <<_ACEOF
6564/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006565
Martin v. Löwiseba40652007-08-30 20:10:57 +00006566/* Override any GCC internal prototype to avoid an error.
6567 Use char because int might match the return type of a GCC
6568 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006569#ifdef __cplusplus
6570extern "C"
6571#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006572char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006573int
6574main ()
6575{
Martin v. Löwiseba40652007-08-30 20:10:57 +00006576return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006577 ;
6578 return 0;
6579}
6580_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006581for ac_lib in '' x; do
6582 if test -z "$ac_lib"; then
6583 ac_res="none required"
6584 else
6585 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +00006586 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +00006587 fi
6588 rm -f conftest.$ac_objext conftest$ac_exeext
6589if { (ac_try="$ac_link"
6590case "(($ac_try" in
6591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6592 *) ac_try_echo=$ac_try;;
6593esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006594eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6595$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006596 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +00006597 ac_status=$?
6598 grep -v '^ *+' conftest.er1 >conftest.err
6599 rm -f conftest.er1
6600 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00006601 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006602 (exit $ac_status); } && {
6603 test -z "$ac_c_werror_flag" ||
6604 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +00006605 } && test -s conftest$ac_exeext && {
6606 test "$cross_compiling" = yes ||
6607 $as_test_x conftest$ac_exeext
6608 }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +00006609 ac_cv_search_opendir=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +00006610else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006611 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +00006612sed 's/^/| /' conftest.$ac_ext >&5
6613
Martin v. Löwiseba40652007-08-30 20:10:57 +00006614
Brett Cannon19fab762007-06-02 03:02:29 +00006615fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006616
Benjamin Peterson697cd212010-05-02 16:45:11 +00006617rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00006618rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6619 conftest$ac_exeext
6620 if test "${ac_cv_search_opendir+set}" = set; then
6621 break
Skip Montanaro89e975f2007-08-22 19:05:21 +00006622fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006623done
6624if test "${ac_cv_search_opendir+set}" = set; then
6625 :
6626else
6627 ac_cv_search_opendir=no
6628fi
6629rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006630LIBS=$ac_func_search_save_LIBS
6631fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006632{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6633$as_echo "$ac_cv_search_opendir" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006634ac_res=$ac_cv_search_opendir
6635if test "$ac_res" != no; then
6636 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006637
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006638fi
6639
6640fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006641
Benjamin Peterson697cd212010-05-02 16:45:11 +00006642{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6643$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006644if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006645 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006646else
6647 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006648/* confdefs.h. */
6649_ACEOF
6650cat confdefs.h >>conftest.$ac_ext
6651cat >>conftest.$ac_ext <<_ACEOF
6652/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006653#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006654int
6655main ()
6656{
6657return makedev(0, 0);
6658 ;
6659 return 0;
6660}
6661_ACEOF
6662rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006663if { (ac_try="$ac_link"
6664case "(($ac_try" in
6665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6666 *) ac_try_echo=$ac_try;;
6667esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006668eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6669$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006670 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006671 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006672 grep -v '^ *+' conftest.er1 >conftest.err
6673 rm -f conftest.er1
6674 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00006675 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006676 (exit $ac_status); } && {
6677 test -z "$ac_c_werror_flag" ||
6678 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +00006679 } && test -s conftest$ac_exeext && {
6680 test "$cross_compiling" = yes ||
6681 $as_test_x conftest$ac_exeext
6682 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006683 ac_cv_header_sys_types_h_makedev=yes
6684else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006685 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006686sed 's/^/| /' conftest.$ac_ext >&5
6687
Martin v. Löwiseba40652007-08-30 20:10:57 +00006688 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006689fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006690
Benjamin Peterson697cd212010-05-02 16:45:11 +00006691rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00006692rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006693 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006694
6695fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006696{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6697$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006698
6699if test $ac_cv_header_sys_types_h_makedev = no; then
6700if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006701 { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6702$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006703if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006704 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006705fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006706{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6707$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006708else
6709 # Is the header compilable?
Benjamin Peterson697cd212010-05-02 16:45:11 +00006710{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6711$as_echo_n "checking sys/mkdev.h usability... " >&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$ac_includes_default
6719#include <sys/mkdev.h>
6720_ACEOF
6721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006722if { (ac_try="$ac_compile"
6723case "(($ac_try" in
6724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6725 *) ac_try_echo=$ac_try;;
6726esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006727eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6728$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006730 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006731 grep -v '^ *+' conftest.er1 >conftest.err
6732 rm -f conftest.er1
6733 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00006734 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006735 (exit $ac_status); } && {
6736 test -z "$ac_c_werror_flag" ||
6737 test ! -s conftest.err
6738 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006739 ac_header_compiler=yes
6740else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006741 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006742sed 's/^/| /' conftest.$ac_ext >&5
6743
Martin v. Löwiseba40652007-08-30 20:10:57 +00006744 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006746
6747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +00006748{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6749$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006750
6751# Is the header present?
Benjamin Peterson697cd212010-05-02 16:45:11 +00006752{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6753$as_echo_n "checking sys/mkdev.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006754cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006755/* confdefs.h. */
6756_ACEOF
6757cat confdefs.h >>conftest.$ac_ext
6758cat >>conftest.$ac_ext <<_ACEOF
6759/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006760#include <sys/mkdev.h>
6761_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006762if { (ac_try="$ac_cpp conftest.$ac_ext"
6763case "(($ac_try" in
6764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6765 *) ac_try_echo=$ac_try;;
6766esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006767eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6768$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006769 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006770 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006771 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006772 rm -f conftest.er1
6773 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00006774 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006775 (exit $ac_status); } >/dev/null && {
6776 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6777 test ! -s conftest.err
6778 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006779 ac_header_preproc=yes
6780else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006781 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006782sed 's/^/| /' conftest.$ac_ext >&5
6783
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006784 ac_header_preproc=no
6785fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006786
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006787rm -f conftest.err conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +00006788{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6789$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006790
6791# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006792case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6793 yes:no: )
Benjamin Peterson697cd212010-05-02 16:45:11 +00006794 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6795$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6796 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6797$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006798 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006799 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006800 no:yes:* )
Benjamin Peterson697cd212010-05-02 16:45:11 +00006801 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6802$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6803 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6804$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6805 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6806$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6807 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6808$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6809 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6810$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6811 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6812$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006813 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006814## ------------------------------------------------ ##
6815## Report this to http://www.python.org/python-bugs ##
6816## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006817_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006818 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006819 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006820esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006821{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6822$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006823if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006824 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006825else
6826 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6827fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006828{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6829$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006830
6831fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006832if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006833
6834cat >>confdefs.h <<\_ACEOF
6835#define MAJOR_IN_MKDEV 1
6836_ACEOF
6837
6838fi
6839
6840
6841
6842 if test $ac_cv_header_sys_mkdev_h = no; then
6843 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006844 { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6845$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006846if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006847 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006848fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006849{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6850$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006851else
6852 # Is the header compilable?
Benjamin Peterson697cd212010-05-02 16:45:11 +00006853{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6854$as_echo_n "checking sys/sysmacros.h usability... " >&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$ac_includes_default
6862#include <sys/sysmacros.h>
6863_ACEOF
6864rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00006865if { (ac_try="$ac_compile"
6866case "(($ac_try" in
6867 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6868 *) ac_try_echo=$ac_try;;
6869esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006870eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6871$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006872 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006873 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006874 grep -v '^ *+' conftest.er1 >conftest.err
6875 rm -f conftest.er1
6876 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00006877 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006878 (exit $ac_status); } && {
6879 test -z "$ac_c_werror_flag" ||
6880 test ! -s conftest.err
6881 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006882 ac_header_compiler=yes
6883else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006884 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006885sed 's/^/| /' conftest.$ac_ext >&5
6886
Martin v. Löwiseba40652007-08-30 20:10:57 +00006887 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006888fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006889
6890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +00006891{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6892$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006893
6894# Is the header present?
Benjamin Peterson697cd212010-05-02 16:45:11 +00006895{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6896$as_echo_n "checking sys/sysmacros.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006897cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006898/* confdefs.h. */
6899_ACEOF
6900cat confdefs.h >>conftest.$ac_ext
6901cat >>conftest.$ac_ext <<_ACEOF
6902/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006903#include <sys/sysmacros.h>
6904_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00006905if { (ac_try="$ac_cpp conftest.$ac_ext"
6906case "(($ac_try" in
6907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6908 *) ac_try_echo=$ac_try;;
6909esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006910eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6911$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006912 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006913 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006914 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006915 rm -f conftest.er1
6916 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00006917 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00006918 (exit $ac_status); } >/dev/null && {
6919 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6920 test ! -s conftest.err
6921 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006922 ac_header_preproc=yes
6923else
Benjamin Peterson697cd212010-05-02 16:45:11 +00006924 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006925sed 's/^/| /' conftest.$ac_ext >&5
6926
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006927 ac_header_preproc=no
6928fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00006929
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006930rm -f conftest.err conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +00006931{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6932$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006933
6934# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006935case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6936 yes:no: )
Benjamin Peterson697cd212010-05-02 16:45:11 +00006937 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6938$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6939 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6940$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006941 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006942 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006943 no:yes:* )
Benjamin Peterson697cd212010-05-02 16:45:11 +00006944 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6945$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6946 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6947$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6948 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6949$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6950 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6951$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6952 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6953$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6954 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6955$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +00006956 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +00006957## ------------------------------------------------ ##
6958## Report this to http://www.python.org/python-bugs ##
6959## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006960_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +00006961 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006962 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006963esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00006964{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6965$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006966if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006967 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006968else
6969 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6970fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006971{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6972$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006973
6974fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00006975if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006976
6977cat >>confdefs.h <<\_ACEOF
6978#define MAJOR_IN_SYSMACROS 1
6979_ACEOF
6980
6981fi
6982
6983
6984 fi
6985fi
6986
Michael W. Hudson54241132001-12-07 15:38:26 +00006987
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006988# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00006989
6990for ac_header in term.h
6991do
Benjamin Peterson697cd212010-05-02 16:45:11 +00006992as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6993{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6994$as_echo_n "checking for $ac_header... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00006995if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00006996 $as_echo_n "(cached) " >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006997else
6998 cat >conftest.$ac_ext <<_ACEOF
6999/* confdefs.h. */
7000_ACEOF
7001cat confdefs.h >>conftest.$ac_ext
7002cat >>conftest.$ac_ext <<_ACEOF
7003/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007004
Martin v. Löwis5d52e782004-09-18 10:07:03 +00007005#ifdef HAVE_CURSES_H
7006#include <curses.h>
7007#endif
7008
7009
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00007010#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007011_ACEOF
7012rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007013if { (ac_try="$ac_compile"
7014case "(($ac_try" in
7015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7016 *) ac_try_echo=$ac_try;;
7017esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00007018eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7019$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007020 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007021 ac_status=$?
7022 grep -v '^ *+' conftest.er1 >conftest.err
7023 rm -f conftest.er1
7024 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00007025 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007026 (exit $ac_status); } && {
7027 test -z "$ac_c_werror_flag" ||
7028 test ! -s conftest.err
7029 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00007030 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007031else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007032 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007033sed 's/^/| /' conftest.$ac_ext >&5
7034
Martin v. Löwiseba40652007-08-30 20:10:57 +00007035 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007036fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007037
7038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007039fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00007040ac_res=`eval 'as_val=${'$as_ac_Header'}
7041 $as_echo "$as_val"'`
7042 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7043$as_echo "$ac_res" >&6; }
7044as_val=`eval 'as_val=${'$as_ac_Header'}
7045 $as_echo "$as_val"'`
7046 if test "x$as_val" = x""yes; then
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00007047 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +00007048#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00007049_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007050
Martin v. Löwisfd1c69e2004-11-30 22:09:37 +00007051fi
7052
7053done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00007054
7055
Martin v. Löwis11017b12006-01-14 18:12:57 +00007056# On Linux, netlink.h requires asm/types.h
7057
7058for ac_header in linux/netlink.h
7059do
Benjamin Peterson697cd212010-05-02 16:45:11 +00007060as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7061{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
7062$as_echo_n "checking for $ac_header... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00007063if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007064 $as_echo_n "(cached) " >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00007065else
7066 cat >conftest.$ac_ext <<_ACEOF
7067/* confdefs.h. */
7068_ACEOF
7069cat confdefs.h >>conftest.$ac_ext
7070cat >>conftest.$ac_ext <<_ACEOF
7071/* end confdefs.h. */
7072
7073#ifdef HAVE_ASM_TYPES_H
7074#include <asm/types.h>
7075#endif
7076#ifdef HAVE_SYS_SOCKET_H
7077#include <sys/socket.h>
7078#endif
7079
7080
7081#include <$ac_header>
7082_ACEOF
7083rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007084if { (ac_try="$ac_compile"
7085case "(($ac_try" in
7086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7087 *) ac_try_echo=$ac_try;;
7088esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00007089eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7090$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007091 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007092 ac_status=$?
7093 grep -v '^ *+' conftest.er1 >conftest.err
7094 rm -f conftest.er1
7095 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00007096 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007097 (exit $ac_status); } && {
7098 test -z "$ac_c_werror_flag" ||
7099 test ! -s conftest.err
7100 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00007101 eval "$as_ac_Header=yes"
7102else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007103 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00007104sed 's/^/| /' conftest.$ac_ext >&5
7105
Martin v. Löwiseba40652007-08-30 20:10:57 +00007106 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00007107fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007108
7109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00007110fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00007111ac_res=`eval 'as_val=${'$as_ac_Header'}
7112 $as_echo "$as_val"'`
7113 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7114$as_echo "$ac_res" >&6; }
7115as_val=`eval 'as_val=${'$as_ac_Header'}
7116 $as_echo "$as_val"'`
7117 if test "x$as_val" = x""yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00007118 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +00007119#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007120_ACEOF
7121
7122fi
7123
7124done
7125
7126
Guido van Rossum627b2d71993-12-24 10:39:16 +00007127# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007128was_it_defined=no
Benjamin Peterson697cd212010-05-02 16:45:11 +00007129{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
7130$as_echo_n "checking for clock_t in time.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007131cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007132/* confdefs.h. */
7133_ACEOF
7134cat confdefs.h >>conftest.$ac_ext
7135cat >>conftest.$ac_ext <<_ACEOF
7136/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007137#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007138
7139_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007140if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007141 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00007142 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007143else
Martin v. Löwis11437992002-04-12 09:54:03 +00007144
7145
7146cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007147#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00007148_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007149
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007150
Guido van Rossum627b2d71993-12-24 10:39:16 +00007151fi
Jesus Cead54cdf02010-04-28 11:11:36 +00007152rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007153
Benjamin Peterson697cd212010-05-02 16:45:11 +00007154{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
7155$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007156
Neal Norwitz11690112002-07-30 01:08:28 +00007157# Check whether using makedev requires defining _OSF_SOURCE
Benjamin Peterson697cd212010-05-02 16:45:11 +00007158{ $as_echo "$as_me:$LINENO: checking for makedev" >&5
7159$as_echo_n "checking for makedev... " >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007160cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007161/* confdefs.h. */
7162_ACEOF
7163cat confdefs.h >>conftest.$ac_ext
7164cat >>conftest.$ac_ext <<_ACEOF
7165/* end confdefs.h. */
Jesus Cead54cdf02010-04-28 11:11:36 +00007166
7167#if defined(MAJOR_IN_MKDEV)
7168#include <sys/mkdev.h>
7169#elif defined(MAJOR_IN_SYSMACROS)
7170#include <sys/sysmacros.h>
7171#else
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007172#include <sys/types.h>
Jesus Cead54cdf02010-04-28 11:11:36 +00007173#endif
Neal Norwitz11690112002-07-30 01:08:28 +00007174int
7175main ()
7176{
7177 makedev(0, 0)
7178 ;
7179 return 0;
7180}
7181_ACEOF
7182rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007183if { (ac_try="$ac_link"
7184case "(($ac_try" in
7185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7186 *) ac_try_echo=$ac_try;;
7187esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00007188eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7189$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007190 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007192 grep -v '^ *+' conftest.er1 >conftest.err
7193 rm -f conftest.er1
7194 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00007195 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007196 (exit $ac_status); } && {
7197 test -z "$ac_c_werror_flag" ||
7198 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +00007199 } && test -s conftest$ac_exeext && {
7200 test "$cross_compiling" = yes ||
7201 $as_test_x conftest$ac_exeext
7202 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007203 ac_cv_has_makedev=yes
7204else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007205 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007206sed 's/^/| /' conftest.$ac_ext >&5
7207
Martin v. Löwiseba40652007-08-30 20:10:57 +00007208 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007209fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007210
Benjamin Peterson697cd212010-05-02 16:45:11 +00007211rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00007212rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007213 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007214if test "$ac_cv_has_makedev" = "no"; then
7215 # we didn't link, try if _OSF_SOURCE will allow us to link
7216 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007217/* confdefs.h. */
7218_ACEOF
7219cat confdefs.h >>conftest.$ac_ext
7220cat >>conftest.$ac_ext <<_ACEOF
7221/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007222
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007223#define _OSF_SOURCE 1
7224#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007225
Neal Norwitz11690112002-07-30 01:08:28 +00007226int
7227main ()
7228{
7229 makedev(0, 0)
7230 ;
7231 return 0;
7232}
7233_ACEOF
7234rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007235if { (ac_try="$ac_link"
7236case "(($ac_try" in
7237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7238 *) ac_try_echo=$ac_try;;
7239esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00007240eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7241$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007242 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007243 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007244 grep -v '^ *+' conftest.er1 >conftest.err
7245 rm -f conftest.er1
7246 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00007247 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007248 (exit $ac_status); } && {
7249 test -z "$ac_c_werror_flag" ||
7250 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +00007251 } && test -s conftest$ac_exeext && {
7252 test "$cross_compiling" = yes ||
7253 $as_test_x conftest$ac_exeext
7254 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007255 ac_cv_has_makedev=yes
7256else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007257 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007258sed 's/^/| /' conftest.$ac_ext >&5
7259
Martin v. Löwiseba40652007-08-30 20:10:57 +00007260 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007261fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007262
Benjamin Peterson697cd212010-05-02 16:45:11 +00007263rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00007264rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007265 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007266 if test "$ac_cv_has_makedev" = "yes"; then
7267
7268cat >>confdefs.h <<\_ACEOF
7269#define _OSF_SOURCE 1
7270_ACEOF
7271
7272 fi
7273fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00007274{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
7275$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007276if test "$ac_cv_has_makedev" = "yes"; then
7277
7278cat >>confdefs.h <<\_ACEOF
7279#define HAVE_MAKEDEV 1
7280_ACEOF
7281
7282fi
7283
Martin v. Löwis399a6892002-10-04 10:22:02 +00007284# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7285# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7286# defined, but the compiler does not support pragma redefine_extname,
7287# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7288# structures (such as rlimit64) without declaring them. As a
7289# work-around, disable LFS on such configurations
7290
7291use_lfs=yes
Benjamin Peterson697cd212010-05-02 16:45:11 +00007292{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
7293$as_echo_n "checking Solaris LFS bug... " >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007294cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007295/* confdefs.h. */
7296_ACEOF
7297cat confdefs.h >>conftest.$ac_ext
7298cat >>conftest.$ac_ext <<_ACEOF
7299/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007300
7301#define _LARGEFILE_SOURCE 1
7302#define _FILE_OFFSET_BITS 64
7303#include <sys/resource.h>
7304
Martin v. Löwis399a6892002-10-04 10:22:02 +00007305int
7306main ()
7307{
7308struct rlimit foo;
7309 ;
7310 return 0;
7311}
7312_ACEOF
7313rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007314if { (ac_try="$ac_compile"
7315case "(($ac_try" in
7316 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7317 *) ac_try_echo=$ac_try;;
7318esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00007319eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7320$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007321 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00007322 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007323 grep -v '^ *+' conftest.er1 >conftest.err
7324 rm -f conftest.er1
7325 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00007326 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007327 (exit $ac_status); } && {
7328 test -z "$ac_c_werror_flag" ||
7329 test ! -s conftest.err
7330 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00007331 sol_lfs_bug=no
7332else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007333 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007334sed 's/^/| /' conftest.$ac_ext >&5
7335
Martin v. Löwiseba40652007-08-30 20:10:57 +00007336 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007338
7339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +00007340{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
7341$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007342if test "$sol_lfs_bug" = "yes"; then
7343 use_lfs=no
7344fi
7345
7346if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007347# Two defines needed to enable largefile support on various platforms
7348# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00007349
Martin v. Löwis11437992002-04-12 09:54:03 +00007350cat >>confdefs.h <<\_ACEOF
7351#define _LARGEFILE_SOURCE 1
7352_ACEOF
7353
7354
7355cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007356#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00007357_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007358
Martin v. Löwis399a6892002-10-04 10:22:02 +00007359fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007360
Guido van Rossum84e7b241996-08-19 21:59:00 +00007361# Add some code to confdefs.h so that the test for off_t works on SCO
7362cat >> confdefs.h <<\EOF
7363#if defined(SCO_DS)
7364#undef _OFF_T
7365#endif
7366EOF
7367
Guido van Rossumef2255b2000-03-10 22:30:29 +00007368# Type availability checks
Benjamin Peterson697cd212010-05-02 16:45:11 +00007369{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5
7370$as_echo_n "checking for mode_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007371if test "${ac_cv_type_mode_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007372 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007373else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007374 ac_cv_type_mode_t=no
7375cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007376/* confdefs.h. */
7377_ACEOF
7378cat confdefs.h >>conftest.$ac_ext
7379cat >>conftest.$ac_ext <<_ACEOF
7380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007381$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007382int
7383main ()
7384{
Benjamin Peterson697cd212010-05-02 16:45:11 +00007385if (sizeof (mode_t))
7386 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007387 ;
7388 return 0;
7389}
7390_ACEOF
7391rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007392if { (ac_try="$ac_compile"
7393case "(($ac_try" in
7394 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7395 *) ac_try_echo=$ac_try;;
7396esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00007397eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7398$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007399 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007400 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007401 grep -v '^ *+' conftest.er1 >conftest.err
7402 rm -f conftest.er1
7403 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00007404 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007405 (exit $ac_status); } && {
7406 test -z "$ac_c_werror_flag" ||
7407 test ! -s conftest.err
7408 } && test -s conftest.$ac_objext; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007409 cat >conftest.$ac_ext <<_ACEOF
7410/* confdefs.h. */
7411_ACEOF
7412cat confdefs.h >>conftest.$ac_ext
7413cat >>conftest.$ac_ext <<_ACEOF
7414/* end confdefs.h. */
7415$ac_includes_default
7416int
7417main ()
7418{
7419if (sizeof ((mode_t)))
7420 return 0;
7421 ;
7422 return 0;
7423}
7424_ACEOF
7425rm -f conftest.$ac_objext
7426if { (ac_try="$ac_compile"
7427case "(($ac_try" in
7428 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7429 *) ac_try_echo=$ac_try;;
7430esac
7431eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7432$as_echo "$ac_try_echo") >&5
7433 (eval "$ac_compile") 2>conftest.er1
7434 ac_status=$?
7435 grep -v '^ *+' conftest.er1 >conftest.err
7436 rm -f conftest.er1
7437 cat conftest.err >&5
7438 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7439 (exit $ac_status); } && {
7440 test -z "$ac_c_werror_flag" ||
7441 test ! -s conftest.err
7442 } && test -s conftest.$ac_objext; then
7443 :
Jack Jansendd19cf82001-12-06 22:36:17 +00007444else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007445 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007446sed 's/^/| /' conftest.$ac_ext >&5
7447
Benjamin Peterson697cd212010-05-02 16:45:11 +00007448 ac_cv_type_mode_t=yes
7449fi
7450
7451rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7452else
7453 $as_echo "$as_me: failed program was:" >&5
7454sed 's/^/| /' conftest.$ac_ext >&5
7455
7456
Jack Jansendd19cf82001-12-06 22:36:17 +00007457fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007458
7459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007460fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00007461{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
7462$as_echo "$ac_cv_type_mode_t" >&6; }
7463if test "x$ac_cv_type_mode_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007464 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007465else
Martin v. Löwis11437992002-04-12 09:54:03 +00007466
7467cat >>confdefs.h <<_ACEOF
7468#define mode_t int
7469_ACEOF
7470
7471fi
7472
Benjamin Peterson697cd212010-05-02 16:45:11 +00007473{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
7474$as_echo_n "checking for off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007475if test "${ac_cv_type_off_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007476 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007477else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007478 ac_cv_type_off_t=no
7479cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007480/* confdefs.h. */
7481_ACEOF
7482cat confdefs.h >>conftest.$ac_ext
7483cat >>conftest.$ac_ext <<_ACEOF
7484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007485$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007486int
7487main ()
7488{
Benjamin Peterson697cd212010-05-02 16:45:11 +00007489if (sizeof (off_t))
7490 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007491 ;
7492 return 0;
7493}
7494_ACEOF
7495rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007496if { (ac_try="$ac_compile"
7497case "(($ac_try" in
7498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7499 *) ac_try_echo=$ac_try;;
7500esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00007501eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7502$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007503 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007504 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007505 grep -v '^ *+' conftest.er1 >conftest.err
7506 rm -f conftest.er1
7507 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00007508 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007509 (exit $ac_status); } && {
7510 test -z "$ac_c_werror_flag" ||
7511 test ! -s conftest.err
7512 } && test -s conftest.$ac_objext; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007513 cat >conftest.$ac_ext <<_ACEOF
7514/* confdefs.h. */
7515_ACEOF
7516cat confdefs.h >>conftest.$ac_ext
7517cat >>conftest.$ac_ext <<_ACEOF
7518/* end confdefs.h. */
7519$ac_includes_default
7520int
7521main ()
7522{
7523if (sizeof ((off_t)))
7524 return 0;
7525 ;
7526 return 0;
7527}
7528_ACEOF
7529rm -f conftest.$ac_objext
7530if { (ac_try="$ac_compile"
7531case "(($ac_try" in
7532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7533 *) ac_try_echo=$ac_try;;
7534esac
7535eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7536$as_echo "$ac_try_echo") >&5
7537 (eval "$ac_compile") 2>conftest.er1
7538 ac_status=$?
7539 grep -v '^ *+' conftest.er1 >conftest.err
7540 rm -f conftest.er1
7541 cat conftest.err >&5
7542 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7543 (exit $ac_status); } && {
7544 test -z "$ac_c_werror_flag" ||
7545 test ! -s conftest.err
7546 } && test -s conftest.$ac_objext; then
7547 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007548else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007549 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007550sed 's/^/| /' conftest.$ac_ext >&5
7551
Benjamin Peterson697cd212010-05-02 16:45:11 +00007552 ac_cv_type_off_t=yes
7553fi
7554
7555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7556else
7557 $as_echo "$as_me: failed program was:" >&5
7558sed 's/^/| /' conftest.$ac_ext >&5
7559
7560
Guido van Rossum627b2d71993-12-24 10:39:16 +00007561fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007562
7563rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007564fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00007565{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7566$as_echo "$ac_cv_type_off_t" >&6; }
7567if test "x$ac_cv_type_off_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007568 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007569else
Martin v. Löwis11437992002-04-12 09:54:03 +00007570
7571cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007572#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007573_ACEOF
7574
7575fi
7576
Benjamin Peterson697cd212010-05-02 16:45:11 +00007577{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
7578$as_echo_n "checking for pid_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007579if test "${ac_cv_type_pid_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007580 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007581else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007582 ac_cv_type_pid_t=no
7583cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007584/* confdefs.h. */
7585_ACEOF
7586cat confdefs.h >>conftest.$ac_ext
7587cat >>conftest.$ac_ext <<_ACEOF
7588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007589$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007590int
7591main ()
7592{
Benjamin Peterson697cd212010-05-02 16:45:11 +00007593if (sizeof (pid_t))
7594 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007595 ;
7596 return 0;
7597}
7598_ACEOF
7599rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007600if { (ac_try="$ac_compile"
7601case "(($ac_try" in
7602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7603 *) ac_try_echo=$ac_try;;
7604esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00007605eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7606$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007607 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007608 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007609 grep -v '^ *+' conftest.er1 >conftest.err
7610 rm -f conftest.er1
7611 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00007612 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007613 (exit $ac_status); } && {
7614 test -z "$ac_c_werror_flag" ||
7615 test ! -s conftest.err
7616 } && test -s conftest.$ac_objext; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007617 cat >conftest.$ac_ext <<_ACEOF
7618/* confdefs.h. */
7619_ACEOF
7620cat confdefs.h >>conftest.$ac_ext
7621cat >>conftest.$ac_ext <<_ACEOF
7622/* end confdefs.h. */
7623$ac_includes_default
7624int
7625main ()
7626{
7627if (sizeof ((pid_t)))
7628 return 0;
7629 ;
7630 return 0;
7631}
7632_ACEOF
7633rm -f conftest.$ac_objext
7634if { (ac_try="$ac_compile"
7635case "(($ac_try" in
7636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7637 *) ac_try_echo=$ac_try;;
7638esac
7639eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7640$as_echo "$ac_try_echo") >&5
7641 (eval "$ac_compile") 2>conftest.er1
7642 ac_status=$?
7643 grep -v '^ *+' conftest.er1 >conftest.err
7644 rm -f conftest.er1
7645 cat conftest.err >&5
7646 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7647 (exit $ac_status); } && {
7648 test -z "$ac_c_werror_flag" ||
7649 test ! -s conftest.err
7650 } && test -s conftest.$ac_objext; then
7651 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007652else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007653 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007654sed 's/^/| /' conftest.$ac_ext >&5
7655
Benjamin Peterson697cd212010-05-02 16:45:11 +00007656 ac_cv_type_pid_t=yes
7657fi
7658
7659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7660else
7661 $as_echo "$as_me: failed program was:" >&5
7662sed 's/^/| /' conftest.$ac_ext >&5
7663
7664
Guido van Rossum627b2d71993-12-24 10:39:16 +00007665fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007666
7667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007668fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00007669{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7670$as_echo "$ac_cv_type_pid_t" >&6; }
7671if test "x$ac_cv_type_pid_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007672 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007673else
Martin v. Löwis11437992002-04-12 09:54:03 +00007674
7675cat >>confdefs.h <<_ACEOF
7676#define pid_t int
7677_ACEOF
7678
7679fi
7680
Benjamin Peterson697cd212010-05-02 16:45:11 +00007681{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7682$as_echo_n "checking return type of signal handlers... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007683if test "${ac_cv_type_signal+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007684 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007685else
7686 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007687/* confdefs.h. */
7688_ACEOF
7689cat confdefs.h >>conftest.$ac_ext
7690cat >>conftest.$ac_ext <<_ACEOF
7691/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007692#include <sys/types.h>
7693#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007694
Martin v. Löwis11437992002-04-12 09:54:03 +00007695int
7696main ()
7697{
Martin v. Löwiseba40652007-08-30 20:10:57 +00007698return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007699 ;
7700 return 0;
7701}
7702_ACEOF
7703rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007704if { (ac_try="$ac_compile"
7705case "(($ac_try" in
7706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7707 *) ac_try_echo=$ac_try;;
7708esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00007709eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7710$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007713 grep -v '^ *+' conftest.er1 >conftest.err
7714 rm -f conftest.er1
7715 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00007716 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007717 (exit $ac_status); } && {
7718 test -z "$ac_c_werror_flag" ||
7719 test ! -s conftest.err
7720 } && test -s conftest.$ac_objext; then
7721 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007722else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007723 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007724sed 's/^/| /' conftest.$ac_ext >&5
7725
Martin v. Löwiseba40652007-08-30 20:10:57 +00007726 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007728
7729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007730fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00007731{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7732$as_echo "$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007733
Martin v. Löwis11437992002-04-12 09:54:03 +00007734cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007735#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007736_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007737
Michael W. Hudson54241132001-12-07 15:38:26 +00007738
Benjamin Peterson697cd212010-05-02 16:45:11 +00007739{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
7740$as_echo_n "checking for size_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007741if test "${ac_cv_type_size_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007742 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007743else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007744 ac_cv_type_size_t=no
7745cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007746/* confdefs.h. */
7747_ACEOF
7748cat confdefs.h >>conftest.$ac_ext
7749cat >>conftest.$ac_ext <<_ACEOF
7750/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00007751$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00007752int
7753main ()
7754{
Benjamin Peterson697cd212010-05-02 16:45:11 +00007755if (sizeof (size_t))
7756 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00007757 ;
7758 return 0;
7759}
7760_ACEOF
7761rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007762if { (ac_try="$ac_compile"
7763case "(($ac_try" in
7764 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7765 *) ac_try_echo=$ac_try;;
7766esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00007767eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7768$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007769 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007770 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007771 grep -v '^ *+' conftest.er1 >conftest.err
7772 rm -f conftest.er1
7773 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00007774 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007775 (exit $ac_status); } && {
7776 test -z "$ac_c_werror_flag" ||
7777 test ! -s conftest.err
7778 } && test -s conftest.$ac_objext; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007779 cat >conftest.$ac_ext <<_ACEOF
7780/* confdefs.h. */
7781_ACEOF
7782cat confdefs.h >>conftest.$ac_ext
7783cat >>conftest.$ac_ext <<_ACEOF
7784/* end confdefs.h. */
7785$ac_includes_default
7786int
7787main ()
7788{
7789if (sizeof ((size_t)))
7790 return 0;
7791 ;
7792 return 0;
7793}
7794_ACEOF
7795rm -f conftest.$ac_objext
7796if { (ac_try="$ac_compile"
7797case "(($ac_try" in
7798 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7799 *) ac_try_echo=$ac_try;;
7800esac
7801eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7802$as_echo "$ac_try_echo") >&5
7803 (eval "$ac_compile") 2>conftest.er1
7804 ac_status=$?
7805 grep -v '^ *+' conftest.er1 >conftest.err
7806 rm -f conftest.er1
7807 cat conftest.err >&5
7808 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7809 (exit $ac_status); } && {
7810 test -z "$ac_c_werror_flag" ||
7811 test ! -s conftest.err
7812 } && test -s conftest.$ac_objext; then
7813 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007814else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007815 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007816sed 's/^/| /' conftest.$ac_ext >&5
7817
Benjamin Peterson697cd212010-05-02 16:45:11 +00007818 ac_cv_type_size_t=yes
7819fi
7820
7821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7822else
7823 $as_echo "$as_me: failed program was:" >&5
7824sed 's/^/| /' conftest.$ac_ext >&5
7825
7826
Guido van Rossum627b2d71993-12-24 10:39:16 +00007827fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007828
7829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007830fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00007831{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7832$as_echo "$ac_cv_type_size_t" >&6; }
7833if test "x$ac_cv_type_size_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007834 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007835else
Martin v. Löwis11437992002-04-12 09:54:03 +00007836
7837cat >>confdefs.h <<_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +00007838#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007839_ACEOF
7840
7841fi
7842
Benjamin Peterson697cd212010-05-02 16:45:11 +00007843{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7844$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007845if test "${ac_cv_type_uid_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007846 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007847else
7848 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007849/* confdefs.h. */
7850_ACEOF
7851cat confdefs.h >>conftest.$ac_ext
7852cat >>conftest.$ac_ext <<_ACEOF
7853/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007854#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007855
7856_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007857if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007858 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007859 ac_cv_type_uid_t=yes
7860else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007861 ac_cv_type_uid_t=no
7862fi
Jesus Cead54cdf02010-04-28 11:11:36 +00007863rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007864
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007865fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00007866{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7867$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007868if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007869
Martin v. Löwis11437992002-04-12 09:54:03 +00007870cat >>confdefs.h <<\_ACEOF
7871#define uid_t int
7872_ACEOF
7873
7874
7875cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007876#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007877_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007878
7879fi
7880
Benjamin Peterson697cd212010-05-02 16:45:11 +00007881{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
7882$as_echo_n "checking for ssize_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00007883if test "${ac_cv_type_ssize_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007884 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00007885else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007886 ac_cv_type_ssize_t=no
7887cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +00007888/* confdefs.h. */
7889_ACEOF
7890cat confdefs.h >>conftest.$ac_ext
7891cat >>conftest.$ac_ext <<_ACEOF
7892/* end confdefs.h. */
7893$ac_includes_default
7894int
7895main ()
7896{
Benjamin Peterson697cd212010-05-02 16:45:11 +00007897if (sizeof (ssize_t))
7898 return 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +00007899 ;
7900 return 0;
7901}
7902_ACEOF
7903rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00007904if { (ac_try="$ac_compile"
7905case "(($ac_try" in
7906 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7907 *) ac_try_echo=$ac_try;;
7908esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00007909eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7910$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007911 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +00007912 ac_status=$?
7913 grep -v '^ *+' conftest.er1 >conftest.err
7914 rm -f conftest.er1
7915 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00007916 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00007917 (exit $ac_status); } && {
7918 test -z "$ac_c_werror_flag" ||
7919 test ! -s conftest.err
7920 } && test -s conftest.$ac_objext; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007921 cat >conftest.$ac_ext <<_ACEOF
7922/* confdefs.h. */
7923_ACEOF
7924cat confdefs.h >>conftest.$ac_ext
7925cat >>conftest.$ac_ext <<_ACEOF
7926/* end confdefs.h. */
7927$ac_includes_default
7928int
7929main ()
7930{
7931if (sizeof ((ssize_t)))
7932 return 0;
7933 ;
7934 return 0;
7935}
7936_ACEOF
7937rm -f conftest.$ac_objext
7938if { (ac_try="$ac_compile"
7939case "(($ac_try" in
7940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7941 *) ac_try_echo=$ac_try;;
7942esac
7943eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7944$as_echo "$ac_try_echo") >&5
7945 (eval "$ac_compile") 2>conftest.er1
7946 ac_status=$?
7947 grep -v '^ *+' conftest.er1 >conftest.err
7948 rm -f conftest.er1
7949 cat conftest.err >&5
7950 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7951 (exit $ac_status); } && {
7952 test -z "$ac_c_werror_flag" ||
7953 test ! -s conftest.err
7954 } && test -s conftest.$ac_objext; then
7955 :
Martin v. Löwis18e16552006-02-15 17:27:45 +00007956else
Benjamin Peterson697cd212010-05-02 16:45:11 +00007957 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00007958sed 's/^/| /' conftest.$ac_ext >&5
7959
Benjamin Peterson697cd212010-05-02 16:45:11 +00007960 ac_cv_type_ssize_t=yes
7961fi
7962
7963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7964else
7965 $as_echo "$as_me: failed program was:" >&5
7966sed 's/^/| /' conftest.$ac_ext >&5
7967
7968
Martin v. Löwis18e16552006-02-15 17:27:45 +00007969fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00007970
7971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00007972fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00007973{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
7974$as_echo "$ac_cv_type_ssize_t" >&6; }
7975if test "x$ac_cv_type_ssize_t" = x""yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00007976
7977cat >>confdefs.h <<\_ACEOF
7978#define HAVE_SSIZE_T 1
7979_ACEOF
7980
7981fi
7982
Jack Jansendd19cf82001-12-06 22:36:17 +00007983
Michael W. Hudson54241132001-12-07 15:38:26 +00007984# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00007985# ANSI C requires sizeof(char) == 1, so no need to check it
Martin v. Löwiseba40652007-08-30 20:10:57 +00007986# The cast to long int works around a bug in the HP C Compiler
7987# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
7988# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
7989# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +00007990{ $as_echo "$as_me:$LINENO: checking size of int" >&5
7991$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007992if test "${ac_cv_sizeof_int+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00007993 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007994else
Martin v. Löwis11437992002-04-12 09:54:03 +00007995 if test "$cross_compiling" = yes; then
7996 # Depending upon the size, compute the lo and hi bounds.
7997cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007998/* confdefs.h. */
7999_ACEOF
8000cat confdefs.h >>conftest.$ac_ext
8001cat >>conftest.$ac_ext <<_ACEOF
8002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008003$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008004int
8005main ()
8006{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008007static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008008test_array [0] = 0
8009
8010 ;
8011 return 0;
8012}
8013_ACEOF
8014rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008015if { (ac_try="$ac_compile"
8016case "(($ac_try" in
8017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8018 *) ac_try_echo=$ac_try;;
8019esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008020eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8021$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008022 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008023 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008024 grep -v '^ *+' conftest.er1 >conftest.err
8025 rm -f conftest.er1
8026 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008027 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008028 (exit $ac_status); } && {
8029 test -z "$ac_c_werror_flag" ||
8030 test ! -s conftest.err
8031 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008032 ac_lo=0 ac_mid=0
8033 while :; do
8034 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008035/* confdefs.h. */
8036_ACEOF
8037cat confdefs.h >>conftest.$ac_ext
8038cat >>conftest.$ac_ext <<_ACEOF
8039/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008040$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008041int
8042main ()
8043{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008044static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008045test_array [0] = 0
8046
8047 ;
8048 return 0;
8049}
8050_ACEOF
8051rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008052if { (ac_try="$ac_compile"
8053case "(($ac_try" in
8054 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8055 *) ac_try_echo=$ac_try;;
8056esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008057eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8058$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008059 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008060 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008061 grep -v '^ *+' conftest.er1 >conftest.err
8062 rm -f conftest.er1
8063 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008064 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008065 (exit $ac_status); } && {
8066 test -z "$ac_c_werror_flag" ||
8067 test ! -s conftest.err
8068 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008069 ac_hi=$ac_mid; break
8070else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008071 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008072sed 's/^/| /' conftest.$ac_ext >&5
8073
Martin v. Löwiseba40652007-08-30 20:10:57 +00008074 ac_lo=`expr $ac_mid + 1`
8075 if test $ac_lo -le $ac_mid; then
8076 ac_lo= ac_hi=
8077 break
8078 fi
8079 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008080fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008081
8082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008083 done
8084else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008085 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008086sed 's/^/| /' conftest.$ac_ext >&5
8087
Martin v. Löwiseba40652007-08-30 20:10:57 +00008088 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008089/* confdefs.h. */
8090_ACEOF
8091cat confdefs.h >>conftest.$ac_ext
8092cat >>conftest.$ac_ext <<_ACEOF
8093/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008094$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008095int
8096main ()
8097{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008098static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008099test_array [0] = 0
8100
8101 ;
8102 return 0;
8103}
8104_ACEOF
8105rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008106if { (ac_try="$ac_compile"
8107case "(($ac_try" in
8108 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8109 *) ac_try_echo=$ac_try;;
8110esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008111eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8112$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008113 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008114 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008115 grep -v '^ *+' conftest.er1 >conftest.err
8116 rm -f conftest.er1
8117 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008118 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008119 (exit $ac_status); } && {
8120 test -z "$ac_c_werror_flag" ||
8121 test ! -s conftest.err
8122 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008123 ac_hi=-1 ac_mid=-1
8124 while :; do
8125 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008126/* confdefs.h. */
8127_ACEOF
8128cat confdefs.h >>conftest.$ac_ext
8129cat >>conftest.$ac_ext <<_ACEOF
8130/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008131$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008132int
8133main ()
8134{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008135static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008136test_array [0] = 0
8137
8138 ;
8139 return 0;
8140}
8141_ACEOF
8142rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008143if { (ac_try="$ac_compile"
8144case "(($ac_try" in
8145 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8146 *) ac_try_echo=$ac_try;;
8147esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008148eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8149$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008150 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008151 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008152 grep -v '^ *+' conftest.er1 >conftest.err
8153 rm -f conftest.er1
8154 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008155 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008156 (exit $ac_status); } && {
8157 test -z "$ac_c_werror_flag" ||
8158 test ! -s conftest.err
8159 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008160 ac_lo=$ac_mid; break
8161else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008162 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008163sed 's/^/| /' conftest.$ac_ext >&5
8164
Martin v. Löwiseba40652007-08-30 20:10:57 +00008165 ac_hi=`expr '(' $ac_mid ')' - 1`
8166 if test $ac_mid -le $ac_hi; then
8167 ac_lo= ac_hi=
8168 break
8169 fi
8170 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008172
8173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008174 done
8175else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008176 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008177sed 's/^/| /' conftest.$ac_ext >&5
8178
Martin v. Löwiseba40652007-08-30 20:10:57 +00008179 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008180fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008181
8182rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008183fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008184
8185rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008186# Binary search between lo and hi bounds.
8187while test "x$ac_lo" != "x$ac_hi"; do
8188 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8189 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008190/* confdefs.h. */
8191_ACEOF
8192cat confdefs.h >>conftest.$ac_ext
8193cat >>conftest.$ac_ext <<_ACEOF
8194/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008195$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008196int
8197main ()
8198{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008199static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008200test_array [0] = 0
8201
8202 ;
8203 return 0;
8204}
8205_ACEOF
8206rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008207if { (ac_try="$ac_compile"
8208case "(($ac_try" in
8209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8210 *) ac_try_echo=$ac_try;;
8211esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008212eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8213$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008214 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008215 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008216 grep -v '^ *+' conftest.er1 >conftest.err
8217 rm -f conftest.er1
8218 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008219 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008220 (exit $ac_status); } && {
8221 test -z "$ac_c_werror_flag" ||
8222 test ! -s conftest.err
8223 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008224 ac_hi=$ac_mid
8225else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008226 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008227sed 's/^/| /' conftest.$ac_ext >&5
8228
Martin v. Löwiseba40652007-08-30 20:10:57 +00008229 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008230fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008231
8232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008233done
8234case $ac_lo in
8235?*) ac_cv_sizeof_int=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008236'') if test "$ac_cv_type_int" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00008237 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8238$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8239{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008240See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008241$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008242See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00008243 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008244 else
8245 ac_cv_sizeof_int=0
8246 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008247esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008248else
Martin v. Löwis11437992002-04-12 09:54:03 +00008249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008250/* confdefs.h. */
8251_ACEOF
8252cat confdefs.h >>conftest.$ac_ext
8253cat >>conftest.$ac_ext <<_ACEOF
8254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008255$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +00008256static long int longval () { return (long int) (sizeof (int)); }
8257static unsigned long int ulongval () { return (long int) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008258#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008259#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008260int
8261main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008262{
Martin v. Löwis11437992002-04-12 09:54:03 +00008263
8264 FILE *f = fopen ("conftest.val", "w");
8265 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008266 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00008267 if (((long int) (sizeof (int))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008268 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008269 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +00008270 if (i != ((long int) (sizeof (int))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008271 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00008272 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008273 }
8274 else
8275 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008276 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +00008277 if (i != ((long int) (sizeof (int))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008278 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00008279 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008280 }
Benjamin Peterson697cd212010-05-02 16:45:11 +00008281 /* Do not output a trailing newline, as this causes \r\n confusion
8282 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +00008283 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008284
8285 ;
8286 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008287}
Martin v. Löwis11437992002-04-12 09:54:03 +00008288_ACEOF
8289rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008290if { (ac_try="$ac_link"
8291case "(($ac_try" in
8292 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8293 *) ac_try_echo=$ac_try;;
8294esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008295eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8296$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008297 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008298 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00008299 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008301 { (case "(($ac_try" in
8302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8303 *) ac_try_echo=$ac_try;;
8304esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008305eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8306$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008307 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008308 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00008309 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008310 (exit $ac_status); }; }; then
8311 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008312else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008313 $as_echo "$as_me: program exited with status $ac_status" >&5
8314$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008315sed 's/^/| /' conftest.$ac_ext >&5
8316
Martin v. Löwis11437992002-04-12 09:54:03 +00008317( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008318if test "$ac_cv_type_int" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00008319 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8321{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008322See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008323$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008324See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00008325 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008326 else
8327 ac_cv_sizeof_int=0
8328 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008329fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00008330rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00008331rm -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 +00008332fi
8333rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008334fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00008335{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8336$as_echo "$ac_cv_sizeof_int" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008337
8338
8339
Martin v. Löwis11437992002-04-12 09:54:03 +00008340cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008341#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008342_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008343
8344
Martin v. Löwiseba40652007-08-30 20:10:57 +00008345# The cast to long int works around a bug in the HP C Compiler
8346# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8347# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8348# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +00008349{ $as_echo "$as_me:$LINENO: checking size of long" >&5
8350$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008351if test "${ac_cv_sizeof_long+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00008352 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008353else
Martin v. Löwis11437992002-04-12 09:54:03 +00008354 if test "$cross_compiling" = yes; then
8355 # Depending upon the size, compute the lo and hi bounds.
8356cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008357/* confdefs.h. */
8358_ACEOF
8359cat confdefs.h >>conftest.$ac_ext
8360cat >>conftest.$ac_ext <<_ACEOF
8361/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008362$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008363int
8364main ()
8365{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008366static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008367test_array [0] = 0
8368
8369 ;
8370 return 0;
8371}
8372_ACEOF
8373rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008374if { (ac_try="$ac_compile"
8375case "(($ac_try" in
8376 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8377 *) ac_try_echo=$ac_try;;
8378esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008379eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8380$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008381 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008382 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008383 grep -v '^ *+' conftest.er1 >conftest.err
8384 rm -f conftest.er1
8385 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008386 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008387 (exit $ac_status); } && {
8388 test -z "$ac_c_werror_flag" ||
8389 test ! -s conftest.err
8390 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 ac_lo=0 ac_mid=0
8392 while :; do
8393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008394/* confdefs.h. */
8395_ACEOF
8396cat confdefs.h >>conftest.$ac_ext
8397cat >>conftest.$ac_ext <<_ACEOF
8398/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008399$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008400int
8401main ()
8402{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008403static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008404test_array [0] = 0
8405
8406 ;
8407 return 0;
8408}
8409_ACEOF
8410rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008411if { (ac_try="$ac_compile"
8412case "(($ac_try" in
8413 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8414 *) ac_try_echo=$ac_try;;
8415esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008416eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8417$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008418 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008419 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008420 grep -v '^ *+' conftest.er1 >conftest.err
8421 rm -f conftest.er1
8422 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008423 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008424 (exit $ac_status); } && {
8425 test -z "$ac_c_werror_flag" ||
8426 test ! -s conftest.err
8427 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 ac_hi=$ac_mid; break
8429else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008430 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008431sed 's/^/| /' conftest.$ac_ext >&5
8432
Martin v. Löwiseba40652007-08-30 20:10:57 +00008433 ac_lo=`expr $ac_mid + 1`
8434 if test $ac_lo -le $ac_mid; then
8435 ac_lo= ac_hi=
8436 break
8437 fi
8438 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008439fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008440
8441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008442 done
8443else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008444 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008445sed 's/^/| /' conftest.$ac_ext >&5
8446
Martin v. Löwiseba40652007-08-30 20:10:57 +00008447 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008448/* confdefs.h. */
8449_ACEOF
8450cat confdefs.h >>conftest.$ac_ext
8451cat >>conftest.$ac_ext <<_ACEOF
8452/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008453$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008454int
8455main ()
8456{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008457static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008458test_array [0] = 0
8459
8460 ;
8461 return 0;
8462}
8463_ACEOF
8464rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008465if { (ac_try="$ac_compile"
8466case "(($ac_try" in
8467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8468 *) ac_try_echo=$ac_try;;
8469esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008470eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8471$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008474 grep -v '^ *+' conftest.er1 >conftest.err
8475 rm -f conftest.er1
8476 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008477 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008478 (exit $ac_status); } && {
8479 test -z "$ac_c_werror_flag" ||
8480 test ! -s conftest.err
8481 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008482 ac_hi=-1 ac_mid=-1
8483 while :; do
8484 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008485/* confdefs.h. */
8486_ACEOF
8487cat confdefs.h >>conftest.$ac_ext
8488cat >>conftest.$ac_ext <<_ACEOF
8489/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008490$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008491int
8492main ()
8493{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008494static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008495test_array [0] = 0
8496
8497 ;
8498 return 0;
8499}
8500_ACEOF
8501rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008502if { (ac_try="$ac_compile"
8503case "(($ac_try" in
8504 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8505 *) ac_try_echo=$ac_try;;
8506esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008507eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8508$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008509 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008510 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008511 grep -v '^ *+' conftest.er1 >conftest.err
8512 rm -f conftest.er1
8513 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008514 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008515 (exit $ac_status); } && {
8516 test -z "$ac_c_werror_flag" ||
8517 test ! -s conftest.err
8518 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008519 ac_lo=$ac_mid; break
8520else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008521 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008522sed 's/^/| /' conftest.$ac_ext >&5
8523
Martin v. Löwiseba40652007-08-30 20:10:57 +00008524 ac_hi=`expr '(' $ac_mid ')' - 1`
8525 if test $ac_mid -le $ac_hi; then
8526 ac_lo= ac_hi=
8527 break
8528 fi
8529 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008530fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008531
8532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008533 done
8534else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008535 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008536sed 's/^/| /' conftest.$ac_ext >&5
8537
Martin v. Löwiseba40652007-08-30 20:10:57 +00008538 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008539fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008540
8541rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008542fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008543
8544rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008545# Binary search between lo and hi bounds.
8546while test "x$ac_lo" != "x$ac_hi"; do
8547 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8548 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008549/* confdefs.h. */
8550_ACEOF
8551cat confdefs.h >>conftest.$ac_ext
8552cat >>conftest.$ac_ext <<_ACEOF
8553/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008554$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008555int
8556main ()
8557{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008558static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008559test_array [0] = 0
8560
8561 ;
8562 return 0;
8563}
8564_ACEOF
8565rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008566if { (ac_try="$ac_compile"
8567case "(($ac_try" in
8568 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8569 *) ac_try_echo=$ac_try;;
8570esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008571eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8572$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008573 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008574 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008575 grep -v '^ *+' conftest.er1 >conftest.err
8576 rm -f conftest.er1
8577 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008578 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008579 (exit $ac_status); } && {
8580 test -z "$ac_c_werror_flag" ||
8581 test ! -s conftest.err
8582 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008583 ac_hi=$ac_mid
8584else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008585 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008586sed 's/^/| /' conftest.$ac_ext >&5
8587
Martin v. Löwiseba40652007-08-30 20:10:57 +00008588 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008589fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008590
8591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008592done
8593case $ac_lo in
8594?*) ac_cv_sizeof_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008595'') if test "$ac_cv_type_long" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00008596 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8597$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8598{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008599See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008600$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008601See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00008602 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008603 else
8604 ac_cv_sizeof_long=0
8605 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008606esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008607else
Martin v. Löwis11437992002-04-12 09:54:03 +00008608 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008609/* confdefs.h. */
8610_ACEOF
8611cat confdefs.h >>conftest.$ac_ext
8612cat >>conftest.$ac_ext <<_ACEOF
8613/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008614$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +00008615static long int longval () { return (long int) (sizeof (long)); }
8616static unsigned long int ulongval () { return (long int) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008617#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008618#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008619int
8620main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008621{
Martin v. Löwis11437992002-04-12 09:54:03 +00008622
8623 FILE *f = fopen ("conftest.val", "w");
8624 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008625 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00008626 if (((long int) (sizeof (long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008627 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008628 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +00008629 if (i != ((long int) (sizeof (long))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008630 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00008631 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008632 }
8633 else
8634 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008635 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +00008636 if (i != ((long int) (sizeof (long))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008637 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00008638 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008639 }
Benjamin Peterson697cd212010-05-02 16:45:11 +00008640 /* Do not output a trailing newline, as this causes \r\n confusion
8641 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +00008642 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008643
8644 ;
8645 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008646}
Martin v. Löwis11437992002-04-12 09:54:03 +00008647_ACEOF
8648rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008649if { (ac_try="$ac_link"
8650case "(($ac_try" in
8651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8652 *) ac_try_echo=$ac_try;;
8653esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008654eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8655$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008656 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008657 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00008658 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00008660 { (case "(($ac_try" in
8661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8662 *) ac_try_echo=$ac_try;;
8663esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008664eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8665$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008666 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008667 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00008668 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008669 (exit $ac_status); }; }; then
8670 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008671else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008672 $as_echo "$as_me: program exited with status $ac_status" >&5
8673$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008674sed 's/^/| /' conftest.$ac_ext >&5
8675
Martin v. Löwis11437992002-04-12 09:54:03 +00008676( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00008677if test "$ac_cv_type_long" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00008678 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8679$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8680{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008681See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008682$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008683See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00008684 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008685 else
8686 ac_cv_sizeof_long=0
8687 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008688fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00008689rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00008690rm -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 +00008691fi
8692rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008693fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00008694{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8695$as_echo "$ac_cv_sizeof_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008696
8697
8698
Martin v. Löwis11437992002-04-12 09:54:03 +00008699cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008700#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008701_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008702
8703
Martin v. Löwiseba40652007-08-30 20:10:57 +00008704# The cast to long int works around a bug in the HP C Compiler
8705# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8706# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8707# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +00008708{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
8709$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008710if test "${ac_cv_sizeof_void_p+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00008711 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008712else
Martin v. Löwis11437992002-04-12 09:54:03 +00008713 if test "$cross_compiling" = yes; then
8714 # Depending upon the size, compute the lo and hi bounds.
8715cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008716/* confdefs.h. */
8717_ACEOF
8718cat confdefs.h >>conftest.$ac_ext
8719cat >>conftest.$ac_ext <<_ACEOF
8720/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008721$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008722int
8723main ()
8724{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008725static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008726test_array [0] = 0
8727
8728 ;
8729 return 0;
8730}
8731_ACEOF
8732rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008733if { (ac_try="$ac_compile"
8734case "(($ac_try" in
8735 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8736 *) ac_try_echo=$ac_try;;
8737esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008738eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8739$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008740 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008741 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008742 grep -v '^ *+' conftest.er1 >conftest.err
8743 rm -f conftest.er1
8744 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008745 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008746 (exit $ac_status); } && {
8747 test -z "$ac_c_werror_flag" ||
8748 test ! -s conftest.err
8749 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 ac_lo=0 ac_mid=0
8751 while :; do
8752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008753/* confdefs.h. */
8754_ACEOF
8755cat confdefs.h >>conftest.$ac_ext
8756cat >>conftest.$ac_ext <<_ACEOF
8757/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008758$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008759int
8760main ()
8761{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008762static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008763test_array [0] = 0
8764
8765 ;
8766 return 0;
8767}
8768_ACEOF
8769rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008770if { (ac_try="$ac_compile"
8771case "(($ac_try" in
8772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8773 *) ac_try_echo=$ac_try;;
8774esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008775eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8776$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008777 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008778 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008779 grep -v '^ *+' conftest.er1 >conftest.err
8780 rm -f conftest.er1
8781 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008782 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008783 (exit $ac_status); } && {
8784 test -z "$ac_c_werror_flag" ||
8785 test ! -s conftest.err
8786 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 ac_hi=$ac_mid; break
8788else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008789 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008790sed 's/^/| /' conftest.$ac_ext >&5
8791
Martin v. Löwiseba40652007-08-30 20:10:57 +00008792 ac_lo=`expr $ac_mid + 1`
8793 if test $ac_lo -le $ac_mid; then
8794 ac_lo= ac_hi=
8795 break
8796 fi
8797 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008798fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008799
8800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008801 done
8802else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008803 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008804sed 's/^/| /' conftest.$ac_ext >&5
8805
Martin v. Löwiseba40652007-08-30 20:10:57 +00008806 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008807/* confdefs.h. */
8808_ACEOF
8809cat confdefs.h >>conftest.$ac_ext
8810cat >>conftest.$ac_ext <<_ACEOF
8811/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008812$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008813int
8814main ()
8815{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008816static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008817test_array [0] = 0
8818
8819 ;
8820 return 0;
8821}
8822_ACEOF
8823rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008824if { (ac_try="$ac_compile"
8825case "(($ac_try" in
8826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8827 *) ac_try_echo=$ac_try;;
8828esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008829eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8830$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008831 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008832 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008833 grep -v '^ *+' conftest.er1 >conftest.err
8834 rm -f conftest.er1
8835 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008836 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008837 (exit $ac_status); } && {
8838 test -z "$ac_c_werror_flag" ||
8839 test ! -s conftest.err
8840 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008841 ac_hi=-1 ac_mid=-1
8842 while :; do
8843 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008844/* confdefs.h. */
8845_ACEOF
8846cat confdefs.h >>conftest.$ac_ext
8847cat >>conftest.$ac_ext <<_ACEOF
8848/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008849$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008850int
8851main ()
8852{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008853static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008854test_array [0] = 0
8855
8856 ;
8857 return 0;
8858}
8859_ACEOF
8860rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008861if { (ac_try="$ac_compile"
8862case "(($ac_try" in
8863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8864 *) ac_try_echo=$ac_try;;
8865esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008866eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8867$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008868 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008869 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008870 grep -v '^ *+' conftest.er1 >conftest.err
8871 rm -f conftest.er1
8872 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008873 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008874 (exit $ac_status); } && {
8875 test -z "$ac_c_werror_flag" ||
8876 test ! -s conftest.err
8877 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008878 ac_lo=$ac_mid; break
8879else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008880 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008881sed 's/^/| /' conftest.$ac_ext >&5
8882
Martin v. Löwiseba40652007-08-30 20:10:57 +00008883 ac_hi=`expr '(' $ac_mid ')' - 1`
8884 if test $ac_mid -le $ac_hi; then
8885 ac_lo= ac_hi=
8886 break
8887 fi
8888 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008889fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008890
8891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008892 done
8893else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008894 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008895sed 's/^/| /' conftest.$ac_ext >&5
8896
Martin v. Löwiseba40652007-08-30 20:10:57 +00008897 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008898fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008899
8900rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008901fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008902
8903rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008904# Binary search between lo and hi bounds.
8905while test "x$ac_lo" != "x$ac_hi"; do
8906 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8907 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008908/* confdefs.h. */
8909_ACEOF
8910cat confdefs.h >>conftest.$ac_ext
8911cat >>conftest.$ac_ext <<_ACEOF
8912/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008913$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008914int
8915main ()
8916{
Benjamin Peterson697cd212010-05-02 16:45:11 +00008917static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008918test_array [0] = 0
8919
8920 ;
8921 return 0;
8922}
8923_ACEOF
8924rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00008925if { (ac_try="$ac_compile"
8926case "(($ac_try" in
8927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8928 *) ac_try_echo=$ac_try;;
8929esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00008930eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8931$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008932 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008934 grep -v '^ *+' conftest.er1 >conftest.err
8935 rm -f conftest.er1
8936 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008937 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00008938 (exit $ac_status); } && {
8939 test -z "$ac_c_werror_flag" ||
8940 test ! -s conftest.err
8941 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008942 ac_hi=$ac_mid
8943else
Benjamin Peterson697cd212010-05-02 16:45:11 +00008944 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008945sed 's/^/| /' conftest.$ac_ext >&5
8946
Martin v. Löwiseba40652007-08-30 20:10:57 +00008947 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00008949
8950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008951done
8952case $ac_lo in
8953?*) ac_cv_sizeof_void_p=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00008954'') if test "$ac_cv_type_void_p" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00008955 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8956$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8957{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008958See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00008959$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00008960See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00008961 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00008962 else
8963 ac_cv_sizeof_void_p=0
8964 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008965esac
Guido van Rossumad678af1998-10-02 14:42:15 +00008966else
Martin v. Löwis11437992002-04-12 09:54:03 +00008967 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008968/* confdefs.h. */
8969_ACEOF
8970cat confdefs.h >>conftest.$ac_ext
8971cat >>conftest.$ac_ext <<_ACEOF
8972/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008973$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +00008974static long int longval () { return (long int) (sizeof (void *)); }
8975static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008976#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008977#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008978int
8979main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00008980{
Martin v. Löwis11437992002-04-12 09:54:03 +00008981
8982 FILE *f = fopen ("conftest.val", "w");
8983 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00008984 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00008985 if (((long int) (sizeof (void *))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008986 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008987 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +00008988 if (i != ((long int) (sizeof (void *))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008989 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00008990 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008991 }
8992 else
8993 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00008994 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +00008995 if (i != ((long int) (sizeof (void *))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00008996 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00008997 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008998 }
Benjamin Peterson697cd212010-05-02 16:45:11 +00008999 /* Do not output a trailing newline, as this causes \r\n confusion
9000 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +00009001 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009002
9003 ;
9004 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00009005}
Martin v. Löwis11437992002-04-12 09:54:03 +00009006_ACEOF
9007rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009008if { (ac_try="$ac_link"
9009case "(($ac_try" in
9010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9011 *) ac_try_echo=$ac_try;;
9012esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009013eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9014$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009015 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009016 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00009017 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009018 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009019 { (case "(($ac_try" in
9020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9021 *) ac_try_echo=$ac_try;;
9022esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009023eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9024$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009025 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009026 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00009027 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009028 (exit $ac_status); }; }; then
9029 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00009030else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009031 $as_echo "$as_me: program exited with status $ac_status" >&5
9032$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009033sed 's/^/| /' conftest.$ac_ext >&5
9034
Martin v. Löwis11437992002-04-12 09:54:03 +00009035( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009036if test "$ac_cv_type_void_p" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00009037 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9038$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9039{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009040See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009041$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009042See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00009043 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009044 else
9045 ac_cv_sizeof_void_p=0
9046 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009047fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00009048rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00009049rm -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 +00009050fi
9051rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00009052fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00009053{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
9054$as_echo "$ac_cv_sizeof_void_p" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009055
9056
9057
Martin v. Löwis11437992002-04-12 09:54:03 +00009058cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009059#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00009060_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009061
9062
Martin v. Löwiseba40652007-08-30 20:10:57 +00009063# The cast to long int works around a bug in the HP C Compiler
9064# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9065# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9066# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +00009067{ $as_echo "$as_me:$LINENO: checking size of short" >&5
9068$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009069if test "${ac_cv_sizeof_short+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00009070 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009071else
Martin v. Löwis11437992002-04-12 09:54:03 +00009072 if test "$cross_compiling" = yes; then
9073 # Depending upon the size, compute the lo and hi bounds.
9074cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009075/* confdefs.h. */
9076_ACEOF
9077cat confdefs.h >>conftest.$ac_ext
9078cat >>conftest.$ac_ext <<_ACEOF
9079/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009080$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009081int
9082main ()
9083{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009084static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009085test_array [0] = 0
9086
9087 ;
9088 return 0;
9089}
9090_ACEOF
9091rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009092if { (ac_try="$ac_compile"
9093case "(($ac_try" in
9094 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9095 *) ac_try_echo=$ac_try;;
9096esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009097eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9098$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009099 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009100 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009101 grep -v '^ *+' conftest.er1 >conftest.err
9102 rm -f conftest.er1
9103 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009104 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009105 (exit $ac_status); } && {
9106 test -z "$ac_c_werror_flag" ||
9107 test ! -s conftest.err
9108 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009109 ac_lo=0 ac_mid=0
9110 while :; do
9111 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009112/* confdefs.h. */
9113_ACEOF
9114cat confdefs.h >>conftest.$ac_ext
9115cat >>conftest.$ac_ext <<_ACEOF
9116/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009117$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009118int
9119main ()
9120{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009121static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009122test_array [0] = 0
9123
9124 ;
9125 return 0;
9126}
9127_ACEOF
9128rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009129if { (ac_try="$ac_compile"
9130case "(($ac_try" in
9131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9132 *) ac_try_echo=$ac_try;;
9133esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009134eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9135$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009136 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009137 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009138 grep -v '^ *+' conftest.er1 >conftest.err
9139 rm -f conftest.er1
9140 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009141 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009142 (exit $ac_status); } && {
9143 test -z "$ac_c_werror_flag" ||
9144 test ! -s conftest.err
9145 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 ac_hi=$ac_mid; break
9147else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009148 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009149sed 's/^/| /' conftest.$ac_ext >&5
9150
Martin v. Löwiseba40652007-08-30 20:10:57 +00009151 ac_lo=`expr $ac_mid + 1`
9152 if test $ac_lo -le $ac_mid; then
9153 ac_lo= ac_hi=
9154 break
9155 fi
9156 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009157fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009158
9159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009160 done
9161else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009162 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009163sed 's/^/| /' conftest.$ac_ext >&5
9164
Martin v. Löwiseba40652007-08-30 20:10:57 +00009165 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009166/* confdefs.h. */
9167_ACEOF
9168cat confdefs.h >>conftest.$ac_ext
9169cat >>conftest.$ac_ext <<_ACEOF
9170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009171$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009172int
9173main ()
9174{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009175static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009176test_array [0] = 0
9177
9178 ;
9179 return 0;
9180}
9181_ACEOF
9182rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009183if { (ac_try="$ac_compile"
9184case "(($ac_try" in
9185 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9186 *) ac_try_echo=$ac_try;;
9187esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009188eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9189$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009190 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009191 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009192 grep -v '^ *+' conftest.er1 >conftest.err
9193 rm -f conftest.er1
9194 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009195 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009196 (exit $ac_status); } && {
9197 test -z "$ac_c_werror_flag" ||
9198 test ! -s conftest.err
9199 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009200 ac_hi=-1 ac_mid=-1
9201 while :; do
9202 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009203/* confdefs.h. */
9204_ACEOF
9205cat confdefs.h >>conftest.$ac_ext
9206cat >>conftest.$ac_ext <<_ACEOF
9207/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009208$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009209int
9210main ()
9211{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009212static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009213test_array [0] = 0
9214
9215 ;
9216 return 0;
9217}
9218_ACEOF
9219rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009220if { (ac_try="$ac_compile"
9221case "(($ac_try" in
9222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9223 *) ac_try_echo=$ac_try;;
9224esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009225eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9226$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009227 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009228 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009229 grep -v '^ *+' conftest.er1 >conftest.err
9230 rm -f conftest.er1
9231 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009232 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009233 (exit $ac_status); } && {
9234 test -z "$ac_c_werror_flag" ||
9235 test ! -s conftest.err
9236 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009237 ac_lo=$ac_mid; break
9238else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009239 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009240sed 's/^/| /' conftest.$ac_ext >&5
9241
Martin v. Löwiseba40652007-08-30 20:10:57 +00009242 ac_hi=`expr '(' $ac_mid ')' - 1`
9243 if test $ac_mid -le $ac_hi; then
9244 ac_lo= ac_hi=
9245 break
9246 fi
9247 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009248fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009249
9250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009251 done
9252else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009253 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009254sed 's/^/| /' conftest.$ac_ext >&5
9255
Martin v. Löwiseba40652007-08-30 20:10:57 +00009256 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009257fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009258
9259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009260fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009261
9262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009263# Binary search between lo and hi bounds.
9264while test "x$ac_lo" != "x$ac_hi"; do
9265 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9266 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009267/* confdefs.h. */
9268_ACEOF
9269cat confdefs.h >>conftest.$ac_ext
9270cat >>conftest.$ac_ext <<_ACEOF
9271/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009272$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009273int
9274main ()
9275{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009276static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009277test_array [0] = 0
9278
9279 ;
9280 return 0;
9281}
9282_ACEOF
9283rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009284if { (ac_try="$ac_compile"
9285case "(($ac_try" in
9286 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9287 *) ac_try_echo=$ac_try;;
9288esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009289eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9290$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009291 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009292 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009293 grep -v '^ *+' conftest.er1 >conftest.err
9294 rm -f conftest.er1
9295 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009296 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009297 (exit $ac_status); } && {
9298 test -z "$ac_c_werror_flag" ||
9299 test ! -s conftest.err
9300 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009301 ac_hi=$ac_mid
9302else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009303 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009304sed 's/^/| /' conftest.$ac_ext >&5
9305
Martin v. Löwiseba40652007-08-30 20:10:57 +00009306 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009307fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009308
9309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009310done
9311case $ac_lo in
9312?*) ac_cv_sizeof_short=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009313'') if test "$ac_cv_type_short" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00009314 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9315$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9316{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009317See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009318$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009319See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00009320 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009321 else
9322 ac_cv_sizeof_short=0
9323 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009324esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009325else
Martin v. Löwis11437992002-04-12 09:54:03 +00009326 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009327/* confdefs.h. */
9328_ACEOF
9329cat confdefs.h >>conftest.$ac_ext
9330cat >>conftest.$ac_ext <<_ACEOF
9331/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009332$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +00009333static long int longval () { return (long int) (sizeof (short)); }
9334static unsigned long int ulongval () { return (long int) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009335#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009336#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009337int
9338main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009339{
Martin v. Löwis11437992002-04-12 09:54:03 +00009340
9341 FILE *f = fopen ("conftest.val", "w");
9342 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009343 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00009344 if (((long int) (sizeof (short))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009345 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009346 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +00009347 if (i != ((long int) (sizeof (short))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009348 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00009349 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009350 }
9351 else
9352 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009353 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +00009354 if (i != ((long int) (sizeof (short))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009355 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00009356 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009357 }
Benjamin Peterson697cd212010-05-02 16:45:11 +00009358 /* Do not output a trailing newline, as this causes \r\n confusion
9359 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +00009360 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009361
9362 ;
9363 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009364}
Martin v. Löwis11437992002-04-12 09:54:03 +00009365_ACEOF
9366rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009367if { (ac_try="$ac_link"
9368case "(($ac_try" in
9369 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9370 *) ac_try_echo=$ac_try;;
9371esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009372eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9373$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009374 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009375 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00009376 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009378 { (case "(($ac_try" in
9379 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9380 *) ac_try_echo=$ac_try;;
9381esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009382eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9383$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009384 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009385 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00009386 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009387 (exit $ac_status); }; }; then
9388 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009389else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009390 $as_echo "$as_me: program exited with status $ac_status" >&5
9391$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009392sed 's/^/| /' conftest.$ac_ext >&5
9393
Martin v. Löwis11437992002-04-12 09:54:03 +00009394( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009395if test "$ac_cv_type_short" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00009396 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9397$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9398{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009399See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009400$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009401See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00009402 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009403 else
9404 ac_cv_sizeof_short=0
9405 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009406fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00009407rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00009408rm -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 +00009409fi
9410rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009411fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00009412{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9413$as_echo "$ac_cv_sizeof_short" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009414
9415
9416
Martin v. Löwis11437992002-04-12 09:54:03 +00009417cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009418#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009419_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009420
9421
Martin v. Löwiseba40652007-08-30 20:10:57 +00009422# The cast to long int works around a bug in the HP C Compiler
9423# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9424# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9425# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +00009426{ $as_echo "$as_me:$LINENO: checking size of float" >&5
9427$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009428if test "${ac_cv_sizeof_float+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00009429 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009430else
Martin v. Löwis11437992002-04-12 09:54:03 +00009431 if test "$cross_compiling" = yes; then
9432 # Depending upon the size, compute the lo and hi bounds.
9433cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009434/* confdefs.h. */
9435_ACEOF
9436cat confdefs.h >>conftest.$ac_ext
9437cat >>conftest.$ac_ext <<_ACEOF
9438/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009439$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009440int
9441main ()
9442{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009443static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009444test_array [0] = 0
9445
9446 ;
9447 return 0;
9448}
9449_ACEOF
9450rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009451if { (ac_try="$ac_compile"
9452case "(($ac_try" in
9453 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9454 *) ac_try_echo=$ac_try;;
9455esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009456eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9457$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009458 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009459 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009460 grep -v '^ *+' conftest.er1 >conftest.err
9461 rm -f conftest.er1
9462 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009463 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009464 (exit $ac_status); } && {
9465 test -z "$ac_c_werror_flag" ||
9466 test ! -s conftest.err
9467 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_lo=0 ac_mid=0
9469 while :; do
9470 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009471/* confdefs.h. */
9472_ACEOF
9473cat confdefs.h >>conftest.$ac_ext
9474cat >>conftest.$ac_ext <<_ACEOF
9475/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009476$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009477int
9478main ()
9479{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009480static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009481test_array [0] = 0
9482
9483 ;
9484 return 0;
9485}
9486_ACEOF
9487rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009488if { (ac_try="$ac_compile"
9489case "(($ac_try" in
9490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9491 *) ac_try_echo=$ac_try;;
9492esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009493eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9494$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009495 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009496 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009497 grep -v '^ *+' conftest.er1 >conftest.err
9498 rm -f conftest.er1
9499 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009500 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009501 (exit $ac_status); } && {
9502 test -z "$ac_c_werror_flag" ||
9503 test ! -s conftest.err
9504 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 ac_hi=$ac_mid; break
9506else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009507 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009508sed 's/^/| /' conftest.$ac_ext >&5
9509
Martin v. Löwiseba40652007-08-30 20:10:57 +00009510 ac_lo=`expr $ac_mid + 1`
9511 if test $ac_lo -le $ac_mid; then
9512 ac_lo= ac_hi=
9513 break
9514 fi
9515 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009516fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009517
9518rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009519 done
9520else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009521 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009522sed 's/^/| /' conftest.$ac_ext >&5
9523
Martin v. Löwiseba40652007-08-30 20:10:57 +00009524 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009525/* confdefs.h. */
9526_ACEOF
9527cat confdefs.h >>conftest.$ac_ext
9528cat >>conftest.$ac_ext <<_ACEOF
9529/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009530$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009531int
9532main ()
9533{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009534static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009535test_array [0] = 0
9536
9537 ;
9538 return 0;
9539}
9540_ACEOF
9541rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009542if { (ac_try="$ac_compile"
9543case "(($ac_try" in
9544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9545 *) ac_try_echo=$ac_try;;
9546esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009547eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9548$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009549 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009550 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009551 grep -v '^ *+' conftest.er1 >conftest.err
9552 rm -f conftest.er1
9553 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009554 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009555 (exit $ac_status); } && {
9556 test -z "$ac_c_werror_flag" ||
9557 test ! -s conftest.err
9558 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009559 ac_hi=-1 ac_mid=-1
9560 while :; do
9561 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009562/* confdefs.h. */
9563_ACEOF
9564cat confdefs.h >>conftest.$ac_ext
9565cat >>conftest.$ac_ext <<_ACEOF
9566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009567$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009568int
9569main ()
9570{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009571static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009572test_array [0] = 0
9573
9574 ;
9575 return 0;
9576}
9577_ACEOF
9578rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009579if { (ac_try="$ac_compile"
9580case "(($ac_try" in
9581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9582 *) ac_try_echo=$ac_try;;
9583esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009584eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9585$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009588 grep -v '^ *+' conftest.er1 >conftest.err
9589 rm -f conftest.er1
9590 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009591 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009592 (exit $ac_status); } && {
9593 test -z "$ac_c_werror_flag" ||
9594 test ! -s conftest.err
9595 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009596 ac_lo=$ac_mid; break
9597else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009598 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009599sed 's/^/| /' conftest.$ac_ext >&5
9600
Martin v. Löwiseba40652007-08-30 20:10:57 +00009601 ac_hi=`expr '(' $ac_mid ')' - 1`
9602 if test $ac_mid -le $ac_hi; then
9603 ac_lo= ac_hi=
9604 break
9605 fi
9606 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009607fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009608
9609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009610 done
9611else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009612 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009613sed 's/^/| /' conftest.$ac_ext >&5
9614
Martin v. Löwiseba40652007-08-30 20:10:57 +00009615 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009617
9618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009619fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009620
9621rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009622# Binary search between lo and hi bounds.
9623while test "x$ac_lo" != "x$ac_hi"; do
9624 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009626/* confdefs.h. */
9627_ACEOF
9628cat confdefs.h >>conftest.$ac_ext
9629cat >>conftest.$ac_ext <<_ACEOF
9630/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009631$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009632int
9633main ()
9634{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009635static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009636test_array [0] = 0
9637
9638 ;
9639 return 0;
9640}
9641_ACEOF
9642rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009643if { (ac_try="$ac_compile"
9644case "(($ac_try" in
9645 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9646 *) ac_try_echo=$ac_try;;
9647esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009648eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9649$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009650 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009651 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009652 grep -v '^ *+' conftest.er1 >conftest.err
9653 rm -f conftest.er1
9654 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009655 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009656 (exit $ac_status); } && {
9657 test -z "$ac_c_werror_flag" ||
9658 test ! -s conftest.err
9659 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009660 ac_hi=$ac_mid
9661else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009662 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009663sed 's/^/| /' conftest.$ac_ext >&5
9664
Martin v. Löwiseba40652007-08-30 20:10:57 +00009665 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009667
9668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009669done
9670case $ac_lo in
9671?*) ac_cv_sizeof_float=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +00009672'') if test "$ac_cv_type_float" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00009673 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9674$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9675{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009676See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009677$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009678See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00009679 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009680 else
9681 ac_cv_sizeof_float=0
9682 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009683esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009684else
Martin v. Löwis11437992002-04-12 09:54:03 +00009685 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009686/* confdefs.h. */
9687_ACEOF
9688cat confdefs.h >>conftest.$ac_ext
9689cat >>conftest.$ac_ext <<_ACEOF
9690/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009691$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +00009692static long int longval () { return (long int) (sizeof (float)); }
9693static unsigned long int ulongval () { return (long int) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009694#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009695#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009696int
9697main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009698{
Martin v. Löwis11437992002-04-12 09:54:03 +00009699
9700 FILE *f = fopen ("conftest.val", "w");
9701 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +00009702 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00009703 if (((long int) (sizeof (float))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009704 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009705 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +00009706 if (i != ((long int) (sizeof (float))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009707 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00009708 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009709 }
9710 else
9711 {
Martin v. Löwiseba40652007-08-30 20:10:57 +00009712 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +00009713 if (i != ((long int) (sizeof (float))))
Martin v. Löwiseba40652007-08-30 20:10:57 +00009714 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +00009715 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009716 }
Benjamin Peterson697cd212010-05-02 16:45:11 +00009717 /* Do not output a trailing newline, as this causes \r\n confusion
9718 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +00009719 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009720
9721 ;
9722 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009723}
Martin v. Löwis11437992002-04-12 09:54:03 +00009724_ACEOF
9725rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009726if { (ac_try="$ac_link"
9727case "(($ac_try" in
9728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9729 *) ac_try_echo=$ac_try;;
9730esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009731eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9732$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009733 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009734 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00009735 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +00009737 { (case "(($ac_try" in
9738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9739 *) ac_try_echo=$ac_try;;
9740esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009741eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9742$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009743 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009744 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +00009745 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009746 (exit $ac_status); }; }; then
9747 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009748else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009749 $as_echo "$as_me: program exited with status $ac_status" >&5
9750$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009751sed 's/^/| /' conftest.$ac_ext >&5
9752
Martin v. Löwis11437992002-04-12 09:54:03 +00009753( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +00009754if test "$ac_cv_type_float" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00009755 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9756$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9757{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009758See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009759$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009760See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +00009761 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009762 else
9763 ac_cv_sizeof_float=0
9764 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009765fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00009766rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +00009767rm -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 +00009768fi
9769rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009770fi
Benjamin Peterson697cd212010-05-02 16:45:11 +00009771{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
9772$as_echo "$ac_cv_sizeof_float" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +00009773
9774
9775
Martin v. Löwis11437992002-04-12 09:54:03 +00009776cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009777#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +00009778_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009779
9780
Martin v. Löwiseba40652007-08-30 20:10:57 +00009781# The cast to long int works around a bug in the HP C Compiler
9782# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9783# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9784# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +00009785{ $as_echo "$as_me:$LINENO: checking size of double" >&5
9786$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009787if test "${ac_cv_sizeof_double+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +00009788 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009789else
Martin v. Löwis11437992002-04-12 09:54:03 +00009790 if test "$cross_compiling" = yes; then
9791 # Depending upon the size, compute the lo and hi bounds.
9792cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009793/* confdefs.h. */
9794_ACEOF
9795cat confdefs.h >>conftest.$ac_ext
9796cat >>conftest.$ac_ext <<_ACEOF
9797/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009798$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009799int
9800main ()
9801{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009802static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009803test_array [0] = 0
9804
9805 ;
9806 return 0;
9807}
9808_ACEOF
9809rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009810if { (ac_try="$ac_compile"
9811case "(($ac_try" in
9812 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9813 *) ac_try_echo=$ac_try;;
9814esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009815eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9816$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009817 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009818 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009819 grep -v '^ *+' conftest.er1 >conftest.err
9820 rm -f conftest.er1
9821 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009822 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009823 (exit $ac_status); } && {
9824 test -z "$ac_c_werror_flag" ||
9825 test ! -s conftest.err
9826 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 ac_lo=0 ac_mid=0
9828 while :; do
9829 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009830/* confdefs.h. */
9831_ACEOF
9832cat confdefs.h >>conftest.$ac_ext
9833cat >>conftest.$ac_ext <<_ACEOF
9834/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009835$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009836int
9837main ()
9838{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009839static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009840test_array [0] = 0
9841
9842 ;
9843 return 0;
9844}
9845_ACEOF
9846rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009847if { (ac_try="$ac_compile"
9848case "(($ac_try" in
9849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9850 *) ac_try_echo=$ac_try;;
9851esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009852eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9853$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009854 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009856 grep -v '^ *+' conftest.er1 >conftest.err
9857 rm -f conftest.er1
9858 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009859 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009860 (exit $ac_status); } && {
9861 test -z "$ac_c_werror_flag" ||
9862 test ! -s conftest.err
9863 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 ac_hi=$ac_mid; break
9865else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009866 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009867sed 's/^/| /' conftest.$ac_ext >&5
9868
Martin v. Löwiseba40652007-08-30 20:10:57 +00009869 ac_lo=`expr $ac_mid + 1`
9870 if test $ac_lo -le $ac_mid; then
9871 ac_lo= ac_hi=
9872 break
9873 fi
9874 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009875fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009876
9877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009878 done
9879else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009880 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009881sed 's/^/| /' conftest.$ac_ext >&5
9882
Martin v. Löwiseba40652007-08-30 20:10:57 +00009883 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009884/* confdefs.h. */
9885_ACEOF
9886cat confdefs.h >>conftest.$ac_ext
9887cat >>conftest.$ac_ext <<_ACEOF
9888/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009889$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009890int
9891main ()
9892{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009893static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009894test_array [0] = 0
9895
9896 ;
9897 return 0;
9898}
9899_ACEOF
9900rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009901if { (ac_try="$ac_compile"
9902case "(($ac_try" in
9903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9904 *) ac_try_echo=$ac_try;;
9905esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009906eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9907$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009908 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009909 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009910 grep -v '^ *+' conftest.er1 >conftest.err
9911 rm -f conftest.er1
9912 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009913 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009914 (exit $ac_status); } && {
9915 test -z "$ac_c_werror_flag" ||
9916 test ! -s conftest.err
9917 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009918 ac_hi=-1 ac_mid=-1
9919 while :; do
9920 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009921/* confdefs.h. */
9922_ACEOF
9923cat confdefs.h >>conftest.$ac_ext
9924cat >>conftest.$ac_ext <<_ACEOF
9925/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009926$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009927int
9928main ()
9929{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009930static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009931test_array [0] = 0
9932
9933 ;
9934 return 0;
9935}
9936_ACEOF
9937rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +00009938if { (ac_try="$ac_compile"
9939case "(($ac_try" in
9940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9941 *) ac_try_echo=$ac_try;;
9942esac
Benjamin Peterson697cd212010-05-02 16:45:11 +00009943eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9944$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009945 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009946 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009947 grep -v '^ *+' conftest.er1 >conftest.err
9948 rm -f conftest.er1
9949 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +00009950 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +00009951 (exit $ac_status); } && {
9952 test -z "$ac_c_werror_flag" ||
9953 test ! -s conftest.err
9954 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009955 ac_lo=$ac_mid; break
9956else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009957 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009958sed 's/^/| /' conftest.$ac_ext >&5
9959
Martin v. Löwiseba40652007-08-30 20:10:57 +00009960 ac_hi=`expr '(' $ac_mid ')' - 1`
9961 if test $ac_mid -le $ac_hi; then
9962 ac_lo= ac_hi=
9963 break
9964 fi
9965 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009966fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009967
9968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009969 done
9970else
Benjamin Peterson697cd212010-05-02 16:45:11 +00009971 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009972sed 's/^/| /' conftest.$ac_ext >&5
9973
Martin v. Löwiseba40652007-08-30 20:10:57 +00009974 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009976
9977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009978fi
Martin v. Löwiseba40652007-08-30 20:10:57 +00009979
9980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009981# Binary search between lo and hi bounds.
9982while test "x$ac_lo" != "x$ac_hi"; do
9983 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9984 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009985/* confdefs.h. */
9986_ACEOF
9987cat confdefs.h >>conftest.$ac_ext
9988cat >>conftest.$ac_ext <<_ACEOF
9989/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009990$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009991int
9992main ()
9993{
Benjamin Peterson697cd212010-05-02 16:45:11 +00009994static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009995test_array [0] = 0
9996
9997 ;
9998 return 0;
9999}
10000_ACEOF
10001rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010002if { (ac_try="$ac_compile"
10003case "(($ac_try" in
10004 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10005 *) ac_try_echo=$ac_try;;
10006esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010007eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10008$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010009 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010010 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010011 grep -v '^ *+' conftest.er1 >conftest.err
10012 rm -f conftest.er1
10013 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010014 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010015 (exit $ac_status); } && {
10016 test -z "$ac_c_werror_flag" ||
10017 test ! -s conftest.err
10018 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010019 ac_hi=$ac_mid
10020else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010021 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010022sed 's/^/| /' conftest.$ac_ext >&5
10023
Martin v. Löwiseba40652007-08-30 20:10:57 +000010024 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010025fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010026
10027rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010028done
10029case $ac_lo in
10030?*) ac_cv_sizeof_double=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010031'') if test "$ac_cv_type_double" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000010032 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10033$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10034{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010035See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010036$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010037See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000010038 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010039 else
10040 ac_cv_sizeof_double=0
10041 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010042esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000010043else
Martin v. Löwis11437992002-04-12 09:54:03 +000010044 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010045/* confdefs.h. */
10046_ACEOF
10047cat confdefs.h >>conftest.$ac_ext
10048cat >>conftest.$ac_ext <<_ACEOF
10049/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010050$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +000010051static long int longval () { return (long int) (sizeof (double)); }
10052static unsigned long int ulongval () { return (long int) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010053#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010054#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010055int
10056main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +000010057{
Martin v. Löwis11437992002-04-12 09:54:03 +000010058
10059 FILE *f = fopen ("conftest.val", "w");
10060 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010061 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000010062 if (((long int) (sizeof (double))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010063 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010064 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000010065 if (i != ((long int) (sizeof (double))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010066 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000010067 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010068 }
10069 else
10070 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010071 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000010072 if (i != ((long int) (sizeof (double))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010073 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000010074 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010075 }
Benjamin Peterson697cd212010-05-02 16:45:11 +000010076 /* Do not output a trailing newline, as this causes \r\n confusion
10077 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000010078 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010079
10080 ;
10081 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010082}
Martin v. Löwis11437992002-04-12 09:54:03 +000010083_ACEOF
10084rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010085if { (ac_try="$ac_link"
10086case "(($ac_try" in
10087 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10088 *) ac_try_echo=$ac_try;;
10089esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010090eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10091$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010092 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010093 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000010094 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010096 { (case "(($ac_try" in
10097 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10098 *) ac_try_echo=$ac_try;;
10099esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010100eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10101$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010102 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010103 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000010104 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010105 (exit $ac_status); }; }; then
10106 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010107else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010108 $as_echo "$as_me: program exited with status $ac_status" >&5
10109$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010110sed 's/^/| /' conftest.$ac_ext >&5
10111
Martin v. Löwis11437992002-04-12 09:54:03 +000010112( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010113if test "$ac_cv_type_double" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000010114 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10115$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10116{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010117See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010118$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010119See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000010120 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010121 else
10122 ac_cv_sizeof_double=0
10123 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010124fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000010125rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000010126rm -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 +000010127fi
10128rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010129fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000010130{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10131$as_echo "$ac_cv_sizeof_double" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010132
10133
10134
Martin v. Löwis11437992002-04-12 09:54:03 +000010135cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010136#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010137_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010138
10139
Martin v. Löwiseba40652007-08-30 20:10:57 +000010140# The cast to long int works around a bug in the HP C Compiler
10141# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10142# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10143# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +000010144{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5
10145$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010146if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000010147 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010148else
Martin v. Löwis11437992002-04-12 09:54:03 +000010149 if test "$cross_compiling" = yes; then
10150 # Depending upon the size, compute the lo and hi bounds.
10151cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010152/* confdefs.h. */
10153_ACEOF
10154cat confdefs.h >>conftest.$ac_ext
10155cat >>conftest.$ac_ext <<_ACEOF
10156/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010157$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010158int
10159main ()
10160{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010161static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010162test_array [0] = 0
10163
10164 ;
10165 return 0;
10166}
10167_ACEOF
10168rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010169if { (ac_try="$ac_compile"
10170case "(($ac_try" in
10171 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10172 *) ac_try_echo=$ac_try;;
10173esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010174eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10175$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010176 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010177 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010178 grep -v '^ *+' conftest.er1 >conftest.err
10179 rm -f conftest.er1
10180 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010181 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010182 (exit $ac_status); } && {
10183 test -z "$ac_c_werror_flag" ||
10184 test ! -s conftest.err
10185 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_lo=0 ac_mid=0
10187 while :; do
10188 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010189/* confdefs.h. */
10190_ACEOF
10191cat confdefs.h >>conftest.$ac_ext
10192cat >>conftest.$ac_ext <<_ACEOF
10193/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010194$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010195int
10196main ()
10197{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010198static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010199test_array [0] = 0
10200
10201 ;
10202 return 0;
10203}
10204_ACEOF
10205rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010206if { (ac_try="$ac_compile"
10207case "(($ac_try" in
10208 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10209 *) ac_try_echo=$ac_try;;
10210esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010211eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10212$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010213 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010214 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010215 grep -v '^ *+' conftest.er1 >conftest.err
10216 rm -f conftest.er1
10217 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010218 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010219 (exit $ac_status); } && {
10220 test -z "$ac_c_werror_flag" ||
10221 test ! -s conftest.err
10222 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 ac_hi=$ac_mid; break
10224else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010225 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010226sed 's/^/| /' conftest.$ac_ext >&5
10227
Martin v. Löwiseba40652007-08-30 20:10:57 +000010228 ac_lo=`expr $ac_mid + 1`
10229 if test $ac_lo -le $ac_mid; then
10230 ac_lo= ac_hi=
10231 break
10232 fi
10233 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010234fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010235
10236rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010237 done
10238else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010239 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010240sed 's/^/| /' conftest.$ac_ext >&5
10241
Martin v. Löwiseba40652007-08-30 20:10:57 +000010242 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010243/* confdefs.h. */
10244_ACEOF
10245cat confdefs.h >>conftest.$ac_ext
10246cat >>conftest.$ac_ext <<_ACEOF
10247/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010248$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010249int
10250main ()
10251{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010252static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010253test_array [0] = 0
10254
10255 ;
10256 return 0;
10257}
10258_ACEOF
10259rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010260if { (ac_try="$ac_compile"
10261case "(($ac_try" in
10262 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10263 *) ac_try_echo=$ac_try;;
10264esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010265eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10266$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010267 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010268 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010269 grep -v '^ *+' conftest.er1 >conftest.err
10270 rm -f conftest.er1
10271 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010272 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010273 (exit $ac_status); } && {
10274 test -z "$ac_c_werror_flag" ||
10275 test ! -s conftest.err
10276 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010277 ac_hi=-1 ac_mid=-1
10278 while :; do
10279 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010280/* confdefs.h. */
10281_ACEOF
10282cat confdefs.h >>conftest.$ac_ext
10283cat >>conftest.$ac_ext <<_ACEOF
10284/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010285$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010286int
10287main ()
10288{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010289static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010290test_array [0] = 0
10291
10292 ;
10293 return 0;
10294}
10295_ACEOF
10296rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010297if { (ac_try="$ac_compile"
10298case "(($ac_try" in
10299 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10300 *) ac_try_echo=$ac_try;;
10301esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010302eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10303$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010304 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010305 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010306 grep -v '^ *+' conftest.er1 >conftest.err
10307 rm -f conftest.er1
10308 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010309 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010310 (exit $ac_status); } && {
10311 test -z "$ac_c_werror_flag" ||
10312 test ! -s conftest.err
10313 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010314 ac_lo=$ac_mid; break
10315else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010316 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010317sed 's/^/| /' conftest.$ac_ext >&5
10318
Martin v. Löwiseba40652007-08-30 20:10:57 +000010319 ac_hi=`expr '(' $ac_mid ')' - 1`
10320 if test $ac_mid -le $ac_hi; then
10321 ac_lo= ac_hi=
10322 break
10323 fi
10324 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010325fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010326
10327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010328 done
10329else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010330 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010331sed 's/^/| /' conftest.$ac_ext >&5
10332
Martin v. Löwiseba40652007-08-30 20:10:57 +000010333 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010334fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010335
10336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010337fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010338
10339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010340# Binary search between lo and hi bounds.
10341while test "x$ac_lo" != "x$ac_hi"; do
10342 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10343 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010344/* confdefs.h. */
10345_ACEOF
10346cat confdefs.h >>conftest.$ac_ext
10347cat >>conftest.$ac_ext <<_ACEOF
10348/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010349$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010350int
10351main ()
10352{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010353static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010354test_array [0] = 0
10355
10356 ;
10357 return 0;
10358}
10359_ACEOF
10360rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010361if { (ac_try="$ac_compile"
10362case "(($ac_try" in
10363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10364 *) ac_try_echo=$ac_try;;
10365esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010366eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10367$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010368 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010369 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010370 grep -v '^ *+' conftest.er1 >conftest.err
10371 rm -f conftest.er1
10372 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010373 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010374 (exit $ac_status); } && {
10375 test -z "$ac_c_werror_flag" ||
10376 test ! -s conftest.err
10377 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010378 ac_hi=$ac_mid
10379else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010380 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010381sed 's/^/| /' conftest.$ac_ext >&5
10382
Martin v. Löwiseba40652007-08-30 20:10:57 +000010383 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010384fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010385
10386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010387done
10388case $ac_lo in
10389?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010390'') if test "$ac_cv_type_fpos_t" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000010391 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10392$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10393{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010394See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010395$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010396See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000010397 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010398 else
10399 ac_cv_sizeof_fpos_t=0
10400 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010401esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010402else
Martin v. Löwis11437992002-04-12 09:54:03 +000010403 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010404/* confdefs.h. */
10405_ACEOF
10406cat confdefs.h >>conftest.$ac_ext
10407cat >>conftest.$ac_ext <<_ACEOF
10408/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010409$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +000010410static long int longval () { return (long int) (sizeof (fpos_t)); }
10411static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010412#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010413#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010414int
10415main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010416{
Martin v. Löwis11437992002-04-12 09:54:03 +000010417
10418 FILE *f = fopen ("conftest.val", "w");
10419 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010420 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000010421 if (((long int) (sizeof (fpos_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010422 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010423 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000010424 if (i != ((long int) (sizeof (fpos_t))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010425 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000010426 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010427 }
10428 else
10429 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010430 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000010431 if (i != ((long int) (sizeof (fpos_t))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010432 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000010433 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010434 }
Benjamin Peterson697cd212010-05-02 16:45:11 +000010435 /* Do not output a trailing newline, as this causes \r\n confusion
10436 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000010437 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010438
10439 ;
10440 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010441}
Martin v. Löwis11437992002-04-12 09:54:03 +000010442_ACEOF
10443rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010444if { (ac_try="$ac_link"
10445case "(($ac_try" in
10446 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10447 *) ac_try_echo=$ac_try;;
10448esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010449eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10450$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010451 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010452 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000010453 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010455 { (case "(($ac_try" in
10456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10457 *) ac_try_echo=$ac_try;;
10458esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010459eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10460$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010461 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010462 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000010463 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010464 (exit $ac_status); }; }; then
10465 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010466else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010467 $as_echo "$as_me: program exited with status $ac_status" >&5
10468$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010469sed 's/^/| /' conftest.$ac_ext >&5
10470
Martin v. Löwis11437992002-04-12 09:54:03 +000010471( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010472if test "$ac_cv_type_fpos_t" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000010473 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10474$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10475{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010476See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010477$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010478See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000010479 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010480 else
10481 ac_cv_sizeof_fpos_t=0
10482 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010483fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000010484rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000010485rm -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 +000010486fi
10487rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010488fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000010489{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10490$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010491
10492
10493
Martin v. Löwis11437992002-04-12 09:54:03 +000010494cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010495#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010496_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010497
Michael W. Hudson54241132001-12-07 15:38:26 +000010498
Martin v. Löwiseba40652007-08-30 20:10:57 +000010499# The cast to long int works around a bug in the HP C Compiler
10500# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10501# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10502# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +000010503{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
10504$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010505if test "${ac_cv_sizeof_size_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000010506 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010507else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010508 if test "$cross_compiling" = yes; then
10509 # Depending upon the size, compute the lo and hi bounds.
10510cat >conftest.$ac_ext <<_ACEOF
10511/* confdefs.h. */
10512_ACEOF
10513cat confdefs.h >>conftest.$ac_ext
10514cat >>conftest.$ac_ext <<_ACEOF
10515/* end confdefs.h. */
10516$ac_includes_default
10517int
10518main ()
10519{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010520static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010521test_array [0] = 0
10522
10523 ;
10524 return 0;
10525}
10526_ACEOF
10527rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010528if { (ac_try="$ac_compile"
10529case "(($ac_try" in
10530 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10531 *) ac_try_echo=$ac_try;;
10532esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010533eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10534$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010535 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010536 ac_status=$?
10537 grep -v '^ *+' conftest.er1 >conftest.err
10538 rm -f conftest.er1
10539 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010540 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010541 (exit $ac_status); } && {
10542 test -z "$ac_c_werror_flag" ||
10543 test ! -s conftest.err
10544 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010545 ac_lo=0 ac_mid=0
10546 while :; do
10547 cat >conftest.$ac_ext <<_ACEOF
10548/* confdefs.h. */
10549_ACEOF
10550cat confdefs.h >>conftest.$ac_ext
10551cat >>conftest.$ac_ext <<_ACEOF
10552/* end confdefs.h. */
10553$ac_includes_default
10554int
10555main ()
10556{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010557static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010558test_array [0] = 0
10559
10560 ;
10561 return 0;
10562}
10563_ACEOF
10564rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010565if { (ac_try="$ac_compile"
10566case "(($ac_try" in
10567 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10568 *) ac_try_echo=$ac_try;;
10569esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010570eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10571$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010572 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010573 ac_status=$?
10574 grep -v '^ *+' conftest.er1 >conftest.err
10575 rm -f conftest.er1
10576 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010577 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010578 (exit $ac_status); } && {
10579 test -z "$ac_c_werror_flag" ||
10580 test ! -s conftest.err
10581 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010582 ac_hi=$ac_mid; break
10583else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010584 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010585sed 's/^/| /' conftest.$ac_ext >&5
10586
Martin v. Löwiseba40652007-08-30 20:10:57 +000010587 ac_lo=`expr $ac_mid + 1`
10588 if test $ac_lo -le $ac_mid; then
10589 ac_lo= ac_hi=
10590 break
10591 fi
10592 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010593fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010594
10595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010596 done
10597else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010598 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010599sed 's/^/| /' conftest.$ac_ext >&5
10600
Martin v. Löwiseba40652007-08-30 20:10:57 +000010601 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010602/* confdefs.h. */
10603_ACEOF
10604cat confdefs.h >>conftest.$ac_ext
10605cat >>conftest.$ac_ext <<_ACEOF
10606/* end confdefs.h. */
10607$ac_includes_default
10608int
10609main ()
10610{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010611static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010612test_array [0] = 0
10613
10614 ;
10615 return 0;
10616}
10617_ACEOF
10618rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010619if { (ac_try="$ac_compile"
10620case "(($ac_try" in
10621 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10622 *) ac_try_echo=$ac_try;;
10623esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010624eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10625$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010626 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010627 ac_status=$?
10628 grep -v '^ *+' conftest.er1 >conftest.err
10629 rm -f conftest.er1
10630 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010631 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010632 (exit $ac_status); } && {
10633 test -z "$ac_c_werror_flag" ||
10634 test ! -s conftest.err
10635 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010636 ac_hi=-1 ac_mid=-1
10637 while :; do
10638 cat >conftest.$ac_ext <<_ACEOF
10639/* confdefs.h. */
10640_ACEOF
10641cat confdefs.h >>conftest.$ac_ext
10642cat >>conftest.$ac_ext <<_ACEOF
10643/* end confdefs.h. */
10644$ac_includes_default
10645int
10646main ()
10647{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010648static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010649test_array [0] = 0
10650
10651 ;
10652 return 0;
10653}
10654_ACEOF
10655rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010656if { (ac_try="$ac_compile"
10657case "(($ac_try" in
10658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10659 *) ac_try_echo=$ac_try;;
10660esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010661eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10662$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010663 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010664 ac_status=$?
10665 grep -v '^ *+' conftest.er1 >conftest.err
10666 rm -f conftest.er1
10667 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010668 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010669 (exit $ac_status); } && {
10670 test -z "$ac_c_werror_flag" ||
10671 test ! -s conftest.err
10672 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010673 ac_lo=$ac_mid; break
10674else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010675 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010676sed 's/^/| /' conftest.$ac_ext >&5
10677
Martin v. Löwiseba40652007-08-30 20:10:57 +000010678 ac_hi=`expr '(' $ac_mid ')' - 1`
10679 if test $ac_mid -le $ac_hi; then
10680 ac_lo= ac_hi=
10681 break
10682 fi
10683 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010684fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010685
10686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010687 done
10688else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010689 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010690sed 's/^/| /' conftest.$ac_ext >&5
10691
Martin v. Löwiseba40652007-08-30 20:10:57 +000010692 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010693fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010694
10695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010696fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010697
10698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010699# Binary search between lo and hi bounds.
10700while test "x$ac_lo" != "x$ac_hi"; do
10701 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10702 cat >conftest.$ac_ext <<_ACEOF
10703/* confdefs.h. */
10704_ACEOF
10705cat confdefs.h >>conftest.$ac_ext
10706cat >>conftest.$ac_ext <<_ACEOF
10707/* end confdefs.h. */
10708$ac_includes_default
10709int
10710main ()
10711{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010712static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010713test_array [0] = 0
10714
10715 ;
10716 return 0;
10717}
10718_ACEOF
10719rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010720if { (ac_try="$ac_compile"
10721case "(($ac_try" in
10722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10723 *) ac_try_echo=$ac_try;;
10724esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010725eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10726$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010727 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010728 ac_status=$?
10729 grep -v '^ *+' conftest.er1 >conftest.err
10730 rm -f conftest.er1
10731 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010732 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010733 (exit $ac_status); } && {
10734 test -z "$ac_c_werror_flag" ||
10735 test ! -s conftest.err
10736 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010737 ac_hi=$ac_mid
10738else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010739 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010740sed 's/^/| /' conftest.$ac_ext >&5
10741
Martin v. Löwiseba40652007-08-30 20:10:57 +000010742 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010743fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000010744
10745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010746done
10747case $ac_lo in
10748?*) ac_cv_sizeof_size_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000010749'') if test "$ac_cv_type_size_t" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000010750 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10751$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10752{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010753See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010754$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010755See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000010756 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010757 else
10758 ac_cv_sizeof_size_t=0
10759 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010760esac
10761else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010762 cat >conftest.$ac_ext <<_ACEOF
10763/* confdefs.h. */
10764_ACEOF
10765cat confdefs.h >>conftest.$ac_ext
10766cat >>conftest.$ac_ext <<_ACEOF
10767/* end confdefs.h. */
10768$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +000010769static long int longval () { return (long int) (sizeof (size_t)); }
10770static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010771#include <stdio.h>
10772#include <stdlib.h>
10773int
10774main ()
10775{
10776
10777 FILE *f = fopen ("conftest.val", "w");
10778 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000010779 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000010780 if (((long int) (sizeof (size_t))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010781 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010782 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000010783 if (i != ((long int) (sizeof (size_t))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010784 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000010785 fprintf (f, "%ld", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010786 }
10787 else
10788 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000010789 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000010790 if (i != ((long int) (sizeof (size_t))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000010791 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000010792 fprintf (f, "%lu", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000010793 }
Benjamin Peterson697cd212010-05-02 16:45:11 +000010794 /* Do not output a trailing newline, as this causes \r\n confusion
10795 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000010796 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000010797
10798 ;
10799 return 0;
10800}
10801_ACEOF
10802rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000010803if { (ac_try="$ac_link"
10804case "(($ac_try" in
10805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10806 *) ac_try_echo=$ac_try;;
10807esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010808eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10809$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010810 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010811 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000010812 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010813 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000010814 { (case "(($ac_try" in
10815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10816 *) ac_try_echo=$ac_try;;
10817esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010818eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10819$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000010820 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010821 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000010822 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010823 (exit $ac_status); }; }; then
10824 ac_cv_sizeof_size_t=`cat conftest.val`
10825else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010826 $as_echo "$as_me: program exited with status $ac_status" >&5
10827$as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010828sed 's/^/| /' conftest.$ac_ext >&5
10829
10830( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000010831if test "$ac_cv_type_size_t" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000010832 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10834{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010835See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010836$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000010837See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000010838 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010839 else
10840 ac_cv_sizeof_size_t=0
10841 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000010842fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000010843rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000010844rm -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 +000010845fi
10846rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000010847fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000010848{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
10849$as_echo "$ac_cv_sizeof_size_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000010850
10851
10852
Martin v. Löwis18e16552006-02-15 17:27:45 +000010853cat >>confdefs.h <<_ACEOF
10854#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
10855_ACEOF
10856
10857
Christian Heimes951cc0f2008-01-31 23:08:23 +000010858# The cast to long int works around a bug in the HP C Compiler
10859# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10860# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10861# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +000010862{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5
10863$as_echo_n "checking size of pid_t... " >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000010864if test "${ac_cv_sizeof_pid_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000010865 $as_echo_n "(cached) " >&6
Christian Heimes951cc0f2008-01-31 23:08:23 +000010866else
10867 if test "$cross_compiling" = yes; then
10868 # Depending upon the size, compute the lo and hi bounds.
10869cat >conftest.$ac_ext <<_ACEOF
10870/* confdefs.h. */
10871_ACEOF
10872cat confdefs.h >>conftest.$ac_ext
10873cat >>conftest.$ac_ext <<_ACEOF
10874/* end confdefs.h. */
10875$ac_includes_default
Christian Heimes951cc0f2008-01-31 23:08:23 +000010876int
10877main ()
10878{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010879static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010880test_array [0] = 0
10881
10882 ;
10883 return 0;
10884}
10885_ACEOF
10886rm -f conftest.$ac_objext
10887if { (ac_try="$ac_compile"
10888case "(($ac_try" in
10889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10890 *) ac_try_echo=$ac_try;;
10891esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010892eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10893$as_echo "$ac_try_echo") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010894 (eval "$ac_compile") 2>conftest.er1
10895 ac_status=$?
10896 grep -v '^ *+' conftest.er1 >conftest.err
10897 rm -f conftest.er1
10898 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010899 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010900 (exit $ac_status); } && {
10901 test -z "$ac_c_werror_flag" ||
10902 test ! -s conftest.err
10903 } && test -s conftest.$ac_objext; then
10904 ac_lo=0 ac_mid=0
10905 while :; do
10906 cat >conftest.$ac_ext <<_ACEOF
10907/* confdefs.h. */
10908_ACEOF
10909cat confdefs.h >>conftest.$ac_ext
10910cat >>conftest.$ac_ext <<_ACEOF
10911/* end confdefs.h. */
10912$ac_includes_default
Christian Heimes951cc0f2008-01-31 23:08:23 +000010913int
10914main ()
10915{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010916static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010917test_array [0] = 0
10918
10919 ;
10920 return 0;
10921}
10922_ACEOF
10923rm -f conftest.$ac_objext
10924if { (ac_try="$ac_compile"
10925case "(($ac_try" in
10926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10927 *) ac_try_echo=$ac_try;;
10928esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010929eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10930$as_echo "$ac_try_echo") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010931 (eval "$ac_compile") 2>conftest.er1
10932 ac_status=$?
10933 grep -v '^ *+' conftest.er1 >conftest.err
10934 rm -f conftest.er1
10935 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010936 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010937 (exit $ac_status); } && {
10938 test -z "$ac_c_werror_flag" ||
10939 test ! -s conftest.err
10940 } && test -s conftest.$ac_objext; then
10941 ac_hi=$ac_mid; break
10942else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010943 $as_echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010944sed 's/^/| /' conftest.$ac_ext >&5
10945
10946 ac_lo=`expr $ac_mid + 1`
10947 if test $ac_lo -le $ac_mid; then
10948 ac_lo= ac_hi=
10949 break
10950 fi
10951 ac_mid=`expr 2 '*' $ac_mid + 1`
10952fi
10953
10954rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10955 done
10956else
Benjamin Peterson697cd212010-05-02 16:45:11 +000010957 $as_echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010958sed 's/^/| /' conftest.$ac_ext >&5
10959
10960 cat >conftest.$ac_ext <<_ACEOF
10961/* confdefs.h. */
10962_ACEOF
10963cat confdefs.h >>conftest.$ac_ext
10964cat >>conftest.$ac_ext <<_ACEOF
10965/* end confdefs.h. */
10966$ac_includes_default
Christian Heimes951cc0f2008-01-31 23:08:23 +000010967int
10968main ()
10969{
Benjamin Peterson697cd212010-05-02 16:45:11 +000010970static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) < 0)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000010971test_array [0] = 0
10972
10973 ;
10974 return 0;
10975}
10976_ACEOF
10977rm -f conftest.$ac_objext
10978if { (ac_try="$ac_compile"
10979case "(($ac_try" in
10980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10981 *) ac_try_echo=$ac_try;;
10982esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000010983eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10984$as_echo "$ac_try_echo") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010985 (eval "$ac_compile") 2>conftest.er1
10986 ac_status=$?
10987 grep -v '^ *+' conftest.er1 >conftest.err
10988 rm -f conftest.er1
10989 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000010990 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000010991 (exit $ac_status); } && {
10992 test -z "$ac_c_werror_flag" ||
10993 test ! -s conftest.err
10994 } && test -s conftest.$ac_objext; then
10995 ac_hi=-1 ac_mid=-1
10996 while :; do
10997 cat >conftest.$ac_ext <<_ACEOF
10998/* confdefs.h. */
10999_ACEOF
11000cat confdefs.h >>conftest.$ac_ext
11001cat >>conftest.$ac_ext <<_ACEOF
11002/* end confdefs.h. */
11003$ac_includes_default
Christian Heimes951cc0f2008-01-31 23:08:23 +000011004int
11005main ()
11006{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011007static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011008test_array [0] = 0
11009
11010 ;
11011 return 0;
11012}
11013_ACEOF
11014rm -f conftest.$ac_objext
11015if { (ac_try="$ac_compile"
11016case "(($ac_try" in
11017 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11018 *) ac_try_echo=$ac_try;;
11019esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011020eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11021$as_echo "$ac_try_echo") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011022 (eval "$ac_compile") 2>conftest.er1
11023 ac_status=$?
11024 grep -v '^ *+' conftest.er1 >conftest.err
11025 rm -f conftest.er1
11026 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011027 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011028 (exit $ac_status); } && {
11029 test -z "$ac_c_werror_flag" ||
11030 test ! -s conftest.err
11031 } && test -s conftest.$ac_objext; then
11032 ac_lo=$ac_mid; break
11033else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011034 $as_echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011035sed 's/^/| /' conftest.$ac_ext >&5
11036
11037 ac_hi=`expr '(' $ac_mid ')' - 1`
11038 if test $ac_mid -le $ac_hi; then
11039 ac_lo= ac_hi=
11040 break
11041 fi
11042 ac_mid=`expr 2 '*' $ac_mid`
11043fi
11044
11045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11046 done
11047else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011048 $as_echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011049sed 's/^/| /' conftest.$ac_ext >&5
11050
11051 ac_lo= ac_hi=
11052fi
11053
11054rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11055fi
11056
11057rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11058# Binary search between lo and hi bounds.
11059while test "x$ac_lo" != "x$ac_hi"; do
11060 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11061 cat >conftest.$ac_ext <<_ACEOF
11062/* confdefs.h. */
11063_ACEOF
11064cat confdefs.h >>conftest.$ac_ext
11065cat >>conftest.$ac_ext <<_ACEOF
11066/* end confdefs.h. */
11067$ac_includes_default
Christian Heimes951cc0f2008-01-31 23:08:23 +000011068int
11069main ()
11070{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011071static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes951cc0f2008-01-31 23:08:23 +000011072test_array [0] = 0
11073
11074 ;
11075 return 0;
11076}
11077_ACEOF
11078rm -f conftest.$ac_objext
11079if { (ac_try="$ac_compile"
11080case "(($ac_try" in
11081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11082 *) ac_try_echo=$ac_try;;
11083esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011084eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11085$as_echo "$ac_try_echo") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011086 (eval "$ac_compile") 2>conftest.er1
11087 ac_status=$?
11088 grep -v '^ *+' conftest.er1 >conftest.err
11089 rm -f conftest.er1
11090 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011091 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011092 (exit $ac_status); } && {
11093 test -z "$ac_c_werror_flag" ||
11094 test ! -s conftest.err
11095 } && test -s conftest.$ac_objext; then
11096 ac_hi=$ac_mid
11097else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011098 $as_echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011099sed 's/^/| /' conftest.$ac_ext >&5
11100
11101 ac_lo=`expr '(' $ac_mid ')' + 1`
11102fi
11103
11104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11105done
11106case $ac_lo in
11107?*) ac_cv_sizeof_pid_t=$ac_lo;;
11108'') if test "$ac_cv_type_pid_t" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000011109 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11110$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11111{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011112See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011113$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011114See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000011115 { (exit 77); exit 77; }; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011116 else
11117 ac_cv_sizeof_pid_t=0
11118 fi ;;
11119esac
11120else
11121 cat >conftest.$ac_ext <<_ACEOF
11122/* confdefs.h. */
11123_ACEOF
11124cat confdefs.h >>conftest.$ac_ext
11125cat >>conftest.$ac_ext <<_ACEOF
11126/* end confdefs.h. */
11127$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +000011128static long int longval () { return (long int) (sizeof (pid_t)); }
11129static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011130#include <stdio.h>
11131#include <stdlib.h>
11132int
11133main ()
11134{
11135
11136 FILE *f = fopen ("conftest.val", "w");
11137 if (! f)
11138 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000011139 if (((long int) (sizeof (pid_t))) < 0)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011140 {
11141 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000011142 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011143 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000011144 fprintf (f, "%ld", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011145 }
11146 else
11147 {
11148 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000011149 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes951cc0f2008-01-31 23:08:23 +000011150 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000011151 fprintf (f, "%lu", i);
Christian Heimes951cc0f2008-01-31 23:08:23 +000011152 }
Benjamin Peterson697cd212010-05-02 16:45:11 +000011153 /* Do not output a trailing newline, as this causes \r\n confusion
11154 on some platforms. */
Christian Heimes951cc0f2008-01-31 23:08:23 +000011155 return ferror (f) || fclose (f) != 0;
11156
11157 ;
11158 return 0;
11159}
11160_ACEOF
11161rm -f conftest$ac_exeext
11162if { (ac_try="$ac_link"
11163case "(($ac_try" in
11164 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11165 *) ac_try_echo=$ac_try;;
11166esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011167eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11168$as_echo "$ac_try_echo") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011169 (eval "$ac_link") 2>&5
11170 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000011171 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011172 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11173 { (case "(($ac_try" in
11174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11175 *) ac_try_echo=$ac_try;;
11176esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011177eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11178$as_echo "$ac_try_echo") >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011179 (eval "$ac_try") 2>&5
11180 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000011181 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011182 (exit $ac_status); }; }; then
11183 ac_cv_sizeof_pid_t=`cat conftest.val`
11184else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011185 $as_echo "$as_me: program exited with status $ac_status" >&5
11186$as_echo "$as_me: failed program was:" >&5
Christian Heimes951cc0f2008-01-31 23:08:23 +000011187sed 's/^/| /' conftest.$ac_ext >&5
11188
11189( exit $ac_status )
11190if test "$ac_cv_type_pid_t" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000011191 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11192$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11193{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011194See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011195$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes951cc0f2008-01-31 23:08:23 +000011196See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000011197 { (exit 77); exit 77; }; }; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011198 else
11199 ac_cv_sizeof_pid_t=0
11200 fi
11201fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000011202rm -rf conftest.dSYM
Christian Heimes951cc0f2008-01-31 23:08:23 +000011203rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11204fi
11205rm -f conftest.val
11206fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000011207{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11208$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes951cc0f2008-01-31 23:08:23 +000011209
11210
11211
11212cat >>confdefs.h <<_ACEOF
11213#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11214_ACEOF
11215
11216
Michael W. Hudson54241132001-12-07 15:38:26 +000011217
Benjamin Peterson697cd212010-05-02 16:45:11 +000011218{ $as_echo "$as_me:$LINENO: checking for long long support" >&5
11219$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011220have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011221cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011222/* confdefs.h. */
11223_ACEOF
11224cat confdefs.h >>conftest.$ac_ext
11225cat >>conftest.$ac_ext <<_ACEOF
11226/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011227
Martin v. Löwis11437992002-04-12 09:54:03 +000011228int
11229main ()
11230{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011231long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011232 ;
11233 return 0;
11234}
11235_ACEOF
11236rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011237if { (ac_try="$ac_compile"
11238case "(($ac_try" in
11239 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11240 *) ac_try_echo=$ac_try;;
11241esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011242eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11243$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011244 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011245 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011246 grep -v '^ *+' conftest.er1 >conftest.err
11247 rm -f conftest.er1
11248 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011249 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011250 (exit $ac_status); } && {
11251 test -z "$ac_c_werror_flag" ||
11252 test ! -s conftest.err
11253 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011254
11255
11256cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011257#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011258_ACEOF
11259
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011260 have_long_long=yes
11261
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011262else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011263 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011264sed 's/^/| /' conftest.$ac_ext >&5
11265
Martin v. Löwiseba40652007-08-30 20:10:57 +000011266
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011267fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011268
11269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000011270{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5
11271$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011272if test "$have_long_long" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000011273# The cast to long int works around a bug in the HP C Compiler
11274# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11275# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11276# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +000011277{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
11278$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011279if test "${ac_cv_sizeof_long_long+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000011280 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011281else
Martin v. Löwis11437992002-04-12 09:54:03 +000011282 if test "$cross_compiling" = yes; then
11283 # Depending upon the size, compute the lo and hi bounds.
11284cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011285/* confdefs.h. */
11286_ACEOF
11287cat confdefs.h >>conftest.$ac_ext
11288cat >>conftest.$ac_ext <<_ACEOF
11289/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011290$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011291int
11292main ()
11293{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011294static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011295test_array [0] = 0
11296
11297 ;
11298 return 0;
11299}
11300_ACEOF
11301rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011302if { (ac_try="$ac_compile"
11303case "(($ac_try" in
11304 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11305 *) ac_try_echo=$ac_try;;
11306esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011307eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11308$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011309 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011310 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011311 grep -v '^ *+' conftest.er1 >conftest.err
11312 rm -f conftest.er1
11313 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011314 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011315 (exit $ac_status); } && {
11316 test -z "$ac_c_werror_flag" ||
11317 test ! -s conftest.err
11318 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011319 ac_lo=0 ac_mid=0
11320 while :; do
11321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011322/* confdefs.h. */
11323_ACEOF
11324cat confdefs.h >>conftest.$ac_ext
11325cat >>conftest.$ac_ext <<_ACEOF
11326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011327$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011328int
11329main ()
11330{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011331static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011332test_array [0] = 0
11333
11334 ;
11335 return 0;
11336}
11337_ACEOF
11338rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011339if { (ac_try="$ac_compile"
11340case "(($ac_try" in
11341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11342 *) ac_try_echo=$ac_try;;
11343esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011344eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11345$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011346 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011348 grep -v '^ *+' conftest.er1 >conftest.err
11349 rm -f conftest.er1
11350 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011351 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011352 (exit $ac_status); } && {
11353 test -z "$ac_c_werror_flag" ||
11354 test ! -s conftest.err
11355 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011356 ac_hi=$ac_mid; break
11357else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011358 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011359sed 's/^/| /' conftest.$ac_ext >&5
11360
Martin v. Löwiseba40652007-08-30 20:10:57 +000011361 ac_lo=`expr $ac_mid + 1`
11362 if test $ac_lo -le $ac_mid; then
11363 ac_lo= ac_hi=
11364 break
11365 fi
11366 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011367fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011368
11369rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011370 done
11371else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011372 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011373sed 's/^/| /' conftest.$ac_ext >&5
11374
Martin v. Löwiseba40652007-08-30 20:10:57 +000011375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011376/* confdefs.h. */
11377_ACEOF
11378cat confdefs.h >>conftest.$ac_ext
11379cat >>conftest.$ac_ext <<_ACEOF
11380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011381$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011382int
11383main ()
11384{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011385static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011386test_array [0] = 0
11387
11388 ;
11389 return 0;
11390}
11391_ACEOF
11392rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011393if { (ac_try="$ac_compile"
11394case "(($ac_try" in
11395 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11396 *) ac_try_echo=$ac_try;;
11397esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011398eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11399$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011400 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011401 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011402 grep -v '^ *+' conftest.er1 >conftest.err
11403 rm -f conftest.er1
11404 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011405 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011406 (exit $ac_status); } && {
11407 test -z "$ac_c_werror_flag" ||
11408 test ! -s conftest.err
11409 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011410 ac_hi=-1 ac_mid=-1
11411 while :; do
11412 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011413/* confdefs.h. */
11414_ACEOF
11415cat confdefs.h >>conftest.$ac_ext
11416cat >>conftest.$ac_ext <<_ACEOF
11417/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011418$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011419int
11420main ()
11421{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011422static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011423test_array [0] = 0
11424
11425 ;
11426 return 0;
11427}
11428_ACEOF
11429rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011430if { (ac_try="$ac_compile"
11431case "(($ac_try" in
11432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11433 *) ac_try_echo=$ac_try;;
11434esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011435eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11436$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011437 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011438 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011439 grep -v '^ *+' conftest.er1 >conftest.err
11440 rm -f conftest.er1
11441 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011442 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011443 (exit $ac_status); } && {
11444 test -z "$ac_c_werror_flag" ||
11445 test ! -s conftest.err
11446 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011447 ac_lo=$ac_mid; break
11448else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011449 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011450sed 's/^/| /' conftest.$ac_ext >&5
11451
Martin v. Löwiseba40652007-08-30 20:10:57 +000011452 ac_hi=`expr '(' $ac_mid ')' - 1`
11453 if test $ac_mid -le $ac_hi; then
11454 ac_lo= ac_hi=
11455 break
11456 fi
11457 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011458fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011459
11460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011461 done
11462else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011463 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011464sed 's/^/| /' conftest.$ac_ext >&5
11465
Martin v. Löwiseba40652007-08-30 20:10:57 +000011466 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011467fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011468
11469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011470fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011471
11472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011473# Binary search between lo and hi bounds.
11474while test "x$ac_lo" != "x$ac_hi"; do
11475 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11476 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011477/* confdefs.h. */
11478_ACEOF
11479cat confdefs.h >>conftest.$ac_ext
11480cat >>conftest.$ac_ext <<_ACEOF
11481/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011482$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011483int
11484main ()
11485{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011486static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011487test_array [0] = 0
11488
11489 ;
11490 return 0;
11491}
11492_ACEOF
11493rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011494if { (ac_try="$ac_compile"
11495case "(($ac_try" in
11496 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11497 *) ac_try_echo=$ac_try;;
11498esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011499eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11500$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011501 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011502 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011503 grep -v '^ *+' conftest.er1 >conftest.err
11504 rm -f conftest.er1
11505 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011506 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011507 (exit $ac_status); } && {
11508 test -z "$ac_c_werror_flag" ||
11509 test ! -s conftest.err
11510 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011511 ac_hi=$ac_mid
11512else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011513 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011514sed 's/^/| /' conftest.$ac_ext >&5
11515
Martin v. Löwiseba40652007-08-30 20:10:57 +000011516 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011517fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000011518
11519rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011520done
11521case $ac_lo in
11522?*) ac_cv_sizeof_long_long=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000011523'') if test "$ac_cv_type_long_long" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000011524 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11525$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11526{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011527See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011528$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011529See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000011530 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011531 else
11532 ac_cv_sizeof_long_long=0
11533 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011534esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011535else
Martin v. Löwis11437992002-04-12 09:54:03 +000011536 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011537/* confdefs.h. */
11538_ACEOF
11539cat confdefs.h >>conftest.$ac_ext
11540cat >>conftest.$ac_ext <<_ACEOF
11541/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011542$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +000011543static long int longval () { return (long int) (sizeof (long long)); }
11544static unsigned long int ulongval () { return (long int) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011545#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011546#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011547int
11548main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011549{
Martin v. Löwis11437992002-04-12 09:54:03 +000011550
11551 FILE *f = fopen ("conftest.val", "w");
11552 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000011553 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000011554 if (((long int) (sizeof (long long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011555 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011556 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000011557 if (i != ((long int) (sizeof (long long))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011558 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000011559 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011560 }
11561 else
11562 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000011563 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000011564 if (i != ((long int) (sizeof (long long))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000011565 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000011566 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011567 }
Benjamin Peterson697cd212010-05-02 16:45:11 +000011568 /* Do not output a trailing newline, as this causes \r\n confusion
11569 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000011570 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011571
11572 ;
11573 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011574}
Martin v. Löwis11437992002-04-12 09:54:03 +000011575_ACEOF
11576rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000011577if { (ac_try="$ac_link"
11578case "(($ac_try" in
11579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11580 *) ac_try_echo=$ac_try;;
11581esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011582eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11583$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011584 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011585 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000011586 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011587 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000011588 { (case "(($ac_try" in
11589 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11590 *) ac_try_echo=$ac_try;;
11591esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011592eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11593$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000011594 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011595 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000011596 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011597 (exit $ac_status); }; }; then
11598 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011599else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011600 $as_echo "$as_me: program exited with status $ac_status" >&5
11601$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011602sed 's/^/| /' conftest.$ac_ext >&5
11603
Martin v. Löwis11437992002-04-12 09:54:03 +000011604( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000011605if test "$ac_cv_type_long_long" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000011606 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11607$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11608{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011609See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011610$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011611See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000011612 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011613 else
11614 ac_cv_sizeof_long_long=0
11615 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011616fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000011617rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000011618rm -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 +000011619fi
11620rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011621fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000011622{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11623$as_echo "$ac_cv_sizeof_long_long" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000011624
11625
11626
Martin v. Löwis11437992002-04-12 09:54:03 +000011627cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011628#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011629_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011630
Michael W. Hudson54241132001-12-07 15:38:26 +000011631
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011632fi
11633
Benjamin Peterson697cd212010-05-02 16:45:11 +000011634{ $as_echo "$as_me:$LINENO: checking for long double support" >&5
11635$as_echo_n "checking for long double support... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011636have_long_double=no
11637cat >conftest.$ac_ext <<_ACEOF
11638/* confdefs.h. */
11639_ACEOF
11640cat confdefs.h >>conftest.$ac_ext
11641cat >>conftest.$ac_ext <<_ACEOF
11642/* end confdefs.h. */
11643
11644int
11645main ()
11646{
11647long double x; x = (long double)0.;
11648 ;
11649 return 0;
11650}
11651_ACEOF
11652rm -f conftest.$ac_objext
11653if { (ac_try="$ac_compile"
11654case "(($ac_try" in
11655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11656 *) ac_try_echo=$ac_try;;
11657esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011658eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11659$as_echo "$ac_try_echo") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011660 (eval "$ac_compile") 2>conftest.er1
11661 ac_status=$?
11662 grep -v '^ *+' conftest.er1 >conftest.err
11663 rm -f conftest.er1
11664 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011665 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011666 (exit $ac_status); } && {
11667 test -z "$ac_c_werror_flag" ||
11668 test ! -s conftest.err
11669 } && test -s conftest.$ac_objext; then
11670
11671
11672cat >>confdefs.h <<\_ACEOF
11673#define HAVE_LONG_DOUBLE 1
11674_ACEOF
11675
11676 have_long_double=yes
11677
11678else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011679 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011680sed 's/^/| /' conftest.$ac_ext >&5
11681
11682
11683fi
11684
11685rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000011686{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5
11687$as_echo "$have_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011688if test "$have_long_double" = yes ; then
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011689# The cast to long int works around a bug in the HP C Compiler
11690# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11691# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11692# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +000011693{ $as_echo "$as_me:$LINENO: checking size of long double" >&5
11694$as_echo_n "checking size of long double... " >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011695if test "${ac_cv_sizeof_long_double+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000011696 $as_echo_n "(cached) " >&6
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011697else
11698 if test "$cross_compiling" = yes; then
11699 # Depending upon the size, compute the lo and hi bounds.
11700cat >conftest.$ac_ext <<_ACEOF
11701/* confdefs.h. */
11702_ACEOF
11703cat confdefs.h >>conftest.$ac_ext
11704cat >>conftest.$ac_ext <<_ACEOF
11705/* end confdefs.h. */
11706$ac_includes_default
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011707int
11708main ()
11709{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011710static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011711test_array [0] = 0
11712
11713 ;
11714 return 0;
11715}
11716_ACEOF
11717rm -f conftest.$ac_objext
11718if { (ac_try="$ac_compile"
11719case "(($ac_try" in
11720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11721 *) ac_try_echo=$ac_try;;
11722esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011723eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11724$as_echo "$ac_try_echo") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011725 (eval "$ac_compile") 2>conftest.er1
11726 ac_status=$?
11727 grep -v '^ *+' conftest.er1 >conftest.err
11728 rm -f conftest.er1
11729 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011730 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011731 (exit $ac_status); } && {
11732 test -z "$ac_c_werror_flag" ||
11733 test ! -s conftest.err
11734 } && test -s conftest.$ac_objext; then
11735 ac_lo=0 ac_mid=0
11736 while :; do
11737 cat >conftest.$ac_ext <<_ACEOF
11738/* confdefs.h. */
11739_ACEOF
11740cat confdefs.h >>conftest.$ac_ext
11741cat >>conftest.$ac_ext <<_ACEOF
11742/* end confdefs.h. */
11743$ac_includes_default
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011744int
11745main ()
11746{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011747static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011748test_array [0] = 0
11749
11750 ;
11751 return 0;
11752}
11753_ACEOF
11754rm -f conftest.$ac_objext
11755if { (ac_try="$ac_compile"
11756case "(($ac_try" in
11757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11758 *) ac_try_echo=$ac_try;;
11759esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011760eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11761$as_echo "$ac_try_echo") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011762 (eval "$ac_compile") 2>conftest.er1
11763 ac_status=$?
11764 grep -v '^ *+' conftest.er1 >conftest.err
11765 rm -f conftest.er1
11766 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011767 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011768 (exit $ac_status); } && {
11769 test -z "$ac_c_werror_flag" ||
11770 test ! -s conftest.err
11771 } && test -s conftest.$ac_objext; then
11772 ac_hi=$ac_mid; break
11773else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011774 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011775sed 's/^/| /' conftest.$ac_ext >&5
11776
11777 ac_lo=`expr $ac_mid + 1`
11778 if test $ac_lo -le $ac_mid; then
11779 ac_lo= ac_hi=
11780 break
11781 fi
11782 ac_mid=`expr 2 '*' $ac_mid + 1`
11783fi
11784
11785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11786 done
11787else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011788 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011789sed 's/^/| /' conftest.$ac_ext >&5
11790
11791 cat >conftest.$ac_ext <<_ACEOF
11792/* confdefs.h. */
11793_ACEOF
11794cat confdefs.h >>conftest.$ac_ext
11795cat >>conftest.$ac_ext <<_ACEOF
11796/* end confdefs.h. */
11797$ac_includes_default
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011798int
11799main ()
11800{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011801static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011802test_array [0] = 0
11803
11804 ;
11805 return 0;
11806}
11807_ACEOF
11808rm -f conftest.$ac_objext
11809if { (ac_try="$ac_compile"
11810case "(($ac_try" in
11811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11812 *) ac_try_echo=$ac_try;;
11813esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011814eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11815$as_echo "$ac_try_echo") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011816 (eval "$ac_compile") 2>conftest.er1
11817 ac_status=$?
11818 grep -v '^ *+' conftest.er1 >conftest.err
11819 rm -f conftest.er1
11820 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011821 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011822 (exit $ac_status); } && {
11823 test -z "$ac_c_werror_flag" ||
11824 test ! -s conftest.err
11825 } && test -s conftest.$ac_objext; then
11826 ac_hi=-1 ac_mid=-1
11827 while :; do
11828 cat >conftest.$ac_ext <<_ACEOF
11829/* confdefs.h. */
11830_ACEOF
11831cat confdefs.h >>conftest.$ac_ext
11832cat >>conftest.$ac_ext <<_ACEOF
11833/* end confdefs.h. */
11834$ac_includes_default
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011835int
11836main ()
11837{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011838static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011839test_array [0] = 0
11840
11841 ;
11842 return 0;
11843}
11844_ACEOF
11845rm -f conftest.$ac_objext
11846if { (ac_try="$ac_compile"
11847case "(($ac_try" in
11848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11849 *) ac_try_echo=$ac_try;;
11850esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011851eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11852$as_echo "$ac_try_echo") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011853 (eval "$ac_compile") 2>conftest.er1
11854 ac_status=$?
11855 grep -v '^ *+' conftest.er1 >conftest.err
11856 rm -f conftest.er1
11857 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011858 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011859 (exit $ac_status); } && {
11860 test -z "$ac_c_werror_flag" ||
11861 test ! -s conftest.err
11862 } && test -s conftest.$ac_objext; then
11863 ac_lo=$ac_mid; break
11864else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011865 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011866sed 's/^/| /' conftest.$ac_ext >&5
11867
11868 ac_hi=`expr '(' $ac_mid ')' - 1`
11869 if test $ac_mid -le $ac_hi; then
11870 ac_lo= ac_hi=
11871 break
11872 fi
11873 ac_mid=`expr 2 '*' $ac_mid`
11874fi
11875
11876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11877 done
11878else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011879 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011880sed 's/^/| /' conftest.$ac_ext >&5
11881
11882 ac_lo= ac_hi=
11883fi
11884
11885rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11886fi
11887
11888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11889# Binary search between lo and hi bounds.
11890while test "x$ac_lo" != "x$ac_hi"; do
11891 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11892 cat >conftest.$ac_ext <<_ACEOF
11893/* confdefs.h. */
11894_ACEOF
11895cat confdefs.h >>conftest.$ac_ext
11896cat >>conftest.$ac_ext <<_ACEOF
11897/* end confdefs.h. */
11898$ac_includes_default
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011899int
11900main ()
11901{
Benjamin Peterson697cd212010-05-02 16:45:11 +000011902static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011903test_array [0] = 0
11904
11905 ;
11906 return 0;
11907}
11908_ACEOF
11909rm -f conftest.$ac_objext
11910if { (ac_try="$ac_compile"
11911case "(($ac_try" in
11912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11913 *) ac_try_echo=$ac_try;;
11914esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011915eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11916$as_echo "$ac_try_echo") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011917 (eval "$ac_compile") 2>conftest.er1
11918 ac_status=$?
11919 grep -v '^ *+' conftest.er1 >conftest.err
11920 rm -f conftest.er1
11921 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011922 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011923 (exit $ac_status); } && {
11924 test -z "$ac_c_werror_flag" ||
11925 test ! -s conftest.err
11926 } && test -s conftest.$ac_objext; then
11927 ac_hi=$ac_mid
11928else
Benjamin Peterson697cd212010-05-02 16:45:11 +000011929 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011930sed 's/^/| /' conftest.$ac_ext >&5
11931
11932 ac_lo=`expr '(' $ac_mid ')' + 1`
11933fi
11934
11935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11936done
11937case $ac_lo in
11938?*) ac_cv_sizeof_long_double=$ac_lo;;
11939'') if test "$ac_cv_type_long_double" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000011940 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11941$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11942{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011943See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000011944$as_echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011945See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000011946 { (exit 77); exit 77; }; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011947 else
11948 ac_cv_sizeof_long_double=0
11949 fi ;;
11950esac
11951else
11952 cat >conftest.$ac_ext <<_ACEOF
11953/* confdefs.h. */
11954_ACEOF
11955cat confdefs.h >>conftest.$ac_ext
11956cat >>conftest.$ac_ext <<_ACEOF
11957/* end confdefs.h. */
11958$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +000011959static long int longval () { return (long int) (sizeof (long double)); }
11960static unsigned long int ulongval () { return (long int) (sizeof (long double)); }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011961#include <stdio.h>
11962#include <stdlib.h>
11963int
11964main ()
11965{
11966
11967 FILE *f = fopen ("conftest.val", "w");
11968 if (! f)
11969 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000011970 if (((long int) (sizeof (long double))) < 0)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011971 {
11972 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000011973 if (i != ((long int) (sizeof (long double))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011974 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000011975 fprintf (f, "%ld", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011976 }
11977 else
11978 {
11979 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000011980 if (i != ((long int) (sizeof (long double))))
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011981 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000011982 fprintf (f, "%lu", i);
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011983 }
Benjamin Peterson697cd212010-05-02 16:45:11 +000011984 /* Do not output a trailing newline, as this causes \r\n confusion
11985 on some platforms. */
Mark Dickinsondc1688a2008-06-27 22:20:14 +000011986 return ferror (f) || fclose (f) != 0;
11987
11988 ;
11989 return 0;
11990}
11991_ACEOF
11992rm -f conftest$ac_exeext
11993if { (ac_try="$ac_link"
11994case "(($ac_try" in
11995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11996 *) ac_try_echo=$ac_try;;
11997esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000011998eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11999$as_echo "$ac_try_echo") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012000 (eval "$ac_link") 2>&5
12001 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000012002 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012003 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12004 { (case "(($ac_try" in
12005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12006 *) ac_try_echo=$ac_try;;
12007esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012008eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12009$as_echo "$ac_try_echo") >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012010 (eval "$ac_try") 2>&5
12011 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000012012 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012013 (exit $ac_status); }; }; then
12014 ac_cv_sizeof_long_double=`cat conftest.val`
12015else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012016 $as_echo "$as_me: program exited with status $ac_status" >&5
12017$as_echo "$as_me: failed program was:" >&5
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012018sed 's/^/| /' conftest.$ac_ext >&5
12019
12020( exit $ac_status )
12021if test "$ac_cv_type_long_double" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000012022 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12023$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12024{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012025See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012026$as_echo "$as_me: error: cannot compute sizeof (long double)
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012027See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000012028 { (exit 77); exit 77; }; }; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012029 else
12030 ac_cv_sizeof_long_double=0
12031 fi
12032fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000012033rm -rf conftest.dSYM
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12035fi
12036rm -f conftest.val
12037fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000012038{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12039$as_echo "$ac_cv_sizeof_long_double" >&6; }
Mark Dickinsondc1688a2008-06-27 22:20:14 +000012040
12041
12042
12043cat >>confdefs.h <<_ACEOF
12044#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12045_ACEOF
12046
12047
12048fi
12049
Benjamin Peterson697cd212010-05-02 16:45:11 +000012050{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5
12051$as_echo_n "checking for _Bool support... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012052have_c99_bool=no
12053cat >conftest.$ac_ext <<_ACEOF
12054/* confdefs.h. */
12055_ACEOF
12056cat confdefs.h >>conftest.$ac_ext
12057cat >>conftest.$ac_ext <<_ACEOF
12058/* end confdefs.h. */
12059
12060int
12061main ()
12062{
12063_Bool x; x = (_Bool)0;
12064 ;
12065 return 0;
12066}
12067_ACEOF
12068rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012069if { (ac_try="$ac_compile"
12070case "(($ac_try" in
12071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12072 *) ac_try_echo=$ac_try;;
12073esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012074eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12075$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012077 ac_status=$?
12078 grep -v '^ *+' conftest.er1 >conftest.err
12079 rm -f conftest.er1
12080 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012081 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012082 (exit $ac_status); } && {
12083 test -z "$ac_c_werror_flag" ||
12084 test ! -s conftest.err
12085 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012086
12087
12088cat >>confdefs.h <<\_ACEOF
12089#define HAVE_C99_BOOL 1
12090_ACEOF
12091
12092 have_c99_bool=yes
12093
12094else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012095 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012096sed 's/^/| /' conftest.$ac_ext >&5
12097
Martin v. Löwiseba40652007-08-30 20:10:57 +000012098
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012099fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012100
12101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000012102{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12103$as_echo "$have_c99_bool" >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012104if test "$have_c99_bool" = yes ; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000012105# The cast to long int works around a bug in the HP C Compiler
12106# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12107# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12108# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +000012109{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5
12110$as_echo_n "checking size of _Bool... " >&6; }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012111if test "${ac_cv_sizeof__Bool+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000012112 $as_echo_n "(cached) " >&6
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012113else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012114 if test "$cross_compiling" = yes; then
12115 # Depending upon the size, compute the lo and hi bounds.
12116cat >conftest.$ac_ext <<_ACEOF
12117/* confdefs.h. */
12118_ACEOF
12119cat confdefs.h >>conftest.$ac_ext
12120cat >>conftest.$ac_ext <<_ACEOF
12121/* end confdefs.h. */
12122$ac_includes_default
12123int
12124main ()
12125{
Benjamin Peterson697cd212010-05-02 16:45:11 +000012126static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012127test_array [0] = 0
12128
12129 ;
12130 return 0;
12131}
12132_ACEOF
12133rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012134if { (ac_try="$ac_compile"
12135case "(($ac_try" in
12136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12137 *) ac_try_echo=$ac_try;;
12138esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012139eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12140$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012141 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012142 ac_status=$?
12143 grep -v '^ *+' conftest.er1 >conftest.err
12144 rm -f conftest.er1
12145 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012146 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012147 (exit $ac_status); } && {
12148 test -z "$ac_c_werror_flag" ||
12149 test ! -s conftest.err
12150 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012151 ac_lo=0 ac_mid=0
12152 while :; do
12153 cat >conftest.$ac_ext <<_ACEOF
12154/* confdefs.h. */
12155_ACEOF
12156cat confdefs.h >>conftest.$ac_ext
12157cat >>conftest.$ac_ext <<_ACEOF
12158/* end confdefs.h. */
12159$ac_includes_default
12160int
12161main ()
12162{
Benjamin Peterson697cd212010-05-02 16:45:11 +000012163static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012164test_array [0] = 0
12165
12166 ;
12167 return 0;
12168}
12169_ACEOF
12170rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012171if { (ac_try="$ac_compile"
12172case "(($ac_try" in
12173 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12174 *) ac_try_echo=$ac_try;;
12175esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012176eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12177$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012178 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012179 ac_status=$?
12180 grep -v '^ *+' conftest.er1 >conftest.err
12181 rm -f conftest.er1
12182 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012183 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012184 (exit $ac_status); } && {
12185 test -z "$ac_c_werror_flag" ||
12186 test ! -s conftest.err
12187 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012188 ac_hi=$ac_mid; break
12189else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012190 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012191sed 's/^/| /' conftest.$ac_ext >&5
12192
Martin v. Löwiseba40652007-08-30 20:10:57 +000012193 ac_lo=`expr $ac_mid + 1`
12194 if test $ac_lo -le $ac_mid; then
12195 ac_lo= ac_hi=
12196 break
12197 fi
12198 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012199fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012200
12201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012202 done
12203else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012204 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012205sed 's/^/| /' conftest.$ac_ext >&5
12206
Martin v. Löwiseba40652007-08-30 20:10:57 +000012207 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012208/* confdefs.h. */
12209_ACEOF
12210cat confdefs.h >>conftest.$ac_ext
12211cat >>conftest.$ac_ext <<_ACEOF
12212/* end confdefs.h. */
12213$ac_includes_default
12214int
12215main ()
12216{
Benjamin Peterson697cd212010-05-02 16:45:11 +000012217static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012218test_array [0] = 0
12219
12220 ;
12221 return 0;
12222}
12223_ACEOF
12224rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012225if { (ac_try="$ac_compile"
12226case "(($ac_try" in
12227 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12228 *) ac_try_echo=$ac_try;;
12229esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012230eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12231$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012232 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012233 ac_status=$?
12234 grep -v '^ *+' conftest.er1 >conftest.err
12235 rm -f conftest.er1
12236 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012237 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012238 (exit $ac_status); } && {
12239 test -z "$ac_c_werror_flag" ||
12240 test ! -s conftest.err
12241 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012242 ac_hi=-1 ac_mid=-1
12243 while :; do
12244 cat >conftest.$ac_ext <<_ACEOF
12245/* confdefs.h. */
12246_ACEOF
12247cat confdefs.h >>conftest.$ac_ext
12248cat >>conftest.$ac_ext <<_ACEOF
12249/* end confdefs.h. */
12250$ac_includes_default
12251int
12252main ()
12253{
Benjamin Peterson697cd212010-05-02 16:45:11 +000012254static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012255test_array [0] = 0
12256
12257 ;
12258 return 0;
12259}
12260_ACEOF
12261rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012262if { (ac_try="$ac_compile"
12263case "(($ac_try" in
12264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12265 *) ac_try_echo=$ac_try;;
12266esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012267eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12268$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012269 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012270 ac_status=$?
12271 grep -v '^ *+' conftest.er1 >conftest.err
12272 rm -f conftest.er1
12273 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012274 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012275 (exit $ac_status); } && {
12276 test -z "$ac_c_werror_flag" ||
12277 test ! -s conftest.err
12278 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012279 ac_lo=$ac_mid; break
12280else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012281 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012282sed 's/^/| /' conftest.$ac_ext >&5
12283
Martin v. Löwiseba40652007-08-30 20:10:57 +000012284 ac_hi=`expr '(' $ac_mid ')' - 1`
12285 if test $ac_mid -le $ac_hi; then
12286 ac_lo= ac_hi=
12287 break
12288 fi
12289 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012290fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012291
12292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012293 done
12294else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012295 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012296sed 's/^/| /' conftest.$ac_ext >&5
12297
Martin v. Löwiseba40652007-08-30 20:10:57 +000012298 ac_lo= ac_hi=
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012299fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012300
12301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012302fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012303
12304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012305# Binary search between lo and hi bounds.
12306while test "x$ac_lo" != "x$ac_hi"; do
12307 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12308 cat >conftest.$ac_ext <<_ACEOF
12309/* confdefs.h. */
12310_ACEOF
12311cat confdefs.h >>conftest.$ac_ext
12312cat >>conftest.$ac_ext <<_ACEOF
12313/* end confdefs.h. */
12314$ac_includes_default
12315int
12316main ()
12317{
Benjamin Peterson697cd212010-05-02 16:45:11 +000012318static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012319test_array [0] = 0
12320
12321 ;
12322 return 0;
12323}
12324_ACEOF
12325rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012326if { (ac_try="$ac_compile"
12327case "(($ac_try" in
12328 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12329 *) ac_try_echo=$ac_try;;
12330esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012331eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12332$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012333 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012334 ac_status=$?
12335 grep -v '^ *+' conftest.er1 >conftest.err
12336 rm -f conftest.er1
12337 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012338 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012339 (exit $ac_status); } && {
12340 test -z "$ac_c_werror_flag" ||
12341 test ! -s conftest.err
12342 } && test -s conftest.$ac_objext; then
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012343 ac_hi=$ac_mid
12344else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012345 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012346sed 's/^/| /' conftest.$ac_ext >&5
12347
Martin v. Löwiseba40652007-08-30 20:10:57 +000012348 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012349fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012350
12351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012352done
12353case $ac_lo in
12354?*) ac_cv_sizeof__Bool=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012355'') if test "$ac_cv_type__Bool" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000012356 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12358{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012359See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012360$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012361See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000012362 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012363 else
12364 ac_cv_sizeof__Bool=0
12365 fi ;;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012366esac
12367else
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012368 cat >conftest.$ac_ext <<_ACEOF
12369/* confdefs.h. */
12370_ACEOF
12371cat confdefs.h >>conftest.$ac_ext
12372cat >>conftest.$ac_ext <<_ACEOF
12373/* end confdefs.h. */
12374$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +000012375static long int longval () { return (long int) (sizeof (_Bool)); }
12376static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); }
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012377#include <stdio.h>
12378#include <stdlib.h>
12379int
12380main ()
12381{
12382
12383 FILE *f = fopen ("conftest.val", "w");
12384 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012385 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000012386 if (((long int) (sizeof (_Bool))) < 0)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012387 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012388 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000012389 if (i != ((long int) (sizeof (_Bool))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012390 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000012391 fprintf (f, "%ld", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012392 }
12393 else
12394 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012395 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000012396 if (i != ((long int) (sizeof (_Bool))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012397 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000012398 fprintf (f, "%lu", i);
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012399 }
Benjamin Peterson697cd212010-05-02 16:45:11 +000012400 /* Do not output a trailing newline, as this causes \r\n confusion
12401 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012402 return ferror (f) || fclose (f) != 0;
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012403
12404 ;
12405 return 0;
12406}
12407_ACEOF
12408rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012409if { (ac_try="$ac_link"
12410case "(($ac_try" in
12411 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12412 *) ac_try_echo=$ac_try;;
12413esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012414eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12415$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012416 (eval "$ac_link") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012417 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000012418 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012419 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012420 { (case "(($ac_try" in
12421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12422 *) ac_try_echo=$ac_try;;
12423esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012424eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12425$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012426 (eval "$ac_try") 2>&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012427 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000012428 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012429 (exit $ac_status); }; }; then
12430 ac_cv_sizeof__Bool=`cat conftest.val`
12431else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012432 $as_echo "$as_me: program exited with status $ac_status" >&5
12433$as_echo "$as_me: failed program was:" >&5
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012434sed 's/^/| /' conftest.$ac_ext >&5
12435
12436( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012437if test "$ac_cv_type__Bool" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000012438 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12439$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12440{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012441See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012442$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012443See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000012444 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012445 else
12446 ac_cv_sizeof__Bool=0
12447 fi
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012448fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000012449rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000012450rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012451fi
12452rm -f conftest.val
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012453fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000012454{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12455$as_echo "$ac_cv_sizeof__Bool" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012456
12457
12458
Martin v. Löwisaef4c6b2007-01-21 09:33:07 +000012459cat >>confdefs.h <<_ACEOF
12460#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12461_ACEOF
12462
12463
12464fi
12465
Benjamin Peterson697cd212010-05-02 16:45:11 +000012466{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
12467$as_echo_n "checking for uintptr_t... " >&6; }
Martin v. Löwisebe26702006-10-02 14:55:51 +000012468if test "${ac_cv_type_uintptr_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000012469 $as_echo_n "(cached) " >&6
Martin v. Löwisebe26702006-10-02 14:55:51 +000012470else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012471 ac_cv_type_uintptr_t=no
12472cat >conftest.$ac_ext <<_ACEOF
12473/* confdefs.h. */
12474_ACEOF
12475cat confdefs.h >>conftest.$ac_ext
12476cat >>conftest.$ac_ext <<_ACEOF
12477/* end confdefs.h. */
12478#ifdef HAVE_STDINT_H
12479 #include <stdint.h>
12480 #endif
12481
12482int
12483main ()
12484{
12485if (sizeof (uintptr_t))
12486 return 0;
12487 ;
12488 return 0;
12489}
12490_ACEOF
12491rm -f conftest.$ac_objext
12492if { (ac_try="$ac_compile"
12493case "(($ac_try" in
12494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12495 *) ac_try_echo=$ac_try;;
12496esac
12497eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12498$as_echo "$ac_try_echo") >&5
12499 (eval "$ac_compile") 2>conftest.er1
12500 ac_status=$?
12501 grep -v '^ *+' conftest.er1 >conftest.err
12502 rm -f conftest.er1
12503 cat conftest.err >&5
12504 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12505 (exit $ac_status); } && {
12506 test -z "$ac_c_werror_flag" ||
12507 test ! -s conftest.err
12508 } && test -s conftest.$ac_objext; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012510/* confdefs.h. */
12511_ACEOF
12512cat confdefs.h >>conftest.$ac_ext
12513cat >>conftest.$ac_ext <<_ACEOF
12514/* end confdefs.h. */
Martin v. Löwis40e9aed2006-10-02 15:20:37 +000012515#ifdef HAVE_STDINT_H
12516 #include <stdint.h>
12517 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012518
Martin v. Löwis11437992002-04-12 09:54:03 +000012519int
12520main ()
12521{
Benjamin Peterson697cd212010-05-02 16:45:11 +000012522if (sizeof ((uintptr_t)))
12523 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012524 ;
12525 return 0;
12526}
12527_ACEOF
12528rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012529if { (ac_try="$ac_compile"
12530case "(($ac_try" in
12531 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12532 *) ac_try_echo=$ac_try;;
12533esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012534eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12535$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012536 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012537 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012538 grep -v '^ *+' conftest.er1 >conftest.err
12539 rm -f conftest.er1
12540 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012541 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012542 (exit $ac_status); } && {
12543 test -z "$ac_c_werror_flag" ||
12544 test ! -s conftest.err
12545 } && test -s conftest.$ac_objext; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000012546 :
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012547else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012548 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012549sed 's/^/| /' conftest.$ac_ext >&5
12550
Benjamin Peterson697cd212010-05-02 16:45:11 +000012551 ac_cv_type_uintptr_t=yes
12552fi
12553
12554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12555else
12556 $as_echo "$as_me: failed program was:" >&5
12557sed 's/^/| /' conftest.$ac_ext >&5
12558
12559
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012560fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012561
12562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebe26702006-10-02 14:55:51 +000012563fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000012564{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12565$as_echo "$ac_cv_type_uintptr_t" >&6; }
12566if test "x$ac_cv_type_uintptr_t" = x""yes; then
Martin v. Löwisebe26702006-10-02 14:55:51 +000012567
12568cat >>confdefs.h <<_ACEOF
12569#define HAVE_UINTPTR_T 1
12570_ACEOF
12571
Martin v. Löwiseba40652007-08-30 20:10:57 +000012572# The cast to long int works around a bug in the HP C Compiler
12573# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12574# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12575# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +000012576{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12577$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012578if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000012579 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012580else
Martin v. Löwis11437992002-04-12 09:54:03 +000012581 if test "$cross_compiling" = yes; then
12582 # Depending upon the size, compute the lo and hi bounds.
12583cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012584/* confdefs.h. */
12585_ACEOF
12586cat confdefs.h >>conftest.$ac_ext
12587cat >>conftest.$ac_ext <<_ACEOF
12588/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012589$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012590int
12591main ()
12592{
Benjamin Peterson697cd212010-05-02 16:45:11 +000012593static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012594test_array [0] = 0
12595
12596 ;
12597 return 0;
12598}
12599_ACEOF
12600rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012601if { (ac_try="$ac_compile"
12602case "(($ac_try" in
12603 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12604 *) ac_try_echo=$ac_try;;
12605esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012606eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12607$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012608 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012609 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012610 grep -v '^ *+' conftest.er1 >conftest.err
12611 rm -f conftest.er1
12612 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012613 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012614 (exit $ac_status); } && {
12615 test -z "$ac_c_werror_flag" ||
12616 test ! -s conftest.err
12617 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012618 ac_lo=0 ac_mid=0
12619 while :; do
12620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012621/* confdefs.h. */
12622_ACEOF
12623cat confdefs.h >>conftest.$ac_ext
12624cat >>conftest.$ac_ext <<_ACEOF
12625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012626$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012627int
12628main ()
12629{
Benjamin Peterson697cd212010-05-02 16:45:11 +000012630static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012631test_array [0] = 0
12632
12633 ;
12634 return 0;
12635}
12636_ACEOF
12637rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012638if { (ac_try="$ac_compile"
12639case "(($ac_try" in
12640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12641 *) ac_try_echo=$ac_try;;
12642esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012643eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12644$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012647 grep -v '^ *+' conftest.er1 >conftest.err
12648 rm -f conftest.er1
12649 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012650 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012651 (exit $ac_status); } && {
12652 test -z "$ac_c_werror_flag" ||
12653 test ! -s conftest.err
12654 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012655 ac_hi=$ac_mid; break
12656else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012657 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012658sed 's/^/| /' conftest.$ac_ext >&5
12659
Martin v. Löwiseba40652007-08-30 20:10:57 +000012660 ac_lo=`expr $ac_mid + 1`
12661 if test $ac_lo -le $ac_mid; then
12662 ac_lo= ac_hi=
12663 break
12664 fi
12665 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012666fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012667
12668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012669 done
12670else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012671 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012672sed 's/^/| /' conftest.$ac_ext >&5
12673
Martin v. Löwiseba40652007-08-30 20:10:57 +000012674 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012675/* confdefs.h. */
12676_ACEOF
12677cat confdefs.h >>conftest.$ac_ext
12678cat >>conftest.$ac_ext <<_ACEOF
12679/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012680$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012681int
12682main ()
12683{
Benjamin Peterson697cd212010-05-02 16:45:11 +000012684static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012685test_array [0] = 0
12686
12687 ;
12688 return 0;
12689}
12690_ACEOF
12691rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012692if { (ac_try="$ac_compile"
12693case "(($ac_try" in
12694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12695 *) ac_try_echo=$ac_try;;
12696esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012697eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12698$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012699 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012700 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012701 grep -v '^ *+' conftest.er1 >conftest.err
12702 rm -f conftest.er1
12703 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012704 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012705 (exit $ac_status); } && {
12706 test -z "$ac_c_werror_flag" ||
12707 test ! -s conftest.err
12708 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012709 ac_hi=-1 ac_mid=-1
12710 while :; do
12711 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012712/* confdefs.h. */
12713_ACEOF
12714cat confdefs.h >>conftest.$ac_ext
12715cat >>conftest.$ac_ext <<_ACEOF
12716/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012717$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012718int
12719main ()
12720{
Benjamin Peterson697cd212010-05-02 16:45:11 +000012721static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012722test_array [0] = 0
12723
12724 ;
12725 return 0;
12726}
12727_ACEOF
12728rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012729if { (ac_try="$ac_compile"
12730case "(($ac_try" in
12731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12732 *) ac_try_echo=$ac_try;;
12733esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012734eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12735$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012736 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012737 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012738 grep -v '^ *+' conftest.er1 >conftest.err
12739 rm -f conftest.er1
12740 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012741 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012742 (exit $ac_status); } && {
12743 test -z "$ac_c_werror_flag" ||
12744 test ! -s conftest.err
12745 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012746 ac_lo=$ac_mid; break
12747else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012748 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012749sed 's/^/| /' conftest.$ac_ext >&5
12750
Martin v. Löwiseba40652007-08-30 20:10:57 +000012751 ac_hi=`expr '(' $ac_mid ')' - 1`
12752 if test $ac_mid -le $ac_hi; then
12753 ac_lo= ac_hi=
12754 break
12755 fi
12756 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000012757fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012758
12759rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012760 done
12761else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012762 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012763sed 's/^/| /' conftest.$ac_ext >&5
12764
Martin v. Löwiseba40652007-08-30 20:10:57 +000012765 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000012766fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012767
12768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012769fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012770
12771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012772# Binary search between lo and hi bounds.
12773while test "x$ac_lo" != "x$ac_hi"; do
12774 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12775 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012776/* confdefs.h. */
12777_ACEOF
12778cat confdefs.h >>conftest.$ac_ext
12779cat >>conftest.$ac_ext <<_ACEOF
12780/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012781$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012782int
12783main ()
12784{
Benjamin Peterson697cd212010-05-02 16:45:11 +000012785static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012786test_array [0] = 0
12787
12788 ;
12789 return 0;
12790}
12791_ACEOF
12792rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012793if { (ac_try="$ac_compile"
12794case "(($ac_try" in
12795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12796 *) ac_try_echo=$ac_try;;
12797esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012798eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12799$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012800 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012801 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012802 grep -v '^ *+' conftest.er1 >conftest.err
12803 rm -f conftest.er1
12804 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012805 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012806 (exit $ac_status); } && {
12807 test -z "$ac_c_werror_flag" ||
12808 test ! -s conftest.err
12809 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012810 ac_hi=$ac_mid
12811else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012812 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012813sed 's/^/| /' conftest.$ac_ext >&5
12814
Martin v. Löwiseba40652007-08-30 20:10:57 +000012815 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012816fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000012817
12818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012819done
12820case $ac_lo in
12821?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000012822'') if test "$ac_cv_type_uintptr_t" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000012823 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12824$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12825{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012826See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012827$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012828See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000012829 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012830 else
12831 ac_cv_sizeof_uintptr_t=0
12832 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000012833esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012834else
Martin v. Löwis11437992002-04-12 09:54:03 +000012835 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012836/* confdefs.h. */
12837_ACEOF
12838cat confdefs.h >>conftest.$ac_ext
12839cat >>conftest.$ac_ext <<_ACEOF
12840/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012841$ac_includes_default
Benjamin Peterson697cd212010-05-02 16:45:11 +000012842static long int longval () { return (long int) (sizeof (uintptr_t)); }
12843static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000012844#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012845#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000012846int
12847main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012848{
Martin v. Löwis11437992002-04-12 09:54:03 +000012849
12850 FILE *f = fopen ("conftest.val", "w");
12851 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000012852 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000012853 if (((long int) (sizeof (uintptr_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000012854 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012855 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000012856 if (i != ((long int) (sizeof (uintptr_t))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012857 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000012858 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 }
12860 else
12861 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000012862 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000012863 if (i != ((long int) (sizeof (uintptr_t))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000012864 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000012865 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000012866 }
Benjamin Peterson697cd212010-05-02 16:45:11 +000012867 /* Do not output a trailing newline, as this causes \r\n confusion
12868 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000012869 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012870
12871 ;
12872 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012873}
Martin v. Löwis11437992002-04-12 09:54:03 +000012874_ACEOF
12875rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012876if { (ac_try="$ac_link"
12877case "(($ac_try" in
12878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12879 *) ac_try_echo=$ac_try;;
12880esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012881eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12882$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012883 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012884 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000012885 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012886 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012887 { (case "(($ac_try" in
12888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12889 *) ac_try_echo=$ac_try;;
12890esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012891eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12892$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012893 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012894 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000012895 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 (exit $ac_status); }; }; then
12897 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012898else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012899 $as_echo "$as_me: program exited with status $ac_status" >&5
12900$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012901sed 's/^/| /' conftest.$ac_ext >&5
12902
Martin v. Löwis11437992002-04-12 09:54:03 +000012903( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000012904if test "$ac_cv_type_uintptr_t" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000012905 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12906$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12907{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012908See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000012909$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000012910See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000012911 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012912 else
12913 ac_cv_sizeof_uintptr_t=0
12914 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000012915fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000012916rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000012917rm -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 +000012918fi
12919rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012920fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000012921{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
12922$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000012923
12924
12925
Martin v. Löwis11437992002-04-12 09:54:03 +000012926cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012927#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000012928_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012929
Michael W. Hudson54241132001-12-07 15:38:26 +000012930
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012931fi
12932
Martin v. Löwisebe26702006-10-02 14:55:51 +000012933
12934
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012935# Hmph. AC_CHECK_SIZEOF() doesn't include <sys/types.h>.
Benjamin Peterson697cd212010-05-02 16:45:11 +000012936{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5
12937$as_echo_n "checking size of off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012938if test "${ac_cv_sizeof_off_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000012939 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012940else
12941 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000012942 ac_cv_sizeof_off_t=4
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012943else
Martin v. Löwis11437992002-04-12 09:54:03 +000012944 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012945/* confdefs.h. */
12946_ACEOF
12947cat confdefs.h >>conftest.$ac_ext
12948cat >>conftest.$ac_ext <<_ACEOF
12949/* end confdefs.h. */
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012950#include <stdio.h>
12951#include <sys/types.h>
12952main()
12953{
12954 FILE *f=fopen("conftestval", "w");
12955 if (!f) exit(1);
12956 fprintf(f, "%d\n", sizeof(off_t));
12957 exit(0);
12958}
Martin v. Löwis11437992002-04-12 09:54:03 +000012959_ACEOF
12960rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000012961if { (ac_try="$ac_link"
12962case "(($ac_try" in
12963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12964 *) ac_try_echo=$ac_try;;
12965esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012966eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12967$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012968 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012969 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000012970 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012971 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000012972 { (case "(($ac_try" in
12973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12974 *) ac_try_echo=$ac_try;;
12975esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000012976eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12977$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000012978 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012979 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000012980 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000012981 (exit $ac_status); }; }; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012982 ac_cv_sizeof_off_t=`cat conftestval`
12983else
Benjamin Peterson697cd212010-05-02 16:45:11 +000012984 $as_echo "$as_me: program exited with status $ac_status" >&5
12985$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012986sed 's/^/| /' conftest.$ac_ext >&5
12987
Martin v. Löwis11437992002-04-12 09:54:03 +000012988( exit $ac_status )
12989ac_cv_sizeof_off_t=0
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012990fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000012991rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000012992rm -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 +000012993fi
12994
Martin v. Löwiseba40652007-08-30 20:10:57 +000012995
12996
Guido van Rossumf98e2a71999-01-06 18:53:34 +000012997fi
12998
Benjamin Peterson697cd212010-05-02 16:45:11 +000012999{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13000$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013001
13002cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013003#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013004_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013005
Michael W. Hudson54241132001-12-07 15:38:26 +000013006
Benjamin Peterson697cd212010-05-02 16:45:11 +000013007{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13008$as_echo_n "checking whether to enable large file support... " >&6; }
Mark Dickinsoncaa44c02009-12-31 21:20:06 +000013009if test "$have_long_long" = yes
13010then
13011if test "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013012 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013013
Martin v. Löwis11437992002-04-12 09:54:03 +000013014cat >>confdefs.h <<\_ACEOF
13015#define HAVE_LARGEFILE_SUPPORT 1
13016_ACEOF
13017
Benjamin Peterson697cd212010-05-02 16:45:11 +000013018 { $as_echo "$as_me:$LINENO: result: yes" >&5
13019$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013020else
Benjamin Peterson697cd212010-05-02 16:45:11 +000013021 { $as_echo "$as_me:$LINENO: result: no" >&5
13022$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013023fi
Mark Dickinsoncaa44c02009-12-31 21:20:06 +000013024else
Benjamin Peterson697cd212010-05-02 16:45:11 +000013025 { $as_echo "$as_me:$LINENO: result: no" >&5
13026$as_echo "no" >&6; }
Mark Dickinsoncaa44c02009-12-31 21:20:06 +000013027fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013028
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013029# AC_CHECK_SIZEOF() doesn't include <time.h>.
Benjamin Peterson697cd212010-05-02 16:45:11 +000013030{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5
13031$as_echo_n "checking size of time_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013032if test "${ac_cv_sizeof_time_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000013033 $as_echo_n "(cached) " >&6
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013034else
13035 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013036 ac_cv_sizeof_time_t=4
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013037else
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013039/* confdefs.h. */
13040_ACEOF
13041cat confdefs.h >>conftest.$ac_ext
13042cat >>conftest.$ac_ext <<_ACEOF
13043/* end confdefs.h. */
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013044#include <stdio.h>
13045#include <time.h>
13046main()
13047{
13048 FILE *f=fopen("conftestval", "w");
13049 if (!f) exit(1);
13050 fprintf(f, "%d\n", sizeof(time_t));
13051 exit(0);
13052}
Martin v. Löwis11437992002-04-12 09:54:03 +000013053_ACEOF
13054rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013055if { (ac_try="$ac_link"
13056case "(($ac_try" in
13057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13058 *) ac_try_echo=$ac_try;;
13059esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013060eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13061$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013062 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013063 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000013064 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013065 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013066 { (case "(($ac_try" in
13067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13068 *) ac_try_echo=$ac_try;;
13069esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013070eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13071$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013072 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013073 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000013074 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013075 (exit $ac_status); }; }; then
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013076 ac_cv_sizeof_time_t=`cat conftestval`
13077else
Benjamin Peterson697cd212010-05-02 16:45:11 +000013078 $as_echo "$as_me: program exited with status $ac_status" >&5
13079$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013080sed 's/^/| /' conftest.$ac_ext >&5
13081
Martin v. Löwis11437992002-04-12 09:54:03 +000013082( exit $ac_status )
13083ac_cv_sizeof_time_t=0
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013084fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013085rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000013086rm -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 +000013087fi
13088
Martin v. Löwiseba40652007-08-30 20:10:57 +000013089
13090
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013091fi
13092
Benjamin Peterson697cd212010-05-02 16:45:11 +000013093{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
13094$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013095
13096cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013097#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013098_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013099
Michael W. Hudson54241132001-12-07 15:38:26 +000013100
13101
Trent Mick635f6fb2000-08-23 21:33:05 +000013102# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013103ac_save_cc="$CC"
13104if test "$ac_cv_kpthread" = "yes"
13105then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000013106elif test "$ac_cv_kthread" = "yes"
13107then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000013108elif test "$ac_cv_pthread" = "yes"
13109then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013110fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013111{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5
13112$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013113have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000013114cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013115/* confdefs.h. */
13116_ACEOF
13117cat confdefs.h >>conftest.$ac_ext
13118cat >>conftest.$ac_ext <<_ACEOF
13119/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013120#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013121int
13122main ()
13123{
Guido van Rossum12580492000-09-24 16:47:19 +000013124pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013125 ;
13126 return 0;
13127}
13128_ACEOF
13129rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013130if { (ac_try="$ac_compile"
13131case "(($ac_try" in
13132 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13133 *) ac_try_echo=$ac_try;;
13134esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013135eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13136$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013137 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013138 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013139 grep -v '^ *+' conftest.er1 >conftest.err
13140 rm -f conftest.er1
13141 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000013142 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013143 (exit $ac_status); } && {
13144 test -z "$ac_c_werror_flag" ||
13145 test ! -s conftest.err
13146 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013147 have_pthread_t=yes
13148else
Benjamin Peterson697cd212010-05-02 16:45:11 +000013149 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013150sed 's/^/| /' conftest.$ac_ext >&5
13151
Martin v. Löwiseba40652007-08-30 20:10:57 +000013152
Trent Mick635f6fb2000-08-23 21:33:05 +000013153fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013154
13155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000013156{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5
13157$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000013158if test "$have_pthread_t" = yes ; then
13159 # AC_CHECK_SIZEOF() doesn't include <pthread.h>.
Benjamin Peterson697cd212010-05-02 16:45:11 +000013160 { $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5
13161$as_echo_n "checking size of pthread_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000013163 $as_echo_n "(cached) " >&6
Trent Mick635f6fb2000-08-23 21:33:05 +000013164else
13165 if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000013166 ac_cv_sizeof_pthread_t=4
Trent Mick635f6fb2000-08-23 21:33:05 +000013167else
Martin v. Löwis11437992002-04-12 09:54:03 +000013168 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013169/* confdefs.h. */
13170_ACEOF
13171cat confdefs.h >>conftest.$ac_ext
13172cat >>conftest.$ac_ext <<_ACEOF
13173/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000013174#include <stdio.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000013175#include <pthread.h>
Trent Mick635f6fb2000-08-23 21:33:05 +000013176 main()
13177 {
13178 FILE *f=fopen("conftestval", "w");
13179 if (!f) exit(1);
13180 fprintf(f, "%d\n", sizeof(pthread_t));
13181 exit(0);
13182 }
Martin v. Löwis11437992002-04-12 09:54:03 +000013183_ACEOF
13184rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013185if { (ac_try="$ac_link"
13186case "(($ac_try" in
13187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13188 *) ac_try_echo=$ac_try;;
13189esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013190eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13191$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013192 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013193 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000013194 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013195 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000013196 { (case "(($ac_try" in
13197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13198 *) ac_try_echo=$ac_try;;
13199esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013200eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13201$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013202 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013203 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000013204 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013205 (exit $ac_status); }; }; then
Trent Mick635f6fb2000-08-23 21:33:05 +000013206 ac_cv_sizeof_pthread_t=`cat conftestval`
13207else
Benjamin Peterson697cd212010-05-02 16:45:11 +000013208 $as_echo "$as_me: program exited with status $ac_status" >&5
13209$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013210sed 's/^/| /' conftest.$ac_ext >&5
13211
Martin v. Löwis11437992002-04-12 09:54:03 +000013212( exit $ac_status )
13213ac_cv_sizeof_pthread_t=0
Trent Mick635f6fb2000-08-23 21:33:05 +000013214fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013215rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000013216rm -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 +000013217fi
13218
Martin v. Löwiseba40652007-08-30 20:10:57 +000013219
13220
Trent Mick635f6fb2000-08-23 21:33:05 +000013221fi
13222
Benjamin Peterson697cd212010-05-02 16:45:11 +000013223 { $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
13224$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013225
13226cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013227#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013228_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000013229
13230fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000013231CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000013232
Benjamin Peterson697cd212010-05-02 16:45:11 +000013233{ $as_echo "$as_me:$LINENO: checking for --enable-toolbox-glue" >&5
13234$as_echo_n "checking for --enable-toolbox-glue... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013235# Check whether --enable-toolbox-glue was given.
Jack Jansene578a632001-08-15 01:27:14 +000013236if test "${enable_toolbox_glue+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013237 enableval=$enable_toolbox_glue;
13238fi
Jack Jansene578a632001-08-15 01:27:14 +000013239
13240
13241if test -z "$enable_toolbox_glue"
Martin v. Löwis11437992002-04-12 09:54:03 +000013242then
Jack Jansene578a632001-08-15 01:27:14 +000013243 case $ac_sys_system/$ac_sys_release in
13244 Darwin/*)
13245 enable_toolbox_glue="yes";;
13246 *)
13247 enable_toolbox_glue="no";;
13248 esac
13249fi
13250case "$enable_toolbox_glue" in
13251yes)
Jack Jansene578a632001-08-15 01:27:14 +000013252 extra_machdep_objs="Python/mactoolboxglue.o"
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013253 extra_undefs="-u _PyMac_Error"
Martin v. Löwis11437992002-04-12 09:54:03 +000013254
13255cat >>confdefs.h <<\_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013256#define USE_TOOLBOX_OBJECT_GLUE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000013257_ACEOF
Jack Jansene578a632001-08-15 01:27:14 +000013258
13259 ;;
13260*)
Jack Jansene578a632001-08-15 01:27:14 +000013261 extra_machdep_objs=""
Jack Jansen591cbed2001-08-15 13:55:15 +000013262 extra_undefs=""
Jack Jansene578a632001-08-15 01:27:14 +000013263 ;;
13264esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013265{ $as_echo "$as_me:$LINENO: result: $enable_toolbox_glue" >&5
13266$as_echo "$enable_toolbox_glue" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000013267
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013268
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013269
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013270case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013271 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013272 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
13273 ;;
13274 Darwin/*)
13275 OTHER_LIBTOOL_OPT=""
13276 ;;
13277esac
13278
13279
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013280ARCH_RUN_32BIT=""
13281
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013282case $ac_sys_system/$ac_sys_release in
Anthony Baxter82201742006-04-09 15:07:40 +000013283 Darwin/[01567]\..*)
Ronald Oussoren988117f2006-04-29 11:31:35 +000013284 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
13285 if test "${enable_universalsdk}"; then
13286 :
13287 else
Ronald Oussoren25e192c2010-02-11 13:27:59 +000013288 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `/usr/bin/arch`"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013289 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000013290 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013291 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000013292 Darwin/*)
Ronald Oussorenc0fa2d22010-02-07 11:50:54 +000013293 gcc_version=`gcc -dumpversion`
Bob Ippolito7026a0a2005-03-28 23:23:47 +000013294 if test ${gcc_version} '<' 4.0
13295 then
13296 LIBTOOL_CRUFT="-lcc_dynamic"
13297 else
13298 LIBTOOL_CRUFT=""
13299 fi
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013300 if test "$cross_compiling" = yes; then
13301 ac_osx_32bit=yes
13302else
13303 cat >conftest.$ac_ext <<_ACEOF
13304/* confdefs.h. */
13305_ACEOF
13306cat confdefs.h >>conftest.$ac_ext
13307cat >>conftest.$ac_ext <<_ACEOF
13308/* end confdefs.h. */
13309
13310 #include <unistd.h>
13311 int main(int argc, char*argv[])
13312 {
13313 if (sizeof(long) == 4) {
13314 return 0;
13315 } else {
13316 return 1;
13317 }
13318 }
13319
13320_ACEOF
13321rm -f conftest$ac_exeext
13322if { (ac_try="$ac_link"
13323case "(($ac_try" in
13324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13325 *) ac_try_echo=$ac_try;;
13326esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013327eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13328$as_echo "$ac_try_echo") >&5
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013329 (eval "$ac_link") 2>&5
13330 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000013331 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013332 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13333 { (case "(($ac_try" in
13334 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13335 *) ac_try_echo=$ac_try;;
13336esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013337eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13338$as_echo "$ac_try_echo") >&5
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013339 (eval "$ac_try") 2>&5
13340 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000013341 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013342 (exit $ac_status); }; }; then
13343 ac_osx_32bit=yes
13344else
Benjamin Peterson697cd212010-05-02 16:45:11 +000013345 $as_echo "$as_me: program exited with status $ac_status" >&5
13346$as_echo "$as_me: failed program was:" >&5
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013347sed 's/^/| /' conftest.$ac_ext >&5
13348
13349( exit $ac_status )
13350ac_osx_32bit=no
13351fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013352rm -rf conftest.dSYM
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013353rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13354fi
13355
13356
13357
13358 if test "${ac_osx_32bit}" = "yes"; then
Ronald Oussoren25e192c2010-02-11 13:27:59 +000013359 case `/usr/bin/arch` in
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013360 i386)
13361 MACOSX_DEFAULT_ARCH="i386"
13362 ;;
13363 ppc)
13364 MACOSX_DEFAULT_ARCH="ppc"
13365 ;;
13366 *)
Benjamin Peterson697cd212010-05-02 16:45:11 +000013367 { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13368$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013369 { (exit 1); exit 1; }; }
13370 ;;
13371 esac
13372 else
Ronald Oussoren25e192c2010-02-11 13:27:59 +000013373 case `/usr/bin/arch` in
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013374 i386)
13375 MACOSX_DEFAULT_ARCH="x86_64"
13376 ;;
13377 ppc)
13378 MACOSX_DEFAULT_ARCH="ppc64"
13379 ;;
13380 *)
Benjamin Peterson697cd212010-05-02 16:45:11 +000013381 { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
13382$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren7ab74352009-09-08 07:10:07 +000013383 { (exit 1); exit 1; }; }
13384 ;;
13385 esac
13386
13387 #ARCH_RUN_32BIT="true"
13388 fi
13389
13390 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000013391 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013392 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013393esac
13394
Benjamin Peterson697cd212010-05-02 16:45:11 +000013395{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5
13396$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013397if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013398then
Skip Montanarodecc6a42003-01-01 20:07:49 +000013399 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000013400 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000013401 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013402
Martin v. Löwis11437992002-04-12 09:54:03 +000013403cat >>confdefs.h <<\_ACEOF
13404#define WITH_NEXT_FRAMEWORK 1
13405_ACEOF
13406
Benjamin Peterson697cd212010-05-02 16:45:11 +000013407 { $as_echo "$as_me:$LINENO: result: yes" >&5
13408$as_echo "yes" >&6; }
Ronald Oussorene6e62672009-06-08 21:19:36 +000013409 if test $enable_shared = "yes"
13410 then
Benjamin Peterson697cd212010-05-02 16:45:11 +000013411 { { $as_echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&5
13412$as_echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead. See Mac/README." >&2;}
Ronald Oussorene6e62672009-06-08 21:19:36 +000013413 { (exit 1); exit 1; }; }
13414 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013415else
Benjamin Peterson697cd212010-05-02 16:45:11 +000013416 { $as_echo "$as_me:$LINENO: result: no" >&5
13417$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013418fi
13419
Benjamin Peterson697cd212010-05-02 16:45:11 +000013420{ $as_echo "$as_me:$LINENO: checking for dyld" >&5
13421$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013422case $ac_sys_system/$ac_sys_release in
13423 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013424
Martin v. Löwis11437992002-04-12 09:54:03 +000013425cat >>confdefs.h <<\_ACEOF
13426#define WITH_DYLD 1
13427_ACEOF
13428
Benjamin Peterson697cd212010-05-02 16:45:11 +000013429 { $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5
13430$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013431 ;;
13432 *)
Benjamin Peterson697cd212010-05-02 16:45:11 +000013433 { $as_echo "$as_me:$LINENO: result: no" >&5
13434$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000013435 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000013436esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013437
Guido van Rossum0a516c91994-09-12 10:58:40 +000013438# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000013439
Michael W. Hudson54241132001-12-07 15:38:26 +000013440
13441
13442
13443
Guido van Rossum0a516c91994-09-12 10:58:40 +000013444# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000013445# -- usually .so, .sl on HP-UX, .dll on Cygwin
Benjamin Peterson697cd212010-05-02 16:45:11 +000013446{ $as_echo "$as_me:$LINENO: checking SO" >&5
13447$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013448if test -z "$SO"
13449then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013450 case $ac_sys_system in
Neal Norwitz58e28882006-05-19 07:00:58 +000013451 hp*|HP*)
13452 case `uname -m` in
13453 ia64) SO=.so;;
13454 *) SO=.sl;;
13455 esac
13456 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013457 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000013458 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013459 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000013460else
13461 # this might also be a termcap variable, see #610332
13462 echo
13463 echo '====================================================================='
13464 echo '+ +'
13465 echo '+ WARNING: You have set SO in your environment. +'
13466 echo '+ Do you really mean to change the extension for shared libraries? +'
13467 echo '+ Continuing in 10 seconds to let you to ponder. +'
13468 echo '+ +'
13469 echo '====================================================================='
13470 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000013471fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013472{ $as_echo "$as_me:$LINENO: result: $SO" >&5
13473$as_echo "$SO" >&6; }
Neal Norwitz58e28882006-05-19 07:00:58 +000013474
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013475
Neal Norwitz58e28882006-05-19 07:00:58 +000013476cat >>confdefs.h <<_ACEOF
13477#define SHLIB_EXT "$SO"
13478_ACEOF
13479
Guido van Rossum0a516c91994-09-12 10:58:40 +000013480# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000013481# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013482# (Shared libraries in this instance are shared modules to be loaded into
13483# Python, as opposed to building Python itself as a shared library.)
Benjamin Peterson697cd212010-05-02 16:45:11 +000013484{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5
13485$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013486if test -z "$LDSHARED"
13487then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013488 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013489 AIX*)
13490 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000013491 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013492 ;;
13493 BeOS*)
13494 BLDSHARED="\$(srcdir)/Modules/ld_so_beos $LDLIBRARY"
Guido van Rossumce608b02001-09-28 15:59:38 +000013495 LDSHARED="\$(BINLIBDEST)/config/ld_so_beos \$(LIBDIR)/$LDLIBRARY"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013496 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000013497 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000013498 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000013499 SunOS/5*)
Greg Ward57c9a662000-05-26 12:22:54 +000013500 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000013501 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000013502 else LDSHARED='$(CC) -G';
Greg Ward57c9a662000-05-26 12:22:54 +000013503 fi ;;
Thomas Hellerdc96a772008-04-04 10:07:55 +000013504 hp*|HP*)
13505 if test "$GCC" = "yes"
13506 then LDSHARED='$(CC) -shared'
13507 else LDSHARED='ld -b';
13508 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000013509 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000013510 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000013511 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13512 if test "$enable_framework" ; then
13513 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013514 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13515 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000013516 else
13517 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000013518 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000013519 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013520 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000013521 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13522 if test "$enable_framework" ; then
13523 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013524 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13525 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013526 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000013527 # No framework, use the Python app as bundle-loader
13528 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000013529 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013530 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000013531 Darwin/*)
13532 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
13533 # This allows an extension to be used in any Python
Ronald Oussoren38f1b982007-09-02 09:46:07 +000013534
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013535 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000013536 then
Ronald Oussoren988117f2006-04-29 11:31:35 +000013537 if test "${enable_universalsdk}"; then
Ronald Oussoren5640ce22008-06-05 12:58:24 +000013538 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Ronald Oussoren988117f2006-04-29 11:31:35 +000013539 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000013540 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
13541 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000013542 else
13543 LDSHARED='$(CC) $(LDFLAGS) -bundle'
13544 if test "$enable_framework" ; then
13545 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000013546 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
13547 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000013548 else
13549 # No framework, use the Python app as bundle-loader
13550 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
13551 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
13552 fi
13553 fi
13554 ;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013555 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000013556 BSD/OS*/4*) LDSHARED="gcc -shared";;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013557 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000013558 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000013559 then
Benjamin Peterson697cd212010-05-02 16:45:11 +000013560 LDSHARED='$(CC) -shared ${LDFLAGS}'
Guido van Rossum0286ae82000-08-29 15:06:49 +000013561 else
13562 LDSHARED="ld -Bshareable ${LDFLAGS}"
13563 fi;;
Martin v. Löwis222c5152006-06-03 07:37:13 +000013564 OpenBSD*)
13565 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13566 then
13567 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13568 else
13569 case `uname -r` in
13570 [01].* | 2.[0-7] | 2.[0-7].*)
13571 LDSHARED="ld -Bshareable ${LDFLAGS}"
13572 ;;
13573 *)
13574 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
13575 ;;
13576 esac
13577 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013578 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013579 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013580 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013581 then LDSHARED='$(CC) -shared'
13582 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000013583 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000013584 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Trent Mick635f6fb2000-08-23 21:33:05 +000013585 Monterey*) LDSHARED="cc -G -dy -Bdynamic -Bexport -L/usr/lib/ia64l64";;
Guido van Rossumaef734b2001-01-10 21:09:12 +000013586 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013587 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013588 *) LDSHARED="ld";;
13589 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013590fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013591{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5
13592$as_echo "$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013593BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000013594# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013595# library (module) -- this is only needed for a few systems
Benjamin Peterson697cd212010-05-02 16:45:11 +000013596{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5
13597$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013598if test -z "$CCSHARED"
13599then
Guido van Rossum07397971997-04-29 21:49:50 +000013600 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000013601 SunOS*) if test "$GCC" = yes;
Martin v. Löwiseb623572007-03-12 10:50:39 +000013602 then CCSHARED="-fPIC";
13603 elif test `uname -p` = sparc;
13604 then CCSHARED="-xcode=pic32";
13605 else CCSHARED="-Kpic";
13606 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000013607 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000013608 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000013609 else CCSHARED="+z";
13610 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013611 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013612 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013613 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013614 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000013615 if test "$GCC" = "yes"
13616 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000013617 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000013618 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013619 SCO_SV*)
13620 if test "$GCC" = "yes"
13621 then CCSHARED="-fPIC"
13622 else CCSHARED="-Kpic -belf"
13623 fi;;
Trent Mick635f6fb2000-08-23 21:33:05 +000013624 Monterey*) CCSHARED="-G";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013625 IRIX*/6*) case $CC in
13626 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000013627 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013628 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013629 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013630 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013631fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013632{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5
13633$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013634# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013635# the python executable -- this is only needed for a few systems
Benjamin Peterson697cd212010-05-02 16:45:11 +000013636{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
13637$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013638if test -z "$LINKFORSHARED"
13639then
Guido van Rossum07397971997-04-29 21:49:50 +000013640 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000013641 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000013642 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000013643 LINKFORSHARED="-Wl,-E -Wl,+s";;
13644# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000013645 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000013646 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000013647 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000013648 Darwin/*)
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013649 # -u _PyMac_Error is needed to pull in the mac toolbox glue,
13650 # which is
Jack Jansene578a632001-08-15 01:27:14 +000013651 # not used by the core itself but which needs to be in the core so
13652 # that dynamically loaded extension modules have access to it.
Jack Jansen97e3f002003-02-23 22:59:01 +000013653 # -prebind is no longer used, because it actually seems to give a
13654 # slowdown in stead of a speedup, maybe due to the large number of
13655 # dynamic loads Python does.
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013656
13657 LINKFORSHARED="$extra_undefs"
Jack Jansene578a632001-08-15 01:27:14 +000013658 if test "$enable_framework"
13659 then
Jack Jansenda49e192005-01-07 13:08:22 +000013660 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000013661 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000013662 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000013663 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000013664 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000013665 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000013666 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000013667 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
13668 then
13669 LINKFORSHARED="-Wl,--export-dynamic"
13670 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013671 SunOS/5*) case $CC in
13672 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000013673 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000013674 then
13675 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000013676 fi;;
13677 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000013678 CYGWIN*)
13679 if test $enable_shared = "no"
13680 then
13681 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
13682 fi;;
Martin v. Löwis8c255e42008-05-23 15:06:50 +000013683 QNX*)
13684 # -Wl,-E causes the symbols to be added to the dynamic
13685 # symbol table so that they can be found when a module
13686 # is loaded. -N 2048K causes the stack size to be set
13687 # to 2048 kilobytes so that the stack doesn't overflow
13688 # when running test_compile.py.
13689 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000013690 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000013691fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013692{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
13693$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000013694
Michael W. Hudson54241132001-12-07 15:38:26 +000013695
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000013696
Benjamin Peterson697cd212010-05-02 16:45:11 +000013697{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
13698$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013699if test ! "$LIBRARY" = "$LDLIBRARY"
13700then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000013701 case $ac_sys_system in
13702 CYGWIN*)
13703 # Cygwin needs CCSHARED when building extension DLLs
13704 # but not when building the interpreter DLL.
13705 CFLAGSFORSHARED='';;
13706 *)
13707 CFLAGSFORSHARED='$(CCSHARED)'
13708 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013709fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013710{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
13711$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000013712
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013713# SHLIBS are libraries (except -lc and -lm) to link to the python shared
13714# library (with --enable-shared).
13715# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013716# symbols, this must be set to $(LIBS) (expanded by make). We do this even
13717# if it is not required, since it creates a dependency of the shared library
13718# to LIBS. This, in turn, means that applications linking the shared libpython
13719# don't need to link LIBS explicitly. The default should be only changed
13720# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013721
Benjamin Peterson697cd212010-05-02 16:45:11 +000013722{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5
13723$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013724case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013725 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000013726 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013727esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013728{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5
13729$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000013730
13731
Guido van Rossum627b2d71993-12-24 10:39:16 +000013732# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000013733
Benjamin Peterson697cd212010-05-02 16:45:11 +000013734{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
13735$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013736if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000013737 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013738else
Martin v. Löwis11437992002-04-12 09:54:03 +000013739 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013740LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013741cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013742/* confdefs.h. */
13743_ACEOF
13744cat confdefs.h >>conftest.$ac_ext
13745cat >>conftest.$ac_ext <<_ACEOF
13746/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013747
Martin v. Löwiseba40652007-08-30 20:10:57 +000013748/* Override any GCC internal prototype to avoid an error.
13749 Use char because int might match the return type of a GCC
13750 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013751#ifdef __cplusplus
13752extern "C"
13753#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013754char dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013755int
13756main ()
13757{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013758return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013759 ;
13760 return 0;
13761}
13762_ACEOF
13763rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013764if { (ac_try="$ac_link"
13765case "(($ac_try" in
13766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13767 *) ac_try_echo=$ac_try;;
13768esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013769eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13770$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013771 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013772 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013773 grep -v '^ *+' conftest.er1 >conftest.err
13774 rm -f conftest.er1
13775 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000013776 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013777 (exit $ac_status); } && {
13778 test -z "$ac_c_werror_flag" ||
13779 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000013780 } && test -s conftest$ac_exeext && {
13781 test "$cross_compiling" = yes ||
13782 $as_test_x conftest$ac_exeext
13783 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013784 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013785else
Benjamin Peterson697cd212010-05-02 16:45:11 +000013786 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013787sed 's/^/| /' conftest.$ac_ext >&5
13788
Martin v. Löwiseba40652007-08-30 20:10:57 +000013789 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013790fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013791
Benjamin Peterson697cd212010-05-02 16:45:11 +000013792rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000013793rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013794 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013795LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013796fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013797{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
13798$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13799if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013800 cat >>confdefs.h <<_ACEOF
13801#define HAVE_LIBDL 1
13802_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013803
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013804 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000013805
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013806fi
13807 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000013808
Benjamin Peterson697cd212010-05-02 16:45:11 +000013809{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
13810$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013811if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000013812 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013813else
Martin v. Löwis11437992002-04-12 09:54:03 +000013814 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013815LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000013816cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013817/* confdefs.h. */
13818_ACEOF
13819cat confdefs.h >>conftest.$ac_ext
13820cat >>conftest.$ac_ext <<_ACEOF
13821/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013822
Martin v. Löwiseba40652007-08-30 20:10:57 +000013823/* Override any GCC internal prototype to avoid an error.
13824 Use char because int might match the return type of a GCC
13825 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013826#ifdef __cplusplus
13827extern "C"
13828#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013829char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013830int
13831main ()
13832{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013833return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013834 ;
13835 return 0;
13836}
13837_ACEOF
13838rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000013839if { (ac_try="$ac_link"
13840case "(($ac_try" in
13841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13842 *) ac_try_echo=$ac_try;;
13843esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013844eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13845$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013846 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013847 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013848 grep -v '^ *+' conftest.er1 >conftest.err
13849 rm -f conftest.er1
13850 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000013851 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013852 (exit $ac_status); } && {
13853 test -z "$ac_c_werror_flag" ||
13854 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000013855 } && test -s conftest$ac_exeext && {
13856 test "$cross_compiling" = yes ||
13857 $as_test_x conftest$ac_exeext
13858 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013859 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013860else
Benjamin Peterson697cd212010-05-02 16:45:11 +000013861 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013862sed 's/^/| /' conftest.$ac_ext >&5
13863
Martin v. Löwiseba40652007-08-30 20:10:57 +000013864 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000013865fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013866
Benjamin Peterson697cd212010-05-02 16:45:11 +000013867rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000013868rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000013869 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013870LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000013871fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013872{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
13873$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
13874if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013875 cat >>confdefs.h <<_ACEOF
13876#define HAVE_LIBDLD 1
13877_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000013878
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000013879 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013880
Guido van Rossum76be6ed1995-01-02 18:33:54 +000013881fi
13882 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000013883
Ronald Oussorene9cce8e2009-01-02 10:46:42 +000013884# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000013885if test "$with_threads" = "yes" -o -z "$with_threads"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000013886 { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5
13887$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013888if test "${ac_cv_search_sem_init+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000013889 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013890else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013891 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000013892cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013893/* confdefs.h. */
13894_ACEOF
13895cat confdefs.h >>conftest.$ac_ext
13896cat >>conftest.$ac_ext <<_ACEOF
13897/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013898
Martin v. Löwiseba40652007-08-30 20:10:57 +000013899/* Override any GCC internal prototype to avoid an error.
13900 Use char because int might match the return type of a GCC
13901 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013902#ifdef __cplusplus
13903extern "C"
13904#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000013905char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013906int
13907main ()
13908{
Martin v. Löwiseba40652007-08-30 20:10:57 +000013909return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000013910 ;
13911 return 0;
13912}
13913_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000013914for ac_lib in '' pthread rt posix4; do
13915 if test -z "$ac_lib"; then
13916 ac_res="none required"
13917 else
13918 ac_res=-l$ac_lib
Skip Montanaro89e975f2007-08-22 19:05:21 +000013919 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Martin v. Löwiseba40652007-08-30 20:10:57 +000013920 fi
13921 rm -f conftest.$ac_objext conftest$ac_exeext
13922if { (ac_try="$ac_link"
13923case "(($ac_try" in
13924 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13925 *) ac_try_echo=$ac_try;;
13926esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000013927eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13928$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013929 (eval "$ac_link") 2>conftest.er1
Skip Montanaro89e975f2007-08-22 19:05:21 +000013930 ac_status=$?
13931 grep -v '^ *+' conftest.er1 >conftest.err
13932 rm -f conftest.er1
13933 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000013934 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000013935 (exit $ac_status); } && {
13936 test -z "$ac_c_werror_flag" ||
13937 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000013938 } && test -s conftest$ac_exeext && {
13939 test "$cross_compiling" = yes ||
13940 $as_test_x conftest$ac_exeext
13941 }; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000013942 ac_cv_search_sem_init=$ac_res
Brett Cannon19fab762007-06-02 03:02:29 +000013943else
Benjamin Peterson697cd212010-05-02 16:45:11 +000013944 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro89e975f2007-08-22 19:05:21 +000013945sed 's/^/| /' conftest.$ac_ext >&5
13946
Martin v. Löwiseba40652007-08-30 20:10:57 +000013947
Brett Cannon19fab762007-06-02 03:02:29 +000013948fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013949
Benjamin Peterson697cd212010-05-02 16:45:11 +000013950rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000013951rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13952 conftest$ac_exeext
13953 if test "${ac_cv_search_sem_init+set}" = set; then
13954 break
Skip Montanaro89e975f2007-08-22 19:05:21 +000013955fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000013956done
13957if test "${ac_cv_search_sem_init+set}" = set; then
13958 :
13959else
13960 ac_cv_search_sem_init=no
13961fi
13962rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000013963LIBS=$ac_func_search_save_LIBS
13964fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000013965{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
13966$as_echo "$ac_cv_search_sem_init" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000013967ac_res=$ac_cv_search_sem_init
13968if test "$ac_res" != no; then
13969 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013970
Martin v. Löwis41933dd2002-03-21 15:10:58 +000013971fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000013972 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000013973 # posix4 on Solaris 2.6
13974 # pthread (first!) on Linux
13975fi
13976
Martin v. Löwis19d17342003-06-14 21:03:05 +000013977# check if we need libintl for locale functions
Benjamin Peterson697cd212010-05-02 16:45:11 +000013978{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
13979$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000013980if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000013981 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000013982else
13983 ac_check_lib_save_LIBS=$LIBS
13984LIBS="-lintl $LIBS"
13985cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013986/* confdefs.h. */
13987_ACEOF
13988cat confdefs.h >>conftest.$ac_ext
13989cat >>conftest.$ac_ext <<_ACEOF
13990/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013991
Martin v. Löwiseba40652007-08-30 20:10:57 +000013992/* Override any GCC internal prototype to avoid an error.
13993 Use char because int might match the return type of a GCC
13994 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000013995#ifdef __cplusplus
13996extern "C"
13997#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000013998char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000013999int
14000main ()
14001{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014002return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000014003 ;
14004 return 0;
14005}
14006_ACEOF
14007rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014008if { (ac_try="$ac_link"
14009case "(($ac_try" in
14010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14011 *) ac_try_echo=$ac_try;;
14012esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014013eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14014$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014015 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000014016 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014017 grep -v '^ *+' conftest.er1 >conftest.err
14018 rm -f conftest.er1
14019 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000014020 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014021 (exit $ac_status); } && {
14022 test -z "$ac_c_werror_flag" ||
14023 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000014024 } && test -s conftest$ac_exeext && {
14025 test "$cross_compiling" = yes ||
14026 $as_test_x conftest$ac_exeext
14027 }; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014028 ac_cv_lib_intl_textdomain=yes
14029else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014030 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014031sed 's/^/| /' conftest.$ac_ext >&5
14032
Martin v. Löwiseba40652007-08-30 20:10:57 +000014033 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000014034fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014035
Benjamin Peterson697cd212010-05-02 16:45:11 +000014036rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000014037rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014038 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000014039LIBS=$ac_check_lib_save_LIBS
14040fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014041{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
14042$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
14043if test "x$ac_cv_lib_intl_textdomain" = x""yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000014044
14045cat >>confdefs.h <<\_ACEOF
14046#define WITH_LIBINTL 1
14047_ACEOF
14048
14049fi
14050
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014051
14052# checks for system dependent C++ extensions support
14053case "$ac_sys_system" in
Benjamin Peterson697cd212010-05-02 16:45:11 +000014054 AIX*) { $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
14055$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014056 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014057/* confdefs.h. */
14058_ACEOF
14059cat confdefs.h >>conftest.$ac_ext
14060cat >>conftest.$ac_ext <<_ACEOF
14061/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014062#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000014063int
14064main ()
14065{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014066loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000014067 ;
14068 return 0;
14069}
14070_ACEOF
14071rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014072if { (ac_try="$ac_link"
14073case "(($ac_try" in
14074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14075 *) ac_try_echo=$ac_try;;
14076esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014077eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14078$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014079 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014080 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014081 grep -v '^ *+' conftest.er1 >conftest.err
14082 rm -f conftest.er1
14083 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000014084 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014085 (exit $ac_status); } && {
14086 test -z "$ac_c_werror_flag" ||
14087 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000014088 } && test -s conftest$ac_exeext && {
14089 test "$cross_compiling" = yes ||
14090 $as_test_x conftest$ac_exeext
14091 }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014092
Martin v. Löwis11437992002-04-12 09:54:03 +000014093cat >>confdefs.h <<\_ACEOF
14094#define AIX_GENUINE_CPLUSPLUS 1
14095_ACEOF
14096
Benjamin Peterson697cd212010-05-02 16:45:11 +000014097 { $as_echo "$as_me:$LINENO: result: yes" >&5
14098$as_echo "yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014099else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014100 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014101sed 's/^/| /' conftest.$ac_ext >&5
14102
Benjamin Peterson697cd212010-05-02 16:45:11 +000014103 { $as_echo "$as_me:$LINENO: result: no" >&5
14104$as_echo "no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014105fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014106
Benjamin Peterson697cd212010-05-02 16:45:11 +000014107rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000014108rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014109 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000014110 *) ;;
14111esac
14112
Guido van Rossum70c7f481998-03-26 18:44:10 +000014113# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014114# BeOS' sockets are stashed in libnet.
Benjamin Peterson697cd212010-05-02 16:45:11 +000014115{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
14116$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014117if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000014118 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014119else
Martin v. Löwis11437992002-04-12 09:54:03 +000014120 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014121LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014122cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014123/* confdefs.h. */
14124_ACEOF
14125cat confdefs.h >>conftest.$ac_ext
14126cat >>conftest.$ac_ext <<_ACEOF
14127/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014128
Martin v. Löwiseba40652007-08-30 20:10:57 +000014129/* Override any GCC internal prototype to avoid an error.
14130 Use char because int might match the return type of a GCC
14131 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014132#ifdef __cplusplus
14133extern "C"
14134#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014135char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014136int
14137main ()
14138{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014139return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014140 ;
14141 return 0;
14142}
14143_ACEOF
14144rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014145if { (ac_try="$ac_link"
14146case "(($ac_try" in
14147 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14148 *) ac_try_echo=$ac_try;;
14149esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014150eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14151$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014152 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014153 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014154 grep -v '^ *+' conftest.er1 >conftest.err
14155 rm -f conftest.er1
14156 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000014157 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014158 (exit $ac_status); } && {
14159 test -z "$ac_c_werror_flag" ||
14160 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000014161 } && test -s conftest$ac_exeext && {
14162 test "$cross_compiling" = yes ||
14163 $as_test_x conftest$ac_exeext
14164 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014165 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014166else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014167 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014168sed 's/^/| /' conftest.$ac_ext >&5
14169
Martin v. Löwiseba40652007-08-30 20:10:57 +000014170 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014171fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014172
Benjamin Peterson697cd212010-05-02 16:45:11 +000014173rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000014174rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014175 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014176LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014177fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014178{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
14179$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
14180if test "x$ac_cv_lib_nsl_t_open" = x""yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014181 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000014182fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000014183 # SVR4
Benjamin Peterson697cd212010-05-02 16:45:11 +000014184{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
14185$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014186if test "${ac_cv_lib_socket_socket+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000014187 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014188else
Martin v. Löwis11437992002-04-12 09:54:03 +000014189 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014190LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014191cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014192/* confdefs.h. */
14193_ACEOF
14194cat confdefs.h >>conftest.$ac_ext
14195cat >>conftest.$ac_ext <<_ACEOF
14196/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014197
Martin v. Löwiseba40652007-08-30 20:10:57 +000014198/* Override any GCC internal prototype to avoid an error.
14199 Use char because int might match the return type of a GCC
14200 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014201#ifdef __cplusplus
14202extern "C"
14203#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014204char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014205int
14206main ()
14207{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014208return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014209 ;
14210 return 0;
14211}
14212_ACEOF
14213rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014214if { (ac_try="$ac_link"
14215case "(($ac_try" in
14216 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14217 *) ac_try_echo=$ac_try;;
14218esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014219eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14220$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014221 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014222 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014223 grep -v '^ *+' conftest.er1 >conftest.err
14224 rm -f conftest.er1
14225 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000014226 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014227 (exit $ac_status); } && {
14228 test -z "$ac_c_werror_flag" ||
14229 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000014230 } && test -s conftest$ac_exeext && {
14231 test "$cross_compiling" = yes ||
14232 $as_test_x conftest$ac_exeext
14233 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014234 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014235else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014236 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014237sed 's/^/| /' conftest.$ac_ext >&5
14238
Martin v. Löwiseba40652007-08-30 20:10:57 +000014239 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014240fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014241
Benjamin Peterson697cd212010-05-02 16:45:11 +000014242rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000014243rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014244 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014245LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014246fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014247{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
14248$as_echo "$ac_cv_lib_socket_socket" >&6; }
14249if test "x$ac_cv_lib_socket_socket" = x""yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000014250 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000014251fi
14252 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000014253
Jeremy Hyltoncb25d5e2000-07-27 21:23:28 +000014254case "$ac_sys_system" in
14255BeOS*)
Benjamin Peterson697cd212010-05-02 16:45:11 +000014256{ $as_echo "$as_me:$LINENO: checking for socket in -lnet" >&5
14257$as_echo_n "checking for socket in -lnet... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014258if test "${ac_cv_lib_net_socket+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000014259 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014260else
Martin v. Löwis11437992002-04-12 09:54:03 +000014261 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014262LIBS="-lnet $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014263cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014264/* confdefs.h. */
14265_ACEOF
14266cat confdefs.h >>conftest.$ac_ext
14267cat >>conftest.$ac_ext <<_ACEOF
14268/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014269
Martin v. Löwiseba40652007-08-30 20:10:57 +000014270/* Override any GCC internal prototype to avoid an error.
14271 Use char because int might match the return type of a GCC
14272 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014273#ifdef __cplusplus
14274extern "C"
14275#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014276char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014277int
14278main ()
14279{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014280return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014281 ;
14282 return 0;
14283}
14284_ACEOF
14285rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014286if { (ac_try="$ac_link"
14287case "(($ac_try" in
14288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14289 *) ac_try_echo=$ac_try;;
14290esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014291eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14292$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014293 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014294 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014295 grep -v '^ *+' conftest.er1 >conftest.err
14296 rm -f conftest.er1
14297 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000014298 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014299 (exit $ac_status); } && {
14300 test -z "$ac_c_werror_flag" ||
14301 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000014302 } && test -s conftest$ac_exeext && {
14303 test "$cross_compiling" = yes ||
14304 $as_test_x conftest$ac_exeext
14305 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014306 ac_cv_lib_net_socket=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014307else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014308 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014309sed 's/^/| /' conftest.$ac_ext >&5
14310
Martin v. Löwiseba40652007-08-30 20:10:57 +000014311 ac_cv_lib_net_socket=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014312fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014313
Benjamin Peterson697cd212010-05-02 16:45:11 +000014314rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000014315rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014316 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014317LIBS=$ac_check_lib_save_LIBS
Guido van Rossumad678af1998-10-02 14:42:15 +000014318fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014319{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_net_socket" >&5
14320$as_echo "$ac_cv_lib_net_socket" >&6; }
14321if test "x$ac_cv_lib_net_socket" = x""yes; then
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014322 LIBS="-lnet $LIBS"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000014323fi
14324 # BeOS
14325;;
14326esac
Guido van Rossum70c7f481998-03-26 18:44:10 +000014327
Benjamin Peterson697cd212010-05-02 16:45:11 +000014328{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5
14329$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014330
Martin v. Löwiseba40652007-08-30 20:10:57 +000014331# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000014332if test "${with_libs+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014333 withval=$with_libs;
Benjamin Peterson697cd212010-05-02 16:45:11 +000014334{ $as_echo "$as_me:$LINENO: result: $withval" >&5
14335$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000014336LIBS="$withval $LIBS"
14337
14338else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014339 { $as_echo "$as_me:$LINENO: result: no" >&5
14340$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014341fi
14342
Guido van Rossum7f43da71994-08-01 12:15:30 +000014343
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014344# Check for use of the system libffi library
Benjamin Peterson697cd212010-05-02 16:45:11 +000014345{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
14346$as_echo_n "checking for --with-system-ffi... " >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014347
Martin v. Löwiseba40652007-08-30 20:10:57 +000014348# Check whether --with-system_ffi was given.
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014349if test "${with_system_ffi+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014350 withval=$with_system_ffi;
14351fi
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014352
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014353
Benjamin Peterson697cd212010-05-02 16:45:11 +000014354{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5
14355$as_echo "$with_system_ffi" >&6; }
Martin v. Löwis9176fc12006-04-11 11:12:43 +000014356
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014357# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014358
14359
Benjamin Peterson697cd212010-05-02 16:45:11 +000014360{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5
14361$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014362
Martin v. Löwiseba40652007-08-30 20:10:57 +000014363# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014364if test "${with_signal_module+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014365 withval=$with_signal_module;
14366fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014367
14368
14369if test -z "$with_signal_module"
14370then with_signal_module="yes"
14371fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014372{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5
14373$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000014374
14375if test "${with_signal_module}" = "yes"; then
14376 USE_SIGNAL_MODULE=""
14377 SIGNAL_OBJS=""
14378else
14379 USE_SIGNAL_MODULE="#"
14380 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
14381fi
14382
Guido van Rossum3d15bd82001-01-10 18:53:48 +000014383# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000014384
Barry Warsawc0d24d82000-06-29 16:12:00 +000014385USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000014386
Benjamin Peterson697cd212010-05-02 16:45:11 +000014387{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
14388$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014389
Guido van Rossumec2f0731997-01-22 20:54:01 +000014390
Martin v. Löwiseba40652007-08-30 20:10:57 +000014391# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014392if test "${with_dec_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014393 withval=$with_dec_threads;
Benjamin Peterson697cd212010-05-02 16:45:11 +000014394{ $as_echo "$as_me:$LINENO: result: $withval" >&5
14395$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000014396LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000014397if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000014398 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000014399fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014400else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014401 { $as_echo "$as_me:$LINENO: result: no" >&5
14402$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000014403fi
14404
Martin v. Löwis11437992002-04-12 09:54:03 +000014405
14406# Templates for things AC_DEFINEd more than once.
14407# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014408
14409
Martin v. Löwis11437992002-04-12 09:54:03 +000014410
14411
14412
14413
14414
Benjamin Peterson697cd212010-05-02 16:45:11 +000014415{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5
14416$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014417
Martin v. Löwiseba40652007-08-30 20:10:57 +000014418# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000014419if test "${with_threads+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014420 withval=$with_threads;
14421fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000014422
14423
Barry Warsawc0d24d82000-06-29 16:12:00 +000014424# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000014425
Martin v. Löwiseba40652007-08-30 20:10:57 +000014426# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000014427if test "${with_thread+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000014428 withval=$with_thread; with_threads=$with_thread
14429fi
14430
Barry Warsawc0d24d82000-06-29 16:12:00 +000014431
14432if test -z "$with_threads"
14433then with_threads="yes"
14434fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014435{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5
14436$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d82000-06-29 16:12:00 +000014437
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014438
Barry Warsawc0d24d82000-06-29 16:12:00 +000014439if test "$with_threads" = "no"
14440then
14441 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014442elif test "$ac_cv_pthread_is_default" = yes
14443then
Martin v. Löwis11437992002-04-12 09:54:03 +000014444 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014445#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014446_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014447
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014448 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000014449 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014450#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014451_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000014452
14453 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000014454 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014455elif test "$ac_cv_kpthread" = "yes"
14456then
14457 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014458 if test "$ac_cv_cxx_thread" = "yes"; then
14459 CXX="$CXX -Kpthread"
14460 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000014461 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014462#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014463_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000014464
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000014465 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014466 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014467elif test "$ac_cv_kthread" = "yes"
14468then
14469 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014470 if test "$ac_cv_cxx_thread" = "yes"; then
14471 CXX="$CXX -Kthread"
14472 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014473 cat >>confdefs.h <<\_ACEOF
14474#define WITH_THREAD 1
14475_ACEOF
14476
14477 posix_threads=yes
14478 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014479elif test "$ac_cv_pthread" = "yes"
14480then
14481 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000014482 if test "$ac_cv_cxx_thread" = "yes"; then
14483 CXX="$CXX -pthread"
14484 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014485 cat >>confdefs.h <<\_ACEOF
14486#define WITH_THREAD 1
14487_ACEOF
14488
14489 posix_threads=yes
14490 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014491else
14492 if test ! -z "$with_threads" -a -d "$with_threads"
14493 then LDFLAGS="$LDFLAGS -L$with_threads"
14494 fi
14495 if test ! -z "$withval" -a -d "$withval"
14496 then LDFLAGS="$LDFLAGS -L$withval"
14497 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014498
14499 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000014500 # define _POSIX_THREADS in unistd.h. Some apparently don't
14501 # (e.g. gnu pth with pthread emulation)
Benjamin Peterson697cd212010-05-02 16:45:11 +000014502 { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
14503$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014504 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014505/* confdefs.h. */
14506_ACEOF
14507cat confdefs.h >>conftest.$ac_ext
14508cat >>conftest.$ac_ext <<_ACEOF
14509/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014510
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014511#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000014512#ifdef _POSIX_THREADS
14513yes
14514#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014515
14516_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014517if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000014518 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014519 unistd_defines_pthreads=yes
14520else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014521 unistd_defines_pthreads=no
14522fi
Jesus Cead54cdf02010-04-28 11:11:36 +000014523rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014524
Benjamin Peterson697cd212010-05-02 16:45:11 +000014525 { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
14526$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014527
Martin v. Löwis11437992002-04-12 09:54:03 +000014528 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014529#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014530_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000014531
Martin v. Löwis11437992002-04-12 09:54:03 +000014532 if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000014533 { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
14534$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014535if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000014536 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014537fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014538{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14539$as_echo "$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014540else
Martin v. Löwis11437992002-04-12 09:54:03 +000014541 # Is the header compilable?
Benjamin Peterson697cd212010-05-02 16:45:11 +000014542{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5
14543$as_echo_n "checking cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014544cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014545/* confdefs.h. */
14546_ACEOF
14547cat confdefs.h >>conftest.$ac_ext
14548cat >>conftest.$ac_ext <<_ACEOF
14549/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014550$ac_includes_default
14551#include <cthreads.h>
14552_ACEOF
14553rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014554if { (ac_try="$ac_compile"
14555case "(($ac_try" in
14556 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14557 *) ac_try_echo=$ac_try;;
14558esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014559eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14560$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014561 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014562 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014563 grep -v '^ *+' conftest.er1 >conftest.err
14564 rm -f conftest.er1
14565 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000014566 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014567 (exit $ac_status); } && {
14568 test -z "$ac_c_werror_flag" ||
14569 test ! -s conftest.err
14570 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014571 ac_header_compiler=yes
14572else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014573 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014574sed 's/^/| /' conftest.$ac_ext >&5
14575
Martin v. Löwiseba40652007-08-30 20:10:57 +000014576 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014577fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014578
14579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000014580{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14581$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014582
14583# Is the header present?
Benjamin Peterson697cd212010-05-02 16:45:11 +000014584{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5
14585$as_echo_n "checking cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014586cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014587/* confdefs.h. */
14588_ACEOF
14589cat confdefs.h >>conftest.$ac_ext
14590cat >>conftest.$ac_ext <<_ACEOF
14591/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014592#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014593_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014594if { (ac_try="$ac_cpp conftest.$ac_ext"
14595case "(($ac_try" in
14596 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14597 *) ac_try_echo=$ac_try;;
14598esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014599eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14600$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014601 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014602 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014603 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014604 rm -f conftest.er1
14605 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000014606 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014607 (exit $ac_status); } >/dev/null && {
14608 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14609 test ! -s conftest.err
14610 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014611 ac_header_preproc=yes
14612else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014613 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014614sed 's/^/| /' conftest.$ac_ext >&5
14615
Martin v. Löwis11437992002-04-12 09:54:03 +000014616 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014618
Martin v. Löwis11437992002-04-12 09:54:03 +000014619rm -f conftest.err conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000014620{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14621$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014622
14623# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014624case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14625 yes:no: )
Benjamin Peterson697cd212010-05-02 16:45:11 +000014626 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14627$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14628 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
14629$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014630 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014631 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014632 no:yes:* )
Benjamin Peterson697cd212010-05-02 16:45:11 +000014633 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
14634$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
14635 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
14636$as_echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
14637 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
14638$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
14639 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14640$as_echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14641 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
14642$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
14643 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
14644$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014645 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014646## ------------------------------------------------ ##
14647## Report this to http://www.python.org/python-bugs ##
14648## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014649_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014650 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014651 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014652esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014653{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
14654$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014655if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000014656 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014657else
14658 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014659fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014660{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
14661$as_echo "$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014662
14663fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014664if test "x$ac_cv_header_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014665 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014666#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014667_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014668
Martin v. Löwis11437992002-04-12 09:54:03 +000014669 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014670#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014671_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014672
Martin v. Löwis11437992002-04-12 09:54:03 +000014673
14674cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014675#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014676_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014677
14678 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014679 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014680else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014681
Martin v. Löwis11437992002-04-12 09:54:03 +000014682 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000014683 { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14684$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014685if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000014686 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014687fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014688{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14689$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014690else
Martin v. Löwis11437992002-04-12 09:54:03 +000014691 # Is the header compilable?
Benjamin Peterson697cd212010-05-02 16:45:11 +000014692{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
14693$as_echo_n "checking mach/cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014694cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014695/* confdefs.h. */
14696_ACEOF
14697cat confdefs.h >>conftest.$ac_ext
14698cat >>conftest.$ac_ext <<_ACEOF
14699/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014700$ac_includes_default
14701#include <mach/cthreads.h>
14702_ACEOF
14703rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014704if { (ac_try="$ac_compile"
14705case "(($ac_try" in
14706 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14707 *) ac_try_echo=$ac_try;;
14708esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014709eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14710$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014711 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014712 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014713 grep -v '^ *+' conftest.er1 >conftest.err
14714 rm -f conftest.er1
14715 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000014716 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014717 (exit $ac_status); } && {
14718 test -z "$ac_c_werror_flag" ||
14719 test ! -s conftest.err
14720 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014721 ac_header_compiler=yes
14722else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014723 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014724sed 's/^/| /' conftest.$ac_ext >&5
14725
Martin v. Löwiseba40652007-08-30 20:10:57 +000014726 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014728
14729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000014730{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
14731$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014732
14733# Is the header present?
Benjamin Peterson697cd212010-05-02 16:45:11 +000014734{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
14735$as_echo_n "checking mach/cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014736cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014737/* confdefs.h. */
14738_ACEOF
14739cat confdefs.h >>conftest.$ac_ext
14740cat >>conftest.$ac_ext <<_ACEOF
14741/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014742#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014743_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000014744if { (ac_try="$ac_cpp conftest.$ac_ext"
14745case "(($ac_try" in
14746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14747 *) ac_try_echo=$ac_try;;
14748esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014749eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14750$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014751 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014752 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000014753 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000014754 rm -f conftest.er1
14755 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000014756 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014757 (exit $ac_status); } >/dev/null && {
14758 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
14759 test ! -s conftest.err
14760 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014761 ac_header_preproc=yes
14762else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014763 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014764sed 's/^/| /' conftest.$ac_ext >&5
14765
Martin v. Löwis11437992002-04-12 09:54:03 +000014766 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014767fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014768
Martin v. Löwis11437992002-04-12 09:54:03 +000014769rm -f conftest.err conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000014770{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
14771$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014772
14773# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014774case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
14775 yes:no: )
Benjamin Peterson697cd212010-05-02 16:45:11 +000014776 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
14777$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
14778 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
14779$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000014780 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000014781 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000014782 no:yes:* )
Benjamin Peterson697cd212010-05-02 16:45:11 +000014783 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
14784$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
14785 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
14786$as_echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
14787 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
14788$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
14789 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
14790$as_echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
14791 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
14792$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
14793 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
14794$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000014795 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000014796## ------------------------------------------------ ##
14797## Report this to http://www.python.org/python-bugs ##
14798## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000014799_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000014800 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000014801 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000014802esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014803{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
14804$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014805if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000014806 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000014807else
14808 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014809fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014810{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
14811$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014812
14813fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014814if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014815 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014816#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014817_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014818
Martin v. Löwis11437992002-04-12 09:54:03 +000014819 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014820#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014821_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014822
Martin v. Löwis11437992002-04-12 09:54:03 +000014823
14824cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014825#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014826_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014827
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014828 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014829else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000014830
Benjamin Peterson697cd212010-05-02 16:45:11 +000014831 { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5
14832$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014833
Martin v. Löwiseba40652007-08-30 20:10:57 +000014834# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014835if test "${with_pth+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000014836 withval=$with_pth; { $as_echo "$as_me:$LINENO: result: $withval" >&5
14837$as_echo "$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014838 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000014839#define WITH_THREAD 1
14840_ACEOF
14841
14842
14843cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014844#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014845_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014846
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000014847 LIBS="-lpth $LIBS"
14848 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000014849else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014850 { $as_echo "$as_me:$LINENO: result: no" >&5
14851$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014852
14853 # Just looking for pthread_create in libpthread is not enough:
14854 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
14855 # So we really have to include pthread.h, and then link.
14856 _libs=$LIBS
14857 LIBS="$LIBS -lpthread"
Benjamin Peterson697cd212010-05-02 16:45:11 +000014858 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
14859$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014860 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014861/* confdefs.h. */
14862_ACEOF
14863cat confdefs.h >>conftest.$ac_ext
14864cat >>conftest.$ac_ext <<_ACEOF
14865/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014866#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000014867
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014868void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000014869int
14870main ()
14871{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014872
14873pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000014874 ;
14875 return 0;
14876}
14877_ACEOF
14878rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014879if { (ac_try="$ac_link"
14880case "(($ac_try" in
14881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14882 *) ac_try_echo=$ac_try;;
14883esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014884eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14885$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014886 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014888 grep -v '^ *+' conftest.er1 >conftest.err
14889 rm -f conftest.er1
14890 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000014891 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014892 (exit $ac_status); } && {
14893 test -z "$ac_c_werror_flag" ||
14894 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000014895 } && test -s conftest$ac_exeext && {
14896 test "$cross_compiling" = yes ||
14897 $as_test_x conftest$ac_exeext
14898 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014899
Benjamin Peterson697cd212010-05-02 16:45:11 +000014900 { $as_echo "$as_me:$LINENO: result: yes" >&5
14901$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014902 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014903#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000014904_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000014905
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000014906 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000014907 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000014908else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014909 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014910sed 's/^/| /' conftest.$ac_ext >&5
14911
Martin v. Löwis11437992002-04-12 09:54:03 +000014912
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000014913 LIBS=$_libs
Benjamin Peterson697cd212010-05-02 16:45:11 +000014914 { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5
14915$as_echo_n "checking for pthread_detach... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014916if test "${ac_cv_func_pthread_detach+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000014917 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000014918else
Martin v. Löwis11437992002-04-12 09:54:03 +000014919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014920/* confdefs.h. */
14921_ACEOF
14922cat confdefs.h >>conftest.$ac_ext
14923cat >>conftest.$ac_ext <<_ACEOF
14924/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014925/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
14926 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14927#define pthread_detach innocuous_pthread_detach
14928
Guido van Rossumad678af1998-10-02 14:42:15 +000014929/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000014930 which can conflict with char pthread_detach (); below.
14931 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014932 <limits.h> exists even on freestanding compilers. */
14933
14934#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000014935# include <limits.h>
14936#else
14937# include <assert.h>
14938#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000014939
14940#undef pthread_detach
14941
Martin v. Löwiseba40652007-08-30 20:10:57 +000014942/* Override any GCC internal prototype to avoid an error.
14943 Use char because int might match the return type of a GCC
14944 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014945#ifdef __cplusplus
14946extern "C"
14947#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000014948char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000014949/* The GNU C library defines this for functions which it implements
14950 to always fail with ENOSYS. Some functions are actually named
14951 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000014952#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000014953choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000014954#endif
14955
Skip Montanaro6dead952003-09-25 14:50:04 +000014956int
14957main ()
14958{
Martin v. Löwiseba40652007-08-30 20:10:57 +000014959return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014960 ;
14961 return 0;
14962}
14963_ACEOF
14964rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000014965if { (ac_try="$ac_link"
14966case "(($ac_try" in
14967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14968 *) ac_try_echo=$ac_try;;
14969esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000014970eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14971$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014972 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014973 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014974 grep -v '^ *+' conftest.er1 >conftest.err
14975 rm -f conftest.er1
14976 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000014977 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000014978 (exit $ac_status); } && {
14979 test -z "$ac_c_werror_flag" ||
14980 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000014981 } && test -s conftest$ac_exeext && {
14982 test "$cross_compiling" = yes ||
14983 $as_test_x conftest$ac_exeext
14984 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014985 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000014986else
Benjamin Peterson697cd212010-05-02 16:45:11 +000014987 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014988sed 's/^/| /' conftest.$ac_ext >&5
14989
Martin v. Löwiseba40652007-08-30 20:10:57 +000014990 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000014991fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000014992
Benjamin Peterson697cd212010-05-02 16:45:11 +000014993rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000014994rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014995 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000014996fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000014997{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
14998$as_echo "$ac_cv_func_pthread_detach" >&6; }
14999if test "x$ac_cv_func_pthread_detach" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015000 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015001#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015002_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000015003
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015004 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015005 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000015006else
Guido van Rossumad678af1998-10-02 14:42:15 +000015007
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015008 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015009 { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15010$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015011if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015012 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015013fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015014{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15015$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015016else
15017 # Is the header compilable?
Benjamin Peterson697cd212010-05-02 16:45:11 +000015018{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
15019$as_echo_n "checking atheos/threads.h usability... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015020cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015021/* confdefs.h. */
15022_ACEOF
15023cat confdefs.h >>conftest.$ac_ext
15024cat >>conftest.$ac_ext <<_ACEOF
15025/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015026$ac_includes_default
15027#include <atheos/threads.h>
15028_ACEOF
15029rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015030if { (ac_try="$ac_compile"
15031case "(($ac_try" in
15032 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15033 *) ac_try_echo=$ac_try;;
15034esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015035eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15036$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015037 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015038 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015039 grep -v '^ *+' conftest.er1 >conftest.err
15040 rm -f conftest.er1
15041 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000015042 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015043 (exit $ac_status); } && {
15044 test -z "$ac_c_werror_flag" ||
15045 test ! -s conftest.err
15046 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015047 ac_header_compiler=yes
15048else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015049 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015050sed 's/^/| /' conftest.$ac_ext >&5
15051
Martin v. Löwiseba40652007-08-30 20:10:57 +000015052 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015053fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015054
15055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000015056{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15057$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015058
15059# Is the header present?
Benjamin Peterson697cd212010-05-02 16:45:11 +000015060{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
15061$as_echo_n "checking atheos/threads.h presence... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015062cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015063/* confdefs.h. */
15064_ACEOF
15065cat confdefs.h >>conftest.$ac_ext
15066cat >>conftest.$ac_ext <<_ACEOF
15067/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015068#include <atheos/threads.h>
15069_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015070if { (ac_try="$ac_cpp conftest.$ac_ext"
15071case "(($ac_try" in
15072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15073 *) ac_try_echo=$ac_try;;
15074esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015075eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15076$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015077 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015078 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015079 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015080 rm -f conftest.er1
15081 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000015082 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015083 (exit $ac_status); } >/dev/null && {
15084 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15085 test ! -s conftest.err
15086 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015087 ac_header_preproc=yes
15088else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015089 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015090sed 's/^/| /' conftest.$ac_ext >&5
15091
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015092 ac_header_preproc=no
15093fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015094
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015095rm -f conftest.err conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000015096{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15097$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015098
15099# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015100case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15101 yes:no: )
Benjamin Peterson697cd212010-05-02 16:45:11 +000015102 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15103$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15104 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
15105$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015106 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015107 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015108 no:yes:* )
Benjamin Peterson697cd212010-05-02 16:45:11 +000015109 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
15110$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
15111 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
15112$as_echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
15113 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
15114$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
15115 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
15116$as_echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15117 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
15118$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
15119 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
15120$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015121 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015122## ------------------------------------------------ ##
15123## Report this to http://www.python.org/python-bugs ##
15124## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015125_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015126 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015127 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015128esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015129{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
15130$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015131if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015132 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015133else
15134 ac_cv_header_atheos_threads_h=$ac_header_preproc
15135fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015136{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
15137$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015138
15139fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015140if test "x$ac_cv_header_atheos_threads_h" = x""yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015141 cat >>confdefs.h <<\_ACEOF
15142#define WITH_THREAD 1
15143_ACEOF
15144
15145
15146cat >>confdefs.h <<\_ACEOF
15147#define ATHEOS_THREADS 1
15148_ACEOF
15149
15150 THREADOBJ="Python/thread.o"
15151else
15152
Martin v. Löwis11437992002-04-12 09:54:03 +000015153 if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015154 { $as_echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15155$as_echo_n "checking for kernel/OS.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015156if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015157 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015158fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015159{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15160$as_echo "$ac_cv_header_kernel_OS_h" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015161else
Martin v. Löwis11437992002-04-12 09:54:03 +000015162 # Is the header compilable?
Benjamin Peterson697cd212010-05-02 16:45:11 +000015163{ $as_echo "$as_me:$LINENO: checking kernel/OS.h usability" >&5
15164$as_echo_n "checking kernel/OS.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015165cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015166/* confdefs.h. */
15167_ACEOF
15168cat confdefs.h >>conftest.$ac_ext
15169cat >>conftest.$ac_ext <<_ACEOF
15170/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015171$ac_includes_default
15172#include <kernel/OS.h>
15173_ACEOF
15174rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015175if { (ac_try="$ac_compile"
15176case "(($ac_try" in
15177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15178 *) ac_try_echo=$ac_try;;
15179esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015180eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15181$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015184 grep -v '^ *+' conftest.er1 >conftest.err
15185 rm -f conftest.er1
15186 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000015187 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015188 (exit $ac_status); } && {
15189 test -z "$ac_c_werror_flag" ||
15190 test ! -s conftest.err
15191 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015192 ac_header_compiler=yes
15193else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015194 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015195sed 's/^/| /' conftest.$ac_ext >&5
15196
Martin v. Löwiseba40652007-08-30 20:10:57 +000015197 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015198fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015199
15200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000015201{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15202$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015203
15204# Is the header present?
Benjamin Peterson697cd212010-05-02 16:45:11 +000015205{ $as_echo "$as_me:$LINENO: checking kernel/OS.h presence" >&5
15206$as_echo_n "checking kernel/OS.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015207cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015208/* confdefs.h. */
15209_ACEOF
15210cat confdefs.h >>conftest.$ac_ext
15211cat >>conftest.$ac_ext <<_ACEOF
15212/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015213#include <kernel/OS.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015214_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000015215if { (ac_try="$ac_cpp conftest.$ac_ext"
15216case "(($ac_try" in
15217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15218 *) ac_try_echo=$ac_try;;
15219esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015220eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15221$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015222 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015223 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015224 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015225 rm -f conftest.er1
15226 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000015227 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015228 (exit $ac_status); } >/dev/null && {
15229 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15230 test ! -s conftest.err
15231 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015232 ac_header_preproc=yes
15233else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015234 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015235sed 's/^/| /' conftest.$ac_ext >&5
15236
Martin v. Löwis11437992002-04-12 09:54:03 +000015237 ac_header_preproc=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015238fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015239
Martin v. Löwis11437992002-04-12 09:54:03 +000015240rm -f conftest.err conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000015241{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15242$as_echo "$ac_header_preproc" >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015243
Martin v. Löwis11437992002-04-12 09:54:03 +000015244# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015245case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15246 yes:no: )
Benjamin Peterson697cd212010-05-02 16:45:11 +000015247 { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&5
15248$as_echo "$as_me: WARNING: kernel/OS.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15249 { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the compiler's result" >&5
15250$as_echo "$as_me: WARNING: kernel/OS.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015251 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015252 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015253 no:yes:* )
Benjamin Peterson697cd212010-05-02 16:45:11 +000015254 { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: present but cannot be compiled" >&5
15255$as_echo "$as_me: WARNING: kernel/OS.h: present but cannot be compiled" >&2;}
15256 { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&5
15257$as_echo "$as_me: WARNING: kernel/OS.h: check for missing prerequisite headers?" >&2;}
15258 { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: see the Autoconf documentation" >&5
15259$as_echo "$as_me: WARNING: kernel/OS.h: see the Autoconf documentation" >&2;}
15260 { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&5
15261$as_echo "$as_me: WARNING: kernel/OS.h: section \"Present But Cannot Be Compiled\"" >&2;}
15262 { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&5
15263$as_echo "$as_me: WARNING: kernel/OS.h: proceeding with the preprocessor's result" >&2;}
15264 { $as_echo "$as_me:$LINENO: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&5
15265$as_echo "$as_me: WARNING: kernel/OS.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000015266 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000015267## ------------------------------------------------ ##
15268## Report this to http://www.python.org/python-bugs ##
15269## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015270_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000015271 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015272 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015273esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015274{ $as_echo "$as_me:$LINENO: checking for kernel/OS.h" >&5
15275$as_echo_n "checking for kernel/OS.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015276if test "${ac_cv_header_kernel_OS_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015277 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015278else
15279 ac_cv_header_kernel_OS_h=$ac_header_preproc
15280fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015281{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_kernel_OS_h" >&5
15282$as_echo "$ac_cv_header_kernel_OS_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015283
15284fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015285if test "x$ac_cv_header_kernel_OS_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015286 cat >>confdefs.h <<\_ACEOF
15287#define WITH_THREAD 1
15288_ACEOF
15289
15290
15291cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015292#define BEOS_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015293_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015294
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015295 THREADOBJ="Python/thread.o"
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015296else
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015297
Benjamin Peterson697cd212010-05-02 16:45:11 +000015298 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
15299$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015300if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015301 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015302else
Martin v. Löwis11437992002-04-12 09:54:03 +000015303 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015304LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015305cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015306/* confdefs.h. */
15307_ACEOF
15308cat confdefs.h >>conftest.$ac_ext
15309cat >>conftest.$ac_ext <<_ACEOF
15310/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015311
Martin v. Löwiseba40652007-08-30 20:10:57 +000015312/* Override any GCC internal prototype to avoid an error.
15313 Use char because int might match the return type of a GCC
15314 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015315#ifdef __cplusplus
15316extern "C"
15317#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015318char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015319int
15320main ()
15321{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015322return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015323 ;
15324 return 0;
15325}
15326_ACEOF
15327rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015328if { (ac_try="$ac_link"
15329case "(($ac_try" in
15330 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15331 *) ac_try_echo=$ac_try;;
15332esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015333eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15334$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015335 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015336 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015337 grep -v '^ *+' conftest.er1 >conftest.err
15338 rm -f conftest.er1
15339 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000015340 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015341 (exit $ac_status); } && {
15342 test -z "$ac_c_werror_flag" ||
15343 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000015344 } && test -s conftest$ac_exeext && {
15345 test "$cross_compiling" = yes ||
15346 $as_test_x conftest$ac_exeext
15347 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015348 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000015349else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015350 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015351sed 's/^/| /' conftest.$ac_ext >&5
15352
Martin v. Löwiseba40652007-08-30 20:10:57 +000015353 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000015354fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015355
Benjamin Peterson697cd212010-05-02 16:45:11 +000015356rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000015357rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015358 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015359LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015360fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015361{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
15362$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
15363if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015364 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015365#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015366_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000015367
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015368 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015369 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015370 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000015371else
Greg Steinadf63d62000-07-05 10:38:09 +000015372
Benjamin Peterson697cd212010-05-02 16:45:11 +000015373 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
15374$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015375if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015376 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000015377else
Martin v. Löwis11437992002-04-12 09:54:03 +000015378 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000015379LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015380cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015381/* confdefs.h. */
15382_ACEOF
15383cat confdefs.h >>conftest.$ac_ext
15384cat >>conftest.$ac_ext <<_ACEOF
15385/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015386
Martin v. Löwiseba40652007-08-30 20:10:57 +000015387/* Override any GCC internal prototype to avoid an error.
15388 Use char because int might match the return type of a GCC
15389 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015390#ifdef __cplusplus
15391extern "C"
15392#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015393char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015394int
15395main ()
15396{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015397return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015398 ;
15399 return 0;
15400}
15401_ACEOF
15402rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015403if { (ac_try="$ac_link"
15404case "(($ac_try" in
15405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15406 *) ac_try_echo=$ac_try;;
15407esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015408eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15409$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015410 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015411 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015412 grep -v '^ *+' conftest.er1 >conftest.err
15413 rm -f conftest.er1
15414 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000015415 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015416 (exit $ac_status); } && {
15417 test -z "$ac_c_werror_flag" ||
15418 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000015419 } && test -s conftest$ac_exeext && {
15420 test "$cross_compiling" = yes ||
15421 $as_test_x conftest$ac_exeext
15422 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015423 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000015424else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015425 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015426sed 's/^/| /' conftest.$ac_ext >&5
15427
Martin v. Löwiseba40652007-08-30 20:10:57 +000015428 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000015429fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015430
Benjamin Peterson697cd212010-05-02 16:45:11 +000015431rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000015432rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015433 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015434LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000015435fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015436{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
15437$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
15438if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015439 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015440#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015441_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000015442
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015443 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015444 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015445 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015446else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015447
Benjamin Peterson697cd212010-05-02 16:45:11 +000015448 { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
15449$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015450if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015451 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015452else
Martin v. Löwis11437992002-04-12 09:54:03 +000015453 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015454LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015455cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015456/* confdefs.h. */
15457_ACEOF
15458cat confdefs.h >>conftest.$ac_ext
15459cat >>conftest.$ac_ext <<_ACEOF
15460/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015461
Martin v. Löwiseba40652007-08-30 20:10:57 +000015462/* Override any GCC internal prototype to avoid an error.
15463 Use char because int might match the return type of a GCC
15464 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015465#ifdef __cplusplus
15466extern "C"
15467#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015468char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015469int
15470main ()
15471{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015472return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015473 ;
15474 return 0;
15475}
15476_ACEOF
15477rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015478if { (ac_try="$ac_link"
15479case "(($ac_try" in
15480 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15481 *) ac_try_echo=$ac_try;;
15482esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015483eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15484$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015485 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015486 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015487 grep -v '^ *+' conftest.er1 >conftest.err
15488 rm -f conftest.er1
15489 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000015490 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015491 (exit $ac_status); } && {
15492 test -z "$ac_c_werror_flag" ||
15493 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000015494 } && test -s conftest$ac_exeext && {
15495 test "$cross_compiling" = yes ||
15496 $as_test_x conftest$ac_exeext
15497 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015498 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015499else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015500 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015501sed 's/^/| /' conftest.$ac_ext >&5
15502
Martin v. Löwiseba40652007-08-30 20:10:57 +000015503 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015504fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015505
Benjamin Peterson697cd212010-05-02 16:45:11 +000015506rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000015507rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015508 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015509LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015510fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015511{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
15512$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
15513if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015514 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015515#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015516_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015517
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015518 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015519 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015520 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015521else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000015522
Benjamin Peterson697cd212010-05-02 16:45:11 +000015523 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
15524$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015525if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015526 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000015527else
Martin v. Löwis11437992002-04-12 09:54:03 +000015528 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015529LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015530cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015531/* confdefs.h. */
15532_ACEOF
15533cat confdefs.h >>conftest.$ac_ext
15534cat >>conftest.$ac_ext <<_ACEOF
15535/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015536
Martin v. Löwiseba40652007-08-30 20:10:57 +000015537/* Override any GCC internal prototype to avoid an error.
15538 Use char because int might match the return type of a GCC
15539 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015540#ifdef __cplusplus
15541extern "C"
15542#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015543char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015544int
15545main ()
15546{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015547return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015548 ;
15549 return 0;
15550}
15551_ACEOF
15552rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015553if { (ac_try="$ac_link"
15554case "(($ac_try" in
15555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15556 *) ac_try_echo=$ac_try;;
15557esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015558eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15559$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015560 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015561 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015562 grep -v '^ *+' conftest.er1 >conftest.err
15563 rm -f conftest.er1
15564 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000015565 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015566 (exit $ac_status); } && {
15567 test -z "$ac_c_werror_flag" ||
15568 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000015569 } && test -s conftest$ac_exeext && {
15570 test "$cross_compiling" = yes ||
15571 $as_test_x conftest$ac_exeext
15572 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015573 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000015574else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015575 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015576sed 's/^/| /' conftest.$ac_ext >&5
15577
Martin v. Löwiseba40652007-08-30 20:10:57 +000015578 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000015579fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015580
Benjamin Peterson697cd212010-05-02 16:45:11 +000015581rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000015582rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015583 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015584LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000015585fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015586{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
15587$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
15588if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015589 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015590#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015591_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000015592
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015593 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000015594 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015595 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000015596else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000015597
Martin v. Löwis130fb172001-07-19 11:00:41 +000015598 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000015599fi
15600
Guido van Rossum627b2d71993-12-24 10:39:16 +000015601
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015602fi
15603
Guido van Rossum0be3e491997-05-22 20:33:33 +000015604fi
15605
Guido van Rossum49545951997-12-02 19:28:29 +000015606fi
15607
Guido van Rossumb93a8621998-05-07 13:27:32 +000015608fi
15609
Guido van Rossum07bd90e2000-05-08 13:41:38 +000015610
Michael W. Hudson54241132001-12-07 15:38:26 +000015611fi
15612
Martin v. Löwisf90ae202002-06-11 06:22:31 +000015613
15614fi
15615
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015616fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015617
Benjamin Peterson697cd212010-05-02 16:45:11 +000015618rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000015619rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015620 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015621fi
15622
Martin v. Löwis11437992002-04-12 09:54:03 +000015623fi
15624
15625
15626fi
15627
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015628
Michael W. Hudson54241132001-12-07 15:38:26 +000015629
Benjamin Peterson697cd212010-05-02 16:45:11 +000015630 { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
15631$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015632if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015633 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015634else
Martin v. Löwis11437992002-04-12 09:54:03 +000015635 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015636LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015637cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015638/* confdefs.h. */
15639_ACEOF
15640cat confdefs.h >>conftest.$ac_ext
15641cat >>conftest.$ac_ext <<_ACEOF
15642/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015643
Martin v. Löwiseba40652007-08-30 20:10:57 +000015644/* Override any GCC internal prototype to avoid an error.
15645 Use char because int might match the return type of a GCC
15646 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015647#ifdef __cplusplus
15648extern "C"
15649#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015650char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015651int
15652main ()
15653{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015654return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015655 ;
15656 return 0;
15657}
15658_ACEOF
15659rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015660if { (ac_try="$ac_link"
15661case "(($ac_try" in
15662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15663 *) ac_try_echo=$ac_try;;
15664esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015665eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15666$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015667 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015668 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015669 grep -v '^ *+' conftest.er1 >conftest.err
15670 rm -f conftest.er1
15671 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000015672 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015673 (exit $ac_status); } && {
15674 test -z "$ac_c_werror_flag" ||
15675 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000015676 } && test -s conftest$ac_exeext && {
15677 test "$cross_compiling" = yes ||
15678 $as_test_x conftest$ac_exeext
15679 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015680 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015681else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015682 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015683sed 's/^/| /' conftest.$ac_ext >&5
15684
Martin v. Löwiseba40652007-08-30 20:10:57 +000015685 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015686fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015687
Benjamin Peterson697cd212010-05-02 16:45:11 +000015688rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000015689rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015690 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015691LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015692fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015693{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
15694$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
15695if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015696 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015697#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015698_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015699
Martin v. Löwis130fb172001-07-19 11:00:41 +000015700 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015701 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015702 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015703fi
15704
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015705
Neal Norwitza978ab02002-11-02 16:58:05 +000015706 if test "$posix_threads" != "yes"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015707 { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
15708$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015709if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015710 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015711else
Martin v. Löwis11437992002-04-12 09:54:03 +000015712 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015713LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015714cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015715/* confdefs.h. */
15716_ACEOF
15717cat confdefs.h >>conftest.$ac_ext
15718cat >>conftest.$ac_ext <<_ACEOF
15719/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015720
Martin v. Löwiseba40652007-08-30 20:10:57 +000015721/* Override any GCC internal prototype to avoid an error.
15722 Use char because int might match the return type of a GCC
15723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015724#ifdef __cplusplus
15725extern "C"
15726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015727char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015728int
15729main ()
15730{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015731return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015732 ;
15733 return 0;
15734}
15735_ACEOF
15736rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015737if { (ac_try="$ac_link"
15738case "(($ac_try" in
15739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15740 *) ac_try_echo=$ac_try;;
15741esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015742eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15743$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015744 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015745 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015746 grep -v '^ *+' conftest.er1 >conftest.err
15747 rm -f conftest.er1
15748 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000015749 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015750 (exit $ac_status); } && {
15751 test -z "$ac_c_werror_flag" ||
15752 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000015753 } && test -s conftest$ac_exeext && {
15754 test "$cross_compiling" = yes ||
15755 $as_test_x conftest$ac_exeext
15756 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015757 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015758else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015759 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015760sed 's/^/| /' conftest.$ac_ext >&5
15761
Martin v. Löwiseba40652007-08-30 20:10:57 +000015762 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015763fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015764
Benjamin Peterson697cd212010-05-02 16:45:11 +000015765rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000015766rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015767 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015768LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015769fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015770{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
15771$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
15772if test "x$ac_cv_lib_thread_thr_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015773 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015774#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015775_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015776
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015777 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015778 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015779 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000015780fi
15781
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000015782 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000015783
Martin v. Löwis130fb172001-07-19 11:00:41 +000015784 if test "$USE_THREAD_MODULE" != "#"
15785 then
15786 # If the above checks didn't disable threads, (at least) OSF1
15787 # needs this '-threads' argument during linking.
15788 case $ac_sys_system in
15789 OSF1) LDLAST=-threads;;
15790 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000015791 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015792fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015793
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015794if test "$posix_threads" = "yes"; then
15795 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015796
15797cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015798#define _POSIX_THREADS 1
15799_ACEOF
15800
15801 fi
15802
15803 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
15804 case $ac_sys_system/$ac_sys_release in
15805 SunOS/5.6)
15806cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015807#define HAVE_PTHREAD_DESTRUCTOR 1
15808_ACEOF
15809
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015810 ;;
15811 SunOS/5.8)
15812cat >>confdefs.h <<\_ACEOF
15813#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15814_ACEOF
15815
15816 ;;
Christian Heimescba36bb2008-01-30 22:54:18 +000015817 AIX/5)
15818cat >>confdefs.h <<\_ACEOF
15819#define HAVE_BROKEN_POSIX_SEMAPHORES 1
15820_ACEOF
15821
15822 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015823 esac
15824
Benjamin Peterson697cd212010-05-02 16:45:11 +000015825 { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
15826$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015827 if test "${ac_cv_pthread_system_supported+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015828 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015829else
15830 if test "$cross_compiling" = yes; then
15831 ac_cv_pthread_system_supported=no
15832else
15833 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015834/* confdefs.h. */
15835_ACEOF
15836cat confdefs.h >>conftest.$ac_ext
15837cat >>conftest.$ac_ext <<_ACEOF
15838/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015839#include <pthread.h>
15840 void *foo(void *parm) {
15841 return NULL;
15842 }
15843 main() {
15844 pthread_attr_t attr;
15845 pthread_t id;
15846 if (pthread_attr_init(&attr)) exit(-1);
15847 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
15848 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
15849 exit(0);
15850 }
15851_ACEOF
15852rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015853if { (ac_try="$ac_link"
15854case "(($ac_try" in
15855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15856 *) ac_try_echo=$ac_try;;
15857esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015858eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15859$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015860 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015861 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000015862 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015863 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000015864 { (case "(($ac_try" in
15865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15866 *) ac_try_echo=$ac_try;;
15867esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015868eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15869$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015870 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015871 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000015872 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015873 (exit $ac_status); }; }; then
15874 ac_cv_pthread_system_supported=yes
15875else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015876 $as_echo "$as_me: program exited with status $ac_status" >&5
15877$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015878sed 's/^/| /' conftest.$ac_ext >&5
15879
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015880( exit $ac_status )
15881ac_cv_pthread_system_supported=no
15882fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015883rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000015884rm -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 +000015885fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000015886
Martin v. Löwiseba40652007-08-30 20:10:57 +000015887
15888
Guido van Rossum627b2d71993-12-24 10:39:16 +000015889fi
15890
Benjamin Peterson697cd212010-05-02 16:45:11 +000015891 { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
15892$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015893 if test "$ac_cv_pthread_system_supported" = "yes"; then
15894
15895cat >>confdefs.h <<\_ACEOF
15896#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
15897_ACEOF
15898
15899 fi
15900
15901for ac_func in pthread_sigmask
15902do
Benjamin Peterson697cd212010-05-02 16:45:11 +000015903as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15904{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
15905$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000015906if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000015907 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015908else
15909 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015910/* confdefs.h. */
15911_ACEOF
15912cat confdefs.h >>conftest.$ac_ext
15913cat >>conftest.$ac_ext <<_ACEOF
15914/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015915/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15916 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15917#define $ac_func innocuous_$ac_func
15918
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015919/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000015920 which can conflict with char $ac_func (); below.
15921 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015922 <limits.h> exists even on freestanding compilers. */
15923
15924#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000015925# include <limits.h>
15926#else
15927# include <assert.h>
15928#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000015929
15930#undef $ac_func
15931
Martin v. Löwiseba40652007-08-30 20:10:57 +000015932/* Override any GCC internal prototype to avoid an error.
15933 Use char because int might match the return type of a GCC
15934 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015935#ifdef __cplusplus
15936extern "C"
15937#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015938char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015939/* The GNU C library defines this for functions which it implements
15940 to always fail with ENOSYS. Some functions are actually named
15941 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000015942#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015943choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015944#endif
15945
Skip Montanaro6dead952003-09-25 14:50:04 +000015946int
15947main ()
15948{
Martin v. Löwiseba40652007-08-30 20:10:57 +000015949return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015950 ;
15951 return 0;
15952}
15953_ACEOF
15954rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000015955if { (ac_try="$ac_link"
15956case "(($ac_try" in
15957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15958 *) ac_try_echo=$ac_try;;
15959esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000015960eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15961$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015962 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015963 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015964 grep -v '^ *+' conftest.er1 >conftest.err
15965 rm -f conftest.er1
15966 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000015967 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000015968 (exit $ac_status); } && {
15969 test -z "$ac_c_werror_flag" ||
15970 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000015971 } && test -s conftest$ac_exeext && {
15972 test "$cross_compiling" = yes ||
15973 $as_test_x conftest$ac_exeext
15974 }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015975 eval "$as_ac_var=yes"
15976else
Benjamin Peterson697cd212010-05-02 16:45:11 +000015977 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015978sed 's/^/| /' conftest.$ac_ext >&5
15979
Martin v. Löwiseba40652007-08-30 20:10:57 +000015980 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015981fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000015982
Benjamin Peterson697cd212010-05-02 16:45:11 +000015983rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000015984rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015985 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015986fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000015987ac_res=`eval 'as_val=${'$as_ac_var'}
15988 $as_echo "$as_val"'`
15989 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
15990$as_echo "$ac_res" >&6; }
15991as_val=`eval 'as_val=${'$as_ac_var'}
15992 $as_echo "$as_val"'`
15993 if test "x$as_val" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015994 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000015995#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015996_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000015997 case $ac_sys_system in
15998 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015999
Jason Tishlerfac083d2003-07-22 15:20:49 +000016000cat >>confdefs.h <<\_ACEOF
16001#define HAVE_BROKEN_PTHREAD_SIGMASK 1
16002_ACEOF
16003
16004 ;;
16005 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016006fi
16007done
16008
16009fi
16010
16011
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016012# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000016013
16014
Benjamin Peterson697cd212010-05-02 16:45:11 +000016015{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
16016$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000016017# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016018if test "${enable_ipv6+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016019 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016020 no)
Benjamin Peterson697cd212010-05-02 16:45:11 +000016021 { $as_echo "$as_me:$LINENO: result: no" >&5
16022$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016023 ipv6=no
16024 ;;
Benjamin Peterson697cd212010-05-02 16:45:11 +000016025 *) { $as_echo "$as_me:$LINENO: result: yes" >&5
16026$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016027 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016028#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016029_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016030
16031 ipv6=yes
16032 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000016033 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016034else
Martin v. Löwis11437992002-04-12 09:54:03 +000016035
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016036 if test "$cross_compiling" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000016037 { $as_echo "$as_me:$LINENO: result: no" >&5
16038$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016039 ipv6=no
16040
16041else
Martin v. Löwis11437992002-04-12 09:54:03 +000016042 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016043/* confdefs.h. */
16044_ACEOF
16045cat confdefs.h >>conftest.$ac_ext
16046cat >>conftest.$ac_ext <<_ACEOF
16047/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016048 /* AF_INET6 available check */
16049#include <sys/types.h>
16050#include <sys/socket.h>
16051main()
16052{
16053 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
16054 exit(1);
16055 else
16056 exit(0);
16057}
16058
Martin v. Löwis11437992002-04-12 09:54:03 +000016059_ACEOF
16060rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016061if { (ac_try="$ac_link"
16062case "(($ac_try" in
16063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16064 *) ac_try_echo=$ac_try;;
16065esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000016066eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16067$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016068 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016069 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000016070 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016071 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000016072 { (case "(($ac_try" in
16073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16074 *) ac_try_echo=$ac_try;;
16075esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000016076eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16077$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016078 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016079 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000016080 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000016081 (exit $ac_status); }; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000016082 { $as_echo "$as_me:$LINENO: result: yes" >&5
16083$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016084 ipv6=yes
16085else
Benjamin Peterson697cd212010-05-02 16:45:11 +000016086 $as_echo "$as_me: program exited with status $ac_status" >&5
16087$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016088sed 's/^/| /' conftest.$ac_ext >&5
16089
Martin v. Löwis11437992002-04-12 09:54:03 +000016090( exit $ac_status )
Benjamin Peterson697cd212010-05-02 16:45:11 +000016091{ $as_echo "$as_me:$LINENO: result: no" >&5
16092$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016093 ipv6=no
16094fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000016095rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000016096rm -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 +000016097fi
16098
Martin v. Löwiseba40652007-08-30 20:10:57 +000016099
16100
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016101if test "$ipv6" = "yes"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000016102 { $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
16103$as_echo_n "checking if RFC2553 API is available... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016104 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016105/* confdefs.h. */
16106_ACEOF
16107cat confdefs.h >>conftest.$ac_ext
16108cat >>conftest.$ac_ext <<_ACEOF
16109/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016110#include <sys/types.h>
16111#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000016112int
16113main ()
16114{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016115struct sockaddr_in6 x;
16116x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000016117 ;
16118 return 0;
16119}
16120_ACEOF
16121rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016122if { (ac_try="$ac_compile"
16123case "(($ac_try" in
16124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16125 *) ac_try_echo=$ac_try;;
16126esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000016127eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16128$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016129 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016130 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016131 grep -v '^ *+' conftest.er1 >conftest.err
16132 rm -f conftest.er1
16133 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000016134 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016135 (exit $ac_status); } && {
16136 test -z "$ac_c_werror_flag" ||
16137 test ! -s conftest.err
16138 } && test -s conftest.$ac_objext; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000016139 { $as_echo "$as_me:$LINENO: result: yes" >&5
16140$as_echo "yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016141 ipv6=yes
16142else
Benjamin Peterson697cd212010-05-02 16:45:11 +000016143 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016144sed 's/^/| /' conftest.$ac_ext >&5
16145
Benjamin Peterson697cd212010-05-02 16:45:11 +000016146 { $as_echo "$as_me:$LINENO: result: no" >&5
16147$as_echo "no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016148 ipv6=no
16149fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016150
16151rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016152fi
16153
16154if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016155 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016156#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016157_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000016158
16159fi
16160
Martin v. Löwiseba40652007-08-30 20:10:57 +000016161fi
16162
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016163
16164ipv6type=unknown
16165ipv6lib=none
16166ipv6trylibc=no
16167
16168if test "$ipv6" = "yes"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000016169 { $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5
16170$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000016171 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
16172 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016173 case $i in
16174 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000016175 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016176/* confdefs.h. */
16177_ACEOF
16178cat confdefs.h >>conftest.$ac_ext
16179cat >>conftest.$ac_ext <<_ACEOF
16180/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016181
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016182#include <netinet/in.h>
16183#ifdef IPV6_INRIA_VERSION
16184yes
16185#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016186_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016187if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016188 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016189 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016190fi
Jesus Cead54cdf02010-04-28 11:11:36 +000016191rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016192
16193 ;;
16194 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000016195 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016196/* confdefs.h. */
16197_ACEOF
16198cat confdefs.h >>conftest.$ac_ext
16199cat >>conftest.$ac_ext <<_ACEOF
16200/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016201
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016202#include <netinet/in.h>
16203#ifdef __KAME__
16204yes
16205#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016206_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016208 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016209 ipv6type=$i;
16210 ipv6lib=inet6
16211 ipv6libdir=/usr/local/v6/lib
16212 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016213fi
Jesus Cead54cdf02010-04-28 11:11:36 +000016214rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016215
16216 ;;
16217 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000016218 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016219/* confdefs.h. */
16220_ACEOF
16221cat confdefs.h >>conftest.$ac_ext
16222cat >>conftest.$ac_ext <<_ACEOF
16223/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016224
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016225#include <features.h>
16226#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
16227yes
16228#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016229_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016230if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016231 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016232 ipv6type=$i;
16233 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016234fi
Jesus Cead54cdf02010-04-28 11:11:36 +000016235rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016236
16237 ;;
16238 linux-inet6)
16239 if test -d /usr/inet6; then
16240 ipv6type=$i
16241 ipv6lib=inet6
16242 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000016243 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016244 fi
16245 ;;
16246 solaris)
16247 if test -f /etc/netconfig; then
16248 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
16249 ipv6type=$i
16250 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016251 fi
16252 fi
16253 ;;
16254 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000016255 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016256/* confdefs.h. */
16257_ACEOF
16258cat confdefs.h >>conftest.$ac_ext
16259cat >>conftest.$ac_ext <<_ACEOF
16260/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016261
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016262#include <sys/param.h>
16263#ifdef _TOSHIBA_INET6
16264yes
16265#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016266_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016267if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016268 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016269 ipv6type=$i;
16270 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016271 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016272fi
Jesus Cead54cdf02010-04-28 11:11:36 +000016273rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016274
16275 ;;
16276 v6d)
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 </usr/local/v6/include/sys/v6config.h>
16285#ifdef __V6D__
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öwisa2ac6022001-08-09 11:40:14 +000016291 ipv6type=$i;
16292 ipv6lib=v6;
16293 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000016294 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016295fi
Jesus Cead54cdf02010-04-28 11:11:36 +000016296rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016297
16298 ;;
16299 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000016300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016301/* confdefs.h. */
16302_ACEOF
16303cat confdefs.h >>conftest.$ac_ext
16304cat >>conftest.$ac_ext <<_ACEOF
16305/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000016306
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016307#include <sys/param.h>
16308#ifdef _ZETA_MINAMI_INET6
16309yes
16310#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016311_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016312if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000016313 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016314 ipv6type=$i;
16315 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000016316 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016317fi
Jesus Cead54cdf02010-04-28 11:11:36 +000016318rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016319
16320 ;;
16321 esac
16322 if test "$ipv6type" != "unknown"; then
16323 break
16324 fi
16325 done
Benjamin Peterson697cd212010-05-02 16:45:11 +000016326 { $as_echo "$as_me:$LINENO: result: $ipv6type" >&5
16327$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000016328fi
16329
16330if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
16331 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
16332 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
16333 echo "using lib$ipv6lib"
16334 else
16335 if test $ipv6trylibc = "yes"; then
16336 echo "using libc"
16337 else
16338 echo 'Fatal: no $ipv6lib library found. cannot continue.'
16339 echo "You need to fetch lib$ipv6lib.a from appropriate"
16340 echo 'ipv6 kit and compile beforehand.'
16341 exit 1
16342 fi
16343 fi
16344fi
16345
Benjamin Peterson697cd212010-05-02 16:45:11 +000016346{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
16347$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016348cat >conftest.$ac_ext <<_ACEOF
16349/* confdefs.h. */
16350_ACEOF
16351cat confdefs.h >>conftest.$ac_ext
16352cat >>conftest.$ac_ext <<_ACEOF
16353/* end confdefs.h. */
16354#include <Carbon/Carbon.h>
16355int
16356main ()
16357{
16358FSIORefNum fRef = 0
16359 ;
16360 return 0;
16361}
16362_ACEOF
16363rm -f conftest.$ac_objext
16364if { (ac_try="$ac_compile"
16365case "(($ac_try" in
16366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16367 *) ac_try_echo=$ac_try;;
16368esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000016369eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16370$as_echo "$ac_try_echo") >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016371 (eval "$ac_compile") 2>conftest.er1
16372 ac_status=$?
16373 grep -v '^ *+' conftest.er1 >conftest.err
16374 rm -f conftest.er1
16375 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000016376 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016377 (exit $ac_status); } && {
16378 test -z "$ac_c_werror_flag" ||
16379 test ! -s conftest.err
16380 } && test -s conftest.$ac_objext; then
16381
16382cat >>confdefs.h <<\_ACEOF
16383#define HAVE_OSX105_SDK 1
16384_ACEOF
16385
Benjamin Peterson697cd212010-05-02 16:45:11 +000016386 { $as_echo "$as_me:$LINENO: result: yes" >&5
16387$as_echo "yes" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016388else
Benjamin Peterson697cd212010-05-02 16:45:11 +000016389 $as_echo "$as_me: failed program was:" >&5
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016390sed 's/^/| /' conftest.$ac_ext >&5
16391
Benjamin Peterson697cd212010-05-02 16:45:11 +000016392 { $as_echo "$as_me:$LINENO: result: no" >&5
16393$as_echo "no" >&6; }
Ronald Oussoren0d236eb2008-06-06 21:31:33 +000016394
16395fi
16396
16397rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16398
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016399# Check for --with-doc-strings
Benjamin Peterson697cd212010-05-02 16:45:11 +000016400{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
16401$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016402
Martin v. Löwiseba40652007-08-30 20:10:57 +000016403# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016404if test "${with_doc_strings+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016405 withval=$with_doc_strings;
16406fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016407
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016408
16409if test -z "$with_doc_strings"
16410then with_doc_strings="yes"
16411fi
16412if test "$with_doc_strings" != "no"
16413then
16414
16415cat >>confdefs.h <<\_ACEOF
16416#define WITH_DOC_STRINGS 1
16417_ACEOF
16418
16419fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000016420{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5
16421$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000016422
Neil Schemenauera35c6882001-02-27 04:45:05 +000016423# Check for Python-specific malloc support
Benjamin Peterson697cd212010-05-02 16:45:11 +000016424{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5
16425$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016426
Martin v. Löwiseba40652007-08-30 20:10:57 +000016427# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016428if test "${with_tsc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016429 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016430if test "$withval" != no
16431then
16432
16433cat >>confdefs.h <<\_ACEOF
16434#define WITH_TSC 1
16435_ACEOF
16436
Benjamin Peterson697cd212010-05-02 16:45:11 +000016437 { $as_echo "$as_me:$LINENO: result: yes" >&5
16438$as_echo "yes" >&6; }
16439else { $as_echo "$as_me:$LINENO: result: no" >&5
16440$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016441fi
16442else
Benjamin Peterson697cd212010-05-02 16:45:11 +000016443 { $as_echo "$as_me:$LINENO: result: no" >&5
16444$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000016445fi
16446
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000016447
16448# Check for Python-specific malloc support
Benjamin Peterson697cd212010-05-02 16:45:11 +000016449{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
16450$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016451
Martin v. Löwiseba40652007-08-30 20:10:57 +000016452# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000016453if test "${with_pymalloc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016454 withval=$with_pymalloc;
16455fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016456
Neil Schemenauera35c6882001-02-27 04:45:05 +000016457
Neil Schemenauer16c22972002-03-22 15:34:49 +000016458if test -z "$with_pymalloc"
16459then with_pymalloc="yes"
16460fi
16461if test "$with_pymalloc" != "no"
16462then
Martin v. Löwis11437992002-04-12 09:54:03 +000016463
16464cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016465#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016466_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000016467
16468fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000016469{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5
16470$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000016471
Barry Warsawef82cd72000-06-30 16:21:01 +000016472# Check for --with-wctype-functions
Benjamin Peterson697cd212010-05-02 16:45:11 +000016473{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
16474$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016475
Martin v. Löwiseba40652007-08-30 20:10:57 +000016476# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000016477if test "${with_wctype_functions+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000016478 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000016479if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000016480then
16481
16482cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000016483#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016484_ACEOF
16485
Benjamin Peterson697cd212010-05-02 16:45:11 +000016486 { $as_echo "$as_me:$LINENO: result: yes" >&5
16487$as_echo "yes" >&6; }
16488else { $as_echo "$as_me:$LINENO: result: no" >&5
16489$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000016490fi
16491else
Benjamin Peterson697cd212010-05-02 16:45:11 +000016492 { $as_echo "$as_me:$LINENO: result: no" >&5
16493$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000016494fi
16495
Barry Warsawef82cd72000-06-30 16:21:01 +000016496
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000016497# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000016498
Guido van Rossum98935bf2001-09-05 19:13:16 +000016499DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000016500
Guido van Rossume97ee181999-12-20 21:27:22 +000016501# the dlopen() function means we might want to use dynload_shlib.o. some
16502# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000016503
Thomas Wouters3a584202000-08-05 23:28:51 +000016504for ac_func in dlopen
16505do
Benjamin Peterson697cd212010-05-02 16:45:11 +000016506as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16507{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16508$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000016509if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000016510 $as_echo_n "(cached) " >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000016511else
Martin v. Löwis11437992002-04-12 09:54:03 +000016512 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016513/* confdefs.h. */
16514_ACEOF
16515cat confdefs.h >>conftest.$ac_ext
16516cat >>conftest.$ac_ext <<_ACEOF
16517/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016518/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16519 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16520#define $ac_func innocuous_$ac_func
16521
Guido van Rossume97ee181999-12-20 21:27:22 +000016522/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016523 which can conflict with char $ac_func (); below.
16524 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016525 <limits.h> exists even on freestanding compilers. */
16526
16527#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016528# include <limits.h>
16529#else
16530# include <assert.h>
16531#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016532
16533#undef $ac_func
16534
Martin v. Löwiseba40652007-08-30 20:10:57 +000016535/* Override any GCC internal prototype to avoid an error.
16536 Use char because int might match the return type of a GCC
16537 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016538#ifdef __cplusplus
16539extern "C"
16540#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016541char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000016542/* The GNU C library defines this for functions which it implements
16543 to always fail with ENOSYS. Some functions are actually named
16544 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016545#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000016546choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000016547#endif
16548
Skip Montanaro6dead952003-09-25 14:50:04 +000016549int
16550main ()
16551{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016552return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016553 ;
16554 return 0;
16555}
16556_ACEOF
16557rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016558if { (ac_try="$ac_link"
16559case "(($ac_try" in
16560 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16561 *) ac_try_echo=$ac_try;;
16562esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000016563eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16564$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016565 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016566 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016567 grep -v '^ *+' conftest.er1 >conftest.err
16568 rm -f conftest.er1
16569 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000016570 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016571 (exit $ac_status); } && {
16572 test -z "$ac_c_werror_flag" ||
16573 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000016574 } && test -s conftest$ac_exeext && {
16575 test "$cross_compiling" = yes ||
16576 $as_test_x conftest$ac_exeext
16577 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016578 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016579else
Benjamin Peterson697cd212010-05-02 16:45:11 +000016580 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016581sed 's/^/| /' conftest.$ac_ext >&5
16582
Martin v. Löwiseba40652007-08-30 20:10:57 +000016583 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016584fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016585
Benjamin Peterson697cd212010-05-02 16:45:11 +000016586rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000016587rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016588 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016589fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000016590ac_res=`eval 'as_val=${'$as_ac_var'}
16591 $as_echo "$as_val"'`
16592 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16593$as_echo "$ac_res" >&6; }
16594as_val=`eval 'as_val=${'$as_ac_var'}
16595 $as_echo "$as_val"'`
16596 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016597 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000016598#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016599_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016600
Guido van Rossume97ee181999-12-20 21:27:22 +000016601fi
Thomas Wouters3a584202000-08-05 23:28:51 +000016602done
Guido van Rossume97ee181999-12-20 21:27:22 +000016603
Michael W. Hudson54241132001-12-07 15:38:26 +000016604
Guido van Rossume97ee181999-12-20 21:27:22 +000016605# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
16606# loading of modules.
16607
Benjamin Peterson697cd212010-05-02 16:45:11 +000016608{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
16609$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016610if test -z "$DYNLOADFILE"
16611then
16612 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000016613 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
16614 if test "$ac_cv_func_dlopen" = yes
16615 then DYNLOADFILE="dynload_shlib.o"
16616 else DYNLOADFILE="dynload_aix.o"
16617 fi
16618 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000016619 BeOS*) DYNLOADFILE="dynload_beos.o";;
16620 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Anthony Baxter82201742006-04-09 15:07:40 +000016621 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
16622 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016623 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000016624 *)
16625 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
16626 # out any dynamic loading
16627 if test "$ac_cv_func_dlopen" = yes
16628 then DYNLOADFILE="dynload_shlib.o"
16629 else DYNLOADFILE="dynload_stub.o"
16630 fi
16631 ;;
16632 esac
16633fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000016634{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
16635$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000016636if test "$DYNLOADFILE" != "dynload_stub.o"
16637then
Martin v. Löwis11437992002-04-12 09:54:03 +000016638
16639cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016640#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016641_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000016642
16643fi
16644
Neil Schemenauer4e425612001-06-19 15:44:15 +000016645# MACHDEP_OBJS can be set to platform-specific object files needed by Python
16646
Michael W. Hudson54241132001-12-07 15:38:26 +000016647
Benjamin Peterson697cd212010-05-02 16:45:11 +000016648{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
16649$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016650if test -z "$MACHDEP_OBJS"
16651then
Jack Jansene578a632001-08-15 01:27:14 +000016652 MACHDEP_OBJS=$extra_machdep_objs
16653else
16654 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000016655fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000016656{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
16657$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000016658
Guido van Rossum627b2d71993-12-24 10:39:16 +000016659# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000016660
16661
16662
16663
16664
16665
16666
16667
16668
16669
16670
16671
16672
16673
16674
16675
16676
16677
16678
16679
16680
16681
16682
16683
16684
16685
16686
16687
16688
16689
16690
16691
16692
16693
16694
16695
16696
16697
16698
16699
16700
16701
16702
16703
16704
16705
16706
16707
16708
16709
16710
16711
16712
16713
16714
16715
16716
16717
16718
16719
16720
16721
16722
16723
16724
16725
16726
16727
16728
16729
16730
Martin v. Löwisd6320502004-08-12 13:45:08 +000016731
Martin v. Löwisc3001752005-01-23 09:27:24 +000016732
16733
Neal Norwitz05a45592006-03-20 06:30:08 +000016734
16735
Martin v. Löwis382abef2007-02-19 10:55:19 +000016736
16737
Christian Heimes36281872007-11-30 21:11:28 +000016738
Martin v. Löwisaef18b12008-03-24 13:31:16 +000016739
16740
16741for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
16742 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000016743 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000016744 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000016745 kill killpg lchmod lchown lstat mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000016746 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000016747 putenv readlink realpath \
Martin v. Löwisd5843682002-11-21 20:41:28 +000016748 select setegid seteuid setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000016749 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Skip Montanaro7e11a012004-02-07 12:55:46 +000016750 sigaction siginterrupt sigrelse strftime \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000016751 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Neal Norwitz05a45592006-03-20 06:30:08 +000016752 truncate uname unsetenv utimes waitpid wait3 wait4 wcscoll _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000016753do
Benjamin Peterson697cd212010-05-02 16:45:11 +000016754as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16755{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16756$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000016757if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000016758 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016759else
Martin v. Löwis11437992002-04-12 09:54:03 +000016760 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016761/* confdefs.h. */
16762_ACEOF
16763cat confdefs.h >>conftest.$ac_ext
16764cat >>conftest.$ac_ext <<_ACEOF
16765/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016766/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16767 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16768#define $ac_func innocuous_$ac_func
16769
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016770/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016771 which can conflict with char $ac_func (); below.
16772 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016773 <limits.h> exists even on freestanding compilers. */
16774
16775#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016776# include <limits.h>
16777#else
16778# include <assert.h>
16779#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016780
16781#undef $ac_func
16782
Martin v. Löwiseba40652007-08-30 20:10:57 +000016783/* Override any GCC internal prototype to avoid an error.
16784 Use char because int might match the return type of a GCC
16785 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016786#ifdef __cplusplus
16787extern "C"
16788#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016789char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000016790/* The GNU C library defines this for functions which it implements
16791 to always fail with ENOSYS. Some functions are actually named
16792 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000016793#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000016794choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000016795#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016796
Skip Montanaro6dead952003-09-25 14:50:04 +000016797int
16798main ()
16799{
Martin v. Löwiseba40652007-08-30 20:10:57 +000016800return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016801 ;
16802 return 0;
16803}
16804_ACEOF
16805rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016806if { (ac_try="$ac_link"
16807case "(($ac_try" in
16808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16809 *) ac_try_echo=$ac_try;;
16810esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000016811eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16812$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016813 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016815 grep -v '^ *+' conftest.er1 >conftest.err
16816 rm -f conftest.er1
16817 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000016818 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016819 (exit $ac_status); } && {
16820 test -z "$ac_c_werror_flag" ||
16821 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000016822 } && test -s conftest$ac_exeext && {
16823 test "$cross_compiling" = yes ||
16824 $as_test_x conftest$ac_exeext
16825 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016826 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000016827else
Benjamin Peterson697cd212010-05-02 16:45:11 +000016828 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016829sed 's/^/| /' conftest.$ac_ext >&5
16830
Martin v. Löwiseba40652007-08-30 20:10:57 +000016831 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000016832fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016833
Benjamin Peterson697cd212010-05-02 16:45:11 +000016834rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000016835rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016836 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000016837fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000016838ac_res=`eval 'as_val=${'$as_ac_var'}
16839 $as_echo "$as_val"'`
16840 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16841$as_echo "$ac_res" >&6; }
16842as_val=`eval 'as_val=${'$as_ac_var'}
16843 $as_echo "$as_val"'`
16844 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016845 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000016846#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016847_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000016848
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016849fi
16850done
16851
Michael W. Hudson54241132001-12-07 15:38:26 +000016852
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016853# For some functions, having a definition is not sufficient, since
16854# we want to take their address.
Benjamin Peterson697cd212010-05-02 16:45:11 +000016855{ $as_echo "$as_me:$LINENO: checking for chroot" >&5
16856$as_echo_n "checking for chroot... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016857cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016858/* confdefs.h. */
16859_ACEOF
16860cat confdefs.h >>conftest.$ac_ext
16861cat >>conftest.$ac_ext <<_ACEOF
16862/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016863#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016864int
16865main ()
16866{
16867void *x=chroot
16868 ;
16869 return 0;
16870}
16871_ACEOF
16872rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016873if { (ac_try="$ac_compile"
16874case "(($ac_try" in
16875 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16876 *) ac_try_echo=$ac_try;;
16877esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000016878eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16879$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016880 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016881 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016882 grep -v '^ *+' conftest.er1 >conftest.err
16883 rm -f conftest.er1
16884 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000016885 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016886 (exit $ac_status); } && {
16887 test -z "$ac_c_werror_flag" ||
16888 test ! -s conftest.err
16889 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016890
16891cat >>confdefs.h <<\_ACEOF
16892#define HAVE_CHROOT 1
16893_ACEOF
16894
Benjamin Peterson697cd212010-05-02 16:45:11 +000016895 { $as_echo "$as_me:$LINENO: result: yes" >&5
16896$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016897else
Benjamin Peterson697cd212010-05-02 16:45:11 +000016898 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016899sed 's/^/| /' conftest.$ac_ext >&5
16900
Benjamin Peterson697cd212010-05-02 16:45:11 +000016901 { $as_echo "$as_me:$LINENO: result: no" >&5
16902$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016903
16904fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016905
16906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000016907{ $as_echo "$as_me:$LINENO: checking for link" >&5
16908$as_echo_n "checking for link... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016909cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016910/* confdefs.h. */
16911_ACEOF
16912cat confdefs.h >>conftest.$ac_ext
16913cat >>conftest.$ac_ext <<_ACEOF
16914/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016915#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016916int
16917main ()
16918{
16919void *x=link
16920 ;
16921 return 0;
16922}
16923_ACEOF
16924rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016925if { (ac_try="$ac_compile"
16926case "(($ac_try" in
16927 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16928 *) ac_try_echo=$ac_try;;
16929esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000016930eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16931$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016932 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016933 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016934 grep -v '^ *+' conftest.er1 >conftest.err
16935 rm -f conftest.er1
16936 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000016937 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016938 (exit $ac_status); } && {
16939 test -z "$ac_c_werror_flag" ||
16940 test ! -s conftest.err
16941 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016942
16943cat >>confdefs.h <<\_ACEOF
16944#define HAVE_LINK 1
16945_ACEOF
16946
Benjamin Peterson697cd212010-05-02 16:45:11 +000016947 { $as_echo "$as_me:$LINENO: result: yes" >&5
16948$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016949else
Benjamin Peterson697cd212010-05-02 16:45:11 +000016950 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016951sed 's/^/| /' conftest.$ac_ext >&5
16952
Benjamin Peterson697cd212010-05-02 16:45:11 +000016953 { $as_echo "$as_me:$LINENO: result: no" >&5
16954$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016955
16956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000016957
16958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000016959{ $as_echo "$as_me:$LINENO: checking for symlink" >&5
16960$as_echo_n "checking for symlink... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016961cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016962/* confdefs.h. */
16963_ACEOF
16964cat confdefs.h >>conftest.$ac_ext
16965cat >>conftest.$ac_ext <<_ACEOF
16966/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016967#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016968int
16969main ()
16970{
16971void *x=symlink
16972 ;
16973 return 0;
16974}
16975_ACEOF
16976rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000016977if { (ac_try="$ac_compile"
16978case "(($ac_try" in
16979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16980 *) ac_try_echo=$ac_try;;
16981esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000016982eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16983$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016984 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016986 grep -v '^ *+' conftest.er1 >conftest.err
16987 rm -f conftest.er1
16988 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000016989 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000016990 (exit $ac_status); } && {
16991 test -z "$ac_c_werror_flag" ||
16992 test ! -s conftest.err
16993 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000016994
16995cat >>confdefs.h <<\_ACEOF
16996#define HAVE_SYMLINK 1
16997_ACEOF
16998
Benjamin Peterson697cd212010-05-02 16:45:11 +000016999 { $as_echo "$as_me:$LINENO: result: yes" >&5
17000$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017001else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017002 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017003sed 's/^/| /' conftest.$ac_ext >&5
17004
Benjamin Peterson697cd212010-05-02 16:45:11 +000017005 { $as_echo "$as_me:$LINENO: result: no" >&5
17006$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017007
17008fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017009
17010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000017011{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5
17012$as_echo_n "checking for fchdir... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017013cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017014/* confdefs.h. */
17015_ACEOF
17016cat confdefs.h >>conftest.$ac_ext
17017cat >>conftest.$ac_ext <<_ACEOF
17018/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017019#include <unistd.h>
17020int
17021main ()
17022{
17023void *x=fchdir
17024 ;
17025 return 0;
17026}
17027_ACEOF
17028rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017029if { (ac_try="$ac_compile"
17030case "(($ac_try" in
17031 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17032 *) ac_try_echo=$ac_try;;
17033esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017034eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17035$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017036 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017037 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017038 grep -v '^ *+' conftest.er1 >conftest.err
17039 rm -f conftest.er1
17040 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017041 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017042 (exit $ac_status); } && {
17043 test -z "$ac_c_werror_flag" ||
17044 test ! -s conftest.err
17045 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017046
17047cat >>confdefs.h <<\_ACEOF
17048#define HAVE_FCHDIR 1
17049_ACEOF
17050
Benjamin Peterson697cd212010-05-02 16:45:11 +000017051 { $as_echo "$as_me:$LINENO: result: yes" >&5
17052$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017053else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017054 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017055sed 's/^/| /' conftest.$ac_ext >&5
17056
Benjamin Peterson697cd212010-05-02 16:45:11 +000017057 { $as_echo "$as_me:$LINENO: result: no" >&5
17058$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017059
17060fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017061
17062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000017063{ $as_echo "$as_me:$LINENO: checking for fsync" >&5
17064$as_echo_n "checking for fsync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017065cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017066/* confdefs.h. */
17067_ACEOF
17068cat confdefs.h >>conftest.$ac_ext
17069cat >>conftest.$ac_ext <<_ACEOF
17070/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017071#include <unistd.h>
17072int
17073main ()
17074{
17075void *x=fsync
17076 ;
17077 return 0;
17078}
17079_ACEOF
17080rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017081if { (ac_try="$ac_compile"
17082case "(($ac_try" in
17083 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17084 *) ac_try_echo=$ac_try;;
17085esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017086eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17087$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017088 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017089 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017090 grep -v '^ *+' conftest.er1 >conftest.err
17091 rm -f conftest.er1
17092 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017093 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017094 (exit $ac_status); } && {
17095 test -z "$ac_c_werror_flag" ||
17096 test ! -s conftest.err
17097 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017098
17099cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017100#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017101_ACEOF
17102
Benjamin Peterson697cd212010-05-02 16:45:11 +000017103 { $as_echo "$as_me:$LINENO: result: yes" >&5
17104$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017105else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017106 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017107sed 's/^/| /' conftest.$ac_ext >&5
17108
Benjamin Peterson697cd212010-05-02 16:45:11 +000017109 { $as_echo "$as_me:$LINENO: result: no" >&5
17110$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017111
17112fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017113
17114rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000017115{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5
17116$as_echo_n "checking for fdatasync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017117cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017118/* confdefs.h. */
17119_ACEOF
17120cat confdefs.h >>conftest.$ac_ext
17121cat >>conftest.$ac_ext <<_ACEOF
17122/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017123#include <unistd.h>
17124int
17125main ()
17126{
17127void *x=fdatasync
17128 ;
17129 return 0;
17130}
17131_ACEOF
17132rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017133if { (ac_try="$ac_compile"
17134case "(($ac_try" in
17135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17136 *) ac_try_echo=$ac_try;;
17137esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017138eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17139$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017140 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017141 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017142 grep -v '^ *+' conftest.er1 >conftest.err
17143 rm -f conftest.er1
17144 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017145 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017146 (exit $ac_status); } && {
17147 test -z "$ac_c_werror_flag" ||
17148 test ! -s conftest.err
17149 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017150
17151cat >>confdefs.h <<\_ACEOF
17152#define HAVE_FDATASYNC 1
17153_ACEOF
17154
Benjamin Peterson697cd212010-05-02 16:45:11 +000017155 { $as_echo "$as_me:$LINENO: result: yes" >&5
17156$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017157else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017158 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017159sed 's/^/| /' conftest.$ac_ext >&5
17160
Benjamin Peterson697cd212010-05-02 16:45:11 +000017161 { $as_echo "$as_me:$LINENO: result: no" >&5
17162$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000017163
17164fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017165
17166rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000017167{ $as_echo "$as_me:$LINENO: checking for epoll" >&5
17168$as_echo_n "checking for epoll... " >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017169cat >conftest.$ac_ext <<_ACEOF
17170/* confdefs.h. */
17171_ACEOF
17172cat confdefs.h >>conftest.$ac_ext
17173cat >>conftest.$ac_ext <<_ACEOF
17174/* end confdefs.h. */
17175#include <sys/epoll.h>
17176int
17177main ()
17178{
17179void *x=epoll_create
17180 ;
17181 return 0;
17182}
17183_ACEOF
17184rm -f conftest.$ac_objext
17185if { (ac_try="$ac_compile"
17186case "(($ac_try" in
17187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17188 *) ac_try_echo=$ac_try;;
17189esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017190eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17191$as_echo "$ac_try_echo") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017192 (eval "$ac_compile") 2>conftest.er1
17193 ac_status=$?
17194 grep -v '^ *+' conftest.er1 >conftest.err
17195 rm -f conftest.er1
17196 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017197 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017198 (exit $ac_status); } && {
17199 test -z "$ac_c_werror_flag" ||
17200 test ! -s conftest.err
17201 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017202
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017203cat >>confdefs.h <<\_ACEOF
17204#define HAVE_EPOLL 1
17205_ACEOF
17206
Benjamin Peterson697cd212010-05-02 16:45:11 +000017207 { $as_echo "$as_me:$LINENO: result: yes" >&5
17208$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017209else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017210 $as_echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017211sed 's/^/| /' conftest.$ac_ext >&5
17212
Benjamin Peterson697cd212010-05-02 16:45:11 +000017213 { $as_echo "$as_me:$LINENO: result: no" >&5
17214$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017215
17216fi
17217
17218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000017219{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5
17220$as_echo_n "checking for kqueue... " >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017221cat >conftest.$ac_ext <<_ACEOF
17222/* confdefs.h. */
17223_ACEOF
17224cat confdefs.h >>conftest.$ac_ext
17225cat >>conftest.$ac_ext <<_ACEOF
17226/* end confdefs.h. */
17227
17228#include <sys/types.h>
17229#include <sys/event.h>
17230
17231int
17232main ()
17233{
17234int x=kqueue()
17235 ;
17236 return 0;
17237}
17238_ACEOF
17239rm -f conftest.$ac_objext
17240if { (ac_try="$ac_compile"
17241case "(($ac_try" in
17242 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17243 *) ac_try_echo=$ac_try;;
17244esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017245eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17246$as_echo "$ac_try_echo") >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017247 (eval "$ac_compile") 2>conftest.er1
17248 ac_status=$?
17249 grep -v '^ *+' conftest.er1 >conftest.err
17250 rm -f conftest.er1
17251 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017252 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017253 (exit $ac_status); } && {
17254 test -z "$ac_c_werror_flag" ||
17255 test ! -s conftest.err
17256 } && test -s conftest.$ac_objext; then
17257
17258cat >>confdefs.h <<\_ACEOF
17259#define HAVE_KQUEUE 1
17260_ACEOF
17261
Benjamin Peterson697cd212010-05-02 16:45:11 +000017262 { $as_echo "$as_me:$LINENO: result: yes" >&5
17263$as_echo "yes" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017264else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017265 $as_echo "$as_me: failed program was:" >&5
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017266sed 's/^/| /' conftest.$ac_ext >&5
17267
Benjamin Peterson697cd212010-05-02 16:45:11 +000017268 { $as_echo "$as_me:$LINENO: result: no" >&5
17269$as_echo "no" >&6; }
Christian Heimes0e9ab5f2008-03-21 23:49:44 +000017270
17271fi
17272
17273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000017274# On some systems (eg. FreeBSD 5), we would find a definition of the
17275# functions ctermid_r, setgroups in the library, but no prototype
17276# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
17277# address to avoid compiler warnings and potential miscompilations
17278# because of the missing prototypes.
17279
Benjamin Peterson697cd212010-05-02 16:45:11 +000017280{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5
17281$as_echo_n "checking for ctermid_r... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017282cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017283/* confdefs.h. */
17284_ACEOF
17285cat confdefs.h >>conftest.$ac_ext
17286cat >>conftest.$ac_ext <<_ACEOF
17287/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000017288
17289#include "confdefs.h"
17290#include <stdio.h>
17291
Martin v. Löwisd5843682002-11-21 20:41:28 +000017292int
17293main ()
17294{
17295void* p = ctermid_r
17296 ;
17297 return 0;
17298}
17299_ACEOF
17300rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017301if { (ac_try="$ac_compile"
17302case "(($ac_try" in
17303 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17304 *) ac_try_echo=$ac_try;;
17305esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017306eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17307$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017308 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000017309 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017310 grep -v '^ *+' conftest.er1 >conftest.err
17311 rm -f conftest.er1
17312 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017313 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017314 (exit $ac_status); } && {
17315 test -z "$ac_c_werror_flag" ||
17316 test ! -s conftest.err
17317 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000017318
17319cat >>confdefs.h <<\_ACEOF
17320#define HAVE_CTERMID_R 1
17321_ACEOF
17322
Benjamin Peterson697cd212010-05-02 16:45:11 +000017323 { $as_echo "$as_me:$LINENO: result: yes" >&5
17324$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017325else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017326 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017327sed 's/^/| /' conftest.$ac_ext >&5
17328
Benjamin Peterson697cd212010-05-02 16:45:11 +000017329 { $as_echo "$as_me:$LINENO: result: no" >&5
17330$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000017331
17332fi
Martin v. Löwisd5843682002-11-21 20:41:28 +000017333
Martin v. Löwiseba40652007-08-30 20:10:57 +000017334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17335
Benjamin Peterson697cd212010-05-02 16:45:11 +000017336{ $as_echo "$as_me:$LINENO: checking for flock" >&5
17337$as_echo_n "checking for flock... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017338cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017339/* confdefs.h. */
17340_ACEOF
17341cat confdefs.h >>conftest.$ac_ext
17342cat >>conftest.$ac_ext <<_ACEOF
17343/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017344
17345#include "confdefs.h"
17346#include <sys/file.h>
17347
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017348int
17349main ()
17350{
17351void* p = flock
17352 ;
17353 return 0;
17354}
17355_ACEOF
17356rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017357if { (ac_try="$ac_compile"
17358case "(($ac_try" in
17359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17360 *) ac_try_echo=$ac_try;;
17361esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017362eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17363$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017364 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017365 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017366 grep -v '^ *+' conftest.er1 >conftest.err
17367 rm -f conftest.er1
17368 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017369 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017370 (exit $ac_status); } && {
17371 test -z "$ac_c_werror_flag" ||
17372 test ! -s conftest.err
17373 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017374
17375cat >>confdefs.h <<\_ACEOF
17376#define HAVE_FLOCK 1
17377_ACEOF
17378
Benjamin Peterson697cd212010-05-02 16:45:11 +000017379 { $as_echo "$as_me:$LINENO: result: yes" >&5
17380$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017381else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017382 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017383sed 's/^/| /' conftest.$ac_ext >&5
17384
Benjamin Peterson697cd212010-05-02 16:45:11 +000017385 { $as_echo "$as_me:$LINENO: result: no" >&5
17386$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017387
17388fi
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017389
Martin v. Löwiseba40652007-08-30 20:10:57 +000017390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17391
Benjamin Peterson697cd212010-05-02 16:45:11 +000017392{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5
17393$as_echo_n "checking for getpagesize... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017394cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017395/* confdefs.h. */
17396_ACEOF
17397cat confdefs.h >>conftest.$ac_ext
17398cat >>conftest.$ac_ext <<_ACEOF
17399/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017400
17401#include "confdefs.h"
17402#include <unistd.h>
17403
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017404int
17405main ()
17406{
17407void* p = getpagesize
17408 ;
17409 return 0;
17410}
17411_ACEOF
17412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017413if { (ac_try="$ac_compile"
17414case "(($ac_try" in
17415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17416 *) ac_try_echo=$ac_try;;
17417esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017418eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17419$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017421 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017422 grep -v '^ *+' conftest.er1 >conftest.err
17423 rm -f conftest.er1
17424 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017425 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017426 (exit $ac_status); } && {
17427 test -z "$ac_c_werror_flag" ||
17428 test ! -s conftest.err
17429 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017430
17431cat >>confdefs.h <<\_ACEOF
17432#define HAVE_GETPAGESIZE 1
17433_ACEOF
17434
Benjamin Peterson697cd212010-05-02 16:45:11 +000017435 { $as_echo "$as_me:$LINENO: result: yes" >&5
17436$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017437else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017438 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017439sed 's/^/| /' conftest.$ac_ext >&5
17440
Benjamin Peterson697cd212010-05-02 16:45:11 +000017441 { $as_echo "$as_me:$LINENO: result: no" >&5
17442$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017443
17444fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017445
17446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000017447
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017448for ac_prog in true
17449do
17450 # Extract the first word of "$ac_prog", so it can be a program name with args.
17451set dummy $ac_prog; ac_word=$2
Benjamin Peterson697cd212010-05-02 16:45:11 +000017452{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
17453$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017454if test "${ac_cv_prog_TRUE+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000017455 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017456else
17457 if test -n "$TRUE"; then
17458 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
17459else
17460as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17461for as_dir in $PATH
17462do
17463 IFS=$as_save_IFS
17464 test -z "$as_dir" && as_dir=.
17465 for ac_exec_ext in '' $ac_executable_extensions; do
Martin v. Löwiseba40652007-08-30 20:10:57 +000017466 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 +000017467 ac_cv_prog_TRUE="$ac_prog"
Benjamin Peterson697cd212010-05-02 16:45:11 +000017468 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017469 break 2
17470 fi
17471done
17472done
Martin v. Löwiseba40652007-08-30 20:10:57 +000017473IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017474
17475fi
17476fi
17477TRUE=$ac_cv_prog_TRUE
17478if test -n "$TRUE"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000017479 { $as_echo "$as_me:$LINENO: result: $TRUE" >&5
17480$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017481else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017482 { $as_echo "$as_me:$LINENO: result: no" >&5
17483$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017484fi
17485
Martin v. Löwiseba40652007-08-30 20:10:57 +000017486
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017487 test -n "$TRUE" && break
17488done
17489test -n "$TRUE" || TRUE="/bin/true"
17490
17491
Benjamin Peterson697cd212010-05-02 16:45:11 +000017492{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
17493$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017494if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000017495 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017496else
17497 ac_check_lib_save_LIBS=$LIBS
17498LIBS="-lc $LIBS"
17499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017500/* confdefs.h. */
17501_ACEOF
17502cat confdefs.h >>conftest.$ac_ext
17503cat >>conftest.$ac_ext <<_ACEOF
17504/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017505
Martin v. Löwiseba40652007-08-30 20:10:57 +000017506/* Override any GCC internal prototype to avoid an error.
17507 Use char because int might match the return type of a GCC
17508 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017509#ifdef __cplusplus
17510extern "C"
17511#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017512char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017513int
17514main ()
17515{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017516return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017517 ;
17518 return 0;
17519}
17520_ACEOF
17521rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017522if { (ac_try="$ac_link"
17523case "(($ac_try" in
17524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17525 *) ac_try_echo=$ac_try;;
17526esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017527eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17528$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017529 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017531 grep -v '^ *+' conftest.er1 >conftest.err
17532 rm -f conftest.er1
17533 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017534 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017535 (exit $ac_status); } && {
17536 test -z "$ac_c_werror_flag" ||
17537 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000017538 } && test -s conftest$ac_exeext && {
17539 test "$cross_compiling" = yes ||
17540 $as_test_x conftest$ac_exeext
17541 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017542 ac_cv_lib_c_inet_aton=yes
17543else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017544 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017545sed 's/^/| /' conftest.$ac_ext >&5
17546
Martin v. Löwiseba40652007-08-30 20:10:57 +000017547 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017549
Benjamin Peterson697cd212010-05-02 16:45:11 +000017550rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000017551rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017552 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017553LIBS=$ac_check_lib_save_LIBS
17554fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000017555{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
17556$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
17557if test "x$ac_cv_lib_c_inet_aton" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017558 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017559else
17560
Benjamin Peterson697cd212010-05-02 16:45:11 +000017561{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
17562$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017563if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000017564 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017565else
17566 ac_check_lib_save_LIBS=$LIBS
17567LIBS="-lresolv $LIBS"
17568cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017569/* confdefs.h. */
17570_ACEOF
17571cat confdefs.h >>conftest.$ac_ext
17572cat >>conftest.$ac_ext <<_ACEOF
17573/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017574
Martin v. Löwiseba40652007-08-30 20:10:57 +000017575/* Override any GCC internal prototype to avoid an error.
17576 Use char because int might match the return type of a GCC
17577 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017578#ifdef __cplusplus
17579extern "C"
17580#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017581char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017582int
17583main ()
17584{
Martin v. Löwiseba40652007-08-30 20:10:57 +000017585return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017586 ;
17587 return 0;
17588}
17589_ACEOF
17590rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000017591if { (ac_try="$ac_link"
17592case "(($ac_try" in
17593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17594 *) ac_try_echo=$ac_try;;
17595esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017596eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17597$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017598 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017599 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017600 grep -v '^ *+' conftest.er1 >conftest.err
17601 rm -f conftest.er1
17602 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017603 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000017604 (exit $ac_status); } && {
17605 test -z "$ac_c_werror_flag" ||
17606 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000017607 } && test -s conftest$ac_exeext && {
17608 test "$cross_compiling" = yes ||
17609 $as_test_x conftest$ac_exeext
17610 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017611 ac_cv_lib_resolv_inet_aton=yes
17612else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017613 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017614sed 's/^/| /' conftest.$ac_ext >&5
17615
Martin v. Löwiseba40652007-08-30 20:10:57 +000017616 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017617fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000017618
Benjamin Peterson697cd212010-05-02 16:45:11 +000017619rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000017620rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017621 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017622LIBS=$ac_check_lib_save_LIBS
17623fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000017624{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
17625$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
17626if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000017627 cat >>confdefs.h <<_ACEOF
17628#define HAVE_LIBRESOLV 1
17629_ACEOF
17630
17631 LIBS="-lresolv $LIBS"
17632
17633fi
17634
17635
17636fi
17637
17638
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017639# On Tru64, chflags seems to be present, but calling it will
17640# exit Python
Benjamin Peterson697cd212010-05-02 16:45:11 +000017641{ $as_echo "$as_me:$LINENO: checking for chflags" >&5
17642$as_echo_n "checking for chflags... " >&6; }
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017643if test "${ac_cv_have_chflags+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000017644 $as_echo_n "(cached) " >&6
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017645else
17646 if test "$cross_compiling" = yes; then
17647 ac_cv_have_chflags=cross
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017648else
17649 cat >conftest.$ac_ext <<_ACEOF
17650/* confdefs.h. */
17651_ACEOF
17652cat confdefs.h >>conftest.$ac_ext
17653cat >>conftest.$ac_ext <<_ACEOF
17654/* end confdefs.h. */
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017655[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017656#include <sys/stat.h>
17657#include <unistd.h>
17658int main(int argc, char*argv[])
17659{
17660 if(chflags(argv[0], 0) != 0)
17661 return 1;
17662 return 0;
17663}
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017664]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017665_ACEOF
17666rm -f conftest$ac_exeext
17667if { (ac_try="$ac_link"
17668case "(($ac_try" in
17669 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17670 *) ac_try_echo=$ac_try;;
17671esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017672eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17673$as_echo "$ac_try_echo") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017674 (eval "$ac_link") 2>&5
17675 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000017676 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017677 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17678 { (case "(($ac_try" in
17679 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17680 *) ac_try_echo=$ac_try;;
17681esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017682eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17683$as_echo "$ac_try_echo") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017684 (eval "$ac_try") 2>&5
17685 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000017686 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017687 (exit $ac_status); }; }; then
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017688 ac_cv_have_chflags=yes
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017689else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017690 $as_echo "$as_me: program exited with status $ac_status" >&5
17691$as_echo "$as_me: failed program was:" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017692sed 's/^/| /' conftest.$ac_ext >&5
17693
17694( exit $ac_status )
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017695ac_cv_have_chflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017696fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000017697rm -rf conftest.dSYM
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017698rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17699fi
17700
17701
17702
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017703fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000017704{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
17705$as_echo "$ac_cv_have_chflags" >&6; }
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017706if test "$ac_cv_have_chflags" = cross ; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000017707 { $as_echo "$as_me:$LINENO: checking for chflags" >&5
17708$as_echo_n "checking for chflags... " >&6; }
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017709if test "${ac_cv_func_chflags+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000017710 $as_echo_n "(cached) " >&6
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017711else
17712 cat >conftest.$ac_ext <<_ACEOF
17713/* confdefs.h. */
17714_ACEOF
17715cat confdefs.h >>conftest.$ac_ext
17716cat >>conftest.$ac_ext <<_ACEOF
17717/* end confdefs.h. */
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017718/* Define chflags to an innocuous variant, in case <limits.h> declares chflags.
17719 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17720#define chflags innocuous_chflags
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017721
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017722/* System header to define __stub macros and hopefully few prototypes,
17723 which can conflict with char chflags (); below.
17724 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17725 <limits.h> exists even on freestanding compilers. */
17726
17727#ifdef __STDC__
17728# include <limits.h>
17729#else
17730# include <assert.h>
17731#endif
17732
17733#undef chflags
17734
17735/* Override any GCC internal prototype to avoid an error.
17736 Use char because int might match the return type of a GCC
17737 builtin and then its argument prototype would still apply. */
17738#ifdef __cplusplus
17739extern "C"
17740#endif
17741char chflags ();
17742/* The GNU C library defines this for functions which it implements
17743 to always fail with ENOSYS. Some functions are actually named
17744 something starting with __ and the normal name is an alias. */
17745#if defined __stub_chflags || defined __stub___chflags
17746choke me
17747#endif
17748
17749int
17750main ()
17751{
17752return chflags ();
17753 ;
17754 return 0;
17755}
17756_ACEOF
17757rm -f conftest.$ac_objext conftest$ac_exeext
17758if { (ac_try="$ac_link"
17759case "(($ac_try" in
17760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17761 *) ac_try_echo=$ac_try;;
17762esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017763eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17764$as_echo "$ac_try_echo") >&5
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017765 (eval "$ac_link") 2>conftest.er1
17766 ac_status=$?
17767 grep -v '^ *+' conftest.er1 >conftest.err
17768 rm -f conftest.er1
17769 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017770 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017771 (exit $ac_status); } && {
17772 test -z "$ac_c_werror_flag" ||
17773 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000017774 } && test -s conftest$ac_exeext && {
17775 test "$cross_compiling" = yes ||
17776 $as_test_x conftest$ac_exeext
17777 }; then
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017778 ac_cv_func_chflags=yes
17779else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017780 $as_echo "$as_me: failed program was:" >&5
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017781sed 's/^/| /' conftest.$ac_ext >&5
17782
17783 ac_cv_func_chflags=no
17784fi
17785
Benjamin Peterson697cd212010-05-02 16:45:11 +000017786rm -rf conftest.dSYM
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017787rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17788 conftest$ac_exeext conftest.$ac_ext
17789fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000017790{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_chflags" >&5
17791$as_echo "$ac_cv_func_chflags" >&6; }
17792if test "x$ac_cv_func_chflags" = x""yes; then
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017793 ac_cv_have_chflags="yes"
17794else
17795 ac_cv_have_chflags="no"
17796fi
17797
17798fi
17799if test "$ac_cv_have_chflags" = yes ; then
17800
17801cat >>confdefs.h <<\_ACEOF
17802#define HAVE_CHFLAGS 1
17803_ACEOF
17804
17805fi
17806
Benjamin Peterson697cd212010-05-02 16:45:11 +000017807{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5
17808$as_echo_n "checking for lchflags... " >&6; }
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017809if test "${ac_cv_have_lchflags+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000017810 $as_echo_n "(cached) " >&6
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017811else
17812 if test "$cross_compiling" = yes; then
17813 ac_cv_have_lchflags=cross
17814else
17815 cat >conftest.$ac_ext <<_ACEOF
17816/* confdefs.h. */
17817_ACEOF
17818cat confdefs.h >>conftest.$ac_ext
17819cat >>conftest.$ac_ext <<_ACEOF
17820/* end confdefs.h. */
17821[
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017822#include <sys/stat.h>
17823#include <unistd.h>
17824int main(int argc, char*argv[])
17825{
17826 if(lchflags(argv[0], 0) != 0)
17827 return 1;
17828 return 0;
17829}
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017830]
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017831_ACEOF
17832rm -f conftest$ac_exeext
17833if { (ac_try="$ac_link"
17834case "(($ac_try" in
17835 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17836 *) ac_try_echo=$ac_try;;
17837esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017838eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17839$as_echo "$ac_try_echo") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017840 (eval "$ac_link") 2>&5
17841 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000017842 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017843 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17844 { (case "(($ac_try" in
17845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17846 *) ac_try_echo=$ac_try;;
17847esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017848eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17849$as_echo "$ac_try_echo") >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017850 (eval "$ac_try") 2>&5
17851 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000017852 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017853 (exit $ac_status); }; }; then
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017854 ac_cv_have_lchflags=yes
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017855else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017856 $as_echo "$as_me: program exited with status $ac_status" >&5
17857$as_echo "$as_me: failed program was:" >&5
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017858sed 's/^/| /' conftest.$ac_ext >&5
17859
17860( exit $ac_status )
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017861ac_cv_have_lchflags=no
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017862fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000017863rm -rf conftest.dSYM
Martin v. Löwisa51d5c82007-12-04 08:37:59 +000017864rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
17865fi
17866
17867
17868
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017869fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000017870{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
17871$as_echo "$ac_cv_have_lchflags" >&6; }
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017872if test "$ac_cv_have_lchflags" = cross ; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000017873 { $as_echo "$as_me:$LINENO: checking for lchflags" >&5
17874$as_echo_n "checking for lchflags... " >&6; }
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017875if test "${ac_cv_func_lchflags+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000017876 $as_echo_n "(cached) " >&6
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017877else
17878 cat >conftest.$ac_ext <<_ACEOF
17879/* confdefs.h. */
17880_ACEOF
17881cat confdefs.h >>conftest.$ac_ext
17882cat >>conftest.$ac_ext <<_ACEOF
17883/* end confdefs.h. */
17884/* Define lchflags to an innocuous variant, in case <limits.h> declares lchflags.
17885 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17886#define lchflags innocuous_lchflags
17887
17888/* System header to define __stub macros and hopefully few prototypes,
17889 which can conflict with char lchflags (); below.
17890 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17891 <limits.h> exists even on freestanding compilers. */
17892
17893#ifdef __STDC__
17894# include <limits.h>
17895#else
17896# include <assert.h>
17897#endif
17898
17899#undef lchflags
17900
17901/* Override any GCC internal prototype to avoid an error.
17902 Use char because int might match the return type of a GCC
17903 builtin and then its argument prototype would still apply. */
17904#ifdef __cplusplus
17905extern "C"
17906#endif
17907char lchflags ();
17908/* The GNU C library defines this for functions which it implements
17909 to always fail with ENOSYS. Some functions are actually named
17910 something starting with __ and the normal name is an alias. */
17911#if defined __stub_lchflags || defined __stub___lchflags
17912choke me
17913#endif
17914
17915int
17916main ()
17917{
17918return lchflags ();
17919 ;
17920 return 0;
17921}
17922_ACEOF
17923rm -f conftest.$ac_objext conftest$ac_exeext
17924if { (ac_try="$ac_link"
17925case "(($ac_try" in
17926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17927 *) ac_try_echo=$ac_try;;
17928esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000017929eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17930$as_echo "$ac_try_echo") >&5
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017931 (eval "$ac_link") 2>conftest.er1
17932 ac_status=$?
17933 grep -v '^ *+' conftest.er1 >conftest.err
17934 rm -f conftest.er1
17935 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000017936 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017937 (exit $ac_status); } && {
17938 test -z "$ac_c_werror_flag" ||
17939 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000017940 } && test -s conftest$ac_exeext && {
17941 test "$cross_compiling" = yes ||
17942 $as_test_x conftest$ac_exeext
17943 }; then
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017944 ac_cv_func_lchflags=yes
17945else
Benjamin Peterson697cd212010-05-02 16:45:11 +000017946 $as_echo "$as_me: failed program was:" >&5
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017947sed 's/^/| /' conftest.$ac_ext >&5
17948
17949 ac_cv_func_lchflags=no
17950fi
17951
Benjamin Peterson697cd212010-05-02 16:45:11 +000017952rm -rf conftest.dSYM
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017953rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
17954 conftest$ac_exeext conftest.$ac_ext
17955fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000017956{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_lchflags" >&5
17957$as_echo "$ac_cv_func_lchflags" >&6; }
17958if test "x$ac_cv_func_lchflags" = x""yes; then
Benjamin Petersonb453f0b2010-01-30 19:51:50 +000017959 ac_cv_have_lchflags="yes"
17960else
17961 ac_cv_have_lchflags="no"
17962fi
17963
17964fi
17965if test "$ac_cv_have_lchflags" = yes ; then
17966
17967cat >>confdefs.h <<\_ACEOF
17968#define HAVE_LCHFLAGS 1
17969_ACEOF
17970
17971fi
17972
Ronald Oussorenf8752642006-07-06 10:13:35 +000017973case $ac_sys_system/$ac_sys_release in
17974Darwin/*)
17975 _CUR_CFLAGS="${CFLAGS}"
17976 _CUR_LDFLAGS="${LDFLAGS}"
17977 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
17978 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
17979 ;;
17980esac
17981
Benjamin Peterson697cd212010-05-02 16:45:11 +000017982{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
17983$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017984if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000017985 $as_echo_n "(cached) " >&6
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017986else
17987 ac_check_lib_save_LIBS=$LIBS
17988LIBS="-lz $LIBS"
17989cat >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
Martin v. Löwiseba40652007-08-30 20:10:57 +000017996/* Override any GCC internal prototype to avoid an error.
17997 Use char because int might match the return type of a GCC
17998 builtin and then its argument prototype would still apply. */
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000017999#ifdef __cplusplus
18000extern "C"
18001#endif
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018002char inflateCopy ();
18003int
18004main ()
18005{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018006return inflateCopy ();
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018007 ;
18008 return 0;
18009}
18010_ACEOF
18011rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018012if { (ac_try="$ac_link"
18013case "(($ac_try" in
18014 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18015 *) ac_try_echo=$ac_try;;
18016esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018017eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18018$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018019 (eval "$ac_link") 2>conftest.er1
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018020 ac_status=$?
18021 grep -v '^ *+' conftest.er1 >conftest.err
18022 rm -f conftest.er1
18023 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018024 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018025 (exit $ac_status); } && {
18026 test -z "$ac_c_werror_flag" ||
18027 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000018028 } && test -s conftest$ac_exeext && {
18029 test "$cross_compiling" = yes ||
18030 $as_test_x conftest$ac_exeext
18031 }; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018032 ac_cv_lib_z_inflateCopy=yes
18033else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018034 $as_echo "$as_me: failed program was:" >&5
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018035sed 's/^/| /' conftest.$ac_ext >&5
18036
Martin v. Löwiseba40652007-08-30 20:10:57 +000018037 ac_cv_lib_z_inflateCopy=no
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018038fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018039
Benjamin Peterson697cd212010-05-02 16:45:11 +000018040rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000018041rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018042 conftest$ac_exeext conftest.$ac_ext
18043LIBS=$ac_check_lib_save_LIBS
18044fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000018045{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18046$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
18047if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then
Neal Norwitz6e73aaa2006-06-12 03:33:09 +000018048
18049cat >>confdefs.h <<\_ACEOF
18050#define HAVE_ZLIB_COPY 1
18051_ACEOF
18052
18053fi
18054
18055
Ronald Oussorenf8752642006-07-06 10:13:35 +000018056case $ac_sys_system/$ac_sys_release in
18057Darwin/*)
18058 CFLAGS="${_CUR_CFLAGS}"
18059 LDFLAGS="${_CUR_LDFLAGS}"
18060 ;;
18061esac
18062
Benjamin Peterson697cd212010-05-02 16:45:11 +000018063{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5
18064$as_echo_n "checking for hstrerror... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018065cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018066/* confdefs.h. */
18067_ACEOF
18068cat confdefs.h >>conftest.$ac_ext
18069cat >>conftest.$ac_ext <<_ACEOF
18070/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018071
18072#include "confdefs.h"
18073#include <netdb.h>
18074
Martin v. Löwise9416172003-05-03 10:12:45 +000018075int
18076main ()
18077{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018078void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018079 ;
18080 return 0;
18081}
18082_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018083rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018084if { (ac_try="$ac_link"
18085case "(($ac_try" in
18086 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18087 *) ac_try_echo=$ac_try;;
18088esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018089eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18090$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018091 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018092 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018093 grep -v '^ *+' conftest.er1 >conftest.err
18094 rm -f conftest.er1
18095 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018096 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018097 (exit $ac_status); } && {
18098 test -z "$ac_c_werror_flag" ||
18099 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000018100 } && test -s conftest$ac_exeext && {
18101 test "$cross_compiling" = yes ||
18102 $as_test_x conftest$ac_exeext
18103 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018104
18105cat >>confdefs.h <<\_ACEOF
18106#define HAVE_HSTRERROR 1
18107_ACEOF
18108
Benjamin Peterson697cd212010-05-02 16:45:11 +000018109 { $as_echo "$as_me:$LINENO: result: yes" >&5
18110$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018111else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018112 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018113sed 's/^/| /' conftest.$ac_ext >&5
18114
Benjamin Peterson697cd212010-05-02 16:45:11 +000018115 { $as_echo "$as_me:$LINENO: result: no" >&5
18116$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018117
18118fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018119
Benjamin Peterson697cd212010-05-02 16:45:11 +000018120rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000018121rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018122 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018123
Benjamin Peterson697cd212010-05-02 16:45:11 +000018124{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5
18125$as_echo_n "checking for inet_aton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018126cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018127/* confdefs.h. */
18128_ACEOF
18129cat confdefs.h >>conftest.$ac_ext
18130cat >>conftest.$ac_ext <<_ACEOF
18131/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018132
18133#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018134#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018135#include <sys/socket.h>
18136#include <netinet/in.h>
18137#include <arpa/inet.h>
18138
Martin v. Löwise9416172003-05-03 10:12:45 +000018139int
18140main ()
18141{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018142void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018143 ;
18144 return 0;
18145}
18146_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018147rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018148if { (ac_try="$ac_link"
18149case "(($ac_try" in
18150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18151 *) ac_try_echo=$ac_try;;
18152esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018153eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18154$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018155 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018156 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018157 grep -v '^ *+' conftest.er1 >conftest.err
18158 rm -f conftest.er1
18159 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018160 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018161 (exit $ac_status); } && {
18162 test -z "$ac_c_werror_flag" ||
18163 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000018164 } && test -s conftest$ac_exeext && {
18165 test "$cross_compiling" = yes ||
18166 $as_test_x conftest$ac_exeext
18167 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018168
18169cat >>confdefs.h <<\_ACEOF
18170#define HAVE_INET_ATON 1
18171_ACEOF
18172
Benjamin Peterson697cd212010-05-02 16:45:11 +000018173 { $as_echo "$as_me:$LINENO: result: yes" >&5
18174$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018175else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018176 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018177sed 's/^/| /' conftest.$ac_ext >&5
18178
Benjamin Peterson697cd212010-05-02 16:45:11 +000018179 { $as_echo "$as_me:$LINENO: result: no" >&5
18180$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018181
18182fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018183
Benjamin Peterson697cd212010-05-02 16:45:11 +000018184rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000018185rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018186 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018187
Benjamin Peterson697cd212010-05-02 16:45:11 +000018188{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5
18189$as_echo_n "checking for inet_pton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018190cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018191/* confdefs.h. */
18192_ACEOF
18193cat confdefs.h >>conftest.$ac_ext
18194cat >>conftest.$ac_ext <<_ACEOF
18195/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018196
18197#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018198#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018199#include <sys/socket.h>
18200#include <netinet/in.h>
18201#include <arpa/inet.h>
18202
Martin v. Löwise9416172003-05-03 10:12:45 +000018203int
18204main ()
18205{
18206void* p = inet_pton
18207 ;
18208 return 0;
18209}
18210_ACEOF
18211rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018212if { (ac_try="$ac_compile"
18213case "(($ac_try" in
18214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18215 *) ac_try_echo=$ac_try;;
18216esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018217eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18218$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018219 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018220 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018221 grep -v '^ *+' conftest.er1 >conftest.err
18222 rm -f conftest.er1
18223 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018224 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018225 (exit $ac_status); } && {
18226 test -z "$ac_c_werror_flag" ||
18227 test ! -s conftest.err
18228 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018229
18230cat >>confdefs.h <<\_ACEOF
18231#define HAVE_INET_PTON 1
18232_ACEOF
18233
Benjamin Peterson697cd212010-05-02 16:45:11 +000018234 { $as_echo "$as_me:$LINENO: result: yes" >&5
18235$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018236else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018237 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018238sed 's/^/| /' conftest.$ac_ext >&5
18239
Benjamin Peterson697cd212010-05-02 16:45:11 +000018240 { $as_echo "$as_me:$LINENO: result: no" >&5
18241$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018242
18243fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018244
18245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018246
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018247# On some systems, setgroups is in unistd.h, on others, in grp.h
Benjamin Peterson697cd212010-05-02 16:45:11 +000018248{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5
18249$as_echo_n "checking for setgroups... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018250cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018251/* confdefs.h. */
18252_ACEOF
18253cat confdefs.h >>conftest.$ac_ext
18254cat >>conftest.$ac_ext <<_ACEOF
18255/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018256
18257#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000018258#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000018259#ifdef HAVE_GRP_H
18260#include <grp.h>
18261#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000018262
Martin v. Löwisd5843682002-11-21 20:41:28 +000018263int
18264main ()
18265{
18266void* p = setgroups
18267 ;
18268 return 0;
18269}
18270_ACEOF
18271rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018272if { (ac_try="$ac_compile"
18273case "(($ac_try" in
18274 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18275 *) ac_try_echo=$ac_try;;
18276esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018277eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18278$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018279 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018280 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018281 grep -v '^ *+' conftest.er1 >conftest.err
18282 rm -f conftest.er1
18283 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018284 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018285 (exit $ac_status); } && {
18286 test -z "$ac_c_werror_flag" ||
18287 test ! -s conftest.err
18288 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018289
18290cat >>confdefs.h <<\_ACEOF
18291#define HAVE_SETGROUPS 1
18292_ACEOF
18293
Benjamin Peterson697cd212010-05-02 16:45:11 +000018294 { $as_echo "$as_me:$LINENO: result: yes" >&5
18295$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018296else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018297 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018298sed 's/^/| /' conftest.$ac_ext >&5
18299
Benjamin Peterson697cd212010-05-02 16:45:11 +000018300 { $as_echo "$as_me:$LINENO: result: no" >&5
18301$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018302
18303fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018304
18305rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018306
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018307# check for openpty and forkpty
18308
Martin v. Löwis11437992002-04-12 09:54:03 +000018309
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018310for ac_func in openpty
18311do
Benjamin Peterson697cd212010-05-02 16:45:11 +000018312as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18313{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18314$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018315if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000018316 $as_echo_n "(cached) " >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018317else
Martin v. Löwis11437992002-04-12 09:54:03 +000018318 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018319/* confdefs.h. */
18320_ACEOF
18321cat confdefs.h >>conftest.$ac_ext
18322cat >>conftest.$ac_ext <<_ACEOF
18323/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018324/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18325 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18326#define $ac_func innocuous_$ac_func
18327
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018328/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018329 which can conflict with char $ac_func (); below.
18330 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018331 <limits.h> exists even on freestanding compilers. */
18332
18333#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018334# include <limits.h>
18335#else
18336# include <assert.h>
18337#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018338
18339#undef $ac_func
18340
Martin v. Löwiseba40652007-08-30 20:10:57 +000018341/* Override any GCC internal prototype to avoid an error.
18342 Use char because int might match the return type of a GCC
18343 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018344#ifdef __cplusplus
18345extern "C"
18346#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018347char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018348/* The GNU C library defines this for functions which it implements
18349 to always fail with ENOSYS. Some functions are actually named
18350 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018351#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018352choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018353#endif
18354
Skip Montanaro6dead952003-09-25 14:50:04 +000018355int
18356main ()
18357{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018358return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018359 ;
18360 return 0;
18361}
18362_ACEOF
18363rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018364if { (ac_try="$ac_link"
18365case "(($ac_try" in
18366 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18367 *) ac_try_echo=$ac_try;;
18368esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018369eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18370$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018371 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018372 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018373 grep -v '^ *+' conftest.er1 >conftest.err
18374 rm -f conftest.er1
18375 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018376 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018377 (exit $ac_status); } && {
18378 test -z "$ac_c_werror_flag" ||
18379 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000018380 } && test -s conftest$ac_exeext && {
18381 test "$cross_compiling" = yes ||
18382 $as_test_x conftest$ac_exeext
18383 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018384 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018385else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018386 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018387sed 's/^/| /' conftest.$ac_ext >&5
18388
Martin v. Löwiseba40652007-08-30 20:10:57 +000018389 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018390fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018391
Benjamin Peterson697cd212010-05-02 16:45:11 +000018392rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000018393rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018394 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018395fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000018396ac_res=`eval 'as_val=${'$as_ac_var'}
18397 $as_echo "$as_val"'`
18398 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18399$as_echo "$ac_res" >&6; }
18400as_val=`eval 'as_val=${'$as_ac_var'}
18401 $as_echo "$as_val"'`
18402 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018403 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000018404#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018405_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018406
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000018407else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018408 { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
18409$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018410if test "${ac_cv_lib_util_openpty+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000018411 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018412else
Martin v. Löwis11437992002-04-12 09:54:03 +000018413 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018414LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018415cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018416/* confdefs.h. */
18417_ACEOF
18418cat confdefs.h >>conftest.$ac_ext
18419cat >>conftest.$ac_ext <<_ACEOF
18420/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018421
Martin v. Löwiseba40652007-08-30 20:10:57 +000018422/* Override any GCC internal prototype to avoid an error.
18423 Use char because int might match the return type of a GCC
18424 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018425#ifdef __cplusplus
18426extern "C"
18427#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018428char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018429int
18430main ()
18431{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018432return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018433 ;
18434 return 0;
18435}
18436_ACEOF
18437rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018438if { (ac_try="$ac_link"
18439case "(($ac_try" in
18440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18441 *) ac_try_echo=$ac_try;;
18442esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018443eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18444$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018445 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018446 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018447 grep -v '^ *+' conftest.er1 >conftest.err
18448 rm -f conftest.er1
18449 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018450 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018451 (exit $ac_status); } && {
18452 test -z "$ac_c_werror_flag" ||
18453 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000018454 } && test -s conftest$ac_exeext && {
18455 test "$cross_compiling" = yes ||
18456 $as_test_x conftest$ac_exeext
18457 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018458 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018459else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018460 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018461sed 's/^/| /' conftest.$ac_ext >&5
18462
Martin v. Löwiseba40652007-08-30 20:10:57 +000018463 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018464fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018465
Benjamin Peterson697cd212010-05-02 16:45:11 +000018466rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000018467rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018468 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018469LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018470fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000018471{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
18472$as_echo "$ac_cv_lib_util_openpty" >&6; }
18473if test "x$ac_cv_lib_util_openpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018474 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018475#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018476_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018477 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018478else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018479 { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
18480$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018481if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000018482 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018483else
18484 ac_check_lib_save_LIBS=$LIBS
18485LIBS="-lbsd $LIBS"
18486cat >conftest.$ac_ext <<_ACEOF
18487/* confdefs.h. */
18488_ACEOF
18489cat confdefs.h >>conftest.$ac_ext
18490cat >>conftest.$ac_ext <<_ACEOF
18491/* end confdefs.h. */
18492
Martin v. Löwiseba40652007-08-30 20:10:57 +000018493/* Override any GCC internal prototype to avoid an error.
18494 Use char because int might match the return type of a GCC
18495 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018496#ifdef __cplusplus
18497extern "C"
18498#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018499char openpty ();
18500int
18501main ()
18502{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018503return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018504 ;
18505 return 0;
18506}
18507_ACEOF
18508rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018509if { (ac_try="$ac_link"
18510case "(($ac_try" in
18511 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18512 *) ac_try_echo=$ac_try;;
18513esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018514eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18515$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018516 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018517 ac_status=$?
18518 grep -v '^ *+' conftest.er1 >conftest.err
18519 rm -f conftest.er1
18520 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018521 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018522 (exit $ac_status); } && {
18523 test -z "$ac_c_werror_flag" ||
18524 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000018525 } && test -s conftest$ac_exeext && {
18526 test "$cross_compiling" = yes ||
18527 $as_test_x conftest$ac_exeext
18528 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018529 ac_cv_lib_bsd_openpty=yes
18530else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018531 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018532sed 's/^/| /' conftest.$ac_ext >&5
18533
Martin v. Löwiseba40652007-08-30 20:10:57 +000018534 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018535fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018536
Benjamin Peterson697cd212010-05-02 16:45:11 +000018537rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000018538rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018539 conftest$ac_exeext conftest.$ac_ext
18540LIBS=$ac_check_lib_save_LIBS
18541fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000018542{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
18543$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
18544if test "x$ac_cv_lib_bsd_openpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018545 cat >>confdefs.h <<\_ACEOF
18546#define HAVE_OPENPTY 1
18547_ACEOF
18548 LIBS="$LIBS -lbsd"
18549fi
18550
18551
18552fi
18553
Fred Drake8cef4cf2000-06-28 16:40:38 +000018554
18555fi
18556done
18557
Martin v. Löwis11437992002-04-12 09:54:03 +000018558
Fred Drake8cef4cf2000-06-28 16:40:38 +000018559for ac_func in forkpty
18560do
Benjamin Peterson697cd212010-05-02 16:45:11 +000018561as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18562{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18563$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018564if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000018565 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018566else
Martin v. Löwis11437992002-04-12 09:54:03 +000018567 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018568/* confdefs.h. */
18569_ACEOF
18570cat confdefs.h >>conftest.$ac_ext
18571cat >>conftest.$ac_ext <<_ACEOF
18572/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018573/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18574 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18575#define $ac_func innocuous_$ac_func
18576
Fred Drake8cef4cf2000-06-28 16:40:38 +000018577/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018578 which can conflict with char $ac_func (); below.
18579 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018580 <limits.h> exists even on freestanding compilers. */
18581
18582#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018583# include <limits.h>
18584#else
18585# include <assert.h>
18586#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018587
18588#undef $ac_func
18589
Martin v. Löwiseba40652007-08-30 20:10:57 +000018590/* Override any GCC internal prototype to avoid an error.
18591 Use char because int might match the return type of a GCC
18592 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018593#ifdef __cplusplus
18594extern "C"
18595#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018596char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000018597/* The GNU C library defines this for functions which it implements
18598 to always fail with ENOSYS. Some functions are actually named
18599 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018600#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000018601choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000018602#endif
18603
Skip Montanaro6dead952003-09-25 14:50:04 +000018604int
18605main ()
18606{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018607return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018608 ;
18609 return 0;
18610}
18611_ACEOF
18612rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018613if { (ac_try="$ac_link"
18614case "(($ac_try" in
18615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18616 *) ac_try_echo=$ac_try;;
18617esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018618eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18619$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018620 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018621 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018622 grep -v '^ *+' conftest.er1 >conftest.err
18623 rm -f conftest.er1
18624 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018625 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018626 (exit $ac_status); } && {
18627 test -z "$ac_c_werror_flag" ||
18628 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000018629 } && test -s conftest$ac_exeext && {
18630 test "$cross_compiling" = yes ||
18631 $as_test_x conftest$ac_exeext
18632 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018633 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000018634else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018635 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018636sed 's/^/| /' conftest.$ac_ext >&5
18637
Martin v. Löwiseba40652007-08-30 20:10:57 +000018638 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018639fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018640
Benjamin Peterson697cd212010-05-02 16:45:11 +000018641rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000018642rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018643 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000018644fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000018645ac_res=`eval 'as_val=${'$as_ac_var'}
18646 $as_echo "$as_val"'`
18647 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18648$as_echo "$ac_res" >&6; }
18649as_val=`eval 'as_val=${'$as_ac_var'}
18650 $as_echo "$as_val"'`
18651 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018652 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000018653#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018654_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018655
Fred Drake8cef4cf2000-06-28 16:40:38 +000018656else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018657 { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
18658$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000018659if test "${ac_cv_lib_util_forkpty+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000018660 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000018661else
Martin v. Löwis11437992002-04-12 09:54:03 +000018662 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018663LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000018664cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018665/* confdefs.h. */
18666_ACEOF
18667cat confdefs.h >>conftest.$ac_ext
18668cat >>conftest.$ac_ext <<_ACEOF
18669/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018670
Martin v. Löwiseba40652007-08-30 20:10:57 +000018671/* Override any GCC internal prototype to avoid an error.
18672 Use char because int might match the return type of a GCC
18673 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018674#ifdef __cplusplus
18675extern "C"
18676#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018677char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018678int
18679main ()
18680{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018681return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018682 ;
18683 return 0;
18684}
18685_ACEOF
18686rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018687if { (ac_try="$ac_link"
18688case "(($ac_try" in
18689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18690 *) ac_try_echo=$ac_try;;
18691esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018692eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18693$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018694 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018695 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018696 grep -v '^ *+' conftest.er1 >conftest.err
18697 rm -f conftest.er1
18698 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018699 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018700 (exit $ac_status); } && {
18701 test -z "$ac_c_werror_flag" ||
18702 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000018703 } && test -s conftest$ac_exeext && {
18704 test "$cross_compiling" = yes ||
18705 $as_test_x conftest$ac_exeext
18706 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018707 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000018708else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018709 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018710sed 's/^/| /' conftest.$ac_ext >&5
18711
Martin v. Löwiseba40652007-08-30 20:10:57 +000018712 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018713fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018714
Benjamin Peterson697cd212010-05-02 16:45:11 +000018715rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000018716rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018717 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000018718LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000018719fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000018720{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
18721$as_echo "$ac_cv_lib_util_forkpty" >&6; }
18722if test "x$ac_cv_lib_util_forkpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018723 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018724#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000018725_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000018726 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018727else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018728 { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
18729$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018730if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000018731 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018732else
18733 ac_check_lib_save_LIBS=$LIBS
18734LIBS="-lbsd $LIBS"
18735cat >conftest.$ac_ext <<_ACEOF
18736/* confdefs.h. */
18737_ACEOF
18738cat confdefs.h >>conftest.$ac_ext
18739cat >>conftest.$ac_ext <<_ACEOF
18740/* end confdefs.h. */
18741
Martin v. Löwiseba40652007-08-30 20:10:57 +000018742/* Override any GCC internal prototype to avoid an error.
18743 Use char because int might match the return type of a GCC
18744 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018745#ifdef __cplusplus
18746extern "C"
18747#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018748char forkpty ();
18749int
18750main ()
18751{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018752return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018753 ;
18754 return 0;
18755}
18756_ACEOF
18757rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018758if { (ac_try="$ac_link"
18759case "(($ac_try" in
18760 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18761 *) ac_try_echo=$ac_try;;
18762esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018763eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18764$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018765 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018766 ac_status=$?
18767 grep -v '^ *+' conftest.er1 >conftest.err
18768 rm -f conftest.er1
18769 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018770 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018771 (exit $ac_status); } && {
18772 test -z "$ac_c_werror_flag" ||
18773 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000018774 } && test -s conftest$ac_exeext && {
18775 test "$cross_compiling" = yes ||
18776 $as_test_x conftest$ac_exeext
18777 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018778 ac_cv_lib_bsd_forkpty=yes
18779else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018780 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018781sed 's/^/| /' conftest.$ac_ext >&5
18782
Martin v. Löwiseba40652007-08-30 20:10:57 +000018783 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000018784fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018785
Benjamin Peterson697cd212010-05-02 16:45:11 +000018786rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000018787rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018788 conftest$ac_exeext conftest.$ac_ext
18789LIBS=$ac_check_lib_save_LIBS
18790fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000018791{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
18792$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
18793if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000018794 cat >>confdefs.h <<\_ACEOF
18795#define HAVE_FORKPTY 1
18796_ACEOF
18797 LIBS="$LIBS -lbsd"
18798fi
18799
18800
18801fi
18802
Fred Drake8cef4cf2000-06-28 16:40:38 +000018803
18804fi
18805done
18806
Jack Jansendd19cf82001-12-06 22:36:17 +000018807
Brett Cannonaa5778d2008-03-18 04:09:00 +000018808# Stuff for expat.
18809
18810for ac_func in memmove
18811do
Benjamin Peterson697cd212010-05-02 16:45:11 +000018812as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18813{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18814$as_echo_n "checking for $ac_func... " >&6; }
Brett Cannonaa5778d2008-03-18 04:09:00 +000018815if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000018816 $as_echo_n "(cached) " >&6
Brett Cannonaa5778d2008-03-18 04:09:00 +000018817else
18818 cat >conftest.$ac_ext <<_ACEOF
18819/* confdefs.h. */
18820_ACEOF
18821cat confdefs.h >>conftest.$ac_ext
18822cat >>conftest.$ac_ext <<_ACEOF
18823/* end confdefs.h. */
18824/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18825 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18826#define $ac_func innocuous_$ac_func
18827
18828/* System header to define __stub macros and hopefully few prototypes,
18829 which can conflict with char $ac_func (); below.
18830 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18831 <limits.h> exists even on freestanding compilers. */
18832
18833#ifdef __STDC__
18834# include <limits.h>
18835#else
18836# include <assert.h>
18837#endif
18838
18839#undef $ac_func
18840
18841/* Override any GCC internal prototype to avoid an error.
18842 Use char because int might match the return type of a GCC
18843 builtin and then its argument prototype would still apply. */
18844#ifdef __cplusplus
18845extern "C"
18846#endif
18847char $ac_func ();
18848/* The GNU C library defines this for functions which it implements
18849 to always fail with ENOSYS. Some functions are actually named
18850 something starting with __ and the normal name is an alias. */
18851#if defined __stub_$ac_func || defined __stub___$ac_func
18852choke me
18853#endif
18854
18855int
18856main ()
18857{
18858return $ac_func ();
18859 ;
18860 return 0;
18861}
18862_ACEOF
18863rm -f conftest.$ac_objext conftest$ac_exeext
18864if { (ac_try="$ac_link"
18865case "(($ac_try" in
18866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18867 *) ac_try_echo=$ac_try;;
18868esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018869eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18870$as_echo "$ac_try_echo") >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000018871 (eval "$ac_link") 2>conftest.er1
18872 ac_status=$?
18873 grep -v '^ *+' conftest.er1 >conftest.err
18874 rm -f conftest.er1
18875 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018876 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000018877 (exit $ac_status); } && {
18878 test -z "$ac_c_werror_flag" ||
18879 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000018880 } && test -s conftest$ac_exeext && {
18881 test "$cross_compiling" = yes ||
18882 $as_test_x conftest$ac_exeext
18883 }; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000018884 eval "$as_ac_var=yes"
18885else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018886 $as_echo "$as_me: failed program was:" >&5
Brett Cannonaa5778d2008-03-18 04:09:00 +000018887sed 's/^/| /' conftest.$ac_ext >&5
18888
18889 eval "$as_ac_var=no"
18890fi
18891
Benjamin Peterson697cd212010-05-02 16:45:11 +000018892rm -rf conftest.dSYM
Brett Cannonaa5778d2008-03-18 04:09:00 +000018893rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18894 conftest$ac_exeext conftest.$ac_ext
18895fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000018896ac_res=`eval 'as_val=${'$as_ac_var'}
18897 $as_echo "$as_val"'`
18898 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
18899$as_echo "$ac_res" >&6; }
18900as_val=`eval 'as_val=${'$as_ac_var'}
18901 $as_echo "$as_val"'`
18902 if test "x$as_val" = x""yes; then
Brett Cannonaa5778d2008-03-18 04:09:00 +000018903 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000018904#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Brett Cannonaa5778d2008-03-18 04:09:00 +000018905_ACEOF
18906
18907fi
18908done
18909
18910
Michael W. Hudson54241132001-12-07 15:38:26 +000018911# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000018912
18913
18914
18915
18916
18917
Fred Drake8cef4cf2000-06-28 16:40:38 +000018918for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
18919do
Benjamin Peterson697cd212010-05-02 16:45:11 +000018920as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18921{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
18922$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000018923if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000018924 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018925else
Martin v. Löwis11437992002-04-12 09:54:03 +000018926 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018927/* confdefs.h. */
18928_ACEOF
18929cat confdefs.h >>conftest.$ac_ext
18930cat >>conftest.$ac_ext <<_ACEOF
18931/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018932/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18933 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18934#define $ac_func innocuous_$ac_func
18935
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018936/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000018937 which can conflict with char $ac_func (); below.
18938 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018939 <limits.h> exists even on freestanding compilers. */
18940
18941#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000018942# include <limits.h>
18943#else
18944# include <assert.h>
18945#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000018946
18947#undef $ac_func
18948
Martin v. Löwiseba40652007-08-30 20:10:57 +000018949/* Override any GCC internal prototype to avoid an error.
18950 Use char because int might match the return type of a GCC
18951 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000018952#ifdef __cplusplus
18953extern "C"
18954#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000018955char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018956/* The GNU C library defines this for functions which it implements
18957 to always fail with ENOSYS. Some functions are actually named
18958 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000018959#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018960choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000018961#endif
18962
Skip Montanaro6dead952003-09-25 14:50:04 +000018963int
18964main ()
18965{
Martin v. Löwiseba40652007-08-30 20:10:57 +000018966return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000018967 ;
18968 return 0;
18969}
18970_ACEOF
18971rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000018972if { (ac_try="$ac_link"
18973case "(($ac_try" in
18974 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18975 *) ac_try_echo=$ac_try;;
18976esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000018977eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18978$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018979 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000018980 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018981 grep -v '^ *+' conftest.er1 >conftest.err
18982 rm -f conftest.er1
18983 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000018984 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000018985 (exit $ac_status); } && {
18986 test -z "$ac_c_werror_flag" ||
18987 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000018988 } && test -s conftest$ac_exeext && {
18989 test "$cross_compiling" = yes ||
18990 $as_test_x conftest$ac_exeext
18991 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000018992 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000018993else
Benjamin Peterson697cd212010-05-02 16:45:11 +000018994 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018995sed 's/^/| /' conftest.$ac_ext >&5
18996
Martin v. Löwiseba40652007-08-30 20:10:57 +000018997 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000018998fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000018999
Benjamin Peterson697cd212010-05-02 16:45:11 +000019000rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000019001rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019002 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019003fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000019004ac_res=`eval 'as_val=${'$as_ac_var'}
19005 $as_echo "$as_val"'`
19006 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19007$as_echo "$ac_res" >&6; }
19008as_val=`eval 'as_val=${'$as_ac_var'}
19009 $as_echo "$as_val"'`
19010 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019011 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000019012#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019013_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019014
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019015fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019016done
19017
Michael W. Hudson54241132001-12-07 15:38:26 +000019018
Martin v. Löwis11437992002-04-12 09:54:03 +000019019
19020
19021
Brett Cannonaa5778d2008-03-18 04:09:00 +000019022for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019023do
Benjamin Peterson697cd212010-05-02 16:45:11 +000019024as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19025{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19026$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019027if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000019028 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019029else
Martin v. Löwis11437992002-04-12 09:54:03 +000019030 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019031/* confdefs.h. */
19032_ACEOF
19033cat confdefs.h >>conftest.$ac_ext
19034cat >>conftest.$ac_ext <<_ACEOF
19035/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019036/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19037 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19038#define $ac_func innocuous_$ac_func
19039
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019040/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019041 which can conflict with char $ac_func (); below.
19042 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019043 <limits.h> exists even on freestanding compilers. */
19044
19045#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019046# include <limits.h>
19047#else
19048# include <assert.h>
19049#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019050
19051#undef $ac_func
19052
Martin v. Löwiseba40652007-08-30 20:10:57 +000019053/* Override any GCC internal prototype to avoid an error.
19054 Use char because int might match the return type of a GCC
19055 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019056#ifdef __cplusplus
19057extern "C"
19058#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019059char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019060/* The GNU C library defines this for functions which it implements
19061 to always fail with ENOSYS. Some functions are actually named
19062 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019063#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019064choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019065#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019066
Skip Montanaro6dead952003-09-25 14:50:04 +000019067int
19068main ()
19069{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019070return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019071 ;
19072 return 0;
19073}
19074_ACEOF
19075rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019076if { (ac_try="$ac_link"
19077case "(($ac_try" in
19078 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19079 *) ac_try_echo=$ac_try;;
19080esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019081eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19082$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019083 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019084 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019085 grep -v '^ *+' conftest.er1 >conftest.err
19086 rm -f conftest.er1
19087 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000019088 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019089 (exit $ac_status); } && {
19090 test -z "$ac_c_werror_flag" ||
19091 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000019092 } && test -s conftest$ac_exeext && {
19093 test "$cross_compiling" = yes ||
19094 $as_test_x conftest$ac_exeext
19095 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019096 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019097else
Benjamin Peterson697cd212010-05-02 16:45:11 +000019098 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019099sed 's/^/| /' conftest.$ac_ext >&5
19100
Martin v. Löwiseba40652007-08-30 20:10:57 +000019101 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019102fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019103
Benjamin Peterson697cd212010-05-02 16:45:11 +000019104rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000019105rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019106 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019107fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000019108ac_res=`eval 'as_val=${'$as_ac_var'}
19109 $as_echo "$as_val"'`
19110 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19111$as_echo "$ac_res" >&6; }
19112as_val=`eval 'as_val=${'$as_ac_var'}
19113 $as_echo "$as_val"'`
19114 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019115 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000019116#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019117_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019118
Martin v. Löwis1142de32002-03-29 16:28:31 +000019119else
Martin v. Löwiseba40652007-08-30 20:10:57 +000019120 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019121 *" $ac_func.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000019122 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19123 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019124esac
19125
Martin v. Löwis1142de32002-03-29 16:28:31 +000019126fi
19127done
19128
19129
Martin v. Löwis11437992002-04-12 09:54:03 +000019130
Martin v. Löwis1142de32002-03-29 16:28:31 +000019131for ac_func in getpgrp
19132do
Benjamin Peterson697cd212010-05-02 16:45:11 +000019133as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19134{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19135$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019136if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000019137 $as_echo_n "(cached) " >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019138else
Martin v. Löwis11437992002-04-12 09:54:03 +000019139 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019140/* confdefs.h. */
19141_ACEOF
19142cat confdefs.h >>conftest.$ac_ext
19143cat >>conftest.$ac_ext <<_ACEOF
19144/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019145/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19146 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19147#define $ac_func innocuous_$ac_func
19148
Martin v. Löwis1142de32002-03-29 16:28:31 +000019149/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019150 which can conflict with char $ac_func (); below.
19151 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019152 <limits.h> exists even on freestanding compilers. */
19153
19154#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019155# include <limits.h>
19156#else
19157# include <assert.h>
19158#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019159
19160#undef $ac_func
19161
Martin v. Löwiseba40652007-08-30 20:10:57 +000019162/* Override any GCC internal prototype to avoid an error.
19163 Use char because int might match the return type of a GCC
19164 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019165#ifdef __cplusplus
19166extern "C"
19167#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019168char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019169/* The GNU C library defines this for functions which it implements
19170 to always fail with ENOSYS. Some functions are actually named
19171 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019172#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019173choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000019174#endif
19175
Skip Montanaro6dead952003-09-25 14:50:04 +000019176int
19177main ()
19178{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019179return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019180 ;
19181 return 0;
19182}
19183_ACEOF
19184rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019185if { (ac_try="$ac_link"
19186case "(($ac_try" in
19187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19188 *) ac_try_echo=$ac_try;;
19189esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019190eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19191$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019192 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019194 grep -v '^ *+' conftest.er1 >conftest.err
19195 rm -f conftest.er1
19196 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000019197 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019198 (exit $ac_status); } && {
19199 test -z "$ac_c_werror_flag" ||
19200 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000019201 } && test -s conftest$ac_exeext && {
19202 test "$cross_compiling" = yes ||
19203 $as_test_x conftest$ac_exeext
19204 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019205 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019206else
Benjamin Peterson697cd212010-05-02 16:45:11 +000019207 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019208sed 's/^/| /' conftest.$ac_ext >&5
19209
Martin v. Löwiseba40652007-08-30 20:10:57 +000019210 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019211fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019212
Benjamin Peterson697cd212010-05-02 16:45:11 +000019213rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000019214rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019215 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019216fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000019217ac_res=`eval 'as_val=${'$as_ac_var'}
19218 $as_echo "$as_val"'`
19219 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19220$as_echo "$ac_res" >&6; }
19221as_val=`eval 'as_val=${'$as_ac_var'}
19222 $as_echo "$as_val"'`
19223 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019224 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000019225#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019226_ACEOF
19227 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019228/* confdefs.h. */
19229_ACEOF
19230cat confdefs.h >>conftest.$ac_ext
19231cat >>conftest.$ac_ext <<_ACEOF
19232/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019233#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019234int
19235main ()
19236{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019237getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019238 ;
19239 return 0;
19240}
19241_ACEOF
19242rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019243if { (ac_try="$ac_compile"
19244case "(($ac_try" in
19245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19246 *) ac_try_echo=$ac_try;;
19247esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019248eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19249$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019250 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019251 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019252 grep -v '^ *+' conftest.er1 >conftest.err
19253 rm -f conftest.er1
19254 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000019255 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019256 (exit $ac_status); } && {
19257 test -z "$ac_c_werror_flag" ||
19258 test ! -s conftest.err
19259 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019260
19261cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019262#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019263_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019264
Martin v. Löwis11437992002-04-12 09:54:03 +000019265
Guido van Rossumf78abae1997-01-21 22:02:36 +000019266else
Benjamin Peterson697cd212010-05-02 16:45:11 +000019267 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019268sed 's/^/| /' conftest.$ac_ext >&5
19269
Martin v. Löwiseba40652007-08-30 20:10:57 +000019270
Guido van Rossum627b2d71993-12-24 10:39:16 +000019271fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019272
19273rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019274
Guido van Rossum627b2d71993-12-24 10:39:16 +000019275fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019276done
Guido van Rossum627b2d71993-12-24 10:39:16 +000019277
Jack Jansen150753c2003-03-29 22:07:47 +000019278
19279for ac_func in setpgrp
19280do
Benjamin Peterson697cd212010-05-02 16:45:11 +000019281as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19282{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19283$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019284if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000019285 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019286else
Martin v. Löwis11437992002-04-12 09:54:03 +000019287 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019288/* confdefs.h. */
19289_ACEOF
19290cat confdefs.h >>conftest.$ac_ext
19291cat >>conftest.$ac_ext <<_ACEOF
19292/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019293/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19294 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19295#define $ac_func innocuous_$ac_func
19296
Jack Jansen150753c2003-03-29 22:07:47 +000019297/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019298 which can conflict with char $ac_func (); below.
19299 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019300 <limits.h> exists even on freestanding compilers. */
19301
19302#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019303# include <limits.h>
19304#else
19305# include <assert.h>
19306#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019307
19308#undef $ac_func
19309
Martin v. Löwiseba40652007-08-30 20:10:57 +000019310/* Override any GCC internal prototype to avoid an error.
19311 Use char because int might match the return type of a GCC
19312 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000019313#ifdef __cplusplus
19314extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000019315#endif
Jack Jansen150753c2003-03-29 22:07:47 +000019316char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000019317/* The GNU C library defines this for functions which it implements
19318 to always fail with ENOSYS. Some functions are actually named
19319 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019320#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000019321choke me
Jack Jansen150753c2003-03-29 22:07:47 +000019322#endif
19323
Skip Montanaro6dead952003-09-25 14:50:04 +000019324int
19325main ()
19326{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019327return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019328 ;
19329 return 0;
19330}
19331_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019332rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019333if { (ac_try="$ac_link"
19334case "(($ac_try" in
19335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19336 *) ac_try_echo=$ac_try;;
19337esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019338eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19339$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019340 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019342 grep -v '^ *+' conftest.er1 >conftest.err
19343 rm -f conftest.er1
19344 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000019345 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019346 (exit $ac_status); } && {
19347 test -z "$ac_c_werror_flag" ||
19348 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000019349 } && test -s conftest$ac_exeext && {
19350 test "$cross_compiling" = yes ||
19351 $as_test_x conftest$ac_exeext
19352 }; then
Jack Jansen150753c2003-03-29 22:07:47 +000019353 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019354else
Benjamin Peterson697cd212010-05-02 16:45:11 +000019355 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019356sed 's/^/| /' conftest.$ac_ext >&5
19357
Martin v. Löwiseba40652007-08-30 20:10:57 +000019358 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019359fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019360
Benjamin Peterson697cd212010-05-02 16:45:11 +000019361rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000019362rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019363 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019364fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000019365ac_res=`eval 'as_val=${'$as_ac_var'}
19366 $as_echo "$as_val"'`
19367 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19368$as_echo "$ac_res" >&6; }
19369as_val=`eval 'as_val=${'$as_ac_var'}
19370 $as_echo "$as_val"'`
19371 if test "x$as_val" = x""yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000019372 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000019373#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000019374_ACEOF
19375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019376/* confdefs.h. */
19377_ACEOF
19378cat confdefs.h >>conftest.$ac_ext
19379cat >>conftest.$ac_ext <<_ACEOF
19380/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000019381#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000019382int
19383main ()
19384{
19385setpgrp(0,0);
19386 ;
19387 return 0;
19388}
19389_ACEOF
19390rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019391if { (ac_try="$ac_compile"
19392case "(($ac_try" in
19393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19394 *) ac_try_echo=$ac_try;;
19395esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019396eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19397$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019398 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000019399 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019400 grep -v '^ *+' conftest.er1 >conftest.err
19401 rm -f conftest.er1
19402 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000019403 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019404 (exit $ac_status); } && {
19405 test -z "$ac_c_werror_flag" ||
19406 test ! -s conftest.err
19407 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019408
19409cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000019410#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019411_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019412
Jack Jansen150753c2003-03-29 22:07:47 +000019413
19414else
Benjamin Peterson697cd212010-05-02 16:45:11 +000019415 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019416sed 's/^/| /' conftest.$ac_ext >&5
19417
Martin v. Löwiseba40652007-08-30 20:10:57 +000019418
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019419fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019420
19421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000019422
19423fi
19424done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000019425
Martin v. Löwis11437992002-04-12 09:54:03 +000019426
Thomas Wouters3a584202000-08-05 23:28:51 +000019427for ac_func in gettimeofday
19428do
Benjamin Peterson697cd212010-05-02 16:45:11 +000019429as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19430{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19431$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019432if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000019433 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019434else
Martin v. Löwis11437992002-04-12 09:54:03 +000019435 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019436/* confdefs.h. */
19437_ACEOF
19438cat confdefs.h >>conftest.$ac_ext
19439cat >>conftest.$ac_ext <<_ACEOF
19440/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019441/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19442 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19443#define $ac_func innocuous_$ac_func
19444
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019445/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019446 which can conflict with char $ac_func (); below.
19447 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019448 <limits.h> exists even on freestanding compilers. */
19449
19450#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019451# include <limits.h>
19452#else
19453# include <assert.h>
19454#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019455
19456#undef $ac_func
19457
Martin v. Löwiseba40652007-08-30 20:10:57 +000019458/* Override any GCC internal prototype to avoid an error.
19459 Use char because int might match the return type of a GCC
19460 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019461#ifdef __cplusplus
19462extern "C"
19463#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019464char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019465/* The GNU C library defines this for functions which it implements
19466 to always fail with ENOSYS. Some functions are actually named
19467 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019468#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019469choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019470#endif
19471
Skip Montanaro6dead952003-09-25 14:50:04 +000019472int
19473main ()
19474{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019475return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019476 ;
19477 return 0;
19478}
19479_ACEOF
19480rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019481if { (ac_try="$ac_link"
19482case "(($ac_try" in
19483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19484 *) ac_try_echo=$ac_try;;
19485esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019486eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19487$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019488 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019489 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019490 grep -v '^ *+' conftest.er1 >conftest.err
19491 rm -f conftest.er1
19492 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000019493 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019494 (exit $ac_status); } && {
19495 test -z "$ac_c_werror_flag" ||
19496 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000019497 } && test -s conftest$ac_exeext && {
19498 test "$cross_compiling" = yes ||
19499 $as_test_x conftest$ac_exeext
19500 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019501 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019502else
Benjamin Peterson697cd212010-05-02 16:45:11 +000019503 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019504sed 's/^/| /' conftest.$ac_ext >&5
19505
Martin v. Löwiseba40652007-08-30 20:10:57 +000019506 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019507fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019508
Benjamin Peterson697cd212010-05-02 16:45:11 +000019509rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000019510rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019511 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019512fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000019513ac_res=`eval 'as_val=${'$as_ac_var'}
19514 $as_echo "$as_val"'`
19515 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19516$as_echo "$ac_res" >&6; }
19517as_val=`eval 'as_val=${'$as_ac_var'}
19518 $as_echo "$as_val"'`
19519 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019520 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000019521#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019522_ACEOF
19523 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019524/* confdefs.h. */
19525_ACEOF
19526cat confdefs.h >>conftest.$ac_ext
19527cat >>conftest.$ac_ext <<_ACEOF
19528/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000019529#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019530int
19531main ()
19532{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019533gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000019534 ;
19535 return 0;
19536}
19537_ACEOF
19538rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019539if { (ac_try="$ac_compile"
19540case "(($ac_try" in
19541 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19542 *) ac_try_echo=$ac_try;;
19543esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019544eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19545$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019546 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019547 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019548 grep -v '^ *+' conftest.er1 >conftest.err
19549 rm -f conftest.er1
19550 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000019551 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019552 (exit $ac_status); } && {
19553 test -z "$ac_c_werror_flag" ||
19554 test ! -s conftest.err
19555 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000019556 :
19557else
Benjamin Peterson697cd212010-05-02 16:45:11 +000019558 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019559sed 's/^/| /' conftest.$ac_ext >&5
19560
Martin v. Löwis11437992002-04-12 09:54:03 +000019561
19562cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019563#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019564_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000019565
Martin v. Löwis11437992002-04-12 09:54:03 +000019566
Guido van Rossum627b2d71993-12-24 10:39:16 +000019567fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019568
19569rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000019570
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019571fi
Thomas Wouters3a584202000-08-05 23:28:51 +000019572done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019573
Michael W. Hudson54241132001-12-07 15:38:26 +000019574
Benjamin Peterson697cd212010-05-02 16:45:11 +000019575{ $as_echo "$as_me:$LINENO: checking for major" >&5
19576$as_echo_n "checking for major... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019577cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019578/* confdefs.h. */
19579_ACEOF
19580cat confdefs.h >>conftest.$ac_ext
19581cat >>conftest.$ac_ext <<_ACEOF
19582/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019583
Neal Norwitz6eb37f02003-02-23 23:28:15 +000019584#if defined(MAJOR_IN_MKDEV)
19585#include <sys/mkdev.h>
19586#elif defined(MAJOR_IN_SYSMACROS)
19587#include <sys/sysmacros.h>
19588#else
19589#include <sys/types.h>
19590#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019591
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019592int
19593main ()
19594{
19595
19596 makedev(major(0),minor(0));
19597
19598 ;
19599 return 0;
19600}
19601_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000019602rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019603if { (ac_try="$ac_link"
19604case "(($ac_try" in
19605 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19606 *) ac_try_echo=$ac_try;;
19607esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019608eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19609$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019610 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019611 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019612 grep -v '^ *+' conftest.er1 >conftest.err
19613 rm -f conftest.er1
19614 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000019615 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019616 (exit $ac_status); } && {
19617 test -z "$ac_c_werror_flag" ||
19618 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000019619 } && test -s conftest$ac_exeext && {
19620 test "$cross_compiling" = yes ||
19621 $as_test_x conftest$ac_exeext
19622 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019623
19624
19625cat >>confdefs.h <<\_ACEOF
19626#define HAVE_DEVICE_MACROS 1
19627_ACEOF
19628
Benjamin Peterson697cd212010-05-02 16:45:11 +000019629 { $as_echo "$as_me:$LINENO: result: yes" >&5
19630$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019631
19632else
Benjamin Peterson697cd212010-05-02 16:45:11 +000019633 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019634sed 's/^/| /' conftest.$ac_ext >&5
19635
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019636
Benjamin Peterson697cd212010-05-02 16:45:11 +000019637 { $as_echo "$as_me:$LINENO: result: no" >&5
19638$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000019639
19640fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019641
Benjamin Peterson697cd212010-05-02 16:45:11 +000019642rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000019643rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019644 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019645
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019646# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000019647# for [no]getaddrinfo in netdb.h.
Benjamin Peterson697cd212010-05-02 16:45:11 +000019648{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
19649$as_echo_n "checking for getaddrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019650cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019651/* confdefs.h. */
19652_ACEOF
19653cat confdefs.h >>conftest.$ac_ext
19654cat >>conftest.$ac_ext <<_ACEOF
19655/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019656
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019657#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019658#include <sys/socket.h>
19659#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000019660#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019661
Martin v. Löwis11437992002-04-12 09:54:03 +000019662int
19663main ()
19664{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019665
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019666getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019667
Martin v. Löwis11437992002-04-12 09:54:03 +000019668 ;
19669 return 0;
19670}
19671_ACEOF
19672rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019673if { (ac_try="$ac_link"
19674case "(($ac_try" in
19675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19676 *) ac_try_echo=$ac_try;;
19677esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019678eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19679$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019680 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019681 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019682 grep -v '^ *+' conftest.er1 >conftest.err
19683 rm -f conftest.er1
19684 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000019685 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019686 (exit $ac_status); } && {
19687 test -z "$ac_c_werror_flag" ||
19688 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000019689 } && test -s conftest$ac_exeext && {
19690 test "$cross_compiling" = yes ||
19691 $as_test_x conftest$ac_exeext
19692 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019693
Benjamin Peterson697cd212010-05-02 16:45:11 +000019694{ $as_echo "$as_me:$LINENO: result: yes" >&5
19695$as_echo "yes" >&6; }
19696{ $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
19697$as_echo_n "checking getaddrinfo bug... " >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019698if test "$cross_compiling" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000019699 { $as_echo "$as_me:$LINENO: result: buggy" >&5
19700$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019701buggygetaddrinfo=yes
19702else
Martin v. Löwis11437992002-04-12 09:54:03 +000019703 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019704/* confdefs.h. */
19705_ACEOF
19706cat confdefs.h >>conftest.$ac_ext
19707cat >>conftest.$ac_ext <<_ACEOF
19708/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019709
19710#include <sys/types.h>
19711#include <netdb.h>
19712#include <string.h>
19713#include <sys/socket.h>
19714#include <netinet/in.h>
19715
19716main()
19717{
19718 int passive, gaierr, inet4 = 0, inet6 = 0;
19719 struct addrinfo hints, *ai, *aitop;
19720 char straddr[INET6_ADDRSTRLEN], strport[16];
19721
19722 for (passive = 0; passive <= 1; passive++) {
19723 memset(&hints, 0, sizeof(hints));
19724 hints.ai_family = AF_UNSPEC;
19725 hints.ai_flags = passive ? AI_PASSIVE : 0;
19726 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000019727 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019728 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
19729 (void)gai_strerror(gaierr);
19730 goto bad;
19731 }
19732 for (ai = aitop; ai; ai = ai->ai_next) {
19733 if (ai->ai_addr == NULL ||
19734 ai->ai_addrlen == 0 ||
19735 getnameinfo(ai->ai_addr, ai->ai_addrlen,
19736 straddr, sizeof(straddr), strport, sizeof(strport),
19737 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
19738 goto bad;
19739 }
19740 switch (ai->ai_family) {
19741 case AF_INET:
19742 if (strcmp(strport, "54321") != 0) {
19743 goto bad;
19744 }
19745 if (passive) {
19746 if (strcmp(straddr, "0.0.0.0") != 0) {
19747 goto bad;
19748 }
19749 } else {
19750 if (strcmp(straddr, "127.0.0.1") != 0) {
19751 goto bad;
19752 }
19753 }
19754 inet4++;
19755 break;
19756 case AF_INET6:
19757 if (strcmp(strport, "54321") != 0) {
19758 goto bad;
19759 }
19760 if (passive) {
19761 if (strcmp(straddr, "::") != 0) {
19762 goto bad;
19763 }
19764 } else {
19765 if (strcmp(straddr, "::1") != 0) {
19766 goto bad;
19767 }
19768 }
19769 inet6++;
19770 break;
19771 case AF_UNSPEC:
19772 goto bad;
19773 break;
19774 default:
19775 /* another family support? */
19776 break;
19777 }
19778 }
19779 }
19780
19781 if (!(inet4 == 0 || inet4 == 2))
19782 goto bad;
19783 if (!(inet6 == 0 || inet6 == 2))
19784 goto bad;
19785
19786 if (aitop)
19787 freeaddrinfo(aitop);
19788 exit(0);
19789
19790 bad:
19791 if (aitop)
19792 freeaddrinfo(aitop);
19793 exit(1);
19794}
19795
Martin v. Löwis11437992002-04-12 09:54:03 +000019796_ACEOF
19797rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019798if { (ac_try="$ac_link"
19799case "(($ac_try" in
19800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19801 *) ac_try_echo=$ac_try;;
19802esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019803eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19804$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019805 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019806 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000019807 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019808 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000019809 { (case "(($ac_try" in
19810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19811 *) ac_try_echo=$ac_try;;
19812esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019813eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19814$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019815 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019816 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000019817 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000019818 (exit $ac_status); }; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000019819 { $as_echo "$as_me:$LINENO: result: good" >&5
19820$as_echo "good" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019821buggygetaddrinfo=no
19822else
Benjamin Peterson697cd212010-05-02 16:45:11 +000019823 $as_echo "$as_me: program exited with status $ac_status" >&5
19824$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019825sed 's/^/| /' conftest.$ac_ext >&5
19826
Martin v. Löwis11437992002-04-12 09:54:03 +000019827( exit $ac_status )
Benjamin Peterson697cd212010-05-02 16:45:11 +000019828{ $as_echo "$as_me:$LINENO: result: buggy" >&5
19829$as_echo "buggy" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019830buggygetaddrinfo=yes
19831fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000019832rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000019833rm -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 +000019834fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019835
19836
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019837else
Benjamin Peterson697cd212010-05-02 16:45:11 +000019838 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019839sed 's/^/| /' conftest.$ac_ext >&5
19840
Martin v. Löwis11437992002-04-12 09:54:03 +000019841
Benjamin Peterson697cd212010-05-02 16:45:11 +000019842{ $as_echo "$as_me:$LINENO: result: no" >&5
19843$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019844buggygetaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019845
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019846fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019847
Benjamin Peterson697cd212010-05-02 16:45:11 +000019848rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000019849rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019850 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019851
19852if test "$buggygetaddrinfo" = "yes"; then
19853 if test "$ipv6" = "yes"; then
19854 echo 'Fatal: You must get working getaddrinfo() function.'
19855 echo ' or you can specify "--disable-ipv6"'.
19856 exit 1
19857 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019858else
Martin v. Löwis11437992002-04-12 09:54:03 +000019859
19860cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019861#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019862_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000019863
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019864fi
Martin v. Löwis11437992002-04-12 09:54:03 +000019865
Jack Jansen9a66b6d2001-08-08 13:56:14 +000019866for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019867do
Benjamin Peterson697cd212010-05-02 16:45:11 +000019868as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19869{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19870$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000019871if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000019872 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019873else
Martin v. Löwis11437992002-04-12 09:54:03 +000019874 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019875/* confdefs.h. */
19876_ACEOF
19877cat confdefs.h >>conftest.$ac_ext
19878cat >>conftest.$ac_ext <<_ACEOF
19879/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019880/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19881 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19882#define $ac_func innocuous_$ac_func
19883
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019884/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019885 which can conflict with char $ac_func (); below.
19886 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019887 <limits.h> exists even on freestanding compilers. */
19888
19889#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019890# include <limits.h>
19891#else
19892# include <assert.h>
19893#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019894
19895#undef $ac_func
19896
Martin v. Löwiseba40652007-08-30 20:10:57 +000019897/* Override any GCC internal prototype to avoid an error.
19898 Use char because int might match the return type of a GCC
19899 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019900#ifdef __cplusplus
19901extern "C"
19902#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019903char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019904/* The GNU C library defines this for functions which it implements
19905 to always fail with ENOSYS. Some functions are actually named
19906 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000019907#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019908choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019909#endif
19910
Skip Montanaro6dead952003-09-25 14:50:04 +000019911int
19912main ()
19913{
Martin v. Löwiseba40652007-08-30 20:10:57 +000019914return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019915 ;
19916 return 0;
19917}
19918_ACEOF
19919rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019920if { (ac_try="$ac_link"
19921case "(($ac_try" in
19922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19923 *) ac_try_echo=$ac_try;;
19924esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019925eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19926$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019927 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019929 grep -v '^ *+' conftest.er1 >conftest.err
19930 rm -f conftest.er1
19931 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000019932 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000019933 (exit $ac_status); } && {
19934 test -z "$ac_c_werror_flag" ||
19935 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000019936 } && test -s conftest$ac_exeext && {
19937 test "$cross_compiling" = yes ||
19938 $as_test_x conftest$ac_exeext
19939 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019940 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019941else
Benjamin Peterson697cd212010-05-02 16:45:11 +000019942 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019943sed 's/^/| /' conftest.$ac_ext >&5
19944
Martin v. Löwiseba40652007-08-30 20:10:57 +000019945 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019946fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000019947
Benjamin Peterson697cd212010-05-02 16:45:11 +000019948rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000019949rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019950 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019951fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000019952ac_res=`eval 'as_val=${'$as_ac_var'}
19953 $as_echo "$as_val"'`
19954 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19955$as_echo "$ac_res" >&6; }
19956as_val=`eval 'as_val=${'$as_ac_var'}
19957 $as_echo "$as_val"'`
19958 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019959 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000019960#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019961_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019962
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000019963fi
19964done
19965
Michael W. Hudson54241132001-12-07 15:38:26 +000019966
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019967# checks for structures
Benjamin Peterson697cd212010-05-02 16:45:11 +000019968{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
19969$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 +000019970if test "${ac_cv_header_time+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000019971 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019972else
Martin v. Löwis11437992002-04-12 09:54:03 +000019973 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019974/* confdefs.h. */
19975_ACEOF
19976cat confdefs.h >>conftest.$ac_ext
19977cat >>conftest.$ac_ext <<_ACEOF
19978/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019979#include <sys/types.h>
19980#include <sys/time.h>
19981#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000019982
Martin v. Löwis11437992002-04-12 09:54:03 +000019983int
19984main ()
19985{
19986if ((struct tm *) 0)
19987return 0;
19988 ;
19989 return 0;
19990}
19991_ACEOF
19992rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000019993if { (ac_try="$ac_compile"
19994case "(($ac_try" in
19995 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19996 *) ac_try_echo=$ac_try;;
19997esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000019998eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19999$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020000 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020001 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020002 grep -v '^ *+' conftest.er1 >conftest.err
20003 rm -f conftest.er1
20004 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020005 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020006 (exit $ac_status); } && {
20007 test -z "$ac_c_werror_flag" ||
20008 test ! -s conftest.err
20009 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020010 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020011else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020012 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020013sed 's/^/| /' conftest.$ac_ext >&5
20014
Martin v. Löwiseba40652007-08-30 20:10:57 +000020015 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020016fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020017
20018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020019fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000020020{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20021$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020022if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020023
20024cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020025#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020026_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020027
20028fi
20029
Benjamin Peterson697cd212010-05-02 16:45:11 +000020030{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20031$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 +000020032if test "${ac_cv_struct_tm+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000020033 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020034else
Martin v. Löwis11437992002-04-12 09:54:03 +000020035 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020036/* confdefs.h. */
20037_ACEOF
20038cat confdefs.h >>conftest.$ac_ext
20039cat >>conftest.$ac_ext <<_ACEOF
20040/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020041#include <sys/types.h>
20042#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020043
Martin v. Löwis11437992002-04-12 09:54:03 +000020044int
20045main ()
20046{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020047struct tm tm;
20048 int *p = &tm.tm_sec;
Benjamin Peterson697cd212010-05-02 16:45:11 +000020049 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020050 ;
20051 return 0;
20052}
20053_ACEOF
20054rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020055if { (ac_try="$ac_compile"
20056case "(($ac_try" in
20057 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20058 *) ac_try_echo=$ac_try;;
20059esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020060eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20061$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020062 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020063 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020064 grep -v '^ *+' conftest.er1 >conftest.err
20065 rm -f conftest.er1
20066 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020067 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020068 (exit $ac_status); } && {
20069 test -z "$ac_c_werror_flag" ||
20070 test ! -s conftest.err
20071 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020072 ac_cv_struct_tm=time.h
20073else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020074 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020075sed 's/^/| /' conftest.$ac_ext >&5
20076
Martin v. Löwiseba40652007-08-30 20:10:57 +000020077 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020078fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020079
20080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020081fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000020082{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20083$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020084if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020085
20086cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020087#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020088_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020089
20090fi
20091
Benjamin Peterson697cd212010-05-02 16:45:11 +000020092{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20093$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020094if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000020095 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020096else
Martin v. Löwis11437992002-04-12 09:54:03 +000020097 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020098/* confdefs.h. */
20099_ACEOF
20100cat confdefs.h >>conftest.$ac_ext
20101cat >>conftest.$ac_ext <<_ACEOF
20102/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020103#include <sys/types.h>
20104#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020105
20106
Martin v. Löwis11437992002-04-12 09:54:03 +000020107int
20108main ()
20109{
20110static struct tm ac_aggr;
20111if (ac_aggr.tm_zone)
20112return 0;
20113 ;
20114 return 0;
20115}
20116_ACEOF
20117rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020118if { (ac_try="$ac_compile"
20119case "(($ac_try" in
20120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20121 *) ac_try_echo=$ac_try;;
20122esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020123eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20124$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020125 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020126 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020127 grep -v '^ *+' conftest.er1 >conftest.err
20128 rm -f conftest.er1
20129 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020130 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020131 (exit $ac_status); } && {
20132 test -z "$ac_c_werror_flag" ||
20133 test ! -s conftest.err
20134 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020135 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020136else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020137 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020138sed 's/^/| /' conftest.$ac_ext >&5
20139
Martin v. Löwiseba40652007-08-30 20:10:57 +000020140 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020141/* confdefs.h. */
20142_ACEOF
20143cat confdefs.h >>conftest.$ac_ext
20144cat >>conftest.$ac_ext <<_ACEOF
20145/* end confdefs.h. */
20146#include <sys/types.h>
20147#include <$ac_cv_struct_tm>
20148
20149
20150int
20151main ()
20152{
20153static struct tm ac_aggr;
20154if (sizeof ac_aggr.tm_zone)
20155return 0;
20156 ;
20157 return 0;
20158}
20159_ACEOF
20160rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020161if { (ac_try="$ac_compile"
20162case "(($ac_try" in
20163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20164 *) ac_try_echo=$ac_try;;
20165esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020166eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20167$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020168 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020169 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020170 grep -v '^ *+' conftest.er1 >conftest.err
20171 rm -f conftest.er1
20172 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020173 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020174 (exit $ac_status); } && {
20175 test -z "$ac_c_werror_flag" ||
20176 test ! -s conftest.err
20177 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020178 ac_cv_member_struct_tm_tm_zone=yes
20179else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020180 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020181sed 's/^/| /' conftest.$ac_ext >&5
20182
Martin v. Löwiseba40652007-08-30 20:10:57 +000020183 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020184fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020185
20186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020187fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020188
20189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020190fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000020191{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
20192$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
20193if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020194
20195cat >>confdefs.h <<_ACEOF
20196#define HAVE_STRUCT_TM_TM_ZONE 1
20197_ACEOF
20198
20199
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020200fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000020201
Martin v. Löwis11437992002-04-12 09:54:03 +000020202if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
20203
20204cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020205#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020206_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020207
20208else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020209 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
20210$as_echo_n "checking whether tzname is declared... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000020211if test "${ac_cv_have_decl_tzname+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000020212 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000020213else
20214 cat >conftest.$ac_ext <<_ACEOF
20215/* confdefs.h. */
20216_ACEOF
20217cat confdefs.h >>conftest.$ac_ext
20218cat >>conftest.$ac_ext <<_ACEOF
20219/* end confdefs.h. */
20220#include <time.h>
20221
20222int
20223main ()
20224{
20225#ifndef tzname
20226 (void) tzname;
20227#endif
20228
20229 ;
20230 return 0;
20231}
20232_ACEOF
20233rm -f conftest.$ac_objext
20234if { (ac_try="$ac_compile"
20235case "(($ac_try" in
20236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20237 *) ac_try_echo=$ac_try;;
20238esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020239eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20240$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020241 (eval "$ac_compile") 2>conftest.er1
20242 ac_status=$?
20243 grep -v '^ *+' conftest.er1 >conftest.err
20244 rm -f conftest.er1
20245 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020246 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020247 (exit $ac_status); } && {
20248 test -z "$ac_c_werror_flag" ||
20249 test ! -s conftest.err
20250 } && test -s conftest.$ac_objext; then
20251 ac_cv_have_decl_tzname=yes
20252else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020253 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020254sed 's/^/| /' conftest.$ac_ext >&5
20255
20256 ac_cv_have_decl_tzname=no
20257fi
20258
20259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20260fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000020261{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
20262$as_echo "$ac_cv_have_decl_tzname" >&6; }
20263if test "x$ac_cv_have_decl_tzname" = x""yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000020264
20265cat >>confdefs.h <<_ACEOF
20266#define HAVE_DECL_TZNAME 1
20267_ACEOF
20268
20269
20270else
20271 cat >>confdefs.h <<_ACEOF
20272#define HAVE_DECL_TZNAME 0
20273_ACEOF
20274
20275
20276fi
20277
20278
Benjamin Peterson697cd212010-05-02 16:45:11 +000020279 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
20280$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020281if test "${ac_cv_var_tzname+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000020282 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020283else
Martin v. Löwis11437992002-04-12 09:54:03 +000020284 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020285/* confdefs.h. */
20286_ACEOF
20287cat confdefs.h >>conftest.$ac_ext
20288cat >>conftest.$ac_ext <<_ACEOF
20289/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020290#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000020291#if !HAVE_DECL_TZNAME
20292extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000020293#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020294
Martin v. Löwis11437992002-04-12 09:54:03 +000020295int
20296main ()
20297{
Martin v. Löwiseba40652007-08-30 20:10:57 +000020298return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000020299 ;
20300 return 0;
20301}
20302_ACEOF
20303rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020304if { (ac_try="$ac_link"
20305case "(($ac_try" in
20306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20307 *) ac_try_echo=$ac_try;;
20308esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020309eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20310$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020311 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020312 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020313 grep -v '^ *+' conftest.er1 >conftest.err
20314 rm -f conftest.er1
20315 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020316 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020317 (exit $ac_status); } && {
20318 test -z "$ac_c_werror_flag" ||
20319 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000020320 } && test -s conftest$ac_exeext && {
20321 test "$cross_compiling" = yes ||
20322 $as_test_x conftest$ac_exeext
20323 }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020324 ac_cv_var_tzname=yes
20325else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020326 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020327sed 's/^/| /' conftest.$ac_ext >&5
20328
Martin v. Löwiseba40652007-08-30 20:10:57 +000020329 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020330fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020331
Benjamin Peterson697cd212010-05-02 16:45:11 +000020332rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000020333rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020334 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000020335fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000020336{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
20337$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020338 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020339
20340cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020341#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020342_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020343
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020344 fi
20345fi
20346
Benjamin Peterson697cd212010-05-02 16:45:11 +000020347{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
20348$as_echo_n "checking for struct stat.st_rdev... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020349if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000020350 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000020351else
20352 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020353/* confdefs.h. */
20354_ACEOF
20355cat confdefs.h >>conftest.$ac_ext
20356cat >>conftest.$ac_ext <<_ACEOF
20357/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020358$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020359int
20360main ()
20361{
20362static struct stat ac_aggr;
20363if (ac_aggr.st_rdev)
20364return 0;
20365 ;
20366 return 0;
20367}
20368_ACEOF
20369rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020370if { (ac_try="$ac_compile"
20371case "(($ac_try" in
20372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20373 *) ac_try_echo=$ac_try;;
20374esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020375eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20376$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020377 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020378 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020379 grep -v '^ *+' conftest.er1 >conftest.err
20380 rm -f conftest.er1
20381 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020382 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020383 (exit $ac_status); } && {
20384 test -z "$ac_c_werror_flag" ||
20385 test ! -s conftest.err
20386 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020387 ac_cv_member_struct_stat_st_rdev=yes
20388else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020389 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020390sed 's/^/| /' conftest.$ac_ext >&5
20391
Martin v. Löwiseba40652007-08-30 20:10:57 +000020392 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020393/* confdefs.h. */
20394_ACEOF
20395cat confdefs.h >>conftest.$ac_ext
20396cat >>conftest.$ac_ext <<_ACEOF
20397/* end confdefs.h. */
20398$ac_includes_default
20399int
20400main ()
20401{
20402static struct stat ac_aggr;
20403if (sizeof ac_aggr.st_rdev)
20404return 0;
20405 ;
20406 return 0;
20407}
20408_ACEOF
20409rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020410if { (ac_try="$ac_compile"
20411case "(($ac_try" in
20412 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20413 *) ac_try_echo=$ac_try;;
20414esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020415eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20416$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020417 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020418 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020419 grep -v '^ *+' conftest.er1 >conftest.err
20420 rm -f conftest.er1
20421 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020422 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020423 (exit $ac_status); } && {
20424 test -z "$ac_c_werror_flag" ||
20425 test ! -s conftest.err
20426 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020427 ac_cv_member_struct_stat_st_rdev=yes
20428else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020429 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020430sed 's/^/| /' conftest.$ac_ext >&5
20431
Martin v. Löwiseba40652007-08-30 20:10:57 +000020432 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000020433fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020434
20435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000020436fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020437
20438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020439fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000020440{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
20441$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; }
20442if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020443
20444cat >>confdefs.h <<_ACEOF
20445#define HAVE_STRUCT_STAT_ST_RDEV 1
20446_ACEOF
20447
20448
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020449fi
20450
Benjamin Peterson697cd212010-05-02 16:45:11 +000020451{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
20452$as_echo_n "checking for struct stat.st_blksize... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020453if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000020454 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020455else
Martin v. Löwis11437992002-04-12 09:54:03 +000020456 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020457/* confdefs.h. */
20458_ACEOF
20459cat confdefs.h >>conftest.$ac_ext
20460cat >>conftest.$ac_ext <<_ACEOF
20461/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020462$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020463int
20464main ()
20465{
20466static struct stat ac_aggr;
20467if (ac_aggr.st_blksize)
20468return 0;
20469 ;
20470 return 0;
20471}
20472_ACEOF
20473rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020474if { (ac_try="$ac_compile"
20475case "(($ac_try" in
20476 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20477 *) ac_try_echo=$ac_try;;
20478esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020479eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20480$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020481 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020482 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020483 grep -v '^ *+' conftest.er1 >conftest.err
20484 rm -f conftest.er1
20485 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020486 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020487 (exit $ac_status); } && {
20488 test -z "$ac_c_werror_flag" ||
20489 test ! -s conftest.err
20490 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020491 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020492else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020493 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020494sed 's/^/| /' conftest.$ac_ext >&5
20495
Martin v. Löwiseba40652007-08-30 20:10:57 +000020496 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020497/* confdefs.h. */
20498_ACEOF
20499cat confdefs.h >>conftest.$ac_ext
20500cat >>conftest.$ac_ext <<_ACEOF
20501/* end confdefs.h. */
20502$ac_includes_default
20503int
20504main ()
20505{
20506static struct stat ac_aggr;
20507if (sizeof ac_aggr.st_blksize)
20508return 0;
20509 ;
20510 return 0;
20511}
20512_ACEOF
20513rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020514if { (ac_try="$ac_compile"
20515case "(($ac_try" in
20516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20517 *) ac_try_echo=$ac_try;;
20518esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020519eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20520$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020521 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020523 grep -v '^ *+' conftest.er1 >conftest.err
20524 rm -f conftest.er1
20525 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020526 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020527 (exit $ac_status); } && {
20528 test -z "$ac_c_werror_flag" ||
20529 test ! -s conftest.err
20530 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020531 ac_cv_member_struct_stat_st_blksize=yes
20532else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020533 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020534sed 's/^/| /' conftest.$ac_ext >&5
20535
Martin v. Löwiseba40652007-08-30 20:10:57 +000020536 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020537fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020538
20539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020540fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020541
20542rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020543fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000020544{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
20545$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; }
20546if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020547
Martin v. Löwis11437992002-04-12 09:54:03 +000020548cat >>confdefs.h <<_ACEOF
20549#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
20550_ACEOF
20551
20552
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020553fi
20554
Benjamin Peterson697cd212010-05-02 16:45:11 +000020555{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
20556$as_echo_n "checking for struct stat.st_flags... " >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020557if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000020558 $as_echo_n "(cached) " >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020559else
20560 cat >conftest.$ac_ext <<_ACEOF
20561/* confdefs.h. */
20562_ACEOF
20563cat confdefs.h >>conftest.$ac_ext
20564cat >>conftest.$ac_ext <<_ACEOF
20565/* end confdefs.h. */
20566$ac_includes_default
20567int
20568main ()
20569{
20570static struct stat ac_aggr;
20571if (ac_aggr.st_flags)
20572return 0;
20573 ;
20574 return 0;
20575}
20576_ACEOF
20577rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020578if { (ac_try="$ac_compile"
20579case "(($ac_try" in
20580 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20581 *) ac_try_echo=$ac_try;;
20582esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020583eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20584$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020585 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020586 ac_status=$?
20587 grep -v '^ *+' conftest.er1 >conftest.err
20588 rm -f conftest.er1
20589 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020590 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020591 (exit $ac_status); } && {
20592 test -z "$ac_c_werror_flag" ||
20593 test ! -s conftest.err
20594 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020595 ac_cv_member_struct_stat_st_flags=yes
20596else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020597 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020598sed 's/^/| /' conftest.$ac_ext >&5
20599
Martin v. Löwiseba40652007-08-30 20:10:57 +000020600 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020601/* confdefs.h. */
20602_ACEOF
20603cat confdefs.h >>conftest.$ac_ext
20604cat >>conftest.$ac_ext <<_ACEOF
20605/* end confdefs.h. */
20606$ac_includes_default
20607int
20608main ()
20609{
20610static struct stat ac_aggr;
20611if (sizeof ac_aggr.st_flags)
20612return 0;
20613 ;
20614 return 0;
20615}
20616_ACEOF
20617rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020618if { (ac_try="$ac_compile"
20619case "(($ac_try" in
20620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20621 *) ac_try_echo=$ac_try;;
20622esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020623eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20624$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020625 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020626 ac_status=$?
20627 grep -v '^ *+' conftest.er1 >conftest.err
20628 rm -f conftest.er1
20629 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020630 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020631 (exit $ac_status); } && {
20632 test -z "$ac_c_werror_flag" ||
20633 test ! -s conftest.err
20634 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020635 ac_cv_member_struct_stat_st_flags=yes
20636else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020637 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020638sed 's/^/| /' conftest.$ac_ext >&5
20639
Martin v. Löwiseba40652007-08-30 20:10:57 +000020640 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020641fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020642
20643rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020644fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020645
20646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020647fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000020648{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
20649$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; }
20650if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000020651
20652cat >>confdefs.h <<_ACEOF
20653#define HAVE_STRUCT_STAT_ST_FLAGS 1
20654_ACEOF
20655
20656
20657fi
20658
Benjamin Peterson697cd212010-05-02 16:45:11 +000020659{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
20660$as_echo_n "checking for struct stat.st_gen... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020661if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000020662 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020663else
20664 cat >conftest.$ac_ext <<_ACEOF
20665/* confdefs.h. */
20666_ACEOF
20667cat confdefs.h >>conftest.$ac_ext
20668cat >>conftest.$ac_ext <<_ACEOF
20669/* end confdefs.h. */
20670$ac_includes_default
20671int
20672main ()
20673{
20674static struct stat ac_aggr;
20675if (ac_aggr.st_gen)
20676return 0;
20677 ;
20678 return 0;
20679}
20680_ACEOF
20681rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020682if { (ac_try="$ac_compile"
20683case "(($ac_try" in
20684 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20685 *) ac_try_echo=$ac_try;;
20686esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020687eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20688$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020689 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020690 ac_status=$?
20691 grep -v '^ *+' conftest.er1 >conftest.err
20692 rm -f conftest.er1
20693 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020694 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020695 (exit $ac_status); } && {
20696 test -z "$ac_c_werror_flag" ||
20697 test ! -s conftest.err
20698 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020699 ac_cv_member_struct_stat_st_gen=yes
20700else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020701 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020702sed 's/^/| /' conftest.$ac_ext >&5
20703
Martin v. Löwiseba40652007-08-30 20:10:57 +000020704 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020705/* confdefs.h. */
20706_ACEOF
20707cat confdefs.h >>conftest.$ac_ext
20708cat >>conftest.$ac_ext <<_ACEOF
20709/* end confdefs.h. */
20710$ac_includes_default
20711int
20712main ()
20713{
20714static struct stat ac_aggr;
20715if (sizeof ac_aggr.st_gen)
20716return 0;
20717 ;
20718 return 0;
20719}
20720_ACEOF
20721rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020722if { (ac_try="$ac_compile"
20723case "(($ac_try" in
20724 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20725 *) ac_try_echo=$ac_try;;
20726esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020727eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20728$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020729 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020730 ac_status=$?
20731 grep -v '^ *+' conftest.er1 >conftest.err
20732 rm -f conftest.er1
20733 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020734 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020735 (exit $ac_status); } && {
20736 test -z "$ac_c_werror_flag" ||
20737 test ! -s conftest.err
20738 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020739 ac_cv_member_struct_stat_st_gen=yes
20740else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020741 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020742sed 's/^/| /' conftest.$ac_ext >&5
20743
Martin v. Löwiseba40652007-08-30 20:10:57 +000020744 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020745fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020746
20747rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020749
20750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020751fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000020752{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
20753$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; }
20754if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020755
20756cat >>confdefs.h <<_ACEOF
20757#define HAVE_STRUCT_STAT_ST_GEN 1
20758_ACEOF
20759
20760
20761fi
20762
Benjamin Peterson697cd212010-05-02 16:45:11 +000020763{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
20764$as_echo_n "checking for struct stat.st_birthtime... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020765if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000020766 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020767else
20768 cat >conftest.$ac_ext <<_ACEOF
20769/* confdefs.h. */
20770_ACEOF
20771cat confdefs.h >>conftest.$ac_ext
20772cat >>conftest.$ac_ext <<_ACEOF
20773/* end confdefs.h. */
20774$ac_includes_default
20775int
20776main ()
20777{
20778static struct stat ac_aggr;
20779if (ac_aggr.st_birthtime)
20780return 0;
20781 ;
20782 return 0;
20783}
20784_ACEOF
20785rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020786if { (ac_try="$ac_compile"
20787case "(($ac_try" in
20788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20789 *) ac_try_echo=$ac_try;;
20790esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020791eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20792$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020793 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020794 ac_status=$?
20795 grep -v '^ *+' conftest.er1 >conftest.err
20796 rm -f conftest.er1
20797 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020798 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020799 (exit $ac_status); } && {
20800 test -z "$ac_c_werror_flag" ||
20801 test ! -s conftest.err
20802 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020803 ac_cv_member_struct_stat_st_birthtime=yes
20804else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020805 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020806sed 's/^/| /' conftest.$ac_ext >&5
20807
Martin v. Löwiseba40652007-08-30 20:10:57 +000020808 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020809/* confdefs.h. */
20810_ACEOF
20811cat confdefs.h >>conftest.$ac_ext
20812cat >>conftest.$ac_ext <<_ACEOF
20813/* end confdefs.h. */
20814$ac_includes_default
20815int
20816main ()
20817{
20818static struct stat ac_aggr;
20819if (sizeof ac_aggr.st_birthtime)
20820return 0;
20821 ;
20822 return 0;
20823}
20824_ACEOF
20825rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020826if { (ac_try="$ac_compile"
20827case "(($ac_try" in
20828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20829 *) ac_try_echo=$ac_try;;
20830esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020831eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20832$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020833 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020834 ac_status=$?
20835 grep -v '^ *+' conftest.er1 >conftest.err
20836 rm -f conftest.er1
20837 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020838 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020839 (exit $ac_status); } && {
20840 test -z "$ac_c_werror_flag" ||
20841 test ! -s conftest.err
20842 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020843 ac_cv_member_struct_stat_st_birthtime=yes
20844else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020845 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020846sed 's/^/| /' conftest.$ac_ext >&5
20847
Martin v. Löwiseba40652007-08-30 20:10:57 +000020848 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020849fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020850
20851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020852fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020853
20854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020855fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000020856{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
20857$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; }
20858if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000020859
20860cat >>confdefs.h <<_ACEOF
20861#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
20862_ACEOF
20863
20864
20865fi
20866
Benjamin Peterson697cd212010-05-02 16:45:11 +000020867{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
20868$as_echo_n "checking for struct stat.st_blocks... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020869if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000020870 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020871else
Martin v. Löwis11437992002-04-12 09:54:03 +000020872 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020873/* confdefs.h. */
20874_ACEOF
20875cat confdefs.h >>conftest.$ac_ext
20876cat >>conftest.$ac_ext <<_ACEOF
20877/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020878$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000020879int
20880main ()
20881{
20882static struct stat ac_aggr;
20883if (ac_aggr.st_blocks)
20884return 0;
20885 ;
20886 return 0;
20887}
20888_ACEOF
20889rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020890if { (ac_try="$ac_compile"
20891case "(($ac_try" in
20892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20893 *) ac_try_echo=$ac_try;;
20894esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020895eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20896$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020899 grep -v '^ *+' conftest.er1 >conftest.err
20900 rm -f conftest.er1
20901 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020902 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020903 (exit $ac_status); } && {
20904 test -z "$ac_c_werror_flag" ||
20905 test ! -s conftest.err
20906 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020907 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020908else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020909 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020910sed 's/^/| /' conftest.$ac_ext >&5
20911
Martin v. Löwiseba40652007-08-30 20:10:57 +000020912 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020913/* confdefs.h. */
20914_ACEOF
20915cat confdefs.h >>conftest.$ac_ext
20916cat >>conftest.$ac_ext <<_ACEOF
20917/* end confdefs.h. */
20918$ac_includes_default
20919int
20920main ()
20921{
20922static struct stat ac_aggr;
20923if (sizeof ac_aggr.st_blocks)
20924return 0;
20925 ;
20926 return 0;
20927}
20928_ACEOF
20929rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000020930if { (ac_try="$ac_compile"
20931case "(($ac_try" in
20932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20933 *) ac_try_echo=$ac_try;;
20934esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000020935eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20936$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020937 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020938 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020939 grep -v '^ *+' conftest.er1 >conftest.err
20940 rm -f conftest.er1
20941 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000020942 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000020943 (exit $ac_status); } && {
20944 test -z "$ac_c_werror_flag" ||
20945 test ! -s conftest.err
20946 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000020947 ac_cv_member_struct_stat_st_blocks=yes
20948else
Benjamin Peterson697cd212010-05-02 16:45:11 +000020949 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020950sed 's/^/| /' conftest.$ac_ext >&5
20951
Martin v. Löwiseba40652007-08-30 20:10:57 +000020952 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000020953fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020954
20955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020956fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000020957
20958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000020959fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000020960{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
20961$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; }
20962if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000020963
Martin v. Löwis11437992002-04-12 09:54:03 +000020964cat >>confdefs.h <<_ACEOF
20965#define HAVE_STRUCT_STAT_ST_BLOCKS 1
20966_ACEOF
20967
20968
20969cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020970#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020971_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020972
20973else
Martin v. Löwiseba40652007-08-30 20:10:57 +000020974 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000020975 *" fileblocks.$ac_objext "* ) ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000020976 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
20977 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000020978esac
20979
Guido van Rossum98bf58f2001-10-18 20:34:25 +000020980fi
20981
Michael W. Hudson54241132001-12-07 15:38:26 +000020982
Martin v. Löwis11437992002-04-12 09:54:03 +000020983
Benjamin Peterson697cd212010-05-02 16:45:11 +000020984{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
20985$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020986if test "${ac_cv_header_time_altzone+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000020987 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020988else
Martin v. Löwis11437992002-04-12 09:54:03 +000020989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020990/* confdefs.h. */
20991_ACEOF
20992cat confdefs.h >>conftest.$ac_ext
20993cat >>conftest.$ac_ext <<_ACEOF
20994/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000020995#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020996int
20997main ()
20998{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020999return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021000 ;
21001 return 0;
21002}
21003_ACEOF
21004rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021005if { (ac_try="$ac_compile"
21006case "(($ac_try" in
21007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21008 *) ac_try_echo=$ac_try;;
21009esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021010eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21011$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021012 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021013 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021014 grep -v '^ *+' conftest.er1 >conftest.err
21015 rm -f conftest.er1
21016 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021017 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021018 (exit $ac_status); } && {
21019 test -z "$ac_c_werror_flag" ||
21020 test ! -s conftest.err
21021 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021022 ac_cv_header_time_altzone=yes
21023else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021024 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021025sed 's/^/| /' conftest.$ac_ext >&5
21026
Martin v. Löwiseba40652007-08-30 20:10:57 +000021027 ac_cv_header_time_altzone=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021028fi
21029
Martin v. Löwiseba40652007-08-30 20:10:57 +000021030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21031fi
21032
Benjamin Peterson697cd212010-05-02 16:45:11 +000021033{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21034$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021035if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021036
21037cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021038#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021039_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021040
21041fi
21042
Guido van Rossumda88dad1995-01-26 00:46:29 +000021043was_it_defined=no
Benjamin Peterson697cd212010-05-02 16:45:11 +000021044{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21045$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 +000021046cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021047/* confdefs.h. */
21048_ACEOF
21049cat confdefs.h >>conftest.$ac_ext
21050cat >>conftest.$ac_ext <<_ACEOF
21051/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021052
21053#include <sys/types.h>
21054#include <sys/select.h>
21055#include <sys/time.h>
21056
Martin v. Löwis11437992002-04-12 09:54:03 +000021057int
21058main ()
21059{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021060;
Martin v. Löwis11437992002-04-12 09:54:03 +000021061 ;
21062 return 0;
21063}
21064_ACEOF
21065rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021066if { (ac_try="$ac_compile"
21067case "(($ac_try" in
21068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21069 *) ac_try_echo=$ac_try;;
21070esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021071eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21072$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021073 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021074 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021075 grep -v '^ *+' conftest.er1 >conftest.err
21076 rm -f conftest.er1
21077 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021078 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021079 (exit $ac_status); } && {
21080 test -z "$ac_c_werror_flag" ||
21081 test ! -s conftest.err
21082 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021083
21084
21085cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021086#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021087_ACEOF
21088
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021089 was_it_defined=yes
21090
Guido van Rossumf78abae1997-01-21 22:02:36 +000021091else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021092 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021093sed 's/^/| /' conftest.$ac_ext >&5
21094
Brett Cannon19fab762007-06-02 03:02:29 +000021095
Martin v. Löwiseba40652007-08-30 20:10:57 +000021096fi
21097
21098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000021099{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
21100$as_echo "$was_it_defined" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021101
Benjamin Peterson697cd212010-05-02 16:45:11 +000021102{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5
21103$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021104if test "${ac_cv_struct_addrinfo+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000021105 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021106else
Martin v. Löwis11437992002-04-12 09:54:03 +000021107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021108/* confdefs.h. */
21109_ACEOF
21110cat confdefs.h >>conftest.$ac_ext
21111cat >>conftest.$ac_ext <<_ACEOF
21112/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021113
21114# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021115int
21116main ()
21117{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021118struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021119 ;
21120 return 0;
21121}
21122_ACEOF
21123rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021124if { (ac_try="$ac_compile"
21125case "(($ac_try" in
21126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21127 *) ac_try_echo=$ac_try;;
21128esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021129eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21130$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021133 grep -v '^ *+' conftest.er1 >conftest.err
21134 rm -f conftest.er1
21135 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021136 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021137 (exit $ac_status); } && {
21138 test -z "$ac_c_werror_flag" ||
21139 test ! -s conftest.err
21140 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021141 ac_cv_struct_addrinfo=yes
21142else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021143 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021144sed 's/^/| /' conftest.$ac_ext >&5
21145
Martin v. Löwiseba40652007-08-30 20:10:57 +000021146 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021147fi
21148
Martin v. Löwiseba40652007-08-30 20:10:57 +000021149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21150fi
21151
Benjamin Peterson697cd212010-05-02 16:45:11 +000021152{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21153$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021154if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021155
21156cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021157#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021158_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021159
21160fi
21161
Benjamin Peterson697cd212010-05-02 16:45:11 +000021162{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21163$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021164if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000021165 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021166else
Martin v. Löwis11437992002-04-12 09:54:03 +000021167 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021168/* confdefs.h. */
21169_ACEOF
21170cat confdefs.h >>conftest.$ac_ext
21171cat >>conftest.$ac_ext <<_ACEOF
21172/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021173
21174# include <sys/types.h>
21175# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021176int
21177main ()
21178{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021179struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000021180 ;
21181 return 0;
21182}
21183_ACEOF
21184rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021185if { (ac_try="$ac_compile"
21186case "(($ac_try" in
21187 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21188 *) ac_try_echo=$ac_try;;
21189esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021190eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21191$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021192 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021193 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021194 grep -v '^ *+' conftest.er1 >conftest.err
21195 rm -f conftest.er1
21196 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021197 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021198 (exit $ac_status); } && {
21199 test -z "$ac_c_werror_flag" ||
21200 test ! -s conftest.err
21201 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021202 ac_cv_struct_sockaddr_storage=yes
21203else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021204 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021205sed 's/^/| /' conftest.$ac_ext >&5
21206
Martin v. Löwiseba40652007-08-30 20:10:57 +000021207 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021208fi
21209
Martin v. Löwiseba40652007-08-30 20:10:57 +000021210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21211fi
21212
Benjamin Peterson697cd212010-05-02 16:45:11 +000021213{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
21214$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021215if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021216
21217cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021218#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021219_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021220
21221fi
21222
Guido van Rossum627b2d71993-12-24 10:39:16 +000021223# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000021224
Michael W. Hudson54241132001-12-07 15:38:26 +000021225
Benjamin Peterson697cd212010-05-02 16:45:11 +000021226{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
21227$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021228if test "${ac_cv_c_char_unsigned+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000021229 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000021230else
Martin v. Löwis11437992002-04-12 09:54:03 +000021231 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021232/* confdefs.h. */
21233_ACEOF
21234cat confdefs.h >>conftest.$ac_ext
21235cat >>conftest.$ac_ext <<_ACEOF
21236/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021237$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021238int
21239main ()
21240{
21241static int test_array [1 - 2 * !(((char) -1) < 0)];
21242test_array [0] = 0
21243
21244 ;
21245 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000021246}
Martin v. Löwis11437992002-04-12 09:54:03 +000021247_ACEOF
21248rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021249if { (ac_try="$ac_compile"
21250case "(($ac_try" in
21251 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21252 *) ac_try_echo=$ac_try;;
21253esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021254eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21255$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021256 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021257 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021258 grep -v '^ *+' conftest.er1 >conftest.err
21259 rm -f conftest.er1
21260 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021261 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021262 (exit $ac_status); } && {
21263 test -z "$ac_c_werror_flag" ||
21264 test ! -s conftest.err
21265 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000021266 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021267else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021268 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021269sed 's/^/| /' conftest.$ac_ext >&5
21270
Martin v. Löwiseba40652007-08-30 20:10:57 +000021271 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021272fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021273
21274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021275fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000021276{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
21277$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021278if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021279 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021280#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021281_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021282
21283fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000021284
Benjamin Peterson697cd212010-05-02 16:45:11 +000021285{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
21286$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021287if test "${ac_cv_c_const+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000021288 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021289else
21290 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021291/* confdefs.h. */
21292_ACEOF
21293cat confdefs.h >>conftest.$ac_ext
21294cat >>conftest.$ac_ext <<_ACEOF
21295/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021296
Martin v. Löwis11437992002-04-12 09:54:03 +000021297int
21298main ()
21299{
21300/* FIXME: Include the comments suggested by Paul. */
21301#ifndef __cplusplus
21302 /* Ultrix mips cc rejects this. */
21303 typedef int charset[2];
Martin v. Löwiseba40652007-08-30 20:10:57 +000021304 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000021305 /* SunOS 4.1.1 cc rejects this. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021306 char const *const *pcpcc;
21307 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021308 /* NEC SVR4.0.2 mips cc rejects this. */
21309 struct point {int x, y;};
21310 static struct point const zero = {0,0};
21311 /* AIX XL C 1.02.0.0 rejects this.
21312 It does not let you subtract one const X* pointer from another in
21313 an arm of an if-expression whose if-part is not a constant
21314 expression */
21315 const char *g = "string";
Martin v. Löwiseba40652007-08-30 20:10:57 +000021316 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000021317 /* HPUX 7.0 cc rejects these. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021318 ++pcpcc;
21319 ppc = (char**) pcpcc;
21320 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000021321 { /* SCO 3.2v4 cc rejects this. */
21322 char *t;
21323 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021324
Martin v. Löwis11437992002-04-12 09:54:03 +000021325 *t++ = 0;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021326 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021327 }
21328 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
21329 int x[] = {25, 17};
21330 const int *foo = &x[0];
21331 ++foo;
21332 }
21333 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21334 typedef const int *iptr;
21335 iptr p = 0;
21336 ++p;
21337 }
21338 { /* AIX XL C 1.02.0.0 rejects this saying
21339 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21340 struct s { int j; const int *ap[3]; };
21341 struct s *b; b->j = 5;
21342 }
21343 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21344 const int foo = 10;
Martin v. Löwiseba40652007-08-30 20:10:57 +000021345 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021346 }
Martin v. Löwiseba40652007-08-30 20:10:57 +000021347 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000021348#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000021349
Martin v. Löwis11437992002-04-12 09:54:03 +000021350 ;
21351 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000021352}
Martin v. Löwis11437992002-04-12 09:54:03 +000021353_ACEOF
21354rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021355if { (ac_try="$ac_compile"
21356case "(($ac_try" in
21357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21358 *) ac_try_echo=$ac_try;;
21359esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021360eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21361$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021362 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021363 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021364 grep -v '^ *+' conftest.er1 >conftest.err
21365 rm -f conftest.er1
21366 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021367 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021368 (exit $ac_status); } && {
21369 test -z "$ac_c_werror_flag" ||
21370 test ! -s conftest.err
21371 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021372 ac_cv_c_const=yes
21373else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021374 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021375sed 's/^/| /' conftest.$ac_ext >&5
21376
Martin v. Löwiseba40652007-08-30 20:10:57 +000021377 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021378fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021379
21380rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021381fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000021382{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
21383$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021384if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021385
21386cat >>confdefs.h <<\_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000021387#define const /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021388_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021389
21390fi
21391
Michael W. Hudson54241132001-12-07 15:38:26 +000021392
Guido van Rossumda88dad1995-01-26 00:46:29 +000021393works=no
Benjamin Peterson697cd212010-05-02 16:45:11 +000021394{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
21395$as_echo_n "checking for working volatile... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021396cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021397/* confdefs.h. */
21398_ACEOF
21399cat confdefs.h >>conftest.$ac_ext
21400cat >>conftest.$ac_ext <<_ACEOF
21401/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021402
Martin v. Löwis11437992002-04-12 09:54:03 +000021403int
21404main ()
21405{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021406volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021407 ;
21408 return 0;
21409}
21410_ACEOF
21411rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021412if { (ac_try="$ac_compile"
21413case "(($ac_try" in
21414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21415 *) ac_try_echo=$ac_try;;
21416esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021417eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21418$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021419 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021420 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021421 grep -v '^ *+' conftest.er1 >conftest.err
21422 rm -f conftest.er1
21423 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021424 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021425 (exit $ac_status); } && {
21426 test -z "$ac_c_werror_flag" ||
21427 test ! -s conftest.err
21428 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021429 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000021430else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021431 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021432sed 's/^/| /' conftest.$ac_ext >&5
21433
Martin v. Löwis11437992002-04-12 09:54:03 +000021434
21435cat >>confdefs.h <<\_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000021436#define volatile /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021437_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021438
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021439
Guido van Rossum627b2d71993-12-24 10:39:16 +000021440fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021441
21442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000021443{ $as_echo "$as_me:$LINENO: result: $works" >&5
21444$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021445
Guido van Rossumda88dad1995-01-26 00:46:29 +000021446works=no
Benjamin Peterson697cd212010-05-02 16:45:11 +000021447{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5
21448$as_echo_n "checking for working signed char... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021449cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021450/* confdefs.h. */
21451_ACEOF
21452cat confdefs.h >>conftest.$ac_ext
21453cat >>conftest.$ac_ext <<_ACEOF
21454/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021455
Martin v. Löwis11437992002-04-12 09:54:03 +000021456int
21457main ()
21458{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021459signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000021460 ;
21461 return 0;
21462}
21463_ACEOF
21464rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021465if { (ac_try="$ac_compile"
21466case "(($ac_try" in
21467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21468 *) ac_try_echo=$ac_try;;
21469esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021470eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21471$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021474 grep -v '^ *+' conftest.er1 >conftest.err
21475 rm -f conftest.er1
21476 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021477 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021478 (exit $ac_status); } && {
21479 test -z "$ac_c_werror_flag" ||
21480 test ! -s conftest.err
21481 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000021482 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000021483else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021484 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021485sed 's/^/| /' conftest.$ac_ext >&5
21486
Martin v. Löwis11437992002-04-12 09:54:03 +000021487
21488cat >>confdefs.h <<\_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000021489#define signed /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000021490_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000021491
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021492
Guido van Rossum7f43da71994-08-01 12:15:30 +000021493fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021494
21495rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000021496{ $as_echo "$as_me:$LINENO: result: $works" >&5
21497$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000021498
Guido van Rossumda88dad1995-01-26 00:46:29 +000021499have_prototypes=no
Benjamin Peterson697cd212010-05-02 16:45:11 +000021500{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5
21501$as_echo_n "checking for prototypes... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021502cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021503/* confdefs.h. */
21504_ACEOF
21505cat confdefs.h >>conftest.$ac_ext
21506cat >>conftest.$ac_ext <<_ACEOF
21507/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021508int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021509int
21510main ()
21511{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021512return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000021513 ;
21514 return 0;
21515}
21516_ACEOF
21517rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021518if { (ac_try="$ac_compile"
21519case "(($ac_try" in
21520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21521 *) ac_try_echo=$ac_try;;
21522esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021523eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21524$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021525 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021526 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021527 grep -v '^ *+' conftest.er1 >conftest.err
21528 rm -f conftest.er1
21529 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021530 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021531 (exit $ac_status); } && {
21532 test -z "$ac_c_werror_flag" ||
21533 test ! -s conftest.err
21534 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021535
21536
21537cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021538#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021539_ACEOF
21540
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021541 have_prototypes=yes
21542
Guido van Rossumf78abae1997-01-21 22:02:36 +000021543else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021544 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021545sed 's/^/| /' conftest.$ac_ext >&5
21546
Martin v. Löwiseba40652007-08-30 20:10:57 +000021547
Guido van Rossum7f43da71994-08-01 12:15:30 +000021548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021549
21550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000021551{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5
21552$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021553
Guido van Rossumda88dad1995-01-26 00:46:29 +000021554works=no
Benjamin Peterson697cd212010-05-02 16:45:11 +000021555{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
21556$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021557cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021558/* confdefs.h. */
21559_ACEOF
21560cat confdefs.h >>conftest.$ac_ext
21561cat >>conftest.$ac_ext <<_ACEOF
21562/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021563
21564#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000021565int foo(int x, ...) {
21566 va_list va;
21567 va_start(va, x);
21568 va_arg(va, int);
21569 va_arg(va, char *);
21570 va_arg(va, double);
21571 return 0;
21572}
Guido van Rossum7f43da71994-08-01 12:15:30 +000021573
Martin v. Löwis11437992002-04-12 09:54:03 +000021574int
21575main ()
21576{
Guido van Rossum90eea071996-08-30 20:58:57 +000021577return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000021578 ;
21579 return 0;
21580}
21581_ACEOF
21582rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021583if { (ac_try="$ac_compile"
21584case "(($ac_try" in
21585 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21586 *) ac_try_echo=$ac_try;;
21587esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021588eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21589$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021590 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021591 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021592 grep -v '^ *+' conftest.er1 >conftest.err
21593 rm -f conftest.er1
21594 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021595 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021596 (exit $ac_status); } && {
21597 test -z "$ac_c_werror_flag" ||
21598 test ! -s conftest.err
21599 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021600
21601
21602cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021603#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021604_ACEOF
21605
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021606 works=yes
21607
Guido van Rossumf78abae1997-01-21 22:02:36 +000021608else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021609 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021610sed 's/^/| /' conftest.$ac_ext >&5
21611
Martin v. Löwiseba40652007-08-30 20:10:57 +000021612
Guido van Rossum627b2d71993-12-24 10:39:16 +000021613fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021614
21615rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000021616{ $as_echo "$as_me:$LINENO: result: $works" >&5
21617$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021618
Martin v. Löwisd6320502004-08-12 13:45:08 +000021619# check for socketpair
Benjamin Peterson697cd212010-05-02 16:45:11 +000021620{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5
21621$as_echo_n "checking for socketpair... " >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021622cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000021623/* confdefs.h. */
21624_ACEOF
21625cat confdefs.h >>conftest.$ac_ext
21626cat >>conftest.$ac_ext <<_ACEOF
21627/* end confdefs.h. */
21628
21629#include <sys/types.h>
21630#include <sys/socket.h>
21631
21632int
21633main ()
21634{
21635void *x=socketpair
21636 ;
21637 return 0;
21638}
21639_ACEOF
21640rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021641if { (ac_try="$ac_compile"
21642case "(($ac_try" in
21643 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21644 *) ac_try_echo=$ac_try;;
21645esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021646eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21647$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021648 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000021649 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021650 grep -v '^ *+' conftest.er1 >conftest.err
21651 rm -f conftest.er1
21652 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021653 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021654 (exit $ac_status); } && {
21655 test -z "$ac_c_werror_flag" ||
21656 test ! -s conftest.err
21657 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000021658
21659cat >>confdefs.h <<\_ACEOF
21660#define HAVE_SOCKETPAIR 1
21661_ACEOF
21662
Benjamin Peterson697cd212010-05-02 16:45:11 +000021663 { $as_echo "$as_me:$LINENO: result: yes" >&5
21664$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021665else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021666 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000021667sed 's/^/| /' conftest.$ac_ext >&5
21668
Benjamin Peterson697cd212010-05-02 16:45:11 +000021669 { $as_echo "$as_me:$LINENO: result: no" >&5
21670$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000021671
21672fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021673
21674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000021675
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021676# check if sockaddr has sa_len member
Benjamin Peterson697cd212010-05-02 16:45:11 +000021677{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
21678$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021679cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021680/* confdefs.h. */
21681_ACEOF
21682cat confdefs.h >>conftest.$ac_ext
21683cat >>conftest.$ac_ext <<_ACEOF
21684/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021685#include <sys/types.h>
21686#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021687int
21688main ()
21689{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021690struct sockaddr x;
21691x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000021692 ;
21693 return 0;
21694}
21695_ACEOF
21696rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021697if { (ac_try="$ac_compile"
21698case "(($ac_try" in
21699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21700 *) ac_try_echo=$ac_try;;
21701esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021702eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21703$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021704 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021705 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021706 grep -v '^ *+' conftest.er1 >conftest.err
21707 rm -f conftest.er1
21708 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021709 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021710 (exit $ac_status); } && {
21711 test -z "$ac_c_werror_flag" ||
21712 test ! -s conftest.err
21713 } && test -s conftest.$ac_objext; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000021714 { $as_echo "$as_me:$LINENO: result: yes" >&5
21715$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021716
21717cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021718#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021719_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021720
21721else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021722 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021723sed 's/^/| /' conftest.$ac_ext >&5
21724
Benjamin Peterson697cd212010-05-02 16:45:11 +000021725 { $as_echo "$as_me:$LINENO: result: no" >&5
21726$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021727fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021728
21729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021730
Guido van Rossumda88dad1995-01-26 00:46:29 +000021731va_list_is_array=no
Benjamin Peterson697cd212010-05-02 16:45:11 +000021732{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5
21733$as_echo_n "checking whether va_list is an array... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021734cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021735/* confdefs.h. */
21736_ACEOF
21737cat confdefs.h >>conftest.$ac_ext
21738cat >>conftest.$ac_ext <<_ACEOF
21739/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021740
21741#ifdef HAVE_STDARG_PROTOTYPES
21742#include <stdarg.h>
21743#else
21744#include <varargs.h>
21745#endif
21746
Martin v. Löwis11437992002-04-12 09:54:03 +000021747int
21748main ()
21749{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021750va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000021751 ;
21752 return 0;
21753}
21754_ACEOF
21755rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021756if { (ac_try="$ac_compile"
21757case "(($ac_try" in
21758 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21759 *) ac_try_echo=$ac_try;;
21760esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021761eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21762$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021763 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021764 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021765 grep -v '^ *+' conftest.er1 >conftest.err
21766 rm -f conftest.er1
21767 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021768 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021769 (exit $ac_status); } && {
21770 test -z "$ac_c_werror_flag" ||
21771 test ! -s conftest.err
21772 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021773 :
21774else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021775 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021776sed 's/^/| /' conftest.$ac_ext >&5
21777
Martin v. Löwis11437992002-04-12 09:54:03 +000021778
21779
21780cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021781#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021782_ACEOF
21783
Guido van Rossumda88dad1995-01-26 00:46:29 +000021784 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021785
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021786fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021787
21788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000021789{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5
21790$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021791
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021792# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000021793
21794
21795
Benjamin Peterson697cd212010-05-02 16:45:11 +000021796{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
21797$as_echo_n "checking for gethostbyname_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021798if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000021799 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021800else
Martin v. Löwis11437992002-04-12 09:54:03 +000021801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021802/* confdefs.h. */
21803_ACEOF
21804cat confdefs.h >>conftest.$ac_ext
21805cat >>conftest.$ac_ext <<_ACEOF
21806/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021807/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
21808 For example, HP-UX 11i <limits.h> declares gettimeofday. */
21809#define gethostbyname_r innocuous_gethostbyname_r
21810
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021811/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000021812 which can conflict with char gethostbyname_r (); below.
21813 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021814 <limits.h> exists even on freestanding compilers. */
21815
21816#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000021817# include <limits.h>
21818#else
21819# include <assert.h>
21820#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000021821
21822#undef gethostbyname_r
21823
Martin v. Löwiseba40652007-08-30 20:10:57 +000021824/* Override any GCC internal prototype to avoid an error.
21825 Use char because int might match the return type of a GCC
21826 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021827#ifdef __cplusplus
21828extern "C"
21829#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021830char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021831/* The GNU C library defines this for functions which it implements
21832 to always fail with ENOSYS. Some functions are actually named
21833 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000021834#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021835choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021836#endif
21837
Skip Montanaro6dead952003-09-25 14:50:04 +000021838int
21839main ()
21840{
Martin v. Löwiseba40652007-08-30 20:10:57 +000021841return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000021842 ;
21843 return 0;
21844}
21845_ACEOF
21846rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021847if { (ac_try="$ac_link"
21848case "(($ac_try" in
21849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21850 *) ac_try_echo=$ac_try;;
21851esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021852eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21853$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021854 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021855 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021856 grep -v '^ *+' conftest.er1 >conftest.err
21857 rm -f conftest.er1
21858 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021859 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021860 (exit $ac_status); } && {
21861 test -z "$ac_c_werror_flag" ||
21862 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000021863 } && test -s conftest$ac_exeext && {
21864 test "$cross_compiling" = yes ||
21865 $as_test_x conftest$ac_exeext
21866 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021867 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021868else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021869 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021870sed 's/^/| /' conftest.$ac_ext >&5
21871
Martin v. Löwiseba40652007-08-30 20:10:57 +000021872 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021873fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000021874
Benjamin Peterson697cd212010-05-02 16:45:11 +000021875rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000021876rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021877 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021878fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000021879{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
21880$as_echo "$ac_cv_func_gethostbyname_r" >&6; }
21881if test "x$ac_cv_func_gethostbyname_r" = x""yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021882
Martin v. Löwis11437992002-04-12 09:54:03 +000021883 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021884#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021885_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021886
Benjamin Peterson697cd212010-05-02 16:45:11 +000021887 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
21888$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021889 OLD_CFLAGS=$CFLAGS
21890 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000021891 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021892/* confdefs.h. */
21893_ACEOF
21894cat confdefs.h >>conftest.$ac_ext
21895cat >>conftest.$ac_ext <<_ACEOF
21896/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021897
21898# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021899
Martin v. Löwis11437992002-04-12 09:54:03 +000021900int
21901main ()
21902{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021903
21904 char *name;
21905 struct hostent *he, *res;
21906 char buffer[2048];
21907 int buflen = 2048;
21908 int h_errnop;
21909
21910 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021911
21912 ;
21913 return 0;
21914}
21915_ACEOF
21916rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021917if { (ac_try="$ac_compile"
21918case "(($ac_try" in
21919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21920 *) ac_try_echo=$ac_try;;
21921esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021922eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21923$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021924 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021925 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021926 grep -v '^ *+' conftest.er1 >conftest.err
21927 rm -f conftest.er1
21928 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021929 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021930 (exit $ac_status); } && {
21931 test -z "$ac_c_werror_flag" ||
21932 test ! -s conftest.err
21933 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021934
21935 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021936#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021937_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000021938
Martin v. Löwis11437992002-04-12 09:54:03 +000021939
21940cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021941#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021942_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021943
Benjamin Peterson697cd212010-05-02 16:45:11 +000021944 { $as_echo "$as_me:$LINENO: result: yes" >&5
21945$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021946
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021947else
Benjamin Peterson697cd212010-05-02 16:45:11 +000021948 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021949sed 's/^/| /' conftest.$ac_ext >&5
21950
Martin v. Löwis11437992002-04-12 09:54:03 +000021951
Benjamin Peterson697cd212010-05-02 16:45:11 +000021952 { $as_echo "$as_me:$LINENO: result: no" >&5
21953$as_echo "no" >&6; }
21954 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
21955$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021956 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021957/* confdefs.h. */
21958_ACEOF
21959cat confdefs.h >>conftest.$ac_ext
21960cat >>conftest.$ac_ext <<_ACEOF
21961/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021962
21963# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021964
Martin v. Löwis11437992002-04-12 09:54:03 +000021965int
21966main ()
21967{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000021968
21969 char *name;
21970 struct hostent *he;
21971 char buffer[2048];
21972 int buflen = 2048;
21973 int h_errnop;
21974
21975 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000021976
21977 ;
21978 return 0;
21979}
21980_ACEOF
21981rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000021982if { (ac_try="$ac_compile"
21983case "(($ac_try" in
21984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21985 *) ac_try_echo=$ac_try;;
21986esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000021987eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21988$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021990 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021991 grep -v '^ *+' conftest.er1 >conftest.err
21992 rm -f conftest.er1
21993 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000021994 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000021995 (exit $ac_status); } && {
21996 test -z "$ac_c_werror_flag" ||
21997 test ! -s conftest.err
21998 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021999
22000 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022001#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022002_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022003
Martin v. Löwis11437992002-04-12 09:54:03 +000022004
22005cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022006#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022007_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022008
Benjamin Peterson697cd212010-05-02 16:45:11 +000022009 { $as_echo "$as_me:$LINENO: result: yes" >&5
22010$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022011
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022012else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022013 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022014sed 's/^/| /' conftest.$ac_ext >&5
22015
Martin v. Löwis11437992002-04-12 09:54:03 +000022016
Benjamin Peterson697cd212010-05-02 16:45:11 +000022017 { $as_echo "$as_me:$LINENO: result: no" >&5
22018$as_echo "no" >&6; }
22019 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22020$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022021 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022022/* confdefs.h. */
22023_ACEOF
22024cat confdefs.h >>conftest.$ac_ext
22025cat >>conftest.$ac_ext <<_ACEOF
22026/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022027
22028# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022029
Martin v. Löwis11437992002-04-12 09:54:03 +000022030int
22031main ()
22032{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022033
22034 char *name;
22035 struct hostent *he;
22036 struct hostent_data data;
22037
22038 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022039
22040 ;
22041 return 0;
22042}
22043_ACEOF
22044rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022045if { (ac_try="$ac_compile"
22046case "(($ac_try" in
22047 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22048 *) ac_try_echo=$ac_try;;
22049esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022050eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22051$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022052 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022053 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022054 grep -v '^ *+' conftest.er1 >conftest.err
22055 rm -f conftest.er1
22056 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000022057 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022058 (exit $ac_status); } && {
22059 test -z "$ac_c_werror_flag" ||
22060 test ! -s conftest.err
22061 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022062
22063 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022064#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022065_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022066
Martin v. Löwis11437992002-04-12 09:54:03 +000022067
22068cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022069#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022070_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022071
Benjamin Peterson697cd212010-05-02 16:45:11 +000022072 { $as_echo "$as_me:$LINENO: result: yes" >&5
22073$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022074
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022075else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022076 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022077sed 's/^/| /' conftest.$ac_ext >&5
22078
Martin v. Löwis11437992002-04-12 09:54:03 +000022079
Benjamin Peterson697cd212010-05-02 16:45:11 +000022080 { $as_echo "$as_me:$LINENO: result: no" >&5
22081$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022082
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022083fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022084
22085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022086
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022087fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022088
22089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022090
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022091fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022092
22093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022094 CFLAGS=$OLD_CFLAGS
22095
22096else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022097
Martin v. Löwis11437992002-04-12 09:54:03 +000022098
22099for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022100do
Benjamin Peterson697cd212010-05-02 16:45:11 +000022101as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22102{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22103$as_echo_n "checking for $ac_func... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022104if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000022105 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022106else
Martin v. Löwis11437992002-04-12 09:54:03 +000022107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022108/* confdefs.h. */
22109_ACEOF
22110cat confdefs.h >>conftest.$ac_ext
22111cat >>conftest.$ac_ext <<_ACEOF
22112/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022113/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22114 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22115#define $ac_func innocuous_$ac_func
22116
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022117/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022118 which can conflict with char $ac_func (); below.
22119 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022120 <limits.h> exists even on freestanding compilers. */
22121
22122#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022123# include <limits.h>
22124#else
22125# include <assert.h>
22126#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022127
22128#undef $ac_func
22129
Martin v. Löwiseba40652007-08-30 20:10:57 +000022130/* Override any GCC internal prototype to avoid an error.
22131 Use char because int might match the return type of a GCC
22132 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022133#ifdef __cplusplus
22134extern "C"
22135#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022136char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022137/* The GNU C library defines this for functions which it implements
22138 to always fail with ENOSYS. Some functions are actually named
22139 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022140#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022141choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022142#endif
22143
Skip Montanaro6dead952003-09-25 14:50:04 +000022144int
22145main ()
22146{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022147return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022148 ;
22149 return 0;
22150}
22151_ACEOF
22152rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022153if { (ac_try="$ac_link"
22154case "(($ac_try" in
22155 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22156 *) ac_try_echo=$ac_try;;
22157esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022158eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22159$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022160 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022161 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022162 grep -v '^ *+' conftest.er1 >conftest.err
22163 rm -f conftest.er1
22164 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000022165 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022166 (exit $ac_status); } && {
22167 test -z "$ac_c_werror_flag" ||
22168 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000022169 } && test -s conftest$ac_exeext && {
22170 test "$cross_compiling" = yes ||
22171 $as_test_x conftest$ac_exeext
22172 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022173 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022174else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022175 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022176sed 's/^/| /' conftest.$ac_ext >&5
22177
Martin v. Löwiseba40652007-08-30 20:10:57 +000022178 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000022179fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022180
Benjamin Peterson697cd212010-05-02 16:45:11 +000022181rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000022182rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022183 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022184fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022185ac_res=`eval 'as_val=${'$as_ac_var'}
22186 $as_echo "$as_val"'`
22187 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22188$as_echo "$ac_res" >&6; }
22189as_val=`eval 'as_val=${'$as_ac_var'}
22190 $as_echo "$as_val"'`
22191 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022192 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000022193#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022194_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022195
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022196fi
Thomas Wouters3a584202000-08-05 23:28:51 +000022197done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022198
Michael W. Hudson54241132001-12-07 15:38:26 +000022199
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022200fi
22201
Michael W. Hudson54241132001-12-07 15:38:26 +000022202
22203
22204
22205
22206
22207
Guido van Rossum627b2d71993-12-24 10:39:16 +000022208# checks for system services
22209# (none yet)
22210
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022211# Linux requires this for correct f.p. operations
Benjamin Peterson697cd212010-05-02 16:45:11 +000022212{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5
22213$as_echo_n "checking for __fpu_control... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022214if test "${ac_cv_func___fpu_control+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000022215 $as_echo_n "(cached) " >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022216else
Martin v. Löwis11437992002-04-12 09:54:03 +000022217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022218/* confdefs.h. */
22219_ACEOF
22220cat confdefs.h >>conftest.$ac_ext
22221cat >>conftest.$ac_ext <<_ACEOF
22222/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022223/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
22224 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22225#define __fpu_control innocuous___fpu_control
22226
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022227/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022228 which can conflict with char __fpu_control (); below.
22229 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022230 <limits.h> exists even on freestanding compilers. */
22231
22232#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022233# include <limits.h>
22234#else
22235# include <assert.h>
22236#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022237
22238#undef __fpu_control
22239
Martin v. Löwiseba40652007-08-30 20:10:57 +000022240/* Override any GCC internal prototype to avoid an error.
22241 Use char because int might match the return type of a GCC
22242 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022243#ifdef __cplusplus
22244extern "C"
22245#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022246char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022247/* The GNU C library defines this for functions which it implements
22248 to always fail with ENOSYS. Some functions are actually named
22249 something starting with __ and the normal name is an alias. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000022250#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022251choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022252#endif
22253
Skip Montanaro6dead952003-09-25 14:50:04 +000022254int
22255main ()
22256{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022257return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022258 ;
22259 return 0;
22260}
22261_ACEOF
22262rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022263if { (ac_try="$ac_link"
22264case "(($ac_try" in
22265 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22266 *) ac_try_echo=$ac_try;;
22267esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022268eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22269$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022270 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022271 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022272 grep -v '^ *+' conftest.er1 >conftest.err
22273 rm -f conftest.er1
22274 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000022275 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022276 (exit $ac_status); } && {
22277 test -z "$ac_c_werror_flag" ||
22278 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000022279 } && test -s conftest$ac_exeext && {
22280 test "$cross_compiling" = yes ||
22281 $as_test_x conftest$ac_exeext
22282 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022283 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022284else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022285 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022286sed 's/^/| /' conftest.$ac_ext >&5
22287
Martin v. Löwiseba40652007-08-30 20:10:57 +000022288 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022289fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022290
Benjamin Peterson697cd212010-05-02 16:45:11 +000022291rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000022292rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022293 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022294fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022295{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
22296$as_echo "$ac_cv_func___fpu_control" >&6; }
22297if test "x$ac_cv_func___fpu_control" = x""yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022298 :
22299else
Martin v. Löwis11437992002-04-12 09:54:03 +000022300
Benjamin Peterson697cd212010-05-02 16:45:11 +000022301{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
22302$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022303if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000022304 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022305else
Martin v. Löwis11437992002-04-12 09:54:03 +000022306 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022307LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022308cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022309/* confdefs.h. */
22310_ACEOF
22311cat confdefs.h >>conftest.$ac_ext
22312cat >>conftest.$ac_ext <<_ACEOF
22313/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022314
Martin v. Löwiseba40652007-08-30 20:10:57 +000022315/* Override any GCC internal prototype to avoid an error.
22316 Use char because int might match the return type of a GCC
22317 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022318#ifdef __cplusplus
22319extern "C"
22320#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022321char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022322int
22323main ()
22324{
Martin v. Löwiseba40652007-08-30 20:10:57 +000022325return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022326 ;
22327 return 0;
22328}
22329_ACEOF
22330rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022331if { (ac_try="$ac_link"
22332case "(($ac_try" in
22333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22334 *) ac_try_echo=$ac_try;;
22335esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022336eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22337$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022338 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022339 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022340 grep -v '^ *+' conftest.er1 >conftest.err
22341 rm -f conftest.er1
22342 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000022343 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022344 (exit $ac_status); } && {
22345 test -z "$ac_c_werror_flag" ||
22346 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000022347 } && test -s conftest$ac_exeext && {
22348 test "$cross_compiling" = yes ||
22349 $as_test_x conftest$ac_exeext
22350 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022351 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022352else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022353 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022354sed 's/^/| /' conftest.$ac_ext >&5
22355
Martin v. Löwiseba40652007-08-30 20:10:57 +000022356 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000022357fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000022358
Benjamin Peterson697cd212010-05-02 16:45:11 +000022359rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000022360rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022361 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022362LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022363fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022364{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
22365$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
22366if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022367 cat >>confdefs.h <<_ACEOF
22368#define HAVE_LIBIEEE 1
22369_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022370
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000022371 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022372
Guido van Rossum627b2d71993-12-24 10:39:16 +000022373fi
22374
Michael W. Hudson54241132001-12-07 15:38:26 +000022375
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000022376fi
22377
Michael W. Hudson54241132001-12-07 15:38:26 +000022378
Guido van Rossum7f253911997-05-09 02:42:48 +000022379# Check for --with-fpectl
Benjamin Peterson697cd212010-05-02 16:45:11 +000022380{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5
22381$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022382
Martin v. Löwiseba40652007-08-30 20:10:57 +000022383# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000022384if test "${with_fpectl+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022385 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000022386if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000022387then
22388
22389cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000022390#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022391_ACEOF
22392
Benjamin Peterson697cd212010-05-02 16:45:11 +000022393 { $as_echo "$as_me:$LINENO: result: yes" >&5
22394$as_echo "yes" >&6; }
22395else { $as_echo "$as_me:$LINENO: result: no" >&5
22396$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022397fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000022398else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022399 { $as_echo "$as_me:$LINENO: result: no" >&5
22400$as_echo "no" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022401fi
22402
Guido van Rossum7f253911997-05-09 02:42:48 +000022403
Guido van Rossum7f43da71994-08-01 12:15:30 +000022404# check for --with-libm=...
22405
Guido van Rossum563e7081996-09-10 18:20:48 +000022406case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000022407Darwin) ;;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000022408BeOS) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000022409*) LIBM=-lm
22410esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022411{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
22412$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022413
Martin v. Löwiseba40652007-08-30 20:10:57 +000022414# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022415if test "${with_libm+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022416 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000022417if test "$withval" = no
22418then LIBM=
Benjamin Peterson697cd212010-05-02 16:45:11 +000022419 { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5
22420$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022421elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022422then LIBM=$withval
Benjamin Peterson697cd212010-05-02 16:45:11 +000022423 { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
22424$as_echo "set LIBM=\"$withval\"" >&6; }
22425else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
22426$as_echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022427 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022428fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022429else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022430 { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
22431$as_echo "default LIBM=\"$LIBM\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022432fi
22433
Guido van Rossum7f43da71994-08-01 12:15:30 +000022434
22435# check for --with-libc=...
22436
Benjamin Peterson697cd212010-05-02 16:45:11 +000022437{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
22438$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022439
Martin v. Löwiseba40652007-08-30 20:10:57 +000022440# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000022441if test "${with_libc+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000022442 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000022443if test "$withval" = no
22444then LIBC=
Benjamin Peterson697cd212010-05-02 16:45:11 +000022445 { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5
22446$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000022447elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000022448then LIBC=$withval
Benjamin Peterson697cd212010-05-02 16:45:11 +000022449 { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
22450$as_echo "set LIBC=\"$withval\"" >&6; }
22451else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
22452$as_echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000022453 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022454fi
Guido van Rossum7f253911997-05-09 02:42:48 +000022455else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022456 { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
22457$as_echo "default LIBC=\"$LIBC\"" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000022458fi
22459
Guido van Rossum7f43da71994-08-01 12:15:30 +000022460
Christian Heimes0a8143f2007-12-18 23:22:54 +000022461# ************************************
22462# * Check for mathematical functions *
22463# ************************************
Mark Dickinson265d7382008-04-21 22:32:24 +000022464
Mark Dickinson7a3d8642008-04-22 00:54:27 +000022465LIBS_SAVE=$LIBS
22466LIBS="$LIBS $LIBM"
22467
Mark Dickinsone05e8402009-05-04 13:30:43 +000022468# Detect whether system arithmetic is subject to x87-style double
22469# rounding issues. The result of this test has little meaning on non
22470# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
22471# mode is round-to-nearest and double rounding issues are present, and
22472# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Benjamin Peterson697cd212010-05-02 16:45:11 +000022473{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
22474$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsone05e8402009-05-04 13:30:43 +000022475if test "${ac_cv_x87_double_rounding+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000022476 $as_echo_n "(cached) " >&6
Mark Dickinsone05e8402009-05-04 13:30:43 +000022477else
22478
22479if test "$cross_compiling" = yes; then
22480 ac_cv_x87_double_rounding=no
22481else
22482 cat >conftest.$ac_ext <<_ACEOF
22483/* confdefs.h. */
22484_ACEOF
22485cat confdefs.h >>conftest.$ac_ext
22486cat >>conftest.$ac_ext <<_ACEOF
22487/* end confdefs.h. */
22488
22489#include <stdlib.h>
22490#include <math.h>
22491int main() {
22492 volatile double x, y, z;
22493 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
22494 x = 0.99999999999999989; /* 1-2**-53 */
22495 y = 1./x;
22496 if (y != 1.)
22497 exit(0);
22498 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
22499 x = 1e16;
22500 y = 2.99999;
22501 z = x + y;
22502 if (z != 1e16+4.)
22503 exit(0);
22504 /* both tests show evidence of double rounding */
22505 exit(1);
22506}
22507
22508_ACEOF
22509rm -f conftest$ac_exeext
22510if { (ac_try="$ac_link"
22511case "(($ac_try" in
22512 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22513 *) ac_try_echo=$ac_try;;
22514esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022515eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22516$as_echo "$ac_try_echo") >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022517 (eval "$ac_link") 2>&5
22518 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000022519 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022520 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22521 { (case "(($ac_try" in
22522 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22523 *) ac_try_echo=$ac_try;;
22524esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022525eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22526$as_echo "$ac_try_echo") >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022527 (eval "$ac_try") 2>&5
22528 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000022529 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022530 (exit $ac_status); }; }; then
22531 ac_cv_x87_double_rounding=no
22532else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022533 $as_echo "$as_me: program exited with status $ac_status" >&5
22534$as_echo "$as_me: failed program was:" >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022535sed 's/^/| /' conftest.$ac_ext >&5
22536
22537( exit $ac_status )
22538ac_cv_x87_double_rounding=yes
22539fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022540rm -rf conftest.dSYM
Mark Dickinsone05e8402009-05-04 13:30:43 +000022541rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22542fi
22543
22544
22545fi
22546
Benjamin Peterson697cd212010-05-02 16:45:11 +000022547{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
22548$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinsone05e8402009-05-04 13:30:43 +000022549if test "$ac_cv_x87_double_rounding" = yes
22550then
22551
22552cat >>confdefs.h <<\_ACEOF
22553#define X87_DOUBLE_ROUNDING 1
22554_ACEOF
22555
22556fi
22557
22558
Mark Dickinson265d7382008-04-21 22:32:24 +000022559# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
22560# -0. on some architectures.
Benjamin Peterson697cd212010-05-02 16:45:11 +000022561{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
22562$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000022563if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000022564 $as_echo_n "(cached) " >&6
Mark Dickinson265d7382008-04-21 22:32:24 +000022565else
22566
22567if test "$cross_compiling" = yes; then
22568 ac_cv_tanh_preserves_zero_sign=no
22569else
22570 cat >conftest.$ac_ext <<_ACEOF
22571/* confdefs.h. */
22572_ACEOF
22573cat confdefs.h >>conftest.$ac_ext
22574cat >>conftest.$ac_ext <<_ACEOF
22575/* end confdefs.h. */
22576
22577#include <math.h>
Mark Dickinson7a3d8642008-04-22 00:54:27 +000022578#include <stdlib.h>
Mark Dickinson265d7382008-04-21 22:32:24 +000022579int main() {
22580 /* return 0 if either negative zeros don't exist
22581 on this platform or if negative zeros exist
22582 and tanh(-0.) == -0. */
22583 if (atan2(0., -1.) == atan2(-0., -1.) ||
22584 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
22585 else exit(1);
22586}
22587
22588_ACEOF
22589rm -f conftest$ac_exeext
22590if { (ac_try="$ac_link"
22591case "(($ac_try" in
22592 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22593 *) ac_try_echo=$ac_try;;
22594esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022595eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22596$as_echo "$ac_try_echo") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000022597 (eval "$ac_link") 2>&5
22598 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000022599 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000022600 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22601 { (case "(($ac_try" in
22602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22603 *) ac_try_echo=$ac_try;;
22604esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022605eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22606$as_echo "$ac_try_echo") >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000022607 (eval "$ac_try") 2>&5
22608 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000022609 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000022610 (exit $ac_status); }; }; then
22611 ac_cv_tanh_preserves_zero_sign=yes
22612else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022613 $as_echo "$as_me: program exited with status $ac_status" >&5
22614$as_echo "$as_me: failed program was:" >&5
Mark Dickinson265d7382008-04-21 22:32:24 +000022615sed 's/^/| /' conftest.$ac_ext >&5
22616
22617( exit $ac_status )
22618ac_cv_tanh_preserves_zero_sign=no
22619fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022620rm -rf conftest.dSYM
Mark Dickinson265d7382008-04-21 22:32:24 +000022621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
22622fi
22623
22624
22625fi
22626
Benjamin Peterson697cd212010-05-02 16:45:11 +000022627{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
22628$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Mark Dickinson265d7382008-04-21 22:32:24 +000022629if test "$ac_cv_tanh_preserves_zero_sign" = yes
22630then
22631
22632cat >>confdefs.h <<\_ACEOF
22633#define TANH_PRESERVES_ZERO_SIGN 1
22634_ACEOF
22635
22636fi
22637
Martin v. Löwis11437992002-04-12 09:54:03 +000022638
Guido van Rossum2b3ac691996-08-30 15:18:41 +000022639
Michael W. Hudson54241132001-12-07 15:38:26 +000022640
Christian Heimes0a8143f2007-12-18 23:22:54 +000022641
22642
22643
22644
22645
Mark Dickinsone05e8402009-05-04 13:30:43 +000022646for ac_func in acosh asinh atanh copysign expm1 finite hypot log1p
Christian Heimes0a8143f2007-12-18 23:22:54 +000022647do
Benjamin Peterson697cd212010-05-02 16:45:11 +000022648as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22649{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22650$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimes0a8143f2007-12-18 23:22:54 +000022651if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000022652 $as_echo_n "(cached) " >&6
Christian Heimes0a8143f2007-12-18 23:22:54 +000022653else
22654 cat >conftest.$ac_ext <<_ACEOF
22655/* confdefs.h. */
22656_ACEOF
22657cat confdefs.h >>conftest.$ac_ext
22658cat >>conftest.$ac_ext <<_ACEOF
22659/* end confdefs.h. */
22660/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22661 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22662#define $ac_func innocuous_$ac_func
22663
22664/* System header to define __stub macros and hopefully few prototypes,
22665 which can conflict with char $ac_func (); below.
22666 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
22667 <limits.h> exists even on freestanding compilers. */
22668
22669#ifdef __STDC__
22670# include <limits.h>
22671#else
22672# include <assert.h>
22673#endif
22674
22675#undef $ac_func
22676
22677/* Override any GCC internal prototype to avoid an error.
22678 Use char because int might match the return type of a GCC
22679 builtin and then its argument prototype would still apply. */
22680#ifdef __cplusplus
22681extern "C"
22682#endif
22683char $ac_func ();
22684/* The GNU C library defines this for functions which it implements
22685 to always fail with ENOSYS. Some functions are actually named
22686 something starting with __ and the normal name is an alias. */
22687#if defined __stub_$ac_func || defined __stub___$ac_func
22688choke me
22689#endif
22690
22691int
22692main ()
22693{
22694return $ac_func ();
22695 ;
22696 return 0;
22697}
22698_ACEOF
22699rm -f conftest.$ac_objext conftest$ac_exeext
22700if { (ac_try="$ac_link"
22701case "(($ac_try" in
22702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22703 *) ac_try_echo=$ac_try;;
22704esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022705eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22706$as_echo "$ac_try_echo") >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000022707 (eval "$ac_link") 2>conftest.er1
22708 ac_status=$?
22709 grep -v '^ *+' conftest.er1 >conftest.err
22710 rm -f conftest.er1
22711 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000022712 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000022713 (exit $ac_status); } && {
22714 test -z "$ac_c_werror_flag" ||
22715 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000022716 } && test -s conftest$ac_exeext && {
22717 test "$cross_compiling" = yes ||
22718 $as_test_x conftest$ac_exeext
22719 }; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000022720 eval "$as_ac_var=yes"
22721else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022722 $as_echo "$as_me: failed program was:" >&5
Christian Heimes0a8143f2007-12-18 23:22:54 +000022723sed 's/^/| /' conftest.$ac_ext >&5
22724
22725 eval "$as_ac_var=no"
22726fi
22727
Benjamin Peterson697cd212010-05-02 16:45:11 +000022728rm -rf conftest.dSYM
Christian Heimes0a8143f2007-12-18 23:22:54 +000022729rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
22730 conftest$ac_exeext conftest.$ac_ext
22731fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022732ac_res=`eval 'as_val=${'$as_ac_var'}
22733 $as_echo "$as_val"'`
22734 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
22735$as_echo "$ac_res" >&6; }
22736as_val=`eval 'as_val=${'$as_ac_var'}
22737 $as_echo "$as_val"'`
22738 if test "x$as_val" = x""yes; then
Christian Heimes0a8143f2007-12-18 23:22:54 +000022739 cat >>confdefs.h <<_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000022740#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes0a8143f2007-12-18 23:22:54 +000022741_ACEOF
22742
22743fi
22744done
22745
Benjamin Peterson697cd212010-05-02 16:45:11 +000022746{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5
22747$as_echo_n "checking whether isinf is declared... " >&6; }
Mark Dickinsone05e8402009-05-04 13:30:43 +000022748if test "${ac_cv_have_decl_isinf+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000022749 $as_echo_n "(cached) " >&6
Mark Dickinsone05e8402009-05-04 13:30:43 +000022750else
22751 cat >conftest.$ac_ext <<_ACEOF
22752/* confdefs.h. */
22753_ACEOF
22754cat confdefs.h >>conftest.$ac_ext
22755cat >>conftest.$ac_ext <<_ACEOF
22756/* end confdefs.h. */
22757#include <math.h>
22758
22759int
22760main ()
22761{
22762#ifndef isinf
22763 (void) isinf;
22764#endif
22765
22766 ;
22767 return 0;
22768}
22769_ACEOF
22770rm -f conftest.$ac_objext
22771if { (ac_try="$ac_compile"
22772case "(($ac_try" in
22773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22774 *) ac_try_echo=$ac_try;;
22775esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022776eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22777$as_echo "$ac_try_echo") >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022778 (eval "$ac_compile") 2>conftest.er1
22779 ac_status=$?
22780 grep -v '^ *+' conftest.er1 >conftest.err
22781 rm -f conftest.er1
22782 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000022783 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022784 (exit $ac_status); } && {
22785 test -z "$ac_c_werror_flag" ||
22786 test ! -s conftest.err
22787 } && test -s conftest.$ac_objext; then
22788 ac_cv_have_decl_isinf=yes
22789else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022790 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022791sed 's/^/| /' conftest.$ac_ext >&5
22792
22793 ac_cv_have_decl_isinf=no
22794fi
22795
22796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22797fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022798{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
22799$as_echo "$ac_cv_have_decl_isinf" >&6; }
22800if test "x$ac_cv_have_decl_isinf" = x""yes; then
Mark Dickinsone05e8402009-05-04 13:30:43 +000022801
22802cat >>confdefs.h <<_ACEOF
22803#define HAVE_DECL_ISINF 1
22804_ACEOF
22805
22806
22807else
22808 cat >>confdefs.h <<_ACEOF
22809#define HAVE_DECL_ISINF 0
22810_ACEOF
22811
22812
22813fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022814{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5
22815$as_echo_n "checking whether isnan is declared... " >&6; }
Mark Dickinsone05e8402009-05-04 13:30:43 +000022816if test "${ac_cv_have_decl_isnan+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000022817 $as_echo_n "(cached) " >&6
Mark Dickinsone05e8402009-05-04 13:30:43 +000022818else
22819 cat >conftest.$ac_ext <<_ACEOF
22820/* confdefs.h. */
22821_ACEOF
22822cat confdefs.h >>conftest.$ac_ext
22823cat >>conftest.$ac_ext <<_ACEOF
22824/* end confdefs.h. */
22825#include <math.h>
22826
22827int
22828main ()
22829{
22830#ifndef isnan
22831 (void) isnan;
22832#endif
22833
22834 ;
22835 return 0;
22836}
22837_ACEOF
22838rm -f conftest.$ac_objext
22839if { (ac_try="$ac_compile"
22840case "(($ac_try" in
22841 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22842 *) ac_try_echo=$ac_try;;
22843esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022844eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22845$as_echo "$ac_try_echo") >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022846 (eval "$ac_compile") 2>conftest.er1
22847 ac_status=$?
22848 grep -v '^ *+' conftest.er1 >conftest.err
22849 rm -f conftest.er1
22850 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000022851 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022852 (exit $ac_status); } && {
22853 test -z "$ac_c_werror_flag" ||
22854 test ! -s conftest.err
22855 } && test -s conftest.$ac_objext; then
22856 ac_cv_have_decl_isnan=yes
22857else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022858 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022859sed 's/^/| /' conftest.$ac_ext >&5
22860
22861 ac_cv_have_decl_isnan=no
22862fi
22863
22864rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22865fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022866{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
22867$as_echo "$ac_cv_have_decl_isnan" >&6; }
22868if test "x$ac_cv_have_decl_isnan" = x""yes; then
Mark Dickinsone05e8402009-05-04 13:30:43 +000022869
22870cat >>confdefs.h <<_ACEOF
22871#define HAVE_DECL_ISNAN 1
22872_ACEOF
22873
22874
22875else
22876 cat >>confdefs.h <<_ACEOF
22877#define HAVE_DECL_ISNAN 0
22878_ACEOF
22879
22880
22881fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022882{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
22883$as_echo_n "checking whether isfinite is declared... " >&6; }
Mark Dickinsone05e8402009-05-04 13:30:43 +000022884if test "${ac_cv_have_decl_isfinite+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000022885 $as_echo_n "(cached) " >&6
Mark Dickinsone05e8402009-05-04 13:30:43 +000022886else
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#include <math.h>
22894
22895int
22896main ()
22897{
22898#ifndef isfinite
22899 (void) isfinite;
22900#endif
22901
22902 ;
22903 return 0;
22904}
22905_ACEOF
22906rm -f conftest.$ac_objext
22907if { (ac_try="$ac_compile"
22908case "(($ac_try" in
22909 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22910 *) ac_try_echo=$ac_try;;
22911esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022912eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22913$as_echo "$ac_try_echo") >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022914 (eval "$ac_compile") 2>conftest.er1
22915 ac_status=$?
22916 grep -v '^ *+' conftest.er1 >conftest.err
22917 rm -f conftest.er1
22918 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000022919 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022920 (exit $ac_status); } && {
22921 test -z "$ac_c_werror_flag" ||
22922 test ! -s conftest.err
22923 } && test -s conftest.$ac_objext; then
22924 ac_cv_have_decl_isfinite=yes
22925else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022926 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsone05e8402009-05-04 13:30:43 +000022927sed 's/^/| /' conftest.$ac_ext >&5
22928
22929 ac_cv_have_decl_isfinite=no
22930fi
22931
22932rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22933fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022934{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
22935$as_echo "$ac_cv_have_decl_isfinite" >&6; }
22936if test "x$ac_cv_have_decl_isfinite" = x""yes; then
Mark Dickinsone05e8402009-05-04 13:30:43 +000022937
22938cat >>confdefs.h <<_ACEOF
22939#define HAVE_DECL_ISFINITE 1
22940_ACEOF
22941
22942
22943else
22944 cat >>confdefs.h <<_ACEOF
22945#define HAVE_DECL_ISFINITE 0
22946_ACEOF
22947
22948
22949fi
22950
22951
Christian Heimes0a8143f2007-12-18 23:22:54 +000022952
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000022953LIBS=$LIBS_SAVE
22954
Guido van Rossumef2255b2000-03-10 22:30:29 +000022955# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000022956if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000022957 { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
22958$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022959if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000022960 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022961fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000022962{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
22963$as_echo "$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000022964else
Martin v. Löwis11437992002-04-12 09:54:03 +000022965 # Is the header compilable?
Benjamin Peterson697cd212010-05-02 16:45:11 +000022966{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5
22967$as_echo_n "checking wchar.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022968cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022969/* confdefs.h. */
22970_ACEOF
22971cat confdefs.h >>conftest.$ac_ext
22972cat >>conftest.$ac_ext <<_ACEOF
22973/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022974$ac_includes_default
22975#include <wchar.h>
22976_ACEOF
22977rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000022978if { (ac_try="$ac_compile"
22979case "(($ac_try" in
22980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22981 *) ac_try_echo=$ac_try;;
22982esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000022983eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22984$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022985 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022987 grep -v '^ *+' conftest.er1 >conftest.err
22988 rm -f conftest.er1
22989 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000022990 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000022991 (exit $ac_status); } && {
22992 test -z "$ac_c_werror_flag" ||
22993 test ! -s conftest.err
22994 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022995 ac_header_compiler=yes
22996else
Benjamin Peterson697cd212010-05-02 16:45:11 +000022997 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022998sed 's/^/| /' conftest.$ac_ext >&5
22999
Martin v. Löwiseba40652007-08-30 20:10:57 +000023000 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000023001fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023002
23003rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000023004{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
23005$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023006
23007# Is the header present?
Benjamin Peterson697cd212010-05-02 16:45:11 +000023008{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5
23009$as_echo_n "checking wchar.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023010cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023011/* confdefs.h. */
23012_ACEOF
23013cat confdefs.h >>conftest.$ac_ext
23014cat >>conftest.$ac_ext <<_ACEOF
23015/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023016#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023017_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000023018if { (ac_try="$ac_cpp conftest.$ac_ext"
23019case "(($ac_try" in
23020 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23021 *) ac_try_echo=$ac_try;;
23022esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023023eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23024$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023025 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023026 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000023027 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000023028 rm -f conftest.er1
23029 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023030 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023031 (exit $ac_status); } >/dev/null && {
23032 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
23033 test ! -s conftest.err
23034 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023035 ac_header_preproc=yes
23036else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023037 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023038sed 's/^/| /' conftest.$ac_ext >&5
23039
Martin v. Löwis11437992002-04-12 09:54:03 +000023040 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023041fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023042
Martin v. Löwis11437992002-04-12 09:54:03 +000023043rm -f conftest.err conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000023044{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
23045$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023046
23047# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023048case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
23049 yes:no: )
Benjamin Peterson697cd212010-05-02 16:45:11 +000023050 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
23051$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
23052 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
23053$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000023054 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000023055 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000023056 no:yes:* )
Benjamin Peterson697cd212010-05-02 16:45:11 +000023057 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
23058$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
23059 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
23060$as_echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
23061 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
23062$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
23063 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
23064$as_echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
23065 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
23066$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
23067 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
23068$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000023069 ( cat <<\_ASBOX
Martin v. Löwis1d459062005-03-14 21:23:33 +000023070## ------------------------------------------------ ##
23071## Report this to http://www.python.org/python-bugs ##
23072## ------------------------------------------------ ##
Skip Montanaro6dead952003-09-25 14:50:04 +000023073_ASBOX
Martin v. Löwiseba40652007-08-30 20:10:57 +000023074 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000023075 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023076esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023077{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
23078$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023079if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000023080 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023081else
23082 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000023083fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000023084{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
23085$as_echo "$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023086
23087fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000023088if test "x$ac_cv_header_wchar_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023089
23090
23091cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000023092#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023093_ACEOF
23094
Martin v. Löwisc45929e2002-04-06 10:10:49 +000023095 wchar_h="yes"
23096
Guido van Rossumef2255b2000-03-10 22:30:29 +000023097else
Martin v. Löwis11437992002-04-12 09:54:03 +000023098 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000023099
23100fi
23101
Michael W. Hudson54241132001-12-07 15:38:26 +000023102
Martin v. Löwis11437992002-04-12 09:54:03 +000023103
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023104# determine wchar_t size
23105if test "$wchar_h" = yes
23106then
Benjamin Peterson697cd212010-05-02 16:45:11 +000023107 # The cast to long int works around a bug in the HP C Compiler
Martin v. Löwiseba40652007-08-30 20:10:57 +000023108# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
23109# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
23110# This bug is HP SR number 8606223364.
Benjamin Peterson697cd212010-05-02 16:45:11 +000023111{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5
23112$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023113if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000023114 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000023115else
Martin v. Löwis11437992002-04-12 09:54:03 +000023116 if test "$cross_compiling" = yes; then
23117 # Depending upon the size, compute the lo and hi bounds.
23118cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023119/* confdefs.h. */
23120_ACEOF
23121cat confdefs.h >>conftest.$ac_ext
23122cat >>conftest.$ac_ext <<_ACEOF
23123/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023124#include <wchar.h>
23125
Martin v. Löwis11437992002-04-12 09:54:03 +000023126int
23127main ()
23128{
Benjamin Peterson697cd212010-05-02 16:45:11 +000023129static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023130test_array [0] = 0
23131
23132 ;
23133 return 0;
23134}
23135_ACEOF
23136rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023137if { (ac_try="$ac_compile"
23138case "(($ac_try" in
23139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23140 *) ac_try_echo=$ac_try;;
23141esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023142eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23143$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023144 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023145 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023146 grep -v '^ *+' conftest.er1 >conftest.err
23147 rm -f conftest.er1
23148 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023149 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023150 (exit $ac_status); } && {
23151 test -z "$ac_c_werror_flag" ||
23152 test ! -s conftest.err
23153 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023154 ac_lo=0 ac_mid=0
23155 while :; do
23156 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023157/* confdefs.h. */
23158_ACEOF
23159cat confdefs.h >>conftest.$ac_ext
23160cat >>conftest.$ac_ext <<_ACEOF
23161/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023162#include <wchar.h>
23163
Martin v. Löwis11437992002-04-12 09:54:03 +000023164int
23165main ()
23166{
Benjamin Peterson697cd212010-05-02 16:45:11 +000023167static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023168test_array [0] = 0
23169
23170 ;
23171 return 0;
23172}
23173_ACEOF
23174rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023175if { (ac_try="$ac_compile"
23176case "(($ac_try" in
23177 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23178 *) ac_try_echo=$ac_try;;
23179esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023180eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23181$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023182 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023183 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023184 grep -v '^ *+' conftest.er1 >conftest.err
23185 rm -f conftest.er1
23186 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023187 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023188 (exit $ac_status); } && {
23189 test -z "$ac_c_werror_flag" ||
23190 test ! -s conftest.err
23191 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023192 ac_hi=$ac_mid; break
23193else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023194 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023195sed 's/^/| /' conftest.$ac_ext >&5
23196
Martin v. Löwiseba40652007-08-30 20:10:57 +000023197 ac_lo=`expr $ac_mid + 1`
23198 if test $ac_lo -le $ac_mid; then
23199 ac_lo= ac_hi=
23200 break
23201 fi
23202 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023203fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023204
23205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023206 done
23207else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023208 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023209sed 's/^/| /' conftest.$ac_ext >&5
23210
Martin v. Löwiseba40652007-08-30 20:10:57 +000023211 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023212/* confdefs.h. */
23213_ACEOF
23214cat confdefs.h >>conftest.$ac_ext
23215cat >>conftest.$ac_ext <<_ACEOF
23216/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023217#include <wchar.h>
23218
Martin v. Löwis11437992002-04-12 09:54:03 +000023219int
23220main ()
23221{
Benjamin Peterson697cd212010-05-02 16:45:11 +000023222static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023223test_array [0] = 0
23224
23225 ;
23226 return 0;
23227}
23228_ACEOF
23229rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023230if { (ac_try="$ac_compile"
23231case "(($ac_try" in
23232 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23233 *) ac_try_echo=$ac_try;;
23234esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023235eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23236$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023237 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023238 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023239 grep -v '^ *+' conftest.er1 >conftest.err
23240 rm -f conftest.er1
23241 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023242 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023243 (exit $ac_status); } && {
23244 test -z "$ac_c_werror_flag" ||
23245 test ! -s conftest.err
23246 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023247 ac_hi=-1 ac_mid=-1
23248 while :; do
23249 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023250/* confdefs.h. */
23251_ACEOF
23252cat confdefs.h >>conftest.$ac_ext
23253cat >>conftest.$ac_ext <<_ACEOF
23254/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023255#include <wchar.h>
23256
Martin v. Löwis11437992002-04-12 09:54:03 +000023257int
23258main ()
23259{
Benjamin Peterson697cd212010-05-02 16:45:11 +000023260static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023261test_array [0] = 0
23262
23263 ;
23264 return 0;
23265}
23266_ACEOF
23267rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023268if { (ac_try="$ac_compile"
23269case "(($ac_try" in
23270 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23271 *) ac_try_echo=$ac_try;;
23272esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023273eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23274$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023275 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023276 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023277 grep -v '^ *+' conftest.er1 >conftest.err
23278 rm -f conftest.er1
23279 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023280 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023281 (exit $ac_status); } && {
23282 test -z "$ac_c_werror_flag" ||
23283 test ! -s conftest.err
23284 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023285 ac_lo=$ac_mid; break
23286else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023287 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023288sed 's/^/| /' conftest.$ac_ext >&5
23289
Martin v. Löwiseba40652007-08-30 20:10:57 +000023290 ac_hi=`expr '(' $ac_mid ')' - 1`
23291 if test $ac_mid -le $ac_hi; then
23292 ac_lo= ac_hi=
23293 break
23294 fi
23295 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000023296fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023297
23298rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023299 done
23300else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023301 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023302sed 's/^/| /' conftest.$ac_ext >&5
23303
Martin v. Löwiseba40652007-08-30 20:10:57 +000023304 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000023305fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023306
23307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023308fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023309
23310rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023311# Binary search between lo and hi bounds.
23312while test "x$ac_lo" != "x$ac_hi"; do
23313 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
23314 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023315/* confdefs.h. */
23316_ACEOF
23317cat confdefs.h >>conftest.$ac_ext
23318cat >>conftest.$ac_ext <<_ACEOF
23319/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023320#include <wchar.h>
23321
Martin v. Löwis11437992002-04-12 09:54:03 +000023322int
23323main ()
23324{
Benjamin Peterson697cd212010-05-02 16:45:11 +000023325static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000023326test_array [0] = 0
23327
23328 ;
23329 return 0;
23330}
23331_ACEOF
23332rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023333if { (ac_try="$ac_compile"
23334case "(($ac_try" in
23335 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23336 *) ac_try_echo=$ac_try;;
23337esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023338eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23339$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023340 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023341 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023342 grep -v '^ *+' conftest.er1 >conftest.err
23343 rm -f conftest.er1
23344 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023345 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023346 (exit $ac_status); } && {
23347 test -z "$ac_c_werror_flag" ||
23348 test ! -s conftest.err
23349 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023350 ac_hi=$ac_mid
23351else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023352 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023353sed 's/^/| /' conftest.$ac_ext >&5
23354
Martin v. Löwiseba40652007-08-30 20:10:57 +000023355 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000023356fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023357
23358rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023359done
23360case $ac_lo in
23361?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000023362'') if test "$ac_cv_type_wchar_t" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000023363 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23364$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23365{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023366See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023367$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023368See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000023369 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023370 else
23371 ac_cv_sizeof_wchar_t=0
23372 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000023373esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023374else
Martin v. Löwis11437992002-04-12 09:54:03 +000023375 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023376/* confdefs.h. */
23377_ACEOF
23378cat confdefs.h >>conftest.$ac_ext
23379cat >>conftest.$ac_ext <<_ACEOF
23380/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023381#include <wchar.h>
23382
Benjamin Peterson697cd212010-05-02 16:45:11 +000023383static long int longval () { return (long int) (sizeof (wchar_t)); }
23384static unsigned long int ulongval () { return (long int) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000023385#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023386#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000023387int
23388main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023389{
Martin v. Löwis11437992002-04-12 09:54:03 +000023390
23391 FILE *f = fopen ("conftest.val", "w");
23392 if (! f)
Martin v. Löwiseba40652007-08-30 20:10:57 +000023393 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000023394 if (((long int) (sizeof (wchar_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000023395 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023396 long int i = longval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000023397 if (i != ((long int) (sizeof (wchar_t))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000023398 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000023399 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023400 }
23401 else
23402 {
Martin v. Löwiseba40652007-08-30 20:10:57 +000023403 unsigned long int i = ulongval ();
Benjamin Peterson697cd212010-05-02 16:45:11 +000023404 if (i != ((long int) (sizeof (wchar_t))))
Martin v. Löwiseba40652007-08-30 20:10:57 +000023405 return 1;
Benjamin Peterson697cd212010-05-02 16:45:11 +000023406 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000023407 }
Benjamin Peterson697cd212010-05-02 16:45:11 +000023408 /* Do not output a trailing newline, as this causes \r\n confusion
23409 on some platforms. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000023410 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000023411
23412 ;
23413 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000023414}
Martin v. Löwis11437992002-04-12 09:54:03 +000023415_ACEOF
23416rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023417if { (ac_try="$ac_link"
23418case "(($ac_try" in
23419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23420 *) ac_try_echo=$ac_try;;
23421esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023422eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23423$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023424 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023425 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000023426 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023427 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023428 { (case "(($ac_try" in
23429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23430 *) ac_try_echo=$ac_try;;
23431esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023432eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23433$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023434 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023435 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000023436 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000023437 (exit $ac_status); }; }; then
23438 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000023439else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023440 $as_echo "$as_me: program exited with status $ac_status" >&5
23441$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023442sed 's/^/| /' conftest.$ac_ext >&5
23443
Martin v. Löwis11437992002-04-12 09:54:03 +000023444( exit $ac_status )
Martin v. Löwiseba40652007-08-30 20:10:57 +000023445if test "$ac_cv_type_wchar_t" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000023446 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
23447$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
23448{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023449See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023450$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000023451See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000023452 { (exit 77); exit 77; }; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023453 else
23454 ac_cv_sizeof_wchar_t=0
23455 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023456fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000023457rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000023458rm -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 +000023459fi
23460rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000023461fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000023462{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
23463$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023464
23465
23466
Martin v. Löwis11437992002-04-12 09:54:03 +000023467cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023468#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023469_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023470
Michael W. Hudson54241132001-12-07 15:38:26 +000023471
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023472fi
23473
Benjamin Peterson697cd212010-05-02 16:45:11 +000023474{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
23475$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023476have_ucs4_tcl=no
23477cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023478/* confdefs.h. */
23479_ACEOF
23480cat confdefs.h >>conftest.$ac_ext
23481cat >>conftest.$ac_ext <<_ACEOF
23482/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023483
23484#include <tcl.h>
23485#if TCL_UTF_MAX != 6
23486# error "NOT UCS4_TCL"
23487#endif
23488int
23489main ()
23490{
23491
23492 ;
23493 return 0;
23494}
23495_ACEOF
23496rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023497if { (ac_try="$ac_compile"
23498case "(($ac_try" in
23499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23500 *) ac_try_echo=$ac_try;;
23501esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023502eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23503$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023506 grep -v '^ *+' conftest.er1 >conftest.err
23507 rm -f conftest.er1
23508 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023509 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023510 (exit $ac_status); } && {
23511 test -z "$ac_c_werror_flag" ||
23512 test ! -s conftest.err
23513 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023514
23515
23516cat >>confdefs.h <<\_ACEOF
23517#define HAVE_UCS4_TCL 1
23518_ACEOF
23519
23520 have_ucs4_tcl=yes
23521
23522else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023523 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023524sed 's/^/| /' conftest.$ac_ext >&5
23525
Martin v. Löwiseba40652007-08-30 20:10:57 +000023526
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023527fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023528
23529rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson697cd212010-05-02 16:45:11 +000023530{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
23531$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023532
Skip Montanaro6dead952003-09-25 14:50:04 +000023533# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023534if test "$wchar_h" = yes
23535then
23536 # check whether wchar_t is signed or not
Benjamin Peterson697cd212010-05-02 16:45:11 +000023537 { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
23538$as_echo_n "checking whether wchar_t is signed... " >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023539 if test "${ac_cv_wchar_t_signed+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000023540 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023541else
23542
23543 if test "$cross_compiling" = yes; then
23544 ac_cv_wchar_t_signed=yes
23545else
23546 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023547/* confdefs.h. */
23548_ACEOF
23549cat confdefs.h >>conftest.$ac_ext
23550cat >>conftest.$ac_ext <<_ACEOF
23551/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023552
23553 #include <wchar.h>
23554 int main()
23555 {
Martin v. Löwis44fe0e42006-04-11 07:15:30 +000023556 /* Success: exit code 0 */
23557 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023558 }
23559
23560_ACEOF
23561rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023562if { (ac_try="$ac_link"
23563case "(($ac_try" in
23564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23565 *) ac_try_echo=$ac_try;;
23566esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023567eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23568$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023569 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023570 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000023571 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023572 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000023573 { (case "(($ac_try" in
23574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23575 *) ac_try_echo=$ac_try;;
23576esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023577eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23578$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023579 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023580 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000023581 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023582 (exit $ac_status); }; }; then
23583 ac_cv_wchar_t_signed=yes
23584else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023585 $as_echo "$as_me: program exited with status $ac_status" >&5
23586$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023587sed 's/^/| /' conftest.$ac_ext >&5
23588
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023589( exit $ac_status )
23590ac_cv_wchar_t_signed=no
23591fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000023592rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000023593rm -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 +000023594fi
23595
Martin v. Löwiseba40652007-08-30 20:10:57 +000023596
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023597fi
23598
Benjamin Peterson697cd212010-05-02 16:45:11 +000023599 { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
23600$as_echo "$ac_cv_wchar_t_signed" >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023601fi
23602
Benjamin Peterson697cd212010-05-02 16:45:11 +000023603{ $as_echo "$as_me:$LINENO: checking what type to use for unicode" >&5
23604$as_echo_n "checking what type to use for unicode... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000023605# Check whether --enable-unicode was given.
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023606if test "${enable_unicode+set}" = set; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000023607 enableval=$enable_unicode;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023608else
23609 enable_unicode=yes
Martin v. Löwiseba40652007-08-30 20:10:57 +000023610fi
23611
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023612
23613if test $enable_unicode = yes
23614then
Martin v. Löwisfd917792001-06-27 20:22:04 +000023615 # Without any arguments, Py_UNICODE defaults to two-byte mode
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000023616 case "$have_ucs4_tcl" in
23617 yes) enable_unicode="ucs4"
23618 ;;
23619 *) enable_unicode="ucs2"
23620 ;;
23621 esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023622fi
23623
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023624
23625
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023626case "$enable_unicode" in
23627ucs2) unicode_size="2"
Martin v. Löwis11437992002-04-12 09:54:03 +000023628 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023629#define Py_UNICODE_SIZE 2
Martin v. Löwis11437992002-04-12 09:54:03 +000023630_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023631
23632 ;;
23633ucs4) unicode_size="4"
Martin v. Löwis11437992002-04-12 09:54:03 +000023634 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023635#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000023636_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023637
23638 ;;
Benjamin Peterson697cd212010-05-02 16:45:11 +000023639*) { { $as_echo "$as_me:$LINENO: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&5
23640$as_echo "$as_me: error: invalid value for --enable-unicode. Use either ucs2 or ucs4 (lowercase)." >&2;}
Benjamin Peterson01e53912010-02-27 00:15:54 +000023641 { (exit 1); exit 1; }; } ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023642esac
23643
Michael W. Hudson54241132001-12-07 15:38:26 +000023644
Martin v. Löwis11437992002-04-12 09:54:03 +000023645
23646
Martin v. Löwis0036cba2002-04-12 09:58:45 +000023647
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023648if test "$enable_unicode" = "no"
23649then
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023650 UNICODE_OBJS=""
Benjamin Peterson697cd212010-05-02 16:45:11 +000023651 { $as_echo "$as_me:$LINENO: result: not used" >&5
23652$as_echo "not used" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023653else
Martin v. Löwis339d0f72001-08-17 18:39:25 +000023654 UNICODE_OBJS="Objects/unicodeobject.o Objects/unicodectype.o"
Martin v. Löwis11437992002-04-12 09:54:03 +000023655
23656cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023657#define Py_USING_UNICODE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023658_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023659
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000023660
23661 # wchar_t is only usable if it maps to an unsigned type
23662 if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000023663 -a "$ac_cv_wchar_t_signed" = "no"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023664 then
23665 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023666
Martin v. Löwis11437992002-04-12 09:54:03 +000023667cat >>confdefs.h <<\_ACEOF
23668#define HAVE_USABLE_WCHAR_T 1
23669_ACEOF
23670
23671 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023672#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000023673_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023674
23675 elif test "$ac_cv_sizeof_short" = "$unicode_size"
23676 then
23677 PY_UNICODE_TYPE="unsigned short"
Martin v. Löwis11437992002-04-12 09:54:03 +000023678 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023679#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000023680_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023681
23682 elif test "$ac_cv_sizeof_long" = "$unicode_size"
23683 then
23684 PY_UNICODE_TYPE="unsigned long"
Martin v. Löwis11437992002-04-12 09:54:03 +000023685 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023686#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000023687_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023688
23689 else
23690 PY_UNICODE_TYPE="no type found"
23691 fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000023692 { $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
23693$as_echo "$PY_UNICODE_TYPE" >&6; }
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000023694fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023695
23696# check for endianness
Benjamin Peterson697cd212010-05-02 16:45:11 +000023697
23698 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
23699$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023700if test "${ac_cv_c_bigendian+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000023701 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000023702else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023703 ac_cv_c_bigendian=unknown
23704 # See if we're dealing with a universal compiler.
23705 cat >conftest.$ac_ext <<_ACEOF
23706/* confdefs.h. */
23707_ACEOF
23708cat confdefs.h >>conftest.$ac_ext
23709cat >>conftest.$ac_ext <<_ACEOF
23710/* end confdefs.h. */
23711#ifndef __APPLE_CC__
23712 not a universal capable compiler
23713 #endif
23714 typedef int dummy;
23715
23716_ACEOF
23717rm -f conftest.$ac_objext
23718if { (ac_try="$ac_compile"
23719case "(($ac_try" in
23720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23721 *) ac_try_echo=$ac_try;;
23722esac
23723eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23724$as_echo "$ac_try_echo") >&5
23725 (eval "$ac_compile") 2>conftest.er1
23726 ac_status=$?
23727 grep -v '^ *+' conftest.er1 >conftest.err
23728 rm -f conftest.er1
23729 cat conftest.err >&5
23730 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23731 (exit $ac_status); } && {
23732 test -z "$ac_c_werror_flag" ||
23733 test ! -s conftest.err
23734 } && test -s conftest.$ac_objext; then
23735
23736 # Check for potential -arch flags. It is not universal unless
23737 # there are some -arch flags. Note that *ppc* also matches
23738 # ppc64. This check is also rather less than ideal.
23739 case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
23740 *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
23741 esac
23742else
23743 $as_echo "$as_me: failed program was:" >&5
23744sed 's/^/| /' conftest.$ac_ext >&5
23745
23746
23747fi
23748
23749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23750 if test $ac_cv_c_bigendian = unknown; then
23751 # See if sys/param.h defines the BYTE_ORDER macro.
23752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023753/* confdefs.h. */
23754_ACEOF
23755cat confdefs.h >>conftest.$ac_ext
23756cat >>conftest.$ac_ext <<_ACEOF
23757/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023758#include <sys/types.h>
Benjamin Peterson697cd212010-05-02 16:45:11 +000023759 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023760
Martin v. Löwis11437992002-04-12 09:54:03 +000023761int
23762main ()
23763{
Benjamin Peterson697cd212010-05-02 16:45:11 +000023764#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
23765 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
23766 && LITTLE_ENDIAN)
23767 bogus endian macros
23768 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023769
23770 ;
23771 return 0;
23772}
23773_ACEOF
23774rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023775if { (ac_try="$ac_compile"
23776case "(($ac_try" in
23777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23778 *) ac_try_echo=$ac_try;;
23779esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023780eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23781$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023782 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023783 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023784 grep -v '^ *+' conftest.er1 >conftest.err
23785 rm -f conftest.er1
23786 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023787 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023788 (exit $ac_status); } && {
23789 test -z "$ac_c_werror_flag" ||
23790 test ! -s conftest.err
23791 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023792 # It does; now see whether it defined to BIG_ENDIAN or not.
Benjamin Peterson697cd212010-05-02 16:45:11 +000023793 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023794/* confdefs.h. */
23795_ACEOF
23796cat confdefs.h >>conftest.$ac_ext
23797cat >>conftest.$ac_ext <<_ACEOF
23798/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000023799#include <sys/types.h>
Benjamin Peterson697cd212010-05-02 16:45:11 +000023800 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000023801
Martin v. Löwis11437992002-04-12 09:54:03 +000023802int
23803main ()
23804{
Guido van Rossumef2255b2000-03-10 22:30:29 +000023805#if BYTE_ORDER != BIG_ENDIAN
Benjamin Peterson697cd212010-05-02 16:45:11 +000023806 not big endian
23807 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023808
23809 ;
23810 return 0;
23811}
23812_ACEOF
23813rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023814if { (ac_try="$ac_compile"
23815case "(($ac_try" in
23816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23817 *) ac_try_echo=$ac_try;;
23818esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023819eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23820$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023821 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023823 grep -v '^ *+' conftest.er1 >conftest.err
23824 rm -f conftest.er1
23825 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023826 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023827 (exit $ac_status); } && {
23828 test -z "$ac_c_werror_flag" ||
23829 test ! -s conftest.err
23830 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000023831 ac_cv_c_bigendian=yes
23832else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023833 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023834sed 's/^/| /' conftest.$ac_ext >&5
23835
Martin v. Löwiseba40652007-08-30 20:10:57 +000023836 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000023837fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000023838
23839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000023840else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023841 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023842sed 's/^/| /' conftest.$ac_ext >&5
23843
Benjamin Peterson697cd212010-05-02 16:45:11 +000023844
23845fi
23846
23847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23848 fi
23849 if test $ac_cv_c_bigendian = unknown; then
23850 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
23851 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023852/* confdefs.h. */
23853_ACEOF
23854cat confdefs.h >>conftest.$ac_ext
23855cat >>conftest.$ac_ext <<_ACEOF
23856/* end confdefs.h. */
Benjamin Peterson697cd212010-05-02 16:45:11 +000023857#include <limits.h>
23858
Martin v. Löwis11437992002-04-12 09:54:03 +000023859int
23860main ()
23861{
Benjamin Peterson697cd212010-05-02 16:45:11 +000023862#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
23863 bogus endian macros
23864 #endif
23865
Martin v. Löwis11437992002-04-12 09:54:03 +000023866 ;
23867 return 0;
23868}
23869_ACEOF
23870rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000023871if { (ac_try="$ac_compile"
23872case "(($ac_try" in
23873 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23874 *) ac_try_echo=$ac_try;;
23875esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000023876eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23877$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023878 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023879 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023880 grep -v '^ *+' conftest.er1 >conftest.err
23881 rm -f conftest.er1
23882 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000023883 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000023884 (exit $ac_status); } && {
23885 test -z "$ac_c_werror_flag" ||
23886 test ! -s conftest.err
23887 } && test -s conftest.$ac_objext; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000023888 # It does; now see whether it defined to _BIG_ENDIAN or not.
23889 cat >conftest.$ac_ext <<_ACEOF
23890/* confdefs.h. */
23891_ACEOF
23892cat confdefs.h >>conftest.$ac_ext
23893cat >>conftest.$ac_ext <<_ACEOF
23894/* end confdefs.h. */
23895#include <limits.h>
23896
23897int
23898main ()
23899{
23900#ifndef _BIG_ENDIAN
23901 not big endian
23902 #endif
23903
23904 ;
23905 return 0;
23906}
23907_ACEOF
23908rm -f conftest.$ac_objext
23909if { (ac_try="$ac_compile"
23910case "(($ac_try" in
23911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23912 *) ac_try_echo=$ac_try;;
23913esac
23914eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23915$as_echo "$ac_try_echo") >&5
23916 (eval "$ac_compile") 2>conftest.er1
23917 ac_status=$?
23918 grep -v '^ *+' conftest.er1 >conftest.err
23919 rm -f conftest.er1
23920 cat conftest.err >&5
23921 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23922 (exit $ac_status); } && {
23923 test -z "$ac_c_werror_flag" ||
23924 test ! -s conftest.err
23925 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023926 ac_cv_c_bigendian=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000023927else
Benjamin Peterson697cd212010-05-02 16:45:11 +000023928 $as_echo "$as_me: failed program was:" >&5
23929sed 's/^/| /' conftest.$ac_ext >&5
23930
23931 ac_cv_c_bigendian=no
23932fi
23933
23934rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23935else
23936 $as_echo "$as_me: failed program was:" >&5
23937sed 's/^/| /' conftest.$ac_ext >&5
23938
23939
23940fi
23941
23942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23943 fi
23944 if test $ac_cv_c_bigendian = unknown; then
23945 # Compile a test program.
23946 if test "$cross_compiling" = yes; then
23947 # Try to guess by grepping values from an object file.
23948 cat >conftest.$ac_ext <<_ACEOF
23949/* confdefs.h. */
23950_ACEOF
23951cat confdefs.h >>conftest.$ac_ext
23952cat >>conftest.$ac_ext <<_ACEOF
23953/* end confdefs.h. */
23954short int ascii_mm[] =
23955 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
23956 short int ascii_ii[] =
23957 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
23958 int use_ascii (int i) {
23959 return ascii_mm[i] + ascii_ii[i];
23960 }
23961 short int ebcdic_ii[] =
23962 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
23963 short int ebcdic_mm[] =
23964 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
23965 int use_ebcdic (int i) {
23966 return ebcdic_mm[i] + ebcdic_ii[i];
23967 }
23968 extern int foo;
23969
23970int
23971main ()
23972{
23973return use_ascii (foo) == use_ebcdic (foo);
23974 ;
23975 return 0;
23976}
23977_ACEOF
23978rm -f conftest.$ac_objext
23979if { (ac_try="$ac_compile"
23980case "(($ac_try" in
23981 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23982 *) ac_try_echo=$ac_try;;
23983esac
23984eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23985$as_echo "$ac_try_echo") >&5
23986 (eval "$ac_compile") 2>conftest.er1
23987 ac_status=$?
23988 grep -v '^ *+' conftest.er1 >conftest.err
23989 rm -f conftest.er1
23990 cat conftest.err >&5
23991 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
23992 (exit $ac_status); } && {
23993 test -z "$ac_c_werror_flag" ||
23994 test ! -s conftest.err
23995 } && test -s conftest.$ac_objext; then
23996 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
23997 ac_cv_c_bigendian=yes
23998 fi
23999 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
24000 if test "$ac_cv_c_bigendian" = unknown; then
24001 ac_cv_c_bigendian=no
24002 else
24003 # finding both strings is unlikely to happen, but who knows?
24004 ac_cv_c_bigendian=unknown
24005 fi
24006 fi
24007else
24008 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024009sed 's/^/| /' conftest.$ac_ext >&5
24010
Martin v. Löwiseba40652007-08-30 20:10:57 +000024011
Martin v. Löwis11437992002-04-12 09:54:03 +000024012fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024013
24014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024015else
24016 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024017/* confdefs.h. */
24018_ACEOF
24019cat confdefs.h >>conftest.$ac_ext
24020cat >>conftest.$ac_ext <<_ACEOF
24021/* end confdefs.h. */
Martin v. Löwiseba40652007-08-30 20:10:57 +000024022$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000024023int
24024main ()
24025{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024026
Benjamin Peterson697cd212010-05-02 16:45:11 +000024027 /* Are we little or big endian? From Harbison&Steele. */
24028 union
24029 {
24030 long int l;
24031 char c[sizeof (long int)];
24032 } u;
24033 u.l = 1;
24034 return u.c[sizeof (long int) - 1] == 1;
Martin v. Löwiseba40652007-08-30 20:10:57 +000024035
24036 ;
24037 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024038}
Martin v. Löwis11437992002-04-12 09:54:03 +000024039_ACEOF
24040rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024041if { (ac_try="$ac_link"
24042case "(($ac_try" in
24043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24044 *) ac_try_echo=$ac_try;;
24045esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024046eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24047$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024048 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024049 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000024050 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024051 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024052 { (case "(($ac_try" in
24053 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24054 *) ac_try_echo=$ac_try;;
24055esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024056eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24057$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024058 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024059 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000024060 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024061 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000024062 ac_cv_c_bigendian=no
24063else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024064 $as_echo "$as_me: program exited with status $ac_status" >&5
24065$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024066sed 's/^/| /' conftest.$ac_ext >&5
24067
Martin v. Löwis11437992002-04-12 09:54:03 +000024068( exit $ac_status )
24069ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000024070fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000024071rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000024072rm -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 +000024073fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024074
24075
Benjamin Peterson697cd212010-05-02 16:45:11 +000024076 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024077fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000024078{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
24079$as_echo "$ac_cv_c_bigendian" >&6; }
24080 case $ac_cv_c_bigendian in #(
24081 yes)
24082 cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024083#define WORDS_BIGENDIAN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024084_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000024085;; #(
24086 no)
24087 ;; #(
24088 universal)
24089
24090cat >>confdefs.h <<\_ACEOF
24091#define AC_APPLE_UNIVERSAL_BUILD 1
24092_ACEOF
24093
24094 ;; #(
24095 *)
24096 { { $as_echo "$as_me:$LINENO: error: unknown endianness
24097 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
24098$as_echo "$as_me: error: unknown endianness
24099 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000024100 { (exit 1); exit 1; }; } ;;
Benjamin Peterson697cd212010-05-02 16:45:11 +000024101 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000024102
Michael W. Hudson54241132001-12-07 15:38:26 +000024103
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024104# Check whether right shifting a negative integer extends the sign bit
24105# or fills with zeros (like the Cray J90, according to Tim Peters).
Benjamin Peterson697cd212010-05-02 16:45:11 +000024106{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
24107$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024108if test "${ac_cv_rshift_extends_sign+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000024109 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000024110else
Martin v. Löwis11437992002-04-12 09:54:03 +000024111
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024112if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024113 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024114else
Martin v. Löwis11437992002-04-12 09:54:03 +000024115 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024116/* confdefs.h. */
24117_ACEOF
24118cat confdefs.h >>conftest.$ac_ext
24119cat >>conftest.$ac_ext <<_ACEOF
24120/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024121
24122int main()
24123{
Vladimir Marangozova6180282000-07-12 05:05:06 +000024124 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024125}
24126
Martin v. Löwis11437992002-04-12 09:54:03 +000024127_ACEOF
24128rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024129if { (ac_try="$ac_link"
24130case "(($ac_try" in
24131 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24132 *) ac_try_echo=$ac_try;;
24133esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024134eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24135$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024136 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024137 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000024138 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024139 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024140 { (case "(($ac_try" in
24141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24142 *) ac_try_echo=$ac_try;;
24143esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024144eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24145$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024146 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024147 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000024148 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024149 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000024150 ac_cv_rshift_extends_sign=yes
24151else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024152 $as_echo "$as_me: program exited with status $ac_status" >&5
24153$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024154sed 's/^/| /' conftest.$ac_ext >&5
24155
Martin v. Löwis11437992002-04-12 09:54:03 +000024156( exit $ac_status )
24157ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000024158fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000024159rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000024160rm -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 +000024161fi
24162
Martin v. Löwiseba40652007-08-30 20:10:57 +000024163
24164fi
24165
Benjamin Peterson697cd212010-05-02 16:45:11 +000024166{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
24167$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000024168if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024169then
Martin v. Löwis11437992002-04-12 09:54:03 +000024170
24171cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024172#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024173_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024174
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024175fi
24176
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024177# check for getc_unlocked and related locking functions
Benjamin Peterson697cd212010-05-02 16:45:11 +000024178{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
24179$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024180if test "${ac_cv_have_getc_unlocked+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000024181 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024182else
Martin v. Löwis11437992002-04-12 09:54:03 +000024183
24184cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024185/* confdefs.h. */
24186_ACEOF
24187cat confdefs.h >>conftest.$ac_ext
24188cat >>conftest.$ac_ext <<_ACEOF
24189/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024190#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024191int
24192main ()
24193{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024194
24195 FILE *f = fopen("/dev/null", "r");
24196 flockfile(f);
24197 getc_unlocked(f);
24198 funlockfile(f);
24199
Martin v. Löwis11437992002-04-12 09:54:03 +000024200 ;
24201 return 0;
24202}
24203_ACEOF
24204rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024205if { (ac_try="$ac_link"
24206case "(($ac_try" in
24207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24208 *) ac_try_echo=$ac_try;;
24209esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024210eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24211$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024212 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024214 grep -v '^ *+' conftest.er1 >conftest.err
24215 rm -f conftest.er1
24216 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000024217 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024218 (exit $ac_status); } && {
24219 test -z "$ac_c_werror_flag" ||
24220 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000024221 } && test -s conftest$ac_exeext && {
24222 test "$cross_compiling" = yes ||
24223 $as_test_x conftest$ac_exeext
24224 }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024225 ac_cv_have_getc_unlocked=yes
24226else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024227 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024228sed 's/^/| /' conftest.$ac_ext >&5
24229
Martin v. Löwiseba40652007-08-30 20:10:57 +000024230 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024231fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024232
Benjamin Peterson697cd212010-05-02 16:45:11 +000024233rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000024234rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024235 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024236fi
24237
Benjamin Peterson697cd212010-05-02 16:45:11 +000024238{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
24239$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024240if test "$ac_cv_have_getc_unlocked" = yes
24241then
Martin v. Löwis11437992002-04-12 09:54:03 +000024242
24243cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024244#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024245_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000024246
24247fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000024248
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024249# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000024250# save the value of LIBS so we don't actually link Python with readline
24251LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024252
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024253# On some systems we need to link readline to a termcap compatible
24254# library. NOTE: Keep the precedence of listed libraries synchronised
24255# with setup.py.
24256py_cv_lib_readline=no
Benjamin Peterson697cd212010-05-02 16:45:11 +000024257{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5
24258$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024259for py_libtermcap in "" ncursesw ncurses curses termcap; do
24260 if test -z "$py_libtermcap"; then
24261 READLINE_LIBS="-lreadline"
24262 else
24263 READLINE_LIBS="-lreadline -l$py_libtermcap"
24264 fi
24265 LIBS="$READLINE_LIBS $LIBS_no_readline"
24266 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024267/* confdefs.h. */
24268_ACEOF
24269cat confdefs.h >>conftest.$ac_ext
24270cat >>conftest.$ac_ext <<_ACEOF
24271/* end confdefs.h. */
24272
Martin v. Löwiseba40652007-08-30 20:10:57 +000024273/* Override any GCC internal prototype to avoid an error.
24274 Use char because int might match the return type of a GCC
24275 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024276#ifdef __cplusplus
24277extern "C"
24278#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024279char readline ();
24280int
24281main ()
24282{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024283return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024284 ;
24285 return 0;
24286}
24287_ACEOF
24288rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024289if { (ac_try="$ac_link"
24290case "(($ac_try" in
24291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24292 *) ac_try_echo=$ac_try;;
24293esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024294eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24295$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024296 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024297 ac_status=$?
24298 grep -v '^ *+' conftest.er1 >conftest.err
24299 rm -f conftest.er1
24300 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000024301 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024302 (exit $ac_status); } && {
24303 test -z "$ac_c_werror_flag" ||
24304 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000024305 } && test -s conftest$ac_exeext && {
24306 test "$cross_compiling" = yes ||
24307 $as_test_x conftest$ac_exeext
24308 }; then
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024309 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024310else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024311 $as_echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024312sed 's/^/| /' conftest.$ac_ext >&5
24313
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024314
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024315fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024316
Benjamin Peterson697cd212010-05-02 16:45:11 +000024317rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000024318rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024319 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024320 if test $py_cv_lib_readline = yes; then
24321 break
24322 fi
24323done
24324# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
24325#AC_SUBST([READLINE_LIBS])
Gregory P. Smithe080cdf2008-09-07 19:19:04 +000024326if test $py_cv_lib_readline = no; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000024327 { $as_echo "$as_me:$LINENO: result: none" >&5
24328$as_echo "none" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024329else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024330 { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
24331$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smithcc023f12008-09-07 05:15:58 +000024332
24333cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024334#define HAVE_LIBREADLINE 1
24335_ACEOF
24336
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000024337fi
24338
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024339# check for readline 2.1
Benjamin Peterson697cd212010-05-02 16:45:11 +000024340{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
24341$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024342if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000024343 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024344else
24345 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000024346LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024347cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024348/* confdefs.h. */
24349_ACEOF
24350cat confdefs.h >>conftest.$ac_ext
24351cat >>conftest.$ac_ext <<_ACEOF
24352/* end confdefs.h. */
24353
Martin v. Löwiseba40652007-08-30 20:10:57 +000024354/* Override any GCC internal prototype to avoid an error.
24355 Use char because int might match the return type of a GCC
24356 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024357#ifdef __cplusplus
24358extern "C"
24359#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024360char rl_callback_handler_install ();
24361int
24362main ()
24363{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024364return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024365 ;
24366 return 0;
24367}
24368_ACEOF
24369rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024370if { (ac_try="$ac_link"
24371case "(($ac_try" in
24372 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24373 *) ac_try_echo=$ac_try;;
24374esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024375eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24376$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024377 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +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 Peterson697cd212010-05-02 16:45:11 +000024382 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024383 (exit $ac_status); } && {
24384 test -z "$ac_c_werror_flag" ||
24385 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000024386 } && test -s conftest$ac_exeext && {
24387 test "$cross_compiling" = yes ||
24388 $as_test_x conftest$ac_exeext
24389 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024390 ac_cv_lib_readline_rl_callback_handler_install=yes
24391else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024392 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024393sed 's/^/| /' conftest.$ac_ext >&5
24394
Martin v. Löwiseba40652007-08-30 20:10:57 +000024395 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024396fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024397
Benjamin Peterson697cd212010-05-02 16:45:11 +000024398rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000024399rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024400 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024401LIBS=$ac_check_lib_save_LIBS
24402fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000024403{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
24404$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
24405if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024406
24407cat >>confdefs.h <<\_ACEOF
24408#define HAVE_RL_CALLBACK 1
24409_ACEOF
24410
24411fi
24412
24413
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024414# check for readline 2.2
24415cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024416/* confdefs.h. */
24417_ACEOF
24418cat confdefs.h >>conftest.$ac_ext
24419cat >>conftest.$ac_ext <<_ACEOF
24420/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024421#include <readline/readline.h>
24422_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024423if { (ac_try="$ac_cpp conftest.$ac_ext"
24424case "(($ac_try" in
24425 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24426 *) ac_try_echo=$ac_try;;
24427esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024428eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24429$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024430 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024431 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024432 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024433 rm -f conftest.er1
24434 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000024435 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024436 (exit $ac_status); } >/dev/null && {
24437 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24438 test ! -s conftest.err
24439 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024440 have_readline=yes
24441else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024442 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024443sed 's/^/| /' conftest.$ac_ext >&5
24444
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024445 have_readline=no
24446fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024447
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024448rm -f conftest.err conftest.$ac_ext
24449if test $have_readline = yes
24450then
24451 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024452/* confdefs.h. */
24453_ACEOF
24454cat confdefs.h >>conftest.$ac_ext
24455cat >>conftest.$ac_ext <<_ACEOF
24456/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024457#include <readline/readline.h>
24458
24459_ACEOF
24460if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000024461 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024462
24463cat >>confdefs.h <<\_ACEOF
24464#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
24465_ACEOF
24466
24467fi
Jesus Cead54cdf02010-04-28 11:11:36 +000024468rm -f conftest*
Antoine Pitrou632e93f2009-10-27 12:30:12 +000024469
24470 cat >conftest.$ac_ext <<_ACEOF
24471/* confdefs.h. */
24472_ACEOF
24473cat confdefs.h >>conftest.$ac_ext
24474cat >>conftest.$ac_ext <<_ACEOF
24475/* end confdefs.h. */
24476#include <readline/readline.h>
24477
24478_ACEOF
24479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24480 $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
24481
24482cat >>confdefs.h <<\_ACEOF
24483#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
24484_ACEOF
24485
24486fi
Jesus Cead54cdf02010-04-28 11:11:36 +000024487rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000024488
24489fi
24490
Martin v. Löwis0daad592001-09-30 21:09:59 +000024491# check for readline 4.0
Benjamin Peterson697cd212010-05-02 16:45:11 +000024492{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
24493$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024494if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000024495 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000024496else
Martin v. Löwis11437992002-04-12 09:54:03 +000024497 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000024498LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024499cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024500/* confdefs.h. */
24501_ACEOF
24502cat confdefs.h >>conftest.$ac_ext
24503cat >>conftest.$ac_ext <<_ACEOF
24504/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024505
Martin v. Löwiseba40652007-08-30 20:10:57 +000024506/* Override any GCC internal prototype to avoid an error.
24507 Use char because int might match the return type of a GCC
24508 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024509#ifdef __cplusplus
24510extern "C"
24511#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024512char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024513int
24514main ()
24515{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024516return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024517 ;
24518 return 0;
24519}
24520_ACEOF
24521rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024522if { (ac_try="$ac_link"
24523case "(($ac_try" in
24524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24525 *) ac_try_echo=$ac_try;;
24526esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024527eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24528$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024529 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024530 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024531 grep -v '^ *+' conftest.er1 >conftest.err
24532 rm -f conftest.er1
24533 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000024534 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024535 (exit $ac_status); } && {
24536 test -z "$ac_c_werror_flag" ||
24537 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000024538 } && test -s conftest$ac_exeext && {
24539 test "$cross_compiling" = yes ||
24540 $as_test_x conftest$ac_exeext
24541 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024542 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000024543else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024544 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024545sed 's/^/| /' conftest.$ac_ext >&5
24546
Martin v. Löwiseba40652007-08-30 20:10:57 +000024547 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000024548fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024549
Benjamin Peterson697cd212010-05-02 16:45:11 +000024550rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000024551rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024552 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024553LIBS=$ac_check_lib_save_LIBS
24554fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000024555{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
24556$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
24557if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024558
Martin v. Löwis11437992002-04-12 09:54:03 +000024559cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024560#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024561_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000024562
Martin v. Löwis0daad592001-09-30 21:09:59 +000024563fi
24564
Michael W. Hudson54241132001-12-07 15:38:26 +000024565
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000024566# also in 4.0
Benjamin Peterson697cd212010-05-02 16:45:11 +000024567{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
24568$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000024569if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000024570 $as_echo_n "(cached) " >&6
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000024571else
24572 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000024573LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000024574cat >conftest.$ac_ext <<_ACEOF
24575/* confdefs.h. */
24576_ACEOF
24577cat confdefs.h >>conftest.$ac_ext
24578cat >>conftest.$ac_ext <<_ACEOF
24579/* end confdefs.h. */
24580
24581/* Override any GCC internal prototype to avoid an error.
24582 Use char because int might match the return type of a GCC
24583 builtin and then its argument prototype would still apply. */
24584#ifdef __cplusplus
24585extern "C"
24586#endif
24587char rl_completion_display_matches_hook ();
24588int
24589main ()
24590{
24591return rl_completion_display_matches_hook ();
24592 ;
24593 return 0;
24594}
24595_ACEOF
24596rm -f conftest.$ac_objext conftest$ac_exeext
24597if { (ac_try="$ac_link"
24598case "(($ac_try" in
24599 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24600 *) ac_try_echo=$ac_try;;
24601esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024602eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24603$as_echo "$ac_try_echo") >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000024604 (eval "$ac_link") 2>conftest.er1
24605 ac_status=$?
24606 grep -v '^ *+' conftest.er1 >conftest.err
24607 rm -f conftest.er1
24608 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000024609 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000024610 (exit $ac_status); } && {
24611 test -z "$ac_c_werror_flag" ||
24612 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000024613 } && test -s conftest$ac_exeext && {
24614 test "$cross_compiling" = yes ||
24615 $as_test_x conftest$ac_exeext
24616 }; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000024617 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
24618else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024619 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000024620sed 's/^/| /' conftest.$ac_ext >&5
24621
24622 ac_cv_lib_readline_rl_completion_display_matches_hook=no
24623fi
24624
Benjamin Peterson697cd212010-05-02 16:45:11 +000024625rm -rf conftest.dSYM
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000024626rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
24627 conftest$ac_exeext conftest.$ac_ext
24628LIBS=$ac_check_lib_save_LIBS
24629fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000024630{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
24631$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
24632if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then
Martin v. Löwis58bd49f2007-09-04 13:13:14 +000024633
24634cat >>confdefs.h <<\_ACEOF
24635#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
24636_ACEOF
24637
24638fi
24639
24640
Martin v. Löwis0daad592001-09-30 21:09:59 +000024641# check for readline 4.2
Benjamin Peterson697cd212010-05-02 16:45:11 +000024642{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
24643$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024644if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000024645 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000024646else
Martin v. Löwis11437992002-04-12 09:54:03 +000024647 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smithff7b2d52008-09-03 05:57:48 +000024648LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000024649cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024650/* confdefs.h. */
24651_ACEOF
24652cat confdefs.h >>conftest.$ac_ext
24653cat >>conftest.$ac_ext <<_ACEOF
24654/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024655
Martin v. Löwiseba40652007-08-30 20:10:57 +000024656/* Override any GCC internal prototype to avoid an error.
24657 Use char because int might match the return type of a GCC
24658 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024659#ifdef __cplusplus
24660extern "C"
24661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000024662char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024663int
24664main ()
24665{
Martin v. Löwiseba40652007-08-30 20:10:57 +000024666return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000024667 ;
24668 return 0;
24669}
24670_ACEOF
24671rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024672if { (ac_try="$ac_link"
24673case "(($ac_try" in
24674 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24675 *) ac_try_echo=$ac_try;;
24676esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024677eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24678$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024679 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024680 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024681 grep -v '^ *+' conftest.er1 >conftest.err
24682 rm -f conftest.er1
24683 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000024684 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024685 (exit $ac_status); } && {
24686 test -z "$ac_c_werror_flag" ||
24687 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000024688 } && test -s conftest$ac_exeext && {
24689 test "$cross_compiling" = yes ||
24690 $as_test_x conftest$ac_exeext
24691 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024692 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000024693else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024694 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024695sed 's/^/| /' conftest.$ac_ext >&5
24696
Martin v. Löwiseba40652007-08-30 20:10:57 +000024697 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000024698fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024699
Benjamin Peterson697cd212010-05-02 16:45:11 +000024700rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000024701rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000024702 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024703LIBS=$ac_check_lib_save_LIBS
24704fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000024705{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
24706$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
24707if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000024708
Martin v. Löwis11437992002-04-12 09:54:03 +000024709cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024710#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024711_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000024712
Guido van Rossum353ae582001-07-10 16:45:32 +000024713fi
24714
Jack Jansendd19cf82001-12-06 22:36:17 +000024715
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024716# also in readline 4.2
24717cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024718/* confdefs.h. */
24719_ACEOF
24720cat confdefs.h >>conftest.$ac_ext
24721cat >>conftest.$ac_ext <<_ACEOF
24722/* end confdefs.h. */
24723#include <readline/readline.h>
24724_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000024725if { (ac_try="$ac_cpp conftest.$ac_ext"
24726case "(($ac_try" in
24727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24728 *) ac_try_echo=$ac_try;;
24729esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024730eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24731$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024732 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024733 ac_status=$?
24734 grep -v '^ *+' conftest.er1 >conftest.err
24735 rm -f conftest.er1
24736 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000024737 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024738 (exit $ac_status); } >/dev/null && {
24739 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24740 test ! -s conftest.err
24741 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024742 have_readline=yes
24743else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024744 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024745sed 's/^/| /' conftest.$ac_ext >&5
24746
24747 have_readline=no
24748fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024749
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024750rm -f conftest.err conftest.$ac_ext
24751if test $have_readline = yes
24752then
24753 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024754/* confdefs.h. */
24755_ACEOF
24756cat confdefs.h >>conftest.$ac_ext
24757cat >>conftest.$ac_ext <<_ACEOF
24758/* end confdefs.h. */
24759#include <readline/readline.h>
24760
24761_ACEOF
24762if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24763 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
24764
24765cat >>confdefs.h <<\_ACEOF
24766#define HAVE_RL_CATCH_SIGNAL 1
24767_ACEOF
24768
24769fi
Jesus Cead54cdf02010-04-28 11:11:36 +000024770rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024771
24772fi
24773
Martin v. Löwis82bca632006-02-10 20:49:30 +000024774# End of readline checks: restore LIBS
24775LIBS=$LIBS_no_readline
24776
Benjamin Peterson697cd212010-05-02 16:45:11 +000024777{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5
24778$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024779if test "${ac_cv_broken_nice+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000024780 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000024781else
Martin v. Löwis11437992002-04-12 09:54:03 +000024782
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024783if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000024784 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024785else
Martin v. Löwis11437992002-04-12 09:54:03 +000024786 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024787/* confdefs.h. */
24788_ACEOF
24789cat confdefs.h >>conftest.$ac_ext
24790cat >>conftest.$ac_ext <<_ACEOF
24791/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024792
24793int main()
24794{
24795 int val1 = nice(1);
24796 if (val1 != -1 && val1 == nice(2))
24797 exit(0);
24798 exit(1);
24799}
24800
Martin v. Löwis11437992002-04-12 09:54:03 +000024801_ACEOF
24802rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024803if { (ac_try="$ac_link"
24804case "(($ac_try" in
24805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24806 *) ac_try_echo=$ac_try;;
24807esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024808eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24809$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024810 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024811 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000024812 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024813 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024814 { (case "(($ac_try" in
24815 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24816 *) ac_try_echo=$ac_try;;
24817esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024818eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24819$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024820 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024821 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000024822 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024823 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024824 ac_cv_broken_nice=yes
24825else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024826 $as_echo "$as_me: program exited with status $ac_status" >&5
24827$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024828sed 's/^/| /' conftest.$ac_ext >&5
24829
Martin v. Löwis11437992002-04-12 09:54:03 +000024830( exit $ac_status )
24831ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024832fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000024833rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000024834rm -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 +000024835fi
24836
Martin v. Löwiseba40652007-08-30 20:10:57 +000024837
24838fi
24839
Benjamin Peterson697cd212010-05-02 16:45:11 +000024840{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
24841$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024842if test "$ac_cv_broken_nice" = yes
24843then
Martin v. Löwis11437992002-04-12 09:54:03 +000024844
24845cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024846#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024847_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000024848
24849fi
24850
Benjamin Peterson697cd212010-05-02 16:45:11 +000024851{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5
24852$as_echo_n "checking for broken poll()... " >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024853if test "$cross_compiling" = yes; then
24854 ac_cv_broken_poll=no
24855else
24856 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024857/* confdefs.h. */
24858_ACEOF
24859cat confdefs.h >>conftest.$ac_ext
24860cat >>conftest.$ac_ext <<_ACEOF
24861/* end confdefs.h. */
24862
24863#include <poll.h>
24864
24865int main (void)
24866 {
24867 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
24868
24869 close (42);
24870
24871 int poll_test = poll (&poll_struct, 1, 0);
24872
24873 if (poll_test < 0)
24874 {
24875 exit(0);
24876 }
24877 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
24878 {
24879 exit(0);
24880 }
24881 else
24882 {
24883 exit(1);
24884 }
24885 }
24886
24887_ACEOF
24888rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024889if { (ac_try="$ac_link"
24890case "(($ac_try" in
24891 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24892 *) ac_try_echo=$ac_try;;
24893esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024894eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24895$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024896 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024897 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000024898 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024899 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000024900 { (case "(($ac_try" in
24901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24902 *) ac_try_echo=$ac_try;;
24903esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024904eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24905$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024906 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024907 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000024908 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024909 (exit $ac_status); }; }; then
24910 ac_cv_broken_poll=yes
24911else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024912 $as_echo "$as_me: program exited with status $ac_status" >&5
24913$as_echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024914sed 's/^/| /' conftest.$ac_ext >&5
24915
24916( exit $ac_status )
24917ac_cv_broken_poll=no
24918fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000024919rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000024920rm -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 +000024921fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000024922
24923
Benjamin Peterson697cd212010-05-02 16:45:11 +000024924{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
24925$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000024926if test "$ac_cv_broken_poll" = yes
24927then
24928
24929cat >>confdefs.h <<\_ACEOF
24930#define HAVE_BROKEN_POLL 1
24931_ACEOF
24932
24933fi
24934
Brett Cannon43802422005-02-10 20:48:03 +000024935# 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 +000024936# (which is not required by ISO C or UNIX spec) and/or if we support
24937# tzname[]
Benjamin Peterson697cd212010-05-02 16:45:11 +000024938{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
24939$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000024940if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000024941 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000024942else
24943 cat >conftest.$ac_ext <<_ACEOF
24944/* confdefs.h. */
24945_ACEOF
24946cat confdefs.h >>conftest.$ac_ext
24947cat >>conftest.$ac_ext <<_ACEOF
24948/* end confdefs.h. */
24949#include <sys/types.h>
24950#include <$ac_cv_struct_tm>
24951
24952
24953int
24954main ()
24955{
24956static struct tm ac_aggr;
24957if (ac_aggr.tm_zone)
24958return 0;
24959 ;
24960 return 0;
24961}
24962_ACEOF
24963rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000024964if { (ac_try="$ac_compile"
24965case "(($ac_try" in
24966 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24967 *) ac_try_echo=$ac_try;;
24968esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000024969eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24970$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024971 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000024972 ac_status=$?
24973 grep -v '^ *+' conftest.er1 >conftest.err
24974 rm -f conftest.er1
24975 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000024976 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000024977 (exit $ac_status); } && {
24978 test -z "$ac_c_werror_flag" ||
24979 test ! -s conftest.err
24980 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000024981 ac_cv_member_struct_tm_tm_zone=yes
24982else
Benjamin Peterson697cd212010-05-02 16:45:11 +000024983 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000024984sed 's/^/| /' conftest.$ac_ext >&5
24985
Martin v. Löwiseba40652007-08-30 20:10:57 +000024986 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000024987/* confdefs.h. */
24988_ACEOF
24989cat confdefs.h >>conftest.$ac_ext
24990cat >>conftest.$ac_ext <<_ACEOF
24991/* end confdefs.h. */
24992#include <sys/types.h>
24993#include <$ac_cv_struct_tm>
24994
24995
24996int
24997main ()
24998{
24999static struct tm ac_aggr;
25000if (sizeof ac_aggr.tm_zone)
25001return 0;
25002 ;
25003 return 0;
25004}
25005_ACEOF
25006rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025007if { (ac_try="$ac_compile"
25008case "(($ac_try" in
25009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25010 *) ac_try_echo=$ac_try;;
25011esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025012eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25013$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025014 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025015 ac_status=$?
25016 grep -v '^ *+' conftest.er1 >conftest.err
25017 rm -f conftest.er1
25018 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000025019 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025020 (exit $ac_status); } && {
25021 test -z "$ac_c_werror_flag" ||
25022 test ! -s conftest.err
25023 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000025024 ac_cv_member_struct_tm_tm_zone=yes
25025else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025026 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025027sed 's/^/| /' conftest.$ac_ext >&5
25028
Martin v. Löwiseba40652007-08-30 20:10:57 +000025029 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000025030fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025031
25032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025033fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025034
25035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000025036fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000025037{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
25038$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
25039if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Brett Cannon43802422005-02-10 20:48:03 +000025040
25041cat >>confdefs.h <<_ACEOF
25042#define HAVE_STRUCT_TM_TM_ZONE 1
25043_ACEOF
25044
25045
25046fi
25047
25048if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25049
25050cat >>confdefs.h <<\_ACEOF
25051#define HAVE_TM_ZONE 1
25052_ACEOF
25053
25054else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025055 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
25056$as_echo_n "checking whether tzname is declared... " >&6; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000025057if test "${ac_cv_have_decl_tzname+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025058 $as_echo_n "(cached) " >&6
Martin v. Löwiseba40652007-08-30 20:10:57 +000025059else
25060 cat >conftest.$ac_ext <<_ACEOF
25061/* confdefs.h. */
25062_ACEOF
25063cat confdefs.h >>conftest.$ac_ext
25064cat >>conftest.$ac_ext <<_ACEOF
25065/* end confdefs.h. */
25066#include <time.h>
25067
25068int
25069main ()
25070{
25071#ifndef tzname
25072 (void) tzname;
25073#endif
25074
25075 ;
25076 return 0;
25077}
25078_ACEOF
25079rm -f conftest.$ac_objext
25080if { (ac_try="$ac_compile"
25081case "(($ac_try" in
25082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25083 *) ac_try_echo=$ac_try;;
25084esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025085eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25086$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025087 (eval "$ac_compile") 2>conftest.er1
25088 ac_status=$?
25089 grep -v '^ *+' conftest.er1 >conftest.err
25090 rm -f conftest.er1
25091 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000025092 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025093 (exit $ac_status); } && {
25094 test -z "$ac_c_werror_flag" ||
25095 test ! -s conftest.err
25096 } && test -s conftest.$ac_objext; then
25097 ac_cv_have_decl_tzname=yes
25098else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025099 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025100sed 's/^/| /' conftest.$ac_ext >&5
25101
25102 ac_cv_have_decl_tzname=no
25103fi
25104
25105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25106fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000025107{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
25108$as_echo "$ac_cv_have_decl_tzname" >&6; }
25109if test "x$ac_cv_have_decl_tzname" = x""yes; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000025110
25111cat >>confdefs.h <<_ACEOF
25112#define HAVE_DECL_TZNAME 1
25113_ACEOF
25114
25115
25116else
25117 cat >>confdefs.h <<_ACEOF
25118#define HAVE_DECL_TZNAME 0
25119_ACEOF
25120
25121
25122fi
25123
25124
Benjamin Peterson697cd212010-05-02 16:45:11 +000025125 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
25126$as_echo_n "checking for tzname... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025127if test "${ac_cv_var_tzname+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025128 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000025129else
25130 cat >conftest.$ac_ext <<_ACEOF
25131/* confdefs.h. */
25132_ACEOF
25133cat confdefs.h >>conftest.$ac_ext
25134cat >>conftest.$ac_ext <<_ACEOF
25135/* end confdefs.h. */
25136#include <time.h>
Martin v. Löwiseba40652007-08-30 20:10:57 +000025137#if !HAVE_DECL_TZNAME
25138extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000025139#endif
25140
25141int
25142main ()
25143{
Martin v. Löwiseba40652007-08-30 20:10:57 +000025144return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000025145 ;
25146 return 0;
25147}
25148_ACEOF
25149rm -f conftest.$ac_objext conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025150if { (ac_try="$ac_link"
25151case "(($ac_try" in
25152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25153 *) ac_try_echo=$ac_try;;
25154esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025155eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25156$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025157 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000025158 ac_status=$?
25159 grep -v '^ *+' conftest.er1 >conftest.err
25160 rm -f conftest.er1
25161 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000025162 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025163 (exit $ac_status); } && {
25164 test -z "$ac_c_werror_flag" ||
25165 test ! -s conftest.err
Benjamin Peterson697cd212010-05-02 16:45:11 +000025166 } && test -s conftest$ac_exeext && {
25167 test "$cross_compiling" = yes ||
25168 $as_test_x conftest$ac_exeext
25169 }; then
Brett Cannon43802422005-02-10 20:48:03 +000025170 ac_cv_var_tzname=yes
25171else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025172 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000025173sed 's/^/| /' conftest.$ac_ext >&5
25174
Martin v. Löwiseba40652007-08-30 20:10:57 +000025175 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000025176fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025177
Benjamin Peterson697cd212010-05-02 16:45:11 +000025178rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000025179rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000025180 conftest$ac_exeext conftest.$ac_ext
25181fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000025182{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
25183$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000025184 if test $ac_cv_var_tzname = yes; then
25185
25186cat >>confdefs.h <<\_ACEOF
25187#define HAVE_TZNAME 1
25188_ACEOF
25189
25190 fi
25191fi
25192
Nicholas Bastine62c5c82004-03-21 23:45:42 +000025193
Martin v. Löwis1d459062005-03-14 21:23:33 +000025194# check tzset(3) exists and works like we expect it to
Benjamin Peterson697cd212010-05-02 16:45:11 +000025195{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5
25196$as_echo_n "checking for working tzset()... " >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025197if test "${ac_cv_working_tzset+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025198 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025199else
25200
25201if test "$cross_compiling" = yes; then
25202 ac_cv_working_tzset=no
25203else
25204 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025205/* confdefs.h. */
25206_ACEOF
25207cat confdefs.h >>conftest.$ac_ext
25208cat >>conftest.$ac_ext <<_ACEOF
25209/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025210
25211#include <stdlib.h>
25212#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000025213#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000025214
25215#if HAVE_TZNAME
25216extern char *tzname[];
25217#endif
25218
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025219int main()
25220{
Brett Cannon18367812003-09-19 00:59:16 +000025221 /* Note that we need to ensure that not only does tzset(3)
25222 do 'something' with localtime, but it works as documented
25223 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000025224 This includes making sure that tzname is set properly if
25225 tm->tm_zone does not exist since it is the alternative way
25226 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000025227
25228 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000025229 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000025230 */
25231
Martin v. Löwis1d459062005-03-14 21:23:33 +000025232 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000025233 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
25234
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025235 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025236 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025237 if (localtime(&groundhogday)->tm_hour != 0)
25238 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025239#if HAVE_TZNAME
25240 /* For UTC, tzname[1] is sometimes "", sometimes " " */
25241 if (strcmp(tzname[0], "UTC") ||
25242 (tzname[1][0] != 0 && tzname[1][0] != ' '))
25243 exit(1);
25244#endif
Brett Cannon18367812003-09-19 00:59:16 +000025245
Neal Norwitz7f2588c2003-04-11 15:35:53 +000025246 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025247 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000025248 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025249 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025250#if HAVE_TZNAME
25251 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
25252 exit(1);
25253#endif
Brett Cannon18367812003-09-19 00:59:16 +000025254
25255 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
25256 tzset();
25257 if (localtime(&groundhogday)->tm_hour != 11)
25258 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025259#if HAVE_TZNAME
25260 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
25261 exit(1);
25262#endif
25263
25264#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000025265 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
25266 exit(1);
25267 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
25268 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000025269#endif
Brett Cannon18367812003-09-19 00:59:16 +000025270
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025271 exit(0);
25272}
25273
25274_ACEOF
25275rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025276if { (ac_try="$ac_link"
25277case "(($ac_try" in
25278 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25279 *) ac_try_echo=$ac_try;;
25280esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025281eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25282$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025283 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025284 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000025285 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025286 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025287 { (case "(($ac_try" in
25288 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25289 *) ac_try_echo=$ac_try;;
25290esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025291eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25292$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025293 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025294 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000025295 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025296 (exit $ac_status); }; }; then
25297 ac_cv_working_tzset=yes
25298else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025299 $as_echo "$as_me: program exited with status $ac_status" >&5
25300$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025301sed 's/^/| /' conftest.$ac_ext >&5
25302
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025303( exit $ac_status )
25304ac_cv_working_tzset=no
25305fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000025306rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000025307rm -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 +000025308fi
25309
Martin v. Löwiseba40652007-08-30 20:10:57 +000025310
25311fi
25312
Benjamin Peterson697cd212010-05-02 16:45:11 +000025313{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
25314$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000025315if test "$ac_cv_working_tzset" = yes
25316then
25317
25318cat >>confdefs.h <<\_ACEOF
25319#define HAVE_WORKING_TZSET 1
25320_ACEOF
25321
25322fi
25323
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025324# Look for subsecond timestamps in struct stat
Benjamin Peterson697cd212010-05-02 16:45:11 +000025325{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
25326$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025327if test "${ac_cv_stat_tv_nsec+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025328 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025329else
25330 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025331/* confdefs.h. */
25332_ACEOF
25333cat confdefs.h >>conftest.$ac_ext
25334cat >>conftest.$ac_ext <<_ACEOF
25335/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025336#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025337int
25338main ()
25339{
25340
25341struct stat st;
25342st.st_mtim.tv_nsec = 1;
25343
25344 ;
25345 return 0;
25346}
25347_ACEOF
25348rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025349if { (ac_try="$ac_compile"
25350case "(($ac_try" in
25351 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25352 *) ac_try_echo=$ac_try;;
25353esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025354eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25355$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025356 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025357 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025358 grep -v '^ *+' conftest.er1 >conftest.err
25359 rm -f conftest.er1
25360 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000025361 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025362 (exit $ac_status); } && {
25363 test -z "$ac_c_werror_flag" ||
25364 test ! -s conftest.err
25365 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000025366 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025367else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025368 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025369sed 's/^/| /' conftest.$ac_ext >&5
25370
Martin v. Löwiseba40652007-08-30 20:10:57 +000025371 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025372fi
25373
Martin v. Löwiseba40652007-08-30 20:10:57 +000025374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25375fi
25376
Benjamin Peterson697cd212010-05-02 16:45:11 +000025377{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
25378$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000025379if test "$ac_cv_stat_tv_nsec" = yes
25380then
25381
25382cat >>confdefs.h <<\_ACEOF
25383#define HAVE_STAT_TV_NSEC 1
25384_ACEOF
25385
25386fi
25387
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025388# Look for BSD style subsecond timestamps in struct stat
Benjamin Peterson697cd212010-05-02 16:45:11 +000025389{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
25390$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025391if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025392 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025393else
25394 cat >conftest.$ac_ext <<_ACEOF
25395/* confdefs.h. */
25396_ACEOF
25397cat confdefs.h >>conftest.$ac_ext
25398cat >>conftest.$ac_ext <<_ACEOF
25399/* end confdefs.h. */
25400#include <sys/stat.h>
25401int
25402main ()
25403{
25404
25405struct stat st;
25406st.st_mtimespec.tv_nsec = 1;
25407
25408 ;
25409 return 0;
25410}
25411_ACEOF
25412rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025413if { (ac_try="$ac_compile"
25414case "(($ac_try" in
25415 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25416 *) ac_try_echo=$ac_try;;
25417esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025418eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25419$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025420 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025421 ac_status=$?
25422 grep -v '^ *+' conftest.er1 >conftest.err
25423 rm -f conftest.er1
25424 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000025425 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025426 (exit $ac_status); } && {
25427 test -z "$ac_c_werror_flag" ||
25428 test ! -s conftest.err
25429 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025430 ac_cv_stat_tv_nsec2=yes
25431else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025432 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025433sed 's/^/| /' conftest.$ac_ext >&5
25434
Martin v. Löwiseba40652007-08-30 20:10:57 +000025435 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025436fi
25437
Martin v. Löwiseba40652007-08-30 20:10:57 +000025438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25439fi
25440
Benjamin Peterson697cd212010-05-02 16:45:11 +000025441{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
25442$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000025443if test "$ac_cv_stat_tv_nsec2" = yes
25444then
25445
25446cat >>confdefs.h <<\_ACEOF
25447#define HAVE_STAT_TV_NSEC2 1
25448_ACEOF
25449
25450fi
25451
Jack Jansen666b1e72001-10-31 12:11:48 +000025452# On HP/UX 11.0, mvwdelch is a block with a return statement
Benjamin Peterson697cd212010-05-02 16:45:11 +000025453{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
25454$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025455if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025456 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025457else
Martin v. Löwis11437992002-04-12 09:54:03 +000025458 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025459/* confdefs.h. */
25460_ACEOF
25461cat confdefs.h >>conftest.$ac_ext
25462cat >>conftest.$ac_ext <<_ACEOF
25463/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025464#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025465int
25466main ()
25467{
Jack Jansen666b1e72001-10-31 12:11:48 +000025468
25469 int rtn;
25470 rtn = mvwdelch(0,0,0);
25471
Martin v. Löwis11437992002-04-12 09:54:03 +000025472 ;
25473 return 0;
25474}
25475_ACEOF
25476rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025477if { (ac_try="$ac_compile"
25478case "(($ac_try" in
25479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25480 *) ac_try_echo=$ac_try;;
25481esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025482eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25483$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025484 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025485 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025486 grep -v '^ *+' conftest.er1 >conftest.err
25487 rm -f conftest.er1
25488 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000025489 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025490 (exit $ac_status); } && {
25491 test -z "$ac_c_werror_flag" ||
25492 test ! -s conftest.err
25493 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025494 ac_cv_mvwdelch_is_expression=yes
25495else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025496 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025497sed 's/^/| /' conftest.$ac_ext >&5
25498
Martin v. Löwiseba40652007-08-30 20:10:57 +000025499 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025500fi
25501
Martin v. Löwiseba40652007-08-30 20:10:57 +000025502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25503fi
25504
Benjamin Peterson697cd212010-05-02 16:45:11 +000025505{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
25506$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000025507
25508if test "$ac_cv_mvwdelch_is_expression" = yes
25509then
Martin v. Löwis11437992002-04-12 09:54:03 +000025510
25511cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025512#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025513_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025514
25515fi
25516
Benjamin Peterson697cd212010-05-02 16:45:11 +000025517{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
25518$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025519if test "${ac_cv_window_has_flags+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025520 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000025521else
Martin v. Löwis11437992002-04-12 09:54:03 +000025522 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025523/* confdefs.h. */
25524_ACEOF
25525cat confdefs.h >>conftest.$ac_ext
25526cat >>conftest.$ac_ext <<_ACEOF
25527/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000025528#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025529int
25530main ()
25531{
Jack Jansen666b1e72001-10-31 12:11:48 +000025532
25533 WINDOW *w;
25534 w->_flags = 0;
25535
Martin v. Löwis11437992002-04-12 09:54:03 +000025536 ;
25537 return 0;
25538}
25539_ACEOF
25540rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025541if { (ac_try="$ac_compile"
25542case "(($ac_try" in
25543 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25544 *) ac_try_echo=$ac_try;;
25545esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025546eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25547$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025548 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025549 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025550 grep -v '^ *+' conftest.er1 >conftest.err
25551 rm -f conftest.er1
25552 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000025553 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025554 (exit $ac_status); } && {
25555 test -z "$ac_c_werror_flag" ||
25556 test ! -s conftest.err
25557 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000025558 ac_cv_window_has_flags=yes
25559else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025560 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025561sed 's/^/| /' conftest.$ac_ext >&5
25562
Martin v. Löwiseba40652007-08-30 20:10:57 +000025563 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000025564fi
25565
Martin v. Löwiseba40652007-08-30 20:10:57 +000025566rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25567fi
25568
Benjamin Peterson697cd212010-05-02 16:45:11 +000025569{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
25570$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000025571
Jack Jansen666b1e72001-10-31 12:11:48 +000025572
25573if test "$ac_cv_window_has_flags" = yes
25574then
Martin v. Löwis11437992002-04-12 09:54:03 +000025575
25576cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025577#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025578_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000025579
25580fi
25581
Benjamin Peterson697cd212010-05-02 16:45:11 +000025582{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5
25583$as_echo_n "checking for is_term_resized... " >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025584cat >conftest.$ac_ext <<_ACEOF
25585/* confdefs.h. */
25586_ACEOF
25587cat confdefs.h >>conftest.$ac_ext
25588cat >>conftest.$ac_ext <<_ACEOF
25589/* end confdefs.h. */
25590#include <curses.h>
25591int
25592main ()
25593{
25594void *x=is_term_resized
25595 ;
25596 return 0;
25597}
25598_ACEOF
25599rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025600if { (ac_try="$ac_compile"
25601case "(($ac_try" in
25602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25603 *) ac_try_echo=$ac_try;;
25604esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025605eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25606$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025607 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000025608 ac_status=$?
25609 grep -v '^ *+' conftest.er1 >conftest.err
25610 rm -f conftest.er1
25611 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000025612 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025613 (exit $ac_status); } && {
25614 test -z "$ac_c_werror_flag" ||
25615 test ! -s conftest.err
25616 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000025617
25618cat >>confdefs.h <<\_ACEOF
25619#define HAVE_CURSES_IS_TERM_RESIZED 1
25620_ACEOF
25621
Benjamin Peterson697cd212010-05-02 16:45:11 +000025622 { $as_echo "$as_me:$LINENO: result: yes" >&5
25623$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025624else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025625 $as_echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000025626sed 's/^/| /' conftest.$ac_ext >&5
25627
Benjamin Peterson697cd212010-05-02 16:45:11 +000025628 { $as_echo "$as_me:$LINENO: result: no" >&5
25629$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025630
25631fi
Walter Dörwald4994d952006-06-19 08:07:50 +000025632
Martin v. Löwiseba40652007-08-30 20:10:57 +000025633rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25634
Benjamin Peterson697cd212010-05-02 16:45:11 +000025635{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5
25636$as_echo_n "checking for resize_term... " >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025637cat >conftest.$ac_ext <<_ACEOF
25638/* confdefs.h. */
25639_ACEOF
25640cat confdefs.h >>conftest.$ac_ext
25641cat >>conftest.$ac_ext <<_ACEOF
25642/* end confdefs.h. */
25643#include <curses.h>
25644int
25645main ()
25646{
25647void *x=resize_term
25648 ;
25649 return 0;
25650}
25651_ACEOF
25652rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025653if { (ac_try="$ac_compile"
25654case "(($ac_try" in
25655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25656 *) ac_try_echo=$ac_try;;
25657esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025658eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25659$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025660 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000025661 ac_status=$?
25662 grep -v '^ *+' conftest.er1 >conftest.err
25663 rm -f conftest.er1
25664 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000025665 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025666 (exit $ac_status); } && {
25667 test -z "$ac_c_werror_flag" ||
25668 test ! -s conftest.err
25669 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000025670
25671cat >>confdefs.h <<\_ACEOF
25672#define HAVE_CURSES_RESIZE_TERM 1
25673_ACEOF
25674
Benjamin Peterson697cd212010-05-02 16:45:11 +000025675 { $as_echo "$as_me:$LINENO: result: yes" >&5
25676$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025677else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025678 $as_echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000025679sed 's/^/| /' conftest.$ac_ext >&5
25680
Benjamin Peterson697cd212010-05-02 16:45:11 +000025681 { $as_echo "$as_me:$LINENO: result: no" >&5
25682$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025683
25684fi
Walter Dörwald4994d952006-06-19 08:07:50 +000025685
Martin v. Löwiseba40652007-08-30 20:10:57 +000025686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25687
Benjamin Peterson697cd212010-05-02 16:45:11 +000025688{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5
25689$as_echo_n "checking for resizeterm... " >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025690cat >conftest.$ac_ext <<_ACEOF
25691/* confdefs.h. */
25692_ACEOF
25693cat confdefs.h >>conftest.$ac_ext
25694cat >>conftest.$ac_ext <<_ACEOF
25695/* end confdefs.h. */
25696#include <curses.h>
25697int
25698main ()
25699{
25700void *x=resizeterm
25701 ;
25702 return 0;
25703}
25704_ACEOF
25705rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025706if { (ac_try="$ac_compile"
25707case "(($ac_try" in
25708 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25709 *) ac_try_echo=$ac_try;;
25710esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025711eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25712$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025713 (eval "$ac_compile") 2>conftest.er1
Walter Dörwald4994d952006-06-19 08:07:50 +000025714 ac_status=$?
25715 grep -v '^ *+' conftest.er1 >conftest.err
25716 rm -f conftest.er1
25717 cat conftest.err >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000025718 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025719 (exit $ac_status); } && {
25720 test -z "$ac_c_werror_flag" ||
25721 test ! -s conftest.err
25722 } && test -s conftest.$ac_objext; then
Walter Dörwald4994d952006-06-19 08:07:50 +000025723
25724cat >>confdefs.h <<\_ACEOF
25725#define HAVE_CURSES_RESIZETERM 1
25726_ACEOF
25727
Benjamin Peterson697cd212010-05-02 16:45:11 +000025728 { $as_echo "$as_me:$LINENO: result: yes" >&5
25729$as_echo "yes" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025730else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025731 $as_echo "$as_me: failed program was:" >&5
Walter Dörwald4994d952006-06-19 08:07:50 +000025732sed 's/^/| /' conftest.$ac_ext >&5
25733
Benjamin Peterson697cd212010-05-02 16:45:11 +000025734 { $as_echo "$as_me:$LINENO: result: no" >&5
25735$as_echo "no" >&6; }
Walter Dörwald4994d952006-06-19 08:07:50 +000025736
25737fi
Walter Dörwald4994d952006-06-19 08:07:50 +000025738
Martin v. Löwiseba40652007-08-30 20:10:57 +000025739rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25740
Benjamin Peterson697cd212010-05-02 16:45:11 +000025741{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
25742$as_echo_n "checking for /dev/ptmx... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025743
25744if test -r /dev/ptmx
25745then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025746 { $as_echo "$as_me:$LINENO: result: yes" >&5
25747$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025748
25749cat >>confdefs.h <<\_ACEOF
25750#define HAVE_DEV_PTMX 1
25751_ACEOF
25752
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025753else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025754 { $as_echo "$as_me:$LINENO: result: no" >&5
25755$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000025756fi
25757
Benjamin Peterson697cd212010-05-02 16:45:11 +000025758{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5
25759$as_echo_n "checking for /dev/ptc... " >&6; }
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025760
25761if test -r /dev/ptc
25762then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025763 { $as_echo "$as_me:$LINENO: result: yes" >&5
25764$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025765
25766cat >>confdefs.h <<\_ACEOF
25767#define HAVE_DEV_PTC 1
25768_ACEOF
25769
Martin v. Löwisfefbc202006-10-17 18:59:23 +000025770else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025771 { $as_echo "$as_me:$LINENO: result: no" >&5
25772$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000025773fi
25774
Benjamin Peterson697cd212010-05-02 16:45:11 +000025775{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
25776$as_echo_n "checking for %zd printf() format support... " >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025777if test "$cross_compiling" = yes; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025778 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
25779$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
25780{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross compiling
Brett Cannon09d12362006-05-11 05:11:33 +000025781See \`config.log' for more details." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000025782$as_echo "$as_me: error: cannot run test program while cross compiling
Brett Cannon09d12362006-05-11 05:11:33 +000025783See \`config.log' for more details." >&2;}
Benjamin Peterson697cd212010-05-02 16:45:11 +000025784 { (exit 1); exit 1; }; }; }
Brett Cannon09d12362006-05-11 05:11:33 +000025785else
25786 cat >conftest.$ac_ext <<_ACEOF
25787/* confdefs.h. */
25788_ACEOF
25789cat confdefs.h >>conftest.$ac_ext
25790cat >>conftest.$ac_ext <<_ACEOF
25791/* end confdefs.h. */
25792#include <stdio.h>
25793#include <stddef.h>
25794#include <string.h>
25795
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025796#ifdef HAVE_SYS_TYPES_H
25797#include <sys/types.h>
25798#endif
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025799
25800#ifdef HAVE_SSIZE_T
25801typedef ssize_t Py_ssize_t;
25802#elif SIZEOF_VOID_P == SIZEOF_LONG
25803typedef long Py_ssize_t;
25804#else
25805typedef int Py_ssize_t;
25806#endif
Brett Cannon09d12362006-05-11 05:11:33 +000025807
Christian Heimesdb3d6cb2007-12-16 21:39:43 +000025808int main()
25809{
25810 char buffer[256];
25811
Brett Cannon09d12362006-05-11 05:11:33 +000025812 if(sprintf(buffer, "%zd", (size_t)123) < 0)
25813 return 1;
25814
Neal Norwitz4a8fbdb2006-09-22 08:16:26 +000025815 if (strcmp(buffer, "123"))
25816 return 1;
25817
25818 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
25819 return 1;
25820
25821 if (strcmp(buffer, "-123"))
Brett Cannon09d12362006-05-11 05:11:33 +000025822 return 1;
25823
25824 return 0;
25825}
25826_ACEOF
25827rm -f conftest$ac_exeext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025828if { (ac_try="$ac_link"
25829case "(($ac_try" in
25830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25831 *) ac_try_echo=$ac_try;;
25832esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025833eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25834$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025835 (eval "$ac_link") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025836 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000025837 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000025838 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Martin v. Löwiseba40652007-08-30 20:10:57 +000025839 { (case "(($ac_try" in
25840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25841 *) ac_try_echo=$ac_try;;
25842esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025843eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25844$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025845 (eval "$ac_try") 2>&5
Brett Cannon09d12362006-05-11 05:11:33 +000025846 ac_status=$?
Benjamin Peterson697cd212010-05-02 16:45:11 +000025847 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000025848 (exit $ac_status); }; }; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025849 { $as_echo "$as_me:$LINENO: result: yes" >&5
25850$as_echo "yes" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025851
25852cat >>confdefs.h <<\_ACEOF
25853#define PY_FORMAT_SIZE_T "z"
25854_ACEOF
25855
25856else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025857 $as_echo "$as_me: program exited with status $ac_status" >&5
25858$as_echo "$as_me: failed program was:" >&5
Brett Cannon09d12362006-05-11 05:11:33 +000025859sed 's/^/| /' conftest.$ac_ext >&5
25860
25861( exit $ac_status )
Benjamin Peterson697cd212010-05-02 16:45:11 +000025862{ $as_echo "$as_me:$LINENO: result: no" >&5
25863$as_echo "no" >&6; }
Brett Cannon09d12362006-05-11 05:11:33 +000025864fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000025865rm -rf conftest.dSYM
Martin v. Löwiseba40652007-08-30 20:10:57 +000025866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Brett Cannon09d12362006-05-11 05:11:33 +000025867fi
25868
Martin v. Löwiseba40652007-08-30 20:10:57 +000025869
25870
Benjamin Peterson697cd212010-05-02 16:45:11 +000025871{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
25872$as_echo_n "checking for socklen_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025873if test "${ac_cv_type_socklen_t+set}" = set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025874 $as_echo_n "(cached) " >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000025875else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025876 ac_cv_type_socklen_t=no
25877cat >conftest.$ac_ext <<_ACEOF
25878/* confdefs.h. */
25879_ACEOF
25880cat confdefs.h >>conftest.$ac_ext
25881cat >>conftest.$ac_ext <<_ACEOF
25882/* end confdefs.h. */
25883
25884#ifdef HAVE_SYS_TYPES_H
25885#include <sys/types.h>
25886#endif
25887#ifdef HAVE_SYS_SOCKET_H
25888#include <sys/socket.h>
25889#endif
25890
25891
25892int
25893main ()
25894{
25895if (sizeof (socklen_t))
25896 return 0;
25897 ;
25898 return 0;
25899}
25900_ACEOF
25901rm -f conftest.$ac_objext
25902if { (ac_try="$ac_compile"
25903case "(($ac_try" in
25904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25905 *) ac_try_echo=$ac_try;;
25906esac
25907eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25908$as_echo "$ac_try_echo") >&5
25909 (eval "$ac_compile") 2>conftest.er1
25910 ac_status=$?
25911 grep -v '^ *+' conftest.er1 >conftest.err
25912 rm -f conftest.er1
25913 cat conftest.err >&5
25914 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25915 (exit $ac_status); } && {
25916 test -z "$ac_c_werror_flag" ||
25917 test ! -s conftest.err
25918 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025919 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025920/* confdefs.h. */
25921_ACEOF
25922cat confdefs.h >>conftest.$ac_ext
25923cat >>conftest.$ac_ext <<_ACEOF
25924/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000025925
25926#ifdef HAVE_SYS_TYPES_H
25927#include <sys/types.h>
25928#endif
25929#ifdef HAVE_SYS_SOCKET_H
25930#include <sys/socket.h>
25931#endif
25932
25933
Martin v. Löwis11437992002-04-12 09:54:03 +000025934int
25935main ()
25936{
Benjamin Peterson697cd212010-05-02 16:45:11 +000025937if (sizeof ((socklen_t)))
25938 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000025939 ;
25940 return 0;
25941}
25942_ACEOF
25943rm -f conftest.$ac_objext
Martin v. Löwiseba40652007-08-30 20:10:57 +000025944if { (ac_try="$ac_compile"
25945case "(($ac_try" in
25946 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25947 *) ac_try_echo=$ac_try;;
25948esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000025949eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25950$as_echo "$ac_try_echo") >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025951 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +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 Peterson697cd212010-05-02 16:45:11 +000025956 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwiseba40652007-08-30 20:10:57 +000025957 (exit $ac_status); } && {
25958 test -z "$ac_c_werror_flag" ||
25959 test ! -s conftest.err
25960 } && test -s conftest.$ac_objext; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000025961 :
Guido van Rossum95713eb2000-05-18 20:53:31 +000025962else
Benjamin Peterson697cd212010-05-02 16:45:11 +000025963 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025964sed 's/^/| /' conftest.$ac_ext >&5
25965
Benjamin Peterson697cd212010-05-02 16:45:11 +000025966 ac_cv_type_socklen_t=yes
25967fi
25968
25969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25970else
25971 $as_echo "$as_me: failed program was:" >&5
25972sed 's/^/| /' conftest.$ac_ext >&5
25973
25974
Guido van Rossum95713eb2000-05-18 20:53:31 +000025975fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000025976
25977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025978fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000025979{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
25980$as_echo "$ac_cv_type_socklen_t" >&6; }
25981if test "x$ac_cv_type_socklen_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025982 :
25983else
Guido van Rossum95713eb2000-05-18 20:53:31 +000025984
Martin v. Löwis01c04012002-11-11 14:58:44 +000025985cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025986#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000025987_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000025988
25989fi
25990
Michael W. Hudson54241132001-12-07 15:38:26 +000025991
Michael W. Hudson54241132001-12-07 15:38:26 +000025992
25993
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000025994for h in `(cd $srcdir;echo Python/thread_*.h)`
25995do
25996 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
25997done
25998
Ronald Oussoren55114422009-11-19 16:37:33 +000025999if test $ac_sys_system = Darwin
26000then
26001 LIBS="$LIBS -framework CoreFoundation"
26002fi
26003
26004
26005
Michael W. Hudson54241132001-12-07 15:38:26 +000026006
Neal Norwitzd24499d2005-12-18 21:36:39 +000026007SRCDIRS="Parser Grammar Objects Python Modules Mac"
Benjamin Peterson697cd212010-05-02 16:45:11 +000026008{ $as_echo "$as_me:$LINENO: checking for build directories" >&5
26009$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026010for dir in $SRCDIRS; do
26011 if test ! -d $dir; then
26012 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000026013 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000026014done
Benjamin Peterson697cd212010-05-02 16:45:11 +000026015{ $as_echo "$as_me:$LINENO: result: done" >&5
26016$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000026017
Guido van Rossum627b2d71993-12-24 10:39:16 +000026018# generate output files
Martin v. Löwiseba40652007-08-30 20:10:57 +000026019ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config"
Martin v. Löwis88afe662002-10-26 13:47:44 +000026020
Martin v. Löwis11437992002-04-12 09:54:03 +000026021cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026022# This file is a shell script that caches the results of configure
26023# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000026024# scripts and configure runs, see configure's option --config-cache.
26025# It is not useful on other systems. If it contains results you don't
26026# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026027#
Martin v. Löwis11437992002-04-12 09:54:03 +000026028# config.status only pays attention to the cache file if you give it
26029# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026030#
Skip Montanaro6dead952003-09-25 14:50:04 +000026031# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000026032# loading this file, other *unset* `ac_cv_foo' will be assigned the
26033# following values.
26034
26035_ACEOF
26036
Guido van Rossumf78abae1997-01-21 22:02:36 +000026037# The following way of writing the cache mishandles newlines in values,
26038# but we know of no workaround that is simple, portable, and efficient.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026039# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026040# Ultrix sh set writes to stderr and can't be redirected directly,
26041# and sets the high bit in the cache file unless we assign to the vars.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026042(
26043 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
26044 eval ac_val=\$$ac_var
26045 case $ac_val in #(
26046 *${as_nl}*)
26047 case $ac_var in #(
Benjamin Peterson697cd212010-05-02 16:45:11 +000026048 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
26049$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026050 esac
26051 case $ac_var in #(
26052 _ | IFS | as_nl) ;; #(
Benjamin Peterson697cd212010-05-02 16:45:11 +000026053 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Martin v. Löwiseba40652007-08-30 20:10:57 +000026054 *) $as_unset $ac_var ;;
26055 esac ;;
26056 esac
26057 done
26058
Martin v. Löwis11437992002-04-12 09:54:03 +000026059 (set) 2>&1 |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026060 case $as_nl`(ac_space=' '; set) 2>&1` in #(
26061 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000026062 # `set' does not quote correctly, so add quotes (double-quote
26063 # substitution turns \\\\ into \\, and sed turns \\ into \).
26064 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026065 "s/'/'\\\\''/g;
26066 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Martin v. Löwiseba40652007-08-30 20:10:57 +000026067 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000026068 *)
26069 # `set' quotes correctly as required by POSIX, so do not add quotes.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026070 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000026071 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026072 esac |
26073 sort
26074) |
Martin v. Löwis11437992002-04-12 09:54:03 +000026075 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000026076 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000026077 t clear
Martin v. Löwiseba40652007-08-30 20:10:57 +000026078 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000026079 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
26080 t end
Martin v. Löwiseba40652007-08-30 20:10:57 +000026081 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
26082 :end' >>confcache
26083if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
26084 if test -w "$cache_file"; then
26085 test "x$cache_file" != "x/dev/null" &&
Benjamin Peterson697cd212010-05-02 16:45:11 +000026086 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
26087$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026088 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026089 else
Benjamin Peterson697cd212010-05-02 16:45:11 +000026090 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
26091$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026092 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026093fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000026094rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000026095
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026096test "x$prefix" = xNONE && prefix=$ac_default_prefix
26097# Let make expand exec_prefix.
26098test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000026099
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026100DEFS=-DHAVE_CONFIG_H
26101
Skip Montanaro6dead952003-09-25 14:50:04 +000026102ac_libobjs=
26103ac_ltlibobjs=
26104for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
26105 # 1. Remove the extension, and $U if already installed.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026106 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Benjamin Peterson697cd212010-05-02 16:45:11 +000026107 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026108 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
26109 # will be set to the directory where LIBOBJS objects are built.
26110 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
26111 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000026112done
26113LIBOBJS=$ac_libobjs
26114
26115LTLIBOBJS=$ac_ltlibobjs
26116
26117
Martin v. Löwis11437992002-04-12 09:54:03 +000026118
Benjamin Peterson697cd212010-05-02 16:45:11 +000026119
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026120: ${CONFIG_STATUS=./config.status}
Benjamin Peterson697cd212010-05-02 16:45:11 +000026121ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000026122ac_clean_files_save=$ac_clean_files
26123ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Benjamin Peterson697cd212010-05-02 16:45:11 +000026124{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
26125$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
26126cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026127#! $SHELL
26128# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026129# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000026130# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000026131# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000026132
Martin v. Löwis11437992002-04-12 09:54:03 +000026133debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000026134ac_cs_recheck=false
26135ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000026136SHELL=\${CONFIG_SHELL-$SHELL}
26137_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000026138
Benjamin Peterson697cd212010-05-02 16:45:11 +000026139cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026140## --------------------- ##
26141## M4sh Initialization. ##
26142## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000026143
Martin v. Löwiseba40652007-08-30 20:10:57 +000026144# Be more Bourne compatible
26145DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000026146if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26147 emulate sh
26148 NULLCMD=:
Benjamin Peterson697cd212010-05-02 16:45:11 +000026149 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000026150 # is contrary to our usage. Disable this feature.
26151 alias -g '${1+"$@"}'='"$@"'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026152 setopt NO_GLOB_SUBST
Skip Montanaro89e975f2007-08-22 19:05:21 +000026153else
Martin v. Löwiseba40652007-08-30 20:10:57 +000026154 case `(set -o) 2>/dev/null` in
26155 *posix*) set -o posix ;;
26156esac
26157
Martin v. Löwis11437992002-04-12 09:54:03 +000026158fi
Michael W. Hudson54241132001-12-07 15:38:26 +000026159
Skip Montanaro6dead952003-09-25 14:50:04 +000026160
Martin v. Löwis11437992002-04-12 09:54:03 +000026161
26162
Martin v. Löwiseba40652007-08-30 20:10:57 +000026163# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000026164# Avoid depending upon Character Ranges.
26165as_cr_letters='abcdefghijklmnopqrstuvwxyz'
26166as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
26167as_cr_Letters=$as_cr_letters$as_cr_LETTERS
26168as_cr_digits='0123456789'
26169as_cr_alnum=$as_cr_Letters$as_cr_digits
26170
Benjamin Peterson697cd212010-05-02 16:45:11 +000026171as_nl='
26172'
26173export as_nl
26174# Printing a long string crashes Solaris 7 /usr/bin/printf.
26175as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
26176as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
26177as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
26178if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
26179 as_echo='printf %s\n'
26180 as_echo_n='printf %s'
26181else
26182 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
26183 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
26184 as_echo_n='/usr/ucb/echo -n'
26185 else
26186 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
26187 as_echo_n_body='eval
26188 arg=$1;
26189 case $arg in
26190 *"$as_nl"*)
26191 expr "X$arg" : "X\\(.*\\)$as_nl";
26192 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
26193 esac;
26194 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
26195 '
26196 export as_echo_n_body
26197 as_echo_n='sh -c $as_echo_n_body as_echo'
26198 fi
26199 export as_echo_body
26200 as_echo='sh -c $as_echo_body as_echo'
26201fi
26202
Martin v. Löwis11437992002-04-12 09:54:03 +000026203# The user is always right.
26204if test "${PATH_SEPARATOR+set}" != set; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000026205 PATH_SEPARATOR=:
26206 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
26207 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
26208 PATH_SEPARATOR=';'
26209 }
Martin v. Löwis11437992002-04-12 09:54:03 +000026210fi
26211
Martin v. Löwiseba40652007-08-30 20:10:57 +000026212# Support unset when possible.
26213if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
26214 as_unset=unset
26215else
26216 as_unset=false
26217fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026218
Martin v. Löwiseba40652007-08-30 20:10:57 +000026219
26220# IFS
26221# We need space, tab and new line, in precisely that order. Quoting is
26222# there to prevent editors from complaining about space-tab.
26223# (If _AS_PATH_WALK were called with IFS unset, it would disable word
26224# splitting by setting IFS to empty value.)
Martin v. Löwiseba40652007-08-30 20:10:57 +000026225IFS=" "" $as_nl"
26226
26227# Find who we are. Look in the path if we contain no directory separator.
26228case $0 in
26229 *[\\/]* ) as_myself=$0 ;;
26230 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000026231for as_dir in $PATH
26232do
26233 IFS=$as_save_IFS
26234 test -z "$as_dir" && as_dir=.
26235 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
26236done
Martin v. Löwiseba40652007-08-30 20:10:57 +000026237IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000026238
Martin v. Löwiseba40652007-08-30 20:10:57 +000026239 ;;
26240esac
26241# We did not find ourselves, most probably we were run as `sh COMMAND'
26242# in which case we are not to be found in the path.
26243if test "x$as_myself" = x; then
26244 as_myself=$0
26245fi
26246if test ! -f "$as_myself"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000026247 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Martin v. Löwiseba40652007-08-30 20:10:57 +000026248 { (exit 1); exit 1; }
26249fi
26250
26251# Work around bugs in pre-3.0 UWIN ksh.
26252for as_var in ENV MAIL MAILPATH
26253do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
26254done
26255PS1='$ '
26256PS2='> '
26257PS4='+ '
26258
26259# NLS nuisances.
Benjamin Peterson697cd212010-05-02 16:45:11 +000026260LC_ALL=C
26261export LC_ALL
26262LANGUAGE=C
26263export LANGUAGE
Martin v. Löwiseba40652007-08-30 20:10:57 +000026264
26265# Required to use basename.
26266if expr a : '\(a\)' >/dev/null 2>&1 &&
26267 test "X`expr 00001 : '.*\(...\)'`" = X001; then
26268 as_expr=expr
26269else
26270 as_expr=false
26271fi
26272
26273if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
26274 as_basename=basename
26275else
26276 as_basename=false
26277fi
26278
26279
26280# Name of the executable.
26281as_me=`$as_basename -- "$0" ||
26282$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
26283 X"$0" : 'X\(//\)$' \| \
26284 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson697cd212010-05-02 16:45:11 +000026285$as_echo X/"$0" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000026286 sed '/^.*\/\([^/][^/]*\)\/*$/{
26287 s//\1/
26288 q
26289 }
26290 /^X\/\(\/\/\)$/{
26291 s//\1/
26292 q
26293 }
26294 /^X\/\(\/\).*/{
26295 s//\1/
26296 q
26297 }
26298 s/.*/./; q'`
26299
26300# CDPATH.
26301$as_unset CDPATH
26302
26303
26304
Martin v. Löwis11437992002-04-12 09:54:03 +000026305 as_lineno_1=$LINENO
26306 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000026307 test "x$as_lineno_1" != "x$as_lineno_2" &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000026308 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000026309
Martin v. Löwis11437992002-04-12 09:54:03 +000026310 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
26311 # uniformly replaced by the line number. The first 'sed' inserts a
Martin v. Löwiseba40652007-08-30 20:10:57 +000026312 # line-number line after each line using $LINENO; the second 'sed'
26313 # does the real work. The second script uses 'N' to pair each
26314 # line-number line with the line containing $LINENO, and appends
26315 # trailing '-' during substitution so that $LINENO is not a special
26316 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000026317 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Martin v. Löwiseba40652007-08-30 20:10:57 +000026318 # scripts with optimization help from Paolo Bonzini. Blame Lee
26319 # E. McMahon (1931-1989) for sed's syntax. :-)
26320 sed -n '
26321 p
26322 /[$]LINENO/=
26323 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000026324 sed '
Martin v. Löwiseba40652007-08-30 20:10:57 +000026325 s/[$]LINENO.*/&-/
26326 t lineno
26327 b
26328 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000026329 N
Martin v. Löwiseba40652007-08-30 20:10:57 +000026330 :loop
26331 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000026332 t loop
Martin v. Löwiseba40652007-08-30 20:10:57 +000026333 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000026334 ' >$as_me.lineno &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000026335 chmod +x "$as_me.lineno" ||
Benjamin Peterson697cd212010-05-02 16:45:11 +000026336 { $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 +000026337 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026338
Martin v. Löwis11437992002-04-12 09:54:03 +000026339 # Don't try to exec as it changes $[0], causing all sort of problems
26340 # (the dirname of $[0] is not the place where we might find the
Martin v. Löwiseba40652007-08-30 20:10:57 +000026341 # original and so on. Autoconf is especially sensitive to this).
26342 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000026343 # Exit status is that of the last command.
26344 exit
26345}
26346
26347
Martin v. Löwiseba40652007-08-30 20:10:57 +000026348if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
26349 as_dirname=dirname
26350else
26351 as_dirname=false
26352fi
26353
26354ECHO_C= ECHO_N= ECHO_T=
26355case `echo -n x` in
26356-n*)
26357 case `echo 'x\c'` in
26358 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
26359 *) ECHO_C='\c';;
26360 esac;;
26361*)
26362 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000026363esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000026364if expr a : '\(a\)' >/dev/null 2>&1 &&
26365 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026366 as_expr=expr
26367else
26368 as_expr=false
26369fi
26370
26371rm -f conf$$ conf$$.exe conf$$.file
Martin v. Löwiseba40652007-08-30 20:10:57 +000026372if test -d conf$$.dir; then
26373 rm -f conf$$.dir/conf$$.file
26374else
26375 rm -f conf$$.dir
Benjamin Peterson697cd212010-05-02 16:45:11 +000026376 mkdir conf$$.dir 2>/dev/null
Martin v. Löwiseba40652007-08-30 20:10:57 +000026377fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000026378if (echo >conf$$.file) 2>/dev/null; then
26379 if ln -s conf$$.file conf$$ 2>/dev/null; then
26380 as_ln_s='ln -s'
26381 # ... but there are two gotchas:
26382 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
26383 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
26384 # In both cases, we have to default to `cp -p'.
26385 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
26386 as_ln_s='cp -p'
26387 elif ln conf$$.file conf$$ 2>/dev/null; then
26388 as_ln_s=ln
26389 else
Martin v. Löwis11437992002-04-12 09:54:03 +000026390 as_ln_s='cp -p'
Benjamin Peterson697cd212010-05-02 16:45:11 +000026391 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000026392else
26393 as_ln_s='cp -p'
26394fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026395rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
26396rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000026397
Skip Montanaro6dead952003-09-25 14:50:04 +000026398if mkdir -p . 2>/dev/null; then
26399 as_mkdir_p=:
26400else
Skip Montanarof0d5f792004-08-15 14:08:23 +000026401 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000026402 as_mkdir_p=false
26403fi
26404
Martin v. Löwiseba40652007-08-30 20:10:57 +000026405if test -x / >/dev/null 2>&1; then
26406 as_test_x='test -x'
26407else
26408 if ls -dL / >/dev/null 2>&1; then
26409 as_ls_L_option=L
26410 else
26411 as_ls_L_option=
26412 fi
26413 as_test_x='
26414 eval sh -c '\''
26415 if test -d "$1"; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000026416 test -d "$1/.";
Martin v. Löwiseba40652007-08-30 20:10:57 +000026417 else
26418 case $1 in
Benjamin Peterson697cd212010-05-02 16:45:11 +000026419 -*)set "./$1";;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026420 esac;
26421 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
26422 ???[sx]*):;;*)false;;esac;fi
26423 '\'' sh
26424 '
26425fi
26426as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000026427
26428# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026429as_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 +000026430
26431# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000026432as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026433
26434
Martin v. Löwis11437992002-04-12 09:54:03 +000026435exec 6>&1
26436
Martin v. Löwiseba40652007-08-30 20:10:57 +000026437# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000026438# report actual input values of CONFIG_FILES etc. instead of their
Martin v. Löwiseba40652007-08-30 20:10:57 +000026439# values after options handling.
26440ac_log="
Neal Norwitz9be57322006-08-18 05:39:20 +000026441This file was extended by python $as_me 2.6, which was
Benjamin Peterson697cd212010-05-02 16:45:11 +000026442generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000026443
26444 CONFIG_FILES = $CONFIG_FILES
26445 CONFIG_HEADERS = $CONFIG_HEADERS
26446 CONFIG_LINKS = $CONFIG_LINKS
26447 CONFIG_COMMANDS = $CONFIG_COMMANDS
26448 $ $0 $@
26449
Martin v. Löwiseba40652007-08-30 20:10:57 +000026450on `(hostname || uname -n) 2>/dev/null | sed 1q`
26451"
26452
Martin v. Löwis11437992002-04-12 09:54:03 +000026453_ACEOF
26454
Benjamin Peterson697cd212010-05-02 16:45:11 +000026455case $ac_config_files in *"
26456"*) set x $ac_config_files; shift; ac_config_files=$*;;
26457esac
26458
26459case $ac_config_headers in *"
26460"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
26461esac
26462
26463
26464cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026465# Files that config.status was made for.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026466config_files="$ac_config_files"
26467config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000026468
Martin v. Löwiseba40652007-08-30 20:10:57 +000026469_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026470
Benjamin Peterson697cd212010-05-02 16:45:11 +000026471cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026472ac_cs_usage="\
26473\`$as_me' instantiates files from templates according to the
26474current configuration.
26475
Benjamin Peterson697cd212010-05-02 16:45:11 +000026476Usage: $0 [OPTION]... [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000026477
26478 -h, --help print this help, then exit
Martin v. Löwiseba40652007-08-30 20:10:57 +000026479 -V, --version print version number and configuration settings, then exit
Benjamin Peterson697cd212010-05-02 16:45:11 +000026480 -q, --quiet, --silent
26481 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000026482 -d, --debug don't remove temporary files
26483 --recheck update $as_me by reconfiguring in the same conditions
Benjamin Peterson697cd212010-05-02 16:45:11 +000026484 --file=FILE[:TEMPLATE]
26485 instantiate the configuration file FILE
26486 --header=FILE[:TEMPLATE]
26487 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000026488
26489Configuration files:
26490$config_files
26491
26492Configuration headers:
26493$config_headers
26494
26495Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaro89e975f2007-08-22 19:05:21 +000026496
Martin v. Löwiseba40652007-08-30 20:10:57 +000026497_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000026498cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026499ac_cs_version="\\
Neal Norwitz9be57322006-08-18 05:39:20 +000026500python config.status 2.6
Benjamin Peterson697cd212010-05-02 16:45:11 +000026501configured by $0, generated by GNU Autoconf 2.63,
26502 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000026503
Benjamin Peterson697cd212010-05-02 16:45:11 +000026504Copyright (C) 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000026505This config.status script is free software; the Free Software Foundation
26506gives unlimited permission to copy, distribute and modify it."
Martin v. Löwiseba40652007-08-30 20:10:57 +000026507
26508ac_pwd='$ac_pwd'
26509srcdir='$srcdir'
26510INSTALL='$INSTALL'
Benjamin Peterson697cd212010-05-02 16:45:11 +000026511test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000026512_ACEOF
26513
Benjamin Peterson697cd212010-05-02 16:45:11 +000026514cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26515# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000026516ac_need_defaults=:
26517while test $# != 0
26518do
26519 case $1 in
26520 --*=*)
Martin v. Löwiseba40652007-08-30 20:10:57 +000026521 ac_option=`expr "X$1" : 'X\([^=]*\)='`
26522 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000026523 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000026524 ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026525 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000026526 ac_option=$1
26527 ac_optarg=$2
26528 ac_shift=shift
26529 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026530 esac
26531
Skip Montanaro6dead952003-09-25 14:50:04 +000026532 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000026533 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000026534 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
26535 ac_cs_recheck=: ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026536 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Benjamin Peterson697cd212010-05-02 16:45:11 +000026537 $as_echo "$ac_cs_version"; exit ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026538 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000026539 debug=: ;;
26540 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000026541 $ac_shift
Benjamin Peterson697cd212010-05-02 16:45:11 +000026542 case $ac_optarg in
26543 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26544 esac
26545 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026546 ac_need_defaults=false;;
26547 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000026548 $ac_shift
Benjamin Peterson697cd212010-05-02 16:45:11 +000026549 case $ac_optarg in
26550 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
26551 esac
26552 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000026553 ac_need_defaults=false;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026554 --he | --h)
26555 # Conflict between --help and --header
Benjamin Peterson697cd212010-05-02 16:45:11 +000026556 { $as_echo "$as_me: error: ambiguous option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000026557Try \`$0 --help' for more information." >&2
26558 { (exit 1); exit 1; }; };;
26559 --help | --hel | -h )
Benjamin Peterson697cd212010-05-02 16:45:11 +000026560 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000026561 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
26562 | -silent | --silent | --silen | --sile | --sil | --si | --s)
26563 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026564
26565 # This is an error.
Benjamin Peterson697cd212010-05-02 16:45:11 +000026566 -*) { $as_echo "$as_me: error: unrecognized option: $1
Martin v. Löwiseba40652007-08-30 20:10:57 +000026567Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026568 { (exit 1); exit 1; }; } ;;
26569
Martin v. Löwiseba40652007-08-30 20:10:57 +000026570 *) ac_config_targets="$ac_config_targets $1"
26571 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000026572
26573 esac
26574 shift
26575done
26576
Skip Montanaro6dead952003-09-25 14:50:04 +000026577ac_configure_extra_args=
26578
26579if $ac_cs_silent; then
26580 exec 6>/dev/null
26581 ac_configure_extra_args="$ac_configure_extra_args --silent"
26582fi
26583
26584_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000026585cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000026586if \$ac_cs_recheck; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000026587 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
26588 shift
26589 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
26590 CONFIG_SHELL='$SHELL'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026591 export CONFIG_SHELL
Benjamin Peterson697cd212010-05-02 16:45:11 +000026592 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000026593fi
26594
Martin v. Löwis11437992002-04-12 09:54:03 +000026595_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000026596cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000026597exec 5>>config.log
26598{
26599 echo
26600 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
26601## Running $as_me. ##
26602_ASBOX
Benjamin Peterson697cd212010-05-02 16:45:11 +000026603 $as_echo "$ac_log"
Martin v. Löwiseba40652007-08-30 20:10:57 +000026604} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026605
Martin v. Löwiseba40652007-08-30 20:10:57 +000026606_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000026607cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000026608_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000026609
Benjamin Peterson697cd212010-05-02 16:45:11 +000026610cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000026611
26612# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000026613for ac_config_target in $ac_config_targets
26614do
Martin v. Löwiseba40652007-08-30 20:10:57 +000026615 case $ac_config_target in
26616 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
26617 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
26618 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
26619 "Mac/IDLE/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/IDLE/Makefile" ;;
Ronald Oussoren580c7fe2008-05-02 19:45:11 +000026620 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
26621 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000026622 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
26623 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
26624
Benjamin Peterson697cd212010-05-02 16:45:11 +000026625 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
26626$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000026627 { (exit 1); exit 1; }; };;
26628 esac
26629done
26630
Martin v. Löwiseba40652007-08-30 20:10:57 +000026631
Martin v. Löwis11437992002-04-12 09:54:03 +000026632# If the user did not use the arguments to specify the items to instantiate,
26633# then the envvar interface is used. Set only those that are not.
26634# We use the long form for the default assignment because of an extremely
26635# bizarre bug on SunOS 4.1.3.
26636if $ac_need_defaults; then
26637 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
26638 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
26639fi
26640
Skip Montanaro6dead952003-09-25 14:50:04 +000026641# Have a temporary directory for convenience. Make it in the build tree
Martin v. Löwiseba40652007-08-30 20:10:57 +000026642# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000026643# creating and moving files from /tmp can sometimes cause problems.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026644# Hook for its removal unless debugging.
26645# Note that there is a small window in which the directory will not be cleaned:
26646# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000026647$debug ||
26648{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026649 tmp=
26650 trap 'exit_status=$?
26651 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
26652' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000026653 trap '{ (exit 1); exit 1; }' 1 2 13 15
26654}
Martin v. Löwis11437992002-04-12 09:54:03 +000026655# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000026656
Martin v. Löwis11437992002-04-12 09:54:03 +000026657{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026658 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026659 test -n "$tmp" && test -d "$tmp"
26660} ||
26661{
Martin v. Löwiseba40652007-08-30 20:10:57 +000026662 tmp=./conf$$-$RANDOM
26663 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000026664} ||
26665{
Benjamin Peterson697cd212010-05-02 16:45:11 +000026666 $as_echo "$as_me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000026667 { (exit 1); exit 1; }
26668}
26669
Benjamin Peterson697cd212010-05-02 16:45:11 +000026670# Set up the scripts for CONFIG_FILES section.
26671# No need to generate them if there are no CONFIG_FILES.
26672# This happens for instance with `./config.status config.h'.
Martin v. Löwiseba40652007-08-30 20:10:57 +000026673if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000026674
Benjamin Peterson697cd212010-05-02 16:45:11 +000026675
26676ac_cr='
26677'
26678ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
26679if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
26680 ac_cs_awk_cr='\\r'
26681else
26682 ac_cs_awk_cr=$ac_cr
26683fi
26684
26685echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000026686_ACEOF
26687
Martin v. Löwiseba40652007-08-30 20:10:57 +000026688
Benjamin Peterson697cd212010-05-02 16:45:11 +000026689{
26690 echo "cat >conf$$subs.awk <<_ACEOF" &&
26691 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
26692 echo "_ACEOF"
26693} >conf$$subs.sh ||
26694 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26695$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26696 { (exit 1); exit 1; }; }
26697ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000026698ac_delim='%!_!# '
26699for ac_last_try in false false false false false :; do
Benjamin Peterson697cd212010-05-02 16:45:11 +000026700 . ./conf$$subs.sh ||
26701 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26702$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
26703 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026704
Benjamin Peterson697cd212010-05-02 16:45:11 +000026705 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
26706 if test $ac_delim_n = $ac_delim_num; then
Martin v. Löwiseba40652007-08-30 20:10:57 +000026707 break
26708 elif $ac_last_try; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000026709 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
26710$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000026711 { (exit 1); exit 1; }; }
26712 else
26713 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000026714 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000026715done
Benjamin Peterson697cd212010-05-02 16:45:11 +000026716rm -f conf$$subs.sh
Martin v. Löwiseba40652007-08-30 20:10:57 +000026717
Benjamin Peterson697cd212010-05-02 16:45:11 +000026718cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26719cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Martin v. Löwiseba40652007-08-30 20:10:57 +000026720_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000026721sed -n '
26722h
26723s/^/S["/; s/!.*/"]=/
26724p
26725g
26726s/^[^!]*!//
26727:repl
26728t repl
26729s/'"$ac_delim"'$//
26730t delim
26731:nl
26732h
26733s/\(.\{148\}\).*/\1/
26734t more1
26735s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
26736p
26737n
26738b repl
26739:more1
26740s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26741p
26742g
26743s/.\{148\}//
26744t nl
26745:delim
26746h
26747s/\(.\{148\}\).*/\1/
26748t more2
26749s/["\\]/\\&/g; s/^/"/; s/$/"/
26750p
26751b
26752:more2
26753s/["\\]/\\&/g; s/^/"/; s/$/"\\/
26754p
26755g
26756s/.\{148\}//
26757t delim
26758' <conf$$subs.awk | sed '
26759/^[^""]/{
26760 N
26761 s/\n//
26762}
26763' >>$CONFIG_STATUS || ac_write_fail=1
26764rm -f conf$$subs.awk
26765cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26766_ACAWK
26767cat >>"\$tmp/subs1.awk" <<_ACAWK &&
26768 for (key in S) S_is_set[key] = 1
26769 FS = ""
26770
26771}
26772{
26773 line = $ 0
26774 nfields = split(line, field, "@")
26775 substed = 0
26776 len = length(field[1])
26777 for (i = 2; i < nfields; i++) {
26778 key = field[i]
26779 keylen = length(key)
26780 if (S_is_set[key]) {
26781 value = S[key]
26782 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
26783 len += length(value) + length(field[++i])
26784 substed = 1
26785 } else
26786 len += 1 + keylen
26787 }
26788
26789 print line
26790}
26791
26792_ACAWK
Martin v. Löwiseba40652007-08-30 20:10:57 +000026793_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000026794cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26795if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
26796 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
26797else
26798 cat
26799fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
26800 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
26801$as_echo "$as_me: error: could not setup config files machinery" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000026802 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000026803_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026804
26805# VPATH may cause trouble with some makes, so we remove $(srcdir),
26806# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
26807# trailing colons and then remove the whole line if VPATH becomes empty
26808# (actually we leave an empty line to preserve line numbers).
26809if test "x$srcdir" = x.; then
26810 ac_vpsub='/^[ ]*VPATH[ ]*=/{
26811s/:*\$(srcdir):*/:/
26812s/:*\${srcdir}:*/:/
26813s/:*@srcdir@:*/:/
26814s/^\([^=]*=[ ]*\):*/\1/
26815s/:*$//
26816s/^[^=]*=[ ]*$//
26817}'
26818fi
26819
Benjamin Peterson697cd212010-05-02 16:45:11 +000026820cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000026821fi # test -n "$CONFIG_FILES"
26822
Benjamin Peterson697cd212010-05-02 16:45:11 +000026823# Set up the scripts for CONFIG_HEADERS section.
26824# No need to generate them if there are no CONFIG_HEADERS.
26825# This happens for instance with `./config.status Makefile'.
26826if test -n "$CONFIG_HEADERS"; then
26827cat >"$tmp/defines.awk" <<\_ACAWK ||
26828BEGIN {
26829_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000026830
Benjamin Peterson697cd212010-05-02 16:45:11 +000026831# Transform confdefs.h into an awk script `defines.awk', embedded as
26832# here-document in config.status, that substitutes the proper values into
26833# config.h.in to produce config.h.
26834
26835# Create a delimiter string that does not exist in confdefs.h, to ease
26836# handling of long lines.
26837ac_delim='%!_!# '
26838for ac_last_try in false false :; do
26839 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
26840 if test -z "$ac_t"; then
26841 break
26842 elif $ac_last_try; then
26843 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
26844$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
26845 { (exit 1); exit 1; }; }
26846 else
26847 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
26848 fi
26849done
26850
26851# For the awk script, D is an array of macro values keyed by name,
26852# likewise P contains macro parameters if any. Preserve backslash
26853# newline sequences.
26854
26855ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
26856sed -n '
26857s/.\{148\}/&'"$ac_delim"'/g
26858t rset
26859:rset
26860s/^[ ]*#[ ]*define[ ][ ]*/ /
26861t def
26862d
26863:def
26864s/\\$//
26865t bsnl
26866s/["\\]/\\&/g
26867s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26868D["\1"]=" \3"/p
26869s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
26870d
26871:bsnl
26872s/["\\]/\\&/g
26873s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
26874D["\1"]=" \3\\\\\\n"\\/p
26875t cont
26876s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
26877t cont
26878d
26879:cont
26880n
26881s/.\{148\}/&'"$ac_delim"'/g
26882t clear
26883:clear
26884s/\\$//
26885t bsnlc
26886s/["\\]/\\&/g; s/^/"/; s/$/"/p
26887d
26888:bsnlc
26889s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
26890b cont
26891' <confdefs.h | sed '
26892s/'"$ac_delim"'/"\\\
26893"/g' >>$CONFIG_STATUS || ac_write_fail=1
26894
26895cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
26896 for (key in D) D_is_set[key] = 1
26897 FS = ""
26898}
26899/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
26900 line = \$ 0
26901 split(line, arg, " ")
26902 if (arg[1] == "#") {
26903 defundef = arg[2]
26904 mac1 = arg[3]
26905 } else {
26906 defundef = substr(arg[1], 2)
26907 mac1 = arg[2]
26908 }
26909 split(mac1, mac2, "(") #)
26910 macro = mac2[1]
26911 prefix = substr(line, 1, index(line, defundef) - 1)
26912 if (D_is_set[macro]) {
26913 # Preserve the white space surrounding the "#".
26914 print prefix "define", macro P[macro] D[macro]
26915 next
26916 } else {
26917 # Replace #undef with comments. This is necessary, for example,
26918 # in the case of _POSIX_SOURCE, which is predefined and required
26919 # on some systems where configure will not decide to define it.
26920 if (defundef == "undef") {
26921 print "/*", prefix defundef, macro, "*/"
26922 next
26923 }
26924 }
26925}
26926{ print }
26927_ACAWK
26928_ACEOF
26929cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
26930 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
26931$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
26932 { (exit 1); exit 1; }; }
26933fi # test -n "$CONFIG_HEADERS"
26934
26935
26936eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
26937shift
26938for ac_tag
Martin v. Löwiseba40652007-08-30 20:10:57 +000026939do
26940 case $ac_tag in
26941 :[FHLC]) ac_mode=$ac_tag; continue;;
26942 esac
26943 case $ac_mode$ac_tag in
26944 :[FHL]*:*);;
Benjamin Peterson697cd212010-05-02 16:45:11 +000026945 :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
26946$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000026947 { (exit 1); exit 1; }; };;
26948 :[FH]-) ac_tag=-:-;;
26949 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
26950 esac
26951 ac_save_IFS=$IFS
26952 IFS=:
26953 set x $ac_tag
26954 IFS=$ac_save_IFS
26955 shift
26956 ac_file=$1
26957 shift
26958
26959 case $ac_mode in
26960 :L) ac_source=$1;;
26961 :[FH])
26962 ac_file_inputs=
26963 for ac_f
26964 do
26965 case $ac_f in
26966 -) ac_f="$tmp/stdin";;
26967 *) # Look for the file first in the build tree, then in the source tree
26968 # (if the path is not absolute). The absolute path cannot be DOS-style,
26969 # because $ac_f cannot contain `:'.
26970 test -f "$ac_f" ||
26971 case $ac_f in
26972 [\\/$]*) false;;
26973 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
26974 esac ||
Benjamin Peterson697cd212010-05-02 16:45:11 +000026975 { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
26976$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000026977 { (exit 1); exit 1; }; };;
26978 esac
Benjamin Peterson697cd212010-05-02 16:45:11 +000026979 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
26980 ac_file_inputs="$ac_file_inputs '$ac_f'"
Martin v. Löwiseba40652007-08-30 20:10:57 +000026981 done
26982
26983 # Let's still pretend it is `configure' which instantiates (i.e., don't
26984 # use $as_me), people would be surprised to read:
26985 # /* config.h. Generated by config.status. */
Benjamin Peterson697cd212010-05-02 16:45:11 +000026986 configure_input='Generated from '`
26987 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
26988 `' by configure.'
Martin v. Löwiseba40652007-08-30 20:10:57 +000026989 if test x"$ac_file" != x-; then
26990 configure_input="$ac_file. $configure_input"
Benjamin Peterson697cd212010-05-02 16:45:11 +000026991 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
26992$as_echo "$as_me: creating $ac_file" >&6;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000026993 fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000026994 # Neutralize special characters interpreted by sed in replacement strings.
26995 case $configure_input in #(
26996 *\&* | *\|* | *\\* )
26997 ac_sed_conf_input=`$as_echo "$configure_input" |
26998 sed 's/[\\\\&|]/\\\\&/g'`;; #(
26999 *) ac_sed_conf_input=$configure_input;;
27000 esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027001
27002 case $ac_tag in
Benjamin Peterson697cd212010-05-02 16:45:11 +000027003 *:-:* | *:-) cat >"$tmp/stdin" \
27004 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27005$as_echo "$as_me: error: could not create $ac_file" >&2;}
27006 { (exit 1); exit 1; }; } ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027007 esac
27008 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027009 esac
27010
Martin v. Löwiseba40652007-08-30 20:10:57 +000027011 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000027012$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027013 X"$ac_file" : 'X\(//\)[^/]' \| \
27014 X"$ac_file" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027015 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson697cd212010-05-02 16:45:11 +000027016$as_echo X"$ac_file" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027017 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27018 s//\1/
27019 q
27020 }
27021 /^X\(\/\/\)[^/].*/{
27022 s//\1/
27023 q
27024 }
27025 /^X\(\/\/\)$/{
27026 s//\1/
27027 q
27028 }
27029 /^X\(\/\).*/{
27030 s//\1/
27031 q
27032 }
27033 s/.*/./; q'`
27034 { as_dir="$ac_dir"
27035 case $as_dir in #(
27036 -*) as_dir=./$as_dir;;
27037 esac
27038 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000027039 as_dirs=
Martin v. Löwiseba40652007-08-30 20:10:57 +000027040 while :; do
27041 case $as_dir in #(
Benjamin Peterson697cd212010-05-02 16:45:11 +000027042 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Martin v. Löwiseba40652007-08-30 20:10:57 +000027043 *) as_qdir=$as_dir;;
27044 esac
27045 as_dirs="'$as_qdir' $as_dirs"
27046 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000027047$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027048 X"$as_dir" : 'X\(//\)[^/]' \| \
27049 X"$as_dir" : 'X\(//\)$' \| \
Martin v. Löwiseba40652007-08-30 20:10:57 +000027050 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson697cd212010-05-02 16:45:11 +000027051$as_echo X"$as_dir" |
Martin v. Löwiseba40652007-08-30 20:10:57 +000027052 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
27053 s//\1/
27054 q
27055 }
27056 /^X\(\/\/\)[^/].*/{
27057 s//\1/
27058 q
27059 }
27060 /^X\(\/\/\)$/{
27061 s//\1/
27062 q
27063 }
27064 /^X\(\/\).*/{
27065 s//\1/
27066 q
27067 }
27068 s/.*/./; q'`
27069 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000027070 done
Martin v. Löwiseba40652007-08-30 20:10:57 +000027071 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson697cd212010-05-02 16:45:11 +000027072 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
27073$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000027074 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027075 ac_builddir=.
27076
Martin v. Löwiseba40652007-08-30 20:10:57 +000027077case "$ac_dir" in
27078.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
27079*)
Benjamin Peterson697cd212010-05-02 16:45:11 +000027080 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027081 # A ".." for each directory in $ac_dir_suffix.
Benjamin Peterson697cd212010-05-02 16:45:11 +000027082 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Martin v. Löwiseba40652007-08-30 20:10:57 +000027083 case $ac_top_builddir_sub in
27084 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
27085 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
27086 esac ;;
27087esac
27088ac_abs_top_builddir=$ac_pwd
27089ac_abs_builddir=$ac_pwd$ac_dir_suffix
27090# for backward compatibility:
27091ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000027092
27093case $srcdir in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027094 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000027095 ac_srcdir=.
Martin v. Löwiseba40652007-08-30 20:10:57 +000027096 ac_top_srcdir=$ac_top_builddir_sub
27097 ac_abs_top_srcdir=$ac_pwd ;;
27098 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000027099 ac_srcdir=$srcdir$ac_dir_suffix;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027100 ac_top_srcdir=$srcdir
27101 ac_abs_top_srcdir=$srcdir ;;
27102 *) # Relative name.
27103 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
27104 ac_top_srcdir=$ac_top_build_prefix$srcdir
27105 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027106esac
Martin v. Löwiseba40652007-08-30 20:10:57 +000027107ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000027108
Martin v. Löwis11437992002-04-12 09:54:03 +000027109
Martin v. Löwiseba40652007-08-30 20:10:57 +000027110 case $ac_mode in
27111 :F)
27112 #
27113 # CONFIG_FILE
27114 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027115
27116 case $INSTALL in
27117 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Martin v. Löwiseba40652007-08-30 20:10:57 +000027118 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027119 esac
Brett Cannon19fab762007-06-02 03:02:29 +000027120_ACEOF
Martin v. Löwiseba40652007-08-30 20:10:57 +000027121
Benjamin Peterson697cd212010-05-02 16:45:11 +000027122cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027123# If the template does not know about datarootdir, expand it.
27124# FIXME: This hack should be removed a few years after 2.60.
27125ac_datarootdir_hack=; ac_datarootdir_seen=
27126
Benjamin Peterson697cd212010-05-02 16:45:11 +000027127ac_sed_dataroot='
27128/datarootdir/ {
Martin v. Löwiseba40652007-08-30 20:10:57 +000027129 p
27130 q
27131}
27132/@datadir@/p
27133/@docdir@/p
27134/@infodir@/p
27135/@localedir@/p
27136/@mandir@/p
Benjamin Peterson697cd212010-05-02 16:45:11 +000027137'
27138case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Martin v. Löwiseba40652007-08-30 20:10:57 +000027139*datarootdir*) ac_datarootdir_seen=yes;;
27140*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Benjamin Peterson697cd212010-05-02 16:45:11 +000027141 { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
27142$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Martin v. Löwiseba40652007-08-30 20:10:57 +000027143_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000027144cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwiseba40652007-08-30 20:10:57 +000027145 ac_datarootdir_hack='
27146 s&@datadir@&$datadir&g
27147 s&@docdir@&$docdir&g
27148 s&@infodir@&$infodir&g
27149 s&@localedir@&$localedir&g
27150 s&@mandir@&$mandir&g
27151 s&\\\${datarootdir}&$datarootdir&g' ;;
27152esac
27153_ACEOF
27154
27155# Neutralize VPATH when `$srcdir' = `.'.
27156# Shell code in configure.ac might set extrasub.
27157# FIXME: do we really want to maintain this feature?
Benjamin Peterson697cd212010-05-02 16:45:11 +000027158cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
27159ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000027160$extrasub
27161_ACEOF
Benjamin Peterson697cd212010-05-02 16:45:11 +000027162cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027163:t
27164/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Benjamin Peterson697cd212010-05-02 16:45:11 +000027165s|@configure_input@|$ac_sed_conf_input|;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000027166s&@top_builddir@&$ac_top_builddir_sub&;t t
Benjamin Peterson697cd212010-05-02 16:45:11 +000027167s&@top_build_prefix@&$ac_top_build_prefix&;t t
Martin v. Löwiseba40652007-08-30 20:10:57 +000027168s&@srcdir@&$ac_srcdir&;t t
27169s&@abs_srcdir@&$ac_abs_srcdir&;t t
27170s&@top_srcdir@&$ac_top_srcdir&;t t
27171s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
27172s&@builddir@&$ac_builddir&;t t
27173s&@abs_builddir@&$ac_abs_builddir&;t t
27174s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
27175s&@INSTALL@&$ac_INSTALL&;t t
27176$ac_datarootdir_hack
Benjamin Peterson697cd212010-05-02 16:45:11 +000027177"
27178eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
27179 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27180$as_echo "$as_me: error: could not create $ac_file" >&2;}
27181 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027182
Martin v. Löwiseba40652007-08-30 20:10:57 +000027183test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
27184 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
27185 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Benjamin Peterson697cd212010-05-02 16:45:11 +000027186 { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027187which seems to be undefined. Please make sure it is defined." >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000027188$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Martin v. Löwiseba40652007-08-30 20:10:57 +000027189which seems to be undefined. Please make sure it is defined." >&2;}
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027190
Martin v. Löwiseba40652007-08-30 20:10:57 +000027191 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000027192 case $ac_file in
Benjamin Peterson697cd212010-05-02 16:45:11 +000027193 -) cat "$tmp/out" && rm -f "$tmp/out";;
27194 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
27195 esac \
27196 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27197$as_echo "$as_me: error: could not create $ac_file" >&2;}
27198 { (exit 1); exit 1; }; }
Martin v. Löwiseba40652007-08-30 20:10:57 +000027199 ;;
27200 :H)
27201 #
27202 # CONFIG_HEADER
27203 #
Martin v. Löwis11437992002-04-12 09:54:03 +000027204 if test x"$ac_file" != x-; then
Benjamin Peterson697cd212010-05-02 16:45:11 +000027205 {
27206 $as_echo "/* $configure_input */" \
27207 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
27208 } >"$tmp/config.h" \
27209 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27210$as_echo "$as_me: error: could not create $ac_file" >&2;}
27211 { (exit 1); exit 1; }; }
27212 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
27213 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
27214$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027215 else
Benjamin Peterson697cd212010-05-02 16:45:11 +000027216 rm -f "$ac_file"
27217 mv "$tmp/config.h" "$ac_file" \
27218 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
27219$as_echo "$as_me: error: could not create $ac_file" >&2;}
27220 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027221 fi
27222 else
Benjamin Peterson697cd212010-05-02 16:45:11 +000027223 $as_echo "/* $configure_input */" \
27224 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
27225 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
27226$as_echo "$as_me: error: could not create -" >&2;}
27227 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027228 fi
Martin v. Löwiseba40652007-08-30 20:10:57 +000027229 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000027230
Martin v. Löwiseba40652007-08-30 20:10:57 +000027231
27232 esac
27233
27234done # for ac_tag
27235
Guido van Rossum627b2d71993-12-24 10:39:16 +000027236
Martin v. Löwis11437992002-04-12 09:54:03 +000027237{ (exit 0); exit 0; }
27238_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027239chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000027240ac_clean_files=$ac_clean_files_save
27241
Benjamin Peterson697cd212010-05-02 16:45:11 +000027242test $ac_write_fail = 0 ||
27243 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
27244$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
27245 { (exit 1); exit 1; }; }
27246
Martin v. Löwis11437992002-04-12 09:54:03 +000027247
27248# configure is writing to config.log, and then calls config.status.
27249# config.status does its own redirection, appending to config.log.
27250# Unfortunately, on DOS this fails, as config.log is still kept open
27251# by configure, so config.status won't be able to write to it; its
27252# output is simply discarded. So we exec the FD to /dev/null,
27253# effectively closing config.log, so it can be properly (re)opened and
27254# appended to by config.status. When coming back to configure, we
27255# need to make the FD available again.
27256if test "$no_create" != yes; then
27257 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000027258 ac_config_status_args=
27259 test "$silent" = yes &&
27260 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000027261 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000027262 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027263 exec 5>>config.log
27264 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
27265 # would make configure fail if this is the last instruction.
27266 $ac_cs_success || { (exit 1); exit 1; }
27267fi
Benjamin Peterson697cd212010-05-02 16:45:11 +000027268if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
27269 { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
27270$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
27271fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000027272
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027273
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027274echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027275if test ! -f Modules/Setup
27276then
27277 cp $srcdir/Modules/Setup.dist Modules/Setup
27278fi
27279
Martin v. Löwisf7afe952006-04-14 15:16:15 +000027280echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000027281if test ! -f Modules/Setup.local
27282then
27283 echo "# Edit this file for local setup changes" >Modules/Setup.local
27284fi
27285
27286echo "creating Makefile"
27287$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
27288 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000027289 Modules/Setup.local Modules/Setup
Skip Montanaro89e975f2007-08-22 19:05:21 +000027290
27291case $ac_sys_system in
27292BeOS)
Benjamin Peterson697cd212010-05-02 16:45:11 +000027293 { $as_echo "$as_me:$LINENO: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027294
27295 Support for BeOS is deprecated as of Python 2.6.
27296 See PEP 11 for the gory details.
27297 " >&5
Benjamin Peterson697cd212010-05-02 16:45:11 +000027298$as_echo "$as_me: WARNING:
Skip Montanaro89e975f2007-08-22 19:05:21 +000027299
27300 Support for BeOS is deprecated as of Python 2.6.
27301 See PEP 11 for the gory details.
27302 " >&2;}
27303 ;;
27304*) ;;
27305esac
27306
Neil Schemenauerc761fc82001-02-19 04:50:49 +000027307mv config.c Modules