blob: 8166849753cad6b7ff1d8bd15d17723ed7b338b0 [file] [log] [blame]
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +00001#! /bin/sh
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002# From configure.in Revision: 74713 .
Guido van Rossum627b2d71993-12-24 10:39:16 +00003# Guess values for system-dependent variables and create Makefiles.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004# Generated by GNU Autoconf 2.63 for python 3.2.
Guido van Rossum76be6ed1995-01-02 18:33:54 +00005#
Georg Brandle2e15612009-05-20 18:25:10 +00006# Report bugs to <http://bugs.python.org/>.
Martin v. Löwis1d459062005-03-14 21:23:33 +00007#
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000010# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it.
Martin v. Löwis11437992002-04-12 09:54:03 +000012## --------------------- ##
13## M4sh Initialization. ##
14## --------------------- ##
15
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000018if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
19 emulate sh
20 NULLCMD=:
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000022 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000025else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026 case `(set -o) 2>/dev/null` in
27 *posix*) set -o posix ;;
28esac
29
Martin v. Löwis11437992002-04-12 09:54:03 +000030fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000031
32
Martin v. Löwis11437992002-04-12 09:54:03 +000033
Martin v. Löwis11437992002-04-12 09:54:03 +000034
Thomas Wouters47b49bf2007-08-30 22:15:33 +000035# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000036# Avoid depending upon Character Ranges.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS
40as_cr_digits='0123456789'
41as_cr_alnum=$as_cr_Letters$as_cr_digits
42
Benjamin Peterson8719ad52009-09-11 22:24:02 +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 Peterson8719ad52009-09-11 22:24:02 +000077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Martin v. Löwis11437992002-04-12 09:54:03 +000082fi
83
Thomas Wouters47b49bf2007-08-30 22:15:33 +000084# Support unset when possible.
85if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
86 as_unset=unset
87else
88 as_unset=false
89fi
Martin v. Löwis11437992002-04-12 09:54:03 +000090
Thomas Wouters47b49bf2007-08-30 22:15:33 +000091
92# IFS
93# We need space, tab and new line, in precisely that order. Quoting is
94# there to prevent editors from complaining about space-tab.
95# (If _AS_PATH_WALK were called with IFS unset, it would disable word
96# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000097IFS=" "" $as_nl"
98
99# Find who we are. Look in the path if we contain no directory separator.
100case $0 in
101 *[\\/]* ) as_myself=$0 ;;
102 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +0000103for as_dir in $PATH
104do
105 IFS=$as_save_IFS
106 test -z "$as_dir" && as_dir=.
107 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
108done
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000109IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +0000110
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000111 ;;
112esac
113# We did not find ourselves, most probably we were run as `sh COMMAND'
114# in which case we are not to be found in the path.
115if test "x$as_myself" = x; then
116 as_myself=$0
117fi
118if test ! -f "$as_myself"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000119 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000120 { (exit 1); exit 1; }
121fi
122
123# Work around bugs in pre-3.0 UWIN ksh.
124for as_var in ENV MAIL MAILPATH
125do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
126done
127PS1='$ '
128PS2='> '
129PS4='+ '
130
131# NLS nuisances.
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000132LC_ALL=C
133export LC_ALL
134LANGUAGE=C
135export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000136
137# Required to use basename.
138if expr a : '\(a\)' >/dev/null 2>&1 &&
139 test "X`expr 00001 : '.*\(...\)'`" = X001; then
140 as_expr=expr
141else
142 as_expr=false
143fi
144
145if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
146 as_basename=basename
147else
148 as_basename=false
149fi
150
151
152# Name of the executable.
153as_me=`$as_basename -- "$0" ||
154$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
155 X"$0" : 'X\(//\)$' \| \
156 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000157$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000158 sed '/^.*\/\([^/][^/]*\)\/*$/{
159 s//\1/
160 q
161 }
162 /^X\/\(\/\/\)$/{
163 s//\1/
164 q
165 }
166 /^X\/\(\/\).*/{
167 s//\1/
168 q
169 }
170 s/.*/./; q'`
171
172# CDPATH.
173$as_unset CDPATH
174
175
176if test "x$CONFIG_SHELL" = x; then
177 if (eval ":") 2>/dev/null; then
178 as_have_required=yes
179else
180 as_have_required=no
181fi
182
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000183 if test $as_have_required = yes && (eval ":
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000184(as_func_return () {
185 (exit \$1)
186}
187as_func_success () {
188 as_func_return 0
189}
190as_func_failure () {
191 as_func_return 1
192}
193as_func_ret_success () {
194 return 0
195}
196as_func_ret_failure () {
197 return 1
198}
199
200exitcode=0
201if as_func_success; then
202 :
203else
204 exitcode=1
205 echo as_func_success failed.
206fi
207
208if as_func_failure; then
209 exitcode=1
210 echo as_func_failure succeeded.
211fi
212
213if as_func_ret_success; then
214 :
215else
216 exitcode=1
217 echo as_func_ret_success failed.
218fi
219
220if as_func_ret_failure; then
221 exitcode=1
222 echo as_func_ret_failure succeeded.
223fi
224
225if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
226 :
227else
228 exitcode=1
229 echo positional parameters were not saved.
230fi
231
232test \$exitcode = 0) || { (exit 1); exit 1; }
233
234(
235 as_lineno_1=\$LINENO
236 as_lineno_2=\$LINENO
237 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
238 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
239") 2> /dev/null; then
240 :
241else
242 as_candidate_shells=
Martin v. Löwis11437992002-04-12 09:54:03 +0000243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters89f507f2006-12-13 04:49:30 +0000244for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
Martin v. Löwis11437992002-04-12 09:54:03 +0000245do
246 IFS=$as_save_IFS
247 test -z "$as_dir" && as_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000248 case $as_dir in
Martin v. Löwis11437992002-04-12 09:54:03 +0000249 /*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000250 for as_base in sh bash ksh sh5; do
251 as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
252 done;;
253 esac
254done
255IFS=$as_save_IFS
256
257
258 for as_shell in $as_candidate_shells $SHELL; do
259 # Try only shells that exist, to save several forks.
260 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
261 { ("$as_shell") 2> /dev/null <<\_ASEOF
262if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
263 emulate sh
264 NULLCMD=:
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000265 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000266 # is contrary to our usage. Disable this feature.
267 alias -g '${1+"$@"}'='"$@"'
268 setopt NO_GLOB_SUBST
269else
270 case `(set -o) 2>/dev/null` in
271 *posix*) set -o posix ;;
272esac
273
274fi
275
276
277:
278_ASEOF
279}; then
280 CONFIG_SHELL=$as_shell
281 as_have_required=yes
282 if { "$as_shell" 2> /dev/null <<\_ASEOF
283if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
284 emulate sh
285 NULLCMD=:
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000286 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000287 # is contrary to our usage. Disable this feature.
288 alias -g '${1+"$@"}'='"$@"'
289 setopt NO_GLOB_SUBST
290else
291 case `(set -o) 2>/dev/null` in
292 *posix*) set -o posix ;;
293esac
294
295fi
296
297
298:
299(as_func_return () {
300 (exit $1)
301}
302as_func_success () {
303 as_func_return 0
304}
305as_func_failure () {
306 as_func_return 1
307}
308as_func_ret_success () {
309 return 0
310}
311as_func_ret_failure () {
312 return 1
313}
314
315exitcode=0
316if as_func_success; then
317 :
318else
319 exitcode=1
320 echo as_func_success failed.
321fi
322
323if as_func_failure; then
324 exitcode=1
325 echo as_func_failure succeeded.
326fi
327
328if as_func_ret_success; then
329 :
330else
331 exitcode=1
332 echo as_func_ret_success failed.
333fi
334
335if as_func_ret_failure; then
336 exitcode=1
337 echo as_func_ret_failure succeeded.
338fi
339
340if ( set x; as_func_ret_success y && test x = "$1" ); then
341 :
342else
343 exitcode=1
344 echo positional parameters were not saved.
345fi
346
347test $exitcode = 0) || { (exit 1); exit 1; }
348
349(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000350 as_lineno_1=$LINENO
351 as_lineno_2=$LINENO
Skip Montanaroeb33e5a2007-08-17 12:57:41 +0000352 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000353 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
354
355_ASEOF
356}; then
357 break
358fi
359
360fi
361
362 done
363
364 if test "x$CONFIG_SHELL" != x; then
365 for as_var in BASH_ENV ENV
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000366 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
367 done
368 export CONFIG_SHELL
369 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000370fi
371
372
373 if test $as_have_required = no; then
374 echo This script requires a shell more modern than all the
375 echo shells that I found on your system. Please install a
376 echo modern shell, or manually run the script under such a
377 echo shell if you do have one.
378 { (exit 1); exit 1; }
379fi
380
381
382fi
383
384fi
385
386
387
388(eval "as_func_return () {
389 (exit \$1)
390}
391as_func_success () {
392 as_func_return 0
393}
394as_func_failure () {
395 as_func_return 1
396}
397as_func_ret_success () {
398 return 0
399}
400as_func_ret_failure () {
401 return 1
402}
403
404exitcode=0
405if as_func_success; then
406 :
407else
408 exitcode=1
409 echo as_func_success failed.
410fi
411
412if as_func_failure; then
413 exitcode=1
414 echo as_func_failure succeeded.
415fi
416
417if as_func_ret_success; then
418 :
419else
420 exitcode=1
421 echo as_func_ret_success failed.
422fi
423
424if as_func_ret_failure; then
425 exitcode=1
426 echo as_func_ret_failure succeeded.
427fi
428
429if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
430 :
431else
432 exitcode=1
433 echo positional parameters were not saved.
434fi
435
436test \$exitcode = 0") || {
437 echo No shell found that supports shell functions.
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000438 echo Please tell bug-autoconf@gnu.org about your system,
439 echo including any error possibly output before this message.
440 echo This can help us improve future autoconf versions.
441 echo Configuration will now proceed without shell functions.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000442}
443
444
445
446 as_lineno_1=$LINENO
447 as_lineno_2=$LINENO
448 test "x$as_lineno_1" != "x$as_lineno_2" &&
449 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Martin v. Löwis11437992002-04-12 09:54:03 +0000450
451 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
452 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000453 # line-number line after each line using $LINENO; the second 'sed'
454 # does the real work. The second script uses 'N' to pair each
455 # line-number line with the line containing $LINENO, and appends
456 # trailing '-' during substitution so that $LINENO is not a special
457 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +0000458 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000459 # scripts with optimization help from Paolo Bonzini. Blame Lee
460 # E. McMahon (1931-1989) for sed's syntax. :-)
461 sed -n '
462 p
463 /[$]LINENO/=
464 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +0000465 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000466 s/[$]LINENO.*/&-/
467 t lineno
468 b
469 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +0000470 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000471 :loop
472 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +0000473 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000474 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +0000475 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000476 chmod +x "$as_me.lineno" ||
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000477 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000478 { (exit 1); exit 1; }; }
479
480 # Don't try to exec as it changes $[0], causing all sort of problems
481 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000482 # original and so on. Autoconf is especially sensitive to this).
483 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +0000484 # Exit status is that of the last command.
485 exit
486}
487
488
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000489if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
490 as_dirname=dirname
491else
492 as_dirname=false
493fi
494
495ECHO_C= ECHO_N= ECHO_T=
496case `echo -n x` in
497-n*)
498 case `echo 'x\c'` in
499 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
500 *) ECHO_C='\c';;
501 esac;;
502*)
503 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +0000504esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000505if expr a : '\(a\)' >/dev/null 2>&1 &&
506 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +0000507 as_expr=expr
508else
509 as_expr=false
510fi
511
512rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000513if test -d conf$$.dir; then
514 rm -f conf$$.dir/conf$$.file
515else
516 rm -f conf$$.dir
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000517 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000518fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +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 Peterson8719ad52009-09-11 22:24:02 +0000532 fi
Martin v. Löwis11437992002-04-12 09:54:03 +0000533else
534 as_ln_s='cp -p'
535fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000536rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
537rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +0000538
Skip Montanaro6dead952003-09-25 14:50:04 +0000539if mkdir -p . 2>/dev/null; then
540 as_mkdir_p=:
541else
Skip Montanarof0d5f792004-08-15 14:08:23 +0000542 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +0000543 as_mkdir_p=false
544fi
545
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000546if test -x / >/dev/null 2>&1; then
547 as_test_x='test -x'
548else
549 if ls -dL / >/dev/null 2>&1; then
550 as_ls_L_option=L
551 else
552 as_ls_L_option=
553 fi
554 as_test_x='
555 eval sh -c '\''
556 if test -d "$1"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000557 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000558 else
559 case $1 in
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000560 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000561 esac;
562 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
563 ???[sx]*):;;*)false;;esac;fi
564 '\'' sh
565 '
566fi
567as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +0000568
569# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000570as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000571
572# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +0000573as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +0000574
575
Martin v. Löwis11437992002-04-12 09:54:03 +0000576
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000577exec 7<&0 </dev/null 6>&1
Martin v. Löwis11437992002-04-12 09:54:03 +0000578
579# Name of the host.
580# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
581# so uname gets run too.
582ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
583
Martin v. Löwis11437992002-04-12 09:54:03 +0000584#
585# Initializations.
586#
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000587ac_default_prefix=/usr/local
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000588ac_clean_files=
Skip Montanaro6dead952003-09-25 14:50:04 +0000589ac_config_libobj_dir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000590LIBOBJS=
Martin v. Löwis11437992002-04-12 09:54:03 +0000591cross_compiling=no
592subdirs=
593MFLAGS=
594MAKEFLAGS=
595SHELL=${CONFIG_SHELL-/bin/sh}
596
Martin v. Löwis11437992002-04-12 09:54:03 +0000597# Identity of this package.
Martin v. Löwis88afe662002-10-26 13:47:44 +0000598PACKAGE_NAME='python'
599PACKAGE_TARNAME='python'
Benjamin Peterson46ea4f72009-06-27 21:40:27 +0000600PACKAGE_VERSION='3.2'
601PACKAGE_STRING='python 3.2'
Georg Brandle2e15612009-05-20 18:25:10 +0000602PACKAGE_BUGREPORT='http://bugs.python.org/'
Martin v. Löwis11437992002-04-12 09:54:03 +0000603
604ac_unique_file="Include/object.h"
605# Factoring default headers for most tests.
606ac_includes_default="\
607#include <stdio.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000608#ifdef HAVE_SYS_TYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000609# include <sys/types.h>
610#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000611#ifdef HAVE_SYS_STAT_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000612# include <sys/stat.h>
613#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000614#ifdef STDC_HEADERS
Martin v. Löwis11437992002-04-12 09:54:03 +0000615# include <stdlib.h>
616# include <stddef.h>
617#else
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000618# ifdef HAVE_STDLIB_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000619# include <stdlib.h>
620# endif
621#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000622#ifdef HAVE_STRING_H
623# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000624# include <memory.h>
625# endif
626# include <string.h>
627#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000628#ifdef HAVE_STRINGS_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000629# include <strings.h>
630#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000631#ifdef HAVE_INTTYPES_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000632# include <inttypes.h>
Thomas Wouters477c8d52006-05-27 19:21:47 +0000633#endif
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000634#ifdef HAVE_STDINT_H
635# include <stdint.h>
636#endif
637#ifdef HAVE_UNISTD_H
Martin v. Löwis11437992002-04-12 09:54:03 +0000638# include <unistd.h>
639#endif"
640
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000641ac_subst_vars='LTLIBOBJS
Alexandre Vassalotti19142282009-07-17 23:11:52 +0000642SRCDIRS
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000643THREADHEADERS
644LIBC
645LIBM
646HAVE_GETHOSTBYNAME
647HAVE_GETHOSTBYNAME_R
648HAVE_GETHOSTBYNAME_R_3_ARG
649HAVE_GETHOSTBYNAME_R_5_ARG
650HAVE_GETHOSTBYNAME_R_6_ARG
651LIBOBJS
652TRUE
653MACHDEP_OBJS
654DYNLOADFILE
655DLINCLDIR
656THREADOBJ
657LDLAST
658USE_THREAD_MODULE
659SIGNAL_OBJS
660USE_SIGNAL_MODULE
661SHLIBS
662CFLAGSFORSHARED
663LINKFORSHARED
664CCSHARED
665BLDSHARED
666LDSHARED
667SO
668LIBTOOL_CRUFT
669OTHER_LIBTOOL_OPT
670UNIVERSAL_ARCH_FLAGS
671BASECFLAGS
672OPT
673LN
674INSTALL_DATA
675INSTALL_SCRIPT
676INSTALL_PROGRAM
677SVNVERSION
678ARFLAGS
679AR
680RANLIB
681GNULD
682LINKCC
683RUNSHARED
684INSTSONAME
685LDLIBRARYDIR
686BLDLIBRARY
687DLLLIBRARY
688LDLIBRARY
689LIBRARY
690BUILDEXEEXT
691EGREP
692GREP
693CPP
694MAINCC
695CXX
696OBJEXT
697EXEEXT
698ac_ct_CC
699CPPFLAGS
700LDFLAGS
701CFLAGS
702CC
703EXPORT_MACOSX_DEPLOYMENT_TARGET
704CONFIGURE_MACOSX_DEPLOYMENT_TARGET
705SGI_ABI
706MACHDEP
707FRAMEWORKUNIXTOOLSPREFIX
708FRAMEWORKALTINSTALLLAST
709FRAMEWORKALTINSTALLFIRST
710FRAMEWORKINSTALLLAST
711FRAMEWORKINSTALLFIRST
712PYTHONFRAMEWORKINSTALLDIR
713PYTHONFRAMEWORKPREFIX
714PYTHONFRAMEWORKDIR
715PYTHONFRAMEWORKIDENTIFIER
716PYTHONFRAMEWORK
717ARCH_RUN_32BIT
718UNIVERSALSDK
719CONFIG_ARGS
720SOVERSION
721VERSION
722target_alias
723host_alias
724build_alias
725LIBS
726ECHO_T
727ECHO_N
728ECHO_C
729DEFS
730mandir
731localedir
732libdir
733psdir
734pdfdir
735dvidir
736htmldir
737infodir
738docdir
739oldincludedir
740includedir
741localstatedir
742sharedstatedir
743sysconfdir
744datadir
745datarootdir
746libexecdir
747sbindir
748bindir
749program_transform_name
750prefix
751exec_prefix
752PACKAGE_BUGREPORT
753PACKAGE_STRING
754PACKAGE_VERSION
755PACKAGE_TARNAME
756PACKAGE_NAME
757PATH_SEPARATOR
758SHELL'
Skip Montanaro6dead952003-09-25 14:50:04 +0000759ac_subst_files=''
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000760ac_user_opts='
761enable_option_checking
762enable_universalsdk
763with_universal_archs
764with_framework_name
765enable_framework
766with_gcc
767with_cxx_main
768with_suffix
769enable_shared
770enable_profiling
771with_pydebug
772with_libs
773with_system_ffi
774with_dbmliborder
775with_signal_module
776with_dec_threads
777with_threads
778with_thread
779with_pth
780enable_ipv6
781with_doc_strings
782with_tsc
783with_pymalloc
784with_wctype_functions
785with_fpectl
786with_libm
787with_libc
788enable_big_digits
789with_wide_unicode
790with_computed_gotos
791'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000792 ac_precious_vars='build_alias
793host_alias
794target_alias
795CC
796CFLAGS
797LDFLAGS
798LIBS
799CPPFLAGS
800CPP'
801
Guido van Rossum627b2d71993-12-24 10:39:16 +0000802
Guido van Rossum7f43da71994-08-01 12:15:30 +0000803# Initialize some variables set by options.
Martin v. Löwis11437992002-04-12 09:54:03 +0000804ac_init_help=
805ac_init_version=false
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000806ac_unrecognized_opts=
807ac_unrecognized_sep=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000808# The variables have the same names as the options, with
809# dashes changed to underlines.
Martin v. Löwis11437992002-04-12 09:54:03 +0000810cache_file=/dev/null
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000811exec_prefix=NONE
Guido van Rossum7f43da71994-08-01 12:15:30 +0000812no_create=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000813no_recursion=
814prefix=NONE
815program_prefix=NONE
816program_suffix=NONE
817program_transform_name=s,x,x,
Guido van Rossum7f43da71994-08-01 12:15:30 +0000818silent=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000819site=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000820srcdir=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000821verbose=
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000822x_includes=NONE
823x_libraries=NONE
Martin v. Löwis11437992002-04-12 09:54:03 +0000824
825# Installation directory options.
826# These are left unexpanded so users can "make install exec_prefix=/foo"
827# and all the variables that are supposed to be based on exec_prefix
828# by default will actually change.
829# Use braces instead of parens because sh, perl, etc. also accept them.
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000830# (The list follows the same order as the GNU Coding Standards.)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000831bindir='${exec_prefix}/bin'
832sbindir='${exec_prefix}/sbin'
833libexecdir='${exec_prefix}/libexec'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000834datarootdir='${prefix}/share'
835datadir='${datarootdir}'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000836sysconfdir='${prefix}/etc'
837sharedstatedir='${prefix}/com'
838localstatedir='${prefix}/var'
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000839includedir='${prefix}/include'
840oldincludedir='/usr/include'
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000841docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
842infodir='${datarootdir}/info'
843htmldir='${docdir}'
844dvidir='${docdir}'
845pdfdir='${docdir}'
846psdir='${docdir}'
847libdir='${exec_prefix}/lib'
848localedir='${datarootdir}/locale'
849mandir='${datarootdir}/man'
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000850
Guido van Rossum7f43da71994-08-01 12:15:30 +0000851ac_prev=
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000852ac_dashdash=
Guido van Rossum7f43da71994-08-01 12:15:30 +0000853for ac_option
Guido van Rossum627b2d71993-12-24 10:39:16 +0000854do
Guido van Rossum7f43da71994-08-01 12:15:30 +0000855 # If the previous option needs an argument, assign it.
856 if test -n "$ac_prev"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000857 eval $ac_prev=\$ac_option
Guido van Rossum7f43da71994-08-01 12:15:30 +0000858 ac_prev=
859 continue
Guido van Rossum627b2d71993-12-24 10:39:16 +0000860 fi
Guido van Rossum7f43da71994-08-01 12:15:30 +0000861
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000862 case $ac_option in
863 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
864 *) ac_optarg=yes ;;
865 esac
Guido van Rossum7f43da71994-08-01 12:15:30 +0000866
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000867 # Accept the important Cygnus configure options, so we can diagnose typos.
868
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000869 case $ac_dashdash$ac_option in
870 --)
871 ac_dashdash=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000872
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000873 -bindir | --bindir | --bindi | --bind | --bin | --bi)
874 ac_prev=bindir ;;
875 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000876 bindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000877
878 -build | --build | --buil | --bui | --bu)
Martin v. Löwis11437992002-04-12 09:54:03 +0000879 ac_prev=build_alias ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000880 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000881 build_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000882
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000883 -cache-file | --cache-file | --cache-fil | --cache-fi \
884 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
885 ac_prev=cache_file ;;
886 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
887 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000888 cache_file=$ac_optarg ;;
889
890 --config-cache | -C)
891 cache_file=config.cache ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000892
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000893 -datadir | --datadir | --datadi | --datad)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000894 ac_prev=datadir ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000895 -datadir=* | --datadir=* | --datadi=* | --datad=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000896 datadir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000897
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000898 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
899 | --dataroo | --dataro | --datar)
900 ac_prev=datarootdir ;;
901 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
902 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
903 datarootdir=$ac_optarg ;;
904
Guido van Rossum7f43da71994-08-01 12:15:30 +0000905 -disable-* | --disable-*)
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000906 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000907 # Reject names that are not valid shell variable names.
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000908 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
909 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000910 { (exit 1); exit 1; }; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000911 ac_useropt_orig=$ac_useropt
912 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
913 case $ac_user_opts in
914 *"
915"enable_$ac_useropt"
916"*) ;;
917 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
918 ac_unrecognized_sep=', ';;
919 esac
920 eval enable_$ac_useropt=no ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000921
922 -docdir | --docdir | --docdi | --doc | --do)
923 ac_prev=docdir ;;
924 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
925 docdir=$ac_optarg ;;
926
927 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
928 ac_prev=dvidir ;;
929 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
930 dvidir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000931
932 -enable-* | --enable-*)
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000933 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000934 # Reject names that are not valid shell variable names.
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000935 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
936 { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +0000937 { (exit 1); exit 1; }; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +0000938 ac_useropt_orig=$ac_useropt
939 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
940 case $ac_user_opts in
941 *"
942"enable_$ac_useropt"
943"*) ;;
944 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
945 ac_unrecognized_sep=', ';;
946 esac
947 eval enable_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000948
Guido van Rossum7f43da71994-08-01 12:15:30 +0000949 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
950 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
951 | --exec | --exe | --ex)
952 ac_prev=exec_prefix ;;
953 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
954 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
955 | --exec=* | --exe=* | --ex=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000956 exec_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000957
958 -gas | --gas | --ga | --g)
Guido van Rossum76be6ed1995-01-02 18:33:54 +0000959 # Obsolete; use --with-gas.
960 with_gas=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000961
Martin v. Löwis11437992002-04-12 09:54:03 +0000962 -help | --help | --hel | --he | -h)
963 ac_init_help=long ;;
964 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
965 ac_init_help=recursive ;;
966 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
967 ac_init_help=short ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000968
969 -host | --host | --hos | --ho)
Martin v. Löwis11437992002-04-12 09:54:03 +0000970 ac_prev=host_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000971 -host=* | --host=* | --hos=* | --ho=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000972 host_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +0000973
Thomas Wouters47b49bf2007-08-30 22:15:33 +0000974 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
975 ac_prev=htmldir ;;
976 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
977 | --ht=*)
978 htmldir=$ac_optarg ;;
979
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000980 -includedir | --includedir | --includedi | --included | --include \
981 | --includ | --inclu | --incl | --inc)
982 ac_prev=includedir ;;
983 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
984 | --includ=* | --inclu=* | --incl=* | --inc=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000985 includedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000986
987 -infodir | --infodir | --infodi | --infod | --info | --inf)
988 ac_prev=infodir ;;
989 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000990 infodir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000991
992 -libdir | --libdir | --libdi | --libd)
993 ac_prev=libdir ;;
994 -libdir=* | --libdir=* | --libdi=* | --libd=*)
Martin v. Löwis11437992002-04-12 09:54:03 +0000995 libdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +0000996
997 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
998 | --libexe | --libex | --libe)
999 ac_prev=libexecdir ;;
1000 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1001 | --libexe=* | --libex=* | --libe=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001002 libexecdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001004 -localedir | --localedir | --localedi | --localed | --locale)
1005 ac_prev=localedir ;;
1006 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1007 localedir=$ac_optarg ;;
1008
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001009 -localstatedir | --localstatedir | --localstatedi | --localstated \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001010 | --localstate | --localstat | --localsta | --localst | --locals)
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001011 ac_prev=localstatedir ;;
1012 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001013 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001014 localstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001015
1016 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1017 ac_prev=mandir ;;
1018 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001019 mandir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001020
Guido van Rossum7f43da71994-08-01 12:15:30 +00001021 -nfp | --nfp | --nf)
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001022 # Obsolete; use --without-fp.
1023 with_fp=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001024
1025 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
Martin v. Löwis11437992002-04-12 09:54:03 +00001026 | --no-cr | --no-c | -n)
Guido van Rossum7f43da71994-08-01 12:15:30 +00001027 no_create=yes ;;
1028
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001029 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1030 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1031 no_recursion=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001032
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001033 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1034 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1035 | --oldin | --oldi | --old | --ol | --o)
1036 ac_prev=oldincludedir ;;
1037 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1038 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1039 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001040 oldincludedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001041
Guido van Rossum7f43da71994-08-01 12:15:30 +00001042 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1043 ac_prev=prefix ;;
1044 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001045 prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001046
1047 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1048 | --program-pre | --program-pr | --program-p)
1049 ac_prev=program_prefix ;;
1050 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1051 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001052 program_prefix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001053
1054 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1055 | --program-suf | --program-su | --program-s)
1056 ac_prev=program_suffix ;;
1057 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1058 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001059 program_suffix=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001060
1061 -program-transform-name | --program-transform-name \
1062 | --program-transform-nam | --program-transform-na \
1063 | --program-transform-n | --program-transform- \
1064 | --program-transform | --program-transfor \
1065 | --program-transfo | --program-transf \
1066 | --program-trans | --program-tran \
1067 | --progr-tra | --program-tr | --program-t)
1068 ac_prev=program_transform_name ;;
1069 -program-transform-name=* | --program-transform-name=* \
1070 | --program-transform-nam=* | --program-transform-na=* \
1071 | --program-transform-n=* | --program-transform-=* \
1072 | --program-transform=* | --program-transfor=* \
1073 | --program-transfo=* | --program-transf=* \
1074 | --program-trans=* | --program-tran=* \
1075 | --progr-tra=* | --program-tr=* | --program-t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001076 program_transform_name=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001077
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001078 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1079 ac_prev=pdfdir ;;
1080 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1081 pdfdir=$ac_optarg ;;
1082
1083 -psdir | --psdir | --psdi | --psd | --ps)
1084 ac_prev=psdir ;;
1085 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1086 psdir=$ac_optarg ;;
1087
Guido van Rossum7f43da71994-08-01 12:15:30 +00001088 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1089 | -silent | --silent | --silen | --sile | --sil)
1090 silent=yes ;;
1091
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001092 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1093 ac_prev=sbindir ;;
1094 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1095 | --sbi=* | --sb=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001096 sbindir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001097
1098 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1099 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1100 | --sharedst | --shareds | --shared | --share | --shar \
1101 | --sha | --sh)
1102 ac_prev=sharedstatedir ;;
1103 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1104 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1105 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1106 | --sha=* | --sh=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001107 sharedstatedir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001108
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001109 -site | --site | --sit)
1110 ac_prev=site ;;
1111 -site=* | --site=* | --sit=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001112 site=$ac_optarg ;;
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001113
Guido van Rossum7f43da71994-08-01 12:15:30 +00001114 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1115 ac_prev=srcdir ;;
1116 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001117 srcdir=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001118
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001119 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1120 | --syscon | --sysco | --sysc | --sys | --sy)
1121 ac_prev=sysconfdir ;;
1122 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1123 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001124 sysconfdir=$ac_optarg ;;
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001125
Guido van Rossum7f43da71994-08-01 12:15:30 +00001126 -target | --target | --targe | --targ | --tar | --ta | --t)
Martin v. Löwis11437992002-04-12 09:54:03 +00001127 ac_prev=target_alias ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001128 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001129 target_alias=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001130
1131 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1132 verbose=yes ;;
1133
Martin v. Löwis11437992002-04-12 09:54:03 +00001134 -version | --version | --versio | --versi | --vers | -V)
1135 ac_init_version=: ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001136
1137 -with-* | --with-*)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001138 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001139 # Reject names that are not valid shell variable names.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001140 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1141 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001142 { (exit 1); exit 1; }; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001143 ac_useropt_orig=$ac_useropt
1144 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145 case $ac_user_opts in
1146 *"
1147"with_$ac_useropt"
1148"*) ;;
1149 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1150 ac_unrecognized_sep=', ';;
1151 esac
1152 eval with_$ac_useropt=\$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001153
1154 -without-* | --without-*)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001155 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001156 # Reject names that are not valid shell variable names.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001157 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1158 { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001159 { (exit 1); exit 1; }; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001160 ac_useropt_orig=$ac_useropt
1161 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162 case $ac_user_opts in
1163 *"
1164"with_$ac_useropt"
1165"*) ;;
1166 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1167 ac_unrecognized_sep=', ';;
1168 esac
1169 eval with_$ac_useropt=no ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001170
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001171 --x)
1172 # Obsolete; use --with-x.
1173 with_x=yes ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001174
1175 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1176 | --x-incl | --x-inc | --x-in | --x-i)
1177 ac_prev=x_includes ;;
1178 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1179 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001180 x_includes=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001181
1182 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1183 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1184 ac_prev=x_libraries ;;
1185 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1186 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
Martin v. Löwis11437992002-04-12 09:54:03 +00001187 x_libraries=$ac_optarg ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001188
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001189 -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
Martin v. Löwis11437992002-04-12 09:54:03 +00001190Try \`$0 --help' for more information." >&2
1191 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001192 ;;
1193
Martin v. Löwis11437992002-04-12 09:54:03 +00001194 *=*)
1195 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1196 # Reject names that are not valid shell variable names.
1197 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001198 { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001199 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001200 eval $ac_envvar=\$ac_optarg
Martin v. Löwis11437992002-04-12 09:54:03 +00001201 export $ac_envvar ;;
1202
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00001203 *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001204 # FIXME: should be removed in autoconf 3.0.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001205 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001206 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001207 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001208 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
Guido van Rossum7f43da71994-08-01 12:15:30 +00001209 ;;
1210
1211 esac
Guido van Rossum627b2d71993-12-24 10:39:16 +00001212done
1213
Guido van Rossum7f43da71994-08-01 12:15:30 +00001214if test -n "$ac_prev"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001215 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001216 { $as_echo "$as_me: error: missing argument to $ac_option" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001217 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +00001218fi
1219
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001220if test -n "$ac_unrecognized_opts"; then
1221 case $enable_option_checking in
1222 no) ;;
1223 fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
1224 { (exit 1); exit 1; }; } ;;
1225 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1226 esac
1227fi
1228
1229# Check all directory arguments for consistency.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001230for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1231 datadir sysconfdir sharedstatedir localstatedir includedir \
1232 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1233 libdir localedir mandir
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001234do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001235 eval ac_val=\$$ac_var
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001236 # Remove trailing slashes.
1237 case $ac_val in
1238 */ )
1239 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1240 eval $ac_var=\$ac_val;;
1241 esac
1242 # Be sure to have absolute directory names.
Martin v. Löwis11437992002-04-12 09:54:03 +00001243 case $ac_val in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001244 [\\/$]* | ?:[\\/]* ) continue;;
1245 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00001246 esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001247 { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001248 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001249done
Guido van Rossum627b2d71993-12-24 10:39:16 +00001250
Martin v. Löwis11437992002-04-12 09:54:03 +00001251# There might be people who depend on the old broken behavior: `$host'
1252# used to hold the argument of --host etc.
1253# FIXME: To remove some day.
1254build=$build_alias
1255host=$host_alias
1256target=$target_alias
Guido van Rossum627b2d71993-12-24 10:39:16 +00001257
Martin v. Löwis11437992002-04-12 09:54:03 +00001258# FIXME: To remove some day.
1259if test "x$host_alias" != x; then
1260 if test "x$build_alias" = x; then
1261 cross_compiling=maybe
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001262 $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
Martin v. Löwis11437992002-04-12 09:54:03 +00001263 If a cross compiler is detected then cross compile mode will be used." >&2
1264 elif test "x$build_alias" != "x$host_alias"; then
1265 cross_compiling=yes
1266 fi
1267fi
1268
1269ac_tool_prefix=
1270test -n "$host_alias" && ac_tool_prefix=$host_alias-
1271
1272test "$silent" = yes && exec 6>/dev/null
1273
Guido van Rossum627b2d71993-12-24 10:39:16 +00001274
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001275ac_pwd=`pwd` && test -n "$ac_pwd" &&
1276ac_ls_di=`ls -di .` &&
1277ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001278 { $as_echo "$as_me: error: working directory cannot be determined" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001279 { (exit 1); exit 1; }; }
1280test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001281 { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001282 { (exit 1); exit 1; }; }
1283
1284
Guido van Rossum627b2d71993-12-24 10:39:16 +00001285# Find the source files, if location was not specified.
1286if test -z "$srcdir"; then
Guido van Rossum7f43da71994-08-01 12:15:30 +00001287 ac_srcdir_defaulted=yes
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001288 # Try the directory containing this script, then the parent directory.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001289 ac_confdir=`$as_dirname -- "$as_myself" ||
1290$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1291 X"$as_myself" : 'X\(//\)[^/]' \| \
1292 X"$as_myself" : 'X\(//\)$' \| \
1293 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1294$as_echo X"$as_myself" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001295 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\/\)[^/].*/{
1300 s//\1/
1301 q
1302 }
1303 /^X\(\/\/\)$/{
1304 s//\1/
1305 q
1306 }
1307 /^X\(\/\).*/{
1308 s//\1/
1309 q
1310 }
1311 s/.*/./; q'`
Guido van Rossum7f43da71994-08-01 12:15:30 +00001312 srcdir=$ac_confdir
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001313 if test ! -r "$srcdir/$ac_unique_file"; then
Guido van Rossum627b2d71993-12-24 10:39:16 +00001314 srcdir=..
1315 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001316else
1317 ac_srcdir_defaulted=no
Guido van Rossum627b2d71993-12-24 10:39:16 +00001318fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001319if test ! -r "$srcdir/$ac_unique_file"; then
1320 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001321 { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
Martin v. Löwis11437992002-04-12 09:54:03 +00001322 { (exit 1); exit 1; }; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00001323fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001324ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1325ac_abs_confdir=`(
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001326 cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001327 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001328 pwd)`
1329# When building in place, set srcdir=.
1330if test "$ac_abs_confdir" = "$ac_pwd"; then
1331 srcdir=.
1332fi
1333# Remove unnecessary trailing slashes from srcdir.
1334# Double slashes in file names in object file debugging info
1335# mess up M-x gdb in Emacs.
1336case $srcdir in
1337*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1338esac
1339for ac_var in $ac_precious_vars; do
1340 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1341 eval ac_env_${ac_var}_value=\$${ac_var}
1342 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1343 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1344done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001345
Martin v. Löwis11437992002-04-12 09:54:03 +00001346#
1347# Report the --help message.
1348#
1349if test "$ac_init_help" = "long"; then
1350 # Omit some internal or obsolete options to make the list less imposing.
1351 # This message is too long to be a string in the A/UX 3.1 sh.
1352 cat <<_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001353\`configure' configures python 3.2 to adapt to many kinds of systems.
Martin v. Löwis11437992002-04-12 09:54:03 +00001354
1355Usage: $0 [OPTION]... [VAR=VALUE]...
1356
1357To assign environment variables (e.g., CC, CFLAGS...), specify them as
1358VAR=VALUE. See below for descriptions of some of the useful variables.
1359
1360Defaults for the options are specified in brackets.
1361
1362Configuration:
1363 -h, --help display this help and exit
1364 --help=short display options specific to this package
1365 --help=recursive display the short help of all the included packages
1366 -V, --version display version information and exit
1367 -q, --quiet, --silent do not print \`checking...' messages
1368 --cache-file=FILE cache test results in FILE [disabled]
1369 -C, --config-cache alias for \`--cache-file=config.cache'
1370 -n, --no-create do not create output files
1371 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1372
Martin v. Löwis11437992002-04-12 09:54:03 +00001373Installation directories:
1374 --prefix=PREFIX install architecture-independent files in PREFIX
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001375 [$ac_default_prefix]
Martin v. Löwis11437992002-04-12 09:54:03 +00001376 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001377 [PREFIX]
Martin v. Löwis11437992002-04-12 09:54:03 +00001378
1379By default, \`make install' will install all the files in
1380\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1381an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1382for instance \`--prefix=\$HOME'.
1383
1384For better control, use the options below.
1385
1386Fine tuning of the installation directories:
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001387 --bindir=DIR user executables [EPREFIX/bin]
1388 --sbindir=DIR system admin executables [EPREFIX/sbin]
1389 --libexecdir=DIR program executables [EPREFIX/libexec]
1390 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1391 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1392 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1393 --libdir=DIR object code libraries [EPREFIX/lib]
1394 --includedir=DIR C header files [PREFIX/include]
1395 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1396 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1397 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1398 --infodir=DIR info documentation [DATAROOTDIR/info]
1399 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1400 --mandir=DIR man documentation [DATAROOTDIR/man]
1401 --docdir=DIR documentation root [DATAROOTDIR/doc/python]
1402 --htmldir=DIR html documentation [DOCDIR]
1403 --dvidir=DIR dvi documentation [DOCDIR]
1404 --pdfdir=DIR pdf documentation [DOCDIR]
1405 --psdir=DIR ps documentation [DOCDIR]
Martin v. Löwis11437992002-04-12 09:54:03 +00001406_ACEOF
1407
1408 cat <<\_ACEOF
1409_ACEOF
1410fi
1411
1412if test -n "$ac_init_help"; then
Martin v. Löwis88afe662002-10-26 13:47:44 +00001413 case $ac_init_help in
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001414 short | recursive ) echo "Configuration of python 3.2:";;
Martin v. Löwis88afe662002-10-26 13:47:44 +00001415 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00001416 cat <<\_ACEOF
1417
1418Optional Features:
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001419 --disable-option-checking ignore unrecognized --enable/--with options
Martin v. Löwis11437992002-04-12 09:54:03 +00001420 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1421 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
Christian Heimes68f5fbe2008-02-14 08:27:37 +00001422 --enable-universalsdk[=SDKDIR]
Christian Heimes292d3512008-02-03 16:51:08 +00001423 Build against Mac OS X 10.4u SDK (ppc/i386)
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001424 --enable-framework[=INSTALLDIR]
1425 Build (MacOSX|Darwin) framework
1426 --enable-shared disable/enable building shared python library
Skip Montanaro56f6a4f2004-06-18 02:47:22 +00001427 --enable-profiling enable C-level code profiling
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001428 --enable-ipv6 Enable ipv6 (with ipv4) support
1429 --disable-ipv6 Disable ipv6 support
Mark Dickinsonbd792642009-03-18 20:06:12 +00001430 --enable-big-digits[=BITS]
1431 use big digits for Python longs [BITS=30]
Martin v. Löwis11437992002-04-12 09:54:03 +00001432
1433Optional Packages:
1434 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1435 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001436 --with-universal-archs=ARCH
1437 select architectures for universal build ("32-bit",
Ronald Oussoren3c064c12009-09-08 07:12:42 +00001438 "64-bit", "3-way", "intel" or "all")
Christian Heimes81ee3ef2008-05-04 22:42:01 +00001439 --with-framework-name=FRAMEWORK
1440 specify an alternate name of the framework built
1441 with --enable-framework
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001442 --without-gcc never use gcc
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001443 --with-cxx-main=<compiler>
1444 compile main() and link python executable with C++
1445 compiler
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001446 --with-suffix=.exe set executable suffix
1447 --with-pydebug build with Py_DEBUG defined
1448 --with-libs='lib1 ...' link against additional libs
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00001449 --with-system-ffi build _ctypes module using an installed ffi library
Matthias Klose55708cc2009-04-30 08:06:49 +00001450 --with-dbmliborder=db1:db2:...
1451 order to check db backends for dbm. Valid value is a
1452 colon separated string with the backend names
1453 `ndbm', `gdbm' and `bdb'.
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001454 --with-signal-module disable/enable signal module
1455 --with-dec-threads use DEC Alpha/OSF1 thread-safe libraries
1456 --with(out)-threads[=DIRECTORY]
1457 disable/enable thread support
1458 --with(out)-thread[=DIRECTORY]
1459 deprecated; use --with(out)-threads
1460 --with-pth use GNU pth threading libraries
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001461 --with(out)-doc-strings disable/enable documentation strings
Martin v. Löwisf30d60e2004-06-08 08:17:44 +00001462 --with(out)-tsc enable/disable timestamp counter profile
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001463 --with(out)-pymalloc disable/enable specialized mallocs
1464 --with-wctype-functions use wctype.h functions
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00001465 --with-fpectl enable SIGFPE catching
1466 --with-libm=STRING math library
1467 --with-libc=STRING C library
Georg Brandl52d168a2008-01-07 18:10:24 +00001468 --with-wide-unicode Use 4-byte Unicode characters (default is 2 bytes)
Antoine Pitroub52ec782009-01-25 16:34:23 +00001469 --with-computed-gotos Use computed gotos / threaded dispatch in evaluation
1470 loop (not available on all compilers)
Martin v. Löwis11437992002-04-12 09:54:03 +00001471
1472Some influential environment variables:
1473 CC C compiler command
1474 CFLAGS C compiler flags
1475 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1476 nonstandard directory <lib dir>
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001477 LIBS libraries to pass to the linker, e.g. -l<library>
1478 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
1479 you have headers in a nonstandard directory <include dir>
Martin v. Löwis11437992002-04-12 09:54:03 +00001480 CPP C preprocessor
1481
1482Use these variables to override the choices made by `configure' or to help
1483it to find libraries and programs with nonstandard names/locations.
1484
Georg Brandle2e15612009-05-20 18:25:10 +00001485Report bugs to <http://bugs.python.org/>.
Martin v. Löwis11437992002-04-12 09:54:03 +00001486_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001487ac_status=$?
Martin v. Löwis11437992002-04-12 09:54:03 +00001488fi
1489
1490if test "$ac_init_help" = "recursive"; then
1491 # If there are subdirs, report their specific --help.
Martin v. Löwis11437992002-04-12 09:54:03 +00001492 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001493 test -d "$ac_dir" ||
1494 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1495 continue
Martin v. Löwis11437992002-04-12 09:54:03 +00001496 ac_builddir=.
1497
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001498case "$ac_dir" in
1499.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1500*)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001501 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001502 # A ".." for each directory in $ac_dir_suffix.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001503 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001504 case $ac_top_builddir_sub in
1505 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1506 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1507 esac ;;
1508esac
1509ac_abs_top_builddir=$ac_pwd
1510ac_abs_builddir=$ac_pwd$ac_dir_suffix
1511# for backward compatibility:
1512ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +00001513
1514case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001515 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +00001516 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001517 ac_top_srcdir=$ac_top_builddir_sub
1518 ac_abs_top_srcdir=$ac_pwd ;;
1519 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +00001520 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001521 ac_top_srcdir=$srcdir
1522 ac_abs_top_srcdir=$srcdir ;;
1523 *) # Relative name.
1524 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1525 ac_top_srcdir=$ac_top_build_prefix$srcdir
1526 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001527esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001528ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +00001529
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001530 cd "$ac_dir" || { ac_status=$?; continue; }
1531 # Check for guested configure.
1532 if test -f "$ac_srcdir/configure.gnu"; then
1533 echo &&
1534 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1535 elif test -f "$ac_srcdir/configure"; then
1536 echo &&
1537 $SHELL "$ac_srcdir/configure" --help=recursive
Martin v. Löwis11437992002-04-12 09:54:03 +00001538 else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001539 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001540 fi || ac_status=$?
1541 cd "$ac_pwd" || { ac_status=$?; break; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001542 done
1543fi
1544
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001545test -n "$ac_init_help" && exit $ac_status
Martin v. Löwis11437992002-04-12 09:54:03 +00001546if $ac_init_version; then
1547 cat <<\_ACEOF
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001548python configure 3.2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001549generated by GNU Autoconf 2.63
Martin v. Löwis11437992002-04-12 09:54:03 +00001550
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001551Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015522002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +00001553This configure script is free software; the Free Software Foundation
1554gives unlimited permission to copy, distribute and modify it.
1555_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001556 exit
Martin v. Löwis11437992002-04-12 09:54:03 +00001557fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001558cat >config.log <<_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +00001559This file contains any messages produced by compilers while
1560running configure, to aid debugging if configure makes a mistake.
1561
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001562It was created by python $as_me 3.2, which was
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001563generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +00001564
1565 $ $0 $@
1566
1567_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001568exec 5>>config.log
Martin v. Löwis11437992002-04-12 09:54:03 +00001569{
1570cat <<_ASUNAME
1571## --------- ##
1572## Platform. ##
1573## --------- ##
1574
1575hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
1576uname -m = `(uname -m) 2>/dev/null || echo unknown`
1577uname -r = `(uname -r) 2>/dev/null || echo unknown`
1578uname -s = `(uname -s) 2>/dev/null || echo unknown`
1579uname -v = `(uname -v) 2>/dev/null || echo unknown`
1580
1581/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
1582/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
1583
1584/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
1585/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
1586/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001587/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
Martin v. Löwis11437992002-04-12 09:54:03 +00001588/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
1589/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
1590/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
1591
1592_ASUNAME
1593
1594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
1595for as_dir in $PATH
1596do
1597 IFS=$as_save_IFS
1598 test -z "$as_dir" && as_dir=.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001599 $as_echo "PATH: $as_dir"
Martin v. Löwis11437992002-04-12 09:54:03 +00001600done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001601IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00001602
1603} >&5
1604
1605cat >&5 <<_ACEOF
1606
1607
1608## ----------- ##
1609## Core tests. ##
1610## ----------- ##
1611
1612_ACEOF
1613
1614
1615# Keep a trace of the command line.
1616# Strip out --no-create and --no-recursion so they do not pile up.
Skip Montanaro6dead952003-09-25 14:50:04 +00001617# Strip out --silent because we don't want to record it for future runs.
Martin v. Löwis11437992002-04-12 09:54:03 +00001618# Also quote any args containing shell meta-characters.
Skip Montanaro6dead952003-09-25 14:50:04 +00001619# Make two passes to allow for proper duplicate-argument suppression.
Martin v. Löwis11437992002-04-12 09:54:03 +00001620ac_configure_args=
Skip Montanaro6dead952003-09-25 14:50:04 +00001621ac_configure_args0=
1622ac_configure_args1=
Skip Montanaro6dead952003-09-25 14:50:04 +00001623ac_must_keep_next=false
1624for ac_pass in 1 2
Martin v. Löwis11437992002-04-12 09:54:03 +00001625do
Skip Montanaro6dead952003-09-25 14:50:04 +00001626 for ac_arg
1627 do
1628 case $ac_arg in
1629 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
1630 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1631 | -silent | --silent | --silen | --sile | --sil)
1632 continue ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001633 *\'*)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001634 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00001635 esac
1636 case $ac_pass in
1637 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
1638 2)
1639 ac_configure_args1="$ac_configure_args1 '$ac_arg'"
1640 if test $ac_must_keep_next = true; then
Skip Montanarof0d5f792004-08-15 14:08:23 +00001641 ac_must_keep_next=false # Got value, back to normal.
Skip Montanaro6dead952003-09-25 14:50:04 +00001642 else
Skip Montanarof0d5f792004-08-15 14:08:23 +00001643 case $ac_arg in
1644 *=* | --config-cache | -C | -disable-* | --disable-* \
1645 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
1646 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
1647 | -with-* | --with-* | -without-* | --without-* | --x)
1648 case "$ac_configure_args0 " in
1649 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
1650 esac
1651 ;;
1652 -* ) ac_must_keep_next=true ;;
1653 esac
Skip Montanaro6dead952003-09-25 14:50:04 +00001654 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001655 ac_configure_args="$ac_configure_args '$ac_arg'"
Skip Montanaro6dead952003-09-25 14:50:04 +00001656 ;;
1657 esac
1658 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001659done
Skip Montanaro6dead952003-09-25 14:50:04 +00001660$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
1661$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
Martin v. Löwis11437992002-04-12 09:54:03 +00001662
1663# When interrupted or exit'd, cleanup temporary files, and complete
1664# config.log. We remove comments because anyway the quotes in there
1665# would cause problems or look ugly.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001666# WARNING: Use '\'' to represent an apostrophe within the trap.
1667# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
Martin v. Löwis11437992002-04-12 09:54:03 +00001668trap 'exit_status=$?
1669 # Save into config.log some information that might help in debugging.
1670 {
1671 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001672
Martin v. Löwis11437992002-04-12 09:54:03 +00001673 cat <<\_ASBOX
1674## ---------------- ##
1675## Cache variables. ##
1676## ---------------- ##
1677_ASBOX
1678 echo
1679 # The following way of writing the cache mishandles newlines in values,
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001680(
1681 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
1682 eval ac_val=\$$ac_var
1683 case $ac_val in #(
1684 *${as_nl}*)
1685 case $ac_var in #(
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001686 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
1687$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001688 esac
1689 case $ac_var in #(
1690 _ | IFS | as_nl) ;; #(
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001691 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001692 *) $as_unset $ac_var ;;
1693 esac ;;
1694 esac
1695 done
Martin v. Löwis11437992002-04-12 09:54:03 +00001696 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001697 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
1698 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +00001699 sed -n \
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001700 "s/'\''/'\''\\\\'\'''\''/g;
1701 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
1702 ;; #(
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001703 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001704 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00001705 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001706 esac |
1707 sort
1708)
Martin v. Löwis11437992002-04-12 09:54:03 +00001709 echo
Skip Montanaro6dead952003-09-25 14:50:04 +00001710
1711 cat <<\_ASBOX
1712## ----------------- ##
1713## Output variables. ##
1714## ----------------- ##
1715_ASBOX
1716 echo
1717 for ac_var in $ac_subst_vars
1718 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001719 eval ac_val=\$$ac_var
1720 case $ac_val in
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001721 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001722 esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001723 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001724 done | sort
1725 echo
1726
1727 if test -n "$ac_subst_files"; then
1728 cat <<\_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001729## ------------------- ##
1730## File substitutions. ##
1731## ------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00001732_ASBOX
1733 echo
1734 for ac_var in $ac_subst_files
1735 do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001736 eval ac_val=\$$ac_var
1737 case $ac_val in
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001738 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001739 esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001740 $as_echo "$ac_var='\''$ac_val'\''"
Skip Montanaro6dead952003-09-25 14:50:04 +00001741 done | sort
1742 echo
1743 fi
1744
Martin v. Löwis11437992002-04-12 09:54:03 +00001745 if test -s confdefs.h; then
1746 cat <<\_ASBOX
1747## ----------- ##
1748## confdefs.h. ##
1749## ----------- ##
1750_ASBOX
1751 echo
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001752 cat confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001753 echo
1754 fi
1755 test "$ac_signal" != 0 &&
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001756 $as_echo "$as_me: caught signal $ac_signal"
1757 $as_echo "$as_me: exit $exit_status"
Martin v. Löwis11437992002-04-12 09:54:03 +00001758 } >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001759 rm -f core *.core core.conftest.* &&
1760 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
Martin v. Löwis11437992002-04-12 09:54:03 +00001761 exit $exit_status
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001762' 0
Martin v. Löwis11437992002-04-12 09:54:03 +00001763for ac_signal in 1 2 13 15; do
1764 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
1765done
1766ac_signal=0
1767
1768# confdefs.h avoids OS command line length limits that DEFS can exceed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001769rm -f -r conftest* confdefs.h
Martin v. Löwis11437992002-04-12 09:54:03 +00001770
1771# Predefined preprocessor variables.
1772
1773cat >>confdefs.h <<_ACEOF
1774#define PACKAGE_NAME "$PACKAGE_NAME"
1775_ACEOF
1776
1777
1778cat >>confdefs.h <<_ACEOF
1779#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1780_ACEOF
1781
1782
1783cat >>confdefs.h <<_ACEOF
1784#define PACKAGE_VERSION "$PACKAGE_VERSION"
1785_ACEOF
1786
1787
1788cat >>confdefs.h <<_ACEOF
1789#define PACKAGE_STRING "$PACKAGE_STRING"
1790_ACEOF
1791
1792
1793cat >>confdefs.h <<_ACEOF
1794#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1795_ACEOF
1796
1797
1798# Let the site file select an alternate cache file if it wants to.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001799# Prefer an explicitly selected file to automatically selected ones.
1800ac_site_file1=NONE
1801ac_site_file2=NONE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001802if test -n "$CONFIG_SITE"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001803 ac_site_file1=$CONFIG_SITE
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001804elif test "x$prefix" != xNONE; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001805 ac_site_file1=$prefix/share/config.site
1806 ac_site_file2=$prefix/etc/config.site
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001807else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001808 ac_site_file1=$ac_default_prefix/share/config.site
1809 ac_site_file2=$ac_default_prefix/etc/config.site
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001810fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001811for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001812do
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001813 test "x$ac_site_file" = xNONE && continue
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001814 if test -r "$ac_site_file"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001815 { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
1816$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001817 sed 's/^/| /' "$ac_site_file" >&5
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001818 . "$ac_site_file"
1819 fi
1820done
1821
1822if test -r "$cache_file"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00001823 # Some versions of bash will fail to source /dev/null (special
1824 # files actually), so we avoid doing that.
1825 if test -f "$cache_file"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001826 { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
1827$as_echo "$as_me: loading cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001828 case $cache_file in
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001829 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1830 *) . "./$cache_file";;
Martin v. Löwis11437992002-04-12 09:54:03 +00001831 esac
1832 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001833else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001834 { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
1835$as_echo "$as_me: creating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001836 >$cache_file
1837fi
1838
1839# Check that the precious variables saved in the cache have kept the same
1840# value.
1841ac_cache_corrupted=false
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001842for ac_var in $ac_precious_vars; do
Martin v. Löwis11437992002-04-12 09:54:03 +00001843 eval ac_old_set=\$ac_cv_env_${ac_var}_set
1844 eval ac_new_set=\$ac_env_${ac_var}_set
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001845 eval ac_old_val=\$ac_cv_env_${ac_var}_value
1846 eval ac_new_val=\$ac_env_${ac_var}_value
Martin v. Löwis11437992002-04-12 09:54:03 +00001847 case $ac_old_set,$ac_new_set in
1848 set,)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001849 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1850$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001851 ac_cache_corrupted=: ;;
1852 ,set)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001853 { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
1854$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001855 ac_cache_corrupted=: ;;
1856 ,);;
1857 *)
1858 if test "x$ac_old_val" != "x$ac_new_val"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001859 # differences in whitespace do not lead to failure.
1860 ac_old_val_w=`echo x $ac_old_val`
1861 ac_new_val_w=`echo x $ac_new_val`
1862 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1863 { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
1864$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1865 ac_cache_corrupted=:
1866 else
1867 { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
1868$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
1869 eval $ac_var=\$ac_old_val
1870 fi
1871 { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
1872$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
1873 { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
1874$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001875 fi;;
1876 esac
1877 # Pass precious variables to config.status.
1878 if test "$ac_new_set" = set; then
1879 case $ac_new_val in
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001880 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00001881 *) ac_arg=$ac_var=$ac_new_val ;;
1882 esac
1883 case " $ac_configure_args " in
1884 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1885 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
1886 esac
1887 fi
1888done
1889if $ac_cache_corrupted; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00001890 { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
1891$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1892 { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
1893$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1894 { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1895$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +00001896 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001897fi
1898
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
Guido van Rossum7f43da71994-08-01 12:15:30 +00001923ac_ext=c
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001924ac_cpp='$CPP $CPPFLAGS'
Martin v. Löwis11437992002-04-12 09:54:03 +00001925ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1926ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1927ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00001928
Guido van Rossum627b2d71993-12-24 10:39:16 +00001929
Michael W. Hudson54241132001-12-07 15:38:26 +00001930
Thomas Wouters47b49bf2007-08-30 22:15:33 +00001931ac_config_headers="$ac_config_headers pyconfig.h"
Martin v. Löwis11437992002-04-12 09:54:03 +00001932
1933
Martin v. Löwis11437992002-04-12 09:54:03 +00001934
Benjamin Petersond23f8222009-04-05 19:13:16 +00001935if test "$prefix" != "/"; then
1936 prefix=`echo "$prefix" | sed -e 's/\/$//g'`
1937fi
1938
1939
Martin v. Löwis11437992002-04-12 09:54:03 +00001940
1941
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001942
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001943
Martin v. Löwis8316feb2003-06-14 07:48:07 +00001944# We don't use PACKAGE_ variables, and they cause conflicts
1945# with other autoconf-based packages that include Python.h
1946grep -v 'define PACKAGE_' <confdefs.h >confdefs.h.new
1947rm confdefs.h
1948mv confdefs.h.new confdefs.h
1949
Martin v. Löwisbddf5a52002-11-11 13:37:28 +00001950
Benjamin Peterson46ea4f72009-06-27 21:40:27 +00001951VERSION=3.2
Guido van Rossum1fd74a71997-07-19 19:36:02 +00001952
Martin v. Löwis1142de32002-03-29 16:28:31 +00001953
1954SOVERSION=1.0
1955
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00001956# The later defininition of _XOPEN_SOURCE disables certain features
1957# on Linux, so we need _GNU_SOURCE to re-enable them (makedev, tm_zone).
1958
1959cat >>confdefs.h <<\_ACEOF
1960#define _GNU_SOURCE 1
1961_ACEOF
1962
1963
Martin v. Löwisbcd93962003-05-03 10:32:18 +00001964# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1965# certain features on NetBSD, so we need _NETBSD_SOURCE to re-enable
1966# them.
1967
1968cat >>confdefs.h <<\_ACEOF
1969#define _NETBSD_SOURCE 1
1970_ACEOF
1971
1972
Andrew MacIntyreabccf412003-07-02 13:53:25 +00001973# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1974# certain features on FreeBSD, so we need __BSD_VISIBLE to re-enable
1975# them.
1976
1977cat >>confdefs.h <<\_ACEOF
1978#define __BSD_VISIBLE 1
1979_ACEOF
1980
1981
Martin v. Löwisd6320502004-08-12 13:45:08 +00001982# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1983# u_int on Irix 5.3. Defining _BSD_TYPES brings it back.
1984
1985cat >>confdefs.h <<\_ACEOF
1986#define _BSD_TYPES 1
1987_ACEOF
1988
1989
Benjamin Peterson14ae9592008-07-16 02:20:15 +00001990# The later defininition of _XOPEN_SOURCE and _POSIX_C_SOURCE disables
1991# certain features on Mac OS X, so we need _DARWIN_C_SOURCE to re-enable
1992# them.
1993
1994cat >>confdefs.h <<\_ACEOF
1995#define _DARWIN_C_SOURCE 1
1996_ACEOF
1997
1998
1999
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002000define_xopen_source=yes
Martin v. Löwis6f18a3c2002-07-20 08:51:52 +00002001
Neil Schemenauer4edbc2a2001-03-22 00:34:03 +00002002# Arguments passed to configure.
2003
2004CONFIG_ARGS="$ac_configure_args"
2005
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002006# Check whether --enable-universalsdk was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002007if test "${enable_universalsdk+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002008 enableval=$enable_universalsdk;
Thomas Wouters477c8d52006-05-27 19:21:47 +00002009 case $enableval in
2010 yes)
2011 enableval=/Developer/SDKs/MacOSX10.4u.sdk
2012 ;;
2013 esac
2014 case $enableval in
2015 no)
2016 UNIVERSALSDK=
2017 enable_universalsdk=
2018 ;;
2019 *)
2020 UNIVERSALSDK=$enableval
2021 ;;
2022 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002023
Thomas Wouters477c8d52006-05-27 19:21:47 +00002024else
2025
2026 UNIVERSALSDK=
2027 enable_universalsdk=
2028
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002029fi
Thomas Wouters477c8d52006-05-27 19:21:47 +00002030
2031
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002032
Benjamin Peterson6794aa32008-07-16 20:33:37 +00002033
2034
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002035UNIVERSAL_ARCHS="32-bit"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002036{ $as_echo "$as_me:$LINENO: checking for --with-universal-archs" >&5
2037$as_echo_n "checking for --with-universal-archs... " >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002038
2039# Check whether --with-universal-archs was given.
2040if test "${with_universal_archs+set}" = set; then
2041 withval=$with_universal_archs;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002042 { $as_echo "$as_me:$LINENO: result: $withval" >&5
2043$as_echo "$withval" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002044 UNIVERSAL_ARCHS="$withval"
2045
2046else
2047
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002048 { $as_echo "$as_me:$LINENO: result: 32-bit" >&5
2049$as_echo "32-bit" >&6; }
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002050
2051fi
2052
2053
2054
2055
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002056
2057# Check whether --with-framework-name was given.
2058if test "${with_framework_name+set}" = set; then
2059 withval=$with_framework_name;
2060 PYTHONFRAMEWORK=${withval}
2061 PYTHONFRAMEWORKDIR=${withval}.framework
2062 PYTHONFRAMEWORKIDENTIFIER=org.python.`echo $withval | tr 'A-Z' 'a-z'`
2063
2064else
2065
2066 PYTHONFRAMEWORK=Python
2067 PYTHONFRAMEWORKDIR=Python.framework
2068 PYTHONFRAMEWORKIDENTIFIER=org.python.python
2069
2070fi
2071
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002072# Check whether --enable-framework was given.
Thomas Wouters477c8d52006-05-27 19:21:47 +00002073if test "${enable_framework+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002074 enableval=$enable_framework;
Jack Jansene578a632001-08-15 01:27:14 +00002075 case $enableval in
Martin v. Löwis11437992002-04-12 09:54:03 +00002076 yes)
Jack Jansene578a632001-08-15 01:27:14 +00002077 enableval=/Library/Frameworks
Jack Jansen127e56e2001-09-11 14:41:54 +00002078 esac
2079 case $enableval in
2080 no)
2081 PYTHONFRAMEWORK=
2082 PYTHONFRAMEWORKDIR=no-framework
2083 PYTHONFRAMEWORKPREFIX=
2084 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002085 FRAMEWORKINSTALLFIRST=
2086 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002087 FRAMEWORKALTINSTALLFIRST=
2088 FRAMEWORKALTINSTALLLAST=
2089 if test "x${prefix}" = "xNONE"; then
2090 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2091 else
2092 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2093 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002094 enable_framework=
Jack Jansene578a632001-08-15 01:27:14 +00002095 ;;
2096 *)
2097 PYTHONFRAMEWORKPREFIX=$enableval
Jack Jansen127e56e2001-09-11 14:41:54 +00002098 PYTHONFRAMEWORKINSTALLDIR=$PYTHONFRAMEWORKPREFIX/$PYTHONFRAMEWORKDIR
Thomas Wouters477c8d52006-05-27 19:21:47 +00002099 FRAMEWORKINSTALLFIRST="frameworkinstallstructure"
Ronald Oussorenf6ccbf62009-06-02 10:55:56 +00002100 FRAMEWORKALTINSTALLFIRST="frameworkinstallstructure "
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002101 if test "$UNIVERSAL_ARCHS" = "all"
2102 then
2103 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkinstallunixtools4way"
Ronald Oussorene3918352009-03-30 18:00:28 +00002104 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps4way frameworkaltinstallunixtools4way"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002105 else
Ronald Oussorene3918352009-03-30 18:00:28 +00002106 FRAMEWORKINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkinstallunixtools"
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002107 FRAMEWORKALTINSTALLLAST="frameworkinstallmaclib frameworkinstallapps frameworkaltinstallunixtools"
2108 fi
2109
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002110 if test "x${prefix}" = "xNONE" ; then
2111 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2112 else
2113 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2114 fi
Jack Jansen127e56e2001-09-11 14:41:54 +00002115 prefix=$PYTHONFRAMEWORKINSTALLDIR/Versions/$VERSION
Thomas Wouters477c8d52006-05-27 19:21:47 +00002116
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002117 # Add files for Mac specific code to the list of output
Thomas Wouters477c8d52006-05-27 19:21:47 +00002118 # files:
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002119 ac_config_files="$ac_config_files Mac/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002120
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002121 ac_config_files="$ac_config_files Mac/PythonLauncher/Makefile"
Thomas Wouters477c8d52006-05-27 19:21:47 +00002122
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002123 ac_config_files="$ac_config_files Mac/Resources/framework/Info.plist"
2124
2125 ac_config_files="$ac_config_files Mac/Resources/app/Info.plist"
2126
Jack Jansene578a632001-08-15 01:27:14 +00002127 esac
Martin v. Löwis11437992002-04-12 09:54:03 +00002128
Guido van Rossum563e7081996-09-10 18:20:48 +00002129else
Martin v. Löwis11437992002-04-12 09:54:03 +00002130
Jack Jansene578a632001-08-15 01:27:14 +00002131 PYTHONFRAMEWORK=
Jack Jansen127e56e2001-09-11 14:41:54 +00002132 PYTHONFRAMEWORKDIR=no-framework
Jack Jansene578a632001-08-15 01:27:14 +00002133 PYTHONFRAMEWORKPREFIX=
2134 PYTHONFRAMEWORKINSTALLDIR=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002135 FRAMEWORKINSTALLFIRST=
2136 FRAMEWORKINSTALLLAST=
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002137 FRAMEWORKALTINSTALLFIRST=
2138 FRAMEWORKALTINSTALLLAST=
2139 if test "x${prefix}" = "xNONE" ; then
2140 FRAMEWORKUNIXTOOLSPREFIX="${ac_default_prefix}"
2141 else
2142 FRAMEWORKUNIXTOOLSPREFIX="${prefix}"
2143 fi
Jack Jansene578a632001-08-15 01:27:14 +00002144 enable_framework=
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002145
Benjamin Peterson14ae9592008-07-16 02:20:15 +00002146 if test "$UNIVERSAL_ARCHS" = "all"
2147 then
2148 FRAMEWORKINSTALLLAST=update4wayuniversal
2149 FRAMEWORKALTINSTALLLAST=update4wayuniversal
2150 fi
2151
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002152fi
2153
Thomas Wouters477c8d52006-05-27 19:21:47 +00002154
2155
Michael W. Hudson54241132001-12-07 15:38:26 +00002156
2157
2158
2159
Jack Jansene578a632001-08-15 01:27:14 +00002160
Thomas Wouters73e5a5b2006-06-08 15:35:45 +00002161
2162
2163
Christian Heimes81ee3ef2008-05-04 22:42:01 +00002164
Jack Jansene578a632001-08-15 01:27:14 +00002165##AC_ARG_WITH(dyld,
Martin v. Löwis3e2c6322002-10-29 10:07:43 +00002166## AC_HELP_STRING(--with-dyld,
2167## Use (OpenStep|Rhapsody) dynamic linker))
Jack Jansene578a632001-08-15 01:27:14 +00002168##
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002169# Set name for machine-dependent library files
2170
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002171{ $as_echo "$as_me:$LINENO: checking MACHDEP" >&5
2172$as_echo_n "checking MACHDEP... " >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002173if test -z "$MACHDEP"
2174then
Guido van Rossum563e7081996-09-10 18:20:48 +00002175 ac_sys_system=`uname -s`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002176 if test "$ac_sys_system" = "AIX" \
Martin v. Löwis21ee4092002-09-30 16:19:48 +00002177 -o "$ac_sys_system" = "UnixWare" -o "$ac_sys_system" = "OpenUNIX"; then
Guido van Rossum563e7081996-09-10 18:20:48 +00002178 ac_sys_release=`uname -v`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002179 else
Guido van Rossum563e7081996-09-10 18:20:48 +00002180 ac_sys_release=`uname -r`
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002181 fi
Guido van Rossum563e7081996-09-10 18:20:48 +00002182 ac_md_system=`echo $ac_sys_system |
2183 tr -d '/ ' | tr '[A-Z]' '[a-z]'`
2184 ac_md_release=`echo $ac_sys_release |
Guido van Rossum67b26592001-10-20 14:21:45 +00002185 tr -d '/ ' | sed 's/^[A-Z]\.//' | sed 's/\..*//'`
Guido van Rossumb97ef171997-09-28 05:44:03 +00002186 MACHDEP="$ac_md_system$ac_md_release"
Guido van Rossum563e7081996-09-10 18:20:48 +00002187
Guido van Rossum07397971997-04-29 21:49:50 +00002188 case $MACHDEP in
Andrew M. Kuchling5a3e4cb2001-07-20 19:29:04 +00002189 cygwin*) MACHDEP="cygwin";;
Jack Jansen8a97f4a2001-12-05 23:27:32 +00002190 darwin*) MACHDEP="darwin";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +00002191 atheos*) MACHDEP="atheos";;
Martin v. Löwisf3322282003-07-13 09:46:13 +00002192 irix646) MACHDEP="irix6";;
Guido van Rossumb97ef171997-09-28 05:44:03 +00002193 '') MACHDEP="unknown";;
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002194 esac
2195fi
Guido van Rossum91922671997-10-09 20:24:13 +00002196
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002197# Some systems cannot stand _XOPEN_SOURCE being defined at all; they
2198# disable features if it is defined, without any means to access these
2199# features as extensions. For these systems, we skip the definition of
2200# _XOPEN_SOURCE. Before adding a system to the list to gain access to
2201# some feature, make sure there is no alternative way to access this
2202# feature. Also, when using wildcards, make sure you have verified the
2203# need for not defining _XOPEN_SOURCE on all systems matching the
2204# wildcard, and that the wildcard does not include future systems
2205# (which may remove their limitations).
2206case $ac_sys_system/$ac_sys_release in
2207 # On OpenBSD, select(2) is not available if _XOPEN_SOURCE is defined,
2208 # even though select is a POSIX function. Reported by J. Ribbens.
Martin v. Löwis76bafc62003-10-03 13:47:44 +00002209 # Reconfirmed for OpenBSD 3.3 by Zachary Hamm, for 3.4 by Jason Ish.
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002210 OpenBSD/2.* | OpenBSD/3.[0123456789] | OpenBSD/4.[0123])
Christian Heimes5b5e81c2007-12-31 16:14:33 +00002211 define_xopen_source=no
2212 # OpenBSD undoes our definition of __BSD_VISIBLE if _XOPEN_SOURCE is
2213 # also defined. This can be overridden by defining _BSD_SOURCE
2214 # As this has a different meaning on Linux, only define it on OpenBSD
2215
2216cat >>confdefs.h <<\_ACEOF
2217#define _BSD_SOURCE 1
2218_ACEOF
2219
2220 ;;
Thomas Wouters89f507f2006-12-13 04:49:30 +00002221 # Defining _XOPEN_SOURCE on NetBSD version prior to the introduction of
2222 # _NETBSD_SOURCE disables certain features (eg. setgroups). Reported by
2223 # Marc Recht
Benjamin Petersonf608c612008-11-16 18:33:53 +00002224 NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002225 define_xopen_source=no;;
Martin v. Löwisa9d71422003-03-28 18:43:31 +00002226 # On Solaris 2.6, sys/wait.h is inconsistent in the usage
2227 # of union __?sigval. Reported by Stuart Bishop.
2228 SunOS/5.6)
2229 define_xopen_source=no;;
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002230 # On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
2231 # but used in /usr/include/netinet/tcp.h. Reported by Tim Rice.
Jack Jansen6b08a402004-06-03 12:41:45 +00002232 # Reconfirmed for 7.1.4 by Martin v. Loewis.
Martin v. Löwis253d1f42004-05-07 19:14:14 +00002233 OpenUNIX/8.0.0| UnixWare/7.1.[0-4])
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002234 define_xopen_source=no;;
2235 # On OpenServer 5, u_short is never defined with _XOPEN_SOURCE,
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002236 # but used in struct sockaddr.sa_family. Reported by Tim Rice.
Martin v. Löwisc2409b42003-05-11 05:53:41 +00002237 SCO_SV/3.2)
Martin v. Löwis53e73c32003-05-05 05:13:18 +00002238 define_xopen_source=no;;
Martin v. Löwisb37509b2008-11-04 20:45:29 +00002239 # On FreeBSD 4, the math functions C89 does not cover are never defined
2240 # with _XOPEN_SOURCE and __BSD_VISIBLE does not re-enable them.
2241 FreeBSD/4.*)
2242 define_xopen_source=no;;
2243 # On MacOS X 10.2, a bug in ncurses.h means that it craps out if
2244 # _XOPEN_EXTENDED_SOURCE is defined. Apparently, this is fixed in 10.3, which
2245 # identifies itself as Darwin/7.*
2246 # On Mac OS X 10.4, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2247 # disables platform specific features beyond repair.
2248 # On Mac OS X 10.3, defining _POSIX_C_SOURCE or _XOPEN_SOURCE
2249 # has no effect, don't bother defining them
2250 Darwin/[6789].*)
Anthony Baxter6169c6b2003-10-04 07:46:23 +00002251 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002252 # On AIX 4 and 5.1, mbstate_t is defined only when _XOPEN_SOURCE == 500 but
2253 # used in wcsnrtombs() and mbsnrtowcs() even if _XOPEN_SOURCE is not defined
2254 # or has another value. By not (re)defining it, the defaults come in place.
Martin v. Löwisc19c5a62003-11-18 20:00:44 +00002255 AIX/4)
2256 define_xopen_source=no;;
Trent Mickc5625ba2004-08-25 23:59:39 +00002257 AIX/5)
2258 if test `uname -r` -eq 1; then
2259 define_xopen_source=no
2260 fi
2261 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +00002262 # On QNX 6.3.2, defining _XOPEN_SOURCE prevents netdb.h from
2263 # defining NI_NUMERICHOST.
2264 QNX/6.3.2)
2265 define_xopen_source=no
2266 ;;
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002267
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002268esac
2269
2270if test $define_xopen_source = yes
2271then
Skip Montanarof0d5f792004-08-15 14:08:23 +00002272 # On Solaris w/ g++ it appears that _XOPEN_SOURCE has to be
2273 # defined precisely as g++ defines it
Martin v. Löwis7dece662005-11-26 11:38:24 +00002274 # Furthermore, on Solaris 10, XPG6 requires the use of a C99
2275 # compiler
Skip Montanarof0d5f792004-08-15 14:08:23 +00002276 case $ac_sys_system/$ac_sys_release in
Martin v. Löwis7dece662005-11-26 11:38:24 +00002277 SunOS/5.8|SunOS/5.9|SunOS/5.10)
Skip Montanarof0d5f792004-08-15 14:08:23 +00002278
2279cat >>confdefs.h <<\_ACEOF
2280#define _XOPEN_SOURCE 500
2281_ACEOF
2282
2283 ;;
2284 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002285
2286cat >>confdefs.h <<\_ACEOF
2287#define _XOPEN_SOURCE 600
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002288_ACEOF
2289
Skip Montanarof0d5f792004-08-15 14:08:23 +00002290 ;;
2291 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002292
2293 # On Tru64 Unix 4.0F, defining _XOPEN_SOURCE also requires
2294 # definition of _XOPEN_SOURCE_EXTENDED and _POSIX_C_SOURCE, or else
2295 # several APIs are not declared. Since this is also needed in some
2296 # cases for HP-UX, we define it globally.
Martin v. Löwis7dece662005-11-26 11:38:24 +00002297 # except for Solaris 10, where it must not be defined,
2298 # as it implies XPG4.2
2299 case $ac_sys_system/$ac_sys_release in
2300 SunOS/5.10)
2301 ;;
2302 *)
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002303
2304cat >>confdefs.h <<\_ACEOF
2305#define _XOPEN_SOURCE_EXTENDED 1
2306_ACEOF
2307
Martin v. Löwis7dece662005-11-26 11:38:24 +00002308 ;;
2309 esac
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002310
Bob Ippolito7026a0a2005-03-28 23:23:47 +00002311
Martin v. Löwis678fc1e2002-11-12 06:04:39 +00002312cat >>confdefs.h <<\_ACEOF
2313#define _POSIX_C_SOURCE 200112L
2314_ACEOF
2315
2316
Martin v. Löwis35195ad2002-11-11 13:26:51 +00002317fi
2318
Guido van Rossum91922671997-10-09 20:24:13 +00002319#
2320# SGI compilers allow the specification of the both the ABI and the
2321# ISA on the command line. Depending on the values of these switches,
2322# different and often incompatable code will be generated.
2323#
2324# The SGI_ABI variable can be used to modify the CC and LDFLAGS and
2325# thus supply support for various ABI/ISA combinations. The MACHDEP
2326# variable is also adjusted.
2327#
2328
2329if test ! -z "$SGI_ABI"
2330then
2331 CC="cc $SGI_ABI"
2332 LDFLAGS="$SGI_ABI $LDFLAGS"
2333 MACHDEP=`echo "${MACHDEP}${SGI_ABI}" | sed 's/ *//g'`
2334fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002335{ $as_echo "$as_me:$LINENO: result: $MACHDEP" >&5
2336$as_echo "$MACHDEP" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002337
Jack Jansen6b08a402004-06-03 12:41:45 +00002338# Record the configure-time value of MACOSX_DEPLOYMENT_TARGET,
2339# it may influence the way we can build extensions, so distutils
2340# needs to check it
2341
Thomas Wouters477c8d52006-05-27 19:21:47 +00002342
Jack Jansen6b08a402004-06-03 12:41:45 +00002343CONFIGURE_MACOSX_DEPLOYMENT_TARGET=
Thomas Wouters477c8d52006-05-27 19:21:47 +00002344EXPORT_MACOSX_DEPLOYMENT_TARGET='#'
Jack Jansen6b08a402004-06-03 12:41:45 +00002345
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002346{ $as_echo "$as_me:$LINENO: checking machine type as reported by uname -m" >&5
2347$as_echo_n "checking machine type as reported by uname -m... " >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002348ac_sys_machine=`uname -m`
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002349{ $as_echo "$as_me:$LINENO: result: $ac_sys_machine" >&5
2350$as_echo "$ac_sys_machine" >&6; }
Mark Dickinsonb0e2b4c2008-04-26 20:48:56 +00002351
Guido van Rossum627b2d71993-12-24 10:39:16 +00002352# checks for alternative programs
Skip Montanarodecc6a42003-01-01 20:07:49 +00002353
2354# compiler flags are generated in two sets, BASECFLAGS and OPT. OPT is just
2355# for debug/optimization stuff. BASECFLAGS is for flags that are required
2356# just to get things to compile and link. Users are free to override OPT
2357# when running configure or make. The build should not break if they do.
2358# BASECFLAGS should generally not be messed with, however.
2359
2360# XXX shouldn't some/most/all of this code be merged with the stuff later
2361# on that fiddles with OPT and BASECFLAGS?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002362{ $as_echo "$as_me:$LINENO: checking for --without-gcc" >&5
2363$as_echo_n "checking for --without-gcc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002365# Check whether --with-gcc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002366if test "${with_gcc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002367 withval=$with_gcc;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002368 case $withval in
Antoine Pitroub52ec782009-01-25 16:34:23 +00002369 no) CC=${CC:-cc}
Guido van Rossumda88dad1995-01-26 00:46:29 +00002370 without_gcc=yes;;
2371 yes) CC=gcc
2372 without_gcc=no;;
2373 *) CC=$withval
2374 without_gcc=$withval;;
Guido van Rossum7f43da71994-08-01 12:15:30 +00002375 esac
Guido van Rossumda88dad1995-01-26 00:46:29 +00002376else
Martin v. Löwis11437992002-04-12 09:54:03 +00002377
Guido van Rossum7b3853f1996-07-30 18:09:35 +00002378 case $ac_sys_system in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +00002379 AIX*) CC=cc_r
2380 without_gcc=;;
Martin v. Löwis130fb172001-07-19 11:00:41 +00002381 *) without_gcc=no;;
Guido van Rossume77438c1995-09-13 18:59:59 +00002382 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002383fi
2384
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002385{ $as_echo "$as_me:$LINENO: result: $without_gcc" >&5
2386$as_echo "$without_gcc" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002387
Guido van Rossum8b131c51995-03-09 14:10:13 +00002388# If the user switches compilers, we can't believe the cache
2389if test ! -z "$ac_cv_prog_CC" -a ! -z "$CC" -a "$CC" != "$ac_cv_prog_CC"
2390then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002391 { { $as_echo "$as_me:$LINENO: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002392(it is also a good idea to do 'make clean' before compiling)" >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002393$as_echo "$as_me: error: cached CC is different -- throw away $cache_file
Martin v. Löwis11437992002-04-12 09:54:03 +00002394(it is also a good idea to do 'make clean' before compiling)" >&2;}
2395 { (exit 1); exit 1; }; }
Guido van Rossum8b131c51995-03-09 14:10:13 +00002396fi
2397
Martin v. Löwis11437992002-04-12 09:54:03 +00002398ac_ext=c
2399ac_cpp='$CPP $CPPFLAGS'
2400ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2401ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2402ac_compiler_gnu=$ac_cv_c_compiler_gnu
2403if test -n "$ac_tool_prefix"; then
2404 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2405set dummy ${ac_tool_prefix}gcc; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002406{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2407$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002408if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002409 $as_echo_n "(cached) " >&6
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002410else
2411 if test -n "$CC"; then
2412 ac_cv_prog_CC="$CC" # Let the user override the test.
2413else
Martin v. Löwis11437992002-04-12 09:54:03 +00002414as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2415for as_dir in $PATH
2416do
2417 IFS=$as_save_IFS
2418 test -z "$as_dir" && as_dir=.
2419 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002420 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 +00002421 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002422 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002423 break 2
2424 fi
2425done
2426done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002427IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002428
Jack Jansendd19cf82001-12-06 22:36:17 +00002429fi
2430fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002431CC=$ac_cv_prog_CC
Jack Jansendd19cf82001-12-06 22:36:17 +00002432if test -n "$CC"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002433 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2434$as_echo "$CC" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002435else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002436 { $as_echo "$as_me:$LINENO: result: no" >&5
2437$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002438fi
2439
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002440
Martin v. Löwis11437992002-04-12 09:54:03 +00002441fi
2442if test -z "$ac_cv_prog_CC"; then
2443 ac_ct_CC=$CC
2444 # Extract the first word of "gcc", so it can be a program name with args.
2445set dummy gcc; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002446{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2447$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002448if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002449 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002450else
2451 if test -n "$ac_ct_CC"; then
2452 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2453else
2454as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2455for as_dir in $PATH
2456do
2457 IFS=$as_save_IFS
2458 test -z "$as_dir" && as_dir=.
2459 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002460 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 +00002461 ac_cv_prog_ac_ct_CC="gcc"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002462 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002463 break 2
2464 fi
2465done
2466done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002467IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002468
2469fi
2470fi
2471ac_ct_CC=$ac_cv_prog_ac_ct_CC
2472if test -n "$ac_ct_CC"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002473 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2474$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002475else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002476 { $as_echo "$as_me:$LINENO: result: no" >&5
2477$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002478fi
2479
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002480 if test "x$ac_ct_CC" = x; then
2481 CC=""
2482 else
2483 case $cross_compiling:$ac_tool_warned in
2484yes:)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002485{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2486$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002487ac_tool_warned=yes ;;
2488esac
2489 CC=$ac_ct_CC
2490 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002491else
2492 CC="$ac_cv_prog_CC"
Jack Jansendd19cf82001-12-06 22:36:17 +00002493fi
2494
Jack Jansendd19cf82001-12-06 22:36:17 +00002495if test -z "$CC"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002496 if test -n "$ac_tool_prefix"; then
2497 # 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 +00002498set dummy ${ac_tool_prefix}cc; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002499{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2500$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002501if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002502 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +00002503else
2504 if test -n "$CC"; then
2505 ac_cv_prog_CC="$CC" # Let the user override the test.
2506else
Martin v. Löwis11437992002-04-12 09:54:03 +00002507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2508for as_dir in $PATH
2509do
2510 IFS=$as_save_IFS
2511 test -z "$as_dir" && as_dir=.
2512 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002513 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 +00002514 ac_cv_prog_CC="${ac_tool_prefix}cc"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002515 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002516 break 2
2517 fi
2518done
2519done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002520IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002521
2522fi
2523fi
2524CC=$ac_cv_prog_CC
2525if test -n "$CC"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002526 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2527$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002528else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002529 { $as_echo "$as_me:$LINENO: result: no" >&5
2530$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002531fi
2532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002533
Martin v. Löwis11437992002-04-12 09:54:03 +00002534 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002535fi
2536if test -z "$CC"; then
2537 # Extract the first word of "cc", so it can be a program name with args.
2538set dummy cc; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002539{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2540$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002541if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002542 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002543else
2544 if test -n "$CC"; then
2545 ac_cv_prog_CC="$CC" # Let the user override the test.
2546else
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002547 ac_prog_rejected=no
Martin v. Löwis11437992002-04-12 09:54:03 +00002548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2549for as_dir in $PATH
2550do
2551 IFS=$as_save_IFS
2552 test -z "$as_dir" && as_dir=.
2553 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002554 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00002555 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2556 ac_prog_rejected=yes
2557 continue
2558 fi
2559 ac_cv_prog_CC="cc"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002560 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002561 break 2
2562 fi
2563done
2564done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002565IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002566
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002567if test $ac_prog_rejected = yes; then
2568 # We found a bogon in the path, so make sure we never use it.
2569 set dummy $ac_cv_prog_CC
2570 shift
Martin v. Löwis11437992002-04-12 09:54:03 +00002571 if test $# != 0; then
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002572 # We chose a different compiler from the bogus one.
2573 # However, it has the same basename, so the bogon will be chosen
2574 # first if we set CC to just the basename; use the full file name.
2575 shift
Skip Montanaro6dead952003-09-25 14:50:04 +00002576 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002577 fi
2578fi
2579fi
2580fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002581CC=$ac_cv_prog_CC
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002582if test -n "$CC"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002583 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2584$as_echo "$CC" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002585else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002586 { $as_echo "$as_me:$LINENO: result: no" >&5
2587$as_echo "no" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00002588fi
2589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002590
Martin v. Löwis11437992002-04-12 09:54:03 +00002591fi
2592if test -z "$CC"; then
2593 if test -n "$ac_tool_prefix"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002594 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002595 do
2596 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2597set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002598{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2599$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002600if test "${ac_cv_prog_CC+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002601 $as_echo_n "(cached) " >&6
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002602else
2603 if test -n "$CC"; then
2604 ac_cv_prog_CC="$CC" # Let the user override the test.
2605else
Martin v. Löwis11437992002-04-12 09:54:03 +00002606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2607for as_dir in $PATH
2608do
2609 IFS=$as_save_IFS
2610 test -z "$as_dir" && as_dir=.
2611 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002612 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 +00002613 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002614 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002615 break 2
Guido van Rossumf78abae1997-01-21 22:02:36 +00002616 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002617done
2618done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002619IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +00002620
2621fi
2622fi
2623CC=$ac_cv_prog_CC
2624if test -n "$CC"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002625 { $as_echo "$as_me:$LINENO: result: $CC" >&5
2626$as_echo "$CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002627else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002628 { $as_echo "$as_me:$LINENO: result: no" >&5
2629$as_echo "no" >&6; }
Jack Jansendd19cf82001-12-06 22:36:17 +00002630fi
2631
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002632
Martin v. Löwis11437992002-04-12 09:54:03 +00002633 test -n "$CC" && break
2634 done
2635fi
2636if test -z "$CC"; then
2637 ac_ct_CC=$CC
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002638 for ac_prog in cl.exe
Martin v. Löwis11437992002-04-12 09:54:03 +00002639do
2640 # Extract the first word of "$ac_prog", so it can be a program name with args.
2641set dummy $ac_prog; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002642{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
2643$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002644if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002645 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002646else
2647 if test -n "$ac_ct_CC"; then
2648 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2649else
2650as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2651for as_dir in $PATH
2652do
2653 IFS=$as_save_IFS
2654 test -z "$as_dir" && as_dir=.
2655 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002656 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 +00002657 ac_cv_prog_ac_ct_CC="$ac_prog"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002658 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002659 break 2
2660 fi
2661done
2662done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002663IFS=$as_save_IFS
Jack Jansendd19cf82001-12-06 22:36:17 +00002664
Martin v. Löwis11437992002-04-12 09:54:03 +00002665fi
2666fi
2667ac_ct_CC=$ac_cv_prog_ac_ct_CC
2668if test -n "$ac_ct_CC"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002669 { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
2670$as_echo "$ac_ct_CC" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002671else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002672 { $as_echo "$as_me:$LINENO: result: no" >&5
2673$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002674fi
Michael W. Hudson54241132001-12-07 15:38:26 +00002675
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002676
Martin v. Löwis11437992002-04-12 09:54:03 +00002677 test -n "$ac_ct_CC" && break
2678done
Michael W. Hudson54241132001-12-07 15:38:26 +00002679
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002680 if test "x$ac_ct_CC" = x; then
2681 CC=""
2682 else
2683 case $cross_compiling:$ac_tool_warned in
2684yes:)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002685{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
2686$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002687ac_tool_warned=yes ;;
2688esac
2689 CC=$ac_ct_CC
2690 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00002691fi
2692
2693fi
2694
2695
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002696test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2697$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2698{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002699See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002700$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
Skip Montanaro6dead952003-09-25 14:50:04 +00002701See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002702 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002703
2704# Provide some information about the compiler.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002705$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
2706set X $ac_compile
2707ac_compiler=$2
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002708{ (ac_try="$ac_compiler --version >&5"
2709case "(($ac_try" in
2710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2711 *) ac_try_echo=$ac_try;;
2712esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002713eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2714$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002715 (eval "$ac_compiler --version >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002716 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002717 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002718 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002719{ (ac_try="$ac_compiler -v >&5"
2720case "(($ac_try" in
2721 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2722 *) ac_try_echo=$ac_try;;
2723esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002724eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2725$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002726 (eval "$ac_compiler -v >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002727 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002728 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002729 (exit $ac_status); }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002730{ (ac_try="$ac_compiler -V >&5"
2731case "(($ac_try" in
2732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2733 *) ac_try_echo=$ac_try;;
2734esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002735eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2736$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002737 (eval "$ac_compiler -V >&5") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002738 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002739 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002740 (exit $ac_status); }
2741
2742cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002743/* confdefs.h. */
2744_ACEOF
2745cat confdefs.h >>conftest.$ac_ext
2746cat >>conftest.$ac_ext <<_ACEOF
2747/* end confdefs.h. */
Jack Jansendd19cf82001-12-06 22:36:17 +00002748
Martin v. Löwis11437992002-04-12 09:54:03 +00002749int
2750main ()
2751{
2752
2753 ;
2754 return 0;
2755}
2756_ACEOF
2757ac_clean_files_save=$ac_clean_files
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002758ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Martin v. Löwis11437992002-04-12 09:54:03 +00002759# Try to create an executable without -o first, disregard a.out.
2760# It will help us diagnose broken compilers, and finding out an intuition
2761# of exeext.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002762{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
2763$as_echo_n "checking for C compiler default output file name... " >&6; }
2764ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2765
2766# The possible output files:
2767ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2768
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002769ac_rmfiles=
2770for ac_file in $ac_files
2771do
2772 case $ac_file in
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002773 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002774 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2775 esac
2776done
2777rm -f $ac_rmfiles
2778
2779if { (ac_try="$ac_link_default"
2780case "(($ac_try" in
2781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2782 *) ac_try_echo=$ac_try;;
2783esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002784eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2785$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002786 (eval "$ac_link_default") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002787 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002788 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002789 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002790 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2791# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2792# in a Makefile. We should not override ac_cv_exeext if it was cached,
2793# so that the user can short-circuit this test for compilers unknown to
2794# Autoconf.
2795for ac_file in $ac_files ''
Skip Montanaro6dead952003-09-25 14:50:04 +00002796do
2797 test -f "$ac_file" || continue
Martin v. Löwis11437992002-04-12 09:54:03 +00002798 case $ac_file in
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002799 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002800 ;;
2801 [ab].out )
2802 # We found the default executable, but exeext='' is most
2803 # certainly right.
2804 break;;
2805 *.* )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002806 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2807 then :; else
2808 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2809 fi
2810 # We set ac_cv_exeext here because the later test for it is not
2811 # safe: cross compilers may not add the suffix if given an `-o'
2812 # argument, so we may need to know it at that point already.
2813 # Even if this section looks crufty: it has the advantage of
2814 # actually working.
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002815 break;;
2816 * )
2817 break;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002818 esac
2819done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002820test "$ac_cv_exeext" = no && ac_cv_exeext=
2821
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002822else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002823 ac_file=''
2824fi
2825
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002826{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
2827$as_echo "$ac_file" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002828if test -z "$ac_file"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002829 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002830sed 's/^/| /' conftest.$ac_ext >&5
2831
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002832{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2833$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2834{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002835See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002836$as_echo "$as_me: error: C compiler cannot create executables
Skip Montanaro6dead952003-09-25 14:50:04 +00002837See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002838 { (exit 77); exit 77; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002839fi
Guido van Rossume6c2cf11999-01-08 21:08:33 +00002840
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002841ac_exeext=$ac_cv_exeext
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002842
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002843# Check that the compiler produces executables we can run. If not, either
Martin v. Löwis11437992002-04-12 09:54:03 +00002844# the compiler is broken, or we cross compile.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002845{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2846$as_echo_n "checking whether the C compiler works... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002847# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2848# If not cross compiling, check that we can run a simple program.
2849if test "$cross_compiling" != yes; then
2850 if { ac_try='./$ac_file'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002851 { (case "(($ac_try" in
2852 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2853 *) ac_try_echo=$ac_try;;
2854esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002855eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2856$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002857 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002858 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002859 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002860 (exit $ac_status); }; }; then
2861 cross_compiling=no
2862 else
2863 if test "$cross_compiling" = maybe; then
2864 cross_compiling=yes
2865 else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002866 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2867$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2868{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002869If you meant to cross compile, use \`--host'.
2870See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002871$as_echo "$as_me: error: cannot run C compiled programs.
Skip Montanaro6dead952003-09-25 14:50:04 +00002872If you meant to cross compile, use \`--host'.
2873See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002874 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002875 fi
2876 fi
2877fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002878{ $as_echo "$as_me:$LINENO: result: yes" >&5
2879$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002880
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002881rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002882ac_clean_files=$ac_clean_files_save
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002883# Check that the compiler produces executables we can run. If not, either
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002884# the compiler is broken, or we cross compile.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002885{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
2886$as_echo_n "checking whether we are cross compiling... " >&6; }
2887{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
2888$as_echo "$cross_compiling" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +00002889
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002890{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
2891$as_echo_n "checking for suffix of executables... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002892if { (ac_try="$ac_link"
2893case "(($ac_try" in
2894 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2895 *) ac_try_echo=$ac_try;;
2896esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002897eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2898$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002899 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002900 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002901 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002902 (exit $ac_status); }; then
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002903 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2904# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2905# work properly (i.e., refer to `conftest.exe'), while it won't with
2906# `rm'.
2907for ac_file in conftest.exe conftest conftest.*; do
2908 test -f "$ac_file" || continue
2909 case $ac_file in
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002910 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002911 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2912 break;;
2913 * ) break;;
2914 esac
2915done
Guido van Rossum76be6ed1995-01-02 18:33:54 +00002916else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002917 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2918$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2919{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002920See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002921$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
Skip Montanaro6dead952003-09-25 14:50:04 +00002922See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002923 { (exit 1); exit 1; }; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +00002924fi
Jack Jansendd19cf82001-12-06 22:36:17 +00002925
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002926rm -f conftest$ac_cv_exeext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002927{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
2928$as_echo "$ac_cv_exeext" >&6; }
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002929
2930rm -f conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002931EXEEXT=$ac_cv_exeext
2932ac_exeext=$EXEEXT
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002933{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
2934$as_echo_n "checking for suffix of object files... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002935if test "${ac_cv_objext+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002936 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00002937else
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002938 cat >conftest.$ac_ext <<_ACEOF
2939/* confdefs.h. */
2940_ACEOF
2941cat confdefs.h >>conftest.$ac_ext
2942cat >>conftest.$ac_ext <<_ACEOF
2943/* end confdefs.h. */
2944
2945int
2946main ()
2947{
2948
2949 ;
2950 return 0;
2951}
2952_ACEOF
2953rm -f conftest.o conftest.obj
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002954if { (ac_try="$ac_compile"
2955case "(($ac_try" in
2956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2957 *) ac_try_echo=$ac_try;;
2958esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002959eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
2960$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002961 (eval "$ac_compile") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002962 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002963 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00002964 (exit $ac_status); }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00002965 for ac_file in conftest.o conftest.obj conftest.*; do
2966 test -f "$ac_file" || continue;
Martin v. Löwis11437992002-04-12 09:54:03 +00002967 case $ac_file in
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002968 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00002969 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2970 break;;
2971 esac
2972done
2973else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002974 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00002975sed 's/^/| /' conftest.$ac_ext >&5
2976
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002977{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
2978$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2979{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002980See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002981$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
Skip Montanaro6dead952003-09-25 14:50:04 +00002982See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002983 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002984fi
2985
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +00002986rm -f conftest.$ac_cv_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00002987fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002988{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
2989$as_echo "$ac_cv_objext" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002990OBJEXT=$ac_cv_objext
2991ac_objext=$OBJEXT
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002992{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
2993$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00002994if test "${ac_cv_c_compiler_gnu+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00002995 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00002996else
2997 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00002998/* confdefs.h. */
2999_ACEOF
3000cat confdefs.h >>conftest.$ac_ext
3001cat >>conftest.$ac_ext <<_ACEOF
3002/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003003
Martin v. Löwis11437992002-04-12 09:54:03 +00003004int
3005main ()
3006{
3007#ifndef __GNUC__
3008 choke me
3009#endif
3010
3011 ;
3012 return 0;
3013}
3014_ACEOF
3015rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003016if { (ac_try="$ac_compile"
3017case "(($ac_try" in
3018 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3019 *) ac_try_echo=$ac_try;;
3020esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003021eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3022$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003023 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003024 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003025 grep -v '^ *+' conftest.er1 >conftest.err
3026 rm -f conftest.er1
3027 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003028 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003029 (exit $ac_status); } && {
3030 test -z "$ac_c_werror_flag" ||
3031 test ! -s conftest.err
3032 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003033 ac_compiler_gnu=yes
3034else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003035 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003036sed 's/^/| /' conftest.$ac_ext >&5
3037
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003038 ac_compiler_gnu=no
Martin v. Löwis11437992002-04-12 09:54:03 +00003039fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003040
3041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00003042ac_cv_c_compiler_gnu=$ac_compiler_gnu
3043
3044fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003045{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
3046$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3047if test $ac_compiler_gnu = yes; then
3048 GCC=yes
3049else
3050 GCC=
3051fi
Martin v. Löwis11437992002-04-12 09:54:03 +00003052ac_test_CFLAGS=${CFLAGS+set}
3053ac_save_CFLAGS=$CFLAGS
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003054{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
3055$as_echo_n "checking whether $CC accepts -g... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003056if test "${ac_cv_prog_cc_g+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003057 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00003058else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003059 ac_save_c_werror_flag=$ac_c_werror_flag
3060 ac_c_werror_flag=yes
3061 ac_cv_prog_cc_g=no
3062 CFLAGS="-g"
3063 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003064/* confdefs.h. */
3065_ACEOF
3066cat confdefs.h >>conftest.$ac_ext
3067cat >>conftest.$ac_ext <<_ACEOF
3068/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003069
Martin v. Löwis11437992002-04-12 09:54:03 +00003070int
3071main ()
3072{
3073
3074 ;
3075 return 0;
3076}
3077_ACEOF
3078rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003079if { (ac_try="$ac_compile"
3080case "(($ac_try" in
3081 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3082 *) ac_try_echo=$ac_try;;
3083esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003084eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3085$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003086 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003087 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003088 grep -v '^ *+' conftest.er1 >conftest.err
3089 rm -f conftest.er1
3090 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003091 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003092 (exit $ac_status); } && {
3093 test -z "$ac_c_werror_flag" ||
3094 test ! -s conftest.err
3095 } && test -s conftest.$ac_objext; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003096 ac_cv_prog_cc_g=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003097else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003098 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003099sed 's/^/| /' conftest.$ac_ext >&5
3100
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003101 CFLAGS=""
3102 cat >conftest.$ac_ext <<_ACEOF
3103/* confdefs.h. */
3104_ACEOF
3105cat confdefs.h >>conftest.$ac_ext
3106cat >>conftest.$ac_ext <<_ACEOF
3107/* end confdefs.h. */
3108
3109int
3110main ()
3111{
3112
3113 ;
3114 return 0;
3115}
3116_ACEOF
3117rm -f conftest.$ac_objext
3118if { (ac_try="$ac_compile"
3119case "(($ac_try" in
3120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3121 *) ac_try_echo=$ac_try;;
3122esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003123eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3124$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003125 (eval "$ac_compile") 2>conftest.er1
3126 ac_status=$?
3127 grep -v '^ *+' conftest.er1 >conftest.err
3128 rm -f conftest.er1
3129 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003130 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003131 (exit $ac_status); } && {
3132 test -z "$ac_c_werror_flag" ||
3133 test ! -s conftest.err
3134 } && test -s conftest.$ac_objext; then
3135 :
3136else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003137 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003138sed 's/^/| /' conftest.$ac_ext >&5
3139
3140 ac_c_werror_flag=$ac_save_c_werror_flag
3141 CFLAGS="-g"
3142 cat >conftest.$ac_ext <<_ACEOF
3143/* confdefs.h. */
3144_ACEOF
3145cat confdefs.h >>conftest.$ac_ext
3146cat >>conftest.$ac_ext <<_ACEOF
3147/* end confdefs.h. */
3148
3149int
3150main ()
3151{
3152
3153 ;
3154 return 0;
3155}
3156_ACEOF
3157rm -f conftest.$ac_objext
3158if { (ac_try="$ac_compile"
3159case "(($ac_try" in
3160 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3161 *) ac_try_echo=$ac_try;;
3162esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003163eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3164$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003165 (eval "$ac_compile") 2>conftest.er1
3166 ac_status=$?
3167 grep -v '^ *+' conftest.er1 >conftest.err
3168 rm -f conftest.er1
3169 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003170 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003171 (exit $ac_status); } && {
3172 test -z "$ac_c_werror_flag" ||
3173 test ! -s conftest.err
3174 } && test -s conftest.$ac_objext; then
3175 ac_cv_prog_cc_g=yes
3176else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003177 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003178sed 's/^/| /' conftest.$ac_ext >&5
3179
3180
Guido van Rossum627b2d71993-12-24 10:39:16 +00003181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003182
3183rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003184fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003185
3186rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3187fi
3188
3189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3190 ac_c_werror_flag=$ac_save_c_werror_flag
3191fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003192{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
3193$as_echo "$ac_cv_prog_cc_g" >&6; }
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003194if test "$ac_test_CFLAGS" = set; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003195 CFLAGS=$ac_save_CFLAGS
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003196elif test $ac_cv_prog_cc_g = yes; then
3197 if test "$GCC" = yes; then
Guido van Rossumf78abae1997-01-21 22:02:36 +00003198 CFLAGS="-g -O2"
3199 else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003200 CFLAGS="-g"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003201 fi
3202else
Guido van Rossume6c2cf11999-01-08 21:08:33 +00003203 if test "$GCC" = yes; then
3204 CFLAGS="-O2"
3205 else
3206 CFLAGS=
3207 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003208fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003209{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
3210$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003211if test "${ac_cv_prog_cc_c89+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003212 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003213else
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003214 ac_cv_prog_cc_c89=no
Skip Montanaro6dead952003-09-25 14:50:04 +00003215ac_save_CC=$CC
3216cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003217/* confdefs.h. */
3218_ACEOF
3219cat confdefs.h >>conftest.$ac_ext
3220cat >>conftest.$ac_ext <<_ACEOF
3221/* end confdefs.h. */
3222#include <stdarg.h>
3223#include <stdio.h>
3224#include <sys/types.h>
3225#include <sys/stat.h>
3226/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3227struct buf { int x; };
3228FILE * (*rcsopen) (struct buf *, struct stat *, int);
3229static char *e (p, i)
3230 char **p;
3231 int i;
3232{
3233 return p[i];
3234}
3235static char *f (char * (*g) (char **, int), char **p, ...)
3236{
3237 char *s;
3238 va_list v;
3239 va_start (v,p);
3240 s = g (p, va_arg (v,int));
3241 va_end (v);
3242 return s;
3243}
Skip Montanarof0d5f792004-08-15 14:08:23 +00003244
3245/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3246 function prototypes and stuff, but not '\xHH' hex character constants.
3247 These don't provoke an error unfortunately, instead are silently treated
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003248 as 'x'. The following induces an error, until -std is added to get
Skip Montanarof0d5f792004-08-15 14:08:23 +00003249 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3250 array size at least. It's necessary to write '\x00'==0 to get something
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003251 that's true only with -std. */
Skip Montanarof0d5f792004-08-15 14:08:23 +00003252int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3253
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003254/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3255 inside strings and character constants. */
3256#define FOO(x) 'x'
3257int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3258
Skip Montanaro6dead952003-09-25 14:50:04 +00003259int test (int i, double x);
3260struct s1 {int (*f) (int a);};
3261struct s2 {int (*f) (double a);};
3262int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3263int argc;
3264char **argv;
3265int
3266main ()
3267{
3268return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3269 ;
3270 return 0;
3271}
3272_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003273for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3274 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
Skip Montanaro6dead952003-09-25 14:50:04 +00003275do
3276 CC="$ac_save_CC $ac_arg"
3277 rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003278if { (ac_try="$ac_compile"
3279case "(($ac_try" in
3280 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3281 *) ac_try_echo=$ac_try;;
3282esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003283eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3284$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003285 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +00003286 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00003287 grep -v '^ *+' conftest.er1 >conftest.err
3288 rm -f conftest.er1
3289 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003290 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003291 (exit $ac_status); } && {
3292 test -z "$ac_c_werror_flag" ||
3293 test ! -s conftest.err
3294 } && test -s conftest.$ac_objext; then
3295 ac_cv_prog_cc_c89=$ac_arg
Skip Montanaro6dead952003-09-25 14:50:04 +00003296else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003297 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003298sed 's/^/| /' conftest.$ac_ext >&5
3299
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003300
Skip Montanaro6dead952003-09-25 14:50:04 +00003301fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003302
3303rm -f core conftest.err conftest.$ac_objext
3304 test "x$ac_cv_prog_cc_c89" != "xno" && break
Skip Montanaro6dead952003-09-25 14:50:04 +00003305done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003306rm -f conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +00003307CC=$ac_save_CC
3308
3309fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003310# AC_CACHE_VAL
3311case "x$ac_cv_prog_cc_c89" in
3312 x)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003313 { $as_echo "$as_me:$LINENO: result: none needed" >&5
3314$as_echo "none needed" >&6; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003315 xno)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003316 { $as_echo "$as_me:$LINENO: result: unsupported" >&5
3317$as_echo "unsupported" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003318 *)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003319 CC="$CC $ac_cv_prog_cc_c89"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003320 { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
3321$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Skip Montanaro6dead952003-09-25 14:50:04 +00003322esac
3323
Skip Montanaro6dead952003-09-25 14:50:04 +00003324
Martin v. Löwis11437992002-04-12 09:54:03 +00003325ac_ext=c
3326ac_cpp='$CPP $CPPFLAGS'
3327ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3328ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3329ac_compiler_gnu=$ac_cv_c_compiler_gnu
Guido van Rossum76be6ed1995-01-02 18:33:54 +00003330
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003331
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003332
3333
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003334{ $as_echo "$as_me:$LINENO: checking for --with-cxx-main=<compiler>" >&5
3335$as_echo_n "checking for --with-cxx-main=<compiler>... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003336
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003337# Check whether --with-cxx_main was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003338if test "${with_cxx_main+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003339 withval=$with_cxx_main;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003340
3341 case $withval in
3342 no) with_cxx_main=no
3343 MAINCC='$(CC)';;
3344 yes) with_cxx_main=yes
3345 MAINCC='$(CXX)';;
3346 *) with_cxx_main=yes
3347 MAINCC=$withval
3348 if test -z "$CXX"
3349 then
3350 CXX=$withval
3351 fi;;
3352 esac
3353else
3354
3355 with_cxx_main=no
3356 MAINCC='$(CC)'
3357
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003358fi
3359
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003360{ $as_echo "$as_me:$LINENO: result: $with_cxx_main" >&5
3361$as_echo "$with_cxx_main" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003362
3363preset_cxx="$CXX"
3364if test -z "$CXX"
3365then
3366 case "$CC" in
3367 gcc) # Extract the first word of "g++", so it can be a program name with args.
3368set dummy g++; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003369{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3370$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003371if test "${ac_cv_path_CXX+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003372 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003373else
3374 case $CXX in
3375 [\\/]* | ?:[\\/]*)
3376 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3377 ;;
3378 *)
3379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3380for as_dir in notfound
3381do
3382 IFS=$as_save_IFS
3383 test -z "$as_dir" && as_dir=.
3384 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003385 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003386 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003387 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003388 break 2
3389 fi
3390done
3391done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003392IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003393
3394 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="g++"
3395 ;;
3396esac
3397fi
3398CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003399if test -n "$CXX"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003400 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3401$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003402else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003403 { $as_echo "$as_me:$LINENO: result: no" >&5
3404$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003405fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003406
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003407 ;;
3408 cc) # Extract the first word of "c++", so it can be a program name with args.
3409set dummy c++; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003410{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3411$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003412if test "${ac_cv_path_CXX+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003413 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003414else
3415 case $CXX in
3416 [\\/]* | ?:[\\/]*)
3417 ac_cv_path_CXX="$CXX" # Let the user override the test with a path.
3418 ;;
3419 *)
3420 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3421for as_dir in notfound
3422do
3423 IFS=$as_save_IFS
3424 test -z "$as_dir" && as_dir=.
3425 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003426 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003427 ac_cv_path_CXX="$as_dir/$ac_word$ac_exec_ext"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003428 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003429 break 2
3430 fi
3431done
3432done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003433IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003434
3435 test -z "$ac_cv_path_CXX" && ac_cv_path_CXX="c++"
3436 ;;
3437esac
3438fi
3439CXX=$ac_cv_path_CXX
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003440if test -n "$CXX"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003441 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3442$as_echo "$CXX" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003443else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003444 { $as_echo "$as_me:$LINENO: result: no" >&5
3445$as_echo "no" >&6; }
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00003446fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003447
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003448 ;;
3449 esac
3450 if test "$CXX" = "notfound"
3451 then
3452 CXX=""
3453 fi
3454fi
3455if test -z "$CXX"
3456then
3457 for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
3458do
3459 # Extract the first word of "$ac_prog", so it can be a program name with args.
3460set dummy $ac_prog; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003461{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
3462$as_echo_n "checking for $ac_word... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003463if test "${ac_cv_prog_CXX+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003464 $as_echo_n "(cached) " >&6
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003465else
3466 if test -n "$CXX"; then
3467 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3468else
3469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3470for as_dir in $PATH
3471do
3472 IFS=$as_save_IFS
3473 test -z "$as_dir" && as_dir=.
3474 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003475 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003476 ac_cv_prog_CXX="$ac_prog"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003477 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003478 break 2
3479 fi
3480done
3481done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003482IFS=$as_save_IFS
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003483
3484fi
3485fi
3486CXX=$ac_cv_prog_CXX
3487if test -n "$CXX"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003488 { $as_echo "$as_me:$LINENO: result: $CXX" >&5
3489$as_echo "$CXX" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003490else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003491 { $as_echo "$as_me:$LINENO: result: no" >&5
3492$as_echo "no" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003493fi
3494
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003495
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003496 test -n "$CXX" && break
3497done
3498test -n "$CXX" || CXX="notfound"
3499
3500 if test "$CXX" = "notfound"
3501 then
3502 CXX=""
3503 fi
3504fi
3505if test "$preset_cxx" != "$CXX"
3506then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003507 { $as_echo "$as_me:$LINENO: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003508
3509 By default, distutils will build C++ extension modules with \"$CXX\".
3510 If this is not intended, then set CXX on the configure command line.
3511 " >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003512$as_echo "$as_me: WARNING:
Thomas Wouters49fd7fa2006-04-21 10:40:58 +00003513
3514 By default, distutils will build C++ extension modules with \"$CXX\".
3515 If this is not intended, then set CXX on the configure command line.
3516 " >&2;}
3517fi
3518
3519
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003520# checks for UNIX variants that set C preprocessor variables
Martin v. Löwis11437992002-04-12 09:54:03 +00003521
3522ac_ext=c
3523ac_cpp='$CPP $CPPFLAGS'
3524ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3525ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3526ac_compiler_gnu=$ac_cv_c_compiler_gnu
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003527{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
3528$as_echo_n "checking how to run the C preprocessor... " >&6; }
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003529# On Suns, sometimes $CPP names a directory.
3530if test -n "$CPP" && test -d "$CPP"; then
3531 CPP=
3532fi
3533if test -z "$CPP"; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003534 if test "${ac_cv_prog_CPP+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003535 $as_echo_n "(cached) " >&6
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003536else
Martin v. Löwis11437992002-04-12 09:54:03 +00003537 # Double quotes because CPP needs to be expanded
3538 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3539 do
3540 ac_preproc_ok=false
3541for ac_c_preproc_warn_flag in '' yes
3542do
3543 # Use a header file that comes with gcc, so configuring glibc
3544 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003545 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3546 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003547 # On the NeXT, cc -E runs the code through the compiler's parser,
Martin v. Löwis11437992002-04-12 09:54:03 +00003548 # not just through cpp. "Syntax error" is here to catch this case.
3549 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003550/* confdefs.h. */
3551_ACEOF
3552cat confdefs.h >>conftest.$ac_ext
3553cat >>conftest.$ac_ext <<_ACEOF
3554/* end confdefs.h. */
3555#ifdef __STDC__
3556# include <limits.h>
3557#else
3558# include <assert.h>
3559#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003560 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003561_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003562if { (ac_try="$ac_cpp conftest.$ac_ext"
3563case "(($ac_try" in
3564 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3565 *) ac_try_echo=$ac_try;;
3566esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003567eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3568$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003569 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003570 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003571 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003572 rm -f conftest.er1
3573 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003574 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003575 (exit $ac_status); } >/dev/null && {
3576 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3577 test ! -s conftest.err
3578 }; then
Martin v. Löwis1d5ecb72001-08-09 10:29:44 +00003579 :
3580else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003581 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003582sed 's/^/| /' conftest.$ac_ext >&5
3583
Martin v. Löwis11437992002-04-12 09:54:03 +00003584 # Broken: fails on valid input.
3585continue
Jack Jansendd19cf82001-12-06 22:36:17 +00003586fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003587
Martin v. Löwis11437992002-04-12 09:54:03 +00003588rm -f conftest.err conftest.$ac_ext
Jack Jansendd19cf82001-12-06 22:36:17 +00003589
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003590 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003591 # can be detected and how.
3592 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003593/* confdefs.h. */
3594_ACEOF
3595cat confdefs.h >>conftest.$ac_ext
3596cat >>conftest.$ac_ext <<_ACEOF
3597/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003598#include <ac_nonexistent.h>
3599_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003600if { (ac_try="$ac_cpp conftest.$ac_ext"
3601case "(($ac_try" in
3602 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3603 *) ac_try_echo=$ac_try;;
3604esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003605eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3606$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003607 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003608 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003609 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003610 rm -f conftest.er1
3611 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003612 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003613 (exit $ac_status); } >/dev/null && {
3614 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3615 test ! -s conftest.err
3616 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003617 # Broken: success on invalid input.
3618continue
3619else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003620 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003621sed 's/^/| /' conftest.$ac_ext >&5
3622
Martin v. Löwis11437992002-04-12 09:54:03 +00003623 # Passes both tests.
3624ac_preproc_ok=:
3625break
3626fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003627
Martin v. Löwis11437992002-04-12 09:54:03 +00003628rm -f conftest.err conftest.$ac_ext
3629
3630done
3631# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3632rm -f conftest.err conftest.$ac_ext
3633if $ac_preproc_ok; then
3634 break
3635fi
3636
3637 done
3638 ac_cv_prog_CPP=$CPP
3639
3640fi
3641 CPP=$ac_cv_prog_CPP
3642else
3643 ac_cv_prog_CPP=$CPP
3644fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003645{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
3646$as_echo "$CPP" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003647ac_preproc_ok=false
3648for ac_c_preproc_warn_flag in '' yes
3649do
3650 # Use a header file that comes with gcc, so configuring glibc
3651 # with a fresh cross-compiler works.
Skip Montanaro6dead952003-09-25 14:50:04 +00003652 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3653 # <limits.h> exists even on freestanding compilers.
Martin v. Löwis11437992002-04-12 09:54:03 +00003654 # On the NeXT, cc -E runs the code through the compiler's parser,
3655 # not just through cpp. "Syntax error" is here to catch this case.
3656 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003657/* confdefs.h. */
3658_ACEOF
3659cat confdefs.h >>conftest.$ac_ext
3660cat >>conftest.$ac_ext <<_ACEOF
3661/* end confdefs.h. */
3662#ifdef __STDC__
3663# include <limits.h>
3664#else
3665# include <assert.h>
3666#endif
Skip Montanarof0d5f792004-08-15 14:08:23 +00003667 Syntax error
Martin v. Löwis11437992002-04-12 09:54:03 +00003668_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003669if { (ac_try="$ac_cpp conftest.$ac_ext"
3670case "(($ac_try" in
3671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3672 *) ac_try_echo=$ac_try;;
3673esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003674eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3675$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003676 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003677 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003678 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003679 rm -f conftest.er1
3680 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003681 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003682 (exit $ac_status); } >/dev/null && {
3683 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3684 test ! -s conftest.err
3685 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003686 :
3687else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003688 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003689sed 's/^/| /' conftest.$ac_ext >&5
3690
Martin v. Löwis11437992002-04-12 09:54:03 +00003691 # Broken: fails on valid input.
3692continue
3693fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003694
Martin v. Löwis11437992002-04-12 09:54:03 +00003695rm -f conftest.err conftest.$ac_ext
3696
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003697 # OK, works on sane cases. Now check whether nonexistent headers
Martin v. Löwis11437992002-04-12 09:54:03 +00003698 # can be detected and how.
3699 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00003700/* confdefs.h. */
3701_ACEOF
3702cat confdefs.h >>conftest.$ac_ext
3703cat >>conftest.$ac_ext <<_ACEOF
3704/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00003705#include <ac_nonexistent.h>
3706_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003707if { (ac_try="$ac_cpp conftest.$ac_ext"
3708case "(($ac_try" in
3709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3710 *) ac_try_echo=$ac_try;;
3711esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003712eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3713$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003714 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00003715 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00003716 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00003717 rm -f conftest.er1
3718 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003719 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003720 (exit $ac_status); } >/dev/null && {
3721 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3722 test ! -s conftest.err
3723 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00003724 # Broken: success on invalid input.
3725continue
3726else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003727 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00003728sed 's/^/| /' conftest.$ac_ext >&5
3729
Martin v. Löwis11437992002-04-12 09:54:03 +00003730 # Passes both tests.
3731ac_preproc_ok=:
3732break
3733fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003734
Martin v. Löwis11437992002-04-12 09:54:03 +00003735rm -f conftest.err conftest.$ac_ext
3736
3737done
3738# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3739rm -f conftest.err conftest.$ac_ext
3740if $ac_preproc_ok; then
3741 :
3742else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003743 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
3744$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3745{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003746See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003747$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
Skip Montanaro6dead952003-09-25 14:50:04 +00003748See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003749 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +00003750fi
3751
3752ac_ext=c
3753ac_cpp='$CPP $CPPFLAGS'
3754ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3755ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3756ac_compiler_gnu=$ac_cv_c_compiler_gnu
3757
3758
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003759{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
3760$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003761if test "${ac_cv_path_GREP+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003762 $as_echo_n "(cached) " >&6
Skip Montanaro6dead952003-09-25 14:50:04 +00003763else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003764 if test -z "$GREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003765 ac_path_GREP_found=false
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003766 # Loop through the user's path and test for each of PROGNAME-LIST
3767 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003768for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3769do
3770 IFS=$as_save_IFS
3771 test -z "$as_dir" && as_dir=.
3772 for ac_prog in grep ggrep; do
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003773 for ac_exec_ext in '' $ac_executable_extensions; do
3774 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3775 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3776# Check for GNU ac_path_GREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003777 # Check for GNU $ac_path_GREP
3778case `"$ac_path_GREP" --version 2>&1` in
3779*GNU*)
3780 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3781*)
3782 ac_count=0
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003783 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003784 while :
3785 do
3786 cat "conftest.in" "conftest.in" >"conftest.tmp"
3787 mv "conftest.tmp" "conftest.in"
3788 cp "conftest.in" "conftest.nl"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003789 $as_echo 'GREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003790 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3791 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3792 ac_count=`expr $ac_count + 1`
3793 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3794 # Best one so far, save it but keep looking for a better one
3795 ac_cv_path_GREP="$ac_path_GREP"
3796 ac_path_GREP_max=$ac_count
Skip Montanaro6dead952003-09-25 14:50:04 +00003797 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003798 # 10*(2^10) chars as input seems more than enough
3799 test $ac_count -gt 10 && break
3800 done
3801 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3802esac
3803
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003804 $ac_path_GREP_found && break 3
3805 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003806 done
3807done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003808IFS=$as_save_IFS
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003809 if test -z "$ac_cv_path_GREP"; then
3810 { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3811$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003812 { (exit 1); exit 1; }; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003813 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003814else
3815 ac_cv_path_GREP=$GREP
3816fi
3817
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003818fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003819{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
3820$as_echo "$ac_cv_path_GREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003821 GREP="$ac_cv_path_GREP"
3822
3823
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003824{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
3825$as_echo_n "checking for egrep... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003826if test "${ac_cv_path_EGREP+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003827 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003828else
3829 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3830 then ac_cv_path_EGREP="$GREP -E"
3831 else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003832 if test -z "$EGREP"; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003833 ac_path_EGREP_found=false
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003834 # Loop through the user's path and test for each of PROGNAME-LIST
3835 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003836for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3837do
3838 IFS=$as_save_IFS
3839 test -z "$as_dir" && as_dir=.
3840 for ac_prog in egrep; do
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003841 for ac_exec_ext in '' $ac_executable_extensions; do
3842 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3843 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3844# Check for GNU ac_path_EGREP and select it if it is found.
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003845 # Check for GNU $ac_path_EGREP
3846case `"$ac_path_EGREP" --version 2>&1` in
3847*GNU*)
3848 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3849*)
3850 ac_count=0
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003851 $as_echo_n 0123456789 >"conftest.in"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003852 while :
3853 do
3854 cat "conftest.in" "conftest.in" >"conftest.tmp"
3855 mv "conftest.tmp" "conftest.in"
3856 cp "conftest.in" "conftest.nl"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003857 $as_echo 'EGREP' >> "conftest.nl"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003858 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3859 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3860 ac_count=`expr $ac_count + 1`
3861 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3862 # Best one so far, save it but keep looking for a better one
3863 ac_cv_path_EGREP="$ac_path_EGREP"
3864 ac_path_EGREP_max=$ac_count
3865 fi
3866 # 10*(2^10) chars as input seems more than enough
3867 test $ac_count -gt 10 && break
3868 done
3869 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3870esac
3871
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003872 $ac_path_EGREP_found && break 3
3873 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003874 done
3875done
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003876IFS=$as_save_IFS
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003877 if test -z "$ac_cv_path_EGREP"; then
3878 { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3879$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003880 { (exit 1); exit 1; }; }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003881 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003882else
3883 ac_cv_path_EGREP=$EGREP
3884fi
3885
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003886 fi
3887fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003888{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
3889$as_echo "$ac_cv_path_EGREP" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00003890 EGREP="$ac_cv_path_EGREP"
Skip Montanaro6dead952003-09-25 14:50:04 +00003891
3892
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003893{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
3894$as_echo_n "checking for ANSI C header files... " >&6; }
3895if test "${ac_cv_header_stdc+set}" = set; then
3896 $as_echo_n "(cached) " >&6
3897else
3898 cat >conftest.$ac_ext <<_ACEOF
3899/* confdefs.h. */
3900_ACEOF
3901cat confdefs.h >>conftest.$ac_ext
3902cat >>conftest.$ac_ext <<_ACEOF
3903/* end confdefs.h. */
3904#include <stdlib.h>
3905#include <stdarg.h>
3906#include <string.h>
3907#include <float.h>
Alexandre Vassalotti19142282009-07-17 23:11:52 +00003908
Benjamin Peterson8719ad52009-09-11 22:24:02 +00003909int
3910main ()
3911{
3912
3913 ;
3914 return 0;
3915}
3916_ACEOF
3917rm -f conftest.$ac_objext
3918if { (ac_try="$ac_compile"
3919case "(($ac_try" in
3920 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3921 *) ac_try_echo=$ac_try;;
3922esac
3923eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
3924$as_echo "$ac_try_echo") >&5
3925 (eval "$ac_compile") 2>conftest.er1
3926 ac_status=$?
3927 grep -v '^ *+' conftest.er1 >conftest.err
3928 rm -f conftest.er1
3929 cat conftest.err >&5
3930 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
3931 (exit $ac_status); } && {
3932 test -z "$ac_c_werror_flag" ||
3933 test ! -s conftest.err
3934 } && test -s conftest.$ac_objext; then
3935 ac_cv_header_stdc=yes
3936else
3937 $as_echo "$as_me: failed program was:" >&5
3938sed 's/^/| /' conftest.$ac_ext >&5
3939
3940 ac_cv_header_stdc=no
3941fi
3942
3943rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3944
3945if test $ac_cv_header_stdc = yes; then
3946 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3947 cat >conftest.$ac_ext <<_ACEOF
3948/* confdefs.h. */
3949_ACEOF
3950cat confdefs.h >>conftest.$ac_ext
3951cat >>conftest.$ac_ext <<_ACEOF
3952/* end confdefs.h. */
3953#include <string.h>
3954
3955_ACEOF
3956if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3957 $EGREP "memchr" >/dev/null 2>&1; then
3958 :
3959else
3960 ac_cv_header_stdc=no
3961fi
3962rm -f conftest*
3963
3964fi
3965
3966if test $ac_cv_header_stdc = yes; then
3967 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3968 cat >conftest.$ac_ext <<_ACEOF
3969/* confdefs.h. */
3970_ACEOF
3971cat confdefs.h >>conftest.$ac_ext
3972cat >>conftest.$ac_ext <<_ACEOF
3973/* end confdefs.h. */
3974#include <stdlib.h>
3975
3976_ACEOF
3977if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3978 $EGREP "free" >/dev/null 2>&1; then
3979 :
3980else
3981 ac_cv_header_stdc=no
3982fi
3983rm -f conftest*
3984
3985fi
3986
3987if test $ac_cv_header_stdc = yes; then
3988 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3989 if test "$cross_compiling" = yes; then
3990 :
3991else
3992 cat >conftest.$ac_ext <<_ACEOF
3993/* confdefs.h. */
3994_ACEOF
3995cat confdefs.h >>conftest.$ac_ext
3996cat >>conftest.$ac_ext <<_ACEOF
3997/* end confdefs.h. */
3998#include <ctype.h>
3999#include <stdlib.h>
4000#if ((' ' & 0x0FF) == 0x020)
4001# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4002# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4003#else
4004# define ISLOWER(c) \
4005 (('a' <= (c) && (c) <= 'i') \
4006 || ('j' <= (c) && (c) <= 'r') \
4007 || ('s' <= (c) && (c) <= 'z'))
4008# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4009#endif
4010
4011#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4012int
4013main ()
4014{
4015 int i;
4016 for (i = 0; i < 256; i++)
4017 if (XOR (islower (i), ISLOWER (i))
4018 || toupper (i) != TOUPPER (i))
4019 return 2;
4020 return 0;
4021}
4022_ACEOF
4023rm -f conftest$ac_exeext
4024if { (ac_try="$ac_link"
4025case "(($ac_try" in
4026 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4027 *) ac_try_echo=$ac_try;;
4028esac
4029eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4030$as_echo "$ac_try_echo") >&5
4031 (eval "$ac_link") 2>&5
4032 ac_status=$?
4033 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4034 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4035 { (case "(($ac_try" in
4036 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4037 *) ac_try_echo=$ac_try;;
4038esac
4039eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4040$as_echo "$ac_try_echo") >&5
4041 (eval "$ac_try") 2>&5
4042 ac_status=$?
4043 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4044 (exit $ac_status); }; }; then
4045 :
4046else
4047 $as_echo "$as_me: program exited with status $ac_status" >&5
4048$as_echo "$as_me: failed program was:" >&5
4049sed 's/^/| /' conftest.$ac_ext >&5
4050
4051( exit $ac_status )
4052ac_cv_header_stdc=no
4053fi
4054rm -rf conftest.dSYM
4055rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4056fi
4057
4058
4059fi
4060fi
4061{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
4062$as_echo "$ac_cv_header_stdc" >&6; }
4063if test $ac_cv_header_stdc = yes; then
4064
4065cat >>confdefs.h <<\_ACEOF
4066#define STDC_HEADERS 1
4067_ACEOF
4068
4069fi
4070
4071# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4082 inttypes.h stdint.h unistd.h
4083do
4084as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4085{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
4086$as_echo_n "checking for $ac_header... " >&6; }
4087if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
4088 $as_echo_n "(cached) " >&6
4089else
4090 cat >conftest.$ac_ext <<_ACEOF
4091/* confdefs.h. */
4092_ACEOF
4093cat confdefs.h >>conftest.$ac_ext
4094cat >>conftest.$ac_ext <<_ACEOF
4095/* end confdefs.h. */
4096$ac_includes_default
4097
4098#include <$ac_header>
4099_ACEOF
4100rm -f conftest.$ac_objext
4101if { (ac_try="$ac_compile"
4102case "(($ac_try" in
4103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4104 *) ac_try_echo=$ac_try;;
4105esac
4106eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4107$as_echo "$ac_try_echo") >&5
4108 (eval "$ac_compile") 2>conftest.er1
4109 ac_status=$?
4110 grep -v '^ *+' conftest.er1 >conftest.err
4111 rm -f conftest.er1
4112 cat conftest.err >&5
4113 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4114 (exit $ac_status); } && {
4115 test -z "$ac_c_werror_flag" ||
4116 test ! -s conftest.err
4117 } && test -s conftest.$ac_objext; then
4118 eval "$as_ac_Header=yes"
4119else
4120 $as_echo "$as_me: failed program was:" >&5
4121sed 's/^/| /' conftest.$ac_ext >&5
4122
4123 eval "$as_ac_Header=no"
4124fi
4125
4126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4127fi
4128ac_res=`eval 'as_val=${'$as_ac_Header'}
4129 $as_echo "$as_val"'`
4130 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
4131$as_echo "$ac_res" >&6; }
4132as_val=`eval 'as_val=${'$as_ac_Header'}
4133 $as_echo "$as_val"'`
4134 if test "x$as_val" = x""yes; then
4135 cat >>confdefs.h <<_ACEOF
4136#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4137_ACEOF
4138
4139fi
4140
4141done
4142
4143
4144
4145 if test "${ac_cv_header_minix_config_h+set}" = set; then
4146 { $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4147$as_echo_n "checking for minix/config.h... " >&6; }
4148if test "${ac_cv_header_minix_config_h+set}" = set; then
4149 $as_echo_n "(cached) " >&6
4150fi
4151{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4152$as_echo "$ac_cv_header_minix_config_h" >&6; }
4153else
4154 # Is the header compilable?
4155{ $as_echo "$as_me:$LINENO: checking minix/config.h usability" >&5
4156$as_echo_n "checking minix/config.h usability... " >&6; }
Alexandre Vassalotti19142282009-07-17 23:11:52 +00004157cat >conftest.$ac_ext <<_ACEOF
Antoine Pitrou20327222009-05-24 20:39:11 +00004158/* confdefs.h. */
4159_ACEOF
4160cat confdefs.h >>conftest.$ac_ext
4161cat >>conftest.$ac_ext <<_ACEOF
4162/* end confdefs.h. */
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004163$ac_includes_default
4164#include <minix/config.h>
Antoine Pitrou20327222009-05-24 20:39:11 +00004165_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004166rm -f conftest.$ac_objext
4167if { (ac_try="$ac_compile"
4168case "(($ac_try" in
4169 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4170 *) ac_try_echo=$ac_try;;
4171esac
4172eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4173$as_echo "$ac_try_echo") >&5
4174 (eval "$ac_compile") 2>conftest.er1
4175 ac_status=$?
4176 grep -v '^ *+' conftest.er1 >conftest.err
4177 rm -f conftest.er1
4178 cat conftest.err >&5
4179 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4180 (exit $ac_status); } && {
4181 test -z "$ac_c_werror_flag" ||
4182 test ! -s conftest.err
4183 } && test -s conftest.$ac_objext; then
4184 ac_header_compiler=yes
4185else
4186 $as_echo "$as_me: failed program was:" >&5
4187sed 's/^/| /' conftest.$ac_ext >&5
4188
4189 ac_header_compiler=no
4190fi
4191
4192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4193{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
4194$as_echo "$ac_header_compiler" >&6; }
4195
4196# Is the header present?
4197{ $as_echo "$as_me:$LINENO: checking minix/config.h presence" >&5
4198$as_echo_n "checking minix/config.h presence... " >&6; }
4199cat >conftest.$ac_ext <<_ACEOF
4200/* confdefs.h. */
4201_ACEOF
4202cat confdefs.h >>conftest.$ac_ext
4203cat >>conftest.$ac_ext <<_ACEOF
4204/* end confdefs.h. */
4205#include <minix/config.h>
4206_ACEOF
4207if { (ac_try="$ac_cpp conftest.$ac_ext"
4208case "(($ac_try" in
4209 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4210 *) ac_try_echo=$ac_try;;
4211esac
4212eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4213$as_echo "$ac_try_echo") >&5
4214 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
4215 ac_status=$?
4216 grep -v '^ *+' conftest.er1 >conftest.err
4217 rm -f conftest.er1
4218 cat conftest.err >&5
4219 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4220 (exit $ac_status); } >/dev/null && {
4221 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
4222 test ! -s conftest.err
4223 }; then
4224 ac_header_preproc=yes
4225else
4226 $as_echo "$as_me: failed program was:" >&5
4227sed 's/^/| /' conftest.$ac_ext >&5
4228
4229 ac_header_preproc=no
4230fi
4231
4232rm -f conftest.err conftest.$ac_ext
4233{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
4234$as_echo "$ac_header_preproc" >&6; }
4235
4236# So? What about this header?
4237case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
4238 yes:no: )
4239 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&5
4240$as_echo "$as_me: WARNING: minix/config.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
4241 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the compiler's result" >&5
4242$as_echo "$as_me: WARNING: minix/config.h: proceeding with the compiler's result" >&2;}
4243 ac_header_preproc=yes
4244 ;;
4245 no:yes:* )
4246 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: present but cannot be compiled" >&5
4247$as_echo "$as_me: WARNING: minix/config.h: present but cannot be compiled" >&2;}
4248 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: check for missing prerequisite headers?" >&5
4249$as_echo "$as_me: WARNING: minix/config.h: check for missing prerequisite headers?" >&2;}
4250 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: see the Autoconf documentation" >&5
4251$as_echo "$as_me: WARNING: minix/config.h: see the Autoconf documentation" >&2;}
4252 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&5
4253$as_echo "$as_me: WARNING: minix/config.h: section \"Present But Cannot Be Compiled\"" >&2;}
4254 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: proceeding with the preprocessor's result" >&5
4255$as_echo "$as_me: WARNING: minix/config.h: proceeding with the preprocessor's result" >&2;}
4256 { $as_echo "$as_me:$LINENO: WARNING: minix/config.h: in the future, the compiler will take precedence" >&5
4257$as_echo "$as_me: WARNING: minix/config.h: in the future, the compiler will take precedence" >&2;}
4258 ( cat <<\_ASBOX
4259## -------------------------------------- ##
4260## Report this to http://bugs.python.org/ ##
4261## -------------------------------------- ##
4262_ASBOX
4263 ) | sed "s/^/$as_me: WARNING: /" >&2
4264 ;;
4265esac
4266{ $as_echo "$as_me:$LINENO: checking for minix/config.h" >&5
4267$as_echo_n "checking for minix/config.h... " >&6; }
4268if test "${ac_cv_header_minix_config_h+set}" = set; then
4269 $as_echo_n "(cached) " >&6
4270else
4271 ac_cv_header_minix_config_h=$ac_header_preproc
4272fi
4273{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_minix_config_h" >&5
4274$as_echo "$ac_cv_header_minix_config_h" >&6; }
4275
4276fi
4277if test "x$ac_cv_header_minix_config_h" = x""yes; then
4278 MINIX=yes
4279else
4280 MINIX=
4281fi
4282
4283
4284 if test "$MINIX" = yes; then
4285
Antoine Pitrou20327222009-05-24 20:39:11 +00004286cat >>confdefs.h <<\_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004287#define _POSIX_SOURCE 1
4288_ACEOF
4289
4290
4291cat >>confdefs.h <<\_ACEOF
4292#define _POSIX_1_SOURCE 2
4293_ACEOF
4294
4295
4296cat >>confdefs.h <<\_ACEOF
4297#define _MINIX 1
4298_ACEOF
4299
4300 fi
4301
4302
4303
4304 { $as_echo "$as_me:$LINENO: checking whether it is safe to define __EXTENSIONS__" >&5
4305$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4306if test "${ac_cv_safe_to_define___extensions__+set}" = set; then
4307 $as_echo_n "(cached) " >&6
4308else
4309 cat >conftest.$ac_ext <<_ACEOF
4310/* confdefs.h. */
4311_ACEOF
4312cat confdefs.h >>conftest.$ac_ext
4313cat >>conftest.$ac_ext <<_ACEOF
4314/* end confdefs.h. */
4315
4316# define __EXTENSIONS__ 1
4317 $ac_includes_default
4318int
4319main ()
4320{
4321
4322 ;
4323 return 0;
4324}
4325_ACEOF
4326rm -f conftest.$ac_objext
4327if { (ac_try="$ac_compile"
4328case "(($ac_try" in
4329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4330 *) ac_try_echo=$ac_try;;
4331esac
4332eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4333$as_echo "$ac_try_echo") >&5
4334 (eval "$ac_compile") 2>conftest.er1
4335 ac_status=$?
4336 grep -v '^ *+' conftest.er1 >conftest.err
4337 rm -f conftest.er1
4338 cat conftest.err >&5
4339 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
4340 (exit $ac_status); } && {
4341 test -z "$ac_c_werror_flag" ||
4342 test ! -s conftest.err
4343 } && test -s conftest.$ac_objext; then
4344 ac_cv_safe_to_define___extensions__=yes
4345else
4346 $as_echo "$as_me: failed program was:" >&5
4347sed 's/^/| /' conftest.$ac_ext >&5
4348
4349 ac_cv_safe_to_define___extensions__=no
4350fi
4351
4352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4353fi
4354{ $as_echo "$as_me:$LINENO: result: $ac_cv_safe_to_define___extensions__" >&5
4355$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4356 test $ac_cv_safe_to_define___extensions__ = yes &&
4357 cat >>confdefs.h <<\_ACEOF
4358#define __EXTENSIONS__ 1
4359_ACEOF
4360
4361 cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004362#define _ALL_SOURCE 1
4363_ACEOF
4364
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004365 cat >>confdefs.h <<\_ACEOF
4366#define _GNU_SOURCE 1
4367_ACEOF
4368
4369 cat >>confdefs.h <<\_ACEOF
4370#define _POSIX_PTHREAD_SEMANTICS 1
4371_ACEOF
4372
4373 cat >>confdefs.h <<\_ACEOF
4374#define _TANDEM_SOURCE 1
4375_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004376
4377
4378
4379# Check for unsupported systems
4380case $ac_sys_system/$ac_sys_release in
4381atheos*|Linux*/1*)
4382 echo This system \($ac_sys_system/$ac_sys_release\) is no longer supported.
4383 echo See README for details.
4384 exit 1;;
4385esac
4386
4387
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004388{ $as_echo "$as_me:$LINENO: checking for --with-suffix" >&5
4389$as_echo_n "checking for --with-suffix... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004390
4391# Check whether --with-suffix was given.
4392if test "${with_suffix+set}" = set; then
4393 withval=$with_suffix;
4394 case $withval in
4395 no) EXEEXT=;;
4396 yes) EXEEXT=.exe;;
4397 *) EXEEXT=$withval;;
4398 esac
4399fi
4400
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004401{ $as_echo "$as_me:$LINENO: result: $EXEEXT" >&5
4402$as_echo "$EXEEXT" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004403
4404# Test whether we're running on a non-case-sensitive system, in which
4405# case we give a warning if no ext is given
4406
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004407{ $as_echo "$as_me:$LINENO: checking for case-insensitive build directory" >&5
4408$as_echo_n "checking for case-insensitive build directory... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004409if test ! -d CaseSensitiveTestDir; then
4410mkdir CaseSensitiveTestDir
4411fi
4412
4413if test -d casesensitivetestdir
4414then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004415 { $as_echo "$as_me:$LINENO: result: yes" >&5
4416$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004417 BUILDEXEEXT=.exe
4418else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004419 { $as_echo "$as_me:$LINENO: result: no" >&5
4420$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004421 BUILDEXEEXT=$EXEEXT
4422fi
4423rmdir CaseSensitiveTestDir
4424
4425case $MACHDEP in
4426bsdos*)
4427 case $CC in
4428 gcc) CC="$CC -D_HAVE_BSDI";;
4429 esac;;
4430esac
4431
4432case $ac_sys_system in
4433hp*|HP*)
4434 case $CC in
4435 cc|*/cc) CC="$CC -Ae";;
4436 esac;;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004437SunOS*)
4438 # Some functions have a prototype only with that define, e.g. confstr
4439
4440cat >>confdefs.h <<\_ACEOF
4441#define __EXTENSIONS__ 1
4442_ACEOF
4443
4444 ;;
4445esac
4446
4447
4448
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004449{ $as_echo "$as_me:$LINENO: checking LIBRARY" >&5
4450$as_echo_n "checking LIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004451if test -z "$LIBRARY"
4452then
4453 LIBRARY='libpython$(VERSION).a'
4454fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004455{ $as_echo "$as_me:$LINENO: result: $LIBRARY" >&5
4456$as_echo "$LIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004457
4458# LDLIBRARY is the name of the library to link against (as opposed to the
4459# name of the library into which to insert object files). BLDLIBRARY is also
4460# the library to link against, usually. On Mac OS X frameworks, BLDLIBRARY
4461# is blank as the main program is not linked directly against LDLIBRARY.
4462# LDLIBRARYDIR is the path to LDLIBRARY, which is made in a subdirectory. On
4463# systems without shared libraries, LDLIBRARY is the same as LIBRARY
4464# (defined in the Makefiles). On Cygwin LDLIBRARY is the import library,
4465# DLLLIBRARY is the shared (i.e., DLL) library.
4466#
4467# RUNSHARED is used to run shared python without installed libraries
4468#
4469# INSTSONAME is the name of the shared library that will be use to install
4470# on the system - some systems like version suffix, others don't
4471
4472
4473
4474
4475
4476
4477LDLIBRARY="$LIBRARY"
4478BLDLIBRARY='$(LDLIBRARY)'
4479INSTSONAME='$(LDLIBRARY)'
4480DLLLIBRARY=''
4481LDLIBRARYDIR=''
4482RUNSHARED=''
4483
4484# LINKCC is the command that links the python executable -- default is $(CC).
4485# If CXX is set, and if it is needed to link a main function that was
4486# compiled with CXX, LINKCC is CXX instead. Always using CXX is undesirable:
4487# python might then depend on the C++ runtime
4488# This is altered for AIX in order to build the export list before
4489# linking.
4490
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004491{ $as_echo "$as_me:$LINENO: checking LINKCC" >&5
4492$as_echo_n "checking LINKCC... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004493if test -z "$LINKCC"
4494then
4495 LINKCC='$(PURIFY) $(MAINCC)'
4496 case $ac_sys_system in
4497 AIX*)
4498 exp_extra="\"\""
4499 if test $ac_sys_release -ge 5 -o \
4500 $ac_sys_release -eq 4 -a `uname -r` -ge 2 ; then
4501 exp_extra="."
4502 fi
4503 LINKCC="\$(srcdir)/Modules/makexp_aix Modules/python.exp $exp_extra \$(LIBRARY); $LINKCC";;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004504 QNX*)
4505 # qcc must be used because the other compilers do not
4506 # support -N.
4507 LINKCC=qcc;;
4508 esac
4509fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004510{ $as_echo "$as_me:$LINENO: result: $LINKCC" >&5
4511$as_echo "$LINKCC" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004512
4513# GNULD is set to "yes" if the GNU linker is used. If this goes wrong
4514# make sure we default having it set to "no": this is used by
4515# distutils.unixccompiler to know if it should add --enable-new-dtags
4516# to linker command lines, and failing to detect GNU ld simply results
4517# in the same bahaviour as before.
4518
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004519{ $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
4520$as_echo_n "checking for GNU ld... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004521ac_prog=ld
4522if test "$GCC" = yes; then
4523 ac_prog=`$CC -print-prog-name=ld`
4524fi
4525case `"$ac_prog" -V 2>&1 < /dev/null` in
4526 *GNU*)
4527 GNULD=yes;;
4528 *)
4529 GNULD=no;;
4530esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004531{ $as_echo "$as_me:$LINENO: result: $GNULD" >&5
4532$as_echo "$GNULD" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004533
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004534{ $as_echo "$as_me:$LINENO: checking for --enable-shared" >&5
4535$as_echo_n "checking for --enable-shared... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004536# Check whether --enable-shared was given.
4537if test "${enable_shared+set}" = set; then
4538 enableval=$enable_shared;
4539fi
4540
4541
4542if test -z "$enable_shared"
4543then
4544 case $ac_sys_system in
4545 CYGWIN* | atheos*)
4546 enable_shared="yes";;
4547 *)
4548 enable_shared="no";;
4549 esac
4550fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004551{ $as_echo "$as_me:$LINENO: result: $enable_shared" >&5
4552$as_echo "$enable_shared" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004553
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004554{ $as_echo "$as_me:$LINENO: checking for --enable-profiling" >&5
4555$as_echo_n "checking for --enable-profiling... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004556# Check whether --enable-profiling was given.
4557if test "${enable_profiling+set}" = set; then
4558 enableval=$enable_profiling; ac_save_cc="$CC"
4559 CC="$CC -pg"
4560 if test "$cross_compiling" = yes; then
4561 ac_enable_profiling="no"
4562else
4563 cat >conftest.$ac_ext <<_ACEOF
4564/* confdefs.h. */
4565_ACEOF
4566cat confdefs.h >>conftest.$ac_ext
4567cat >>conftest.$ac_ext <<_ACEOF
4568/* end confdefs.h. */
4569int main() { return 0; }
4570_ACEOF
4571rm -f conftest$ac_exeext
4572if { (ac_try="$ac_link"
4573case "(($ac_try" in
4574 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4575 *) ac_try_echo=$ac_try;;
4576esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004577eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4578$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004579 (eval "$ac_link") 2>&5
4580 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004581 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4583 { (case "(($ac_try" in
4584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4585 *) ac_try_echo=$ac_try;;
4586esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004587eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
4588$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004589 (eval "$ac_try") 2>&5
4590 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004591 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004592 (exit $ac_status); }; }; then
4593 ac_enable_profiling="yes"
4594else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004595 $as_echo "$as_me: program exited with status $ac_status" >&5
4596$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004597sed 's/^/| /' conftest.$ac_ext >&5
4598
4599( exit $ac_status )
4600ac_enable_profiling="no"
4601fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004602rm -rf conftest.dSYM
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004603rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4604fi
4605
4606
4607 CC="$ac_save_cc"
4608fi
4609
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004610{ $as_echo "$as_me:$LINENO: result: $ac_enable_profiling" >&5
4611$as_echo "$ac_enable_profiling" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004612
4613case "$ac_enable_profiling" in
4614 "yes")
4615 BASECFLAGS="-pg $BASECFLAGS"
4616 LDFLAGS="-pg $LDFLAGS"
4617 ;;
4618esac
4619
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004620{ $as_echo "$as_me:$LINENO: checking LDLIBRARY" >&5
4621$as_echo_n "checking LDLIBRARY... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004622
4623# MacOSX framework builds need more magic. LDLIBRARY is the dynamic
4624# library that we build, but we do not want to link against it (we
4625# will find it with a -framework option). For this reason there is an
4626# extra variable BLDLIBRARY against which Python and the extension
4627# modules are linked, BLDLIBRARY. This is normally the same as
4628# LDLIBRARY, but empty for MacOSX framework builds.
4629if test "$enable_framework"
4630then
4631 LDLIBRARY='$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
4632 RUNSHARED=DYLD_FRAMEWORK_PATH="`pwd`:$DYLD_FRAMEWORK_PATH"
4633 BLDLIBRARY=''
4634else
4635 BLDLIBRARY='$(LDLIBRARY)'
4636fi
4637
4638# Other platforms follow
4639if test $enable_shared = "yes"; then
4640
4641cat >>confdefs.h <<\_ACEOF
4642#define Py_ENABLE_SHARED 1
4643_ACEOF
4644
4645 case $ac_sys_system in
4646 CYGWIN*)
4647 LDLIBRARY='libpython$(VERSION).dll.a'
4648 DLLLIBRARY='libpython$(VERSION).dll'
4649 ;;
4650 SunOS*)
4651 LDLIBRARY='libpython$(VERSION).so'
4652 BLDLIBRARY='-Wl,-R,$(LIBDIR) -L. -lpython$(VERSION)'
4653 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4654 INSTSONAME="$LDLIBRARY".$SOVERSION
4655 ;;
4656 Linux*|GNU*|NetBSD*|FreeBSD*|DragonFly*)
4657 LDLIBRARY='libpython$(VERSION).so'
4658 BLDLIBRARY='-L. -lpython$(VERSION)'
4659 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4660 case $ac_sys_system in
4661 FreeBSD*)
4662 SOVERSION=`echo $SOVERSION|cut -d "." -f 1`
4663 ;;
4664 esac
4665 INSTSONAME="$LDLIBRARY".$SOVERSION
4666 ;;
4667 hp*|HP*)
4668 case `uname -m` in
4669 ia64)
4670 LDLIBRARY='libpython$(VERSION).so'
4671 ;;
4672 *)
4673 LDLIBRARY='libpython$(VERSION).sl'
4674 ;;
4675 esac
4676 BLDLIBRARY='-Wl,+b,$(LIBDIR) -L. -lpython$(VERSION)'
4677 RUNSHARED=SHLIB_PATH=`pwd`:${SHLIB_PATH}
4678 ;;
4679 OSF*)
4680 LDLIBRARY='libpython$(VERSION).so'
4681 BLDLIBRARY='-rpath $(LIBDIR) -L. -lpython$(VERSION)'
4682 RUNSHARED=LD_LIBRARY_PATH=`pwd`:${LD_LIBRARY_PATH}
4683 ;;
4684 atheos*)
4685 LDLIBRARY='libpython$(VERSION).so'
4686 BLDLIBRARY='-L. -lpython$(VERSION)'
4687 RUNSHARED=DLL_PATH=`pwd`:${DLL_PATH:-/atheos/sys/libs:/atheos/autolnk/lib}
4688 ;;
4689 Darwin*)
4690 LDLIBRARY='libpython$(VERSION).dylib'
4691 BLDLIBRARY='-L. -lpython$(VERSION)'
4692 RUNSHARED='DYLD_LIBRARY_PATH=`pwd`:${DYLD_LIBRARY_PATH}'
4693 ;;
4694
4695 esac
4696else # shared is disabled
4697 case $ac_sys_system in
4698 CYGWIN*)
4699 BLDLIBRARY='$(LIBRARY)'
4700 LDLIBRARY='libpython$(VERSION).dll.a'
4701 ;;
4702 esac
4703fi
4704
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004705{ $as_echo "$as_me:$LINENO: result: $LDLIBRARY" >&5
4706$as_echo "$LDLIBRARY" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004707
4708if test -n "$ac_tool_prefix"; then
4709 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4710set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004711{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4712$as_echo_n "checking for $ac_word... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004713if test "${ac_cv_prog_RANLIB+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004714 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004715else
4716 if test -n "$RANLIB"; then
4717 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4718else
4719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4720for as_dir in $PATH
4721do
4722 IFS=$as_save_IFS
4723 test -z "$as_dir" && as_dir=.
4724 for ac_exec_ext in '' $ac_executable_extensions; do
4725 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4726 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004727 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004728 break 2
4729 fi
4730done
4731done
4732IFS=$as_save_IFS
4733
4734fi
4735fi
4736RANLIB=$ac_cv_prog_RANLIB
4737if test -n "$RANLIB"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004738 { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
4739$as_echo "$RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004740else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004741 { $as_echo "$as_me:$LINENO: result: no" >&5
4742$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004743fi
4744
4745
4746fi
4747if test -z "$ac_cv_prog_RANLIB"; then
4748 ac_ct_RANLIB=$RANLIB
4749 # Extract the first word of "ranlib", so it can be a program name with args.
4750set dummy ranlib; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004751{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4752$as_echo_n "checking for $ac_word... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004753if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004754 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004755else
4756 if test -n "$ac_ct_RANLIB"; then
4757 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4758else
4759as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4760for as_dir in $PATH
4761do
4762 IFS=$as_save_IFS
4763 test -z "$as_dir" && as_dir=.
4764 for ac_exec_ext in '' $ac_executable_extensions; do
4765 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4766 ac_cv_prog_ac_ct_RANLIB="ranlib"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004767 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004768 break 2
4769 fi
4770done
4771done
4772IFS=$as_save_IFS
4773
4774fi
4775fi
4776ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4777if test -n "$ac_ct_RANLIB"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004778 { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
4779$as_echo "$ac_ct_RANLIB" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004780else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004781 { $as_echo "$as_me:$LINENO: result: no" >&5
4782$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004783fi
4784
4785 if test "x$ac_ct_RANLIB" = x; then
4786 RANLIB=":"
4787 else
4788 case $cross_compiling:$ac_tool_warned in
4789yes:)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004790{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
4791$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004792ac_tool_warned=yes ;;
4793esac
4794 RANLIB=$ac_ct_RANLIB
4795 fi
4796else
4797 RANLIB="$ac_cv_prog_RANLIB"
4798fi
4799
4800
4801for ac_prog in ar aal
4802do
4803 # Extract the first word of "$ac_prog", so it can be a program name with args.
4804set dummy $ac_prog; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004805{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4806$as_echo_n "checking for $ac_word... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004807if test "${ac_cv_prog_AR+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004808 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004809else
4810 if test -n "$AR"; then
4811 ac_cv_prog_AR="$AR" # Let the user override the test.
4812else
4813as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4814for as_dir in $PATH
4815do
4816 IFS=$as_save_IFS
4817 test -z "$as_dir" && as_dir=.
4818 for ac_exec_ext in '' $ac_executable_extensions; do
4819 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4820 ac_cv_prog_AR="$ac_prog"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004821 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004822 break 2
4823 fi
4824done
4825done
4826IFS=$as_save_IFS
4827
4828fi
4829fi
4830AR=$ac_cv_prog_AR
4831if test -n "$AR"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004832 { $as_echo "$as_me:$LINENO: result: $AR" >&5
4833$as_echo "$AR" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004834else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004835 { $as_echo "$as_me:$LINENO: result: no" >&5
4836$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004837fi
4838
4839
4840 test -n "$AR" && break
4841done
4842test -n "$AR" || AR="ar"
4843
4844
4845# tweak ARFLAGS only if the user didn't set it on the command line
4846
4847if test -z "$ARFLAGS"
4848then
4849 ARFLAGS="rc"
4850fi
4851
4852
4853# Extract the first word of "svnversion", so it can be a program name with args.
4854set dummy svnversion; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004855{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
4856$as_echo_n "checking for $ac_word... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004857if test "${ac_cv_prog_SVNVERSION+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004858 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004859else
4860 if test -n "$SVNVERSION"; then
4861 ac_cv_prog_SVNVERSION="$SVNVERSION" # Let the user override the test.
4862else
4863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4864for as_dir in $PATH
4865do
4866 IFS=$as_save_IFS
4867 test -z "$as_dir" && as_dir=.
4868 for ac_exec_ext in '' $ac_executable_extensions; do
4869 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4870 ac_cv_prog_SVNVERSION="found"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004871 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004872 break 2
4873 fi
4874done
4875done
4876IFS=$as_save_IFS
4877
4878 test -z "$ac_cv_prog_SVNVERSION" && ac_cv_prog_SVNVERSION="not-found"
4879fi
4880fi
4881SVNVERSION=$ac_cv_prog_SVNVERSION
4882if test -n "$SVNVERSION"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004883 { $as_echo "$as_me:$LINENO: result: $SVNVERSION" >&5
4884$as_echo "$SVNVERSION" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004885else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004886 { $as_echo "$as_me:$LINENO: result: no" >&5
4887$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004888fi
4889
4890
4891if test $SVNVERSION = found
4892then
4893 SVNVERSION="svnversion \$(srcdir)"
4894else
4895 SVNVERSION="echo Unversioned directory"
4896fi
4897
4898case $MACHDEP in
4899bsdos*|hp*|HP*)
4900 # install -d does not work on BSDI or HP-UX
4901 if test -z "$INSTALL"
4902 then
4903 INSTALL="${srcdir}/install-sh -c"
4904 fi
4905esac
4906ac_aux_dir=
4907for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4908 if test -f "$ac_dir/install-sh"; then
4909 ac_aux_dir=$ac_dir
4910 ac_install_sh="$ac_aux_dir/install-sh -c"
4911 break
4912 elif test -f "$ac_dir/install.sh"; then
4913 ac_aux_dir=$ac_dir
4914 ac_install_sh="$ac_aux_dir/install.sh -c"
4915 break
4916 elif test -f "$ac_dir/shtool"; then
4917 ac_aux_dir=$ac_dir
4918 ac_install_sh="$ac_aux_dir/shtool install -c"
4919 break
4920 fi
4921done
4922if test -z "$ac_aux_dir"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004923 { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
4924$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004925 { (exit 1); exit 1; }; }
4926fi
4927
4928# These three variables are undocumented and unsupported,
4929# and are intended to be withdrawn in a future Autoconf release.
4930# They can cause serious problems if a builder's source tree is in a directory
4931# whose full name contains unusual characters.
4932ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4933ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4934ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4935
4936
4937# Find a good install program. We prefer a C program (faster),
4938# so one script is as good as another. But avoid the broken or
4939# incompatible versions:
4940# SysV /etc/install, /usr/sbin/install
4941# SunOS /usr/etc/install
4942# IRIX /sbin/install
4943# AIX /bin/install
4944# AmigaOS /C/install, which installs bootblocks on floppy discs
4945# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4946# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4947# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4948# OS/2's system install, which has a completely different semantic
4949# ./install, which can be erroneously created by make from ./install.sh.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004950# Reject install programs that cannot install multiple files.
4951{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
4952$as_echo_n "checking for a BSD-compatible install... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004953if test -z "$INSTALL"; then
4954if test "${ac_cv_path_install+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004955 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004956else
4957 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4958for as_dir in $PATH
4959do
4960 IFS=$as_save_IFS
4961 test -z "$as_dir" && as_dir=.
4962 # Account for people who put trailing slashes in PATH elements.
4963case $as_dir/ in
4964 ./ | .// | /cC/* | \
4965 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4966 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
4967 /usr/ucb/* ) ;;
4968 *)
4969 # OSF1 and SCO ODT 3.0 have their own names for install.
4970 # Don't use installbsd from OSF since it installs stuff as root
4971 # by default.
4972 for ac_prog in ginstall scoinst install; do
4973 for ac_exec_ext in '' $ac_executable_extensions; do
4974 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4975 if test $ac_prog = install &&
4976 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4977 # AIX install. It has an incompatible calling convention.
4978 :
4979 elif test $ac_prog = install &&
4980 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4981 # program-specific install script used by HP pwplus--don't use.
4982 :
4983 else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00004984 rm -rf conftest.one conftest.two conftest.dir
4985 echo one > conftest.one
4986 echo two > conftest.two
4987 mkdir conftest.dir
4988 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4989 test -s conftest.one && test -s conftest.two &&
4990 test -s conftest.dir/conftest.one &&
4991 test -s conftest.dir/conftest.two
4992 then
4993 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4994 break 3
4995 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00004996 fi
4997 fi
4998 done
4999 done
5000 ;;
5001esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005002
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005003done
5004IFS=$as_save_IFS
5005
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005006rm -rf conftest.one conftest.two conftest.dir
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005007
5008fi
5009 if test "${ac_cv_path_install+set}" = set; then
5010 INSTALL=$ac_cv_path_install
5011 else
5012 # As a last resort, use the slow shell script. Don't cache a
5013 # value for INSTALL within a source directory, because that will
5014 # break other packages using the cache if that directory is
5015 # removed, or if the value is a relative name.
5016 INSTALL=$ac_install_sh
5017 fi
5018fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005019{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
5020$as_echo "$INSTALL" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005021
5022# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
5023# It thinks the first close brace ends the variable substitution.
5024test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
5025
5026test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
5027
5028test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
5029
5030
5031# Not every filesystem supports hard links
5032
5033if test -z "$LN" ; then
5034 case $ac_sys_system in
5035 CYGWIN*) LN="ln -s";;
5036 atheos*) LN="ln -s";;
5037 *) LN=ln;;
5038 esac
5039fi
5040
5041# Check for --with-pydebug
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005042{ $as_echo "$as_me:$LINENO: checking for --with-pydebug" >&5
5043$as_echo_n "checking for --with-pydebug... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005044
5045# Check whether --with-pydebug was given.
5046if test "${with_pydebug+set}" = set; then
5047 withval=$with_pydebug;
5048if test "$withval" != no
5049then
5050
5051cat >>confdefs.h <<\_ACEOF
5052#define Py_DEBUG 1
5053_ACEOF
5054
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005055 { $as_echo "$as_me:$LINENO: result: yes" >&5
5056$as_echo "yes" >&6; };
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005057 Py_DEBUG='true'
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005058else { $as_echo "$as_me:$LINENO: result: no" >&5
5059$as_echo "no" >&6; }; Py_DEBUG='false'
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005060fi
5061else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005062 { $as_echo "$as_me:$LINENO: result: no" >&5
5063$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005064fi
5065
5066
5067# XXX Shouldn't the code above that fiddles with BASECFLAGS and OPT be
5068# merged with this chunk of code?
5069
5070# Optimizer/debugger flags
5071# ------------------------
5072# (The following bit of code is complicated enough - please keep things
5073# indented properly. Just pretend you're editing Python code. ;-)
5074
5075# There are two parallel sets of case statements below, one that checks to
5076# see if OPT was set and one that does BASECFLAGS setting based upon
5077# compiler and platform. BASECFLAGS tweaks need to be made even if the
5078# user set OPT.
5079
5080# tweak OPT based on compiler and platform, only if the user didn't set
5081# it on the command line
5082
5083if test -z "$OPT"
5084then
5085 case $GCC in
5086 yes)
5087 if test "$CC" != 'g++' ; then
5088 STRICT_PROTO="-Wstrict-prototypes"
5089 fi
5090 # For gcc 4.x we need to use -fwrapv so lets check if its supported
5091 if "$CC" -v --help 2>/dev/null |grep -- -fwrapv > /dev/null; then
5092 WRAP="-fwrapv"
5093 fi
5094 case $ac_cv_prog_cc_g in
5095 yes)
5096 if test "$Py_DEBUG" = 'true' ; then
5097 # Optimization messes up debuggers, so turn it off for
5098 # debug builds.
5099 OPT="-g -Wall $STRICT_PROTO"
5100 else
5101 OPT="-g $WRAP -O3 -Wall $STRICT_PROTO"
5102 fi
5103 ;;
5104 *)
5105 OPT="-O3 -Wall $STRICT_PROTO"
5106 ;;
5107 esac
5108 case $ac_sys_system in
5109 SCO_SV*) OPT="$OPT -m486 -DSCO5"
5110 ;;
5111 esac
5112 ;;
5113
5114 *)
5115 OPT="-O"
5116 ;;
5117 esac
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005118fi
5119
5120
5121
5122# The -arch flags for universal builds on OSX
5123UNIVERSAL_ARCH_FLAGS=
5124
5125
5126# tweak BASECFLAGS based on compiler and platform
5127case $GCC in
5128yes)
5129 # Python violates C99 rules, by casting between incompatible
5130 # pointer types. GCC may generate bad code as a result of that,
5131 # so use -fno-strict-aliasing if supported.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005132 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -fno-strict-aliasing" >&5
5133$as_echo_n "checking whether $CC accepts -fno-strict-aliasing... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005134 ac_save_cc="$CC"
5135 CC="$CC -fno-strict-aliasing"
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005136 if test "${ac_cv_no_strict_aliasing_ok+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005137 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005138else
5139 if test "$cross_compiling" = yes; then
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005140 ac_cv_no_strict_aliasing_ok=no
5141else
5142 cat >conftest.$ac_ext <<_ACEOF
5143/* confdefs.h. */
5144_ACEOF
5145cat confdefs.h >>conftest.$ac_ext
5146cat >>conftest.$ac_ext <<_ACEOF
5147/* end confdefs.h. */
5148int main() { return 0; }
5149_ACEOF
5150rm -f conftest$ac_exeext
5151if { (ac_try="$ac_link"
5152case "(($ac_try" in
5153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5154 *) ac_try_echo=$ac_try;;
5155esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005156eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5157$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005158 (eval "$ac_link") 2>&5
5159 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005160 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005161 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5162 { (case "(($ac_try" in
5163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5164 *) ac_try_echo=$ac_try;;
5165esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005166eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5167$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005168 (eval "$ac_try") 2>&5
5169 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005170 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005171 (exit $ac_status); }; }; then
5172 ac_cv_no_strict_aliasing_ok=yes
5173else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005174 $as_echo "$as_me: program exited with status $ac_status" >&5
5175$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005176sed 's/^/| /' conftest.$ac_ext >&5
5177
5178( exit $ac_status )
5179ac_cv_no_strict_aliasing_ok=no
5180fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005181rm -rf conftest.dSYM
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5183fi
5184
5185
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +00005186fi
5187
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005188 CC="$ac_save_cc"
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005189 { $as_echo "$as_me:$LINENO: result: $ac_cv_no_strict_aliasing_ok" >&5
5190$as_echo "$ac_cv_no_strict_aliasing_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005191 if test $ac_cv_no_strict_aliasing_ok = yes
5192 then
5193 BASECFLAGS="$BASECFLAGS -fno-strict-aliasing"
5194 fi
5195
5196 # if using gcc on alpha, use -mieee to get (near) full IEEE 754
5197 # support. Without this, treatment of subnormals doesn't follow
5198 # the standard.
5199 case $ac_sys_machine in
5200 alpha*)
5201 BASECFLAGS="$BASECFLAGS -mieee"
5202 ;;
5203 esac
5204
5205 case $ac_sys_system in
5206 SCO_SV*)
5207 BASECFLAGS="$BASECFLAGS -m486 -DSCO5"
5208 ;;
5209 # is there any other compiler on Darwin besides gcc?
5210 Darwin*)
5211 # -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
5212 # used to be here, but non-Apple gcc doesn't accept them.
5213
5214
5215 if test "${enable_universalsdk}"; then
5216 UNIVERSAL_ARCH_FLAGS=""
5217 if test "$UNIVERSAL_ARCHS" = "32-bit" ; then
5218 UNIVERSAL_ARCH_FLAGS="-arch ppc -arch i386"
5219 ARCH_RUN_32BIT=""
5220
5221 elif test "$UNIVERSAL_ARCHS" = "64-bit" ; then
5222 UNIVERSAL_ARCH_FLAGS="-arch ppc64 -arch x86_64"
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005223 ARCH_RUN_32BIT="true"
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005224
5225 elif test "$UNIVERSAL_ARCHS" = "all" ; then
5226 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch ppc64 -arch x86_64"
5227 ARCH_RUN_32BIT="arch -i386 -ppc"
5228
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005229 elif test "$UNIVERSAL_ARCHS" = "intel" ; then
5230 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch x86_64"
5231 ARCH_RUN_32BIT="arch -i386"
5232
5233 elif test "$UNIVERSAL_ARCHS" = "3-way" ; then
5234 UNIVERSAL_ARCH_FLAGS="-arch i386 -arch ppc -arch x86_64"
5235 ARCH_RUN_32BIT="arch -i386 -ppc"
5236
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005237 else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005238 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&5
5239$as_echo "$as_me: error: proper usage is --with-universalarch=32-bit|64-bit|all" >&2;}
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005240 { (exit 1); exit 1; }; }
5241
5242 fi
5243
5244
5245 BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}"
5246 tgt=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5247 if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then
5248 CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}"
5249 fi
5250 fi
5251
5252 # Calculate the right deployment target for this build.
5253 #
5254 cur_target=`sw_vers -productVersion | sed 's/\(10\.[0-9]*\).*/\1/'`
5255 if test ${cur_target} '>' 10.2; then
5256 cur_target=10.3
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005257 if test ${enable_universalsdk}; then
5258 if test "${UNIVERSAL_ARCHS}" = "all"; then
5259 # Ensure that the default platform for a
5260 # 4-way universal build is OSX 10.5,
5261 # that's the first OS release where
5262 # 4-way builds make sense.
5263 cur_target='10.5'
Ronald Oussoren3c064c12009-09-08 07:12:42 +00005264
5265 elif test "${UNIVERSAL_ARCHS}" = "3-way"; then
5266 cur_target='10.5'
5267
5268 elif test "${UNIVERSAL_ARCHS}" = "intel"; then
5269 cur_target='10.5'
5270
5271 elif test "${UNIVERSAL_ARCHS}" = "64-bit"; then
5272 cur_target='10.5'
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +00005273 fi
5274 else
5275 if test `arch` = "i386"; then
5276 # On Intel macs default to a deployment
5277 # target of 10.4, that's the first OSX
5278 # release with Intel support.
5279 cur_target="10.4"
5280 fi
5281 fi
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005282 fi
5283 CONFIGURE_MACOSX_DEPLOYMENT_TARGET=${MACOSX_DEPLOYMENT_TARGET-${cur_target}}
5284
5285 # Make sure that MACOSX_DEPLOYMENT_TARGET is set in the
5286 # environment with a value that is the same as what we'll use
5287 # in the Makefile to ensure that we'll get the same compiler
5288 # environment during configure and build time.
5289 MACOSX_DEPLOYMENT_TARGET="$CONFIGURE_MACOSX_DEPLOYMENT_TARGET"
5290 export MACOSX_DEPLOYMENT_TARGET
5291 EXPORT_MACOSX_DEPLOYMENT_TARGET=''
5292
5293 ;;
5294 OSF*)
5295 BASECFLAGS="$BASECFLAGS -mieee"
5296 ;;
5297 esac
5298 ;;
5299
5300*)
5301 case $ac_sys_system in
5302 OpenUNIX*|UnixWare*)
5303 BASECFLAGS="$BASECFLAGS -K pentium,host,inline,loop_unroll,alloca "
5304 ;;
5305 OSF*)
5306 BASECFLAGS="$BASECFLAGS -ieee -std"
5307 ;;
5308 SCO_SV*)
5309 BASECFLAGS="$BASECFLAGS -belf -Ki486 -DSCO5"
5310 ;;
5311 esac
5312 ;;
5313esac
5314
5315if test "$Py_DEBUG" = 'true'; then
5316 :
5317else
5318 OPT="-DNDEBUG $OPT"
5319fi
5320
5321if test "$ac_arch_flags"
5322then
5323 BASECFLAGS="$BASECFLAGS $ac_arch_flags"
5324fi
5325
5326# disable check for icc since it seems to pass, but generates a warning
5327if test "$CC" = icc
5328then
5329 ac_cv_opt_olimit_ok=no
5330fi
5331
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005332{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -OPT:Olimit=0" >&5
5333$as_echo_n "checking whether $CC accepts -OPT:Olimit=0... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005334if test "${ac_cv_opt_olimit_ok+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005335 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005336else
5337 ac_save_cc="$CC"
5338CC="$CC -OPT:Olimit=0"
5339if test "$cross_compiling" = yes; then
5340 ac_cv_opt_olimit_ok=no
5341else
5342 cat >conftest.$ac_ext <<_ACEOF
5343/* confdefs.h. */
5344_ACEOF
5345cat confdefs.h >>conftest.$ac_ext
5346cat >>conftest.$ac_ext <<_ACEOF
5347/* end confdefs.h. */
5348int main() { return 0; }
5349_ACEOF
5350rm -f conftest$ac_exeext
5351if { (ac_try="$ac_link"
5352case "(($ac_try" in
5353 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5354 *) ac_try_echo=$ac_try;;
5355esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005356eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5357$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005358 (eval "$ac_link") 2>&5
5359 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005360 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005361 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5362 { (case "(($ac_try" in
5363 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5364 *) ac_try_echo=$ac_try;;
5365esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005366eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5367$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005368 (eval "$ac_try") 2>&5
5369 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005370 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005371 (exit $ac_status); }; }; then
5372 ac_cv_opt_olimit_ok=yes
5373else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005374 $as_echo "$as_me: program exited with status $ac_status" >&5
5375$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005376sed 's/^/| /' conftest.$ac_ext >&5
5377
5378( exit $ac_status )
5379ac_cv_opt_olimit_ok=no
5380fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005381rm -rf conftest.dSYM
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005382rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5383fi
5384
5385
5386CC="$ac_save_cc"
5387fi
5388
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005389{ $as_echo "$as_me:$LINENO: result: $ac_cv_opt_olimit_ok" >&5
5390$as_echo "$ac_cv_opt_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005391if test $ac_cv_opt_olimit_ok = yes; then
5392 case $ac_sys_system in
5393 # XXX is this branch needed? On MacOSX 10.2.2 the result of the
5394 # olimit_ok test is "no". Is it "yes" in some other Darwin-esque
5395 # environment?
5396 Darwin*)
5397 ;;
5398 *)
5399 BASECFLAGS="$BASECFLAGS -OPT:Olimit=0"
5400 ;;
5401 esac
5402else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005403 { $as_echo "$as_me:$LINENO: checking whether $CC accepts -Olimit 1500" >&5
5404$as_echo_n "checking whether $CC accepts -Olimit 1500... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005405 if test "${ac_cv_olimit_ok+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005406 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005407else
5408 ac_save_cc="$CC"
5409 CC="$CC -Olimit 1500"
5410 if test "$cross_compiling" = yes; then
5411 ac_cv_olimit_ok=no
5412else
5413 cat >conftest.$ac_ext <<_ACEOF
5414/* confdefs.h. */
5415_ACEOF
5416cat confdefs.h >>conftest.$ac_ext
5417cat >>conftest.$ac_ext <<_ACEOF
5418/* end confdefs.h. */
5419int main() { return 0; }
5420_ACEOF
5421rm -f conftest$ac_exeext
5422if { (ac_try="$ac_link"
5423case "(($ac_try" in
5424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5425 *) ac_try_echo=$ac_try;;
5426esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005427eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5428$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005429 (eval "$ac_link") 2>&5
5430 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005431 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005432 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5433 { (case "(($ac_try" in
5434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5435 *) ac_try_echo=$ac_try;;
5436esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005437eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5438$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005439 (eval "$ac_try") 2>&5
5440 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005441 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005442 (exit $ac_status); }; }; then
5443 ac_cv_olimit_ok=yes
5444else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005445 $as_echo "$as_me: program exited with status $ac_status" >&5
5446$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005447sed 's/^/| /' conftest.$ac_ext >&5
5448
5449( exit $ac_status )
5450ac_cv_olimit_ok=no
5451fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005452rm -rf conftest.dSYM
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5454fi
5455
5456
5457 CC="$ac_save_cc"
5458fi
5459
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005460 { $as_echo "$as_me:$LINENO: result: $ac_cv_olimit_ok" >&5
5461$as_echo "$ac_cv_olimit_ok" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005462 if test $ac_cv_olimit_ok = yes; then
5463 BASECFLAGS="$BASECFLAGS -Olimit 1500"
5464 fi
5465fi
5466
5467# Check whether GCC supports PyArg_ParseTuple format
5468if test "$GCC" = "yes"
5469then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005470 { $as_echo "$as_me:$LINENO: checking whether gcc supports ParseTuple __format__" >&5
5471$as_echo_n "checking whether gcc supports ParseTuple __format__... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005472 save_CFLAGS=$CFLAGS
5473 CFLAGS="$CFLAGS -Werror"
5474 cat >conftest.$ac_ext <<_ACEOF
5475/* confdefs.h. */
5476_ACEOF
5477cat confdefs.h >>conftest.$ac_ext
5478cat >>conftest.$ac_ext <<_ACEOF
5479/* end confdefs.h. */
5480
5481 void f(char*,...)__attribute((format(PyArg_ParseTuple, 1, 2)));
5482
5483int
5484main ()
5485{
5486
5487 ;
5488 return 0;
5489}
5490_ACEOF
5491rm -f conftest.$ac_objext
5492if { (ac_try="$ac_compile"
5493case "(($ac_try" in
5494 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5495 *) ac_try_echo=$ac_try;;
5496esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005497eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5498$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005499 (eval "$ac_compile") 2>conftest.er1
5500 ac_status=$?
5501 grep -v '^ *+' conftest.er1 >conftest.err
5502 rm -f conftest.er1
5503 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005504 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005505 (exit $ac_status); } && {
5506 test -z "$ac_c_werror_flag" ||
5507 test ! -s conftest.err
5508 } && test -s conftest.$ac_objext; then
5509
5510cat >>confdefs.h <<\_ACEOF
5511#define HAVE_ATTRIBUTE_FORMAT_PARSETUPLE 1
5512_ACEOF
5513
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005514 { $as_echo "$as_me:$LINENO: result: yes" >&5
5515$as_echo "yes" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005516else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005517 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005518sed 's/^/| /' conftest.$ac_ext >&5
5519
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005520 { $as_echo "$as_me:$LINENO: result: no" >&5
5521$as_echo "no" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005522
5523fi
5524
5525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5526 CFLAGS=$save_CFLAGS
5527fi
5528
5529# On some compilers, pthreads are available without further options
5530# (e.g. MacOS X). On some of these systems, the compiler will not
5531# complain if unaccepted options are passed (e.g. gcc on Mac OS X).
5532# So we have to see first whether pthreads are available without
5533# options before we can check whether -Kpthread improves anything.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005534{ $as_echo "$as_me:$LINENO: checking whether pthreads are available without options" >&5
5535$as_echo_n "checking whether pthreads are available without options... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005536if test "${ac_cv_pthread_is_default+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005537 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005538else
5539 if test "$cross_compiling" = yes; then
5540 ac_cv_pthread_is_default=no
5541else
5542 cat >conftest.$ac_ext <<_ACEOF
5543/* confdefs.h. */
5544_ACEOF
5545cat confdefs.h >>conftest.$ac_ext
5546cat >>conftest.$ac_ext <<_ACEOF
5547/* end confdefs.h. */
5548
5549#include <pthread.h>
5550
5551void* routine(void* p){return NULL;}
5552
5553int main(){
5554 pthread_t p;
5555 if(pthread_create(&p,NULL,routine,NULL)!=0)
5556 return 1;
5557 (void)pthread_detach(p);
5558 return 0;
5559}
5560
5561_ACEOF
5562rm -f conftest$ac_exeext
5563if { (ac_try="$ac_link"
5564case "(($ac_try" in
5565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5566 *) ac_try_echo=$ac_try;;
5567esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005568eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5569$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005570 (eval "$ac_link") 2>&5
5571 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005572 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005573 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5574 { (case "(($ac_try" in
5575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5576 *) ac_try_echo=$ac_try;;
5577esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005578eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5579$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005580 (eval "$ac_try") 2>&5
5581 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005582 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005583 (exit $ac_status); }; }; then
5584
5585 ac_cv_pthread_is_default=yes
5586 ac_cv_kthread=no
5587 ac_cv_pthread=no
5588
5589else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005590 $as_echo "$as_me: program exited with status $ac_status" >&5
5591$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005592sed 's/^/| /' conftest.$ac_ext >&5
5593
5594( exit $ac_status )
5595ac_cv_pthread_is_default=no
5596fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005597rm -rf conftest.dSYM
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005598rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5599fi
5600
5601
5602
5603fi
5604
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005605{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_is_default" >&5
5606$as_echo "$ac_cv_pthread_is_default" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005607
5608
5609if test $ac_cv_pthread_is_default = yes
5610then
5611 ac_cv_kpthread=no
5612else
5613# -Kpthread, if available, provides the right #defines
5614# and linker options to make pthread_create available
5615# Some compilers won't report that they do not support -Kpthread,
5616# so we need to run a program to see whether it really made the
5617# function available.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005618{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kpthread" >&5
5619$as_echo_n "checking whether $CC accepts -Kpthread... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005620if test "${ac_cv_kpthread+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005621 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005622else
5623 ac_save_cc="$CC"
5624CC="$CC -Kpthread"
5625if test "$cross_compiling" = yes; then
5626 ac_cv_kpthread=no
5627else
5628 cat >conftest.$ac_ext <<_ACEOF
5629/* confdefs.h. */
5630_ACEOF
5631cat confdefs.h >>conftest.$ac_ext
5632cat >>conftest.$ac_ext <<_ACEOF
5633/* end confdefs.h. */
5634
5635#include <pthread.h>
5636
5637void* routine(void* p){return NULL;}
5638
5639int main(){
5640 pthread_t p;
5641 if(pthread_create(&p,NULL,routine,NULL)!=0)
5642 return 1;
5643 (void)pthread_detach(p);
5644 return 0;
5645}
5646
5647_ACEOF
5648rm -f conftest$ac_exeext
5649if { (ac_try="$ac_link"
5650case "(($ac_try" in
5651 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5652 *) ac_try_echo=$ac_try;;
5653esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005654eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5655$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005656 (eval "$ac_link") 2>&5
5657 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005658 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005659 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5660 { (case "(($ac_try" in
5661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5662 *) ac_try_echo=$ac_try;;
5663esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005664eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5665$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005666 (eval "$ac_try") 2>&5
5667 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005668 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005669 (exit $ac_status); }; }; then
5670 ac_cv_kpthread=yes
5671else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005672 $as_echo "$as_me: program exited with status $ac_status" >&5
5673$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005674sed 's/^/| /' conftest.$ac_ext >&5
5675
5676( exit $ac_status )
5677ac_cv_kpthread=no
5678fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005679rm -rf conftest.dSYM
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5681fi
5682
5683
5684CC="$ac_save_cc"
5685fi
5686
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005687{ $as_echo "$as_me:$LINENO: result: $ac_cv_kpthread" >&5
5688$as_echo "$ac_cv_kpthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005689fi
5690
5691if test $ac_cv_kpthread = no -a $ac_cv_pthread_is_default = no
5692then
5693# -Kthread, if available, provides the right #defines
5694# and linker options to make pthread_create available
5695# Some compilers won't report that they do not support -Kthread,
5696# so we need to run a program to see whether it really made the
5697# function available.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005698{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -Kthread" >&5
5699$as_echo_n "checking whether $CC accepts -Kthread... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005700if test "${ac_cv_kthread+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005701 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005702else
5703 ac_save_cc="$CC"
5704CC="$CC -Kthread"
5705if test "$cross_compiling" = yes; then
5706 ac_cv_kthread=no
5707else
5708 cat >conftest.$ac_ext <<_ACEOF
5709/* confdefs.h. */
5710_ACEOF
5711cat confdefs.h >>conftest.$ac_ext
5712cat >>conftest.$ac_ext <<_ACEOF
5713/* end confdefs.h. */
5714
5715#include <pthread.h>
5716
5717void* routine(void* p){return NULL;}
5718
5719int main(){
5720 pthread_t p;
5721 if(pthread_create(&p,NULL,routine,NULL)!=0)
5722 return 1;
5723 (void)pthread_detach(p);
5724 return 0;
5725}
5726
5727_ACEOF
5728rm -f conftest$ac_exeext
5729if { (ac_try="$ac_link"
5730case "(($ac_try" in
5731 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5732 *) ac_try_echo=$ac_try;;
5733esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005734eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5735$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005736 (eval "$ac_link") 2>&5
5737 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005738 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005739 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5740 { (case "(($ac_try" in
5741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5742 *) ac_try_echo=$ac_try;;
5743esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005744eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5745$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005746 (eval "$ac_try") 2>&5
5747 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005748 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005749 (exit $ac_status); }; }; then
5750 ac_cv_kthread=yes
5751else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005752 $as_echo "$as_me: program exited with status $ac_status" >&5
5753$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005754sed 's/^/| /' conftest.$ac_ext >&5
5755
5756( exit $ac_status )
5757ac_cv_kthread=no
5758fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005759rm -rf conftest.dSYM
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005760rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5761fi
5762
5763
5764CC="$ac_save_cc"
5765fi
5766
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005767{ $as_echo "$as_me:$LINENO: result: $ac_cv_kthread" >&5
5768$as_echo "$ac_cv_kthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005769fi
5770
5771if test $ac_cv_kthread = no -a $ac_cv_pthread_is_default = no
5772then
5773# -pthread, if available, provides the right #defines
5774# and linker options to make pthread_create available
5775# Some compilers won't report that they do not support -pthread,
5776# so we need to run a program to see whether it really made the
5777# function available.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005778{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -pthread" >&5
5779$as_echo_n "checking whether $CC accepts -pthread... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005780if test "${ac_cv_thread+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005781 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005782else
5783 ac_save_cc="$CC"
5784CC="$CC -pthread"
5785if test "$cross_compiling" = yes; then
5786 ac_cv_pthread=no
5787else
5788 cat >conftest.$ac_ext <<_ACEOF
5789/* confdefs.h. */
5790_ACEOF
5791cat confdefs.h >>conftest.$ac_ext
5792cat >>conftest.$ac_ext <<_ACEOF
5793/* end confdefs.h. */
5794
5795#include <pthread.h>
5796
5797void* routine(void* p){return NULL;}
5798
5799int main(){
5800 pthread_t p;
5801 if(pthread_create(&p,NULL,routine,NULL)!=0)
5802 return 1;
5803 (void)pthread_detach(p);
5804 return 0;
5805}
5806
5807_ACEOF
5808rm -f conftest$ac_exeext
5809if { (ac_try="$ac_link"
5810case "(($ac_try" in
5811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5812 *) ac_try_echo=$ac_try;;
5813esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005814eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5815$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005816 (eval "$ac_link") 2>&5
5817 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005818 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005819 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5820 { (case "(($ac_try" in
5821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5822 *) ac_try_echo=$ac_try;;
5823esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005824eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5825$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005826 (eval "$ac_try") 2>&5
5827 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005828 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005829 (exit $ac_status); }; }; then
5830 ac_cv_pthread=yes
5831else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005832 $as_echo "$as_me: program exited with status $ac_status" >&5
5833$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005834sed 's/^/| /' conftest.$ac_ext >&5
5835
5836( exit $ac_status )
5837ac_cv_pthread=no
5838fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005839rm -rf conftest.dSYM
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005840rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5841fi
5842
5843
5844CC="$ac_save_cc"
5845fi
5846
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005847{ $as_echo "$as_me:$LINENO: result: $ac_cv_pthread" >&5
5848$as_echo "$ac_cv_pthread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005849fi
5850
5851# If we have set a CC compiler flag for thread support then
5852# check if it works for CXX, too.
5853ac_cv_cxx_thread=no
5854if test ! -z "$CXX"
5855then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005856{ $as_echo "$as_me:$LINENO: checking whether $CXX also accepts flags for thread support" >&5
5857$as_echo_n "checking whether $CXX also accepts flags for thread support... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005858ac_save_cxx="$CXX"
5859
5860if test "$ac_cv_kpthread" = "yes"
5861then
5862 CXX="$CXX -Kpthread"
5863 ac_cv_cxx_thread=yes
5864elif test "$ac_cv_kthread" = "yes"
5865then
5866 CXX="$CXX -Kthread"
5867 ac_cv_cxx_thread=yes
5868elif test "$ac_cv_pthread" = "yes"
5869then
5870 CXX="$CXX -pthread"
5871 ac_cv_cxx_thread=yes
5872fi
5873
5874if test $ac_cv_cxx_thread = yes
5875then
5876 echo 'void foo();int main(){foo();}void foo(){}' > conftest.$ac_ext
5877 $CXX -c conftest.$ac_ext 2>&5
5878 if $CXX -o conftest$ac_exeext conftest.$ac_objext 2>&5 \
5879 && test -s conftest$ac_exeext && ./conftest$ac_exeext
5880 then
5881 ac_cv_cxx_thread=yes
5882 else
5883 ac_cv_cxx_thread=no
5884 fi
5885 rm -fr conftest*
5886fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005887{ $as_echo "$as_me:$LINENO: result: $ac_cv_cxx_thread" >&5
5888$as_echo "$ac_cv_cxx_thread" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005889fi
5890CXX="$ac_save_cxx"
5891
5892
5893# checks for header files
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005894{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
5895$as_echo_n "checking for ANSI C header files... " >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005896if test "${ac_cv_header_stdc+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005897 $as_echo_n "(cached) " >&6
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005898else
5899 cat >conftest.$ac_ext <<_ACEOF
5900/* confdefs.h. */
5901_ACEOF
5902cat confdefs.h >>conftest.$ac_ext
5903cat >>conftest.$ac_ext <<_ACEOF
5904/* end confdefs.h. */
5905#include <stdlib.h>
5906#include <stdarg.h>
5907#include <string.h>
5908#include <float.h>
5909
5910int
5911main ()
5912{
5913
5914 ;
5915 return 0;
5916}
5917_ACEOF
5918rm -f conftest.$ac_objext
5919if { (ac_try="$ac_compile"
5920case "(($ac_try" in
5921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5922 *) ac_try_echo=$ac_try;;
5923esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005924eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
5925$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005926 (eval "$ac_compile") 2>conftest.er1
5927 ac_status=$?
5928 grep -v '^ *+' conftest.er1 >conftest.err
5929 rm -f conftest.er1
5930 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005931 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005932 (exit $ac_status); } && {
5933 test -z "$ac_c_werror_flag" ||
5934 test ! -s conftest.err
5935 } && test -s conftest.$ac_objext; then
5936 ac_cv_header_stdc=yes
5937else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005938 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005939sed 's/^/| /' conftest.$ac_ext >&5
5940
5941 ac_cv_header_stdc=no
5942fi
5943
5944rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5945
5946if test $ac_cv_header_stdc = yes; then
5947 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5948 cat >conftest.$ac_ext <<_ACEOF
5949/* confdefs.h. */
5950_ACEOF
5951cat confdefs.h >>conftest.$ac_ext
5952cat >>conftest.$ac_ext <<_ACEOF
5953/* end confdefs.h. */
5954#include <string.h>
5955
5956_ACEOF
5957if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5958 $EGREP "memchr" >/dev/null 2>&1; then
5959 :
5960else
5961 ac_cv_header_stdc=no
5962fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005963rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005964
5965fi
5966
5967if test $ac_cv_header_stdc = yes; then
5968 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5969 cat >conftest.$ac_ext <<_ACEOF
5970/* confdefs.h. */
5971_ACEOF
5972cat confdefs.h >>conftest.$ac_ext
5973cat >>conftest.$ac_ext <<_ACEOF
5974/* end confdefs.h. */
5975#include <stdlib.h>
5976
5977_ACEOF
5978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5979 $EGREP "free" >/dev/null 2>&1; then
5980 :
5981else
5982 ac_cv_header_stdc=no
5983fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00005984rm -f conftest*
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00005985
5986fi
5987
5988if test $ac_cv_header_stdc = yes; then
5989 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5990 if test "$cross_compiling" = yes; then
5991 :
5992else
5993 cat >conftest.$ac_ext <<_ACEOF
5994/* confdefs.h. */
5995_ACEOF
5996cat confdefs.h >>conftest.$ac_ext
5997cat >>conftest.$ac_ext <<_ACEOF
5998/* end confdefs.h. */
5999#include <ctype.h>
6000#include <stdlib.h>
6001#if ((' ' & 0x0FF) == 0x020)
6002# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6003# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6004#else
6005# define ISLOWER(c) \
6006 (('a' <= (c) && (c) <= 'i') \
6007 || ('j' <= (c) && (c) <= 'r') \
6008 || ('s' <= (c) && (c) <= 'z'))
6009# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6010#endif
6011
6012#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6013int
6014main ()
6015{
6016 int i;
6017 for (i = 0; i < 256; i++)
6018 if (XOR (islower (i), ISLOWER (i))
6019 || toupper (i) != TOUPPER (i))
6020 return 2;
6021 return 0;
6022}
6023_ACEOF
6024rm -f conftest$ac_exeext
6025if { (ac_try="$ac_link"
6026case "(($ac_try" in
6027 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6028 *) ac_try_echo=$ac_try;;
6029esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006030eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6031$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006032 (eval "$ac_link") 2>&5
6033 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006034 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006035 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
6036 { (case "(($ac_try" in
6037 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6038 *) ac_try_echo=$ac_try;;
6039esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006040eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6041$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006042 (eval "$ac_try") 2>&5
6043 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006044 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006045 (exit $ac_status); }; }; then
6046 :
6047else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006048 $as_echo "$as_me: program exited with status $ac_status" >&5
6049$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006050sed 's/^/| /' conftest.$ac_ext >&5
6051
6052( exit $ac_status )
6053ac_cv_header_stdc=no
6054fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006055rm -rf conftest.dSYM
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006056rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
6057fi
6058
6059
6060fi
6061fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006062{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
6063$as_echo "$ac_cv_header_stdc" >&6; }
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00006064if test $ac_cv_header_stdc = yes; then
6065
6066cat >>confdefs.h <<\_ACEOF
6067#define STDC_HEADERS 1
6068_ACEOF
6069
6070fi
6071
6072
Martin v. Löwis11437992002-04-12 09:54:03 +00006073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
Anthony Baxter8a560de2004-10-13 15:30:56 +00006108
Martin v. Löwisc3001752005-01-23 09:27:24 +00006109
Martin v. Löwis11017b12006-01-14 18:12:57 +00006110
Thomas Wouters477c8d52006-05-27 19:21:47 +00006111
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006112
6113
6114
6115
6116
6117
6118
6119
Thomas Wouters89f507f2006-12-13 04:49:30 +00006120
Christian Heimes043d6f62008-01-07 17:19:16 +00006121
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006122
6123
Christian Heimesbbe741d2008-03-28 10:53:29 +00006124
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006125
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006126for ac_header in asm/types.h conio.h curses.h direct.h dlfcn.h errno.h \
6127fcntl.h grp.h \
Christian Heimesbbe741d2008-03-28 10:53:29 +00006128ieeefp.h io.h langinfo.h libintl.h ncurses.h poll.h process.h pthread.h \
Thomas Wouters89f507f2006-12-13 04:49:30 +00006129shadow.h signal.h stdint.h stropts.h termios.h thread.h \
Martin v. Löwis14e73b12003-01-01 09:51:12 +00006130unistd.h utime.h \
Christian Heimes4fbc72b2008-03-22 00:47:35 +00006131sys/audioio.h sys/bsdtty.h sys/epoll.h sys/event.h sys/file.h sys/loadavg.h \
6132sys/lock.h sys/mkdev.h sys/modem.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006133sys/param.h sys/poll.h sys/select.h sys/socket.h sys/statvfs.h sys/stat.h \
Benjamin Petersonde9c8692008-07-01 18:23:09 +00006134sys/termio.h sys/time.h \
Thomas Wouters0e3f5912006-08-11 14:57:12 +00006135sys/times.h sys/types.h sys/un.h sys/utsname.h sys/wait.h pty.h libutil.h \
Hye-Shik Chang81268602004-02-02 06:05:24 +00006136sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
Christian Heimes043d6f62008-01-07 17:19:16 +00006137bluetooth/bluetooth.h linux/tipc.h
Guido van Rossum627b2d71993-12-24 10:39:16 +00006138do
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006139as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006140if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006141 { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6142$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006143if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006144 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006145fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006146ac_res=`eval 'as_val=${'$as_ac_Header'}
6147 $as_echo "$as_val"'`
6148 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6149$as_echo "$ac_res" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006150else
Martin v. Löwis11437992002-04-12 09:54:03 +00006151 # Is the header compilable?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006152{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
6153$as_echo_n "checking $ac_header usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006154cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006155/* confdefs.h. */
6156_ACEOF
6157cat confdefs.h >>conftest.$ac_ext
6158cat >>conftest.$ac_ext <<_ACEOF
6159/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006160$ac_includes_default
6161#include <$ac_header>
6162_ACEOF
6163rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006164if { (ac_try="$ac_compile"
6165case "(($ac_try" in
6166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6167 *) ac_try_echo=$ac_try;;
6168esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006169eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6170$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006171 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006172 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006173 grep -v '^ *+' conftest.er1 >conftest.err
6174 rm -f conftest.er1
6175 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006176 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006177 (exit $ac_status); } && {
6178 test -z "$ac_c_werror_flag" ||
6179 test ! -s conftest.err
6180 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006181 ac_header_compiler=yes
Michael W. Hudson54241132001-12-07 15:38:26 +00006182else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006183 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006184sed 's/^/| /' conftest.$ac_ext >&5
6185
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006186 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006187fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006188
6189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006190{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6191$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006192
6193# Is the header present?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006194{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
6195$as_echo_n "checking $ac_header presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006196cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006197/* confdefs.h. */
6198_ACEOF
6199cat confdefs.h >>conftest.$ac_ext
6200cat >>conftest.$ac_ext <<_ACEOF
6201/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006202#include <$ac_header>
6203_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006204if { (ac_try="$ac_cpp conftest.$ac_ext"
6205case "(($ac_try" in
6206 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6207 *) ac_try_echo=$ac_try;;
6208esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006209eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6210$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006211 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006212 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006213 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +00006214 rm -f conftest.er1
6215 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006216 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006217 (exit $ac_status); } >/dev/null && {
6218 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6219 test ! -s conftest.err
6220 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006221 ac_header_preproc=yes
6222else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006223 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006224sed 's/^/| /' conftest.$ac_ext >&5
6225
Martin v. Löwis11437992002-04-12 09:54:03 +00006226 ac_header_preproc=no
Michael W. Hudson54241132001-12-07 15:38:26 +00006227fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006228
Martin v. Löwis11437992002-04-12 09:54:03 +00006229rm -f conftest.err conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006230{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6231$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006232
6233# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006234case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6235 yes:no: )
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006236 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6237$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6238 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6239$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006240 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006241 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006242 no:yes:* )
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006243 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6244$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6245 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6246$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6247 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6248$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6249 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6250$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6251 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6252$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6253 { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6254$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006255 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006256## -------------------------------------- ##
6257## Report this to http://bugs.python.org/ ##
6258## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006259_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006260 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006261 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00006262esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006263{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6264$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006265if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006266 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +00006267else
Skip Montanarof0d5f792004-08-15 14:08:23 +00006268 eval "$as_ac_Header=\$ac_header_preproc"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006269fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006270ac_res=`eval 'as_val=${'$as_ac_Header'}
6271 $as_echo "$as_val"'`
6272 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6273$as_echo "$ac_res" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006274
6275fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006276as_val=`eval 'as_val=${'$as_ac_Header'}
6277 $as_echo "$as_val"'`
6278 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006279 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006280#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006281_ACEOF
6282
6283fi
6284
Guido van Rossum627b2d71993-12-24 10:39:16 +00006285done
6286
Martin v. Löwis11437992002-04-12 09:54:03 +00006287
6288
6289
6290
6291
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006292ac_header_dirent=no
Martin v. Löwis11437992002-04-12 09:54:03 +00006293for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006294 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
6295{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
6296$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006297if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006298 $as_echo_n "(cached) " >&6
Guido van Rossum627b2d71993-12-24 10:39:16 +00006299else
Martin v. Löwis11437992002-04-12 09:54:03 +00006300 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006301/* confdefs.h. */
6302_ACEOF
6303cat confdefs.h >>conftest.$ac_ext
6304cat >>conftest.$ac_ext <<_ACEOF
6305/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006306#include <sys/types.h>
6307#include <$ac_hdr>
Martin v. Löwis11437992002-04-12 09:54:03 +00006308
Martin v. Löwis11437992002-04-12 09:54:03 +00006309int
6310main ()
6311{
6312if ((DIR *) 0)
6313return 0;
6314 ;
6315 return 0;
6316}
6317_ACEOF
6318rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006319if { (ac_try="$ac_compile"
6320case "(($ac_try" in
6321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6322 *) ac_try_echo=$ac_try;;
6323esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006324eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6325$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006326 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00006327 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006328 grep -v '^ *+' conftest.er1 >conftest.err
6329 rm -f conftest.er1
6330 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006331 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006332 (exit $ac_status); } && {
6333 test -z "$ac_c_werror_flag" ||
6334 test ! -s conftest.err
6335 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006336 eval "$as_ac_Header=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +00006337else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006338 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006339sed 's/^/| /' conftest.$ac_ext >&5
6340
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006341 eval "$as_ac_Header=no"
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006342fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006343
6344rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00006345fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006346ac_res=`eval 'as_val=${'$as_ac_Header'}
6347 $as_echo "$as_val"'`
6348 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6349$as_echo "$ac_res" >&6; }
6350as_val=`eval 'as_val=${'$as_ac_Header'}
6351 $as_echo "$as_val"'`
6352 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00006353 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006354#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +00006355_ACEOF
6356
6357ac_header_dirent=$ac_hdr; break
Michael W. Hudson54241132001-12-07 15:38:26 +00006358fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006359
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006360done
6361# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
6362if test $ac_header_dirent = dirent.h; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006363 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6364$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006365if test "${ac_cv_search_opendir+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006366 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006367else
Martin v. Löwis11437992002-04-12 09:54:03 +00006368 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006369cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006370/* confdefs.h. */
6371_ACEOF
6372cat confdefs.h >>conftest.$ac_ext
6373cat >>conftest.$ac_ext <<_ACEOF
6374/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006375
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006376/* Override any GCC internal prototype to avoid an error.
6377 Use char because int might match the return type of a GCC
6378 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006379#ifdef __cplusplus
6380extern "C"
6381#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006382char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006383int
6384main ()
6385{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006386return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006387 ;
6388 return 0;
6389}
6390_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006391for ac_lib in '' dir; do
6392 if test -z "$ac_lib"; then
6393 ac_res="none required"
6394 else
6395 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006396 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006397 fi
6398 rm -f conftest.$ac_objext conftest$ac_exeext
6399if { (ac_try="$ac_link"
6400case "(($ac_try" in
6401 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6402 *) ac_try_echo=$ac_try;;
6403esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006404eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6405$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006406 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006407 ac_status=$?
6408 grep -v '^ *+' conftest.er1 >conftest.err
6409 rm -f conftest.er1
6410 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006411 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006412 (exit $ac_status); } && {
6413 test -z "$ac_c_werror_flag" ||
6414 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006415 } && test -s conftest$ac_exeext && {
6416 test "$cross_compiling" = yes ||
6417 $as_test_x conftest$ac_exeext
6418 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006419 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006420else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006421 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006422sed 's/^/| /' conftest.$ac_ext >&5
6423
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006424
Thomas Wouters477c8d52006-05-27 19:21:47 +00006425fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006426
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006427rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006428rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6429 conftest$ac_exeext
6430 if test "${ac_cv_search_opendir+set}" = set; then
6431 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006432fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006433done
6434if test "${ac_cv_search_opendir+set}" = set; then
6435 :
6436else
6437 ac_cv_search_opendir=no
6438fi
6439rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006440LIBS=$ac_func_search_save_LIBS
6441fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006442{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6443$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006444ac_res=$ac_cv_search_opendir
6445if test "$ac_res" != no; then
6446 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Michael W. Hudson54241132001-12-07 15:38:26 +00006447
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006448fi
Martin v. Löwis11437992002-04-12 09:54:03 +00006449
Michael W. Hudson54241132001-12-07 15:38:26 +00006450else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006451 { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
6452$as_echo_n "checking for library containing opendir... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00006453if test "${ac_cv_search_opendir+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006454 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00006455else
6456 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +00006457cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006458/* confdefs.h. */
6459_ACEOF
6460cat confdefs.h >>conftest.$ac_ext
6461cat >>conftest.$ac_ext <<_ACEOF
6462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006463
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006464/* Override any GCC internal prototype to avoid an error.
6465 Use char because int might match the return type of a GCC
6466 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +00006467#ifdef __cplusplus
6468extern "C"
6469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +00006470char opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006471int
6472main ()
6473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006474return opendir ();
Martin v. Löwis11437992002-04-12 09:54:03 +00006475 ;
6476 return 0;
6477}
6478_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006479for ac_lib in '' x; do
6480 if test -z "$ac_lib"; then
6481 ac_res="none required"
6482 else
6483 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006484 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006485 fi
6486 rm -f conftest.$ac_objext conftest$ac_exeext
6487if { (ac_try="$ac_link"
6488case "(($ac_try" in
6489 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6490 *) ac_try_echo=$ac_try;;
6491esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006492eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6493$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006494 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006495 ac_status=$?
6496 grep -v '^ *+' conftest.er1 >conftest.err
6497 rm -f conftest.er1
6498 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006499 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006500 (exit $ac_status); } && {
6501 test -z "$ac_c_werror_flag" ||
6502 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006503 } && test -s conftest$ac_exeext && {
6504 test "$cross_compiling" = yes ||
6505 $as_test_x conftest$ac_exeext
6506 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006507 ac_cv_search_opendir=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +00006508else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006509 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006510sed 's/^/| /' conftest.$ac_ext >&5
6511
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006512
Thomas Wouters477c8d52006-05-27 19:21:47 +00006513fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006514
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006515rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006516rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6517 conftest$ac_exeext
6518 if test "${ac_cv_search_opendir+set}" = set; then
6519 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +00006520fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006521done
6522if test "${ac_cv_search_opendir+set}" = set; then
6523 :
6524else
6525 ac_cv_search_opendir=no
6526fi
6527rm conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00006528LIBS=$ac_func_search_save_LIBS
6529fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006530{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
6531$as_echo "$ac_cv_search_opendir" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006532ac_res=$ac_cv_search_opendir
6533if test "$ac_res" != no; then
6534 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +00006535
Guido van Rossum76be6ed1995-01-02 18:33:54 +00006536fi
6537
6538fi
Guido van Rossum627b2d71993-12-24 10:39:16 +00006539
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006540{ $as_echo "$as_me:$LINENO: checking whether sys/types.h defines makedev" >&5
6541$as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006542if test "${ac_cv_header_sys_types_h_makedev+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006543 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006544else
6545 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006546/* confdefs.h. */
6547_ACEOF
6548cat confdefs.h >>conftest.$ac_ext
6549cat >>conftest.$ac_ext <<_ACEOF
6550/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006551#include <sys/types.h>
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006552int
6553main ()
6554{
6555return makedev(0, 0);
6556 ;
6557 return 0;
6558}
6559_ACEOF
6560rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006561if { (ac_try="$ac_link"
6562case "(($ac_try" in
6563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6564 *) ac_try_echo=$ac_try;;
6565esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006566eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6567$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006568 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006570 grep -v '^ *+' conftest.er1 >conftest.err
6571 rm -f conftest.er1
6572 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006573 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006574 (exit $ac_status); } && {
6575 test -z "$ac_c_werror_flag" ||
6576 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006577 } && test -s conftest$ac_exeext && {
6578 test "$cross_compiling" = yes ||
6579 $as_test_x conftest$ac_exeext
6580 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006581 ac_cv_header_sys_types_h_makedev=yes
6582else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006583 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006584sed 's/^/| /' conftest.$ac_ext >&5
6585
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006586 ac_cv_header_sys_types_h_makedev=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006587fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006588
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006589rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006590rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00006591 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006592
6593fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006594{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_types_h_makedev" >&5
6595$as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006596
6597if test $ac_cv_header_sys_types_h_makedev = no; then
6598if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006599 { $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6600$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006601if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006602 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006603fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006604{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6605$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006606else
6607 # Is the header compilable?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006608{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h usability" >&5
6609$as_echo_n "checking sys/mkdev.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006610cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006611/* confdefs.h. */
6612_ACEOF
6613cat confdefs.h >>conftest.$ac_ext
6614cat >>conftest.$ac_ext <<_ACEOF
6615/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006616$ac_includes_default
6617#include <sys/mkdev.h>
6618_ACEOF
6619rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006620if { (ac_try="$ac_compile"
6621case "(($ac_try" in
6622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6623 *) ac_try_echo=$ac_try;;
6624esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006625eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6626$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006627 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006628 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006629 grep -v '^ *+' conftest.er1 >conftest.err
6630 rm -f conftest.er1
6631 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006632 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006633 (exit $ac_status); } && {
6634 test -z "$ac_c_werror_flag" ||
6635 test ! -s conftest.err
6636 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006637 ac_header_compiler=yes
6638else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006639 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006640sed 's/^/| /' conftest.$ac_ext >&5
6641
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006642 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006644
6645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006646{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6647$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006648
6649# Is the header present?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006650{ $as_echo "$as_me:$LINENO: checking sys/mkdev.h presence" >&5
6651$as_echo_n "checking sys/mkdev.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006652cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006653/* confdefs.h. */
6654_ACEOF
6655cat confdefs.h >>conftest.$ac_ext
6656cat >>conftest.$ac_ext <<_ACEOF
6657/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006658#include <sys/mkdev.h>
6659_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006660if { (ac_try="$ac_cpp conftest.$ac_ext"
6661case "(($ac_try" in
6662 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6663 *) ac_try_echo=$ac_try;;
6664esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006665eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6666$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006667 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006668 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006669 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006670 rm -f conftest.er1
6671 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006672 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006673 (exit $ac_status); } >/dev/null && {
6674 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6675 test ! -s conftest.err
6676 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006677 ac_header_preproc=yes
6678else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006679 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006680sed 's/^/| /' conftest.$ac_ext >&5
6681
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006682 ac_header_preproc=no
6683fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006684
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006685rm -f conftest.err conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006686{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6687$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006688
6689# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006690case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6691 yes:no: )
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006692 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&5
6693$as_echo "$as_me: WARNING: sys/mkdev.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6694 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&5
6695$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006696 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006697 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006698 no:yes:* )
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006699 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: present but cannot be compiled" >&5
6700$as_echo "$as_me: WARNING: sys/mkdev.h: present but cannot be compiled" >&2;}
6701 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&5
6702$as_echo "$as_me: WARNING: sys/mkdev.h: check for missing prerequisite headers?" >&2;}
6703 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: see the Autoconf documentation" >&5
6704$as_echo "$as_me: WARNING: sys/mkdev.h: see the Autoconf documentation" >&2;}
6705 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&5
6706$as_echo "$as_me: WARNING: sys/mkdev.h: section \"Present But Cannot Be Compiled\"" >&2;}
6707 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&5
6708$as_echo "$as_me: WARNING: sys/mkdev.h: proceeding with the preprocessor's result" >&2;}
6709 { $as_echo "$as_me:$LINENO: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&5
6710$as_echo "$as_me: WARNING: sys/mkdev.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006711 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006712## -------------------------------------- ##
6713## Report this to http://bugs.python.org/ ##
6714## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006715_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006716 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006717 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006718esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006719{ $as_echo "$as_me:$LINENO: checking for sys/mkdev.h" >&5
6720$as_echo_n "checking for sys/mkdev.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006721if test "${ac_cv_header_sys_mkdev_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006722 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006723else
6724 ac_cv_header_sys_mkdev_h=$ac_header_preproc
6725fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006726{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_mkdev_h" >&5
6727$as_echo "$ac_cv_header_sys_mkdev_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006728
6729fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006730if test "x$ac_cv_header_sys_mkdev_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006731
6732cat >>confdefs.h <<\_ACEOF
6733#define MAJOR_IN_MKDEV 1
6734_ACEOF
6735
6736fi
6737
6738
6739
6740 if test $ac_cv_header_sys_mkdev_h = no; then
6741 if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006742 { $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6743$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006744if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006745 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006746fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006747{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6748$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006749else
6750 # Is the header compilable?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006751{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h usability" >&5
6752$as_echo_n "checking sys/sysmacros.h usability... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006753cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006754/* confdefs.h. */
6755_ACEOF
6756cat confdefs.h >>conftest.$ac_ext
6757cat >>conftest.$ac_ext <<_ACEOF
6758/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006759$ac_includes_default
6760#include <sys/sysmacros.h>
6761_ACEOF
6762rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006763if { (ac_try="$ac_compile"
6764case "(($ac_try" in
6765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6766 *) ac_try_echo=$ac_try;;
6767esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006768eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6769$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006770 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006771 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006772 grep -v '^ *+' conftest.er1 >conftest.err
6773 rm -f conftest.er1
6774 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006775 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006776 (exit $ac_status); } && {
6777 test -z "$ac_c_werror_flag" ||
6778 test ! -s conftest.err
6779 } && test -s conftest.$ac_objext; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006780 ac_header_compiler=yes
6781else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006782 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006783sed 's/^/| /' conftest.$ac_ext >&5
6784
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006785 ac_header_compiler=no
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006786fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006787
6788rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006789{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6790$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006791
6792# Is the header present?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006793{ $as_echo "$as_me:$LINENO: checking sys/sysmacros.h presence" >&5
6794$as_echo_n "checking sys/sysmacros.h presence... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006795cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00006796/* confdefs.h. */
6797_ACEOF
6798cat confdefs.h >>conftest.$ac_ext
6799cat >>conftest.$ac_ext <<_ACEOF
6800/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006801#include <sys/sysmacros.h>
6802_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006803if { (ac_try="$ac_cpp conftest.$ac_ext"
6804case "(($ac_try" in
6805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6806 *) ac_try_echo=$ac_try;;
6807esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006808eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6809$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006810 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006811 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +00006812 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006813 rm -f conftest.er1
6814 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006815 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006816 (exit $ac_status); } >/dev/null && {
6817 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6818 test ! -s conftest.err
6819 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006820 ac_header_preproc=yes
6821else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006822 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00006823sed 's/^/| /' conftest.$ac_ext >&5
6824
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006825 ac_header_preproc=no
6826fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006827
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006828rm -f conftest.err conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006829{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6830$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006831
6832# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +00006833case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6834 yes:no: )
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006835 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&5
6836$as_echo "$as_me: WARNING: sys/sysmacros.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
6837 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&5
6838$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +00006839 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +00006840 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +00006841 no:yes:* )
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006842 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: present but cannot be compiled" >&5
6843$as_echo "$as_me: WARNING: sys/sysmacros.h: present but cannot be compiled" >&2;}
6844 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&5
6845$as_echo "$as_me: WARNING: sys/sysmacros.h: check for missing prerequisite headers?" >&2;}
6846 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&5
6847$as_echo "$as_me: WARNING: sys/sysmacros.h: see the Autoconf documentation" >&2;}
6848 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&5
6849$as_echo "$as_me: WARNING: sys/sysmacros.h: section \"Present But Cannot Be Compiled\"" >&2;}
6850 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&5
6851$as_echo "$as_me: WARNING: sys/sysmacros.h: proceeding with the preprocessor's result" >&2;}
6852 { $as_echo "$as_me:$LINENO: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&5
6853$as_echo "$as_me: WARNING: sys/sysmacros.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006854 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +00006855## -------------------------------------- ##
6856## Report this to http://bugs.python.org/ ##
6857## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +00006858_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006859 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +00006860 ;;
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006861esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006862{ $as_echo "$as_me:$LINENO: checking for sys/sysmacros.h" >&5
6863$as_echo_n "checking for sys/sysmacros.h... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006864if test "${ac_cv_header_sys_sysmacros_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006865 $as_echo_n "(cached) " >&6
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006866else
6867 ac_cv_header_sys_sysmacros_h=$ac_header_preproc
6868fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006869{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_sysmacros_h" >&5
6870$as_echo "$ac_cv_header_sys_sysmacros_h" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006871
6872fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006873if test "x$ac_cv_header_sys_sysmacros_h" = x""yes; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +00006874
6875cat >>confdefs.h <<\_ACEOF
6876#define MAJOR_IN_SYSMACROS 1
6877_ACEOF
6878
6879fi
6880
6881
6882 fi
6883fi
6884
Michael W. Hudson54241132001-12-07 15:38:26 +00006885
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006886# On Solaris, term.h requires curses.h
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006887
6888for ac_header in term.h
6889do
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006890as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6891{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6892$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006893if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006894 $as_echo_n "(cached) " >&6
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006895else
6896 cat >conftest.$ac_ext <<_ACEOF
6897/* confdefs.h. */
6898_ACEOF
6899cat confdefs.h >>conftest.$ac_ext
6900cat >>conftest.$ac_ext <<_ACEOF
6901/* end confdefs.h. */
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006902
Martin v. Löwis5d52e782004-09-18 10:07:03 +00006903#ifdef HAVE_CURSES_H
6904#include <curses.h>
6905#endif
6906
6907
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006908#include <$ac_header>
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006909_ACEOF
6910rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006911if { (ac_try="$ac_compile"
6912case "(($ac_try" in
6913 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6914 *) ac_try_echo=$ac_try;;
6915esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006916eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6917$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006918 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006919 ac_status=$?
6920 grep -v '^ *+' conftest.er1 >conftest.err
6921 rm -f conftest.er1
6922 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006923 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006924 (exit $ac_status); } && {
6925 test -z "$ac_c_werror_flag" ||
6926 test ! -s conftest.err
6927 } && test -s conftest.$ac_objext; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006928 eval "$as_ac_Header=yes"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006929else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006930 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006931sed 's/^/| /' conftest.$ac_ext >&5
6932
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006933 eval "$as_ac_Header=no"
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006934fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006935
6936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006937fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006938ac_res=`eval 'as_val=${'$as_ac_Header'}
6939 $as_echo "$as_val"'`
6940 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
6941$as_echo "$ac_res" >&6; }
6942as_val=`eval 'as_val=${'$as_ac_Header'}
6943 $as_echo "$as_val"'`
6944 if test "x$as_val" = x""yes; then
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006945 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006946#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006947_ACEOF
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006948
Martin v. Löwisfd1c69e72004-11-30 22:09:37 +00006949fi
6950
6951done
Martin v. Löwisae2830c2004-09-18 09:54:52 +00006952
6953
Martin v. Löwis11017b12006-01-14 18:12:57 +00006954# On Linux, netlink.h requires asm/types.h
6955
6956for ac_header in linux/netlink.h
6957do
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006958as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6959{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
6960$as_echo_n "checking for $ac_header... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006961if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006962 $as_echo_n "(cached) " >&6
Martin v. Löwis11017b12006-01-14 18:12:57 +00006963else
6964 cat >conftest.$ac_ext <<_ACEOF
6965/* confdefs.h. */
6966_ACEOF
6967cat confdefs.h >>conftest.$ac_ext
6968cat >>conftest.$ac_ext <<_ACEOF
6969/* end confdefs.h. */
6970
6971#ifdef HAVE_ASM_TYPES_H
6972#include <asm/types.h>
6973#endif
6974#ifdef HAVE_SYS_SOCKET_H
6975#include <sys/socket.h>
6976#endif
6977
6978
6979#include <$ac_header>
6980_ACEOF
6981rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006982if { (ac_try="$ac_compile"
6983case "(($ac_try" in
6984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6985 *) ac_try_echo=$ac_try;;
6986esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006987eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
6988$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006989 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11017b12006-01-14 18:12:57 +00006990 ac_status=$?
6991 grep -v '^ *+' conftest.er1 >conftest.err
6992 rm -f conftest.er1
6993 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00006994 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00006995 (exit $ac_status); } && {
6996 test -z "$ac_c_werror_flag" ||
6997 test ! -s conftest.err
6998 } && test -s conftest.$ac_objext; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00006999 eval "$as_ac_Header=yes"
7000else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007001 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis11017b12006-01-14 18:12:57 +00007002sed 's/^/| /' conftest.$ac_ext >&5
7003
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007004 eval "$as_ac_Header=no"
Martin v. Löwis11017b12006-01-14 18:12:57 +00007005fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007006
7007rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11017b12006-01-14 18:12:57 +00007008fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007009ac_res=`eval 'as_val=${'$as_ac_Header'}
7010 $as_echo "$as_val"'`
7011 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
7012$as_echo "$ac_res" >&6; }
7013as_val=`eval 'as_val=${'$as_ac_Header'}
7014 $as_echo "$as_val"'`
7015 if test "x$as_val" = x""yes; then
Martin v. Löwis11017b12006-01-14 18:12:57 +00007016 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007017#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Martin v. Löwis11017b12006-01-14 18:12:57 +00007018_ACEOF
7019
7020fi
7021
7022done
7023
7024
Guido van Rossum627b2d71993-12-24 10:39:16 +00007025# checks for typedefs
Guido van Rossumda88dad1995-01-26 00:46:29 +00007026was_it_defined=no
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007027{ $as_echo "$as_me:$LINENO: checking for clock_t in time.h" >&5
7028$as_echo_n "checking for clock_t in time.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007029cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007030/* confdefs.h. */
7031_ACEOF
7032cat confdefs.h >>conftest.$ac_ext
7033cat >>conftest.$ac_ext <<_ACEOF
7034/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007035#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007036
7037_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007039 $EGREP "clock_t" >/dev/null 2>&1; then
Guido van Rossumda88dad1995-01-26 00:46:29 +00007040 was_it_defined=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +00007041else
Martin v. Löwis11437992002-04-12 09:54:03 +00007042
7043
7044cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007045#define clock_t long
Martin v. Löwis11437992002-04-12 09:54:03 +00007046_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007047
Martin v. Löwisc45929e2002-04-06 10:10:49 +00007048
Guido van Rossum627b2d71993-12-24 10:39:16 +00007049fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007050rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007051
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007052{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
7053$as_echo "$was_it_defined" >&6; }
Guido van Rossumda88dad1995-01-26 00:46:29 +00007054
Neal Norwitz11690112002-07-30 01:08:28 +00007055# Check whether using makedev requires defining _OSF_SOURCE
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007056{ $as_echo "$as_me:$LINENO: checking for makedev" >&5
7057$as_echo_n "checking for makedev... " >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007058cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007059/* confdefs.h. */
7060_ACEOF
7061cat confdefs.h >>conftest.$ac_ext
7062cat >>conftest.$ac_ext <<_ACEOF
7063/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007064#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007065int
7066main ()
7067{
7068 makedev(0, 0)
7069 ;
7070 return 0;
7071}
7072_ACEOF
7073rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007074if { (ac_try="$ac_link"
7075case "(($ac_try" in
7076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7077 *) ac_try_echo=$ac_try;;
7078esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007079eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7080$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007081 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007082 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007083 grep -v '^ *+' conftest.er1 >conftest.err
7084 rm -f conftest.er1
7085 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007086 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007087 (exit $ac_status); } && {
7088 test -z "$ac_c_werror_flag" ||
7089 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007090 } && test -s conftest$ac_exeext && {
7091 test "$cross_compiling" = yes ||
7092 $as_test_x conftest$ac_exeext
7093 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007094 ac_cv_has_makedev=yes
7095else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007096 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007097sed 's/^/| /' conftest.$ac_ext >&5
7098
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007099 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007100fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007101
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007102rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007103rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007104 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007105if test "$ac_cv_has_makedev" = "no"; then
7106 # we didn't link, try if _OSF_SOURCE will allow us to link
7107 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007108/* confdefs.h. */
7109_ACEOF
7110cat confdefs.h >>conftest.$ac_ext
7111cat >>conftest.$ac_ext <<_ACEOF
7112/* end confdefs.h. */
Neal Norwitz11690112002-07-30 01:08:28 +00007113
Neal Norwitz6eb37f02003-02-23 23:28:15 +00007114#define _OSF_SOURCE 1
7115#include <sys/types.h>
Neal Norwitz11690112002-07-30 01:08:28 +00007116
Neal Norwitz11690112002-07-30 01:08:28 +00007117int
7118main ()
7119{
7120 makedev(0, 0)
7121 ;
7122 return 0;
7123}
7124_ACEOF
7125rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007126if { (ac_try="$ac_link"
7127case "(($ac_try" in
7128 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7129 *) ac_try_echo=$ac_try;;
7130esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007131eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7132$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007133 (eval "$ac_link") 2>conftest.er1
Neal Norwitz11690112002-07-30 01:08:28 +00007134 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007135 grep -v '^ *+' conftest.er1 >conftest.err
7136 rm -f conftest.er1
7137 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007138 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007139 (exit $ac_status); } && {
7140 test -z "$ac_c_werror_flag" ||
7141 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007142 } && test -s conftest$ac_exeext && {
7143 test "$cross_compiling" = yes ||
7144 $as_test_x conftest$ac_exeext
7145 }; then
Neal Norwitz11690112002-07-30 01:08:28 +00007146 ac_cv_has_makedev=yes
7147else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007148 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007149sed 's/^/| /' conftest.$ac_ext >&5
7150
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007151 ac_cv_has_makedev=no
Neal Norwitz11690112002-07-30 01:08:28 +00007152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007153
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007154rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007155rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +00007156 conftest$ac_exeext conftest.$ac_ext
Neal Norwitz11690112002-07-30 01:08:28 +00007157 if test "$ac_cv_has_makedev" = "yes"; then
7158
7159cat >>confdefs.h <<\_ACEOF
7160#define _OSF_SOURCE 1
7161_ACEOF
7162
7163 fi
7164fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007165{ $as_echo "$as_me:$LINENO: result: $ac_cv_has_makedev" >&5
7166$as_echo "$ac_cv_has_makedev" >&6; }
Neal Norwitz11690112002-07-30 01:08:28 +00007167if test "$ac_cv_has_makedev" = "yes"; then
7168
7169cat >>confdefs.h <<\_ACEOF
7170#define HAVE_MAKEDEV 1
7171_ACEOF
7172
7173fi
7174
Martin v. Löwis399a6892002-10-04 10:22:02 +00007175# Enabling LFS on Solaris (2.6 to 9) with gcc 2.95 triggers a bug in
7176# the system headers: If _XOPEN_SOURCE and _LARGEFILE_SOURCE are
7177# defined, but the compiler does not support pragma redefine_extname,
7178# and _LARGEFILE64_SOURCE is not defined, the headers refer to 64-bit
7179# structures (such as rlimit64) without declaring them. As a
7180# work-around, disable LFS on such configurations
7181
7182use_lfs=yes
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007183{ $as_echo "$as_me:$LINENO: checking Solaris LFS bug" >&5
7184$as_echo_n "checking Solaris LFS bug... " >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007185cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007186/* confdefs.h. */
7187_ACEOF
7188cat confdefs.h >>conftest.$ac_ext
7189cat >>conftest.$ac_ext <<_ACEOF
7190/* end confdefs.h. */
Martin v. Löwis399a6892002-10-04 10:22:02 +00007191
7192#define _LARGEFILE_SOURCE 1
7193#define _FILE_OFFSET_BITS 64
7194#include <sys/resource.h>
7195
Martin v. Löwis399a6892002-10-04 10:22:02 +00007196int
7197main ()
7198{
7199struct rlimit foo;
7200 ;
7201 return 0;
7202}
7203_ACEOF
7204rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007205if { (ac_try="$ac_compile"
7206case "(($ac_try" in
7207 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7208 *) ac_try_echo=$ac_try;;
7209esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007210eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7211$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007212 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis399a6892002-10-04 10:22:02 +00007213 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007214 grep -v '^ *+' conftest.er1 >conftest.err
7215 rm -f conftest.er1
7216 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007217 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007218 (exit $ac_status); } && {
7219 test -z "$ac_c_werror_flag" ||
7220 test ! -s conftest.err
7221 } && test -s conftest.$ac_objext; then
Martin v. Löwis399a6892002-10-04 10:22:02 +00007222 sol_lfs_bug=no
7223else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007224 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007225sed 's/^/| /' conftest.$ac_ext >&5
7226
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007227 sol_lfs_bug=yes
Martin v. Löwis399a6892002-10-04 10:22:02 +00007228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007229
7230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007231{ $as_echo "$as_me:$LINENO: result: $sol_lfs_bug" >&5
7232$as_echo "$sol_lfs_bug" >&6; }
Martin v. Löwis399a6892002-10-04 10:22:02 +00007233if test "$sol_lfs_bug" = "yes"; then
7234 use_lfs=no
7235fi
7236
7237if test "$use_lfs" = "yes"; then
Guido van Rossum810cc512001-09-09 23:51:39 +00007238# Two defines needed to enable largefile support on various platforms
7239# These may affect some typedefs
Guido van Rossum810cc512001-09-09 23:51:39 +00007240
Martin v. Löwis11437992002-04-12 09:54:03 +00007241cat >>confdefs.h <<\_ACEOF
7242#define _LARGEFILE_SOURCE 1
7243_ACEOF
7244
7245
7246cat >>confdefs.h <<\_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007247#define _FILE_OFFSET_BITS 64
Martin v. Löwis11437992002-04-12 09:54:03 +00007248_ACEOF
Guido van Rossum810cc512001-09-09 23:51:39 +00007249
Martin v. Löwis399a6892002-10-04 10:22:02 +00007250fi
Michael W. Hudson54241132001-12-07 15:38:26 +00007251
Guido van Rossum84e7b241996-08-19 21:59:00 +00007252# Add some code to confdefs.h so that the test for off_t works on SCO
7253cat >> confdefs.h <<\EOF
7254#if defined(SCO_DS)
7255#undef _OFF_T
7256#endif
7257EOF
7258
Guido van Rossumef2255b2000-03-10 22:30:29 +00007259# Type availability checks
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007260{ $as_echo "$as_me:$LINENO: checking for mode_t" >&5
7261$as_echo_n "checking for mode_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007262if test "${ac_cv_type_mode_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007263 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007264else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007265 ac_cv_type_mode_t=no
7266cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007267/* confdefs.h. */
7268_ACEOF
7269cat confdefs.h >>conftest.$ac_ext
7270cat >>conftest.$ac_ext <<_ACEOF
7271/* end confdefs.h. */
7272$ac_includes_default
7273int
7274main ()
7275{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007276if (sizeof (mode_t))
7277 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007278 ;
7279 return 0;
7280}
7281_ACEOF
7282rm -f conftest.$ac_objext
7283if { (ac_try="$ac_compile"
7284case "(($ac_try" in
7285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7286 *) ac_try_echo=$ac_try;;
7287esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007288eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7289$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007290 (eval "$ac_compile") 2>conftest.er1
7291 ac_status=$?
7292 grep -v '^ *+' conftest.er1 >conftest.err
7293 rm -f conftest.er1
7294 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007295 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007296 (exit $ac_status); } && {
7297 test -z "$ac_c_werror_flag" ||
7298 test ! -s conftest.err
7299 } && test -s conftest.$ac_objext; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007300 cat >conftest.$ac_ext <<_ACEOF
7301/* confdefs.h. */
7302_ACEOF
7303cat confdefs.h >>conftest.$ac_ext
7304cat >>conftest.$ac_ext <<_ACEOF
7305/* end confdefs.h. */
7306$ac_includes_default
7307int
7308main ()
7309{
7310if (sizeof ((mode_t)))
7311 return 0;
7312 ;
7313 return 0;
7314}
7315_ACEOF
7316rm -f conftest.$ac_objext
7317if { (ac_try="$ac_compile"
7318case "(($ac_try" in
7319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7320 *) ac_try_echo=$ac_try;;
7321esac
7322eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7323$as_echo "$ac_try_echo") >&5
7324 (eval "$ac_compile") 2>conftest.er1
7325 ac_status=$?
7326 grep -v '^ *+' conftest.er1 >conftest.err
7327 rm -f conftest.er1
7328 cat conftest.err >&5
7329 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7330 (exit $ac_status); } && {
7331 test -z "$ac_c_werror_flag" ||
7332 test ! -s conftest.err
7333 } && test -s conftest.$ac_objext; then
7334 :
Jack Jansendd19cf82001-12-06 22:36:17 +00007335else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007336 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007337sed 's/^/| /' conftest.$ac_ext >&5
7338
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007339 ac_cv_type_mode_t=yes
7340fi
7341
7342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7343else
7344 $as_echo "$as_me: failed program was:" >&5
7345sed 's/^/| /' conftest.$ac_ext >&5
7346
7347
Jack Jansendd19cf82001-12-06 22:36:17 +00007348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007349
7350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007351fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007352{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_mode_t" >&5
7353$as_echo "$ac_cv_type_mode_t" >&6; }
7354if test "x$ac_cv_type_mode_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007355 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007356else
Martin v. Löwis11437992002-04-12 09:54:03 +00007357
7358cat >>confdefs.h <<_ACEOF
7359#define mode_t int
7360_ACEOF
7361
7362fi
7363
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007364{ $as_echo "$as_me:$LINENO: checking for off_t" >&5
7365$as_echo_n "checking for off_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007366if test "${ac_cv_type_off_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007367 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007368else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007369 ac_cv_type_off_t=no
7370cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007371/* confdefs.h. */
7372_ACEOF
7373cat confdefs.h >>conftest.$ac_ext
7374cat >>conftest.$ac_ext <<_ACEOF
7375/* end confdefs.h. */
7376$ac_includes_default
7377int
7378main ()
7379{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007380if (sizeof (off_t))
7381 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007382 ;
7383 return 0;
7384}
7385_ACEOF
7386rm -f conftest.$ac_objext
7387if { (ac_try="$ac_compile"
7388case "(($ac_try" in
7389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7390 *) ac_try_echo=$ac_try;;
7391esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007392eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7393$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007394 (eval "$ac_compile") 2>conftest.er1
7395 ac_status=$?
7396 grep -v '^ *+' conftest.er1 >conftest.err
7397 rm -f conftest.er1
7398 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007399 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007400 (exit $ac_status); } && {
7401 test -z "$ac_c_werror_flag" ||
7402 test ! -s conftest.err
7403 } && test -s conftest.$ac_objext; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007404 cat >conftest.$ac_ext <<_ACEOF
7405/* confdefs.h. */
7406_ACEOF
7407cat confdefs.h >>conftest.$ac_ext
7408cat >>conftest.$ac_ext <<_ACEOF
7409/* end confdefs.h. */
7410$ac_includes_default
7411int
7412main ()
7413{
7414if (sizeof ((off_t)))
7415 return 0;
7416 ;
7417 return 0;
7418}
7419_ACEOF
7420rm -f conftest.$ac_objext
7421if { (ac_try="$ac_compile"
7422case "(($ac_try" in
7423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7424 *) ac_try_echo=$ac_try;;
7425esac
7426eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7427$as_echo "$ac_try_echo") >&5
7428 (eval "$ac_compile") 2>conftest.er1
7429 ac_status=$?
7430 grep -v '^ *+' conftest.er1 >conftest.err
7431 rm -f conftest.er1
7432 cat conftest.err >&5
7433 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7434 (exit $ac_status); } && {
7435 test -z "$ac_c_werror_flag" ||
7436 test ! -s conftest.err
7437 } && test -s conftest.$ac_objext; then
7438 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007439else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007440 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007441sed 's/^/| /' conftest.$ac_ext >&5
7442
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007443 ac_cv_type_off_t=yes
7444fi
7445
7446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7447else
7448 $as_echo "$as_me: failed program was:" >&5
7449sed 's/^/| /' conftest.$ac_ext >&5
7450
7451
Guido van Rossum627b2d71993-12-24 10:39:16 +00007452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007453
7454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007455fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007456{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5
7457$as_echo "$ac_cv_type_off_t" >&6; }
7458if test "x$ac_cv_type_off_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007459 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007460else
Martin v. Löwis11437992002-04-12 09:54:03 +00007461
7462cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007463#define off_t long int
Martin v. Löwis11437992002-04-12 09:54:03 +00007464_ACEOF
7465
7466fi
7467
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007468{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
7469$as_echo_n "checking for pid_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007470if test "${ac_cv_type_pid_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007471 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007472else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007473 ac_cv_type_pid_t=no
7474cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007475/* confdefs.h. */
7476_ACEOF
7477cat confdefs.h >>conftest.$ac_ext
7478cat >>conftest.$ac_ext <<_ACEOF
7479/* end confdefs.h. */
7480$ac_includes_default
7481int
7482main ()
7483{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007484if (sizeof (pid_t))
7485 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007486 ;
7487 return 0;
7488}
7489_ACEOF
7490rm -f conftest.$ac_objext
7491if { (ac_try="$ac_compile"
7492case "(($ac_try" in
7493 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7494 *) ac_try_echo=$ac_try;;
7495esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007496eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7497$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007498 (eval "$ac_compile") 2>conftest.er1
7499 ac_status=$?
7500 grep -v '^ *+' conftest.er1 >conftest.err
7501 rm -f conftest.er1
7502 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007503 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007504 (exit $ac_status); } && {
7505 test -z "$ac_c_werror_flag" ||
7506 test ! -s conftest.err
7507 } && test -s conftest.$ac_objext; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007508 cat >conftest.$ac_ext <<_ACEOF
7509/* confdefs.h. */
7510_ACEOF
7511cat confdefs.h >>conftest.$ac_ext
7512cat >>conftest.$ac_ext <<_ACEOF
7513/* end confdefs.h. */
7514$ac_includes_default
7515int
7516main ()
7517{
7518if (sizeof ((pid_t)))
7519 return 0;
7520 ;
7521 return 0;
7522}
7523_ACEOF
7524rm -f conftest.$ac_objext
7525if { (ac_try="$ac_compile"
7526case "(($ac_try" in
7527 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7528 *) ac_try_echo=$ac_try;;
7529esac
7530eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7531$as_echo "$ac_try_echo") >&5
7532 (eval "$ac_compile") 2>conftest.er1
7533 ac_status=$?
7534 grep -v '^ *+' conftest.er1 >conftest.err
7535 rm -f conftest.er1
7536 cat conftest.err >&5
7537 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7538 (exit $ac_status); } && {
7539 test -z "$ac_c_werror_flag" ||
7540 test ! -s conftest.err
7541 } && test -s conftest.$ac_objext; then
7542 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007543else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007544 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007545sed 's/^/| /' conftest.$ac_ext >&5
7546
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007547 ac_cv_type_pid_t=yes
7548fi
7549
7550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7551else
7552 $as_echo "$as_me: failed program was:" >&5
7553sed 's/^/| /' conftest.$ac_ext >&5
7554
7555
Guido van Rossum627b2d71993-12-24 10:39:16 +00007556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007557
7558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007559fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007560{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
7561$as_echo "$ac_cv_type_pid_t" >&6; }
7562if test "x$ac_cv_type_pid_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007563 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007564else
Martin v. Löwis11437992002-04-12 09:54:03 +00007565
7566cat >>confdefs.h <<_ACEOF
7567#define pid_t int
7568_ACEOF
7569
7570fi
7571
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007572{ $as_echo "$as_me:$LINENO: checking return type of signal handlers" >&5
7573$as_echo_n "checking return type of signal handlers... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007574if test "${ac_cv_type_signal+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007575 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007576else
7577 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007578/* confdefs.h. */
7579_ACEOF
7580cat confdefs.h >>conftest.$ac_ext
7581cat >>conftest.$ac_ext <<_ACEOF
7582/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +00007583#include <sys/types.h>
7584#include <signal.h>
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007585
Martin v. Löwis11437992002-04-12 09:54:03 +00007586int
7587main ()
7588{
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007589return *(signal (0, 0)) (0) == 1;
Martin v. Löwis11437992002-04-12 09:54:03 +00007590 ;
7591 return 0;
7592}
7593_ACEOF
7594rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007595if { (ac_try="$ac_compile"
7596case "(($ac_try" in
7597 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7598 *) ac_try_echo=$ac_try;;
7599esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007600eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7601$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007602 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00007603 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00007604 grep -v '^ *+' conftest.er1 >conftest.err
7605 rm -f conftest.er1
7606 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007607 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007608 (exit $ac_status); } && {
7609 test -z "$ac_c_werror_flag" ||
7610 test ! -s conftest.err
7611 } && test -s conftest.$ac_objext; then
7612 ac_cv_type_signal=int
Guido van Rossum627b2d71993-12-24 10:39:16 +00007613else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007614 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007615sed 's/^/| /' conftest.$ac_ext >&5
7616
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007617 ac_cv_type_signal=void
Guido van Rossum627b2d71993-12-24 10:39:16 +00007618fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007619
7620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007621fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007622{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5
7623$as_echo "$ac_cv_type_signal" >&6; }
Guido van Rossum48bdbfc1996-05-28 22:53:48 +00007624
Martin v. Löwis11437992002-04-12 09:54:03 +00007625cat >>confdefs.h <<_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007626#define RETSIGTYPE $ac_cv_type_signal
Martin v. Löwis11437992002-04-12 09:54:03 +00007627_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +00007628
Michael W. Hudson54241132001-12-07 15:38:26 +00007629
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007630{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
7631$as_echo_n "checking for size_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007632if test "${ac_cv_type_size_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007633 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007634else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007635 ac_cv_type_size_t=no
7636cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007637/* confdefs.h. */
7638_ACEOF
7639cat confdefs.h >>conftest.$ac_ext
7640cat >>conftest.$ac_ext <<_ACEOF
7641/* end confdefs.h. */
7642$ac_includes_default
7643int
7644main ()
7645{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007646if (sizeof (size_t))
7647 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007648 ;
7649 return 0;
7650}
7651_ACEOF
7652rm -f conftest.$ac_objext
7653if { (ac_try="$ac_compile"
7654case "(($ac_try" in
7655 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7656 *) ac_try_echo=$ac_try;;
7657esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007658eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7659$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007660 (eval "$ac_compile") 2>conftest.er1
7661 ac_status=$?
7662 grep -v '^ *+' conftest.er1 >conftest.err
7663 rm -f conftest.er1
7664 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007665 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00007666 (exit $ac_status); } && {
7667 test -z "$ac_c_werror_flag" ||
7668 test ! -s conftest.err
7669 } && test -s conftest.$ac_objext; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007670 cat >conftest.$ac_ext <<_ACEOF
7671/* confdefs.h. */
7672_ACEOF
7673cat confdefs.h >>conftest.$ac_ext
7674cat >>conftest.$ac_ext <<_ACEOF
7675/* end confdefs.h. */
7676$ac_includes_default
7677int
7678main ()
7679{
7680if (sizeof ((size_t)))
7681 return 0;
7682 ;
7683 return 0;
7684}
7685_ACEOF
7686rm -f conftest.$ac_objext
7687if { (ac_try="$ac_compile"
7688case "(($ac_try" in
7689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7690 *) ac_try_echo=$ac_try;;
7691esac
7692eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7693$as_echo "$ac_try_echo") >&5
7694 (eval "$ac_compile") 2>conftest.er1
7695 ac_status=$?
7696 grep -v '^ *+' conftest.er1 >conftest.err
7697 rm -f conftest.er1
7698 cat conftest.err >&5
7699 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
7700 (exit $ac_status); } && {
7701 test -z "$ac_c_werror_flag" ||
7702 test ! -s conftest.err
7703 } && test -s conftest.$ac_objext; then
7704 :
Guido van Rossum627b2d71993-12-24 10:39:16 +00007705else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007706 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00007707sed 's/^/| /' conftest.$ac_ext >&5
7708
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007709 ac_cv_type_size_t=yes
7710fi
7711
7712rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7713else
7714 $as_echo "$as_me: failed program was:" >&5
7715sed 's/^/| /' conftest.$ac_ext >&5
7716
7717
Guido van Rossum627b2d71993-12-24 10:39:16 +00007718fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007719
7720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +00007721fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007722{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
7723$as_echo "$ac_cv_type_size_t" >&6; }
7724if test "x$ac_cv_type_size_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +00007725 :
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007726else
Martin v. Löwis11437992002-04-12 09:54:03 +00007727
7728cat >>confdefs.h <<_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +00007729#define size_t unsigned int
Martin v. Löwis11437992002-04-12 09:54:03 +00007730_ACEOF
7731
7732fi
7733
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007734{ $as_echo "$as_me:$LINENO: checking for uid_t in sys/types.h" >&5
7735$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00007736if test "${ac_cv_type_uid_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007737 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00007738else
7739 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00007740/* confdefs.h. */
7741_ACEOF
7742cat confdefs.h >>conftest.$ac_ext
7743cat >>conftest.$ac_ext <<_ACEOF
7744/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007745#include <sys/types.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00007746
7747_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +00007749 $EGREP "uid_t" >/dev/null 2>&1; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007750 ac_cv_type_uid_t=yes
7751else
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007752 ac_cv_type_uid_t=no
7753fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007754rm -f conftest*
Guido van Rossum627b2d71993-12-24 10:39:16 +00007755
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007756fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007757{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
7758$as_echo "$ac_cv_type_uid_t" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +00007759if test $ac_cv_type_uid_t = no; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007760
Martin v. Löwis11437992002-04-12 09:54:03 +00007761cat >>confdefs.h <<\_ACEOF
7762#define uid_t int
7763_ACEOF
7764
7765
7766cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007767#define gid_t int
Martin v. Löwis11437992002-04-12 09:54:03 +00007768_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +00007769
7770fi
7771
Mark Dickinsonbd792642009-03-18 20:06:12 +00007772
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007773 { $as_echo "$as_me:$LINENO: checking for uint32_t" >&5
7774$as_echo_n "checking for uint32_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007775if test "${ac_cv_c_uint32_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007776 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007777else
7778 ac_cv_c_uint32_t=no
7779 for ac_type in 'uint32_t' 'unsigned int' 'unsigned long int' \
7780 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7781 cat >conftest.$ac_ext <<_ACEOF
7782/* confdefs.h. */
7783_ACEOF
7784cat confdefs.h >>conftest.$ac_ext
7785cat >>conftest.$ac_ext <<_ACEOF
7786/* end confdefs.h. */
7787$ac_includes_default
7788int
7789main ()
7790{
7791static int test_array [1 - 2 * !(($ac_type) -1 >> (32 - 1) == 1)];
7792test_array [0] = 0
7793
7794 ;
7795 return 0;
7796}
7797_ACEOF
7798rm -f conftest.$ac_objext
7799if { (ac_try="$ac_compile"
7800case "(($ac_try" in
7801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7802 *) ac_try_echo=$ac_try;;
7803esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007804eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7805$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007806 (eval "$ac_compile") 2>conftest.er1
7807 ac_status=$?
7808 grep -v '^ *+' conftest.er1 >conftest.err
7809 rm -f conftest.er1
7810 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007811 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007812 (exit $ac_status); } && {
7813 test -z "$ac_c_werror_flag" ||
7814 test ! -s conftest.err
7815 } && test -s conftest.$ac_objext; then
7816 case $ac_type in
7817 uint32_t) ac_cv_c_uint32_t=yes ;;
7818 *) ac_cv_c_uint32_t=$ac_type ;;
7819esac
7820
7821else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007822 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007823sed 's/^/| /' conftest.$ac_ext >&5
7824
7825
7826fi
7827
7828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7829 test "$ac_cv_c_uint32_t" != no && break
7830 done
7831fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007832{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint32_t" >&5
7833$as_echo "$ac_cv_c_uint32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007834 case $ac_cv_c_uint32_t in #(
7835 no|yes) ;; #(
7836 *)
7837
7838cat >>confdefs.h <<\_ACEOF
7839#define _UINT32_T 1
7840_ACEOF
7841
7842
7843cat >>confdefs.h <<_ACEOF
7844#define uint32_t $ac_cv_c_uint32_t
7845_ACEOF
7846;;
7847 esac
7848
7849
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007850 { $as_echo "$as_me:$LINENO: checking for uint64_t" >&5
7851$as_echo_n "checking for uint64_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007852if test "${ac_cv_c_uint64_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007853 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007854else
7855 ac_cv_c_uint64_t=no
7856 for ac_type in 'uint64_t' 'unsigned int' 'unsigned long int' \
7857 'unsigned long long int' 'unsigned short int' 'unsigned char'; do
7858 cat >conftest.$ac_ext <<_ACEOF
7859/* confdefs.h. */
7860_ACEOF
7861cat confdefs.h >>conftest.$ac_ext
7862cat >>conftest.$ac_ext <<_ACEOF
7863/* end confdefs.h. */
7864$ac_includes_default
7865int
7866main ()
7867{
7868static int test_array [1 - 2 * !(($ac_type) -1 >> (64 - 1) == 1)];
7869test_array [0] = 0
7870
7871 ;
7872 return 0;
7873}
7874_ACEOF
7875rm -f conftest.$ac_objext
7876if { (ac_try="$ac_compile"
7877case "(($ac_try" in
7878 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7879 *) ac_try_echo=$ac_try;;
7880esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007881eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7882$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007883 (eval "$ac_compile") 2>conftest.er1
7884 ac_status=$?
7885 grep -v '^ *+' conftest.er1 >conftest.err
7886 rm -f conftest.er1
7887 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007888 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007889 (exit $ac_status); } && {
7890 test -z "$ac_c_werror_flag" ||
7891 test ! -s conftest.err
7892 } && test -s conftest.$ac_objext; then
7893 case $ac_type in
7894 uint64_t) ac_cv_c_uint64_t=yes ;;
7895 *) ac_cv_c_uint64_t=$ac_type ;;
7896esac
7897
7898else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007899 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007900sed 's/^/| /' conftest.$ac_ext >&5
7901
7902
7903fi
7904
7905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7906 test "$ac_cv_c_uint64_t" != no && break
7907 done
7908fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007909{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_uint64_t" >&5
7910$as_echo "$ac_cv_c_uint64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007911 case $ac_cv_c_uint64_t in #(
7912 no|yes) ;; #(
7913 *)
7914
7915cat >>confdefs.h <<\_ACEOF
7916#define _UINT64_T 1
7917_ACEOF
7918
7919
7920cat >>confdefs.h <<_ACEOF
7921#define uint64_t $ac_cv_c_uint64_t
7922_ACEOF
7923;;
7924 esac
7925
7926
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007927 { $as_echo "$as_me:$LINENO: checking for int32_t" >&5
7928$as_echo_n "checking for int32_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00007929if test "${ac_cv_c_int32_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007930 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00007931else
7932 ac_cv_c_int32_t=no
7933 for ac_type in 'int32_t' 'int' 'long int' \
7934 'long long int' 'short int' 'signed char'; do
7935 cat >conftest.$ac_ext <<_ACEOF
7936/* confdefs.h. */
7937_ACEOF
7938cat confdefs.h >>conftest.$ac_ext
7939cat >>conftest.$ac_ext <<_ACEOF
7940/* end confdefs.h. */
7941$ac_includes_default
7942int
7943main ()
7944{
7945static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1))];
7946test_array [0] = 0
7947
7948 ;
7949 return 0;
7950}
7951_ACEOF
7952rm -f conftest.$ac_objext
7953if { (ac_try="$ac_compile"
7954case "(($ac_try" in
7955 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7956 *) ac_try_echo=$ac_try;;
7957esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007958eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7959$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007960 (eval "$ac_compile") 2>conftest.er1
7961 ac_status=$?
7962 grep -v '^ *+' conftest.er1 >conftest.err
7963 rm -f conftest.er1
7964 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007965 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007966 (exit $ac_status); } && {
7967 test -z "$ac_c_werror_flag" ||
7968 test ! -s conftest.err
7969 } && test -s conftest.$ac_objext; then
7970 cat >conftest.$ac_ext <<_ACEOF
7971/* confdefs.h. */
7972_ACEOF
7973cat confdefs.h >>conftest.$ac_ext
7974cat >>conftest.$ac_ext <<_ACEOF
7975/* end confdefs.h. */
7976$ac_includes_default
7977int
7978main ()
7979{
7980static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 1)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007981 < ($ac_type) (((($ac_type) 1 << (32 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00007982test_array [0] = 0
7983
7984 ;
7985 return 0;
7986}
7987_ACEOF
7988rm -f conftest.$ac_objext
7989if { (ac_try="$ac_compile"
7990case "(($ac_try" in
7991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7992 *) ac_try_echo=$ac_try;;
7993esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00007994eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
7995$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00007996 (eval "$ac_compile") 2>conftest.er1
7997 ac_status=$?
7998 grep -v '^ *+' conftest.er1 >conftest.err
7999 rm -f conftest.er1
8000 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008001 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008002 (exit $ac_status); } && {
8003 test -z "$ac_c_werror_flag" ||
8004 test ! -s conftest.err
8005 } && test -s conftest.$ac_objext; then
8006 :
8007else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008008 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008009sed 's/^/| /' conftest.$ac_ext >&5
8010
8011 case $ac_type in
8012 int32_t) ac_cv_c_int32_t=yes ;;
8013 *) ac_cv_c_int32_t=$ac_type ;;
8014esac
8015
8016fi
8017
8018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8019else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008020 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008021sed 's/^/| /' conftest.$ac_ext >&5
8022
8023
8024fi
8025
8026rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8027 test "$ac_cv_c_int32_t" != no && break
8028 done
8029fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008030{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int32_t" >&5
8031$as_echo "$ac_cv_c_int32_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008032 case $ac_cv_c_int32_t in #(
8033 no|yes) ;; #(
8034 *)
8035
8036cat >>confdefs.h <<_ACEOF
8037#define int32_t $ac_cv_c_int32_t
8038_ACEOF
8039;;
8040 esac
8041
8042
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008043 { $as_echo "$as_me:$LINENO: checking for int64_t" >&5
8044$as_echo_n "checking for int64_t... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008045if test "${ac_cv_c_int64_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008046 $as_echo_n "(cached) " >&6
Mark Dickinsonbd792642009-03-18 20:06:12 +00008047else
8048 ac_cv_c_int64_t=no
8049 for ac_type in 'int64_t' 'int' 'long int' \
8050 'long long int' 'short int' 'signed char'; do
8051 cat >conftest.$ac_ext <<_ACEOF
8052/* confdefs.h. */
8053_ACEOF
8054cat confdefs.h >>conftest.$ac_ext
8055cat >>conftest.$ac_ext <<_ACEOF
8056/* end confdefs.h. */
8057$ac_includes_default
8058int
8059main ()
8060{
8061static int test_array [1 - 2 * !(0 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1))];
8062test_array [0] = 0
8063
8064 ;
8065 return 0;
8066}
8067_ACEOF
8068rm -f conftest.$ac_objext
8069if { (ac_try="$ac_compile"
8070case "(($ac_try" in
8071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8072 *) ac_try_echo=$ac_try;;
8073esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008074eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8075$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008076 (eval "$ac_compile") 2>conftest.er1
8077 ac_status=$?
8078 grep -v '^ *+' conftest.er1 >conftest.err
8079 rm -f conftest.er1
8080 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008081 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008082 (exit $ac_status); } && {
8083 test -z "$ac_c_werror_flag" ||
8084 test ! -s conftest.err
8085 } && test -s conftest.$ac_objext; then
8086 cat >conftest.$ac_ext <<_ACEOF
8087/* confdefs.h. */
8088_ACEOF
8089cat confdefs.h >>conftest.$ac_ext
8090cat >>conftest.$ac_ext <<_ACEOF
8091/* end confdefs.h. */
8092$ac_includes_default
8093int
8094main ()
8095{
8096static int test_array [1 - 2 * !(($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 1)
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008097 < ($ac_type) (((($ac_type) 1 << (64 - 2)) - 1) * 2 + 2))];
Mark Dickinsonbd792642009-03-18 20:06:12 +00008098test_array [0] = 0
8099
8100 ;
8101 return 0;
8102}
8103_ACEOF
8104rm -f conftest.$ac_objext
8105if { (ac_try="$ac_compile"
8106case "(($ac_try" in
8107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8108 *) ac_try_echo=$ac_try;;
8109esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008110eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8111$as_echo "$ac_try_echo") >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008112 (eval "$ac_compile") 2>conftest.er1
8113 ac_status=$?
8114 grep -v '^ *+' conftest.er1 >conftest.err
8115 rm -f conftest.er1
8116 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008117 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008118 (exit $ac_status); } && {
8119 test -z "$ac_c_werror_flag" ||
8120 test ! -s conftest.err
8121 } && test -s conftest.$ac_objext; then
8122 :
8123else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008124 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008125sed 's/^/| /' conftest.$ac_ext >&5
8126
8127 case $ac_type in
8128 int64_t) ac_cv_c_int64_t=yes ;;
8129 *) ac_cv_c_int64_t=$ac_type ;;
8130esac
8131
8132fi
8133
8134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8135else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008136 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonbd792642009-03-18 20:06:12 +00008137sed 's/^/| /' conftest.$ac_ext >&5
8138
8139
8140fi
8141
8142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8143 test "$ac_cv_c_int64_t" != no && break
8144 done
8145fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008146{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_int64_t" >&5
8147$as_echo "$ac_cv_c_int64_t" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +00008148 case $ac_cv_c_int64_t in #(
8149 no|yes) ;; #(
8150 *)
8151
8152cat >>confdefs.h <<_ACEOF
8153#define int64_t $ac_cv_c_int64_t
8154_ACEOF
8155;;
8156 esac
8157
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008158{ $as_echo "$as_me:$LINENO: checking for ssize_t" >&5
8159$as_echo_n "checking for ssize_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +00008160if test "${ac_cv_type_ssize_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008161 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +00008162else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008163 ac_cv_type_ssize_t=no
8164cat >conftest.$ac_ext <<_ACEOF
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008165/* confdefs.h. */
8166_ACEOF
8167cat confdefs.h >>conftest.$ac_ext
8168cat >>conftest.$ac_ext <<_ACEOF
8169/* end confdefs.h. */
8170$ac_includes_default
8171int
8172main ()
8173{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008174if (sizeof (ssize_t))
8175 return 0;
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008176 ;
8177 return 0;
8178}
8179_ACEOF
8180rm -f conftest.$ac_objext
8181if { (ac_try="$ac_compile"
8182case "(($ac_try" in
8183 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8184 *) ac_try_echo=$ac_try;;
8185esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008186eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8187$as_echo "$ac_try_echo") >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008188 (eval "$ac_compile") 2>conftest.er1
8189 ac_status=$?
8190 grep -v '^ *+' conftest.er1 >conftest.err
8191 rm -f conftest.er1
8192 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008193 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalotti302825b2009-07-17 07:49:53 +00008194 (exit $ac_status); } && {
8195 test -z "$ac_c_werror_flag" ||
8196 test ! -s conftest.err
8197 } && test -s conftest.$ac_objext; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008198 cat >conftest.$ac_ext <<_ACEOF
8199/* confdefs.h. */
8200_ACEOF
8201cat confdefs.h >>conftest.$ac_ext
8202cat >>conftest.$ac_ext <<_ACEOF
8203/* end confdefs.h. */
8204$ac_includes_default
8205int
8206main ()
8207{
8208if (sizeof ((ssize_t)))
8209 return 0;
8210 ;
8211 return 0;
8212}
8213_ACEOF
8214rm -f conftest.$ac_objext
8215if { (ac_try="$ac_compile"
8216case "(($ac_try" in
8217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8218 *) ac_try_echo=$ac_try;;
8219esac
8220eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8221$as_echo "$ac_try_echo") >&5
8222 (eval "$ac_compile") 2>conftest.er1
8223 ac_status=$?
8224 grep -v '^ *+' conftest.er1 >conftest.err
8225 rm -f conftest.er1
8226 cat conftest.err >&5
8227 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
8228 (exit $ac_status); } && {
8229 test -z "$ac_c_werror_flag" ||
8230 test ! -s conftest.err
8231 } && test -s conftest.$ac_objext; then
8232 :
Martin v. Löwis18e16552006-02-15 17:27:45 +00008233else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008234 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +00008235sed 's/^/| /' conftest.$ac_ext >&5
8236
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008237 ac_cv_type_ssize_t=yes
8238fi
8239
8240rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8241else
8242 $as_echo "$as_me: failed program was:" >&5
8243sed 's/^/| /' conftest.$ac_ext >&5
8244
8245
Martin v. Löwis18e16552006-02-15 17:27:45 +00008246fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008247
8248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +00008249fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008250{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5
8251$as_echo "$ac_cv_type_ssize_t" >&6; }
8252if test "x$ac_cv_type_ssize_t" = x""yes; then
Martin v. Löwis18e16552006-02-15 17:27:45 +00008253
8254cat >>confdefs.h <<\_ACEOF
8255#define HAVE_SSIZE_T 1
8256_ACEOF
8257
8258fi
8259
Jack Jansendd19cf82001-12-06 22:36:17 +00008260
Michael W. Hudson54241132001-12-07 15:38:26 +00008261# Sizes of various common basic types
Skip Montanarob9820a32004-01-17 00:16:12 +00008262# ANSI C requires sizeof(char) == 1, so no need to check it
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008263# The cast to long int works around a bug in the HP C Compiler
8264# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8265# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8266# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008267{ $as_echo "$as_me:$LINENO: checking size of int" >&5
8268$as_echo_n "checking size of int... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008269if test "${ac_cv_sizeof_int+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008270 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008271else
Martin v. Löwis11437992002-04-12 09:54:03 +00008272 if test "$cross_compiling" = yes; then
8273 # Depending upon the size, compute the lo and hi bounds.
8274cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008275/* confdefs.h. */
8276_ACEOF
8277cat confdefs.h >>conftest.$ac_ext
8278cat >>conftest.$ac_ext <<_ACEOF
8279/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008280$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008281int
8282main ()
8283{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008284static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008285test_array [0] = 0
8286
8287 ;
8288 return 0;
8289}
8290_ACEOF
8291rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008292if { (ac_try="$ac_compile"
8293case "(($ac_try" in
8294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8295 *) ac_try_echo=$ac_try;;
8296esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008297eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8298$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008299 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008300 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008301 grep -v '^ *+' conftest.er1 >conftest.err
8302 rm -f conftest.er1
8303 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008304 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008305 (exit $ac_status); } && {
8306 test -z "$ac_c_werror_flag" ||
8307 test ! -s conftest.err
8308 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008309 ac_lo=0 ac_mid=0
8310 while :; do
8311 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008312/* confdefs.h. */
8313_ACEOF
8314cat confdefs.h >>conftest.$ac_ext
8315cat >>conftest.$ac_ext <<_ACEOF
8316/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008317$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008318int
8319main ()
8320{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008321static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008322test_array [0] = 0
8323
8324 ;
8325 return 0;
8326}
8327_ACEOF
8328rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008329if { (ac_try="$ac_compile"
8330case "(($ac_try" in
8331 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8332 *) ac_try_echo=$ac_try;;
8333esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008334eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8335$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008336 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008337 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008338 grep -v '^ *+' conftest.er1 >conftest.err
8339 rm -f conftest.er1
8340 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008341 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008342 (exit $ac_status); } && {
8343 test -z "$ac_c_werror_flag" ||
8344 test ! -s conftest.err
8345 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008346 ac_hi=$ac_mid; break
8347else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008348 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008349sed 's/^/| /' conftest.$ac_ext >&5
8350
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008351 ac_lo=`expr $ac_mid + 1`
8352 if test $ac_lo -le $ac_mid; then
8353 ac_lo= ac_hi=
8354 break
8355 fi
8356 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008357fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008358
8359rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008360 done
8361else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008362 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008363sed 's/^/| /' conftest.$ac_ext >&5
8364
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008365 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008366/* confdefs.h. */
8367_ACEOF
8368cat confdefs.h >>conftest.$ac_ext
8369cat >>conftest.$ac_ext <<_ACEOF
8370/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008371$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008372int
8373main ()
8374{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008375static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008376test_array [0] = 0
8377
8378 ;
8379 return 0;
8380}
8381_ACEOF
8382rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008383if { (ac_try="$ac_compile"
8384case "(($ac_try" in
8385 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8386 *) ac_try_echo=$ac_try;;
8387esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008388eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8389$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008390 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008391 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008392 grep -v '^ *+' conftest.er1 >conftest.err
8393 rm -f conftest.er1
8394 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008395 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008396 (exit $ac_status); } && {
8397 test -z "$ac_c_werror_flag" ||
8398 test ! -s conftest.err
8399 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008400 ac_hi=-1 ac_mid=-1
8401 while :; do
8402 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008403/* confdefs.h. */
8404_ACEOF
8405cat confdefs.h >>conftest.$ac_ext
8406cat >>conftest.$ac_ext <<_ACEOF
8407/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008408$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008409int
8410main ()
8411{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008412static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008413test_array [0] = 0
8414
8415 ;
8416 return 0;
8417}
8418_ACEOF
8419rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008420if { (ac_try="$ac_compile"
8421case "(($ac_try" in
8422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8423 *) ac_try_echo=$ac_try;;
8424esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008425eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8426$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008427 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008428 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008429 grep -v '^ *+' conftest.er1 >conftest.err
8430 rm -f conftest.er1
8431 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008432 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008433 (exit $ac_status); } && {
8434 test -z "$ac_c_werror_flag" ||
8435 test ! -s conftest.err
8436 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008437 ac_lo=$ac_mid; break
8438else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008439 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008440sed 's/^/| /' conftest.$ac_ext >&5
8441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008442 ac_hi=`expr '(' $ac_mid ')' - 1`
8443 if test $ac_mid -le $ac_hi; then
8444 ac_lo= ac_hi=
8445 break
8446 fi
8447 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008448fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008449
8450rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008451 done
8452else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008453 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008454sed 's/^/| /' conftest.$ac_ext >&5
8455
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008456 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008457fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008458
8459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008460fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008461
8462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008463# Binary search between lo and hi bounds.
8464while test "x$ac_lo" != "x$ac_hi"; do
8465 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8466 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008467/* confdefs.h. */
8468_ACEOF
8469cat confdefs.h >>conftest.$ac_ext
8470cat >>conftest.$ac_ext <<_ACEOF
8471/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008472$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008473int
8474main ()
8475{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008476static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008477test_array [0] = 0
8478
8479 ;
8480 return 0;
8481}
8482_ACEOF
8483rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008484if { (ac_try="$ac_compile"
8485case "(($ac_try" in
8486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8487 *) ac_try_echo=$ac_try;;
8488esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008489eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8490$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008491 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008493 grep -v '^ *+' conftest.er1 >conftest.err
8494 rm -f conftest.er1
8495 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008496 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008497 (exit $ac_status); } && {
8498 test -z "$ac_c_werror_flag" ||
8499 test ! -s conftest.err
8500 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008501 ac_hi=$ac_mid
8502else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008503 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008504sed 's/^/| /' conftest.$ac_ext >&5
8505
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008506 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008507fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008508
8509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008510done
8511case $ac_lo in
8512?*) ac_cv_sizeof_int=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008513'') if test "$ac_cv_type_int" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008514 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8515$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8516{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008517See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008518$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008519See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008520 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008521 else
8522 ac_cv_sizeof_int=0
8523 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008524esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008525else
Martin v. Löwis11437992002-04-12 09:54:03 +00008526 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008527/* confdefs.h. */
8528_ACEOF
8529cat confdefs.h >>conftest.$ac_ext
8530cat >>conftest.$ac_ext <<_ACEOF
8531/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008532$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008533static long int longval () { return (long int) (sizeof (int)); }
8534static unsigned long int ulongval () { return (long int) (sizeof (int)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008535#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008536#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008537int
8538main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008539{
Martin v. Löwis11437992002-04-12 09:54:03 +00008540
8541 FILE *f = fopen ("conftest.val", "w");
8542 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008543 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008544 if (((long int) (sizeof (int))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008545 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008546 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008547 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008548 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008549 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008550 }
8551 else
8552 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008553 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008554 if (i != ((long int) (sizeof (int))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008555 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008556 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008557 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008558 /* Do not output a trailing newline, as this causes \r\n confusion
8559 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008560 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008561
8562 ;
8563 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008564}
Martin v. Löwis11437992002-04-12 09:54:03 +00008565_ACEOF
8566rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008567if { (ac_try="$ac_link"
8568case "(($ac_try" in
8569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8570 *) ac_try_echo=$ac_try;;
8571esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008572eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8573$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008574 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008575 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008576 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008577 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008578 { (case "(($ac_try" in
8579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8580 *) ac_try_echo=$ac_try;;
8581esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008582eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8583$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008584 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008585 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008586 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008587 (exit $ac_status); }; }; then
8588 ac_cv_sizeof_int=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008589else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008590 $as_echo "$as_me: program exited with status $ac_status" >&5
8591$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008592sed 's/^/| /' conftest.$ac_ext >&5
8593
Martin v. Löwis11437992002-04-12 09:54:03 +00008594( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008595if test "$ac_cv_type_int" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +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 (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008599See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008600$as_echo "$as_me: error: cannot compute sizeof (int)
Skip Montanaro6dead952003-09-25 14:50:04 +00008601See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008602 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008603 else
8604 ac_cv_sizeof_int=0
8605 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008606fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008607rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008608rm -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 +00008609fi
8610rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008611fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008612{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
8613$as_echo "$ac_cv_sizeof_int" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008614
8615
8616
Martin v. Löwis11437992002-04-12 09:54:03 +00008617cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008618#define SIZEOF_INT $ac_cv_sizeof_int
Martin v. Löwis11437992002-04-12 09:54:03 +00008619_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008620
8621
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008622# The cast to long int works around a bug in the HP C Compiler
8623# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8624# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8625# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008626{ $as_echo "$as_me:$LINENO: checking size of long" >&5
8627$as_echo_n "checking size of long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008628if test "${ac_cv_sizeof_long+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008629 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008630else
Martin v. Löwis11437992002-04-12 09:54:03 +00008631 if test "$cross_compiling" = yes; then
8632 # Depending upon the size, compute the lo and hi bounds.
8633cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008634/* confdefs.h. */
8635_ACEOF
8636cat confdefs.h >>conftest.$ac_ext
8637cat >>conftest.$ac_ext <<_ACEOF
8638/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008639$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008640int
8641main ()
8642{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008643static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008644test_array [0] = 0
8645
8646 ;
8647 return 0;
8648}
8649_ACEOF
8650rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008651if { (ac_try="$ac_compile"
8652case "(($ac_try" in
8653 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8654 *) ac_try_echo=$ac_try;;
8655esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008656eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8657$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008658 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008659 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008660 grep -v '^ *+' conftest.er1 >conftest.err
8661 rm -f conftest.er1
8662 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008663 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008664 (exit $ac_status); } && {
8665 test -z "$ac_c_werror_flag" ||
8666 test ! -s conftest.err
8667 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008668 ac_lo=0 ac_mid=0
8669 while :; do
8670 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008671/* confdefs.h. */
8672_ACEOF
8673cat confdefs.h >>conftest.$ac_ext
8674cat >>conftest.$ac_ext <<_ACEOF
8675/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008676$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008677int
8678main ()
8679{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008680static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008681test_array [0] = 0
8682
8683 ;
8684 return 0;
8685}
8686_ACEOF
8687rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008688if { (ac_try="$ac_compile"
8689case "(($ac_try" in
8690 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8691 *) ac_try_echo=$ac_try;;
8692esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008693eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8694$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008695 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008696 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008697 grep -v '^ *+' conftest.er1 >conftest.err
8698 rm -f conftest.er1
8699 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008700 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008701 (exit $ac_status); } && {
8702 test -z "$ac_c_werror_flag" ||
8703 test ! -s conftest.err
8704 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008705 ac_hi=$ac_mid; break
8706else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008707 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008708sed 's/^/| /' conftest.$ac_ext >&5
8709
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008710 ac_lo=`expr $ac_mid + 1`
8711 if test $ac_lo -le $ac_mid; then
8712 ac_lo= ac_hi=
8713 break
8714 fi
8715 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008716fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008717
8718rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008719 done
8720else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008721 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008722sed 's/^/| /' conftest.$ac_ext >&5
8723
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008724 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008725/* confdefs.h. */
8726_ACEOF
8727cat confdefs.h >>conftest.$ac_ext
8728cat >>conftest.$ac_ext <<_ACEOF
8729/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008730$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008731int
8732main ()
8733{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008734static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008735test_array [0] = 0
8736
8737 ;
8738 return 0;
8739}
8740_ACEOF
8741rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008742if { (ac_try="$ac_compile"
8743case "(($ac_try" in
8744 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8745 *) ac_try_echo=$ac_try;;
8746esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008747eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8748$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008749 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008750 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008751 grep -v '^ *+' conftest.er1 >conftest.err
8752 rm -f conftest.er1
8753 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008754 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008755 (exit $ac_status); } && {
8756 test -z "$ac_c_werror_flag" ||
8757 test ! -s conftest.err
8758 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008759 ac_hi=-1 ac_mid=-1
8760 while :; do
8761 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008762/* confdefs.h. */
8763_ACEOF
8764cat confdefs.h >>conftest.$ac_ext
8765cat >>conftest.$ac_ext <<_ACEOF
8766/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008767$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008768int
8769main ()
8770{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008771static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008772test_array [0] = 0
8773
8774 ;
8775 return 0;
8776}
8777_ACEOF
8778rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008779if { (ac_try="$ac_compile"
8780case "(($ac_try" in
8781 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8782 *) ac_try_echo=$ac_try;;
8783esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008784eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8785$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008786 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008787 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008788 grep -v '^ *+' conftest.er1 >conftest.err
8789 rm -f conftest.er1
8790 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008791 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008792 (exit $ac_status); } && {
8793 test -z "$ac_c_werror_flag" ||
8794 test ! -s conftest.err
8795 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008796 ac_lo=$ac_mid; break
8797else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008798 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008799sed 's/^/| /' conftest.$ac_ext >&5
8800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008801 ac_hi=`expr '(' $ac_mid ')' - 1`
8802 if test $ac_mid -le $ac_hi; then
8803 ac_lo= ac_hi=
8804 break
8805 fi
8806 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00008807fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008808
8809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008810 done
8811else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008812 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008813sed 's/^/| /' conftest.$ac_ext >&5
8814
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008815 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00008816fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008817
8818rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008819fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008820
8821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008822# Binary search between lo and hi bounds.
8823while test "x$ac_lo" != "x$ac_hi"; do
8824 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
8825 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008826/* confdefs.h. */
8827_ACEOF
8828cat confdefs.h >>conftest.$ac_ext
8829cat >>conftest.$ac_ext <<_ACEOF
8830/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008831$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008832int
8833main ()
8834{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008835static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00008836test_array [0] = 0
8837
8838 ;
8839 return 0;
8840}
8841_ACEOF
8842rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008843if { (ac_try="$ac_compile"
8844case "(($ac_try" in
8845 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8846 *) ac_try_echo=$ac_try;;
8847esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008848eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8849$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008850 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00008851 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00008852 grep -v '^ *+' conftest.er1 >conftest.err
8853 rm -f conftest.er1
8854 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008855 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008856 (exit $ac_status); } && {
8857 test -z "$ac_c_werror_flag" ||
8858 test ! -s conftest.err
8859 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00008860 ac_hi=$ac_mid
8861else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008862 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008863sed 's/^/| /' conftest.$ac_ext >&5
8864
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008865 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00008866fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008867
8868rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00008869done
8870case $ac_lo in
8871?*) ac_cv_sizeof_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008872'') if test "$ac_cv_type_long" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008873 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
8874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
8875{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008876See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008877$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008878See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008879 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008880 else
8881 ac_cv_sizeof_long=0
8882 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00008883esac
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008884else
Martin v. Löwis11437992002-04-12 09:54:03 +00008885 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008886/* confdefs.h. */
8887_ACEOF
8888cat confdefs.h >>conftest.$ac_ext
8889cat >>conftest.$ac_ext <<_ACEOF
8890/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008891$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008892static long int longval () { return (long int) (sizeof (long)); }
8893static unsigned long int ulongval () { return (long int) (sizeof (long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00008894#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008895#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00008896int
8897main ()
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008898{
Martin v. Löwis11437992002-04-12 09:54:03 +00008899
8900 FILE *f = fopen ("conftest.val", "w");
8901 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008902 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008903 if (((long int) (sizeof (long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00008904 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008905 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008906 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008907 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008908 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008909 }
8910 else
8911 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008912 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008913 if (i != ((long int) (sizeof (long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008914 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008915 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00008916 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008917 /* Do not output a trailing newline, as this causes \r\n confusion
8918 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008919 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00008920
8921 ;
8922 return 0;
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008923}
Martin v. Löwis11437992002-04-12 09:54:03 +00008924_ACEOF
8925rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008926if { (ac_try="$ac_link"
8927case "(($ac_try" in
8928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8929 *) ac_try_echo=$ac_try;;
8930esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008931eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8932$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008933 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008934 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008935 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008936 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008937 { (case "(($ac_try" in
8938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8939 *) ac_try_echo=$ac_try;;
8940esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008941eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
8942$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008943 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008944 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008945 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00008946 (exit $ac_status); }; }; then
8947 ac_cv_sizeof_long=`cat conftest.val`
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008948else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008949 $as_echo "$as_me: program exited with status $ac_status" >&5
8950$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00008951sed 's/^/| /' conftest.$ac_ext >&5
8952
Martin v. Löwis11437992002-04-12 09:54:03 +00008953( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008954if test "$ac_cv_type_long" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +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 (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008958See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008959$as_echo "$as_me: error: cannot compute sizeof (long)
Skip Montanaro6dead952003-09-25 14:50:04 +00008960See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008961 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008962 else
8963 ac_cv_sizeof_long=0
8964 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00008965fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008966rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008967rm -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 +00008968fi
8969rm -f conftest.val
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008970fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008971{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
8972$as_echo "$ac_cv_sizeof_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008973
8974
8975
Martin v. Löwis11437992002-04-12 09:54:03 +00008976cat >>confdefs.h <<_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008977#define SIZEOF_LONG $ac_cv_sizeof_long
Martin v. Löwis11437992002-04-12 09:54:03 +00008978_ACEOF
Guido van Rossumccaf3b61996-12-06 21:19:16 +00008979
8980
Thomas Wouters47b49bf2007-08-30 22:15:33 +00008981# The cast to long int works around a bug in the HP C Compiler
8982# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
8983# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
8984# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008985{ $as_echo "$as_me:$LINENO: checking size of void *" >&5
8986$as_echo_n "checking size of void *... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00008987if test "${ac_cv_sizeof_void_p+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00008988 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00008989else
Martin v. Löwis11437992002-04-12 09:54:03 +00008990 if test "$cross_compiling" = yes; then
8991 # Depending upon the size, compute the lo and hi bounds.
8992cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00008993/* confdefs.h. */
8994_ACEOF
8995cat confdefs.h >>conftest.$ac_ext
8996cat >>conftest.$ac_ext <<_ACEOF
8997/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00008998$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00008999int
9000main ()
9001{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009002static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009003test_array [0] = 0
9004
9005 ;
9006 return 0;
9007}
9008_ACEOF
9009rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009010if { (ac_try="$ac_compile"
9011case "(($ac_try" in
9012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9013 *) ac_try_echo=$ac_try;;
9014esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009015eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9016$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009017 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009018 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009019 grep -v '^ *+' conftest.er1 >conftest.err
9020 rm -f conftest.er1
9021 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009022 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009023 (exit $ac_status); } && {
9024 test -z "$ac_c_werror_flag" ||
9025 test ! -s conftest.err
9026 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009027 ac_lo=0 ac_mid=0
9028 while :; do
9029 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009030/* confdefs.h. */
9031_ACEOF
9032cat confdefs.h >>conftest.$ac_ext
9033cat >>conftest.$ac_ext <<_ACEOF
9034/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009035$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009036int
9037main ()
9038{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009039static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009040test_array [0] = 0
9041
9042 ;
9043 return 0;
9044}
9045_ACEOF
9046rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009047if { (ac_try="$ac_compile"
9048case "(($ac_try" in
9049 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9050 *) ac_try_echo=$ac_try;;
9051esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009052eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9053$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009054 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009055 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009056 grep -v '^ *+' conftest.er1 >conftest.err
9057 rm -f conftest.er1
9058 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009059 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009060 (exit $ac_status); } && {
9061 test -z "$ac_c_werror_flag" ||
9062 test ! -s conftest.err
9063 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009064 ac_hi=$ac_mid; break
9065else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009066 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009067sed 's/^/| /' conftest.$ac_ext >&5
9068
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009069 ac_lo=`expr $ac_mid + 1`
9070 if test $ac_lo -le $ac_mid; then
9071 ac_lo= ac_hi=
9072 break
9073 fi
9074 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009075fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009076
9077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009078 done
9079else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009080 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009081sed 's/^/| /' conftest.$ac_ext >&5
9082
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009083 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009084/* confdefs.h. */
9085_ACEOF
9086cat confdefs.h >>conftest.$ac_ext
9087cat >>conftest.$ac_ext <<_ACEOF
9088/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009089$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009090int
9091main ()
9092{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009093static int test_array [1 - 2 * !(((long int) (sizeof (void *))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009094test_array [0] = 0
9095
9096 ;
9097 return 0;
9098}
9099_ACEOF
9100rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009101if { (ac_try="$ac_compile"
9102case "(($ac_try" in
9103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9104 *) ac_try_echo=$ac_try;;
9105esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009106eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9107$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009108 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009109 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009110 grep -v '^ *+' conftest.er1 >conftest.err
9111 rm -f conftest.er1
9112 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009113 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009114 (exit $ac_status); } && {
9115 test -z "$ac_c_werror_flag" ||
9116 test ! -s conftest.err
9117 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009118 ac_hi=-1 ac_mid=-1
9119 while :; do
9120 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009121/* confdefs.h. */
9122_ACEOF
9123cat confdefs.h >>conftest.$ac_ext
9124cat >>conftest.$ac_ext <<_ACEOF
9125/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009126$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009127int
9128main ()
9129{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009130static int test_array [1 - 2 * !(((long int) (sizeof (void *))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009131test_array [0] = 0
9132
9133 ;
9134 return 0;
9135}
9136_ACEOF
9137rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009138if { (ac_try="$ac_compile"
9139case "(($ac_try" in
9140 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9141 *) ac_try_echo=$ac_try;;
9142esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009143eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9144$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009145 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009146 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009147 grep -v '^ *+' conftest.er1 >conftest.err
9148 rm -f conftest.er1
9149 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009150 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009151 (exit $ac_status); } && {
9152 test -z "$ac_c_werror_flag" ||
9153 test ! -s conftest.err
9154 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009155 ac_lo=$ac_mid; break
9156else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009157 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009158sed 's/^/| /' conftest.$ac_ext >&5
9159
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009160 ac_hi=`expr '(' $ac_mid ')' - 1`
9161 if test $ac_mid -le $ac_hi; then
9162 ac_lo= ac_hi=
9163 break
9164 fi
9165 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009166fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009167
9168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009169 done
9170else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009171 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009172sed 's/^/| /' conftest.$ac_ext >&5
9173
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009174 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009175fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009176
9177rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009178fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009179
9180rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009181# Binary search between lo and hi bounds.
9182while test "x$ac_lo" != "x$ac_hi"; do
9183 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9184 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009185/* confdefs.h. */
9186_ACEOF
9187cat confdefs.h >>conftest.$ac_ext
9188cat >>conftest.$ac_ext <<_ACEOF
9189/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009190$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009191int
9192main ()
9193{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009194static int test_array [1 - 2 * !(((long int) (sizeof (void *))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009195test_array [0] = 0
9196
9197 ;
9198 return 0;
9199}
9200_ACEOF
9201rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009202if { (ac_try="$ac_compile"
9203case "(($ac_try" in
9204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9205 *) ac_try_echo=$ac_try;;
9206esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009207eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9208$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009209 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009211 grep -v '^ *+' conftest.er1 >conftest.err
9212 rm -f conftest.er1
9213 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009214 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009215 (exit $ac_status); } && {
9216 test -z "$ac_c_werror_flag" ||
9217 test ! -s conftest.err
9218 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009219 ac_hi=$ac_mid
9220else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009221 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009222sed 's/^/| /' conftest.$ac_ext >&5
9223
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009224 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009225fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009226
9227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009228done
9229case $ac_lo in
9230?*) ac_cv_sizeof_void_p=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009231'') if test "$ac_cv_type_void_p" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009232 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9233$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9234{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009235See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009236$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009237See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009238 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009239 else
9240 ac_cv_sizeof_void_p=0
9241 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009242esac
Guido van Rossumad678af1998-10-02 14:42:15 +00009243else
Martin v. Löwis11437992002-04-12 09:54:03 +00009244 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009245/* confdefs.h. */
9246_ACEOF
9247cat confdefs.h >>conftest.$ac_ext
9248cat >>conftest.$ac_ext <<_ACEOF
9249/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009250$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009251static long int longval () { return (long int) (sizeof (void *)); }
9252static unsigned long int ulongval () { return (long int) (sizeof (void *)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009253#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009254#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009255int
9256main ()
Guido van Rossumad678af1998-10-02 14:42:15 +00009257{
Martin v. Löwis11437992002-04-12 09:54:03 +00009258
9259 FILE *f = fopen ("conftest.val", "w");
9260 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009261 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009262 if (((long int) (sizeof (void *))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009263 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009264 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009265 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009266 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009267 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009268 }
9269 else
9270 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009271 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009272 if (i != ((long int) (sizeof (void *))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009273 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009274 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009275 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009276 /* Do not output a trailing newline, as this causes \r\n confusion
9277 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009278 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009279
9280 ;
9281 return 0;
Guido van Rossumad678af1998-10-02 14:42:15 +00009282}
Martin v. Löwis11437992002-04-12 09:54:03 +00009283_ACEOF
9284rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009285if { (ac_try="$ac_link"
9286case "(($ac_try" in
9287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9288 *) ac_try_echo=$ac_try;;
9289esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009290eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9291$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009292 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009293 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009294 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009295 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009296 { (case "(($ac_try" in
9297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9298 *) ac_try_echo=$ac_try;;
9299esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009300eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9301$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009302 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009303 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009304 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009305 (exit $ac_status); }; }; then
9306 ac_cv_sizeof_void_p=`cat conftest.val`
Guido van Rossumad678af1998-10-02 14:42:15 +00009307else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009308 $as_echo "$as_me: program exited with status $ac_status" >&5
9309$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009310sed 's/^/| /' conftest.$ac_ext >&5
9311
Martin v. Löwis11437992002-04-12 09:54:03 +00009312( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009313if test "$ac_cv_type_void_p" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +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 (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009317See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009318$as_echo "$as_me: error: cannot compute sizeof (void *)
Skip Montanaro6dead952003-09-25 14:50:04 +00009319See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009320 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009321 else
9322 ac_cv_sizeof_void_p=0
9323 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009324fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009325rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009326rm -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 +00009327fi
9328rm -f conftest.val
Guido van Rossumad678af1998-10-02 14:42:15 +00009329fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009330{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_void_p" >&5
9331$as_echo "$ac_cv_sizeof_void_p" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009332
9333
9334
Martin v. Löwis11437992002-04-12 09:54:03 +00009335cat >>confdefs.h <<_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009336#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
Martin v. Löwis11437992002-04-12 09:54:03 +00009337_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +00009338
9339
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009340# The cast to long int works around a bug in the HP C Compiler
9341# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9342# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9343# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009344{ $as_echo "$as_me:$LINENO: checking size of short" >&5
9345$as_echo_n "checking size of short... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009346if test "${ac_cv_sizeof_short+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009347 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009348else
Martin v. Löwis11437992002-04-12 09:54:03 +00009349 if test "$cross_compiling" = yes; then
9350 # Depending upon the size, compute the lo and hi bounds.
9351cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009352/* confdefs.h. */
9353_ACEOF
9354cat confdefs.h >>conftest.$ac_ext
9355cat >>conftest.$ac_ext <<_ACEOF
9356/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009357$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009358int
9359main ()
9360{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009361static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009362test_array [0] = 0
9363
9364 ;
9365 return 0;
9366}
9367_ACEOF
9368rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009369if { (ac_try="$ac_compile"
9370case "(($ac_try" in
9371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9372 *) ac_try_echo=$ac_try;;
9373esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009374eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9375$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009376 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009377 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009378 grep -v '^ *+' conftest.er1 >conftest.err
9379 rm -f conftest.er1
9380 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009381 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009382 (exit $ac_status); } && {
9383 test -z "$ac_c_werror_flag" ||
9384 test ! -s conftest.err
9385 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009386 ac_lo=0 ac_mid=0
9387 while :; do
9388 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009389/* confdefs.h. */
9390_ACEOF
9391cat confdefs.h >>conftest.$ac_ext
9392cat >>conftest.$ac_ext <<_ACEOF
9393/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009394$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009395int
9396main ()
9397{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009398static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009399test_array [0] = 0
9400
9401 ;
9402 return 0;
9403}
9404_ACEOF
9405rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009406if { (ac_try="$ac_compile"
9407case "(($ac_try" in
9408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9409 *) ac_try_echo=$ac_try;;
9410esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009411eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9412$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009413 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009414 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009415 grep -v '^ *+' conftest.er1 >conftest.err
9416 rm -f conftest.er1
9417 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009418 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009419 (exit $ac_status); } && {
9420 test -z "$ac_c_werror_flag" ||
9421 test ! -s conftest.err
9422 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009423 ac_hi=$ac_mid; break
9424else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009425 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009426sed 's/^/| /' conftest.$ac_ext >&5
9427
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009428 ac_lo=`expr $ac_mid + 1`
9429 if test $ac_lo -le $ac_mid; then
9430 ac_lo= ac_hi=
9431 break
9432 fi
9433 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009435
9436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009437 done
9438else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009439 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009440sed 's/^/| /' conftest.$ac_ext >&5
9441
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009442 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009443/* confdefs.h. */
9444_ACEOF
9445cat confdefs.h >>conftest.$ac_ext
9446cat >>conftest.$ac_ext <<_ACEOF
9447/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009448$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009449int
9450main ()
9451{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009452static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009453test_array [0] = 0
9454
9455 ;
9456 return 0;
9457}
9458_ACEOF
9459rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009460if { (ac_try="$ac_compile"
9461case "(($ac_try" in
9462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9463 *) ac_try_echo=$ac_try;;
9464esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009465eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9466$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009467 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009468 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009469 grep -v '^ *+' conftest.er1 >conftest.err
9470 rm -f conftest.er1
9471 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009472 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009473 (exit $ac_status); } && {
9474 test -z "$ac_c_werror_flag" ||
9475 test ! -s conftest.err
9476 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009477 ac_hi=-1 ac_mid=-1
9478 while :; do
9479 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009480/* confdefs.h. */
9481_ACEOF
9482cat confdefs.h >>conftest.$ac_ext
9483cat >>conftest.$ac_ext <<_ACEOF
9484/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009485$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009486int
9487main ()
9488{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009489static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009490test_array [0] = 0
9491
9492 ;
9493 return 0;
9494}
9495_ACEOF
9496rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009497if { (ac_try="$ac_compile"
9498case "(($ac_try" in
9499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9500 *) ac_try_echo=$ac_try;;
9501esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009502eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9503$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009504 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009506 grep -v '^ *+' conftest.er1 >conftest.err
9507 rm -f conftest.er1
9508 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009509 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009510 (exit $ac_status); } && {
9511 test -z "$ac_c_werror_flag" ||
9512 test ! -s conftest.err
9513 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009514 ac_lo=$ac_mid; break
9515else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009516 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009517sed 's/^/| /' conftest.$ac_ext >&5
9518
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009519 ac_hi=`expr '(' $ac_mid ')' - 1`
9520 if test $ac_mid -le $ac_hi; then
9521 ac_lo= ac_hi=
9522 break
9523 fi
9524 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009525fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009526
9527rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009528 done
9529else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009530 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009531sed 's/^/| /' conftest.$ac_ext >&5
9532
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009533 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009534fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009535
9536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009537fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009538
9539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009540# Binary search between lo and hi bounds.
9541while test "x$ac_lo" != "x$ac_hi"; do
9542 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9543 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009544/* confdefs.h. */
9545_ACEOF
9546cat confdefs.h >>conftest.$ac_ext
9547cat >>conftest.$ac_ext <<_ACEOF
9548/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009549$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009550int
9551main ()
9552{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009553static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009554test_array [0] = 0
9555
9556 ;
9557 return 0;
9558}
9559_ACEOF
9560rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009561if { (ac_try="$ac_compile"
9562case "(($ac_try" in
9563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9564 *) ac_try_echo=$ac_try;;
9565esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009566eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9567$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009568 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009569 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009570 grep -v '^ *+' conftest.er1 >conftest.err
9571 rm -f conftest.er1
9572 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009573 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009574 (exit $ac_status); } && {
9575 test -z "$ac_c_werror_flag" ||
9576 test ! -s conftest.err
9577 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009578 ac_hi=$ac_mid
9579else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009580 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009581sed 's/^/| /' conftest.$ac_ext >&5
9582
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009583 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009584fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009585
9586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009587done
9588case $ac_lo in
9589?*) ac_cv_sizeof_short=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009590'') if test "$ac_cv_type_short" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009591 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9592$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9593{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009594See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009595$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009596See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009597 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009598 else
9599 ac_cv_sizeof_short=0
9600 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009601esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009602else
Martin v. Löwis11437992002-04-12 09:54:03 +00009603 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009604/* confdefs.h. */
9605_ACEOF
9606cat confdefs.h >>conftest.$ac_ext
9607cat >>conftest.$ac_ext <<_ACEOF
9608/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009609$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009610static long int longval () { return (long int) (sizeof (short)); }
9611static unsigned long int ulongval () { return (long int) (sizeof (short)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009612#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009613#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009614int
9615main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009616{
Martin v. Löwis11437992002-04-12 09:54:03 +00009617
9618 FILE *f = fopen ("conftest.val", "w");
9619 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009620 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009621 if (((long int) (sizeof (short))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009622 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009623 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009624 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009625 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009626 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009627 }
9628 else
9629 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009630 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009631 if (i != ((long int) (sizeof (short))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009632 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009633 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009634 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009635 /* Do not output a trailing newline, as this causes \r\n confusion
9636 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009637 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009638
9639 ;
9640 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +00009641}
Martin v. Löwis11437992002-04-12 09:54:03 +00009642_ACEOF
9643rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009644if { (ac_try="$ac_link"
9645case "(($ac_try" in
9646 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9647 *) ac_try_echo=$ac_try;;
9648esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009649eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9650$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009651 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009652 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009653 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009654 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009655 { (case "(($ac_try" in
9656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9657 *) ac_try_echo=$ac_try;;
9658esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009659eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9660$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009661 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009662 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009663 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +00009664 (exit $ac_status); }; }; then
9665 ac_cv_sizeof_short=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +00009666else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009667 $as_echo "$as_me: program exited with status $ac_status" >&5
9668$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009669sed 's/^/| /' conftest.$ac_ext >&5
9670
Martin v. Löwis11437992002-04-12 09:54:03 +00009671( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009672if test "$ac_cv_type_short" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +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 (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009676See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009677$as_echo "$as_me: error: cannot compute sizeof (short)
Skip Montanaro6dead952003-09-25 14:50:04 +00009678See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009679 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009680 else
9681 ac_cv_sizeof_short=0
9682 fi
Martin v. Löwis11437992002-04-12 09:54:03 +00009683fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009684rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009685rm -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 +00009686fi
9687rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +00009688fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009689{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
9690$as_echo "$ac_cv_sizeof_short" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009691
9692
9693
Martin v. Löwis11437992002-04-12 09:54:03 +00009694cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009695#define SIZEOF_SHORT $ac_cv_sizeof_short
Martin v. Löwis11437992002-04-12 09:54:03 +00009696_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +00009697
9698
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009699# The cast to long int works around a bug in the HP C Compiler
9700# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9701# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9702# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009703{ $as_echo "$as_me:$LINENO: checking size of float" >&5
9704$as_echo_n "checking size of float... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +00009705if test "${ac_cv_sizeof_float+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009706 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +00009707else
Martin v. Löwis11437992002-04-12 09:54:03 +00009708 if test "$cross_compiling" = yes; then
9709 # Depending upon the size, compute the lo and hi bounds.
9710cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009711/* confdefs.h. */
9712_ACEOF
9713cat confdefs.h >>conftest.$ac_ext
9714cat >>conftest.$ac_ext <<_ACEOF
9715/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009716$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009717int
9718main ()
9719{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009720static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009721test_array [0] = 0
9722
9723 ;
9724 return 0;
9725}
9726_ACEOF
9727rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009728if { (ac_try="$ac_compile"
9729case "(($ac_try" in
9730 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9731 *) ac_try_echo=$ac_try;;
9732esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009733eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9734$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009735 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009736 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009737 grep -v '^ *+' conftest.er1 >conftest.err
9738 rm -f conftest.er1
9739 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009740 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009741 (exit $ac_status); } && {
9742 test -z "$ac_c_werror_flag" ||
9743 test ! -s conftest.err
9744 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009745 ac_lo=0 ac_mid=0
9746 while :; do
9747 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009748/* confdefs.h. */
9749_ACEOF
9750cat confdefs.h >>conftest.$ac_ext
9751cat >>conftest.$ac_ext <<_ACEOF
9752/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009753$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009754int
9755main ()
9756{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009757static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009758test_array [0] = 0
9759
9760 ;
9761 return 0;
9762}
9763_ACEOF
9764rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009765if { (ac_try="$ac_compile"
9766case "(($ac_try" in
9767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9768 *) ac_try_echo=$ac_try;;
9769esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009770eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9771$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009772 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009773 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009774 grep -v '^ *+' conftest.er1 >conftest.err
9775 rm -f conftest.er1
9776 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009777 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009778 (exit $ac_status); } && {
9779 test -z "$ac_c_werror_flag" ||
9780 test ! -s conftest.err
9781 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009782 ac_hi=$ac_mid; break
9783else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009784 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009785sed 's/^/| /' conftest.$ac_ext >&5
9786
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009787 ac_lo=`expr $ac_mid + 1`
9788 if test $ac_lo -le $ac_mid; then
9789 ac_lo= ac_hi=
9790 break
9791 fi
9792 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009793fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009794
9795rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009796 done
9797else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009798 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009799sed 's/^/| /' conftest.$ac_ext >&5
9800
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009801 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009802/* confdefs.h. */
9803_ACEOF
9804cat confdefs.h >>conftest.$ac_ext
9805cat >>conftest.$ac_ext <<_ACEOF
9806/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009807$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009808int
9809main ()
9810{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009811static int test_array [1 - 2 * !(((long int) (sizeof (float))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009812test_array [0] = 0
9813
9814 ;
9815 return 0;
9816}
9817_ACEOF
9818rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009819if { (ac_try="$ac_compile"
9820case "(($ac_try" in
9821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9822 *) ac_try_echo=$ac_try;;
9823esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009824eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9825$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009826 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009827 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009828 grep -v '^ *+' conftest.er1 >conftest.err
9829 rm -f conftest.er1
9830 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009831 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009832 (exit $ac_status); } && {
9833 test -z "$ac_c_werror_flag" ||
9834 test ! -s conftest.err
9835 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009836 ac_hi=-1 ac_mid=-1
9837 while :; do
9838 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009839/* confdefs.h. */
9840_ACEOF
9841cat confdefs.h >>conftest.$ac_ext
9842cat >>conftest.$ac_ext <<_ACEOF
9843/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009844$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009845int
9846main ()
9847{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009848static int test_array [1 - 2 * !(((long int) (sizeof (float))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009849test_array [0] = 0
9850
9851 ;
9852 return 0;
9853}
9854_ACEOF
9855rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009856if { (ac_try="$ac_compile"
9857case "(($ac_try" in
9858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9859 *) ac_try_echo=$ac_try;;
9860esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009861eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9862$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009863 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009864 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009865 grep -v '^ *+' conftest.er1 >conftest.err
9866 rm -f conftest.er1
9867 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009868 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009869 (exit $ac_status); } && {
9870 test -z "$ac_c_werror_flag" ||
9871 test ! -s conftest.err
9872 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009873 ac_lo=$ac_mid; break
9874else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009875 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009876sed 's/^/| /' conftest.$ac_ext >&5
9877
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009878 ac_hi=`expr '(' $ac_mid ')' - 1`
9879 if test $ac_mid -le $ac_hi; then
9880 ac_lo= ac_hi=
9881 break
9882 fi
9883 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +00009884fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009885
9886rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009887 done
9888else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009889 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009890sed 's/^/| /' conftest.$ac_ext >&5
9891
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009892 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +00009893fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009894
9895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009896fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009897
9898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009899# Binary search between lo and hi bounds.
9900while test "x$ac_lo" != "x$ac_hi"; do
9901 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
9902 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009903/* confdefs.h. */
9904_ACEOF
9905cat confdefs.h >>conftest.$ac_ext
9906cat >>conftest.$ac_ext <<_ACEOF
9907/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009908$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +00009909int
9910main ()
9911{
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009912static int test_array [1 - 2 * !(((long int) (sizeof (float))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +00009913test_array [0] = 0
9914
9915 ;
9916 return 0;
9917}
9918_ACEOF
9919rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009920if { (ac_try="$ac_compile"
9921case "(($ac_try" in
9922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9923 *) ac_try_echo=$ac_try;;
9924esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009925eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
9926$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009927 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +00009928 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +00009929 grep -v '^ *+' conftest.er1 >conftest.err
9930 rm -f conftest.er1
9931 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009932 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009933 (exit $ac_status); } && {
9934 test -z "$ac_c_werror_flag" ||
9935 test ! -s conftest.err
9936 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +00009937 ac_hi=$ac_mid
9938else
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009939 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +00009940sed 's/^/| /' conftest.$ac_ext >&5
9941
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009942 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +00009943fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009944
9945rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +00009946done
9947case $ac_lo in
9948?*) ac_cv_sizeof_float=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009949'') if test "$ac_cv_type_float" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009950 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
9951$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9952{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009953See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009954$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +00009955See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009956 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009957 else
9958 ac_cv_sizeof_float=0
9959 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +00009960esac
Guido van Rossumef2255b2000-03-10 22:30:29 +00009961else
Martin v. Löwis11437992002-04-12 09:54:03 +00009962 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +00009963/* confdefs.h. */
9964_ACEOF
9965cat confdefs.h >>conftest.$ac_ext
9966cat >>conftest.$ac_ext <<_ACEOF
9967/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +00009968$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009969static long int longval () { return (long int) (sizeof (float)); }
9970static unsigned long int ulongval () { return (long int) (sizeof (float)); }
Michael W. Hudson54241132001-12-07 15:38:26 +00009971#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009972#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +00009973int
9974main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +00009975{
Martin v. Löwis11437992002-04-12 09:54:03 +00009976
9977 FILE *f = fopen ("conftest.val", "w");
9978 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009979 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009980 if (((long int) (sizeof (float))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +00009981 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009982 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009983 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009984 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009985 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009986 }
9987 else
9988 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009989 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009990 if (i != ((long int) (sizeof (float))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009991 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009992 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +00009993 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +00009994 /* Do not output a trailing newline, as this causes \r\n confusion
9995 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +00009996 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +00009997
9998 ;
9999 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010000}
Martin v. Löwis11437992002-04-12 09:54:03 +000010001_ACEOF
10002rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010003if { (ac_try="$ac_link"
10004case "(($ac_try" in
10005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10006 *) ac_try_echo=$ac_try;;
10007esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010008eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10009$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010010 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010011 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010012 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010013 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010014 { (case "(($ac_try" in
10015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10016 *) ac_try_echo=$ac_try;;
10017esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010018eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10019$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010020 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010021 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010022 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010023 (exit $ac_status); }; }; then
10024 ac_cv_sizeof_float=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010025else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010026 $as_echo "$as_me: program exited with status $ac_status" >&5
10027$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010028sed 's/^/| /' conftest.$ac_ext >&5
10029
Martin v. Löwis11437992002-04-12 09:54:03 +000010030( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010031if test "$ac_cv_type_float" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +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 (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010035See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010036$as_echo "$as_me: error: cannot compute sizeof (float)
Skip Montanaro6dead952003-09-25 14:50:04 +000010037See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010038 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010039 else
10040 ac_cv_sizeof_float=0
10041 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010042fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010043rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010044rm -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 +000010045fi
10046rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010047fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010048{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_float" >&5
10049$as_echo "$ac_cv_sizeof_float" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010050
10051
10052
Martin v. Löwis11437992002-04-12 09:54:03 +000010053cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010054#define SIZEOF_FLOAT $ac_cv_sizeof_float
Martin v. Löwis11437992002-04-12 09:54:03 +000010055_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010056
10057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010058# The cast to long int works around a bug in the HP C Compiler
10059# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10060# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10061# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010062{ $as_echo "$as_me:$LINENO: checking size of double" >&5
10063$as_echo_n "checking size of double... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010064if test "${ac_cv_sizeof_double+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010065 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010066else
Martin v. Löwis11437992002-04-12 09:54:03 +000010067 if test "$cross_compiling" = yes; then
10068 # Depending upon the size, compute the lo and hi bounds.
10069cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010070/* confdefs.h. */
10071_ACEOF
10072cat confdefs.h >>conftest.$ac_ext
10073cat >>conftest.$ac_ext <<_ACEOF
10074/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010075$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010076int
10077main ()
10078{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010079static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010080test_array [0] = 0
10081
10082 ;
10083 return 0;
10084}
10085_ACEOF
10086rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010087if { (ac_try="$ac_compile"
10088case "(($ac_try" in
10089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10090 *) ac_try_echo=$ac_try;;
10091esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010092eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10093$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010094 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010096 grep -v '^ *+' conftest.er1 >conftest.err
10097 rm -f conftest.er1
10098 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010099 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010100 (exit $ac_status); } && {
10101 test -z "$ac_c_werror_flag" ||
10102 test ! -s conftest.err
10103 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010104 ac_lo=0 ac_mid=0
10105 while :; do
10106 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010107/* confdefs.h. */
10108_ACEOF
10109cat confdefs.h >>conftest.$ac_ext
10110cat >>conftest.$ac_ext <<_ACEOF
10111/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010112$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010113int
10114main ()
10115{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010116static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010117test_array [0] = 0
10118
10119 ;
10120 return 0;
10121}
10122_ACEOF
10123rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010124if { (ac_try="$ac_compile"
10125case "(($ac_try" in
10126 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10127 *) ac_try_echo=$ac_try;;
10128esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010129eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10130$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010131 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010132 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010133 grep -v '^ *+' conftest.er1 >conftest.err
10134 rm -f conftest.er1
10135 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010136 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010137 (exit $ac_status); } && {
10138 test -z "$ac_c_werror_flag" ||
10139 test ! -s conftest.err
10140 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010141 ac_hi=$ac_mid; break
10142else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010143 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010144sed 's/^/| /' conftest.$ac_ext >&5
10145
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010146 ac_lo=`expr $ac_mid + 1`
10147 if test $ac_lo -le $ac_mid; then
10148 ac_lo= ac_hi=
10149 break
10150 fi
10151 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010152fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010153
10154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010155 done
10156else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010157 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010158sed 's/^/| /' conftest.$ac_ext >&5
10159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010160 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010161/* confdefs.h. */
10162_ACEOF
10163cat confdefs.h >>conftest.$ac_ext
10164cat >>conftest.$ac_ext <<_ACEOF
10165/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010166$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010167int
10168main ()
10169{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010170static int test_array [1 - 2 * !(((long int) (sizeof (double))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010171test_array [0] = 0
10172
10173 ;
10174 return 0;
10175}
10176_ACEOF
10177rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010178if { (ac_try="$ac_compile"
10179case "(($ac_try" in
10180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10181 *) ac_try_echo=$ac_try;;
10182esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010183eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10184$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010185 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010186 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010187 grep -v '^ *+' conftest.er1 >conftest.err
10188 rm -f conftest.er1
10189 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010190 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010191 (exit $ac_status); } && {
10192 test -z "$ac_c_werror_flag" ||
10193 test ! -s conftest.err
10194 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010195 ac_hi=-1 ac_mid=-1
10196 while :; do
10197 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010198/* confdefs.h. */
10199_ACEOF
10200cat confdefs.h >>conftest.$ac_ext
10201cat >>conftest.$ac_ext <<_ACEOF
10202/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010203$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010204int
10205main ()
10206{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010207static int test_array [1 - 2 * !(((long int) (sizeof (double))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010208test_array [0] = 0
10209
10210 ;
10211 return 0;
10212}
10213_ACEOF
10214rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010215if { (ac_try="$ac_compile"
10216case "(($ac_try" in
10217 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10218 *) ac_try_echo=$ac_try;;
10219esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010220eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10221$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010222 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010223 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010224 grep -v '^ *+' conftest.er1 >conftest.err
10225 rm -f conftest.er1
10226 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010227 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010228 (exit $ac_status); } && {
10229 test -z "$ac_c_werror_flag" ||
10230 test ! -s conftest.err
10231 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010232 ac_lo=$ac_mid; break
10233else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010234 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010235sed 's/^/| /' conftest.$ac_ext >&5
10236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010237 ac_hi=`expr '(' $ac_mid ')' - 1`
10238 if test $ac_mid -le $ac_hi; then
10239 ac_lo= ac_hi=
10240 break
10241 fi
10242 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010243fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010244
10245rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010246 done
10247else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010248 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010249sed 's/^/| /' conftest.$ac_ext >&5
10250
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010251 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010252fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010253
10254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010255fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010256
10257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010258# Binary search between lo and hi bounds.
10259while test "x$ac_lo" != "x$ac_hi"; do
10260 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010262/* confdefs.h. */
10263_ACEOF
10264cat confdefs.h >>conftest.$ac_ext
10265cat >>conftest.$ac_ext <<_ACEOF
10266/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010267$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010268int
10269main ()
10270{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010271static int test_array [1 - 2 * !(((long int) (sizeof (double))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010272test_array [0] = 0
10273
10274 ;
10275 return 0;
10276}
10277_ACEOF
10278rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010279if { (ac_try="$ac_compile"
10280case "(($ac_try" in
10281 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10282 *) ac_try_echo=$ac_try;;
10283esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010284eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10285$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010286 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010287 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010288 grep -v '^ *+' conftest.er1 >conftest.err
10289 rm -f conftest.er1
10290 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010291 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010292 (exit $ac_status); } && {
10293 test -z "$ac_c_werror_flag" ||
10294 test ! -s conftest.err
10295 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010296 ac_hi=$ac_mid
10297else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010298 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010299sed 's/^/| /' conftest.$ac_ext >&5
10300
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010301 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010302fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010303
10304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010305done
10306case $ac_lo in
10307?*) ac_cv_sizeof_double=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010308'') if test "$ac_cv_type_double" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010309 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10310$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10311{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010312See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010313$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010314See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010315 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010316 else
10317 ac_cv_sizeof_double=0
10318 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010319esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000010320else
Martin v. Löwis11437992002-04-12 09:54:03 +000010321 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010322/* confdefs.h. */
10323_ACEOF
10324cat confdefs.h >>conftest.$ac_ext
10325cat >>conftest.$ac_ext <<_ACEOF
10326/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010327$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010328static long int longval () { return (long int) (sizeof (double)); }
10329static unsigned long int ulongval () { return (long int) (sizeof (double)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010330#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010331#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010332int
10333main ()
Guido van Rossumef2255b2000-03-10 22:30:29 +000010334{
Martin v. Löwis11437992002-04-12 09:54:03 +000010335
10336 FILE *f = fopen ("conftest.val", "w");
10337 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010338 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010339 if (((long int) (sizeof (double))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010340 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010341 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010342 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010343 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010344 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010345 }
10346 else
10347 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010348 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010349 if (i != ((long int) (sizeof (double))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010350 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010351 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010352 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010353 /* Do not output a trailing newline, as this causes \r\n confusion
10354 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010355 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010356
10357 ;
10358 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000010359}
Martin v. Löwis11437992002-04-12 09:54:03 +000010360_ACEOF
10361rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010362if { (ac_try="$ac_link"
10363case "(($ac_try" in
10364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10365 *) ac_try_echo=$ac_try;;
10366esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010367eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10368$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010369 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010370 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010371 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010372 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010373 { (case "(($ac_try" in
10374 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10375 *) ac_try_echo=$ac_try;;
10376esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010377eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10378$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010379 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010380 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010381 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010382 (exit $ac_status); }; }; then
10383 ac_cv_sizeof_double=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000010384else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010385 $as_echo "$as_me: program exited with status $ac_status" >&5
10386$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010387sed 's/^/| /' conftest.$ac_ext >&5
10388
Martin v. Löwis11437992002-04-12 09:54:03 +000010389( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010390if test "$ac_cv_type_double" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +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 (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010394See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010395$as_echo "$as_me: error: cannot compute sizeof (double)
Skip Montanaro6dead952003-09-25 14:50:04 +000010396See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010397 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010398 else
10399 ac_cv_sizeof_double=0
10400 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010401fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010402rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010403rm -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 +000010404fi
10405rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000010406fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010407{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_double" >&5
10408$as_echo "$ac_cv_sizeof_double" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010409
10410
10411
Martin v. Löwis11437992002-04-12 09:54:03 +000010412cat >>confdefs.h <<_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010413#define SIZEOF_DOUBLE $ac_cv_sizeof_double
Martin v. Löwis11437992002-04-12 09:54:03 +000010414_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000010415
10416
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010417# The cast to long int works around a bug in the HP C Compiler
10418# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10419# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10420# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010421{ $as_echo "$as_me:$LINENO: checking size of fpos_t" >&5
10422$as_echo_n "checking size of fpos_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000010423if test "${ac_cv_sizeof_fpos_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010424 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000010425else
Martin v. Löwis11437992002-04-12 09:54:03 +000010426 if test "$cross_compiling" = yes; then
10427 # Depending upon the size, compute the lo and hi bounds.
10428cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010429/* confdefs.h. */
10430_ACEOF
10431cat confdefs.h >>conftest.$ac_ext
10432cat >>conftest.$ac_ext <<_ACEOF
10433/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010434$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010435int
10436main ()
10437{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010438static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010439test_array [0] = 0
10440
10441 ;
10442 return 0;
10443}
10444_ACEOF
10445rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010446if { (ac_try="$ac_compile"
10447case "(($ac_try" in
10448 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10449 *) ac_try_echo=$ac_try;;
10450esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010451eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10452$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010453 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010454 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010455 grep -v '^ *+' conftest.er1 >conftest.err
10456 rm -f conftest.er1
10457 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010458 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010459 (exit $ac_status); } && {
10460 test -z "$ac_c_werror_flag" ||
10461 test ! -s conftest.err
10462 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010463 ac_lo=0 ac_mid=0
10464 while :; do
10465 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010466/* confdefs.h. */
10467_ACEOF
10468cat confdefs.h >>conftest.$ac_ext
10469cat >>conftest.$ac_ext <<_ACEOF
10470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010471$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010472int
10473main ()
10474{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010475static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010476test_array [0] = 0
10477
10478 ;
10479 return 0;
10480}
10481_ACEOF
10482rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010483if { (ac_try="$ac_compile"
10484case "(($ac_try" in
10485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10486 *) ac_try_echo=$ac_try;;
10487esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010488eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10489$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010490 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010491 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010492 grep -v '^ *+' conftest.er1 >conftest.err
10493 rm -f conftest.er1
10494 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010495 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010496 (exit $ac_status); } && {
10497 test -z "$ac_c_werror_flag" ||
10498 test ! -s conftest.err
10499 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010500 ac_hi=$ac_mid; break
10501else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010502 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010503sed 's/^/| /' conftest.$ac_ext >&5
10504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010505 ac_lo=`expr $ac_mid + 1`
10506 if test $ac_lo -le $ac_mid; then
10507 ac_lo= ac_hi=
10508 break
10509 fi
10510 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010511fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010512
10513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010514 done
10515else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010516 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010517sed 's/^/| /' conftest.$ac_ext >&5
10518
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010519 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010520/* confdefs.h. */
10521_ACEOF
10522cat confdefs.h >>conftest.$ac_ext
10523cat >>conftest.$ac_ext <<_ACEOF
10524/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010525$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010526int
10527main ()
10528{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010529static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010530test_array [0] = 0
10531
10532 ;
10533 return 0;
10534}
10535_ACEOF
10536rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010537if { (ac_try="$ac_compile"
10538case "(($ac_try" in
10539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10540 *) ac_try_echo=$ac_try;;
10541esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010542eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10543$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010544 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010545 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010546 grep -v '^ *+' conftest.er1 >conftest.err
10547 rm -f conftest.er1
10548 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010549 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010550 (exit $ac_status); } && {
10551 test -z "$ac_c_werror_flag" ||
10552 test ! -s conftest.err
10553 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010554 ac_hi=-1 ac_mid=-1
10555 while :; do
10556 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010557/* confdefs.h. */
10558_ACEOF
10559cat confdefs.h >>conftest.$ac_ext
10560cat >>conftest.$ac_ext <<_ACEOF
10561/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010562$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010563int
10564main ()
10565{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010566static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010567test_array [0] = 0
10568
10569 ;
10570 return 0;
10571}
10572_ACEOF
10573rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010574if { (ac_try="$ac_compile"
10575case "(($ac_try" in
10576 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10577 *) ac_try_echo=$ac_try;;
10578esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010579eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10580$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010581 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010582 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010583 grep -v '^ *+' conftest.er1 >conftest.err
10584 rm -f conftest.er1
10585 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010586 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010587 (exit $ac_status); } && {
10588 test -z "$ac_c_werror_flag" ||
10589 test ! -s conftest.err
10590 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010591 ac_lo=$ac_mid; break
10592else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010593 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010594sed 's/^/| /' conftest.$ac_ext >&5
10595
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010596 ac_hi=`expr '(' $ac_mid ')' - 1`
10597 if test $ac_mid -le $ac_hi; then
10598 ac_lo= ac_hi=
10599 break
10600 fi
10601 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000010602fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010603
10604rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010605 done
10606else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010607 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010608sed 's/^/| /' conftest.$ac_ext >&5
10609
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010610 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000010611fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010612
10613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010614fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010615
10616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010617# Binary search between lo and hi bounds.
10618while test "x$ac_lo" != "x$ac_hi"; do
10619 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10620 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010621/* confdefs.h. */
10622_ACEOF
10623cat confdefs.h >>conftest.$ac_ext
10624cat >>conftest.$ac_ext <<_ACEOF
10625/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010626$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000010627int
10628main ()
10629{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010630static int test_array [1 - 2 * !(((long int) (sizeof (fpos_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000010631test_array [0] = 0
10632
10633 ;
10634 return 0;
10635}
10636_ACEOF
10637rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010638if { (ac_try="$ac_compile"
10639case "(($ac_try" in
10640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10641 *) ac_try_echo=$ac_try;;
10642esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010643eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10644$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010645 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000010646 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000010647 grep -v '^ *+' conftest.er1 >conftest.err
10648 rm -f conftest.er1
10649 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010650 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010651 (exit $ac_status); } && {
10652 test -z "$ac_c_werror_flag" ||
10653 test ! -s conftest.err
10654 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000010655 ac_hi=$ac_mid
10656else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010657 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010658sed 's/^/| /' conftest.$ac_ext >&5
10659
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010660 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000010661fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010662
10663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000010664done
10665case $ac_lo in
10666?*) ac_cv_sizeof_fpos_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010667'') if test "$ac_cv_type_fpos_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010668 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
10669$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10670{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010671See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010672$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010673See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010674 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010675 else
10676 ac_cv_sizeof_fpos_t=0
10677 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000010678esac
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010679else
Martin v. Löwis11437992002-04-12 09:54:03 +000010680 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000010681/* confdefs.h. */
10682_ACEOF
10683cat confdefs.h >>conftest.$ac_ext
10684cat >>conftest.$ac_ext <<_ACEOF
10685/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000010686$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010687static long int longval () { return (long int) (sizeof (fpos_t)); }
10688static unsigned long int ulongval () { return (long int) (sizeof (fpos_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000010689#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010690#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000010691int
10692main ()
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010693{
Martin v. Löwis11437992002-04-12 09:54:03 +000010694
10695 FILE *f = fopen ("conftest.val", "w");
10696 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010697 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010698 if (((long int) (sizeof (fpos_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000010699 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010700 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010701 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010702 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010703 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010704 }
10705 else
10706 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010707 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010708 if (i != ((long int) (sizeof (fpos_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010709 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010710 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000010711 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010712 /* Do not output a trailing newline, as this causes \r\n confusion
10713 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010714 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000010715
10716 ;
10717 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010718}
Martin v. Löwis11437992002-04-12 09:54:03 +000010719_ACEOF
10720rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010721if { (ac_try="$ac_link"
10722case "(($ac_try" in
10723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10724 *) ac_try_echo=$ac_try;;
10725esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010726eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10727$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010728 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010729 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010730 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010731 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010732 { (case "(($ac_try" in
10733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10734 *) ac_try_echo=$ac_try;;
10735esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010736eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10737$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010738 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010739 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010740 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000010741 (exit $ac_status); }; }; then
10742 ac_cv_sizeof_fpos_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010743else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010744 $as_echo "$as_me: program exited with status $ac_status" >&5
10745$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000010746sed 's/^/| /' conftest.$ac_ext >&5
10747
Martin v. Löwis11437992002-04-12 09:54:03 +000010748( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010749if test "$ac_cv_type_fpos_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +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 (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010753See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010754$as_echo "$as_me: error: cannot compute sizeof (fpos_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000010755See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010756 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010757 else
10758 ac_cv_sizeof_fpos_t=0
10759 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000010760fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010761rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010762rm -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 +000010763fi
10764rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010765fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010766{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_fpos_t" >&5
10767$as_echo "$ac_cv_sizeof_fpos_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010768
10769
10770
Martin v. Löwis11437992002-04-12 09:54:03 +000010771cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010772#define SIZEOF_FPOS_T $ac_cv_sizeof_fpos_t
Martin v. Löwis11437992002-04-12 09:54:03 +000010773_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000010774
Michael W. Hudson54241132001-12-07 15:38:26 +000010775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010776# The cast to long int works around a bug in the HP C Compiler
10777# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
10778# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
10779# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010780{ $as_echo "$as_me:$LINENO: checking size of size_t" >&5
10781$as_echo_n "checking size of size_t... " >&6; }
Martin v. Löwis18e16552006-02-15 17:27:45 +000010782if test "${ac_cv_sizeof_size_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010783 $as_echo_n "(cached) " >&6
Martin v. Löwis18e16552006-02-15 17:27:45 +000010784else
Martin v. Löwis18e16552006-02-15 17:27:45 +000010785 if test "$cross_compiling" = yes; then
10786 # Depending upon the size, compute the lo and hi bounds.
10787cat >conftest.$ac_ext <<_ACEOF
10788/* confdefs.h. */
10789_ACEOF
10790cat confdefs.h >>conftest.$ac_ext
10791cat >>conftest.$ac_ext <<_ACEOF
10792/* end confdefs.h. */
10793$ac_includes_default
10794int
10795main ()
10796{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010797static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010798test_array [0] = 0
10799
10800 ;
10801 return 0;
10802}
10803_ACEOF
10804rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010805if { (ac_try="$ac_compile"
10806case "(($ac_try" in
10807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10808 *) ac_try_echo=$ac_try;;
10809esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010810eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10811$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010812 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010813 ac_status=$?
10814 grep -v '^ *+' conftest.er1 >conftest.err
10815 rm -f conftest.er1
10816 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010817 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010818 (exit $ac_status); } && {
10819 test -z "$ac_c_werror_flag" ||
10820 test ! -s conftest.err
10821 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010822 ac_lo=0 ac_mid=0
10823 while :; do
10824 cat >conftest.$ac_ext <<_ACEOF
10825/* confdefs.h. */
10826_ACEOF
10827cat confdefs.h >>conftest.$ac_ext
10828cat >>conftest.$ac_ext <<_ACEOF
10829/* end confdefs.h. */
10830$ac_includes_default
10831int
10832main ()
10833{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010834static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010835test_array [0] = 0
10836
10837 ;
10838 return 0;
10839}
10840_ACEOF
10841rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010842if { (ac_try="$ac_compile"
10843case "(($ac_try" in
10844 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10845 *) ac_try_echo=$ac_try;;
10846esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010847eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10848$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010849 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010850 ac_status=$?
10851 grep -v '^ *+' conftest.er1 >conftest.err
10852 rm -f conftest.er1
10853 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010854 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010855 (exit $ac_status); } && {
10856 test -z "$ac_c_werror_flag" ||
10857 test ! -s conftest.err
10858 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010859 ac_hi=$ac_mid; break
10860else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010861 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010862sed 's/^/| /' conftest.$ac_ext >&5
10863
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010864 ac_lo=`expr $ac_mid + 1`
10865 if test $ac_lo -le $ac_mid; then
10866 ac_lo= ac_hi=
10867 break
10868 fi
10869 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010870fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010871
10872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010873 done
10874else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010875 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010876sed 's/^/| /' conftest.$ac_ext >&5
10877
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010878 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwis18e16552006-02-15 17:27:45 +000010879/* confdefs.h. */
10880_ACEOF
10881cat confdefs.h >>conftest.$ac_ext
10882cat >>conftest.$ac_ext <<_ACEOF
10883/* end confdefs.h. */
10884$ac_includes_default
10885int
10886main ()
10887{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010888static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) < 0)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010889test_array [0] = 0
10890
10891 ;
10892 return 0;
10893}
10894_ACEOF
10895rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010896if { (ac_try="$ac_compile"
10897case "(($ac_try" in
10898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10899 *) ac_try_echo=$ac_try;;
10900esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010901eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10902$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010903 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010904 ac_status=$?
10905 grep -v '^ *+' conftest.er1 >conftest.err
10906 rm -f conftest.er1
10907 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010908 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010909 (exit $ac_status); } && {
10910 test -z "$ac_c_werror_flag" ||
10911 test ! -s conftest.err
10912 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010913 ac_hi=-1 ac_mid=-1
10914 while :; do
10915 cat >conftest.$ac_ext <<_ACEOF
10916/* confdefs.h. */
10917_ACEOF
10918cat confdefs.h >>conftest.$ac_ext
10919cat >>conftest.$ac_ext <<_ACEOF
10920/* end confdefs.h. */
10921$ac_includes_default
10922int
10923main ()
10924{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010925static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) >= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010926test_array [0] = 0
10927
10928 ;
10929 return 0;
10930}
10931_ACEOF
10932rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010933if { (ac_try="$ac_compile"
10934case "(($ac_try" in
10935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10936 *) ac_try_echo=$ac_try;;
10937esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010938eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
10939$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010940 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000010941 ac_status=$?
10942 grep -v '^ *+' conftest.er1 >conftest.err
10943 rm -f conftest.er1
10944 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010945 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010946 (exit $ac_status); } && {
10947 test -z "$ac_c_werror_flag" ||
10948 test ! -s conftest.err
10949 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000010950 ac_lo=$ac_mid; break
10951else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010952 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010953sed 's/^/| /' conftest.$ac_ext >&5
10954
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010955 ac_hi=`expr '(' $ac_mid ')' - 1`
10956 if test $ac_mid -le $ac_hi; then
10957 ac_lo= ac_hi=
10958 break
10959 fi
10960 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis18e16552006-02-15 17:27:45 +000010961fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010962
10963rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010964 done
10965else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010966 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000010967sed 's/^/| /' conftest.$ac_ext >&5
10968
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010969 ac_lo= ac_hi=
Martin v. Löwis18e16552006-02-15 17:27:45 +000010970fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010971
10972rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010973fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010974
10975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000010976# Binary search between lo and hi bounds.
10977while test "x$ac_lo" != "x$ac_hi"; do
10978 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
10979 cat >conftest.$ac_ext <<_ACEOF
10980/* confdefs.h. */
10981_ACEOF
10982cat confdefs.h >>conftest.$ac_ext
10983cat >>conftest.$ac_ext <<_ACEOF
10984/* end confdefs.h. */
10985$ac_includes_default
10986int
10987main ()
10988{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000010989static int test_array [1 - 2 * !(((long int) (sizeof (size_t))) <= $ac_mid)];
Martin v. Löwis18e16552006-02-15 17:27:45 +000010990test_array [0] = 0
10991
10992 ;
10993 return 0;
10994}
10995_ACEOF
10996rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000010997if { (ac_try="$ac_compile"
10998case "(($ac_try" in
10999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11000 *) ac_try_echo=$ac_try;;
11001esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011002eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11003$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011004 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis18e16552006-02-15 17:27:45 +000011005 ac_status=$?
11006 grep -v '^ *+' conftest.er1 >conftest.err
11007 rm -f conftest.er1
11008 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011009 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011010 (exit $ac_status); } && {
11011 test -z "$ac_c_werror_flag" ||
11012 test ! -s conftest.err
11013 } && test -s conftest.$ac_objext; then
Martin v. Löwis18e16552006-02-15 17:27:45 +000011014 ac_hi=$ac_mid
11015else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011016 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011017sed 's/^/| /' conftest.$ac_ext >&5
11018
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011019 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis18e16552006-02-15 17:27:45 +000011020fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011021
11022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis18e16552006-02-15 17:27:45 +000011023done
11024case $ac_lo in
11025?*) ac_cv_sizeof_size_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011026'') if test "$ac_cv_type_size_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011027 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11028$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11029{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011030See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011031$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011032See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011033 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011034 else
11035 ac_cv_sizeof_size_t=0
11036 fi ;;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011037esac
11038else
Martin v. Löwis18e16552006-02-15 17:27:45 +000011039 cat >conftest.$ac_ext <<_ACEOF
11040/* confdefs.h. */
11041_ACEOF
11042cat confdefs.h >>conftest.$ac_ext
11043cat >>conftest.$ac_ext <<_ACEOF
11044/* end confdefs.h. */
11045$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011046static long int longval () { return (long int) (sizeof (size_t)); }
11047static unsigned long int ulongval () { return (long int) (sizeof (size_t)); }
Martin v. Löwis18e16552006-02-15 17:27:45 +000011048#include <stdio.h>
11049#include <stdlib.h>
11050int
11051main ()
11052{
11053
11054 FILE *f = fopen ("conftest.val", "w");
11055 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011056 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011057 if (((long int) (sizeof (size_t))) < 0)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011058 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011059 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011060 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011061 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011062 fprintf (f, "%ld", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000011063 }
11064 else
11065 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011066 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011067 if (i != ((long int) (sizeof (size_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011068 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011069 fprintf (f, "%lu", i);
Martin v. Löwis18e16552006-02-15 17:27:45 +000011070 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011071 /* Do not output a trailing newline, as this causes \r\n confusion
11072 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011073 return ferror (f) || fclose (f) != 0;
Martin v. Löwis18e16552006-02-15 17:27:45 +000011074
11075 ;
11076 return 0;
11077}
11078_ACEOF
11079rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011080if { (ac_try="$ac_link"
11081case "(($ac_try" in
11082 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11083 *) ac_try_echo=$ac_try;;
11084esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011085eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11086$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011087 (eval "$ac_link") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011088 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011089 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011090 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011091 { (case "(($ac_try" in
11092 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11093 *) ac_try_echo=$ac_try;;
11094esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011095eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11096$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011097 (eval "$ac_try") 2>&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011098 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011099 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011100 (exit $ac_status); }; }; then
11101 ac_cv_sizeof_size_t=`cat conftest.val`
11102else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011103 $as_echo "$as_me: program exited with status $ac_status" >&5
11104$as_echo "$as_me: failed program was:" >&5
Martin v. Löwis18e16552006-02-15 17:27:45 +000011105sed 's/^/| /' conftest.$ac_ext >&5
11106
11107( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011108if test "$ac_cv_type_size_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +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 (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011112See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011113$as_echo "$as_me: error: cannot compute sizeof (size_t)
Martin v. Löwis18e16552006-02-15 17:27:45 +000011114See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011115 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011116 else
11117 ac_cv_sizeof_size_t=0
11118 fi
Martin v. Löwis18e16552006-02-15 17:27:45 +000011119fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011120rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011121rm -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 +000011122fi
11123rm -f conftest.val
Martin v. Löwis18e16552006-02-15 17:27:45 +000011124fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011125{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5
11126$as_echo "$ac_cv_sizeof_size_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011127
11128
11129
Martin v. Löwis18e16552006-02-15 17:27:45 +000011130cat >>confdefs.h <<_ACEOF
11131#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
11132_ACEOF
11133
11134
Christian Heimes400adb02008-02-01 08:12:03 +000011135# The cast to long int works around a bug in the HP C Compiler
11136# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11137# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11138# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011139{ $as_echo "$as_me:$LINENO: checking size of pid_t" >&5
11140$as_echo_n "checking size of pid_t... " >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011141if test "${ac_cv_sizeof_pid_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011142 $as_echo_n "(cached) " >&6
Christian Heimes400adb02008-02-01 08:12:03 +000011143else
11144 if test "$cross_compiling" = yes; then
11145 # Depending upon the size, compute the lo and hi bounds.
11146cat >conftest.$ac_ext <<_ACEOF
11147/* confdefs.h. */
11148_ACEOF
11149cat confdefs.h >>conftest.$ac_ext
11150cat >>conftest.$ac_ext <<_ACEOF
11151/* end confdefs.h. */
11152$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011153int
11154main ()
11155{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011156static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000011157test_array [0] = 0
11158
11159 ;
11160 return 0;
11161}
11162_ACEOF
11163rm -f conftest.$ac_objext
11164if { (ac_try="$ac_compile"
11165case "(($ac_try" in
11166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11167 *) ac_try_echo=$ac_try;;
11168esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011169eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11170$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011171 (eval "$ac_compile") 2>conftest.er1
11172 ac_status=$?
11173 grep -v '^ *+' conftest.er1 >conftest.err
11174 rm -f conftest.er1
11175 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011176 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011177 (exit $ac_status); } && {
11178 test -z "$ac_c_werror_flag" ||
11179 test ! -s conftest.err
11180 } && test -s conftest.$ac_objext; then
11181 ac_lo=0 ac_mid=0
11182 while :; do
11183 cat >conftest.$ac_ext <<_ACEOF
11184/* confdefs.h. */
11185_ACEOF
11186cat confdefs.h >>conftest.$ac_ext
11187cat >>conftest.$ac_ext <<_ACEOF
11188/* end confdefs.h. */
11189$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011190int
11191main ()
11192{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011193static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011194test_array [0] = 0
11195
11196 ;
11197 return 0;
11198}
11199_ACEOF
11200rm -f conftest.$ac_objext
11201if { (ac_try="$ac_compile"
11202case "(($ac_try" in
11203 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11204 *) ac_try_echo=$ac_try;;
11205esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011206eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11207$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011208 (eval "$ac_compile") 2>conftest.er1
11209 ac_status=$?
11210 grep -v '^ *+' conftest.er1 >conftest.err
11211 rm -f conftest.er1
11212 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011213 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011214 (exit $ac_status); } && {
11215 test -z "$ac_c_werror_flag" ||
11216 test ! -s conftest.err
11217 } && test -s conftest.$ac_objext; then
11218 ac_hi=$ac_mid; break
11219else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011220 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011221sed 's/^/| /' conftest.$ac_ext >&5
11222
11223 ac_lo=`expr $ac_mid + 1`
11224 if test $ac_lo -le $ac_mid; then
11225 ac_lo= ac_hi=
11226 break
11227 fi
11228 ac_mid=`expr 2 '*' $ac_mid + 1`
11229fi
11230
11231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11232 done
11233else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011234 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011235sed 's/^/| /' conftest.$ac_ext >&5
11236
11237 cat >conftest.$ac_ext <<_ACEOF
11238/* confdefs.h. */
11239_ACEOF
11240cat confdefs.h >>conftest.$ac_ext
11241cat >>conftest.$ac_ext <<_ACEOF
11242/* end confdefs.h. */
11243$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011244int
11245main ()
11246{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011247static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) < 0)];
Christian Heimes400adb02008-02-01 08:12:03 +000011248test_array [0] = 0
11249
11250 ;
11251 return 0;
11252}
11253_ACEOF
11254rm -f conftest.$ac_objext
11255if { (ac_try="$ac_compile"
11256case "(($ac_try" in
11257 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11258 *) ac_try_echo=$ac_try;;
11259esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011260eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11261$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011262 (eval "$ac_compile") 2>conftest.er1
11263 ac_status=$?
11264 grep -v '^ *+' conftest.er1 >conftest.err
11265 rm -f conftest.er1
11266 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011267 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011268 (exit $ac_status); } && {
11269 test -z "$ac_c_werror_flag" ||
11270 test ! -s conftest.err
11271 } && test -s conftest.$ac_objext; then
11272 ac_hi=-1 ac_mid=-1
11273 while :; do
11274 cat >conftest.$ac_ext <<_ACEOF
11275/* confdefs.h. */
11276_ACEOF
11277cat confdefs.h >>conftest.$ac_ext
11278cat >>conftest.$ac_ext <<_ACEOF
11279/* end confdefs.h. */
11280$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011281int
11282main ()
11283{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011284static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) >= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011285test_array [0] = 0
11286
11287 ;
11288 return 0;
11289}
11290_ACEOF
11291rm -f conftest.$ac_objext
11292if { (ac_try="$ac_compile"
11293case "(($ac_try" in
11294 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11295 *) ac_try_echo=$ac_try;;
11296esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011297eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11298$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011299 (eval "$ac_compile") 2>conftest.er1
11300 ac_status=$?
11301 grep -v '^ *+' conftest.er1 >conftest.err
11302 rm -f conftest.er1
11303 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011304 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011305 (exit $ac_status); } && {
11306 test -z "$ac_c_werror_flag" ||
11307 test ! -s conftest.err
11308 } && test -s conftest.$ac_objext; then
11309 ac_lo=$ac_mid; break
11310else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011311 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011312sed 's/^/| /' conftest.$ac_ext >&5
11313
11314 ac_hi=`expr '(' $ac_mid ')' - 1`
11315 if test $ac_mid -le $ac_hi; then
11316 ac_lo= ac_hi=
11317 break
11318 fi
11319 ac_mid=`expr 2 '*' $ac_mid`
11320fi
11321
11322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11323 done
11324else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011325 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011326sed 's/^/| /' conftest.$ac_ext >&5
11327
11328 ac_lo= ac_hi=
11329fi
11330
11331rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11332fi
11333
11334rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11335# Binary search between lo and hi bounds.
11336while test "x$ac_lo" != "x$ac_hi"; do
11337 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11338 cat >conftest.$ac_ext <<_ACEOF
11339/* confdefs.h. */
11340_ACEOF
11341cat confdefs.h >>conftest.$ac_ext
11342cat >>conftest.$ac_ext <<_ACEOF
11343/* end confdefs.h. */
11344$ac_includes_default
Christian Heimes400adb02008-02-01 08:12:03 +000011345int
11346main ()
11347{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011348static int test_array [1 - 2 * !(((long int) (sizeof (pid_t))) <= $ac_mid)];
Christian Heimes400adb02008-02-01 08:12:03 +000011349test_array [0] = 0
11350
11351 ;
11352 return 0;
11353}
11354_ACEOF
11355rm -f conftest.$ac_objext
11356if { (ac_try="$ac_compile"
11357case "(($ac_try" in
11358 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11359 *) ac_try_echo=$ac_try;;
11360esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011361eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11362$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011363 (eval "$ac_compile") 2>conftest.er1
11364 ac_status=$?
11365 grep -v '^ *+' conftest.er1 >conftest.err
11366 rm -f conftest.er1
11367 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011368 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011369 (exit $ac_status); } && {
11370 test -z "$ac_c_werror_flag" ||
11371 test ! -s conftest.err
11372 } && test -s conftest.$ac_objext; then
11373 ac_hi=$ac_mid
11374else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011375 $as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011376sed 's/^/| /' conftest.$ac_ext >&5
11377
11378 ac_lo=`expr '(' $ac_mid ')' + 1`
11379fi
11380
11381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11382done
11383case $ac_lo in
11384?*) ac_cv_sizeof_pid_t=$ac_lo;;
11385'') if test "$ac_cv_type_pid_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011386 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11387$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11388{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011389See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011390$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011391See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011392 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011393 else
11394 ac_cv_sizeof_pid_t=0
11395 fi ;;
11396esac
11397else
11398 cat >conftest.$ac_ext <<_ACEOF
11399/* confdefs.h. */
11400_ACEOF
11401cat confdefs.h >>conftest.$ac_ext
11402cat >>conftest.$ac_ext <<_ACEOF
11403/* end confdefs.h. */
11404$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011405static long int longval () { return (long int) (sizeof (pid_t)); }
11406static unsigned long int ulongval () { return (long int) (sizeof (pid_t)); }
Christian Heimes400adb02008-02-01 08:12:03 +000011407#include <stdio.h>
11408#include <stdlib.h>
11409int
11410main ()
11411{
11412
11413 FILE *f = fopen ("conftest.val", "w");
11414 if (! f)
11415 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011416 if (((long int) (sizeof (pid_t))) < 0)
Christian Heimes400adb02008-02-01 08:12:03 +000011417 {
11418 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011419 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000011420 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011421 fprintf (f, "%ld", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011422 }
11423 else
11424 {
11425 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011426 if (i != ((long int) (sizeof (pid_t))))
Christian Heimes400adb02008-02-01 08:12:03 +000011427 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011428 fprintf (f, "%lu", i);
Christian Heimes400adb02008-02-01 08:12:03 +000011429 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011430 /* Do not output a trailing newline, as this causes \r\n confusion
11431 on some platforms. */
Christian Heimes400adb02008-02-01 08:12:03 +000011432 return ferror (f) || fclose (f) != 0;
11433
11434 ;
11435 return 0;
11436}
11437_ACEOF
11438rm -f conftest$ac_exeext
11439if { (ac_try="$ac_link"
11440case "(($ac_try" in
11441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11442 *) ac_try_echo=$ac_try;;
11443esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011444eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11445$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011446 (eval "$ac_link") 2>&5
11447 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011448 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011449 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11450 { (case "(($ac_try" in
11451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11452 *) ac_try_echo=$ac_try;;
11453esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011454eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11455$as_echo "$ac_try_echo") >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011456 (eval "$ac_try") 2>&5
11457 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011458 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011459 (exit $ac_status); }; }; then
11460 ac_cv_sizeof_pid_t=`cat conftest.val`
11461else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011462 $as_echo "$as_me: program exited with status $ac_status" >&5
11463$as_echo "$as_me: failed program was:" >&5
Christian Heimes400adb02008-02-01 08:12:03 +000011464sed 's/^/| /' conftest.$ac_ext >&5
11465
11466( exit $ac_status )
11467if test "$ac_cv_type_pid_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011468 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11470{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011471See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011472$as_echo "$as_me: error: cannot compute sizeof (pid_t)
Christian Heimes400adb02008-02-01 08:12:03 +000011473See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011474 { (exit 77); exit 77; }; }; }
Christian Heimes400adb02008-02-01 08:12:03 +000011475 else
11476 ac_cv_sizeof_pid_t=0
11477 fi
11478fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011479rm -rf conftest.dSYM
Christian Heimes400adb02008-02-01 08:12:03 +000011480rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11481fi
11482rm -f conftest.val
11483fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011484{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pid_t" >&5
11485$as_echo "$ac_cv_sizeof_pid_t" >&6; }
Christian Heimes400adb02008-02-01 08:12:03 +000011486
11487
11488
11489cat >>confdefs.h <<_ACEOF
11490#define SIZEOF_PID_T $ac_cv_sizeof_pid_t
11491_ACEOF
11492
11493
Michael W. Hudson54241132001-12-07 15:38:26 +000011494
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011495{ $as_echo "$as_me:$LINENO: checking for long long support" >&5
11496$as_echo_n "checking for long long support... " >&6; }
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011497have_long_long=no
Martin v. Löwis11437992002-04-12 09:54:03 +000011498cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011499/* confdefs.h. */
11500_ACEOF
11501cat confdefs.h >>conftest.$ac_ext
11502cat >>conftest.$ac_ext <<_ACEOF
11503/* end confdefs.h. */
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011504
Martin v. Löwis11437992002-04-12 09:54:03 +000011505int
11506main ()
11507{
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011508long long x; x = (long long)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011509 ;
11510 return 0;
11511}
11512_ACEOF
11513rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011514if { (ac_try="$ac_compile"
11515case "(($ac_try" in
11516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11517 *) ac_try_echo=$ac_try;;
11518esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011519eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11520$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011521 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011522 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011523 grep -v '^ *+' conftest.er1 >conftest.err
11524 rm -f conftest.er1
11525 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011526 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011527 (exit $ac_status); } && {
11528 test -z "$ac_c_werror_flag" ||
11529 test ! -s conftest.err
11530 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011531
11532
11533cat >>confdefs.h <<\_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011534#define HAVE_LONG_LONG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000011535_ACEOF
11536
Martin v. Löwisc45929e2002-04-06 10:10:49 +000011537 have_long_long=yes
11538
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011539else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011540 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011541sed 's/^/| /' conftest.$ac_ext >&5
11542
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011543
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011544fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011545
11546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011547{ $as_echo "$as_me:$LINENO: result: $have_long_long" >&5
11548$as_echo "$have_long_long" >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000011549if test "$have_long_long" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011550# The cast to long int works around a bug in the HP C Compiler
11551# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11552# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11553# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011554{ $as_echo "$as_me:$LINENO: checking size of long long" >&5
11555$as_echo_n "checking size of long long... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000011556if test "${ac_cv_sizeof_long_long+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011557 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000011558else
Martin v. Löwis11437992002-04-12 09:54:03 +000011559 if test "$cross_compiling" = yes; then
11560 # Depending upon the size, compute the lo and hi bounds.
11561cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011562/* confdefs.h. */
11563_ACEOF
11564cat confdefs.h >>conftest.$ac_ext
11565cat >>conftest.$ac_ext <<_ACEOF
11566/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011567$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011568int
11569main ()
11570{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011571static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011572test_array [0] = 0
11573
11574 ;
11575 return 0;
11576}
11577_ACEOF
11578rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011579if { (ac_try="$ac_compile"
11580case "(($ac_try" in
11581 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11582 *) ac_try_echo=$ac_try;;
11583esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011584eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11585$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011586 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011587 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011588 grep -v '^ *+' conftest.er1 >conftest.err
11589 rm -f conftest.er1
11590 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011591 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011592 (exit $ac_status); } && {
11593 test -z "$ac_c_werror_flag" ||
11594 test ! -s conftest.err
11595 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011596 ac_lo=0 ac_mid=0
11597 while :; do
11598 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011599/* confdefs.h. */
11600_ACEOF
11601cat confdefs.h >>conftest.$ac_ext
11602cat >>conftest.$ac_ext <<_ACEOF
11603/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011604$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011605int
11606main ()
11607{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011608static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011609test_array [0] = 0
11610
11611 ;
11612 return 0;
11613}
11614_ACEOF
11615rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011616if { (ac_try="$ac_compile"
11617case "(($ac_try" in
11618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11619 *) ac_try_echo=$ac_try;;
11620esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011621eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11622$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011623 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011624 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011625 grep -v '^ *+' conftest.er1 >conftest.err
11626 rm -f conftest.er1
11627 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011628 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011629 (exit $ac_status); } && {
11630 test -z "$ac_c_werror_flag" ||
11631 test ! -s conftest.err
11632 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011633 ac_hi=$ac_mid; break
11634else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011635 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011636sed 's/^/| /' conftest.$ac_ext >&5
11637
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011638 ac_lo=`expr $ac_mid + 1`
11639 if test $ac_lo -le $ac_mid; then
11640 ac_lo= ac_hi=
11641 break
11642 fi
11643 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011644fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011645
11646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011647 done
11648else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011649 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011650sed 's/^/| /' conftest.$ac_ext >&5
11651
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011652 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011653/* confdefs.h. */
11654_ACEOF
11655cat confdefs.h >>conftest.$ac_ext
11656cat >>conftest.$ac_ext <<_ACEOF
11657/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011658$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011659int
11660main ()
11661{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011662static int test_array [1 - 2 * !(((long int) (sizeof (long long))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011663test_array [0] = 0
11664
11665 ;
11666 return 0;
11667}
11668_ACEOF
11669rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011670if { (ac_try="$ac_compile"
11671case "(($ac_try" in
11672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11673 *) ac_try_echo=$ac_try;;
11674esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011675eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11676$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011677 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011678 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011679 grep -v '^ *+' conftest.er1 >conftest.err
11680 rm -f conftest.er1
11681 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011682 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011683 (exit $ac_status); } && {
11684 test -z "$ac_c_werror_flag" ||
11685 test ! -s conftest.err
11686 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011687 ac_hi=-1 ac_mid=-1
11688 while :; do
11689 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011690/* confdefs.h. */
11691_ACEOF
11692cat confdefs.h >>conftest.$ac_ext
11693cat >>conftest.$ac_ext <<_ACEOF
11694/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011695$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011696int
11697main ()
11698{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011699static int test_array [1 - 2 * !(((long int) (sizeof (long long))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011700test_array [0] = 0
11701
11702 ;
11703 return 0;
11704}
11705_ACEOF
11706rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011707if { (ac_try="$ac_compile"
11708case "(($ac_try" in
11709 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11710 *) ac_try_echo=$ac_try;;
11711esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011712eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11713$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011714 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011715 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011716 grep -v '^ *+' conftest.er1 >conftest.err
11717 rm -f conftest.er1
11718 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011719 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011720 (exit $ac_status); } && {
11721 test -z "$ac_c_werror_flag" ||
11722 test ! -s conftest.err
11723 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011724 ac_lo=$ac_mid; break
11725else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011726 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011727sed 's/^/| /' conftest.$ac_ext >&5
11728
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011729 ac_hi=`expr '(' $ac_mid ')' - 1`
11730 if test $ac_mid -le $ac_hi; then
11731 ac_lo= ac_hi=
11732 break
11733 fi
11734 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000011735fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011736
11737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011738 done
11739else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011740 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011741sed 's/^/| /' conftest.$ac_ext >&5
11742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011743 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000011744fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011745
11746rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011747fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011748
11749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011750# Binary search between lo and hi bounds.
11751while test "x$ac_lo" != "x$ac_hi"; do
11752 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
11753 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011754/* confdefs.h. */
11755_ACEOF
11756cat confdefs.h >>conftest.$ac_ext
11757cat >>conftest.$ac_ext <<_ACEOF
11758/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011759$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000011760int
11761main ()
11762{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011763static int test_array [1 - 2 * !(((long int) (sizeof (long long))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000011764test_array [0] = 0
11765
11766 ;
11767 return 0;
11768}
11769_ACEOF
11770rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011771if { (ac_try="$ac_compile"
11772case "(($ac_try" in
11773 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11774 *) ac_try_echo=$ac_try;;
11775esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011776eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11777$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011778 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000011779 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000011780 grep -v '^ *+' conftest.er1 >conftest.err
11781 rm -f conftest.er1
11782 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011783 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011784 (exit $ac_status); } && {
11785 test -z "$ac_c_werror_flag" ||
11786 test ! -s conftest.err
11787 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000011788 ac_hi=$ac_mid
11789else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011790 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011791sed 's/^/| /' conftest.$ac_ext >&5
11792
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011793 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000011794fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011795
11796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000011797done
11798case $ac_lo in
11799?*) ac_cv_sizeof_long_long=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011800'') if test "$ac_cv_type_long_long" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011801 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11802$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11803{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011804See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011805$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011806See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011807 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011808 else
11809 ac_cv_sizeof_long_long=0
11810 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000011811esac
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011812else
Martin v. Löwis11437992002-04-12 09:54:03 +000011813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000011814/* confdefs.h. */
11815_ACEOF
11816cat confdefs.h >>conftest.$ac_ext
11817cat >>conftest.$ac_ext <<_ACEOF
11818/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000011819$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011820static long int longval () { return (long int) (sizeof (long long)); }
11821static unsigned long int ulongval () { return (long int) (sizeof (long long)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000011822#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011823#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000011824int
11825main ()
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011826{
Martin v. Löwis11437992002-04-12 09:54:03 +000011827
11828 FILE *f = fopen ("conftest.val", "w");
11829 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011830 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011831 if (((long int) (sizeof (long long))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000011832 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011833 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011834 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011835 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011836 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011837 }
11838 else
11839 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011840 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011841 if (i != ((long int) (sizeof (long long))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011842 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011843 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000011844 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011845 /* Do not output a trailing newline, as this causes \r\n confusion
11846 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011847 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000011848
11849 ;
11850 return 0;
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011851}
Martin v. Löwis11437992002-04-12 09:54:03 +000011852_ACEOF
11853rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011854if { (ac_try="$ac_link"
11855case "(($ac_try" in
11856 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11857 *) ac_try_echo=$ac_try;;
11858esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011859eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11860$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011861 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011862 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011863 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011864 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011865 { (case "(($ac_try" in
11866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11867 *) ac_try_echo=$ac_try;;
11868esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011869eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11870$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011871 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011872 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011873 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000011874 (exit $ac_status); }; }; then
11875 ac_cv_sizeof_long_long=`cat conftest.val`
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011876else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011877 $as_echo "$as_me: program exited with status $ac_status" >&5
11878$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000011879sed 's/^/| /' conftest.$ac_ext >&5
11880
Martin v. Löwis11437992002-04-12 09:54:03 +000011881( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011882if test "$ac_cv_type_long_long" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011883 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
11884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11885{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011886See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011887$as_echo "$as_me: error: cannot compute sizeof (long long)
Skip Montanaro6dead952003-09-25 14:50:04 +000011888See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011889 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011890 else
11891 ac_cv_sizeof_long_long=0
11892 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000011893fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011894rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011895rm -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 +000011896fi
11897rm -f conftest.val
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011898fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011899{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5
11900$as_echo "$ac_cv_sizeof_long_long" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000011901
11902
11903
Martin v. Löwis11437992002-04-12 09:54:03 +000011904cat >>confdefs.h <<_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011905#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
Martin v. Löwis11437992002-04-12 09:54:03 +000011906_ACEOF
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011907
Michael W. Hudson54241132001-12-07 15:38:26 +000011908
Guido van Rossumec95c7b1998-08-04 17:59:56 +000011909fi
11910
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011911{ $as_echo "$as_me:$LINENO: checking for long double support" >&5
11912$as_echo_n "checking for long double support... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011913have_long_double=no
11914cat >conftest.$ac_ext <<_ACEOF
11915/* confdefs.h. */
11916_ACEOF
11917cat confdefs.h >>conftest.$ac_ext
11918cat >>conftest.$ac_ext <<_ACEOF
11919/* end confdefs.h. */
11920
11921int
11922main ()
11923{
11924long double x; x = (long double)0;
11925 ;
11926 return 0;
11927}
11928_ACEOF
11929rm -f conftest.$ac_objext
11930if { (ac_try="$ac_compile"
11931case "(($ac_try" in
11932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11933 *) ac_try_echo=$ac_try;;
11934esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011935eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
11936$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011937 (eval "$ac_compile") 2>conftest.er1
11938 ac_status=$?
11939 grep -v '^ *+' conftest.er1 >conftest.err
11940 rm -f conftest.er1
11941 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011942 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011943 (exit $ac_status); } && {
11944 test -z "$ac_c_werror_flag" ||
11945 test ! -s conftest.err
11946 } && test -s conftest.$ac_objext; then
11947
11948
11949cat >>confdefs.h <<\_ACEOF
11950#define HAVE_LONG_DOUBLE 1
11951_ACEOF
11952
11953 have_long_double=yes
11954
11955else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011956 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011957sed 's/^/| /' conftest.$ac_ext >&5
11958
11959
11960fi
11961
11962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011963{ $as_echo "$as_me:$LINENO: result: $have_long_double" >&5
11964$as_echo "$have_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011965if test "$have_long_double" = yes ; then
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011966# The cast to long int works around a bug in the HP C Compiler
11967# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11968# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11969# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011970{ $as_echo "$as_me:$LINENO: checking size of long double" >&5
11971$as_echo_n "checking size of long double... " >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011972if test "${ac_cv_sizeof_long_double+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011973 $as_echo_n "(cached) " >&6
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011974else
11975 if test "$cross_compiling" = yes; then
11976 # Depending upon the size, compute the lo and hi bounds.
11977cat >conftest.$ac_ext <<_ACEOF
11978/* confdefs.h. */
11979_ACEOF
11980cat confdefs.h >>conftest.$ac_ext
11981cat >>conftest.$ac_ext <<_ACEOF
11982/* end confdefs.h. */
11983$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011984int
11985main ()
11986{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000011987static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000011988test_array [0] = 0
11989
11990 ;
11991 return 0;
11992}
11993_ACEOF
11994rm -f conftest.$ac_objext
11995if { (ac_try="$ac_compile"
11996case "(($ac_try" in
11997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11998 *) ac_try_echo=$ac_try;;
11999esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012000eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12001$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012002 (eval "$ac_compile") 2>conftest.er1
12003 ac_status=$?
12004 grep -v '^ *+' conftest.er1 >conftest.err
12005 rm -f conftest.er1
12006 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012007 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012008 (exit $ac_status); } && {
12009 test -z "$ac_c_werror_flag" ||
12010 test ! -s conftest.err
12011 } && test -s conftest.$ac_objext; then
12012 ac_lo=0 ac_mid=0
12013 while :; do
12014 cat >conftest.$ac_ext <<_ACEOF
12015/* confdefs.h. */
12016_ACEOF
12017cat confdefs.h >>conftest.$ac_ext
12018cat >>conftest.$ac_ext <<_ACEOF
12019/* end confdefs.h. */
12020$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012021int
12022main ()
12023{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012024static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012025test_array [0] = 0
12026
12027 ;
12028 return 0;
12029}
12030_ACEOF
12031rm -f conftest.$ac_objext
12032if { (ac_try="$ac_compile"
12033case "(($ac_try" in
12034 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12035 *) ac_try_echo=$ac_try;;
12036esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012037eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12038$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012039 (eval "$ac_compile") 2>conftest.er1
12040 ac_status=$?
12041 grep -v '^ *+' conftest.er1 >conftest.err
12042 rm -f conftest.er1
12043 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012044 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012045 (exit $ac_status); } && {
12046 test -z "$ac_c_werror_flag" ||
12047 test ! -s conftest.err
12048 } && test -s conftest.$ac_objext; then
12049 ac_hi=$ac_mid; break
12050else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012051 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012052sed 's/^/| /' conftest.$ac_ext >&5
12053
12054 ac_lo=`expr $ac_mid + 1`
12055 if test $ac_lo -le $ac_mid; then
12056 ac_lo= ac_hi=
12057 break
12058 fi
12059 ac_mid=`expr 2 '*' $ac_mid + 1`
12060fi
12061
12062rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12063 done
12064else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012065 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012066sed 's/^/| /' conftest.$ac_ext >&5
12067
12068 cat >conftest.$ac_ext <<_ACEOF
12069/* confdefs.h. */
12070_ACEOF
12071cat confdefs.h >>conftest.$ac_ext
12072cat >>conftest.$ac_ext <<_ACEOF
12073/* end confdefs.h. */
12074$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012075int
12076main ()
12077{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012078static int test_array [1 - 2 * !(((long int) (sizeof (long double))) < 0)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012079test_array [0] = 0
12080
12081 ;
12082 return 0;
12083}
12084_ACEOF
12085rm -f conftest.$ac_objext
12086if { (ac_try="$ac_compile"
12087case "(($ac_try" in
12088 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12089 *) ac_try_echo=$ac_try;;
12090esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012091eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12092$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012093 (eval "$ac_compile") 2>conftest.er1
12094 ac_status=$?
12095 grep -v '^ *+' conftest.er1 >conftest.err
12096 rm -f conftest.er1
12097 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012098 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012099 (exit $ac_status); } && {
12100 test -z "$ac_c_werror_flag" ||
12101 test ! -s conftest.err
12102 } && test -s conftest.$ac_objext; then
12103 ac_hi=-1 ac_mid=-1
12104 while :; do
12105 cat >conftest.$ac_ext <<_ACEOF
12106/* confdefs.h. */
12107_ACEOF
12108cat confdefs.h >>conftest.$ac_ext
12109cat >>conftest.$ac_ext <<_ACEOF
12110/* end confdefs.h. */
12111$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012112int
12113main ()
12114{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012115static int test_array [1 - 2 * !(((long int) (sizeof (long double))) >= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012116test_array [0] = 0
12117
12118 ;
12119 return 0;
12120}
12121_ACEOF
12122rm -f conftest.$ac_objext
12123if { (ac_try="$ac_compile"
12124case "(($ac_try" in
12125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12126 *) ac_try_echo=$ac_try;;
12127esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012128eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12129$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012130 (eval "$ac_compile") 2>conftest.er1
12131 ac_status=$?
12132 grep -v '^ *+' conftest.er1 >conftest.err
12133 rm -f conftest.er1
12134 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012135 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012136 (exit $ac_status); } && {
12137 test -z "$ac_c_werror_flag" ||
12138 test ! -s conftest.err
12139 } && test -s conftest.$ac_objext; then
12140 ac_lo=$ac_mid; break
12141else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012142 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012143sed 's/^/| /' conftest.$ac_ext >&5
12144
12145 ac_hi=`expr '(' $ac_mid ')' - 1`
12146 if test $ac_mid -le $ac_hi; then
12147 ac_lo= ac_hi=
12148 break
12149 fi
12150 ac_mid=`expr 2 '*' $ac_mid`
12151fi
12152
12153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12154 done
12155else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012156 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012157sed 's/^/| /' conftest.$ac_ext >&5
12158
12159 ac_lo= ac_hi=
12160fi
12161
12162rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12163fi
12164
12165rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12166# Binary search between lo and hi bounds.
12167while test "x$ac_lo" != "x$ac_hi"; do
12168 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12169 cat >conftest.$ac_ext <<_ACEOF
12170/* confdefs.h. */
12171_ACEOF
12172cat confdefs.h >>conftest.$ac_ext
12173cat >>conftest.$ac_ext <<_ACEOF
12174/* end confdefs.h. */
12175$ac_includes_default
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012176int
12177main ()
12178{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012179static int test_array [1 - 2 * !(((long int) (sizeof (long double))) <= $ac_mid)];
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012180test_array [0] = 0
12181
12182 ;
12183 return 0;
12184}
12185_ACEOF
12186rm -f conftest.$ac_objext
12187if { (ac_try="$ac_compile"
12188case "(($ac_try" in
12189 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12190 *) ac_try_echo=$ac_try;;
12191esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012192eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12193$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012194 (eval "$ac_compile") 2>conftest.er1
12195 ac_status=$?
12196 grep -v '^ *+' conftest.er1 >conftest.err
12197 rm -f conftest.er1
12198 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012199 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012200 (exit $ac_status); } && {
12201 test -z "$ac_c_werror_flag" ||
12202 test ! -s conftest.err
12203 } && test -s conftest.$ac_objext; then
12204 ac_hi=$ac_mid
12205else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012206 $as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012207sed 's/^/| /' conftest.$ac_ext >&5
12208
12209 ac_lo=`expr '(' $ac_mid ')' + 1`
12210fi
12211
12212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12213done
12214case $ac_lo in
12215?*) ac_cv_sizeof_long_double=$ac_lo;;
12216'') if test "$ac_cv_type_long_double" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012217 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12218$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12219{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012220See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012221$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012222See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012223 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012224 else
12225 ac_cv_sizeof_long_double=0
12226 fi ;;
12227esac
12228else
12229 cat >conftest.$ac_ext <<_ACEOF
12230/* confdefs.h. */
12231_ACEOF
12232cat confdefs.h >>conftest.$ac_ext
12233cat >>conftest.$ac_ext <<_ACEOF
12234/* end confdefs.h. */
12235$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012236static long int longval () { return (long int) (sizeof (long double)); }
12237static unsigned long int ulongval () { return (long int) (sizeof (long double)); }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012238#include <stdio.h>
12239#include <stdlib.h>
12240int
12241main ()
12242{
12243
12244 FILE *f = fopen ("conftest.val", "w");
12245 if (! f)
12246 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012247 if (((long int) (sizeof (long double))) < 0)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012248 {
12249 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012250 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012251 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012252 fprintf (f, "%ld", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012253 }
12254 else
12255 {
12256 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012257 if (i != ((long int) (sizeof (long double))))
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012258 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012259 fprintf (f, "%lu", i);
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012260 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012261 /* Do not output a trailing newline, as this causes \r\n confusion
12262 on some platforms. */
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012263 return ferror (f) || fclose (f) != 0;
12264
12265 ;
12266 return 0;
12267}
12268_ACEOF
12269rm -f conftest$ac_exeext
12270if { (ac_try="$ac_link"
12271case "(($ac_try" in
12272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12273 *) ac_try_echo=$ac_try;;
12274esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012275eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12276$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012277 (eval "$ac_link") 2>&5
12278 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012279 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012280 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12281 { (case "(($ac_try" in
12282 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12283 *) ac_try_echo=$ac_try;;
12284esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012285eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12286$as_echo "$ac_try_echo") >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012287 (eval "$ac_try") 2>&5
12288 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012289 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012290 (exit $ac_status); }; }; then
12291 ac_cv_sizeof_long_double=`cat conftest.val`
12292else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012293 $as_echo "$as_me: program exited with status $ac_status" >&5
12294$as_echo "$as_me: failed program was:" >&5
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012295sed 's/^/| /' conftest.$ac_ext >&5
12296
12297( exit $ac_status )
12298if test "$ac_cv_type_long_double" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012299 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12300$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12301{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012302See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012303$as_echo "$as_me: error: cannot compute sizeof (long double)
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012304See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012305 { (exit 77); exit 77; }; }; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012306 else
12307 ac_cv_sizeof_long_double=0
12308 fi
12309fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012310rm -rf conftest.dSYM
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012311rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12312fi
12313rm -f conftest.val
12314fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012315{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_double" >&5
12316$as_echo "$ac_cv_sizeof_long_double" >&6; }
Travis E. Oliphant9b307842007-10-12 22:06:37 +000012317
12318
12319
12320cat >>confdefs.h <<_ACEOF
12321#define SIZEOF_LONG_DOUBLE $ac_cv_sizeof_long_double
12322_ACEOF
12323
12324
12325fi
12326
12327
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012328{ $as_echo "$as_me:$LINENO: checking for _Bool support" >&5
12329$as_echo_n "checking for _Bool support... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012330have_c99_bool=no
12331cat >conftest.$ac_ext <<_ACEOF
12332/* confdefs.h. */
12333_ACEOF
12334cat confdefs.h >>conftest.$ac_ext
12335cat >>conftest.$ac_ext <<_ACEOF
12336/* end confdefs.h. */
12337
12338int
12339main ()
12340{
12341_Bool x; x = (_Bool)0;
12342 ;
12343 return 0;
12344}
12345_ACEOF
12346rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012347if { (ac_try="$ac_compile"
12348case "(($ac_try" in
12349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12350 *) ac_try_echo=$ac_try;;
12351esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012352eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12353$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012354 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012355 ac_status=$?
12356 grep -v '^ *+' conftest.er1 >conftest.err
12357 rm -f conftest.er1
12358 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012359 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012360 (exit $ac_status); } && {
12361 test -z "$ac_c_werror_flag" ||
12362 test ! -s conftest.err
12363 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012364
12365
12366cat >>confdefs.h <<\_ACEOF
12367#define HAVE_C99_BOOL 1
12368_ACEOF
12369
12370 have_c99_bool=yes
12371
12372else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012373 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012374sed 's/^/| /' conftest.$ac_ext >&5
12375
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012376
Thomas Woutersb2137042007-02-01 18:02:27 +000012377fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012378
12379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012380{ $as_echo "$as_me:$LINENO: result: $have_c99_bool" >&5
12381$as_echo "$have_c99_bool" >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012382if test "$have_c99_bool" = yes ; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012383# The cast to long int works around a bug in the HP C Compiler
12384# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12385# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12386# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012387{ $as_echo "$as_me:$LINENO: checking size of _Bool" >&5
12388$as_echo_n "checking size of _Bool... " >&6; }
Thomas Woutersb2137042007-02-01 18:02:27 +000012389if test "${ac_cv_sizeof__Bool+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012390 $as_echo_n "(cached) " >&6
Thomas Woutersb2137042007-02-01 18:02:27 +000012391else
12392 if test "$cross_compiling" = yes; then
12393 # Depending upon the size, compute the lo and hi bounds.
12394cat >conftest.$ac_ext <<_ACEOF
12395/* confdefs.h. */
12396_ACEOF
12397cat confdefs.h >>conftest.$ac_ext
12398cat >>conftest.$ac_ext <<_ACEOF
12399/* end confdefs.h. */
12400$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012401int
12402main ()
12403{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012404static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012405test_array [0] = 0
12406
12407 ;
12408 return 0;
12409}
12410_ACEOF
12411rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012412if { (ac_try="$ac_compile"
12413case "(($ac_try" in
12414 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12415 *) ac_try_echo=$ac_try;;
12416esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012417eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12418$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012419 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012420 ac_status=$?
12421 grep -v '^ *+' conftest.er1 >conftest.err
12422 rm -f conftest.er1
12423 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012424 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012425 (exit $ac_status); } && {
12426 test -z "$ac_c_werror_flag" ||
12427 test ! -s conftest.err
12428 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012429 ac_lo=0 ac_mid=0
12430 while :; do
12431 cat >conftest.$ac_ext <<_ACEOF
12432/* confdefs.h. */
12433_ACEOF
12434cat confdefs.h >>conftest.$ac_ext
12435cat >>conftest.$ac_ext <<_ACEOF
12436/* end confdefs.h. */
12437$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012438int
12439main ()
12440{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012441static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012442test_array [0] = 0
12443
12444 ;
12445 return 0;
12446}
12447_ACEOF
12448rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012449if { (ac_try="$ac_compile"
12450case "(($ac_try" in
12451 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12452 *) ac_try_echo=$ac_try;;
12453esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012454eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12455$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012456 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012457 ac_status=$?
12458 grep -v '^ *+' conftest.er1 >conftest.err
12459 rm -f conftest.er1
12460 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012461 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012462 (exit $ac_status); } && {
12463 test -z "$ac_c_werror_flag" ||
12464 test ! -s conftest.err
12465 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012466 ac_hi=$ac_mid; break
12467else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012468 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012469sed 's/^/| /' conftest.$ac_ext >&5
12470
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012471 ac_lo=`expr $ac_mid + 1`
12472 if test $ac_lo -le $ac_mid; then
12473 ac_lo= ac_hi=
12474 break
12475 fi
12476 ac_mid=`expr 2 '*' $ac_mid + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012477fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012478
12479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012480 done
12481else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012482 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012483sed 's/^/| /' conftest.$ac_ext >&5
12484
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012485 cat >conftest.$ac_ext <<_ACEOF
Thomas Woutersb2137042007-02-01 18:02:27 +000012486/* confdefs.h. */
12487_ACEOF
12488cat confdefs.h >>conftest.$ac_ext
12489cat >>conftest.$ac_ext <<_ACEOF
12490/* end confdefs.h. */
12491$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012492int
12493main ()
12494{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012495static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) < 0)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012496test_array [0] = 0
12497
12498 ;
12499 return 0;
12500}
12501_ACEOF
12502rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012503if { (ac_try="$ac_compile"
12504case "(($ac_try" in
12505 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12506 *) ac_try_echo=$ac_try;;
12507esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012508eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12509$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012510 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012511 ac_status=$?
12512 grep -v '^ *+' conftest.er1 >conftest.err
12513 rm -f conftest.er1
12514 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012515 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012516 (exit $ac_status); } && {
12517 test -z "$ac_c_werror_flag" ||
12518 test ! -s conftest.err
12519 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012520 ac_hi=-1 ac_mid=-1
12521 while :; do
12522 cat >conftest.$ac_ext <<_ACEOF
12523/* confdefs.h. */
12524_ACEOF
12525cat confdefs.h >>conftest.$ac_ext
12526cat >>conftest.$ac_ext <<_ACEOF
12527/* end confdefs.h. */
12528$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012529int
12530main ()
12531{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012532static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) >= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012533test_array [0] = 0
12534
12535 ;
12536 return 0;
12537}
12538_ACEOF
12539rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012540if { (ac_try="$ac_compile"
12541case "(($ac_try" in
12542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12543 *) ac_try_echo=$ac_try;;
12544esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012545eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12546$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012547 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012548 ac_status=$?
12549 grep -v '^ *+' conftest.er1 >conftest.err
12550 rm -f conftest.er1
12551 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012552 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012553 (exit $ac_status); } && {
12554 test -z "$ac_c_werror_flag" ||
12555 test ! -s conftest.err
12556 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012557 ac_lo=$ac_mid; break
12558else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012559 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012560sed 's/^/| /' conftest.$ac_ext >&5
12561
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012562 ac_hi=`expr '(' $ac_mid ')' - 1`
12563 if test $ac_mid -le $ac_hi; then
12564 ac_lo= ac_hi=
12565 break
12566 fi
12567 ac_mid=`expr 2 '*' $ac_mid`
Thomas Woutersb2137042007-02-01 18:02:27 +000012568fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012569
12570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012571 done
12572else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012573 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012574sed 's/^/| /' conftest.$ac_ext >&5
12575
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012576 ac_lo= ac_hi=
Thomas Woutersb2137042007-02-01 18:02:27 +000012577fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012578
12579rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012580fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012581
12582rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012583# Binary search between lo and hi bounds.
12584while test "x$ac_lo" != "x$ac_hi"; do
12585 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
12586 cat >conftest.$ac_ext <<_ACEOF
12587/* confdefs.h. */
12588_ACEOF
12589cat confdefs.h >>conftest.$ac_ext
12590cat >>conftest.$ac_ext <<_ACEOF
12591/* end confdefs.h. */
12592$ac_includes_default
Thomas Woutersb2137042007-02-01 18:02:27 +000012593int
12594main ()
12595{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012596static int test_array [1 - 2 * !(((long int) (sizeof (_Bool))) <= $ac_mid)];
Thomas Woutersb2137042007-02-01 18:02:27 +000012597test_array [0] = 0
12598
12599 ;
12600 return 0;
12601}
12602_ACEOF
12603rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012604if { (ac_try="$ac_compile"
12605case "(($ac_try" in
12606 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12607 *) ac_try_echo=$ac_try;;
12608esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012609eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12610$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012611 (eval "$ac_compile") 2>conftest.er1
Thomas Woutersb2137042007-02-01 18:02:27 +000012612 ac_status=$?
12613 grep -v '^ *+' conftest.er1 >conftest.err
12614 rm -f conftest.er1
12615 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012616 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012617 (exit $ac_status); } && {
12618 test -z "$ac_c_werror_flag" ||
12619 test ! -s conftest.err
12620 } && test -s conftest.$ac_objext; then
Thomas Woutersb2137042007-02-01 18:02:27 +000012621 ac_hi=$ac_mid
12622else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012623 $as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012624sed 's/^/| /' conftest.$ac_ext >&5
12625
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012626 ac_lo=`expr '(' $ac_mid ')' + 1`
Thomas Woutersb2137042007-02-01 18:02:27 +000012627fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012628
12629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012630done
12631case $ac_lo in
12632?*) ac_cv_sizeof__Bool=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012633'') if test "$ac_cv_type__Bool" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012634 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12635$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12636{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012637See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012638$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012639See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012640 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012641 else
12642 ac_cv_sizeof__Bool=0
12643 fi ;;
Thomas Woutersb2137042007-02-01 18:02:27 +000012644esac
12645else
12646 cat >conftest.$ac_ext <<_ACEOF
12647/* confdefs.h. */
12648_ACEOF
12649cat confdefs.h >>conftest.$ac_ext
12650cat >>conftest.$ac_ext <<_ACEOF
12651/* end confdefs.h. */
12652$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012653static long int longval () { return (long int) (sizeof (_Bool)); }
12654static unsigned long int ulongval () { return (long int) (sizeof (_Bool)); }
Thomas Woutersb2137042007-02-01 18:02:27 +000012655#include <stdio.h>
12656#include <stdlib.h>
12657int
12658main ()
12659{
12660
12661 FILE *f = fopen ("conftest.val", "w");
12662 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012663 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012664 if (((long int) (sizeof (_Bool))) < 0)
Thomas Woutersb2137042007-02-01 18:02:27 +000012665 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012666 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012667 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012668 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012669 fprintf (f, "%ld", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012670 }
12671 else
12672 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012673 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012674 if (i != ((long int) (sizeof (_Bool))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012675 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012676 fprintf (f, "%lu", i);
Thomas Woutersb2137042007-02-01 18:02:27 +000012677 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012678 /* Do not output a trailing newline, as this causes \r\n confusion
12679 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012680 return ferror (f) || fclose (f) != 0;
Thomas Woutersb2137042007-02-01 18:02:27 +000012681
12682 ;
12683 return 0;
12684}
12685_ACEOF
12686rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012687if { (ac_try="$ac_link"
12688case "(($ac_try" in
12689 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12690 *) ac_try_echo=$ac_try;;
12691esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012692eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12693$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012694 (eval "$ac_link") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012695 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012696 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012697 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012698 { (case "(($ac_try" in
12699 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12700 *) ac_try_echo=$ac_try;;
12701esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012702eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12703$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012704 (eval "$ac_try") 2>&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012705 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012706 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012707 (exit $ac_status); }; }; then
12708 ac_cv_sizeof__Bool=`cat conftest.val`
12709else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012710 $as_echo "$as_me: program exited with status $ac_status" >&5
12711$as_echo "$as_me: failed program was:" >&5
Thomas Woutersb2137042007-02-01 18:02:27 +000012712sed 's/^/| /' conftest.$ac_ext >&5
12713
12714( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012715if test "$ac_cv_type__Bool" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012716 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
12717$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12718{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012719See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012720$as_echo "$as_me: error: cannot compute sizeof (_Bool)
Thomas Woutersb2137042007-02-01 18:02:27 +000012721See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012722 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012723 else
12724 ac_cv_sizeof__Bool=0
12725 fi
Thomas Woutersb2137042007-02-01 18:02:27 +000012726fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012727rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Thomas Woutersb2137042007-02-01 18:02:27 +000012729fi
12730rm -f conftest.val
12731fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012732{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof__Bool" >&5
12733$as_echo "$ac_cv_sizeof__Bool" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012734
12735
12736
Thomas Woutersb2137042007-02-01 18:02:27 +000012737cat >>confdefs.h <<_ACEOF
12738#define SIZEOF__BOOL $ac_cv_sizeof__Bool
12739_ACEOF
12740
12741
12742fi
12743
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012744{ $as_echo "$as_me:$LINENO: checking for uintptr_t" >&5
12745$as_echo_n "checking for uintptr_t... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000012746if test "${ac_cv_type_uintptr_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012747 $as_echo_n "(cached) " >&6
Thomas Wouters89f507f2006-12-13 04:49:30 +000012748else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012749 ac_cv_type_uintptr_t=no
12750cat >conftest.$ac_ext <<_ACEOF
12751/* confdefs.h. */
12752_ACEOF
12753cat confdefs.h >>conftest.$ac_ext
12754cat >>conftest.$ac_ext <<_ACEOF
12755/* end confdefs.h. */
12756#ifdef HAVE_STDINT_H
12757 #include <stdint.h>
12758 #endif
12759
12760int
12761main ()
12762{
12763if (sizeof (uintptr_t))
12764 return 0;
12765 ;
12766 return 0;
12767}
12768_ACEOF
12769rm -f conftest.$ac_objext
12770if { (ac_try="$ac_compile"
12771case "(($ac_try" in
12772 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12773 *) ac_try_echo=$ac_try;;
12774esac
12775eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12776$as_echo "$ac_try_echo") >&5
12777 (eval "$ac_compile") 2>conftest.er1
12778 ac_status=$?
12779 grep -v '^ *+' conftest.er1 >conftest.err
12780 rm -f conftest.er1
12781 cat conftest.err >&5
12782 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
12783 (exit $ac_status); } && {
12784 test -z "$ac_c_werror_flag" ||
12785 test ! -s conftest.err
12786 } && test -s conftest.$ac_objext; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012787 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012788/* confdefs.h. */
12789_ACEOF
12790cat confdefs.h >>conftest.$ac_ext
12791cat >>conftest.$ac_ext <<_ACEOF
12792/* end confdefs.h. */
Thomas Wouters89f507f2006-12-13 04:49:30 +000012793#ifdef HAVE_STDINT_H
12794 #include <stdint.h>
12795 #endif
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012796
Martin v. Löwis11437992002-04-12 09:54:03 +000012797int
12798main ()
12799{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012800if (sizeof ((uintptr_t)))
12801 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000012802 ;
12803 return 0;
12804}
12805_ACEOF
12806rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012807if { (ac_try="$ac_compile"
12808case "(($ac_try" in
12809 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12810 *) ac_try_echo=$ac_try;;
12811esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012812eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12813$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012814 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012815 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012816 grep -v '^ *+' conftest.er1 >conftest.err
12817 rm -f conftest.er1
12818 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012819 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012820 (exit $ac_status); } && {
12821 test -z "$ac_c_werror_flag" ||
12822 test ! -s conftest.err
12823 } && test -s conftest.$ac_objext; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012824 :
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012825else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012826 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012827sed 's/^/| /' conftest.$ac_ext >&5
12828
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012829 ac_cv_type_uintptr_t=yes
12830fi
12831
12832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12833else
12834 $as_echo "$as_me: failed program was:" >&5
12835sed 's/^/| /' conftest.$ac_ext >&5
12836
12837
Barry Warsawbc7c7f92000-08-18 04:53:33 +000012838fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012839
12840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Thomas Wouters89f507f2006-12-13 04:49:30 +000012841fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012842{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_uintptr_t" >&5
12843$as_echo "$ac_cv_type_uintptr_t" >&6; }
12844if test "x$ac_cv_type_uintptr_t" = x""yes; then
Thomas Wouters89f507f2006-12-13 04:49:30 +000012845
12846cat >>confdefs.h <<_ACEOF
12847#define HAVE_UINTPTR_T 1
12848_ACEOF
12849
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012850# The cast to long int works around a bug in the HP C Compiler
12851# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12852# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12853# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012854{ $as_echo "$as_me:$LINENO: checking size of uintptr_t" >&5
12855$as_echo_n "checking size of uintptr_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000012856if test "${ac_cv_sizeof_uintptr_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012857 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000012858else
Martin v. Löwis11437992002-04-12 09:54:03 +000012859 if test "$cross_compiling" = yes; then
12860 # Depending upon the size, compute the lo and hi bounds.
12861cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012862/* confdefs.h. */
12863_ACEOF
12864cat confdefs.h >>conftest.$ac_ext
12865cat >>conftest.$ac_ext <<_ACEOF
12866/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012867$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012868int
12869main ()
12870{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012871static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012872test_array [0] = 0
12873
12874 ;
12875 return 0;
12876}
12877_ACEOF
12878rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012879if { (ac_try="$ac_compile"
12880case "(($ac_try" in
12881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12882 *) ac_try_echo=$ac_try;;
12883esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012884eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12885$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012888 grep -v '^ *+' conftest.er1 >conftest.err
12889 rm -f conftest.er1
12890 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012891 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012892 (exit $ac_status); } && {
12893 test -z "$ac_c_werror_flag" ||
12894 test ! -s conftest.err
12895 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012896 ac_lo=0 ac_mid=0
12897 while :; do
12898 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012899/* confdefs.h. */
12900_ACEOF
12901cat confdefs.h >>conftest.$ac_ext
12902cat >>conftest.$ac_ext <<_ACEOF
12903/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012904$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012905int
12906main ()
12907{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012908static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012909test_array [0] = 0
12910
12911 ;
12912 return 0;
12913}
12914_ACEOF
12915rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012916if { (ac_try="$ac_compile"
12917case "(($ac_try" in
12918 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12919 *) ac_try_echo=$ac_try;;
12920esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012921eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12922$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012923 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012924 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012925 grep -v '^ *+' conftest.er1 >conftest.err
12926 rm -f conftest.er1
12927 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012928 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012929 (exit $ac_status); } && {
12930 test -z "$ac_c_werror_flag" ||
12931 test ! -s conftest.err
12932 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012933 ac_hi=$ac_mid; break
12934else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012935 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012936sed 's/^/| /' conftest.$ac_ext >&5
12937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012938 ac_lo=`expr $ac_mid + 1`
12939 if test $ac_lo -le $ac_mid; then
12940 ac_lo= ac_hi=
12941 break
12942 fi
12943 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000012944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012945
12946rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000012947 done
12948else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012949 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000012950sed 's/^/| /' conftest.$ac_ext >&5
12951
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012952 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012953/* confdefs.h. */
12954_ACEOF
12955cat confdefs.h >>conftest.$ac_ext
12956cat >>conftest.$ac_ext <<_ACEOF
12957/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012958$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012959int
12960main ()
12961{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012962static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000012963test_array [0] = 0
12964
12965 ;
12966 return 0;
12967}
12968_ACEOF
12969rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012970if { (ac_try="$ac_compile"
12971case "(($ac_try" in
12972 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12973 *) ac_try_echo=$ac_try;;
12974esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012975eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
12976$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012977 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000012978 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000012979 grep -v '^ *+' conftest.er1 >conftest.err
12980 rm -f conftest.er1
12981 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012982 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000012983 (exit $ac_status); } && {
12984 test -z "$ac_c_werror_flag" ||
12985 test ! -s conftest.err
12986 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000012987 ac_hi=-1 ac_mid=-1
12988 while :; do
12989 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000012990/* confdefs.h. */
12991_ACEOF
12992cat confdefs.h >>conftest.$ac_ext
12993cat >>conftest.$ac_ext <<_ACEOF
12994/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000012995$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000012996int
12997main ()
12998{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000012999static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000013000test_array [0] = 0
13001
13002 ;
13003 return 0;
13004}
13005_ACEOF
13006rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013007if { (ac_try="$ac_compile"
13008case "(($ac_try" in
13009 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13010 *) ac_try_echo=$ac_try;;
13011esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013012eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13013$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013014 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013015 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013016 grep -v '^ *+' conftest.er1 >conftest.err
13017 rm -f conftest.er1
13018 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013019 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013020 (exit $ac_status); } && {
13021 test -z "$ac_c_werror_flag" ||
13022 test ! -s conftest.err
13023 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013024 ac_lo=$ac_mid; break
13025else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013026 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013027sed 's/^/| /' conftest.$ac_ext >&5
13028
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013029 ac_hi=`expr '(' $ac_mid ')' - 1`
13030 if test $ac_mid -le $ac_hi; then
13031 ac_lo= ac_hi=
13032 break
13033 fi
13034 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000013035fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013036
13037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013038 done
13039else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013040 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013041sed 's/^/| /' conftest.$ac_ext >&5
13042
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013043 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000013044fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013045
13046rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013047fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013048
13049rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013050# Binary search between lo and hi bounds.
13051while test "x$ac_lo" != "x$ac_hi"; do
13052 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013054/* confdefs.h. */
13055_ACEOF
13056cat confdefs.h >>conftest.$ac_ext
13057cat >>conftest.$ac_ext <<_ACEOF
13058/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013059$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000013060int
13061main ()
13062{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013063static int test_array [1 - 2 * !(((long int) (sizeof (uintptr_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000013064test_array [0] = 0
13065
13066 ;
13067 return 0;
13068}
13069_ACEOF
13070rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013071if { (ac_try="$ac_compile"
13072case "(($ac_try" in
13073 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13074 *) ac_try_echo=$ac_try;;
13075esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013076eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13077$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013078 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000013079 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000013080 grep -v '^ *+' conftest.er1 >conftest.err
13081 rm -f conftest.er1
13082 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013083 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013084 (exit $ac_status); } && {
13085 test -z "$ac_c_werror_flag" ||
13086 test ! -s conftest.err
13087 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000013088 ac_hi=$ac_mid
13089else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013090 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013091sed 's/^/| /' conftest.$ac_ext >&5
13092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013093 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000013094fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013095
13096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000013097done
13098case $ac_lo in
13099?*) ac_cv_sizeof_uintptr_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013100'') if test "$ac_cv_type_uintptr_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013101 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13102$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13103{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013104See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013105$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013106See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013107 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013108 else
13109 ac_cv_sizeof_uintptr_t=0
13110 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000013111esac
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013112else
Martin v. Löwis11437992002-04-12 09:54:03 +000013113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000013114/* confdefs.h. */
13115_ACEOF
13116cat confdefs.h >>conftest.$ac_ext
13117cat >>conftest.$ac_ext <<_ACEOF
13118/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000013119$ac_includes_default
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013120static long int longval () { return (long int) (sizeof (uintptr_t)); }
13121static unsigned long int ulongval () { return (long int) (sizeof (uintptr_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000013122#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013123#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000013124int
13125main ()
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013126{
Martin v. Löwis11437992002-04-12 09:54:03 +000013127
13128 FILE *f = fopen ("conftest.val", "w");
13129 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013130 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013131 if (((long int) (sizeof (uintptr_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000013132 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013133 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013134 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013135 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013136 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013137 }
13138 else
13139 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013140 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013141 if (i != ((long int) (sizeof (uintptr_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013142 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013143 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000013144 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013145 /* Do not output a trailing newline, as this causes \r\n confusion
13146 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013147 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000013148
13149 ;
13150 return 0;
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013151}
Martin v. Löwis11437992002-04-12 09:54:03 +000013152_ACEOF
13153rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013154if { (ac_try="$ac_link"
13155case "(($ac_try" in
13156 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13157 *) ac_try_echo=$ac_try;;
13158esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013159eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13160$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013161 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013162 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013163 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013164 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013165 { (case "(($ac_try" in
13166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13167 *) ac_try_echo=$ac_try;;
13168esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013169eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13170$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013171 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013172 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013173 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013174 (exit $ac_status); }; }; then
13175 ac_cv_sizeof_uintptr_t=`cat conftest.val`
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013176else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013177 $as_echo "$as_me: program exited with status $ac_status" >&5
13178$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013179sed 's/^/| /' conftest.$ac_ext >&5
13180
Martin v. Löwis11437992002-04-12 09:54:03 +000013181( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013182if test "$ac_cv_type_uintptr_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013183 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13184$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13185{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013186See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013187$as_echo "$as_me: error: cannot compute sizeof (uintptr_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000013188See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013189 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013190 else
13191 ac_cv_sizeof_uintptr_t=0
13192 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000013193fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013194rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013195rm -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 +000013196fi
13197rm -f conftest.val
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013198fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013199{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_uintptr_t" >&5
13200$as_echo "$ac_cv_sizeof_uintptr_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013201
13202
13203
Martin v. Löwis11437992002-04-12 09:54:03 +000013204cat >>confdefs.h <<_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013205#define SIZEOF_UINTPTR_T $ac_cv_sizeof_uintptr_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013206_ACEOF
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013207
Michael W. Hudson54241132001-12-07 15:38:26 +000013208
Barry Warsawbc7c7f92000-08-18 04:53:33 +000013209fi
13210
Thomas Wouters89f507f2006-12-13 04:49:30 +000013211
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013212# The cast to long int works around a bug in the HP C Compiler
13213# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13214# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13215# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013216{ $as_echo "$as_me:$LINENO: checking size of off_t" >&5
13217$as_echo_n "checking size of off_t... " >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013218if test "${ac_cv_sizeof_off_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013219 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013220else
13221 if test "$cross_compiling" = yes; then
13222 # Depending upon the size, compute the lo and hi bounds.
13223cat >conftest.$ac_ext <<_ACEOF
13224/* confdefs.h. */
13225_ACEOF
13226cat confdefs.h >>conftest.$ac_ext
13227cat >>conftest.$ac_ext <<_ACEOF
13228/* end confdefs.h. */
13229
13230#ifdef HAVE_SYS_TYPES_H
13231#include <sys/types.h>
13232#endif
13233
13234
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013235int
13236main ()
13237{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013238static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013239test_array [0] = 0
13240
13241 ;
13242 return 0;
13243}
13244_ACEOF
13245rm -f conftest.$ac_objext
13246if { (ac_try="$ac_compile"
13247case "(($ac_try" in
13248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13249 *) ac_try_echo=$ac_try;;
13250esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013251eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13252$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013253 (eval "$ac_compile") 2>conftest.er1
13254 ac_status=$?
13255 grep -v '^ *+' conftest.er1 >conftest.err
13256 rm -f conftest.er1
13257 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013258 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013259 (exit $ac_status); } && {
13260 test -z "$ac_c_werror_flag" ||
13261 test ! -s conftest.err
13262 } && test -s conftest.$ac_objext; then
13263 ac_lo=0 ac_mid=0
13264 while :; do
13265 cat >conftest.$ac_ext <<_ACEOF
13266/* confdefs.h. */
13267_ACEOF
13268cat confdefs.h >>conftest.$ac_ext
13269cat >>conftest.$ac_ext <<_ACEOF
13270/* end confdefs.h. */
13271
13272#ifdef HAVE_SYS_TYPES_H
13273#include <sys/types.h>
13274#endif
13275
13276
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013277int
13278main ()
13279{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013280static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013281test_array [0] = 0
13282
13283 ;
13284 return 0;
13285}
13286_ACEOF
13287rm -f conftest.$ac_objext
13288if { (ac_try="$ac_compile"
13289case "(($ac_try" in
13290 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13291 *) ac_try_echo=$ac_try;;
13292esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013293eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13294$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013295 (eval "$ac_compile") 2>conftest.er1
13296 ac_status=$?
13297 grep -v '^ *+' conftest.er1 >conftest.err
13298 rm -f conftest.er1
13299 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013300 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013301 (exit $ac_status); } && {
13302 test -z "$ac_c_werror_flag" ||
13303 test ! -s conftest.err
13304 } && test -s conftest.$ac_objext; then
13305 ac_hi=$ac_mid; break
13306else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013307 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013308sed 's/^/| /' conftest.$ac_ext >&5
13309
13310 ac_lo=`expr $ac_mid + 1`
13311 if test $ac_lo -le $ac_mid; then
13312 ac_lo= ac_hi=
13313 break
13314 fi
13315 ac_mid=`expr 2 '*' $ac_mid + 1`
13316fi
13317
13318rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13319 done
13320else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013321 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013322sed 's/^/| /' conftest.$ac_ext >&5
13323
13324 cat >conftest.$ac_ext <<_ACEOF
13325/* confdefs.h. */
13326_ACEOF
13327cat confdefs.h >>conftest.$ac_ext
13328cat >>conftest.$ac_ext <<_ACEOF
13329/* end confdefs.h. */
13330
13331#ifdef HAVE_SYS_TYPES_H
13332#include <sys/types.h>
13333#endif
13334
13335
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013336int
13337main ()
13338{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013339static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013340test_array [0] = 0
13341
13342 ;
13343 return 0;
13344}
13345_ACEOF
13346rm -f conftest.$ac_objext
13347if { (ac_try="$ac_compile"
13348case "(($ac_try" in
13349 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13350 *) ac_try_echo=$ac_try;;
13351esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013352eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13353$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013354 (eval "$ac_compile") 2>conftest.er1
13355 ac_status=$?
13356 grep -v '^ *+' conftest.er1 >conftest.err
13357 rm -f conftest.er1
13358 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013359 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013360 (exit $ac_status); } && {
13361 test -z "$ac_c_werror_flag" ||
13362 test ! -s conftest.err
13363 } && test -s conftest.$ac_objext; then
13364 ac_hi=-1 ac_mid=-1
13365 while :; do
13366 cat >conftest.$ac_ext <<_ACEOF
13367/* confdefs.h. */
13368_ACEOF
13369cat confdefs.h >>conftest.$ac_ext
13370cat >>conftest.$ac_ext <<_ACEOF
13371/* end confdefs.h. */
13372
13373#ifdef HAVE_SYS_TYPES_H
13374#include <sys/types.h>
13375#endif
13376
13377
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013378int
13379main ()
13380{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013381static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013382test_array [0] = 0
13383
13384 ;
13385 return 0;
13386}
13387_ACEOF
13388rm -f conftest.$ac_objext
13389if { (ac_try="$ac_compile"
13390case "(($ac_try" in
13391 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13392 *) ac_try_echo=$ac_try;;
13393esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013394eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13395$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013396 (eval "$ac_compile") 2>conftest.er1
13397 ac_status=$?
13398 grep -v '^ *+' conftest.er1 >conftest.err
13399 rm -f conftest.er1
13400 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013401 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013402 (exit $ac_status); } && {
13403 test -z "$ac_c_werror_flag" ||
13404 test ! -s conftest.err
13405 } && test -s conftest.$ac_objext; then
13406 ac_lo=$ac_mid; break
13407else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013408 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013409sed 's/^/| /' conftest.$ac_ext >&5
13410
13411 ac_hi=`expr '(' $ac_mid ')' - 1`
13412 if test $ac_mid -le $ac_hi; then
13413 ac_lo= ac_hi=
13414 break
13415 fi
13416 ac_mid=`expr 2 '*' $ac_mid`
13417fi
13418
13419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13420 done
13421else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013422 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013423sed 's/^/| /' conftest.$ac_ext >&5
13424
13425 ac_lo= ac_hi=
13426fi
13427
13428rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13429fi
13430
13431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13432# Binary search between lo and hi bounds.
13433while test "x$ac_lo" != "x$ac_hi"; do
13434 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13435 cat >conftest.$ac_ext <<_ACEOF
13436/* confdefs.h. */
13437_ACEOF
13438cat confdefs.h >>conftest.$ac_ext
13439cat >>conftest.$ac_ext <<_ACEOF
13440/* end confdefs.h. */
13441
13442#ifdef HAVE_SYS_TYPES_H
13443#include <sys/types.h>
13444#endif
13445
13446
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013447int
13448main ()
13449{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013450static int test_array [1 - 2 * !(((long int) (sizeof (off_t))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013451test_array [0] = 0
13452
13453 ;
13454 return 0;
13455}
13456_ACEOF
13457rm -f conftest.$ac_objext
13458if { (ac_try="$ac_compile"
13459case "(($ac_try" in
13460 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13461 *) ac_try_echo=$ac_try;;
13462esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013463eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13464$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013465 (eval "$ac_compile") 2>conftest.er1
13466 ac_status=$?
13467 grep -v '^ *+' conftest.er1 >conftest.err
13468 rm -f conftest.er1
13469 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013470 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013471 (exit $ac_status); } && {
13472 test -z "$ac_c_werror_flag" ||
13473 test ! -s conftest.err
13474 } && test -s conftest.$ac_objext; then
13475 ac_hi=$ac_mid
13476else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013477 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013478sed 's/^/| /' conftest.$ac_ext >&5
13479
13480 ac_lo=`expr '(' $ac_mid ')' + 1`
13481fi
13482
13483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13484done
13485case $ac_lo in
13486?*) ac_cv_sizeof_off_t=$ac_lo;;
13487'') if test "$ac_cv_type_off_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013488 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13489$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13490{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013491See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013492$as_echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013493See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013494 { (exit 77); exit 77; }; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013495 else
13496 ac_cv_sizeof_off_t=0
13497 fi ;;
13498esac
13499else
13500 cat >conftest.$ac_ext <<_ACEOF
13501/* confdefs.h. */
13502_ACEOF
13503cat confdefs.h >>conftest.$ac_ext
13504cat >>conftest.$ac_ext <<_ACEOF
13505/* end confdefs.h. */
13506
13507#ifdef HAVE_SYS_TYPES_H
13508#include <sys/types.h>
13509#endif
13510
13511
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013512static long int longval () { return (long int) (sizeof (off_t)); }
13513static unsigned long int ulongval () { return (long int) (sizeof (off_t)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013514#include <stdio.h>
13515#include <stdlib.h>
13516int
13517main ()
13518{
13519
13520 FILE *f = fopen ("conftest.val", "w");
13521 if (! f)
13522 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013523 if (((long int) (sizeof (off_t))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013524 {
13525 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013526 if (i != ((long int) (sizeof (off_t))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013527 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013528 fprintf (f, "%ld", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013529 }
13530 else
13531 {
13532 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013533 if (i != ((long int) (sizeof (off_t))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013534 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013535 fprintf (f, "%lu", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013536 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013537 /* Do not output a trailing newline, as this causes \r\n confusion
13538 on some platforms. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013539 return ferror (f) || fclose (f) != 0;
13540
13541 ;
13542 return 0;
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013543}
Martin v. Löwis11437992002-04-12 09:54:03 +000013544_ACEOF
13545rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013546if { (ac_try="$ac_link"
13547case "(($ac_try" in
13548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13549 *) ac_try_echo=$ac_try;;
13550esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013551eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13552$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013553 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013554 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013555 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013556 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013557 { (case "(($ac_try" in
13558 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13559 *) ac_try_echo=$ac_try;;
13560esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013561eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13562$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013563 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013564 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013565 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013566 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013567 ac_cv_sizeof_off_t=`cat conftest.val`
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013568else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013569 $as_echo "$as_me: program exited with status $ac_status" >&5
13570$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013571sed 's/^/| /' conftest.$ac_ext >&5
13572
Martin v. Löwis11437992002-04-12 09:54:03 +000013573( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013574if test "$ac_cv_type_off_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013575 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13576$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13577{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013578See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013579$as_echo "$as_me: error: cannot compute sizeof (off_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013580See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013581 { (exit 77); exit 77; }; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013582 else
13583 ac_cv_sizeof_off_t=0
13584 fi
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013585fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013586rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013587rm -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 +000013588fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013589rm -f conftest.val
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013590fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013591{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5
13592$as_echo "$ac_cv_sizeof_off_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000013593
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013594
13595
Martin v. Löwis11437992002-04-12 09:54:03 +000013596cat >>confdefs.h <<_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013597#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
Martin v. Löwis11437992002-04-12 09:54:03 +000013598_ACEOF
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013599
Michael W. Hudson54241132001-12-07 15:38:26 +000013600
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013601
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013602{ $as_echo "$as_me:$LINENO: checking whether to enable large file support" >&5
13603$as_echo_n "checking whether to enable large file support... " >&6; }
Guido van Rossum96f2eb91999-04-10 16:02:18 +000013604if test "$have_long_long" = yes -a \
13605 "$ac_cv_sizeof_off_t" -gt "$ac_cv_sizeof_long" -a \
13606 "$ac_cv_sizeof_long_long" -ge "$ac_cv_sizeof_off_t"; then
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013607
Martin v. Löwis11437992002-04-12 09:54:03 +000013608cat >>confdefs.h <<\_ACEOF
13609#define HAVE_LARGEFILE_SUPPORT 1
13610_ACEOF
13611
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013612 { $as_echo "$as_me:$LINENO: result: yes" >&5
13613$as_echo "yes" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013614else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013615 { $as_echo "$as_me:$LINENO: result: no" >&5
13616$as_echo "no" >&6; }
Guido van Rossumf98e2a71999-01-06 18:53:34 +000013617fi
13618
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013619# The cast to long int works around a bug in the HP C Compiler
13620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13622# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013623{ $as_echo "$as_me:$LINENO: checking size of time_t" >&5
13624$as_echo_n "checking size of time_t... " >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013625if test "${ac_cv_sizeof_time_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013626 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013627else
13628 if test "$cross_compiling" = yes; then
13629 # Depending upon the size, compute the lo and hi bounds.
13630cat >conftest.$ac_ext <<_ACEOF
13631/* confdefs.h. */
13632_ACEOF
13633cat confdefs.h >>conftest.$ac_ext
13634cat >>conftest.$ac_ext <<_ACEOF
13635/* end confdefs.h. */
13636
13637#ifdef HAVE_SYS_TYPES_H
13638#include <sys/types.h>
13639#endif
13640#ifdef HAVE_TIME_H
13641#include <time.h>
13642#endif
13643
13644
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013645int
13646main ()
13647{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013648static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013649test_array [0] = 0
13650
13651 ;
13652 return 0;
13653}
13654_ACEOF
13655rm -f conftest.$ac_objext
13656if { (ac_try="$ac_compile"
13657case "(($ac_try" in
13658 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13659 *) ac_try_echo=$ac_try;;
13660esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013661eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13662$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013663 (eval "$ac_compile") 2>conftest.er1
13664 ac_status=$?
13665 grep -v '^ *+' conftest.er1 >conftest.err
13666 rm -f conftest.er1
13667 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013668 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013669 (exit $ac_status); } && {
13670 test -z "$ac_c_werror_flag" ||
13671 test ! -s conftest.err
13672 } && test -s conftest.$ac_objext; then
13673 ac_lo=0 ac_mid=0
13674 while :; do
13675 cat >conftest.$ac_ext <<_ACEOF
13676/* confdefs.h. */
13677_ACEOF
13678cat confdefs.h >>conftest.$ac_ext
13679cat >>conftest.$ac_ext <<_ACEOF
13680/* end confdefs.h. */
13681
13682#ifdef HAVE_SYS_TYPES_H
13683#include <sys/types.h>
13684#endif
13685#ifdef HAVE_TIME_H
13686#include <time.h>
13687#endif
13688
13689
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013690int
13691main ()
13692{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013693static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013694test_array [0] = 0
13695
13696 ;
13697 return 0;
13698}
13699_ACEOF
13700rm -f conftest.$ac_objext
13701if { (ac_try="$ac_compile"
13702case "(($ac_try" in
13703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13704 *) ac_try_echo=$ac_try;;
13705esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013706eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13707$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013708 (eval "$ac_compile") 2>conftest.er1
13709 ac_status=$?
13710 grep -v '^ *+' conftest.er1 >conftest.err
13711 rm -f conftest.er1
13712 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013713 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013714 (exit $ac_status); } && {
13715 test -z "$ac_c_werror_flag" ||
13716 test ! -s conftest.err
13717 } && test -s conftest.$ac_objext; then
13718 ac_hi=$ac_mid; break
13719else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013720 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013721sed 's/^/| /' conftest.$ac_ext >&5
13722
13723 ac_lo=`expr $ac_mid + 1`
13724 if test $ac_lo -le $ac_mid; then
13725 ac_lo= ac_hi=
13726 break
13727 fi
13728 ac_mid=`expr 2 '*' $ac_mid + 1`
13729fi
13730
13731rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13732 done
13733else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013734 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013735sed 's/^/| /' conftest.$ac_ext >&5
13736
13737 cat >conftest.$ac_ext <<_ACEOF
13738/* confdefs.h. */
13739_ACEOF
13740cat confdefs.h >>conftest.$ac_ext
13741cat >>conftest.$ac_ext <<_ACEOF
13742/* end confdefs.h. */
13743
13744#ifdef HAVE_SYS_TYPES_H
13745#include <sys/types.h>
13746#endif
13747#ifdef HAVE_TIME_H
13748#include <time.h>
13749#endif
13750
13751
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013752int
13753main ()
13754{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013755static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013756test_array [0] = 0
13757
13758 ;
13759 return 0;
13760}
13761_ACEOF
13762rm -f conftest.$ac_objext
13763if { (ac_try="$ac_compile"
13764case "(($ac_try" in
13765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13766 *) ac_try_echo=$ac_try;;
13767esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013768eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13769$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013770 (eval "$ac_compile") 2>conftest.er1
13771 ac_status=$?
13772 grep -v '^ *+' conftest.er1 >conftest.err
13773 rm -f conftest.er1
13774 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013775 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013776 (exit $ac_status); } && {
13777 test -z "$ac_c_werror_flag" ||
13778 test ! -s conftest.err
13779 } && test -s conftest.$ac_objext; then
13780 ac_hi=-1 ac_mid=-1
13781 while :; do
13782 cat >conftest.$ac_ext <<_ACEOF
13783/* confdefs.h. */
13784_ACEOF
13785cat confdefs.h >>conftest.$ac_ext
13786cat >>conftest.$ac_ext <<_ACEOF
13787/* end confdefs.h. */
13788
13789#ifdef HAVE_SYS_TYPES_H
13790#include <sys/types.h>
13791#endif
13792#ifdef HAVE_TIME_H
13793#include <time.h>
13794#endif
13795
13796
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013797int
13798main ()
13799{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013800static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013801test_array [0] = 0
13802
13803 ;
13804 return 0;
13805}
13806_ACEOF
13807rm -f conftest.$ac_objext
13808if { (ac_try="$ac_compile"
13809case "(($ac_try" in
13810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13811 *) ac_try_echo=$ac_try;;
13812esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013813eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13814$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013815 (eval "$ac_compile") 2>conftest.er1
13816 ac_status=$?
13817 grep -v '^ *+' conftest.er1 >conftest.err
13818 rm -f conftest.er1
13819 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013820 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013821 (exit $ac_status); } && {
13822 test -z "$ac_c_werror_flag" ||
13823 test ! -s conftest.err
13824 } && test -s conftest.$ac_objext; then
13825 ac_lo=$ac_mid; break
13826else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013827 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013828sed 's/^/| /' conftest.$ac_ext >&5
13829
13830 ac_hi=`expr '(' $ac_mid ')' - 1`
13831 if test $ac_mid -le $ac_hi; then
13832 ac_lo= ac_hi=
13833 break
13834 fi
13835 ac_mid=`expr 2 '*' $ac_mid`
13836fi
13837
13838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13839 done
13840else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013841 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013842sed 's/^/| /' conftest.$ac_ext >&5
13843
13844 ac_lo= ac_hi=
13845fi
13846
13847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13848fi
13849
13850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13851# Binary search between lo and hi bounds.
13852while test "x$ac_lo" != "x$ac_hi"; do
13853 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
13854 cat >conftest.$ac_ext <<_ACEOF
13855/* confdefs.h. */
13856_ACEOF
13857cat confdefs.h >>conftest.$ac_ext
13858cat >>conftest.$ac_ext <<_ACEOF
13859/* end confdefs.h. */
13860
13861#ifdef HAVE_SYS_TYPES_H
13862#include <sys/types.h>
13863#endif
13864#ifdef HAVE_TIME_H
13865#include <time.h>
13866#endif
13867
13868
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013869int
13870main ()
13871{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013872static int test_array [1 - 2 * !(((long int) (sizeof (time_t))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013873test_array [0] = 0
13874
13875 ;
13876 return 0;
13877}
13878_ACEOF
13879rm -f conftest.$ac_objext
13880if { (ac_try="$ac_compile"
13881case "(($ac_try" in
13882 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13883 *) ac_try_echo=$ac_try;;
13884esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013885eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13886$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013887 (eval "$ac_compile") 2>conftest.er1
13888 ac_status=$?
13889 grep -v '^ *+' conftest.er1 >conftest.err
13890 rm -f conftest.er1
13891 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013892 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013893 (exit $ac_status); } && {
13894 test -z "$ac_c_werror_flag" ||
13895 test ! -s conftest.err
13896 } && test -s conftest.$ac_objext; then
13897 ac_hi=$ac_mid
13898else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013899 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013900sed 's/^/| /' conftest.$ac_ext >&5
13901
13902 ac_lo=`expr '(' $ac_mid ')' + 1`
13903fi
13904
13905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13906done
13907case $ac_lo in
13908?*) ac_cv_sizeof_time_t=$ac_lo;;
13909'') if test "$ac_cv_type_time_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013910 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
13911$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13912{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013913See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013914$as_echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013915See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013916 { (exit 77); exit 77; }; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013917 else
13918 ac_cv_sizeof_time_t=0
13919 fi ;;
13920esac
13921else
13922 cat >conftest.$ac_ext <<_ACEOF
13923/* confdefs.h. */
13924_ACEOF
13925cat confdefs.h >>conftest.$ac_ext
13926cat >>conftest.$ac_ext <<_ACEOF
13927/* end confdefs.h. */
13928
13929#ifdef HAVE_SYS_TYPES_H
13930#include <sys/types.h>
13931#endif
13932#ifdef HAVE_TIME_H
13933#include <time.h>
13934#endif
13935
13936
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013937static long int longval () { return (long int) (sizeof (time_t)); }
13938static unsigned long int ulongval () { return (long int) (sizeof (time_t)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013939#include <stdio.h>
13940#include <stdlib.h>
13941int
13942main ()
13943{
13944
13945 FILE *f = fopen ("conftest.val", "w");
13946 if (! f)
13947 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013948 if (((long int) (sizeof (time_t))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013949 {
13950 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013951 if (i != ((long int) (sizeof (time_t))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013952 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013953 fprintf (f, "%ld", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013954 }
13955 else
13956 {
13957 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013958 if (i != ((long int) (sizeof (time_t))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013959 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013960 fprintf (f, "%lu", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013961 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013962 /* Do not output a trailing newline, as this causes \r\n confusion
13963 on some platforms. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013964 return ferror (f) || fclose (f) != 0;
13965
13966 ;
13967 return 0;
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013968}
Martin v. Löwis11437992002-04-12 09:54:03 +000013969_ACEOF
13970rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013971if { (ac_try="$ac_link"
13972case "(($ac_try" in
13973 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13974 *) ac_try_echo=$ac_try;;
13975esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013976eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13977$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013978 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013979 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013980 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013981 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013982 { (case "(($ac_try" in
13983 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13984 *) ac_try_echo=$ac_try;;
13985esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013986eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
13987$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000013988 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013989 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013990 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000013991 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013992 ac_cv_sizeof_time_t=`cat conftest.val`
Guido van Rossumb9a22a12000-06-30 02:48:53 +000013993else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000013994 $as_echo "$as_me: program exited with status $ac_status" >&5
13995$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000013996sed 's/^/| /' conftest.$ac_ext >&5
13997
Martin v. Löwis11437992002-04-12 09:54:03 +000013998( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000013999if test "$ac_cv_type_time_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014000 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
14001$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14002{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014003See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014004$as_echo "$as_me: error: cannot compute sizeof (time_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014005See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014006 { (exit 77); exit 77; }; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014007 else
14008 ac_cv_sizeof_time_t=0
14009 fi
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014010fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014011rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014012rm -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 +000014013fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014014rm -f conftest.val
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014015fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014016{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5
14017$as_echo "$ac_cv_sizeof_time_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014018
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014019
14020
Martin v. Löwis11437992002-04-12 09:54:03 +000014021cat >>confdefs.h <<_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014022#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014023_ACEOF
Guido van Rossumb9a22a12000-06-30 02:48:53 +000014024
Michael W. Hudson54241132001-12-07 15:38:26 +000014025
14026
Trent Mick635f6fb2000-08-23 21:33:05 +000014027# if have pthread_t then define SIZEOF_PTHREAD_T
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014028ac_save_cc="$CC"
14029if test "$ac_cv_kpthread" = "yes"
14030then CC="$CC -Kpthread"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000014031elif test "$ac_cv_kthread" = "yes"
14032then CC="$CC -Kthread"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000014033elif test "$ac_cv_pthread" = "yes"
14034then CC="$CC -pthread"
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014035fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014036
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014037{ $as_echo "$as_me:$LINENO: checking for pthread_t" >&5
14038$as_echo_n "checking for pthread_t... " >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014039have_pthread_t=no
Martin v. Löwis11437992002-04-12 09:54:03 +000014040cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014041/* confdefs.h. */
14042_ACEOF
14043cat confdefs.h >>conftest.$ac_ext
14044cat >>conftest.$ac_ext <<_ACEOF
14045/* end confdefs.h. */
Trent Mick635f6fb2000-08-23 21:33:05 +000014046#include <pthread.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000014047int
14048main ()
14049{
Guido van Rossum12580492000-09-24 16:47:19 +000014050pthread_t x; x = *(pthread_t*)0;
Martin v. Löwis11437992002-04-12 09:54:03 +000014051 ;
14052 return 0;
14053}
14054_ACEOF
14055rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014056if { (ac_try="$ac_compile"
14057case "(($ac_try" in
14058 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14059 *) ac_try_echo=$ac_try;;
14060esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014061eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14062$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014063 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014064 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014065 grep -v '^ *+' conftest.er1 >conftest.err
14066 rm -f conftest.er1
14067 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014068 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014069 (exit $ac_status); } && {
14070 test -z "$ac_c_werror_flag" ||
14071 test ! -s conftest.err
14072 } && test -s conftest.$ac_objext; then
Trent Mick635f6fb2000-08-23 21:33:05 +000014073 have_pthread_t=yes
14074else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014075 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014076sed 's/^/| /' conftest.$ac_ext >&5
14077
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014078
Trent Mick635f6fb2000-08-23 21:33:05 +000014079fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014080
14081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014082{ $as_echo "$as_me:$LINENO: result: $have_pthread_t" >&5
14083$as_echo "$have_pthread_t" >&6; }
Trent Mick635f6fb2000-08-23 21:33:05 +000014084if test "$have_pthread_t" = yes ; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014085 # The cast to long int works around a bug in the HP C Compiler
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014086# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14087# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14088# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014089{ $as_echo "$as_me:$LINENO: checking size of pthread_t" >&5
14090$as_echo_n "checking size of pthread_t... " >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014091if test "${ac_cv_sizeof_pthread_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014092 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014093else
14094 if test "$cross_compiling" = yes; then
14095 # Depending upon the size, compute the lo and hi bounds.
14096cat >conftest.$ac_ext <<_ACEOF
14097/* confdefs.h. */
14098_ACEOF
14099cat confdefs.h >>conftest.$ac_ext
14100cat >>conftest.$ac_ext <<_ACEOF
14101/* end confdefs.h. */
14102
14103#ifdef HAVE_PTHREAD_H
14104#include <pthread.h>
14105#endif
14106
14107
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014108int
14109main ()
14110{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014111static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014112test_array [0] = 0
14113
14114 ;
14115 return 0;
14116}
14117_ACEOF
14118rm -f conftest.$ac_objext
14119if { (ac_try="$ac_compile"
14120case "(($ac_try" in
14121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14122 *) ac_try_echo=$ac_try;;
14123esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014124eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14125$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014126 (eval "$ac_compile") 2>conftest.er1
14127 ac_status=$?
14128 grep -v '^ *+' conftest.er1 >conftest.err
14129 rm -f conftest.er1
14130 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014131 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014132 (exit $ac_status); } && {
14133 test -z "$ac_c_werror_flag" ||
14134 test ! -s conftest.err
14135 } && test -s conftest.$ac_objext; then
14136 ac_lo=0 ac_mid=0
14137 while :; do
14138 cat >conftest.$ac_ext <<_ACEOF
14139/* confdefs.h. */
14140_ACEOF
14141cat confdefs.h >>conftest.$ac_ext
14142cat >>conftest.$ac_ext <<_ACEOF
14143/* end confdefs.h. */
14144
14145#ifdef HAVE_PTHREAD_H
14146#include <pthread.h>
14147#endif
14148
14149
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014150int
14151main ()
14152{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014153static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014154test_array [0] = 0
14155
14156 ;
14157 return 0;
14158}
14159_ACEOF
14160rm -f conftest.$ac_objext
14161if { (ac_try="$ac_compile"
14162case "(($ac_try" in
14163 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14164 *) ac_try_echo=$ac_try;;
14165esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014166eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14167$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014168 (eval "$ac_compile") 2>conftest.er1
14169 ac_status=$?
14170 grep -v '^ *+' conftest.er1 >conftest.err
14171 rm -f conftest.er1
14172 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014173 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014174 (exit $ac_status); } && {
14175 test -z "$ac_c_werror_flag" ||
14176 test ! -s conftest.err
14177 } && test -s conftest.$ac_objext; then
14178 ac_hi=$ac_mid; break
14179else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014180 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014181sed 's/^/| /' conftest.$ac_ext >&5
14182
14183 ac_lo=`expr $ac_mid + 1`
14184 if test $ac_lo -le $ac_mid; then
14185 ac_lo= ac_hi=
14186 break
14187 fi
14188 ac_mid=`expr 2 '*' $ac_mid + 1`
14189fi
14190
14191rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14192 done
14193else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014194 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014195sed 's/^/| /' conftest.$ac_ext >&5
14196
14197 cat >conftest.$ac_ext <<_ACEOF
14198/* confdefs.h. */
14199_ACEOF
14200cat confdefs.h >>conftest.$ac_ext
14201cat >>conftest.$ac_ext <<_ACEOF
14202/* end confdefs.h. */
14203
14204#ifdef HAVE_PTHREAD_H
14205#include <pthread.h>
14206#endif
14207
14208
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014209int
14210main ()
14211{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014212static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) < 0)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014213test_array [0] = 0
14214
14215 ;
14216 return 0;
14217}
14218_ACEOF
14219rm -f conftest.$ac_objext
14220if { (ac_try="$ac_compile"
14221case "(($ac_try" in
14222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14223 *) ac_try_echo=$ac_try;;
14224esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014225eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14226$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014227 (eval "$ac_compile") 2>conftest.er1
14228 ac_status=$?
14229 grep -v '^ *+' conftest.er1 >conftest.err
14230 rm -f conftest.er1
14231 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014232 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014233 (exit $ac_status); } && {
14234 test -z "$ac_c_werror_flag" ||
14235 test ! -s conftest.err
14236 } && test -s conftest.$ac_objext; then
14237 ac_hi=-1 ac_mid=-1
14238 while :; do
14239 cat >conftest.$ac_ext <<_ACEOF
14240/* confdefs.h. */
14241_ACEOF
14242cat confdefs.h >>conftest.$ac_ext
14243cat >>conftest.$ac_ext <<_ACEOF
14244/* end confdefs.h. */
14245
14246#ifdef HAVE_PTHREAD_H
14247#include <pthread.h>
14248#endif
14249
14250
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014251int
14252main ()
14253{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014254static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) >= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014255test_array [0] = 0
14256
14257 ;
14258 return 0;
14259}
14260_ACEOF
14261rm -f conftest.$ac_objext
14262if { (ac_try="$ac_compile"
14263case "(($ac_try" in
14264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14265 *) ac_try_echo=$ac_try;;
14266esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014267eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14268$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014269 (eval "$ac_compile") 2>conftest.er1
14270 ac_status=$?
14271 grep -v '^ *+' conftest.er1 >conftest.err
14272 rm -f conftest.er1
14273 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014274 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014275 (exit $ac_status); } && {
14276 test -z "$ac_c_werror_flag" ||
14277 test ! -s conftest.err
14278 } && test -s conftest.$ac_objext; then
14279 ac_lo=$ac_mid; break
14280else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014281 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014282sed 's/^/| /' conftest.$ac_ext >&5
14283
14284 ac_hi=`expr '(' $ac_mid ')' - 1`
14285 if test $ac_mid -le $ac_hi; then
14286 ac_lo= ac_hi=
14287 break
14288 fi
14289 ac_mid=`expr 2 '*' $ac_mid`
14290fi
14291
14292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14293 done
14294else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014295 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014296sed 's/^/| /' conftest.$ac_ext >&5
14297
14298 ac_lo= ac_hi=
14299fi
14300
14301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14302fi
14303
14304rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14305# Binary search between lo and hi bounds.
14306while test "x$ac_lo" != "x$ac_hi"; do
14307 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
14308 cat >conftest.$ac_ext <<_ACEOF
14309/* confdefs.h. */
14310_ACEOF
14311cat confdefs.h >>conftest.$ac_ext
14312cat >>conftest.$ac_ext <<_ACEOF
14313/* end confdefs.h. */
14314
14315#ifdef HAVE_PTHREAD_H
14316#include <pthread.h>
14317#endif
14318
14319
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014320int
14321main ()
14322{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014323static int test_array [1 - 2 * !(((long int) (sizeof (pthread_t))) <= $ac_mid)];
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014324test_array [0] = 0
14325
14326 ;
14327 return 0;
14328}
14329_ACEOF
14330rm -f conftest.$ac_objext
14331if { (ac_try="$ac_compile"
14332case "(($ac_try" in
14333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14334 *) ac_try_echo=$ac_try;;
14335esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014336eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14337$as_echo "$ac_try_echo") >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014338 (eval "$ac_compile") 2>conftest.er1
14339 ac_status=$?
14340 grep -v '^ *+' conftest.er1 >conftest.err
14341 rm -f conftest.er1
14342 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014343 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014344 (exit $ac_status); } && {
14345 test -z "$ac_c_werror_flag" ||
14346 test ! -s conftest.err
14347 } && test -s conftest.$ac_objext; then
14348 ac_hi=$ac_mid
14349else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014350 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014351sed 's/^/| /' conftest.$ac_ext >&5
14352
14353 ac_lo=`expr '(' $ac_mid ')' + 1`
14354fi
14355
14356rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14357done
14358case $ac_lo in
14359?*) ac_cv_sizeof_pthread_t=$ac_lo;;
14360'') if test "$ac_cv_type_pthread_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014361 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
14362$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14363{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014364See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014365$as_echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014366See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014367 { (exit 77); exit 77; }; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014368 else
14369 ac_cv_sizeof_pthread_t=0
14370 fi ;;
14371esac
14372else
14373 cat >conftest.$ac_ext <<_ACEOF
14374/* confdefs.h. */
14375_ACEOF
14376cat confdefs.h >>conftest.$ac_ext
14377cat >>conftest.$ac_ext <<_ACEOF
14378/* end confdefs.h. */
14379
14380#ifdef HAVE_PTHREAD_H
14381#include <pthread.h>
14382#endif
14383
14384
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014385static long int longval () { return (long int) (sizeof (pthread_t)); }
14386static unsigned long int ulongval () { return (long int) (sizeof (pthread_t)); }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014387#include <stdio.h>
14388#include <stdlib.h>
14389int
14390main ()
14391{
14392
14393 FILE *f = fopen ("conftest.val", "w");
14394 if (! f)
14395 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014396 if (((long int) (sizeof (pthread_t))) < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014397 {
14398 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014399 if (i != ((long int) (sizeof (pthread_t))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014400 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014401 fprintf (f, "%ld", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014402 }
14403 else
14404 {
14405 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014406 if (i != ((long int) (sizeof (pthread_t))))
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014407 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014408 fprintf (f, "%lu", i);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014409 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014410 /* Do not output a trailing newline, as this causes \r\n confusion
14411 on some platforms. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014412 return ferror (f) || fclose (f) != 0;
14413
14414 ;
14415 return 0;
14416}
Martin v. Löwis11437992002-04-12 09:54:03 +000014417_ACEOF
14418rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014419if { (ac_try="$ac_link"
14420case "(($ac_try" in
14421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14422 *) ac_try_echo=$ac_try;;
14423esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014424eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14425$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014426 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014427 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014428 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014429 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014430 { (case "(($ac_try" in
14431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14432 *) ac_try_echo=$ac_try;;
14433esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014434eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14435$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014436 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014437 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014438 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000014439 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014440 ac_cv_sizeof_pthread_t=`cat conftest.val`
Trent Mick635f6fb2000-08-23 21:33:05 +000014441else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014442 $as_echo "$as_me: program exited with status $ac_status" >&5
14443$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014444sed 's/^/| /' conftest.$ac_ext >&5
14445
Martin v. Löwis11437992002-04-12 09:54:03 +000014446( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014447if test "$ac_cv_type_pthread_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014448 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
14449$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14450{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014451See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014452$as_echo "$as_me: error: cannot compute sizeof (pthread_t)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014453See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014454 { (exit 77); exit 77; }; }; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014455 else
14456 ac_cv_sizeof_pthread_t=0
14457 fi
Trent Mick635f6fb2000-08-23 21:33:05 +000014458fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014459rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014460rm -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 +000014461fi
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014462rm -f conftest.val
Trent Mick635f6fb2000-08-23 21:33:05 +000014463fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014464{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_pthread_t" >&5
14465$as_echo "$ac_cv_sizeof_pthread_t" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014466
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014467
14468
Martin v. Löwis11437992002-04-12 09:54:03 +000014469cat >>confdefs.h <<_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014470#define SIZEOF_PTHREAD_T $ac_cv_sizeof_pthread_t
Martin v. Löwis11437992002-04-12 09:54:03 +000014471_ACEOF
Trent Mick635f6fb2000-08-23 21:33:05 +000014472
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000014473
Trent Mick635f6fb2000-08-23 21:33:05 +000014474fi
Martin v. Löwis123cbd22001-07-19 14:21:10 +000014475CC="$ac_save_cc"
Trent Mick635f6fb2000-08-23 21:33:05 +000014476
Michael W. Hudson54241132001-12-07 15:38:26 +000014477
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014478case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014479 Darwin/[01567]\..*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014480 OTHER_LIBTOOL_OPT="-prebind -seg1addr 0x10000000"
14481 ;;
14482 Darwin/*)
14483 OTHER_LIBTOOL_OPT=""
14484 ;;
14485esac
14486
14487
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014488ARCH_RUN_32BIT=""
14489
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014490case $ac_sys_system/$ac_sys_release in
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000014491 Darwin/[01567]\..*)
Thomas Wouters477c8d52006-05-27 19:21:47 +000014492 LIBTOOL_CRUFT="-framework System -lcc_dynamic"
14493 if test "${enable_universalsdk}"; then
14494 :
14495 else
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014496 LIBTOOL_CRUFT="${LIBTOOL_CRUFT} -arch_only `arch`"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014497 fi
Jack Jansenb36687a2004-07-16 08:43:47 +000014498 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014499 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum5839e582000-10-09 19:52:35 +000014500 Darwin/*)
Bob Ippolito7026a0a2005-03-28 23:23:47 +000014501 gcc_version=`gcc -v 2>&1 | grep version | cut -d\ -f3`
14502 if test ${gcc_version} '<' 4.0
14503 then
14504 LIBTOOL_CRUFT="-lcc_dynamic"
14505 else
14506 LIBTOOL_CRUFT=""
14507 fi
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014508 if test "$cross_compiling" = yes; then
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014509 ac_osx_32bit=yes
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014510else
14511 cat >conftest.$ac_ext <<_ACEOF
14512/* confdefs.h. */
14513_ACEOF
14514cat confdefs.h >>conftest.$ac_ext
14515cat >>conftest.$ac_ext <<_ACEOF
14516/* end confdefs.h. */
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014517
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014518 #include <unistd.h>
14519 int main(int argc, char*argv[])
14520 {
14521 if (sizeof(long) == 4) {
14522 return 0;
14523 } else {
14524 return 1;
14525 }
Ronald Oussoren3c064c12009-09-08 07:12:42 +000014526 }
14527
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014528_ACEOF
14529rm -f conftest$ac_exeext
14530if { (ac_try="$ac_link"
14531case "(($ac_try" in
14532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14533 *) ac_try_echo=$ac_try;;
14534esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014535eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14536$as_echo "$ac_try_echo") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014537 (eval "$ac_link") 2>&5
14538 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014539 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014540 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14541 { (case "(($ac_try" in
14542 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14543 *) ac_try_echo=$ac_try;;
14544esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014545eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14546$as_echo "$ac_try_echo") >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014547 (eval "$ac_try") 2>&5
14548 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014549 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014550 (exit $ac_status); }; }; then
14551 ac_osx_32bit=yes
14552else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014553 $as_echo "$as_me: program exited with status $ac_status" >&5
14554$as_echo "$as_me: failed program was:" >&5
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014555sed 's/^/| /' conftest.$ac_ext >&5
14556
14557( exit $ac_status )
14558ac_osx_32bit=no
14559fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014560rm -rf conftest.dSYM
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014561rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14562fi
14563
14564
14565
14566 if test "${ac_osx_32bit}" = "yes"; then
14567 case `arch` in
14568 i386)
14569 MACOSX_DEFAULT_ARCH="i386"
14570 ;;
14571 ppc)
14572 MACOSX_DEFAULT_ARCH="ppc"
14573 ;;
14574 *)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014575 { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14576$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014577 { (exit 1); exit 1; }; }
14578 ;;
14579 esac
14580 else
14581 case `arch` in
14582 i386)
14583 MACOSX_DEFAULT_ARCH="x86_64"
14584 ;;
14585 ppc)
14586 MACOSX_DEFAULT_ARCH="ppc64"
14587 ;;
14588 *)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014589 { { $as_echo "$as_me:$LINENO: error: Unexpected output of 'arch' on OSX" >&5
14590$as_echo "$as_me: error: Unexpected output of 'arch' on OSX" >&2;}
Ronald Oussoren5bbab3e2009-09-06 11:01:15 +000014591 { (exit 1); exit 1; }; }
14592 ;;
14593 esac
14594
14595 #ARCH_RUN_32BIT="true"
14596 fi
14597
14598 LIBTOOL_CRUFT=$LIBTOOL_CRUFT" -lSystem -lSystemStubs -arch_only ${MACOSX_DEFAULT_ARCH}"
Jack Jansenb36687a2004-07-16 08:43:47 +000014599 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -install_name $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014600 LIBTOOL_CRUFT=$LIBTOOL_CRUFT' -compatibility_version $(VERSION) -current_version $(VERSION)';;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014601esac
14602
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014603{ $as_echo "$as_me:$LINENO: checking for --enable-framework" >&5
14604$as_echo_n "checking for --enable-framework... " >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014605if test "$enable_framework"
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014606then
Skip Montanarodecc6a42003-01-01 20:07:49 +000014607 BASECFLAGS="$BASECFLAGS -fno-common -dynamic"
Martin v. Löwis11437992002-04-12 09:54:03 +000014608 # -F. is needed to allow linking to the framework while
Jack Jansene578a632001-08-15 01:27:14 +000014609 # in the build location.
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014610
Martin v. Löwis11437992002-04-12 09:54:03 +000014611cat >>confdefs.h <<\_ACEOF
14612#define WITH_NEXT_FRAMEWORK 1
14613_ACEOF
14614
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014615 { $as_echo "$as_me:$LINENO: result: yes" >&5
14616$as_echo "yes" >&6; }
Ronald Oussoren99aab652009-06-08 21:22:57 +000014617 if test $enable_shared = "yes"
14618 then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014619 { { $as_echo "$as_me:$LINENO: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&5
14620$as_echo "$as_me: error: Specifying both --enable-shared and --enable-framework is not supported, use only --enable-framework instead" >&2;}
Ronald Oussoren99aab652009-06-08 21:22:57 +000014621 { (exit 1); exit 1; }; }
14622 fi
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014623else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014624 { $as_echo "$as_me:$LINENO: result: no" >&5
14625$as_echo "no" >&6; }
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014626fi
14627
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014628{ $as_echo "$as_me:$LINENO: checking for dyld" >&5
14629$as_echo_n "checking for dyld... " >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014630case $ac_sys_system/$ac_sys_release in
14631 Darwin/*)
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014632
Martin v. Löwis11437992002-04-12 09:54:03 +000014633cat >>confdefs.h <<\_ACEOF
14634#define WITH_DYLD 1
14635_ACEOF
14636
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014637 { $as_echo "$as_me:$LINENO: result: always on for Darwin" >&5
14638$as_echo "always on for Darwin" >&6; }
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014639 ;;
14640 *)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014641 { $as_echo "$as_me:$LINENO: result: no" >&5
14642$as_echo "no" >&6; }
Jack Jansene578a632001-08-15 01:27:14 +000014643 ;;
Jack Jansen9a66b6d2001-08-08 13:56:14 +000014644esac
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014645
Guido van Rossum0a516c91994-09-12 10:58:40 +000014646# Set info about shared libraries.
Guido van Rossum0a516c91994-09-12 10:58:40 +000014647
Michael W. Hudson54241132001-12-07 15:38:26 +000014648
14649
14650
14651
Guido van Rossum0a516c91994-09-12 10:58:40 +000014652# SO is the extension of shared libraries `(including the dot!)
Guido van Rossumaef734b2001-01-10 21:09:12 +000014653# -- usually .so, .sl on HP-UX, .dll on Cygwin
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014654{ $as_echo "$as_me:$LINENO: checking SO" >&5
14655$as_echo_n "checking SO... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014656if test -z "$SO"
14657then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014658 case $ac_sys_system in
Thomas Wouters477c8d52006-05-27 19:21:47 +000014659 hp*|HP*)
14660 case `uname -m` in
14661 ia64) SO=.so;;
14662 *) SO=.sl;;
14663 esac
14664 ;;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014665 CYGWIN*) SO=.dll;;
Guido van Rossum563e7081996-09-10 18:20:48 +000014666 *) SO=.so;;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014667 esac
Martin v. Löwis368de8f2003-06-14 14:46:38 +000014668else
14669 # this might also be a termcap variable, see #610332
14670 echo
14671 echo '====================================================================='
14672 echo '+ +'
14673 echo '+ WARNING: You have set SO in your environment. +'
14674 echo '+ Do you really mean to change the extension for shared libraries? +'
14675 echo '+ Continuing in 10 seconds to let you to ponder. +'
14676 echo '+ +'
14677 echo '====================================================================='
14678 sleep 10
Guido van Rossum0a516c91994-09-12 10:58:40 +000014679fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014680{ $as_echo "$as_me:$LINENO: result: $SO" >&5
14681$as_echo "$SO" >&6; }
Thomas Wouters477c8d52006-05-27 19:21:47 +000014682
Georg Brandlb1441c72009-01-03 22:33:39 +000014683
Thomas Wouters477c8d52006-05-27 19:21:47 +000014684cat >>confdefs.h <<_ACEOF
14685#define SHLIB_EXT "$SO"
14686_ACEOF
14687
Guido van Rossum0a516c91994-09-12 10:58:40 +000014688# LDSHARED is the ld *command* used to create shared library
Martin v. Löwis12af0482004-01-31 12:34:17 +000014689# -- "cc -G" on SunOS 5.x, "ld -shared" on IRIX 5
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014690# (Shared libraries in this instance are shared modules to be loaded into
14691# Python, as opposed to building Python itself as a shared library.)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014692{ $as_echo "$as_me:$LINENO: checking LDSHARED" >&5
14693$as_echo_n "checking LDSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014694if test -z "$LDSHARED"
14695then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014696 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014697 AIX*)
14698 BLDSHARED="\$(srcdir)/Modules/ld_so_aix \$(CC) -bI:Modules/python.exp"
Guido van Rossumce608b02001-09-28 15:59:38 +000014699 LDSHARED="\$(BINLIBDEST)/config/ld_so_aix \$(CC) -bI:\$(BINLIBDEST)/config/python.exp"
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014700 ;;
Guido van Rossum07397971997-04-29 21:49:50 +000014701 IRIX/5*) LDSHARED="ld -shared";;
Guido van Rossum91922671997-10-09 20:24:13 +000014702 IRIX*/6*) LDSHARED="ld ${SGI_ABI} -shared -all";;
Martin v. Löwis11437992002-04-12 09:54:03 +000014703 SunOS/5*)
Greg Ward57c9a6632000-05-26 12:22:54 +000014704 if test "$GCC" = "yes"
Neil Schemenauer8ba94452001-02-19 18:18:48 +000014705 then LDSHARED='$(CC) -shared'
Martin v. Löwisaa5afe12002-10-07 06:21:41 +000014706 else LDSHARED='$(CC) -G';
Greg Ward57c9a6632000-05-26 12:22:54 +000014707 fi ;;
Thomas Hellerf44b9a12008-04-04 10:18:23 +000014708 hp*|HP*)
14709 if test "$GCC" = "yes"
14710 then LDSHARED='$(CC) -shared'
14711 else LDSHARED='ld -b';
14712 fi ;;
Guido van Rossumda88dad1995-01-26 00:46:29 +000014713 OSF*) LDSHARED="ld -shared -expect_unresolved \"*\"";;
Jack Jansen418c3b12001-11-14 10:59:57 +000014714 Darwin/1.3*)
Jack Jansena3891ea2001-09-07 14:25:12 +000014715 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14716 if test "$enable_framework" ; then
14717 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014718 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14719 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansena3891ea2001-09-07 14:25:12 +000014720 else
14721 # No framework. Ignore undefined symbols, assuming they come from Python
Jack Jansen418c3b12001-11-14 10:59:57 +000014722 LDSHARED="$LDSHARED -undefined suppress"
Jack Jansena3891ea2001-09-07 14:25:12 +000014723 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014724 Darwin/1.4*|Darwin/5.*|Darwin/6.*)
Jack Jansene578a632001-08-15 01:27:14 +000014725 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14726 if test "$enable_framework" ; then
14727 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014728 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14729 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014730 else
Michael W. Hudson594bc802002-03-07 09:59:15 +000014731 # No framework, use the Python app as bundle-loader
14732 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
Jack Jansenc28fc372003-02-25 13:14:43 +000014733 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014734 fi ;;
Jack Jansen6b08a402004-06-03 12:41:45 +000014735 Darwin/*)
14736 # Use -undefined dynamic_lookup whenever possible (10.3 and later).
14737 # This allows an extension to be used in any Python
Thomas Wouters89d996e2007-09-08 17:39:28 +000014738
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014739 if test ${MACOSX_DEPLOYMENT_TARGET} '>' 10.2
Jack Jansen6b08a402004-06-03 12:41:45 +000014740 then
Thomas Wouters477c8d52006-05-27 19:21:47 +000014741 if test "${enable_universalsdk}"; then
Benjamin Peterson14ae9592008-07-16 02:20:15 +000014742 LDFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${LDFLAGS}"
Thomas Wouters477c8d52006-05-27 19:21:47 +000014743 fi
Jack Jansen6b08a402004-06-03 12:41:45 +000014744 LDSHARED='$(CC) $(LDFLAGS) -bundle -undefined dynamic_lookup'
14745 BLDSHARED="$LDSHARED"
Jack Jansen6b08a402004-06-03 12:41:45 +000014746 else
14747 LDSHARED='$(CC) $(LDFLAGS) -bundle'
14748 if test "$enable_framework" ; then
14749 # Link against the framework. All externals should be defined.
Jack Jansenda49e192005-01-07 13:08:22 +000014750 BLDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
14751 LDSHARED="$LDSHARED "'$(PYTHONFRAMEWORKPREFIX)/$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansen6b08a402004-06-03 12:41:45 +000014752 else
14753 # No framework, use the Python app as bundle-loader
14754 BLDSHARED="$LDSHARED "'-bundle_loader $(BUILDPYTHON)'
14755 LDSHARED="$LDSHARED "'-bundle_loader $(BINDIR)/python$(VERSION)$(EXE)'
14756 fi
14757 fi
14758 ;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014759 Linux*|GNU*|QNX*) LDSHARED='$(CC) -shared';;
Guido van Rossum458e7fa1999-09-17 15:40:40 +000014760 BSD/OS*/4*) LDSHARED="gcc -shared";;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014761 FreeBSD*)
Jeremy Hylton4bcc7c52000-08-31 17:45:35 +000014762 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
Guido van Rossum0286ae82000-08-29 15:06:49 +000014763 then
Hye-Shik Chang33761492004-10-26 09:53:46 +000014764 LDSHARED="$CC -shared ${LDFLAGS}"
Guido van Rossum0286ae82000-08-29 15:06:49 +000014765 else
14766 LDSHARED="ld -Bshareable ${LDFLAGS}"
14767 fi;;
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000014768 OpenBSD*)
14769 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14770 then
14771 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14772 else
14773 case `uname -r` in
14774 [01].* | 2.[0-7] | 2.[0-7].*)
14775 LDSHARED="ld -Bshareable ${LDFLAGS}"
14776 ;;
14777 *)
14778 LDSHARED='$(CC) -shared $(CCSHARED) ${LDFLAGS}'
14779 ;;
14780 esac
14781 fi;;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014782 NetBSD*|DragonFly*) LDSHARED="cc -shared ${LDFLAGS}";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014783 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014784 if test "$GCC" = "yes"
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014785 then LDSHARED='$(CC) -shared'
14786 else LDSHARED='$(CC) -G'
Martin v. Löwisbec19582001-03-21 15:57:54 +000014787 fi;;
Martin v. Löwis79f3c532002-12-11 12:51:58 +000014788 SCO_SV*) LDSHARED='$(CC) -Wl,-G,-Bexport';;
Guido van Rossumaef734b2001-01-10 21:09:12 +000014789 CYGWIN*) LDSHARED="gcc -shared -Wl,--enable-auto-image-base";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014790 atheos*) LDSHARED="gcc -shared";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014791 *) LDSHARED="ld";;
14792 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014793fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014794{ $as_echo "$as_me:$LINENO: result: $LDSHARED" >&5
14795$as_echo "$LDSHARED" >&6; }
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014796BLDSHARED=${BLDSHARED-$LDSHARED}
Guido van Rossum0a516c91994-09-12 10:58:40 +000014797# CCSHARED are the C *flags* used to create objects to go into a shared
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014798# library (module) -- this is only needed for a few systems
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014799{ $as_echo "$as_me:$LINENO: checking CCSHARED" >&5
14800$as_echo_n "checking CCSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014801if test -z "$CCSHARED"
14802then
Guido van Rossum07397971997-04-29 21:49:50 +000014803 case $ac_sys_system/$ac_sys_release in
Neil Schemenauerc761fc82001-02-19 04:50:49 +000014804 SunOS*) if test "$GCC" = yes;
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000014805 then CCSHARED="-fPIC";
14806 elif test `uname -p` = sparc;
14807 then CCSHARED="-xcode=pic32";
14808 else CCSHARED="-Kpic";
14809 fi;;
Guido van Rossumaf07a441995-02-13 19:45:27 +000014810 hp*|HP*) if test "$GCC" = yes;
Martin v. Löwis703ad702001-09-05 08:36:52 +000014811 then CCSHARED="-fPIC";
Guido van Rossumaf07a441995-02-13 19:45:27 +000014812 else CCSHARED="+z";
14813 fi;;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014814 Linux*|GNU*) CCSHARED="-fPIC";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014815 BSD/OS*/4*) CCSHARED="-fpic";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014816 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*) CCSHARED="-fPIC";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014817 OpenUNIX*|UnixWare*)
Martin v. Löwisbec19582001-03-21 15:57:54 +000014818 if test "$GCC" = "yes"
14819 then CCSHARED="-fPIC"
Martin v. Löwis130fb172001-07-19 11:00:41 +000014820 else CCSHARED="-KPIC"
Martin v. Löwisbec19582001-03-21 15:57:54 +000014821 fi;;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014822 SCO_SV*)
14823 if test "$GCC" = "yes"
14824 then CCSHARED="-fPIC"
14825 else CCSHARED="-Kpic -belf"
14826 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014827 IRIX*/6*) case $CC in
14828 *gcc*) CCSHARED="-shared";;
Guido van Rossumee21f411998-04-20 18:51:54 +000014829 *) CCSHARED="";;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014830 esac;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014831 atheos*) CCSHARED="-fPIC";;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014832 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014833fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014834{ $as_echo "$as_me:$LINENO: result: $CCSHARED" >&5
14835$as_echo "$CCSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014836# LINKFORSHARED are the flags passed to the $(CC) command that links
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014837# the python executable -- this is only needed for a few systems
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014838{ $as_echo "$as_me:$LINENO: checking LINKFORSHARED" >&5
14839$as_echo_n "checking LINKFORSHARED... " >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014840if test -z "$LINKFORSHARED"
14841then
Guido van Rossum07397971997-04-29 21:49:50 +000014842 case $ac_sys_system/$ac_sys_release in
Neil Schemenauer4a7bbcb2001-02-16 03:37:54 +000014843 AIX*) LINKFORSHARED='-Wl,-bE:Modules/python.exp -lld';;
Guido van Rossumccaf3b61996-12-06 21:19:16 +000014844 hp*|HP*)
Martin v. Löwis1142de32002-03-29 16:28:31 +000014845 LINKFORSHARED="-Wl,-E -Wl,+s";;
14846# LINKFORSHARED="-Wl,-E -Wl,+s -Wl,+b\$(BINLIBDEST)/lib-dynload";;
Guido van Rossumf5957ea1999-10-05 21:59:33 +000014847 BSD/OS/4*) LINKFORSHARED="-Xlinker -export-dynamic";;
Martin v. Löwisa6e97582002-01-01 18:41:33 +000014848 Linux*|GNU*) LINKFORSHARED="-Xlinker -export-dynamic";;
Guido van Rossum54ecc3d1999-01-27 17:53:11 +000014849 # -u libsys_s pulls in all symbols in libsys
Martin v. Löwis11437992002-04-12 09:54:03 +000014850 Darwin/*)
Benjamin Peterson9c80cac2009-05-23 16:34:23 +000014851 LINKFORSHARED="$extra_undefs -framework CoreFoundation"
Jack Jansene578a632001-08-15 01:27:14 +000014852 if test "$enable_framework"
14853 then
Jack Jansenda49e192005-01-07 13:08:22 +000014854 LINKFORSHARED="$LINKFORSHARED "'$(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)'
Jack Jansene578a632001-08-15 01:27:14 +000014855 fi
Anthony Baxtereef2d3b2004-11-06 04:45:33 +000014856 LINKFORSHARED="$LINKFORSHARED";;
Martin v. Löwis25ae43b2001-10-07 08:39:18 +000014857 OpenUNIX*|UnixWare*) LINKFORSHARED="-Wl,-Bexport";;
Martin v. Löwis21ee4092002-09-30 16:19:48 +000014858 SCO_SV*) LINKFORSHARED="-Wl,-Bexport";;
Fred Drake02706f52000-09-25 15:08:46 +000014859 ReliantUNIX*) LINKFORSHARED="-W1 -Blargedynsym";;
Martin v. Löwis86d66262006-02-17 08:40:11 +000014860 FreeBSD*|NetBSD*|OpenBSD*|DragonFly*)
Guido van Rossumdf693651999-01-07 21:50:41 +000014861 if [ "`$CC -dM -E - </dev/null | grep __ELF__`" != "" ]
14862 then
14863 LINKFORSHARED="-Wl,--export-dynamic"
14864 fi;;
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014865 SunOS/5*) case $CC in
14866 *gcc*)
Martin v. Löwisa4548572002-04-18 14:51:36 +000014867 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
Guido van Rossum8f4ceb11997-12-18 23:42:19 +000014868 then
14869 LINKFORSHARED="-Xlinker --export-dynamic"
Guido van Rossum2b5ca001998-03-05 15:41:09 +000014870 fi;;
14871 esac;;
Jason Tishler30765592003-09-04 11:04:06 +000014872 CYGWIN*)
14873 if test $enable_shared = "no"
14874 then
14875 LINKFORSHARED='-Wl,--out-implib=$(LDLIBRARY)'
14876 fi;;
Benjamin Petersonde9c8692008-07-01 18:23:09 +000014877 QNX*)
14878 # -Wl,-E causes the symbols to be added to the dynamic
14879 # symbol table so that they can be found when a module
14880 # is loaded. -N 2048K causes the stack size to be set
14881 # to 2048 kilobytes so that the stack doesn't overflow
14882 # when running test_compile.py.
14883 LINKFORSHARED='-Wl,-E -N 2048K';;
Guido van Rossum0a516c91994-09-12 10:58:40 +000014884 esac
Guido van Rossum0a516c91994-09-12 10:58:40 +000014885fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014886{ $as_echo "$as_me:$LINENO: result: $LINKFORSHARED" >&5
14887$as_echo "$LINKFORSHARED" >&6; }
Guido van Rossum0a516c91994-09-12 10:58:40 +000014888
Michael W. Hudson54241132001-12-07 15:38:26 +000014889
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000014890
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014891{ $as_echo "$as_me:$LINENO: checking CFLAGSFORSHARED" >&5
14892$as_echo_n "checking CFLAGSFORSHARED... " >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014893if test ! "$LIBRARY" = "$LDLIBRARY"
14894then
Neil Schemenauer0c6141f2001-01-27 21:40:54 +000014895 case $ac_sys_system in
14896 CYGWIN*)
14897 # Cygwin needs CCSHARED when building extension DLLs
14898 # but not when building the interpreter DLL.
14899 CFLAGSFORSHARED='';;
14900 *)
14901 CFLAGSFORSHARED='$(CCSHARED)'
14902 esac
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014903fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014904{ $as_echo "$as_me:$LINENO: result: $CFLAGSFORSHARED" >&5
14905$as_echo "$CFLAGSFORSHARED" >&6; }
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000014906
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014907# SHLIBS are libraries (except -lc and -lm) to link to the python shared
14908# library (with --enable-shared).
14909# For platforms on which shared libraries are not allowed to have unresolved
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014910# symbols, this must be set to $(LIBS) (expanded by make). We do this even
14911# if it is not required, since it creates a dependency of the shared library
14912# to LIBS. This, in turn, means that applications linking the shared libpython
14913# don't need to link LIBS explicitly. The default should be only changed
14914# on systems where this approach causes problems.
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014915
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014916{ $as_echo "$as_me:$LINENO: checking SHLIBS" >&5
14917$as_echo_n "checking SHLIBS... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014918case "$ac_sys_system" in
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014919 *)
Martin v. Löwisd6359c52002-08-04 12:38:50 +000014920 SHLIBS='$(LIBS)';;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014921esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014922{ $as_echo "$as_me:$LINENO: result: $SHLIBS" >&5
14923$as_echo "$SHLIBS" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000014924
14925
Guido van Rossum627b2d71993-12-24 10:39:16 +000014926# checks for libraries
Martin v. Löwis11437992002-04-12 09:54:03 +000014927
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014928{ $as_echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5
14929$as_echo_n "checking for dlopen in -ldl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000014930if test "${ac_cv_lib_dl_dlopen+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014931 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014932else
Martin v. Löwis11437992002-04-12 09:54:03 +000014933 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014934LIBS="-ldl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000014935cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000014936/* confdefs.h. */
14937_ACEOF
14938cat confdefs.h >>conftest.$ac_ext
14939cat >>conftest.$ac_ext <<_ACEOF
14940/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000014941
Thomas Wouters47b49bf2007-08-30 22:15:33 +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 dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014949int
14950main ()
14951{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014952return dlopen ();
Martin v. Löwis11437992002-04-12 09:54:03 +000014953 ;
14954 return 0;
14955}
14956_ACEOF
14957rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014958if { (ac_try="$ac_link"
14959case "(($ac_try" in
14960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14961 *) ac_try_echo=$ac_try;;
14962esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014963eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
14964$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014965 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000014966 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000014967 grep -v '^ *+' conftest.er1 >conftest.err
14968 rm -f conftest.er1
14969 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014970 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014971 (exit $ac_status); } && {
14972 test -z "$ac_c_werror_flag" ||
14973 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014974 } && test -s conftest$ac_exeext && {
14975 test "$cross_compiling" = yes ||
14976 $as_test_x conftest$ac_exeext
14977 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014978 ac_cv_lib_dl_dlopen=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000014979else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014980 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000014981sed 's/^/| /' conftest.$ac_ext >&5
14982
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014983 ac_cv_lib_dl_dlopen=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000014984fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014985
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014986rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000014987rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000014988 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000014989LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000014990fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000014991{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5
14992$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14993if test "x$ac_cv_lib_dl_dlopen" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000014994 cat >>confdefs.h <<_ACEOF
14995#define HAVE_LIBDL 1
14996_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000014997
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000014998 LIBS="-ldl $LIBS"
Guido van Rossum7f43da71994-08-01 12:15:30 +000014999
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015000fi
15001 # Dynamic linking for SunOS/Solaris and SYSV
Martin v. Löwis11437992002-04-12 09:54:03 +000015002
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015003{ $as_echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5
15004$as_echo_n "checking for shl_load in -ldld... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015005if test "${ac_cv_lib_dld_shl_load+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015006 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015007else
Martin v. Löwis11437992002-04-12 09:54:03 +000015008 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015009LIBS="-ldld $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015010cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015011/* confdefs.h. */
15012_ACEOF
15013cat confdefs.h >>conftest.$ac_ext
15014cat >>conftest.$ac_ext <<_ACEOF
15015/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015016
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015017/* Override any GCC internal prototype to avoid an error.
15018 Use char because int might match the return type of a GCC
15019 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015020#ifdef __cplusplus
15021extern "C"
15022#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015023char shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015024int
15025main ()
15026{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015027return shl_load ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015028 ;
15029 return 0;
15030}
15031_ACEOF
15032rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015033if { (ac_try="$ac_link"
15034case "(($ac_try" in
15035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15036 *) ac_try_echo=$ac_try;;
15037esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015038eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15039$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015040 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015041 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015042 grep -v '^ *+' conftest.er1 >conftest.err
15043 rm -f conftest.er1
15044 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015045 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015046 (exit $ac_status); } && {
15047 test -z "$ac_c_werror_flag" ||
15048 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015049 } && test -s conftest$ac_exeext && {
15050 test "$cross_compiling" = yes ||
15051 $as_test_x conftest$ac_exeext
15052 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015053 ac_cv_lib_dld_shl_load=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015054else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015055 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015056sed 's/^/| /' conftest.$ac_ext >&5
15057
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015058 ac_cv_lib_dld_shl_load=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000015059fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015060
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015061rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015062rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015063 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015064LIBS=$ac_check_lib_save_LIBS
Guido van Rossum627b2d71993-12-24 10:39:16 +000015065fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015066{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5
15067$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
15068if test "x$ac_cv_lib_dld_shl_load" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015069 cat >>confdefs.h <<_ACEOF
15070#define HAVE_LIBDLD 1
15071_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000015072
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015073 LIBS="-ldld $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015074
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015075fi
15076 # Dynamic linking for HP-UX
Martin v. Löwis519adae2003-09-20 10:47:47 +000015077
Georg Brandlb1441c72009-01-03 22:33:39 +000015078# only check for sem_init if thread support is requested
Martin v. Löwis519adae2003-09-20 10:47:47 +000015079if test "$with_threads" = "yes" -o -z "$with_threads"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015080 { $as_echo "$as_me:$LINENO: checking for library containing sem_init" >&5
15081$as_echo_n "checking for library containing sem_init... " >&6; }
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015082if test "${ac_cv_search_sem_init+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015083 $as_echo_n "(cached) " >&6
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015084else
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015085 ac_func_search_save_LIBS=$LIBS
Martin v. Löwis11437992002-04-12 09:54:03 +000015086cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015087/* confdefs.h. */
15088_ACEOF
15089cat confdefs.h >>conftest.$ac_ext
15090cat >>conftest.$ac_ext <<_ACEOF
15091/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015092
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015093/* Override any GCC internal prototype to avoid an error.
15094 Use char because int might match the return type of a GCC
15095 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015096#ifdef __cplusplus
15097extern "C"
15098#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015099char sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015100int
15101main ()
15102{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015103return sem_init ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015104 ;
15105 return 0;
15106}
15107_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015108for ac_lib in '' pthread rt posix4; do
15109 if test -z "$ac_lib"; then
15110 ac_res="none required"
15111 else
15112 ac_res=-l$ac_lib
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015113 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015114 fi
15115 rm -f conftest.$ac_objext conftest$ac_exeext
15116if { (ac_try="$ac_link"
15117case "(($ac_try" in
15118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15119 *) ac_try_echo=$ac_try;;
15120esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015121eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15122$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015123 (eval "$ac_link") 2>conftest.er1
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015124 ac_status=$?
15125 grep -v '^ *+' conftest.er1 >conftest.err
15126 rm -f conftest.er1
15127 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015128 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015129 (exit $ac_status); } && {
15130 test -z "$ac_c_werror_flag" ||
15131 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015132 } && test -s conftest$ac_exeext && {
15133 test "$cross_compiling" = yes ||
15134 $as_test_x conftest$ac_exeext
15135 }; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015136 ac_cv_search_sem_init=$ac_res
Thomas Wouters477c8d52006-05-27 19:21:47 +000015137else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015138 $as_echo "$as_me: failed program was:" >&5
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015139sed 's/^/| /' conftest.$ac_ext >&5
15140
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015141
Thomas Wouters477c8d52006-05-27 19:21:47 +000015142fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015143
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015144rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015145rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15146 conftest$ac_exeext
15147 if test "${ac_cv_search_sem_init+set}" = set; then
15148 break
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000015149fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015150done
15151if test "${ac_cv_search_sem_init+set}" = set; then
15152 :
15153else
15154 ac_cv_search_sem_init=no
15155fi
15156rm conftest.$ac_ext
Martin v. Löwis82c19a72002-10-06 11:48:09 +000015157LIBS=$ac_func_search_save_LIBS
15158fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015159{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_sem_init" >&5
15160$as_echo "$ac_cv_search_sem_init" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015161ac_res=$ac_cv_search_sem_init
15162if test "$ac_res" != no; then
15163 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015164
Martin v. Löwis41933dd2002-03-21 15:10:58 +000015165fi
Martin v. Löwisd3545ec2003-05-03 11:25:43 +000015166 # 'Real Time' functions on Solaris
Martin v. Löwis519adae2003-09-20 10:47:47 +000015167 # posix4 on Solaris 2.6
15168 # pthread (first!) on Linux
15169fi
15170
Martin v. Löwis19d17342003-06-14 21:03:05 +000015171# check if we need libintl for locale functions
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015172{ $as_echo "$as_me:$LINENO: checking for textdomain in -lintl" >&5
15173$as_echo_n "checking for textdomain in -lintl... " >&6; }
Martin v. Löwis19d17342003-06-14 21:03:05 +000015174if test "${ac_cv_lib_intl_textdomain+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015175 $as_echo_n "(cached) " >&6
Martin v. Löwis19d17342003-06-14 21:03:05 +000015176else
15177 ac_check_lib_save_LIBS=$LIBS
15178LIBS="-lintl $LIBS"
15179cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015180/* confdefs.h. */
15181_ACEOF
15182cat confdefs.h >>conftest.$ac_ext
15183cat >>conftest.$ac_ext <<_ACEOF
15184/* end confdefs.h. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015185
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015186/* Override any GCC internal prototype to avoid an error.
15187 Use char because int might match the return type of a GCC
15188 builtin and then its argument prototype would still apply. */
Martin v. Löwis19d17342003-06-14 21:03:05 +000015189#ifdef __cplusplus
15190extern "C"
15191#endif
Martin v. Löwis19d17342003-06-14 21:03:05 +000015192char textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015193int
15194main ()
15195{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015196return textdomain ();
Martin v. Löwis19d17342003-06-14 21:03:05 +000015197 ;
15198 return 0;
15199}
15200_ACEOF
15201rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015202if { (ac_try="$ac_link"
15203case "(($ac_try" in
15204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15205 *) ac_try_echo=$ac_try;;
15206esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015207eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15208$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015209 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis19d17342003-06-14 21:03:05 +000015210 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015211 grep -v '^ *+' conftest.er1 >conftest.err
15212 rm -f conftest.er1
15213 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015214 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015215 (exit $ac_status); } && {
15216 test -z "$ac_c_werror_flag" ||
15217 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015218 } && test -s conftest$ac_exeext && {
15219 test "$cross_compiling" = yes ||
15220 $as_test_x conftest$ac_exeext
15221 }; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015222 ac_cv_lib_intl_textdomain=yes
15223else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015224 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015225sed 's/^/| /' conftest.$ac_ext >&5
15226
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015227 ac_cv_lib_intl_textdomain=no
Martin v. Löwis19d17342003-06-14 21:03:05 +000015228fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015229
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015230rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015231rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015232 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis19d17342003-06-14 21:03:05 +000015233LIBS=$ac_check_lib_save_LIBS
15234fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015235{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_intl_textdomain" >&5
15236$as_echo "$ac_cv_lib_intl_textdomain" >&6; }
15237if test "x$ac_cv_lib_intl_textdomain" = x""yes; then
Martin v. Löwis19d17342003-06-14 21:03:05 +000015238
15239cat >>confdefs.h <<\_ACEOF
15240#define WITH_LIBINTL 1
15241_ACEOF
15242
Brett Cannonc6d936e2009-06-07 20:09:53 +000015243 LIBS="-lintl $LIBS"
Martin v. Löwis19d17342003-06-14 21:03:05 +000015244fi
15245
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015246
15247# checks for system dependent C++ extensions support
15248case "$ac_sys_system" in
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015249 AIX*) { $as_echo "$as_me:$LINENO: checking for genuine AIX C++ extensions support" >&5
15250$as_echo_n "checking for genuine AIX C++ extensions support... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015251 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015252/* confdefs.h. */
15253_ACEOF
15254cat confdefs.h >>conftest.$ac_ext
15255cat >>conftest.$ac_ext <<_ACEOF
15256/* end confdefs.h. */
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015257#include "/usr/lpp/xlC/include/load.h"
Martin v. Löwis11437992002-04-12 09:54:03 +000015258int
15259main ()
15260{
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015261loadAndInit("", 0, "")
Martin v. Löwis11437992002-04-12 09:54:03 +000015262 ;
15263 return 0;
15264}
15265_ACEOF
15266rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015267if { (ac_try="$ac_link"
15268case "(($ac_try" in
15269 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15270 *) ac_try_echo=$ac_try;;
15271esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015272eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15273$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015274 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015275 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015276 grep -v '^ *+' conftest.er1 >conftest.err
15277 rm -f conftest.er1
15278 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015279 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015280 (exit $ac_status); } && {
15281 test -z "$ac_c_werror_flag" ||
15282 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015283 } && test -s conftest$ac_exeext && {
15284 test "$cross_compiling" = yes ||
15285 $as_test_x conftest$ac_exeext
15286 }; then
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015287
Martin v. Löwis11437992002-04-12 09:54:03 +000015288cat >>confdefs.h <<\_ACEOF
15289#define AIX_GENUINE_CPLUSPLUS 1
15290_ACEOF
15291
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015292 { $as_echo "$as_me:$LINENO: result: yes" >&5
15293$as_echo "yes" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015294else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015295 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015296sed 's/^/| /' conftest.$ac_ext >&5
15297
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015298 { $as_echo "$as_me:$LINENO: result: no" >&5
15299$as_echo "no" >&6; }
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015300fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015301
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015302rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015303rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015304 conftest$ac_exeext conftest.$ac_ext;;
Guido van Rossum0eefa3f1999-11-16 15:57:37 +000015305 *) ;;
15306esac
15307
Guido van Rossum70c7f481998-03-26 18:44:10 +000015308# Most SVR4 platforms (e.g. Solaris) need -lsocket and -lnsl.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015309{ $as_echo "$as_me:$LINENO: checking for t_open in -lnsl" >&5
15310$as_echo_n "checking for t_open in -lnsl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015311if test "${ac_cv_lib_nsl_t_open+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015312 $as_echo_n "(cached) " >&6
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015313else
Martin v. Löwis11437992002-04-12 09:54:03 +000015314 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015315LIBS="-lnsl $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015316cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015317/* confdefs.h. */
15318_ACEOF
15319cat confdefs.h >>conftest.$ac_ext
15320cat >>conftest.$ac_ext <<_ACEOF
15321/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015322
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015323/* Override any GCC internal prototype to avoid an error.
15324 Use char because int might match the return type of a GCC
15325 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015326#ifdef __cplusplus
15327extern "C"
15328#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015329char t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015330int
15331main ()
15332{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015333return t_open ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015334 ;
15335 return 0;
15336}
15337_ACEOF
15338rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015339if { (ac_try="$ac_link"
15340case "(($ac_try" in
15341 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15342 *) ac_try_echo=$ac_try;;
15343esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015344eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15345$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015346 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015347 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015348 grep -v '^ *+' conftest.er1 >conftest.err
15349 rm -f conftest.er1
15350 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015351 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015352 (exit $ac_status); } && {
15353 test -z "$ac_c_werror_flag" ||
15354 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015355 } && test -s conftest$ac_exeext && {
15356 test "$cross_compiling" = yes ||
15357 $as_test_x conftest$ac_exeext
15358 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015359 ac_cv_lib_nsl_t_open=yes
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015360else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015361 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015362sed 's/^/| /' conftest.$ac_ext >&5
15363
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015364 ac_cv_lib_nsl_t_open=no
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015365fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015366
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015367rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015368rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015369 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015370LIBS=$ac_check_lib_save_LIBS
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015371fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015372{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_t_open" >&5
15373$as_echo "$ac_cv_lib_nsl_t_open" >&6; }
15374if test "x$ac_cv_lib_nsl_t_open" = x""yes; then
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015375 LIBS="-lnsl $LIBS"
Guido van Rossum79dddcb1995-01-12 12:25:42 +000015376fi
Guido van Rossum0ddb0281995-01-17 16:46:14 +000015377 # SVR4
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015378{ $as_echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
15379$as_echo_n "checking for socket in -lsocket... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015380if test "${ac_cv_lib_socket_socket+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015381 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000015382else
Martin v. Löwis11437992002-04-12 09:54:03 +000015383 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000015384LIBS="-lsocket $LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000015385cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015386/* confdefs.h. */
15387_ACEOF
15388cat confdefs.h >>conftest.$ac_ext
15389cat >>conftest.$ac_ext <<_ACEOF
15390/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015391
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015392/* Override any GCC internal prototype to avoid an error.
15393 Use char because int might match the return type of a GCC
15394 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015395#ifdef __cplusplus
15396extern "C"
15397#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015398char socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015399int
15400main ()
15401{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015402return socket ();
Martin v. Löwis11437992002-04-12 09:54:03 +000015403 ;
15404 return 0;
15405}
15406_ACEOF
15407rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015408if { (ac_try="$ac_link"
15409case "(($ac_try" in
15410 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15411 *) ac_try_echo=$ac_try;;
15412esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015413eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15414$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015415 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015416 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015417 grep -v '^ *+' conftest.er1 >conftest.err
15418 rm -f conftest.er1
15419 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015420 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015421 (exit $ac_status); } && {
15422 test -z "$ac_c_werror_flag" ||
15423 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015424 } && test -s conftest$ac_exeext && {
15425 test "$cross_compiling" = yes ||
15426 $as_test_x conftest$ac_exeext
15427 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015428 ac_cv_lib_socket_socket=yes
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015429else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015430 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015431sed 's/^/| /' conftest.$ac_ext >&5
15432
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015433 ac_cv_lib_socket_socket=no
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015434fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015435
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015436rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015437rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000015438 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000015439LIBS=$ac_check_lib_save_LIBS
Guido van Rossumec95c7b1998-08-04 17:59:56 +000015440fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015441{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
15442$as_echo "$ac_cv_lib_socket_socket" >&6; }
15443if test "x$ac_cv_lib_socket_socket" = x""yes; then
Guido van Rossumad678af1998-10-02 14:42:15 +000015444 LIBS="-lsocket $LIBS"
Guido van Rossumad678af1998-10-02 14:42:15 +000015445fi
15446 # SVR4 sockets
Skip Montanarob9949db2004-01-17 04:04:13 +000015447
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015448{ $as_echo "$as_me:$LINENO: checking for --with-libs" >&5
15449$as_echo_n "checking for --with-libs... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015451# Check whether --with-libs was given.
Guido van Rossuma68acba1996-07-31 17:36:39 +000015452if test "${with_libs+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015453 withval=$with_libs;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015454{ $as_echo "$as_me:$LINENO: result: $withval" >&5
15455$as_echo "$withval" >&6; }
Guido van Rossuma68acba1996-07-31 17:36:39 +000015456LIBS="$withval $LIBS"
15457
15458else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015459 { $as_echo "$as_me:$LINENO: result: no" >&5
15460$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015461fi
15462
Guido van Rossum7f43da71994-08-01 12:15:30 +000015463
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015464# Check for use of the system libffi library
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015465{ $as_echo "$as_me:$LINENO: checking for --with-system-ffi" >&5
15466$as_echo_n "checking for --with-system-ffi... " >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015467
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015468# Check whether --with-system_ffi was given.
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015469if test "${with_system_ffi+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015470 withval=$with_system_ffi;
15471fi
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015472
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015473
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015474{ $as_echo "$as_me:$LINENO: result: $with_system_ffi" >&5
15475$as_echo "$with_system_ffi" >&6; }
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000015476
Matthias Klose55708cc2009-04-30 08:06:49 +000015477# Check for --with-dbmliborder
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015478{ $as_echo "$as_me:$LINENO: checking for --with-dbmliborder" >&5
15479$as_echo_n "checking for --with-dbmliborder... " >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015480
15481# Check whether --with-dbmliborder was given.
15482if test "${with_dbmliborder+set}" = set; then
15483 withval=$with_dbmliborder;
15484if test x$with_dbmliborder = xyes
15485then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015486{ { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15487$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015488 { (exit 1); exit 1; }; }
15489else
15490 for db in `echo $with_dbmliborder | sed 's/:/ /g'`; do
15491 if test x$db != xndbm && test x$db != xgdbm && test x$db != xbdb
15492 then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015493 { { $as_echo "$as_me:$LINENO: error: proper usage is --with-dbmliborder=db1:db2:..." >&5
15494$as_echo "$as_me: error: proper usage is --with-dbmliborder=db1:db2:..." >&2;}
Matthias Klose55708cc2009-04-30 08:06:49 +000015495 { (exit 1); exit 1; }; }
15496 fi
15497 done
15498fi
15499fi
15500
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015501{ $as_echo "$as_me:$LINENO: result: $with_dbmliborder" >&5
15502$as_echo "$with_dbmliborder" >&6; }
Matthias Klose55708cc2009-04-30 08:06:49 +000015503
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015504# Determine if signalmodule should be used.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015505
15506
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015507{ $as_echo "$as_me:$LINENO: checking for --with-signal-module" >&5
15508$as_echo_n "checking for --with-signal-module... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015509
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015510# Check whether --with-signal-module was given.
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015511if test "${with_signal_module+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015512 withval=$with_signal_module;
15513fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015514
15515
15516if test -z "$with_signal_module"
15517then with_signal_module="yes"
15518fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015519{ $as_echo "$as_me:$LINENO: result: $with_signal_module" >&5
15520$as_echo "$with_signal_module" >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000015521
15522if test "${with_signal_module}" = "yes"; then
15523 USE_SIGNAL_MODULE=""
15524 SIGNAL_OBJS=""
15525else
15526 USE_SIGNAL_MODULE="#"
15527 SIGNAL_OBJS="Parser/intrcheck.o Python/sigcheck.o"
15528fi
15529
Guido van Rossum3d15bd82001-01-10 18:53:48 +000015530# This is used to generate Setup.config
Guido van Rossum009f7871997-12-04 00:51:42 +000015531
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015532USE_THREAD_MODULE=""
Guido van Rossum009f7871997-12-04 00:51:42 +000015533
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015534{ $as_echo "$as_me:$LINENO: checking for --with-dec-threads" >&5
15535$as_echo_n "checking for --with-dec-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015536
Guido van Rossumec2f0731997-01-22 20:54:01 +000015537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015538# Check whether --with-dec-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015539if test "${with_dec_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015540 withval=$with_dec_threads;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015541{ $as_echo "$as_me:$LINENO: result: $withval" >&5
15542$as_echo "$withval" >&6; }
Guido van Rossumec2f0731997-01-22 20:54:01 +000015543LDLAST=-threads
Guido van Rossumf78abae1997-01-21 22:02:36 +000015544if test "${with_thread+set}" != set; then
Guido van Rossumec2f0731997-01-22 20:54:01 +000015545 with_thread="$withval";
Guido van Rossumf78abae1997-01-21 22:02:36 +000015546fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015547else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015548 { $as_echo "$as_me:$LINENO: result: no" >&5
15549$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015550fi
15551
Martin v. Löwis11437992002-04-12 09:54:03 +000015552
15553# Templates for things AC_DEFINEd more than once.
15554# For a single AC_DEFINE, no template is needed.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015555
15556
Martin v. Löwis11437992002-04-12 09:54:03 +000015557
15558
15559
15560
15561
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015562{ $as_echo "$as_me:$LINENO: checking for --with-threads" >&5
15563$as_echo_n "checking for --with-threads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015565# Check whether --with-threads was given.
Guido van Rossumec2f0731997-01-22 20:54:01 +000015566if test "${with_threads+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015567 withval=$with_threads;
15568fi
Guido van Rossumec2f0731997-01-22 20:54:01 +000015569
15570
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015571# --with-thread is deprecated, but check for it anyway
Martin v. Löwis11437992002-04-12 09:54:03 +000015572
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015573# Check whether --with-thread was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000015574if test "${with_thread+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015575 withval=$with_thread; with_threads=$with_thread
15576fi
15577
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015578
15579if test -z "$with_threads"
15580then with_threads="yes"
15581fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015582{ $as_echo "$as_me:$LINENO: result: $with_threads" >&5
15583$as_echo "$with_threads" >&6; }
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015584
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015585
Barry Warsawc0d24d8b2000-06-29 16:12:00 +000015586if test "$with_threads" = "no"
15587then
15588 USE_THREAD_MODULE="#"
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015589elif test "$ac_cv_pthread_is_default" = yes
15590then
Martin v. Löwis11437992002-04-12 09:54:03 +000015591 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015592#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015593_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015594
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015595 # Defining _REENTRANT on system with POSIX threads should not hurt.
Martin v. Löwis11437992002-04-12 09:54:03 +000015596 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015597#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015598_ACEOF
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000015599
15600 posix_threads=yes
Martin v. Löwis11437992002-04-12 09:54:03 +000015601 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015602elif test "$ac_cv_kpthread" = "yes"
15603then
15604 CC="$CC -Kpthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015605 if test "$ac_cv_cxx_thread" = "yes"; then
15606 CXX="$CXX -Kpthread"
15607 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000015608 cat >>confdefs.h <<\_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015609#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015610_ACEOF
Guido van Rossum2242f2f2001-04-11 20:58:20 +000015611
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000015612 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015613 THREADOBJ="Python/thread.o"
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015614elif test "$ac_cv_kthread" = "yes"
15615then
15616 CC="$CC -Kthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015617 if test "$ac_cv_cxx_thread" = "yes"; then
15618 CXX="$CXX -Kthread"
15619 fi
Martin v. Löwis5f433f02003-05-05 05:05:30 +000015620 cat >>confdefs.h <<\_ACEOF
15621#define WITH_THREAD 1
15622_ACEOF
15623
15624 posix_threads=yes
15625 THREADOBJ="Python/thread.o"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015626elif test "$ac_cv_pthread" = "yes"
15627then
15628 CC="$CC -pthread"
Martin v. Löwis519adae2003-09-20 10:47:47 +000015629 if test "$ac_cv_cxx_thread" = "yes"; then
15630 CXX="$CXX -pthread"
15631 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000015632 cat >>confdefs.h <<\_ACEOF
15633#define WITH_THREAD 1
15634_ACEOF
15635
15636 posix_threads=yes
15637 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000015638else
15639 if test ! -z "$with_threads" -a -d "$with_threads"
15640 then LDFLAGS="$LDFLAGS -L$with_threads"
15641 fi
15642 if test ! -z "$withval" -a -d "$withval"
15643 then LDFLAGS="$LDFLAGS -L$withval"
15644 fi
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015645
15646 # According to the POSIX spec, a pthreads implementation must
Matthias Klosea2542be2004-08-16 11:35:51 +000015647 # define _POSIX_THREADS in unistd.h. Some apparently don't
15648 # (e.g. gnu pth with pthread emulation)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015649 { $as_echo "$as_me:$LINENO: checking for _POSIX_THREADS in unistd.h" >&5
15650$as_echo_n "checking for _POSIX_THREADS in unistd.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015651 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015652/* confdefs.h. */
15653_ACEOF
15654cat confdefs.h >>conftest.$ac_ext
15655cat >>conftest.$ac_ext <<_ACEOF
15656/* end confdefs.h. */
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015657
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015658#include <unistd.h>
Neal Norwitz6eb37f02003-02-23 23:28:15 +000015659#ifdef _POSIX_THREADS
15660yes
15661#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000015662
15663_ACEOF
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015664if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000015665 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015666 unistd_defines_pthreads=yes
15667else
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015668 unistd_defines_pthreads=no
15669fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015670rm -f conftest*
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015671
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015672 { $as_echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
15673$as_echo "$unistd_defines_pthreads" >&6; }
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000015674
Martin v. Löwis11437992002-04-12 09:54:03 +000015675 cat >>confdefs.h <<\_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015676#define _REENTRANT 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015677_ACEOF
Guido van Rossum9caf77a1996-08-01 00:52:26 +000015678
Martin v. Löwis11437992002-04-12 09:54:03 +000015679 if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015680 { $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
15681$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015682if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015683 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015684fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015685{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15686$as_echo "$ac_cv_header_cthreads_h" >&6; }
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015687else
Martin v. Löwis11437992002-04-12 09:54:03 +000015688 # Is the header compilable?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015689{ $as_echo "$as_me:$LINENO: checking cthreads.h usability" >&5
15690$as_echo_n "checking cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015691cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015692/* confdefs.h. */
15693_ACEOF
15694cat confdefs.h >>conftest.$ac_ext
15695cat >>conftest.$ac_ext <<_ACEOF
15696/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015697$ac_includes_default
15698#include <cthreads.h>
15699_ACEOF
15700rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015701if { (ac_try="$ac_compile"
15702case "(($ac_try" in
15703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15704 *) ac_try_echo=$ac_try;;
15705esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015706eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15707$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015708 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015709 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015710 grep -v '^ *+' conftest.er1 >conftest.err
15711 rm -f conftest.er1
15712 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015713 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015714 (exit $ac_status); } && {
15715 test -z "$ac_c_werror_flag" ||
15716 test ! -s conftest.err
15717 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015718 ac_header_compiler=yes
15719else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015720 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015721sed 's/^/| /' conftest.$ac_ext >&5
15722
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015723 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015724fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015725
15726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015727{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15728$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015729
15730# Is the header present?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015731{ $as_echo "$as_me:$LINENO: checking cthreads.h presence" >&5
15732$as_echo_n "checking cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015733cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015734/* confdefs.h. */
15735_ACEOF
15736cat confdefs.h >>conftest.$ac_ext
15737cat >>conftest.$ac_ext <<_ACEOF
15738/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015739#include <cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015740_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015741if { (ac_try="$ac_cpp conftest.$ac_ext"
15742case "(($ac_try" in
15743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15744 *) ac_try_echo=$ac_try;;
15745esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015746eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15747$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015748 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015749 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015750 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015751 rm -f conftest.er1
15752 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015753 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015754 (exit $ac_status); } >/dev/null && {
15755 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15756 test ! -s conftest.err
15757 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015758 ac_header_preproc=yes
15759else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015760 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015761sed 's/^/| /' conftest.$ac_ext >&5
15762
Martin v. Löwis11437992002-04-12 09:54:03 +000015763 ac_header_preproc=no
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015764fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015765
Martin v. Löwis11437992002-04-12 09:54:03 +000015766rm -f conftest.err conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015767{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15768$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015769
15770# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015771case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15772 yes:no: )
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015773 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15774$as_echo "$as_me: WARNING: cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15775 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the compiler's result" >&5
15776$as_echo "$as_me: WARNING: cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015777 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015778 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015779 no:yes:* )
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015780 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: present but cannot be compiled" >&5
15781$as_echo "$as_me: WARNING: cthreads.h: present but cannot be compiled" >&2;}
15782 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: check for missing prerequisite headers?" >&5
15783$as_echo "$as_me: WARNING: cthreads.h: check for missing prerequisite headers?" >&2;}
15784 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: see the Autoconf documentation" >&5
15785$as_echo "$as_me: WARNING: cthreads.h: see the Autoconf documentation" >&2;}
15786 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15787$as_echo "$as_me: WARNING: cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15788 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: proceeding with the preprocessor's result" >&5
15789$as_echo "$as_me: WARNING: cthreads.h: proceeding with the preprocessor's result" >&2;}
15790 { $as_echo "$as_me:$LINENO: WARNING: cthreads.h: in the future, the compiler will take precedence" >&5
15791$as_echo "$as_me: WARNING: cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015792 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015793## -------------------------------------- ##
15794## Report this to http://bugs.python.org/ ##
15795## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015796_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015797 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015798 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015799esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015800{ $as_echo "$as_me:$LINENO: checking for cthreads.h" >&5
15801$as_echo_n "checking for cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015802if test "${ac_cv_header_cthreads_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015803 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015804else
15805 ac_cv_header_cthreads_h=$ac_header_preproc
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015806fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015807{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_cthreads_h" >&5
15808$as_echo "$ac_cv_header_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015809
15810fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015811if test "x$ac_cv_header_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015812 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015813#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015814_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015815
Martin v. Löwis11437992002-04-12 09:54:03 +000015816 cat >>confdefs.h <<\_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015817#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015818_ACEOF
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015819
Martin v. Löwis11437992002-04-12 09:54:03 +000015820
15821cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015822#define HURD_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015823_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015824
15825 LIBS="$LIBS -lthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015826 THREADOBJ="Python/thread.o"
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015827else
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015828
Martin v. Löwis11437992002-04-12 09:54:03 +000015829 if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015830 { $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15831$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015832if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015833 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015834fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015835{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15836$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015837else
Martin v. Löwis11437992002-04-12 09:54:03 +000015838 # Is the header compilable?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015839{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h usability" >&5
15840$as_echo_n "checking mach/cthreads.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015841cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015842/* confdefs.h. */
15843_ACEOF
15844cat confdefs.h >>conftest.$ac_ext
15845cat >>conftest.$ac_ext <<_ACEOF
15846/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000015847$ac_includes_default
15848#include <mach/cthreads.h>
15849_ACEOF
15850rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015851if { (ac_try="$ac_compile"
15852case "(($ac_try" in
15853 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15854 *) ac_try_echo=$ac_try;;
15855esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015856eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15857$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015858 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015859 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015860 grep -v '^ *+' conftest.er1 >conftest.err
15861 rm -f conftest.er1
15862 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015863 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015864 (exit $ac_status); } && {
15865 test -z "$ac_c_werror_flag" ||
15866 test ! -s conftest.err
15867 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015868 ac_header_compiler=yes
15869else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015870 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015871sed 's/^/| /' conftest.$ac_ext >&5
15872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015873 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000015874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015875
15876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015877{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
15878$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015879
15880# Is the header present?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015881{ $as_echo "$as_me:$LINENO: checking mach/cthreads.h presence" >&5
15882$as_echo_n "checking mach/cthreads.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015883cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000015884/* confdefs.h. */
15885_ACEOF
15886cat confdefs.h >>conftest.$ac_ext
15887cat >>conftest.$ac_ext <<_ACEOF
15888/* end confdefs.h. */
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015889#include <mach/cthreads.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000015890_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015891if { (ac_try="$ac_cpp conftest.$ac_ext"
15892case "(($ac_try" in
15893 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15894 *) ac_try_echo=$ac_try;;
15895esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015896eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
15897$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015898 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000015899 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000015900 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000015901 rm -f conftest.er1
15902 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015903 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015904 (exit $ac_status); } >/dev/null && {
15905 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
15906 test ! -s conftest.err
15907 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015908 ac_header_preproc=yes
15909else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015910 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000015911sed 's/^/| /' conftest.$ac_ext >&5
15912
Martin v. Löwis11437992002-04-12 09:54:03 +000015913 ac_header_preproc=no
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015914fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015915
Martin v. Löwis11437992002-04-12 09:54:03 +000015916rm -f conftest.err conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015917{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
15918$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015919
15920# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000015921case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
15922 yes:no: )
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015923 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&5
15924$as_echo "$as_me: WARNING: mach/cthreads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
15925 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&5
15926$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000015927 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000015928 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000015929 no:yes:* )
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015930 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: present but cannot be compiled" >&5
15931$as_echo "$as_me: WARNING: mach/cthreads.h: present but cannot be compiled" >&2;}
15932 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&5
15933$as_echo "$as_me: WARNING: mach/cthreads.h: check for missing prerequisite headers?" >&2;}
15934 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: see the Autoconf documentation" >&5
15935$as_echo "$as_me: WARNING: mach/cthreads.h: see the Autoconf documentation" >&2;}
15936 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&5
15937$as_echo "$as_me: WARNING: mach/cthreads.h: section \"Present But Cannot Be Compiled\"" >&2;}
15938 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&5
15939$as_echo "$as_me: WARNING: mach/cthreads.h: proceeding with the preprocessor's result" >&2;}
15940 { $as_echo "$as_me:$LINENO: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&5
15941$as_echo "$as_me: WARNING: mach/cthreads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015942 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000015943## -------------------------------------- ##
15944## Report this to http://bugs.python.org/ ##
15945## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000015946_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015947 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000015948 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000015949esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015950{ $as_echo "$as_me:$LINENO: checking for mach/cthreads.h" >&5
15951$as_echo_n "checking for mach/cthreads.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015952if test "${ac_cv_header_mach_cthreads_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015953 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000015954else
15955 ac_cv_header_mach_cthreads_h=$ac_header_preproc
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015956fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015957{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_mach_cthreads_h" >&5
15958$as_echo "$ac_cv_header_mach_cthreads_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015959
15960fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015961if test "x$ac_cv_header_mach_cthreads_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000015962 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015963#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015964_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015965
Martin v. Löwis11437992002-04-12 09:54:03 +000015966 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015967#define C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015968_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015969
Martin v. Löwis11437992002-04-12 09:54:03 +000015970
15971cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015972#define MACH_C_THREADS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015973_ACEOF
Martin v. Löwisa6e97582002-01-01 18:41:33 +000015974
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000015975 THREADOBJ="Python/thread.o"
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015976else
Guido van Rossum7b3853f1996-07-30 18:09:35 +000015977
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015978 { $as_echo "$as_me:$LINENO: checking for --with-pth" >&5
15979$as_echo_n "checking for --with-pth... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000015980
Thomas Wouters47b49bf2007-08-30 22:15:33 +000015981# Check whether --with-pth was given.
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015982if test "${with_pth+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015983 withval=$with_pth; { $as_echo "$as_me:$LINENO: result: $withval" >&5
15984$as_echo "$withval" >&6; }
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015985 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000015986#define WITH_THREAD 1
15987_ACEOF
15988
15989
15990cat >>confdefs.h <<\_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015991#define HAVE_PTH 1
Martin v. Löwis11437992002-04-12 09:54:03 +000015992_ACEOF
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015993
Martin v. Löwis3e2c6322002-10-29 10:07:43 +000015994 LIBS="-lpth $LIBS"
15995 THREADOBJ="Python/thread.o"
Guido van Rossum9e8181b2000-09-19 00:46:46 +000015996else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000015997 { $as_echo "$as_me:$LINENO: result: no" >&5
15998$as_echo "no" >&6; }
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000015999
16000 # Just looking for pthread_create in libpthread is not enough:
16001 # on HP/UX, pthread.h renames pthread_create to a different symbol name.
16002 # So we really have to include pthread.h, and then link.
16003 _libs=$LIBS
16004 LIBS="$LIBS -lpthread"
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016005 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
16006$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016007 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016008/* confdefs.h. */
16009_ACEOF
16010cat confdefs.h >>conftest.$ac_ext
16011cat >>conftest.$ac_ext <<_ACEOF
16012/* end confdefs.h. */
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016013#include <pthread.h>
Guido van Rossum02a1c402000-02-25 19:26:31 +000016014
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016015void * start_routine (void *arg) { exit (0); }
Martin v. Löwis11437992002-04-12 09:54:03 +000016016int
16017main ()
16018{
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016019
16020pthread_create (NULL, NULL, start_routine, NULL)
Martin v. Löwis11437992002-04-12 09:54:03 +000016021 ;
16022 return 0;
16023}
16024_ACEOF
16025rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016026if { (ac_try="$ac_link"
16027case "(($ac_try" in
16028 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16029 *) ac_try_echo=$ac_try;;
16030esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016031eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16032$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016033 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016034 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016035 grep -v '^ *+' conftest.er1 >conftest.err
16036 rm -f conftest.er1
16037 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016038 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016039 (exit $ac_status); } && {
16040 test -z "$ac_c_werror_flag" ||
16041 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016042 } && test -s conftest$ac_exeext && {
16043 test "$cross_compiling" = yes ||
16044 $as_test_x conftest$ac_exeext
16045 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016046
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016047 { $as_echo "$as_me:$LINENO: result: yes" >&5
16048$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016049 cat >>confdefs.h <<\_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016050#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016051_ACEOF
Guido van Rossum02a1c402000-02-25 19:26:31 +000016052
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016053 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016054 THREADOBJ="Python/thread.o"
Guido van Rossum02a1c402000-02-25 19:26:31 +000016055else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016056 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016057sed 's/^/| /' conftest.$ac_ext >&5
16058
Martin v. Löwis11437992002-04-12 09:54:03 +000016059
Martin v. Löwis8158b5a2001-10-08 13:17:28 +000016060 LIBS=$_libs
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016061 { $as_echo "$as_me:$LINENO: checking for pthread_detach" >&5
16062$as_echo_n "checking for pthread_detach... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016063if test "${ac_cv_func_pthread_detach+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016064 $as_echo_n "(cached) " >&6
Guido van Rossumad678af1998-10-02 14:42:15 +000016065else
Martin v. Löwis11437992002-04-12 09:54:03 +000016066 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016067/* confdefs.h. */
16068_ACEOF
16069cat confdefs.h >>conftest.$ac_ext
16070cat >>conftest.$ac_ext <<_ACEOF
16071/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016072/* Define pthread_detach to an innocuous variant, in case <limits.h> declares pthread_detach.
16073 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16074#define pthread_detach innocuous_pthread_detach
16075
Guido van Rossumad678af1998-10-02 14:42:15 +000016076/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016077 which can conflict with char pthread_detach (); below.
16078 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016079 <limits.h> exists even on freestanding compilers. */
16080
16081#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016082# include <limits.h>
16083#else
16084# include <assert.h>
16085#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016086
16087#undef pthread_detach
16088
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016089/* Override any GCC internal prototype to avoid an error.
16090 Use char because int might match the return type of a GCC
16091 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016092#ifdef __cplusplus
16093extern "C"
16094#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016095char pthread_detach ();
Guido van Rossumad678af1998-10-02 14:42:15 +000016096/* The GNU C library defines this for functions which it implements
16097 to always fail with ENOSYS. Some functions are actually named
16098 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016099#if defined __stub_pthread_detach || defined __stub___pthread_detach
Guido van Rossumad678af1998-10-02 14:42:15 +000016100choke me
Guido van Rossumad678af1998-10-02 14:42:15 +000016101#endif
16102
Skip Montanaro6dead952003-09-25 14:50:04 +000016103int
16104main ()
16105{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016106return pthread_detach ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016107 ;
16108 return 0;
16109}
16110_ACEOF
16111rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016112if { (ac_try="$ac_link"
16113case "(($ac_try" in
16114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16115 *) ac_try_echo=$ac_try;;
16116esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016117eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16118$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016119 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016120 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016121 grep -v '^ *+' conftest.er1 >conftest.err
16122 rm -f conftest.er1
16123 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016124 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016125 (exit $ac_status); } && {
16126 test -z "$ac_c_werror_flag" ||
16127 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016128 } && test -s conftest$ac_exeext && {
16129 test "$cross_compiling" = yes ||
16130 $as_test_x conftest$ac_exeext
16131 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016132 ac_cv_func_pthread_detach=yes
Guido van Rossumad678af1998-10-02 14:42:15 +000016133else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016134 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016135sed 's/^/| /' conftest.$ac_ext >&5
16136
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016137 ac_cv_func_pthread_detach=no
Guido van Rossumad678af1998-10-02 14:42:15 +000016138fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016139
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016140rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016141rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016142 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumad678af1998-10-02 14:42:15 +000016143fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016144{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_pthread_detach" >&5
16145$as_echo "$ac_cv_func_pthread_detach" >&6; }
16146if test "x$ac_cv_func_pthread_detach" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016147 cat >>confdefs.h <<\_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016148#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016149_ACEOF
Guido van Rossumad678af1998-10-02 14:42:15 +000016150
Martin v. Löwis69c0ff32001-10-15 14:34:42 +000016151 posix_threads=yes
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016152 THREADOBJ="Python/thread.o"
Guido van Rossumad678af1998-10-02 14:42:15 +000016153else
Guido van Rossumad678af1998-10-02 14:42:15 +000016154
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016155 if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016156 { $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16157$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016158if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016159 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016160fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016161{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16162$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016163else
16164 # Is the header compilable?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016165{ $as_echo "$as_me:$LINENO: checking atheos/threads.h usability" >&5
16166$as_echo_n "checking atheos/threads.h usability... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016167cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016168/* confdefs.h. */
16169_ACEOF
16170cat confdefs.h >>conftest.$ac_ext
16171cat >>conftest.$ac_ext <<_ACEOF
16172/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016173$ac_includes_default
16174#include <atheos/threads.h>
16175_ACEOF
16176rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016177if { (ac_try="$ac_compile"
16178case "(($ac_try" in
16179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16180 *) ac_try_echo=$ac_try;;
16181esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016182eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16183$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016184 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016185 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016186 grep -v '^ *+' conftest.er1 >conftest.err
16187 rm -f conftest.er1
16188 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016189 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016190 (exit $ac_status); } && {
16191 test -z "$ac_c_werror_flag" ||
16192 test ! -s conftest.err
16193 } && test -s conftest.$ac_objext; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016194 ac_header_compiler=yes
16195else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016196 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016197sed 's/^/| /' conftest.$ac_ext >&5
16198
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016199 ac_header_compiler=no
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016200fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016201
16202rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016203{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
16204$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016205
16206# Is the header present?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016207{ $as_echo "$as_me:$LINENO: checking atheos/threads.h presence" >&5
16208$as_echo_n "checking atheos/threads.h presence... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016209cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016210/* confdefs.h. */
16211_ACEOF
16212cat confdefs.h >>conftest.$ac_ext
16213cat >>conftest.$ac_ext <<_ACEOF
16214/* end confdefs.h. */
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016215#include <atheos/threads.h>
16216_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016217if { (ac_try="$ac_cpp conftest.$ac_ext"
16218case "(($ac_try" in
16219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16220 *) ac_try_echo=$ac_try;;
16221esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016222eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16223$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016224 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016225 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000016226 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016227 rm -f conftest.er1
16228 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016229 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016230 (exit $ac_status); } >/dev/null && {
16231 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
16232 test ! -s conftest.err
16233 }; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016234 ac_header_preproc=yes
16235else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016236 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016237sed 's/^/| /' conftest.$ac_ext >&5
16238
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016239 ac_header_preproc=no
16240fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016241
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016242rm -f conftest.err conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016243{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
16244$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016245
16246# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016247case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
16248 yes:no: )
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016249 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&5
16250$as_echo "$as_me: WARNING: atheos/threads.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
16251 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the compiler's result" >&5
16252$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000016253 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000016254 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000016255 no:yes:* )
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016256 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: present but cannot be compiled" >&5
16257$as_echo "$as_me: WARNING: atheos/threads.h: present but cannot be compiled" >&2;}
16258 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&5
16259$as_echo "$as_me: WARNING: atheos/threads.h: check for missing prerequisite headers?" >&2;}
16260 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: see the Autoconf documentation" >&5
16261$as_echo "$as_me: WARNING: atheos/threads.h: see the Autoconf documentation" >&2;}
16262 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&5
16263$as_echo "$as_me: WARNING: atheos/threads.h: section \"Present But Cannot Be Compiled\"" >&2;}
16264 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&5
16265$as_echo "$as_me: WARNING: atheos/threads.h: proceeding with the preprocessor's result" >&2;}
16266 { $as_echo "$as_me:$LINENO: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&5
16267$as_echo "$as_me: WARNING: atheos/threads.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016268 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000016269## -------------------------------------- ##
16270## Report this to http://bugs.python.org/ ##
16271## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000016272_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016273 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000016274 ;;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016275esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016276{ $as_echo "$as_me:$LINENO: checking for atheos/threads.h" >&5
16277$as_echo_n "checking for atheos/threads.h... " >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016278if test "${ac_cv_header_atheos_threads_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016279 $as_echo_n "(cached) " >&6
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016280else
16281 ac_cv_header_atheos_threads_h=$ac_header_preproc
16282fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016283{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_atheos_threads_h" >&5
16284$as_echo "$ac_cv_header_atheos_threads_h" >&6; }
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016285
16286fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016287if test "x$ac_cv_header_atheos_threads_h" = x""yes; then
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016288 cat >>confdefs.h <<\_ACEOF
16289#define WITH_THREAD 1
16290_ACEOF
16291
16292
16293cat >>confdefs.h <<\_ACEOF
16294#define ATHEOS_THREADS 1
16295_ACEOF
16296
16297 THREADOBJ="Python/thread.o"
16298else
16299
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016300 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthreads" >&5
16301$as_echo_n "checking for pthread_create in -lpthreads... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016302if test "${ac_cv_lib_pthreads_pthread_create+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016303 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016304else
Martin v. Löwis11437992002-04-12 09:54:03 +000016305 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016306LIBS="-lpthreads $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016307cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016308/* confdefs.h. */
16309_ACEOF
16310cat confdefs.h >>conftest.$ac_ext
16311cat >>conftest.$ac_ext <<_ACEOF
16312/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016313
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016314/* Override any GCC internal prototype to avoid an error.
16315 Use char because int might match the return type of a GCC
16316 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016317#ifdef __cplusplus
16318extern "C"
16319#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016320char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016321int
16322main ()
16323{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016324return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016325 ;
16326 return 0;
16327}
16328_ACEOF
16329rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016330if { (ac_try="$ac_link"
16331case "(($ac_try" in
16332 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16333 *) ac_try_echo=$ac_try;;
16334esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016335eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16336$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016337 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016338 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016339 grep -v '^ *+' conftest.er1 >conftest.err
16340 rm -f conftest.er1
16341 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016342 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016343 (exit $ac_status); } && {
16344 test -z "$ac_c_werror_flag" ||
16345 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016346 } && test -s conftest$ac_exeext && {
16347 test "$cross_compiling" = yes ||
16348 $as_test_x conftest$ac_exeext
16349 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016350 ac_cv_lib_pthreads_pthread_create=yes
Greg Steinadf63d62000-07-05 10:38:09 +000016351else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016352 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016353sed 's/^/| /' conftest.$ac_ext >&5
16354
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016355 ac_cv_lib_pthreads_pthread_create=no
Greg Steinadf63d62000-07-05 10:38:09 +000016356fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016357
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016358rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016359rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016360 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016361LIBS=$ac_check_lib_save_LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016362fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016363{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthreads_pthread_create" >&5
16364$as_echo "$ac_cv_lib_pthreads_pthread_create" >&6; }
16365if test "x$ac_cv_lib_pthreads_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016366 cat >>confdefs.h <<\_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016367#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016368_ACEOF
Greg Steinadf63d62000-07-05 10:38:09 +000016369
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016370 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016371 LIBS="$LIBS -lpthreads"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016372 THREADOBJ="Python/thread.o"
Greg Steinadf63d62000-07-05 10:38:09 +000016373else
Greg Steinadf63d62000-07-05 10:38:09 +000016374
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016375 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lc_r" >&5
16376$as_echo_n "checking for pthread_create in -lc_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016377if test "${ac_cv_lib_c_r_pthread_create+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016378 $as_echo_n "(cached) " >&6
Greg Steinadf63d62000-07-05 10:38:09 +000016379else
Martin v. Löwis11437992002-04-12 09:54:03 +000016380 ac_check_lib_save_LIBS=$LIBS
Greg Steinadf63d62000-07-05 10:38:09 +000016381LIBS="-lc_r $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016382cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016383/* confdefs.h. */
16384_ACEOF
16385cat confdefs.h >>conftest.$ac_ext
16386cat >>conftest.$ac_ext <<_ACEOF
16387/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016388
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016389/* Override any GCC internal prototype to avoid an error.
16390 Use char because int might match the return type of a GCC
16391 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016392#ifdef __cplusplus
16393extern "C"
16394#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016395char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016396int
16397main ()
16398{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016399return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016400 ;
16401 return 0;
16402}
16403_ACEOF
16404rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016405if { (ac_try="$ac_link"
16406case "(($ac_try" in
16407 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16408 *) ac_try_echo=$ac_try;;
16409esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016410eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16411$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016412 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016413 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016414 grep -v '^ *+' conftest.er1 >conftest.err
16415 rm -f conftest.er1
16416 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016417 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016418 (exit $ac_status); } && {
16419 test -z "$ac_c_werror_flag" ||
16420 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016421 } && test -s conftest$ac_exeext && {
16422 test "$cross_compiling" = yes ||
16423 $as_test_x conftest$ac_exeext
16424 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016425 ac_cv_lib_c_r_pthread_create=yes
Guido van Rossum49545951997-12-02 19:28:29 +000016426else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016427 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016428sed 's/^/| /' conftest.$ac_ext >&5
16429
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016430 ac_cv_lib_c_r_pthread_create=no
Guido van Rossum49545951997-12-02 19:28:29 +000016431fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016432
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016433rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016434rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016435 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016436LIBS=$ac_check_lib_save_LIBS
Guido van Rossum49545951997-12-02 19:28:29 +000016437fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016438{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_r_pthread_create" >&5
16439$as_echo "$ac_cv_lib_c_r_pthread_create" >&6; }
16440if test "x$ac_cv_lib_c_r_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016441 cat >>confdefs.h <<\_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016442#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016443_ACEOF
Guido van Rossum49545951997-12-02 19:28:29 +000016444
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016445 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016446 LIBS="$LIBS -lc_r"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016447 THREADOBJ="Python/thread.o"
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016448else
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016449
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016450 { $as_echo "$as_me:$LINENO: checking for __pthread_create_system in -lpthread" >&5
16451$as_echo_n "checking for __pthread_create_system in -lpthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016452if test "${ac_cv_lib_pthread___pthread_create_system+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016453 $as_echo_n "(cached) " >&6
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016454else
Martin v. Löwis11437992002-04-12 09:54:03 +000016455 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016456LIBS="-lpthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016457cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016458/* confdefs.h. */
16459_ACEOF
16460cat confdefs.h >>conftest.$ac_ext
16461cat >>conftest.$ac_ext <<_ACEOF
16462/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016464/* Override any GCC internal prototype to avoid an error.
16465 Use char because int might match the return type of a GCC
16466 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016467#ifdef __cplusplus
16468extern "C"
16469#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016470char __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016471int
16472main ()
16473{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016474return __pthread_create_system ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016475 ;
16476 return 0;
16477}
16478_ACEOF
16479rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016480if { (ac_try="$ac_link"
16481case "(($ac_try" in
16482 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16483 *) ac_try_echo=$ac_try;;
16484esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016485eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16486$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016487 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016488 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016489 grep -v '^ *+' conftest.er1 >conftest.err
16490 rm -f conftest.er1
16491 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016492 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016493 (exit $ac_status); } && {
16494 test -z "$ac_c_werror_flag" ||
16495 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016496 } && test -s conftest$ac_exeext && {
16497 test "$cross_compiling" = yes ||
16498 $as_test_x conftest$ac_exeext
16499 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016500 ac_cv_lib_pthread___pthread_create_system=yes
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016501else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016502 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016503sed 's/^/| /' conftest.$ac_ext >&5
16504
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016505 ac_cv_lib_pthread___pthread_create_system=no
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016506fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016507
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016508rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016510 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016511LIBS=$ac_check_lib_save_LIBS
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016512fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016513{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread___pthread_create_system" >&5
16514$as_echo "$ac_cv_lib_pthread___pthread_create_system" >&6; }
16515if test "x$ac_cv_lib_pthread___pthread_create_system" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016516 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016517#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016518_ACEOF
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016519
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016520 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016521 LIBS="$LIBS -lpthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016522 THREADOBJ="Python/thread.o"
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016523else
Guido van Rossum8d6e8af2000-10-30 17:45:07 +000016524
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016525 { $as_echo "$as_me:$LINENO: checking for pthread_create in -lcma" >&5
16526$as_echo_n "checking for pthread_create in -lcma... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016527if test "${ac_cv_lib_cma_pthread_create+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016528 $as_echo_n "(cached) " >&6
Guido van Rossumb93a8621998-05-07 13:27:32 +000016529else
Martin v. Löwis11437992002-04-12 09:54:03 +000016530 ac_check_lib_save_LIBS=$LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016531LIBS="-lcma $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016532cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016533/* confdefs.h. */
16534_ACEOF
16535cat confdefs.h >>conftest.$ac_ext
16536cat >>conftest.$ac_ext <<_ACEOF
16537/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016538
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016539/* Override any GCC internal prototype to avoid an error.
16540 Use char because int might match the return type of a GCC
16541 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016542#ifdef __cplusplus
16543extern "C"
16544#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016545char pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016546int
16547main ()
16548{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016549return pthread_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016550 ;
16551 return 0;
16552}
16553_ACEOF
16554rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016555if { (ac_try="$ac_link"
16556case "(($ac_try" in
16557 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16558 *) ac_try_echo=$ac_try;;
16559esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016560eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16561$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016562 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016563 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016564 grep -v '^ *+' conftest.er1 >conftest.err
16565 rm -f conftest.er1
16566 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016567 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016568 (exit $ac_status); } && {
16569 test -z "$ac_c_werror_flag" ||
16570 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016571 } && test -s conftest$ac_exeext && {
16572 test "$cross_compiling" = yes ||
16573 $as_test_x conftest$ac_exeext
16574 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016575 ac_cv_lib_cma_pthread_create=yes
Guido van Rossumb93a8621998-05-07 13:27:32 +000016576else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016577 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016578sed 's/^/| /' conftest.$ac_ext >&5
16579
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016580 ac_cv_lib_cma_pthread_create=no
Guido van Rossumb93a8621998-05-07 13:27:32 +000016581fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016582
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016583rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016584rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016585 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016586LIBS=$ac_check_lib_save_LIBS
Guido van Rossumb93a8621998-05-07 13:27:32 +000016587fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016588{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_cma_pthread_create" >&5
16589$as_echo "$ac_cv_lib_cma_pthread_create" >&6; }
16590if test "x$ac_cv_lib_cma_pthread_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016591 cat >>confdefs.h <<\_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016592#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016593_ACEOF
Guido van Rossumb93a8621998-05-07 13:27:32 +000016594
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000016595 posix_threads=yes
Martin v. Löwis130fb172001-07-19 11:00:41 +000016596 LIBS="$LIBS -lcma"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016597 THREADOBJ="Python/thread.o"
Guido van Rossumb93a8621998-05-07 13:27:32 +000016598else
Thomas Wouters0db2b2b2000-08-26 11:33:43 +000016599
Martin v. Löwis130fb172001-07-19 11:00:41 +000016600 USE_THREAD_MODULE="#"
Guido van Rossum2d38f911996-06-26 19:47:01 +000016601fi
16602
Guido van Rossum627b2d71993-12-24 10:39:16 +000016603
Guido van Rossum7b3853f1996-07-30 18:09:35 +000016604fi
16605
Guido van Rossum0be3e491997-05-22 20:33:33 +000016606fi
16607
Guido van Rossum49545951997-12-02 19:28:29 +000016608fi
16609
Guido van Rossumb93a8621998-05-07 13:27:32 +000016610fi
16611
Guido van Rossum07bd90e2000-05-08 13:41:38 +000016612
Michael W. Hudson54241132001-12-07 15:38:26 +000016613fi
16614
Martin v. Löwisf90ae202002-06-11 06:22:31 +000016615fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016616
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016617rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016618rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016619 conftest$ac_exeext conftest.$ac_ext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016620fi
16621
Martin v. Löwis11437992002-04-12 09:54:03 +000016622fi
16623
16624
16625fi
16626
Martin v. Löwisa6e97582002-01-01 18:41:33 +000016627
Michael W. Hudson54241132001-12-07 15:38:26 +000016628
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016629 { $as_echo "$as_me:$LINENO: checking for usconfig in -lmpc" >&5
16630$as_echo_n "checking for usconfig in -lmpc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016631if test "${ac_cv_lib_mpc_usconfig+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016632 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016633else
Martin v. Löwis11437992002-04-12 09:54:03 +000016634 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016635LIBS="-lmpc $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016636cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016637/* confdefs.h. */
16638_ACEOF
16639cat confdefs.h >>conftest.$ac_ext
16640cat >>conftest.$ac_ext <<_ACEOF
16641/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016642
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016643/* Override any GCC internal prototype to avoid an error.
16644 Use char because int might match the return type of a GCC
16645 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016646#ifdef __cplusplus
16647extern "C"
16648#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016649char usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016650int
16651main ()
16652{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016653return usconfig ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016654 ;
16655 return 0;
16656}
16657_ACEOF
16658rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016659if { (ac_try="$ac_link"
16660case "(($ac_try" in
16661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16662 *) ac_try_echo=$ac_try;;
16663esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016664eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16665$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016666 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016667 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016668 grep -v '^ *+' conftest.er1 >conftest.err
16669 rm -f conftest.er1
16670 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016671 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016672 (exit $ac_status); } && {
16673 test -z "$ac_c_werror_flag" ||
16674 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016675 } && test -s conftest$ac_exeext && {
16676 test "$cross_compiling" = yes ||
16677 $as_test_x conftest$ac_exeext
16678 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016679 ac_cv_lib_mpc_usconfig=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016680else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016681 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016682sed 's/^/| /' conftest.$ac_ext >&5
16683
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016684 ac_cv_lib_mpc_usconfig=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016685fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016686
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016687rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016688rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016689 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016690LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016691fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016692{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_mpc_usconfig" >&5
16693$as_echo "$ac_cv_lib_mpc_usconfig" >&6; }
16694if test "x$ac_cv_lib_mpc_usconfig" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016695 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016696#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016697_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016698
Martin v. Löwis130fb172001-07-19 11:00:41 +000016699 LIBS="$LIBS -lmpc"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016700 THREADOBJ="Python/thread.o"
Martin v. Löwis130fb172001-07-19 11:00:41 +000016701 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016702fi
16703
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016704
Neal Norwitza978ab02002-11-02 16:58:05 +000016705 if test "$posix_threads" != "yes"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016706 { $as_echo "$as_me:$LINENO: checking for thr_create in -lthread" >&5
16707$as_echo_n "checking for thr_create in -lthread... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000016708if test "${ac_cv_lib_thread_thr_create+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016709 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016710else
Martin v. Löwis11437992002-04-12 09:54:03 +000016711 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000016712LIBS="-lthread $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000016713cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016714/* confdefs.h. */
16715_ACEOF
16716cat confdefs.h >>conftest.$ac_ext
16717cat >>conftest.$ac_ext <<_ACEOF
16718/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016720/* Override any GCC internal prototype to avoid an error.
16721 Use char because int might match the return type of a GCC
16722 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000016723#ifdef __cplusplus
16724extern "C"
16725#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000016726char thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016727int
16728main ()
16729{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016730return thr_create ();
Martin v. Löwis11437992002-04-12 09:54:03 +000016731 ;
16732 return 0;
16733}
16734_ACEOF
16735rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016736if { (ac_try="$ac_link"
16737case "(($ac_try" in
16738 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16739 *) ac_try_echo=$ac_try;;
16740esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016741eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16742$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016743 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000016744 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016745 grep -v '^ *+' conftest.er1 >conftest.err
16746 rm -f conftest.er1
16747 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016748 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016749 (exit $ac_status); } && {
16750 test -z "$ac_c_werror_flag" ||
16751 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016752 } && test -s conftest$ac_exeext && {
16753 test "$cross_compiling" = yes ||
16754 $as_test_x conftest$ac_exeext
16755 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016756 ac_cv_lib_thread_thr_create=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016757else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016758 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016759sed 's/^/| /' conftest.$ac_ext >&5
16760
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016761 ac_cv_lib_thread_thr_create=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000016762fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016763
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016764rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016765rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016766 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000016767LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016768fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016769{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_thread_thr_create" >&5
16770$as_echo "$ac_cv_lib_thread_thr_create" >&6; }
16771if test "x$ac_cv_lib_thread_thr_create" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000016772 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000016773#define WITH_THREAD 1
Martin v. Löwis11437992002-04-12 09:54:03 +000016774_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000016775
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016776 LIBS="$LIBS -lthread"
Martin v. Löwis2d7e2642002-04-05 16:50:53 +000016777 THREADOBJ="Python/thread.o"
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016778 USE_THREAD_MODULE=""
Guido van Rossum627b2d71993-12-24 10:39:16 +000016779fi
16780
Martin v. Löwis3d2b5492002-03-15 13:48:21 +000016781 fi
Michael W. Hudson54241132001-12-07 15:38:26 +000016782
Martin v. Löwis130fb172001-07-19 11:00:41 +000016783 if test "$USE_THREAD_MODULE" != "#"
16784 then
16785 # If the above checks didn't disable threads, (at least) OSF1
16786 # needs this '-threads' argument during linking.
16787 case $ac_sys_system in
16788 OSF1) LDLAST=-threads;;
16789 esac
Jeremy Hylton1a2ca862000-10-16 16:59:12 +000016790 fi
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016791fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016792
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016793if test "$posix_threads" = "yes"; then
16794 if test "$unistd_defines_pthreads" = "no"; then
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016795
16796cat >>confdefs.h <<\_ACEOF
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016797#define _POSIX_THREADS 1
16798_ACEOF
16799
16800 fi
16801
16802 # Bug 662787: Using semaphores causes unexplicable hangs on Solaris 8.
16803 case $ac_sys_system/$ac_sys_release in
16804 SunOS/5.6)
16805cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016806#define HAVE_PTHREAD_DESTRUCTOR 1
16807_ACEOF
16808
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016809 ;;
16810 SunOS/5.8)
16811cat >>confdefs.h <<\_ACEOF
16812#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16813_ACEOF
16814
16815 ;;
Christian Heimes7b3ce6a2008-01-31 14:31:45 +000016816 AIX/5)
16817cat >>confdefs.h <<\_ACEOF
16818#define HAVE_BROKEN_POSIX_SEMAPHORES 1
16819_ACEOF
16820
16821 ;;
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016822 esac
16823
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016824 { $as_echo "$as_me:$LINENO: checking if PTHREAD_SCOPE_SYSTEM is supported" >&5
16825$as_echo_n "checking if PTHREAD_SCOPE_SYSTEM is supported... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016826 if test "${ac_cv_pthread_system_supported+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016827 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016828else
16829 if test "$cross_compiling" = yes; then
16830 ac_cv_pthread_system_supported=no
16831else
16832 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016833/* confdefs.h. */
16834_ACEOF
16835cat confdefs.h >>conftest.$ac_ext
16836cat >>conftest.$ac_ext <<_ACEOF
16837/* end confdefs.h. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016838#include <pthread.h>
16839 void *foo(void *parm) {
16840 return NULL;
16841 }
16842 main() {
16843 pthread_attr_t attr;
16844 pthread_t id;
16845 if (pthread_attr_init(&attr)) exit(-1);
16846 if (pthread_attr_setscope(&attr, PTHREAD_SCOPE_SYSTEM)) exit(-1);
16847 if (pthread_create(&id, &attr, foo, NULL)) exit(-1);
16848 exit(0);
16849 }
16850_ACEOF
16851rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016852if { (ac_try="$ac_link"
16853case "(($ac_try" in
16854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16855 *) ac_try_echo=$ac_try;;
16856esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016857eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16858$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016859 (eval "$ac_link") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016860 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016861 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016862 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016863 { (case "(($ac_try" in
16864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16865 *) ac_try_echo=$ac_try;;
16866esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016867eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16868$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016869 (eval "$ac_try") 2>&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016870 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016871 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016872 (exit $ac_status); }; }; then
16873 ac_cv_pthread_system_supported=yes
16874else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016875 $as_echo "$as_me: program exited with status $ac_status" >&5
16876$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016877sed 's/^/| /' conftest.$ac_ext >&5
16878
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016879( exit $ac_status )
16880ac_cv_pthread_system_supported=no
16881fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016882rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016883rm -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 +000016884fi
Martin v. Löwisa7a76d32002-10-04 07:21:24 +000016885
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016886
16887
Guido van Rossum627b2d71993-12-24 10:39:16 +000016888fi
16889
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016890 { $as_echo "$as_me:$LINENO: result: $ac_cv_pthread_system_supported" >&5
16891$as_echo "$ac_cv_pthread_system_supported" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016892 if test "$ac_cv_pthread_system_supported" = "yes"; then
16893
16894cat >>confdefs.h <<\_ACEOF
16895#define PTHREAD_SYSTEM_SCHED_SUPPORTED 1
16896_ACEOF
16897
16898 fi
16899
16900for ac_func in pthread_sigmask
16901do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016902as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16903{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
16904$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016905if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016906 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016907else
16908 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000016909/* confdefs.h. */
16910_ACEOF
16911cat confdefs.h >>conftest.$ac_ext
16912cat >>conftest.$ac_ext <<_ACEOF
16913/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016914/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16915 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16916#define $ac_func innocuous_$ac_func
16917
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016918/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000016919 which can conflict with char $ac_func (); below.
16920 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016921 <limits.h> exists even on freestanding compilers. */
16922
16923#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000016924# include <limits.h>
16925#else
16926# include <assert.h>
16927#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000016928
16929#undef $ac_func
16930
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016931/* Override any GCC internal prototype to avoid an error.
16932 Use char because int might match the return type of a GCC
16933 builtin and then its argument prototype would still apply. */
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016934#ifdef __cplusplus
16935extern "C"
16936#endif
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016937char $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016938/* The GNU C library defines this for functions which it implements
16939 to always fail with ENOSYS. Some functions are actually named
16940 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016941#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016942choke me
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016943#endif
16944
Skip Montanaro6dead952003-09-25 14:50:04 +000016945int
16946main ()
16947{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016948return $ac_func ();
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016949 ;
16950 return 0;
16951}
16952_ACEOF
16953rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016954if { (ac_try="$ac_link"
16955case "(($ac_try" in
16956 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16957 *) ac_try_echo=$ac_try;;
16958esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016959eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
16960$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016961 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016962 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000016963 grep -v '^ *+' conftest.er1 >conftest.err
16964 rm -f conftest.er1
16965 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016966 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016967 (exit $ac_status); } && {
16968 test -z "$ac_c_werror_flag" ||
16969 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016970 } && test -s conftest$ac_exeext && {
16971 test "$cross_compiling" = yes ||
16972 $as_test_x conftest$ac_exeext
16973 }; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016974 eval "$as_ac_var=yes"
16975else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016976 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000016977sed 's/^/| /' conftest.$ac_ext >&5
16978
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016979 eval "$as_ac_var=no"
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016980fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016981
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016982rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000016983rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000016984 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016985fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016986ac_res=`eval 'as_val=${'$as_ac_var'}
16987 $as_echo "$as_val"'`
16988 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
16989$as_echo "$ac_res" >&6; }
16990as_val=`eval 'as_val=${'$as_ac_var'}
16991 $as_echo "$as_val"'`
16992 if test "x$as_val" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016993 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000016994#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016995_ACEOF
Jason Tishlerfac083d2003-07-22 15:20:49 +000016996 case $ac_sys_system in
16997 CYGWIN*)
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000016998
Jason Tishlerfac083d2003-07-22 15:20:49 +000016999cat >>confdefs.h <<\_ACEOF
17000#define HAVE_BROKEN_PTHREAD_SIGMASK 1
17001_ACEOF
17002
17003 ;;
17004 esac
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000017005fi
17006done
17007
17008fi
17009
17010
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017011# Check for enable-ipv6
Martin v. Löwis11437992002-04-12 09:54:03 +000017012
17013
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017014{ $as_echo "$as_me:$LINENO: checking if --enable-ipv6 is specified" >&5
17015$as_echo_n "checking if --enable-ipv6 is specified... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017016# Check whether --enable-ipv6 was given.
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017017if test "${enable_ipv6+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017018 enableval=$enable_ipv6; case "$enableval" in
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017019 no)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017020 { $as_echo "$as_me:$LINENO: result: no" >&5
17021$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017022 ipv6=no
17023 ;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017024 *) { $as_echo "$as_me:$LINENO: result: yes" >&5
17025$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017026 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017027#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017028_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017029
17030 ipv6=yes
17031 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000017032 esac
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017033else
Martin v. Löwis11437992002-04-12 09:54:03 +000017034
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017035 if test "$cross_compiling" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017036 { $as_echo "$as_me:$LINENO: result: no" >&5
17037$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017038 ipv6=no
17039
17040else
Martin v. Löwis11437992002-04-12 09:54:03 +000017041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017042/* confdefs.h. */
17043_ACEOF
17044cat confdefs.h >>conftest.$ac_ext
17045cat >>conftest.$ac_ext <<_ACEOF
17046/* end confdefs.h. */
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017047 /* AF_INET6 available check */
17048#include <sys/types.h>
17049#include <sys/socket.h>
17050main()
17051{
17052 if (socket(AF_INET6, SOCK_STREAM, 0) < 0)
17053 exit(1);
17054 else
17055 exit(0);
17056}
17057
Martin v. Löwis11437992002-04-12 09:54:03 +000017058_ACEOF
17059rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017060if { (ac_try="$ac_link"
17061case "(($ac_try" in
17062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17063 *) ac_try_echo=$ac_try;;
17064esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017065eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17066$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017067 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017068 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017069 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017070 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017071 { (case "(($ac_try" in
17072 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17073 *) ac_try_echo=$ac_try;;
17074esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017075eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17076$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017077 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017078 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017079 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000017080 (exit $ac_status); }; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017081 { $as_echo "$as_me:$LINENO: result: yes" >&5
17082$as_echo "yes" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017083 ipv6=yes
17084else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017085 $as_echo "$as_me: program exited with status $ac_status" >&5
17086$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017087sed 's/^/| /' conftest.$ac_ext >&5
17088
Martin v. Löwis11437992002-04-12 09:54:03 +000017089( exit $ac_status )
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017090{ $as_echo "$as_me:$LINENO: result: no" >&5
17091$as_echo "no" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017092 ipv6=no
17093fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017094rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017095rm -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 +000017096fi
17097
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017098
17099
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017100if test "$ipv6" = "yes"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017101 { $as_echo "$as_me:$LINENO: checking if RFC2553 API is available" >&5
17102$as_echo_n "checking if RFC2553 API is available... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017103 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017104/* confdefs.h. */
17105_ACEOF
17106cat confdefs.h >>conftest.$ac_ext
17107cat >>conftest.$ac_ext <<_ACEOF
17108/* end confdefs.h. */
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017109#include <sys/types.h>
17110#include <netinet/in.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000017111int
17112main ()
17113{
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017114struct sockaddr_in6 x;
17115x.sin6_scope_id;
Martin v. Löwis11437992002-04-12 09:54:03 +000017116 ;
17117 return 0;
17118}
17119_ACEOF
17120rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017121if { (ac_try="$ac_compile"
17122case "(($ac_try" in
17123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17124 *) ac_try_echo=$ac_try;;
17125esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017126eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17127$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017128 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017129 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017130 grep -v '^ *+' conftest.er1 >conftest.err
17131 rm -f conftest.er1
17132 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017133 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017134 (exit $ac_status); } && {
17135 test -z "$ac_c_werror_flag" ||
17136 test ! -s conftest.err
17137 } && test -s conftest.$ac_objext; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017138 { $as_echo "$as_me:$LINENO: result: yes" >&5
17139$as_echo "yes" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017140 ipv6=yes
17141else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017142 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017143sed 's/^/| /' conftest.$ac_ext >&5
17144
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017145 { $as_echo "$as_me:$LINENO: result: no" >&5
17146$as_echo "no" >&6; }
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017147 ipv6=no
17148fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017149
17150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017151fi
17152
17153if test "$ipv6" = "yes"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017154 cat >>confdefs.h <<\_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017155#define ENABLE_IPV6 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017156_ACEOF
Martin v. Löwisa5f8bb52001-09-05 08:22:34 +000017157
17158fi
17159
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017160fi
17161
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017162
17163ipv6type=unknown
17164ipv6lib=none
17165ipv6trylibc=no
17166
17167if test "$ipv6" = "yes"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017168 { $as_echo "$as_me:$LINENO: checking ipv6 stack type" >&5
17169$as_echo_n "checking ipv6 stack type... " >&6; }
Guido van Rossumb8552162001-09-05 14:58:11 +000017170 for i in inria kame linux-glibc linux-inet6 solaris toshiba v6d zeta;
17171 do
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017172 case $i in
17173 inria)
Martin v. Löwis11437992002-04-12 09:54:03 +000017174 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017175/* confdefs.h. */
17176_ACEOF
17177cat confdefs.h >>conftest.$ac_ext
17178cat >>conftest.$ac_ext <<_ACEOF
17179/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017180
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017181#include <netinet/in.h>
17182#ifdef IPV6_INRIA_VERSION
17183yes
17184#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017185_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017186if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017187 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017188 ipv6type=$i
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017189fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017190rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017191
17192 ;;
17193 kame)
Martin v. Löwis11437992002-04-12 09:54:03 +000017194 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017195/* confdefs.h. */
17196_ACEOF
17197cat confdefs.h >>conftest.$ac_ext
17198cat >>conftest.$ac_ext <<_ACEOF
17199/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017200
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017201#include <netinet/in.h>
17202#ifdef __KAME__
17203yes
17204#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017205_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017206if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017207 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017208 ipv6type=$i;
17209 ipv6lib=inet6
17210 ipv6libdir=/usr/local/v6/lib
17211 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017212fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017213rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017214
17215 ;;
17216 linux-glibc)
Martin v. Löwis11437992002-04-12 09:54:03 +000017217 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017218/* confdefs.h. */
17219_ACEOF
17220cat confdefs.h >>conftest.$ac_ext
17221cat >>conftest.$ac_ext <<_ACEOF
17222/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017223
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017224#include <features.h>
17225#if defined(__GLIBC__) && ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2))
17226yes
17227#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017228_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017229if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017230 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017231 ipv6type=$i;
17232 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017233fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017234rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017235
17236 ;;
17237 linux-inet6)
17238 if test -d /usr/inet6; then
17239 ipv6type=$i
17240 ipv6lib=inet6
17241 ipv6libdir=/usr/inet6/lib
Skip Montanarodecc6a42003-01-01 20:07:49 +000017242 BASECFLAGS="-I/usr/inet6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017243 fi
17244 ;;
17245 solaris)
17246 if test -f /etc/netconfig; then
17247 if /usr/xpg4/bin/grep -q tcp6 /etc/netconfig; then
17248 ipv6type=$i
17249 ipv6trylibc=yes
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017250 fi
17251 fi
17252 ;;
17253 toshiba)
Martin v. Löwis11437992002-04-12 09:54:03 +000017254 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017255/* confdefs.h. */
17256_ACEOF
17257cat confdefs.h >>conftest.$ac_ext
17258cat >>conftest.$ac_ext <<_ACEOF
17259/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017260
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017261#include <sys/param.h>
17262#ifdef _TOSHIBA_INET6
17263yes
17264#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017265_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017266if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017267 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017268 ipv6type=$i;
17269 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017270 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017271fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017272rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017273
17274 ;;
17275 v6d)
Martin v. Löwis11437992002-04-12 09:54:03 +000017276 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017277/* confdefs.h. */
17278_ACEOF
17279cat confdefs.h >>conftest.$ac_ext
17280cat >>conftest.$ac_ext <<_ACEOF
17281/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017282
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017283#include </usr/local/v6/include/sys/v6config.h>
17284#ifdef __V6D__
17285yes
17286#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017287_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017289 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017290 ipv6type=$i;
17291 ipv6lib=v6;
17292 ipv6libdir=/usr/local/v6/lib;
Skip Montanarodecc6a42003-01-01 20:07:49 +000017293 BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017294fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017295rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017296
17297 ;;
17298 zeta)
Martin v. Löwis11437992002-04-12 09:54:03 +000017299 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017300/* confdefs.h. */
17301_ACEOF
17302cat confdefs.h >>conftest.$ac_ext
17303cat >>conftest.$ac_ext <<_ACEOF
17304/* end confdefs.h. */
Martin v. Löwisa5f73f92001-10-15 08:06:29 +000017305
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017306#include <sys/param.h>
17307#ifdef _ZETA_MINAMI_INET6
17308yes
17309#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017310_ACEOF
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017311if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000017312 $EGREP "yes" >/dev/null 2>&1; then
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017313 ipv6type=$i;
17314 ipv6lib=inet6;
Martin v. Löwis44ddbde2001-12-02 10:15:37 +000017315 ipv6libdir=/usr/local/v6/lib
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017316fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017317rm -f conftest*
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017318
17319 ;;
17320 esac
17321 if test "$ipv6type" != "unknown"; then
17322 break
17323 fi
17324 done
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017325 { $as_echo "$as_me:$LINENO: result: $ipv6type" >&5
17326$as_echo "$ipv6type" >&6; }
Martin v. Löwisa2ac6022001-08-09 11:40:14 +000017327fi
17328
17329if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then
17330 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then
17331 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS"
17332 echo "using lib$ipv6lib"
17333 else
17334 if test $ipv6trylibc = "yes"; then
17335 echo "using libc"
17336 else
17337 echo 'Fatal: no $ipv6lib library found. cannot continue.'
17338 echo "You need to fetch lib$ipv6lib.a from appropriate"
17339 echo 'ipv6 kit and compile beforehand.'
17340 exit 1
17341 fi
17342 fi
17343fi
17344
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017345{ $as_echo "$as_me:$LINENO: checking for OSX 10.5 SDK or later" >&5
17346$as_echo_n "checking for OSX 10.5 SDK or later... " >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017347cat >conftest.$ac_ext <<_ACEOF
17348/* confdefs.h. */
17349_ACEOF
17350cat confdefs.h >>conftest.$ac_ext
17351cat >>conftest.$ac_ext <<_ACEOF
17352/* end confdefs.h. */
17353#include <Carbon/Carbon.h>
17354int
17355main ()
17356{
17357FSIORefNum fRef = 0
17358 ;
17359 return 0;
17360}
17361_ACEOF
17362rm -f conftest.$ac_objext
17363if { (ac_try="$ac_compile"
17364case "(($ac_try" in
17365 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17366 *) ac_try_echo=$ac_try;;
17367esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017368eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17369$as_echo "$ac_try_echo") >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017370 (eval "$ac_compile") 2>conftest.er1
17371 ac_status=$?
17372 grep -v '^ *+' conftest.er1 >conftest.err
17373 rm -f conftest.er1
17374 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017375 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017376 (exit $ac_status); } && {
17377 test -z "$ac_c_werror_flag" ||
17378 test ! -s conftest.err
17379 } && test -s conftest.$ac_objext; then
17380
17381cat >>confdefs.h <<\_ACEOF
17382#define HAVE_OSX105_SDK 1
17383_ACEOF
17384
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017385 { $as_echo "$as_me:$LINENO: result: yes" >&5
17386$as_echo "yes" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017387else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017388 $as_echo "$as_me: failed program was:" >&5
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017389sed 's/^/| /' conftest.$ac_ext >&5
17390
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017391 { $as_echo "$as_me:$LINENO: result: no" >&5
17392$as_echo "no" >&6; }
Benjamin Peterson8f95cc22008-07-16 02:23:25 +000017393
17394fi
17395
17396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17397
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017398# Check for --with-doc-strings
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017399{ $as_echo "$as_me:$LINENO: checking for --with-doc-strings" >&5
17400$as_echo_n "checking for --with-doc-strings... " >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017401
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017402# Check whether --with-doc-strings was given.
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017403if test "${with_doc_strings+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017404 withval=$with_doc_strings;
17405fi
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017406
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017407
17408if test -z "$with_doc_strings"
17409then with_doc_strings="yes"
17410fi
17411if test "$with_doc_strings" != "no"
17412then
17413
17414cat >>confdefs.h <<\_ACEOF
17415#define WITH_DOC_STRINGS 1
17416_ACEOF
17417
17418fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017419{ $as_echo "$as_me:$LINENO: result: $with_doc_strings" >&5
17420$as_echo "$with_doc_strings" >&6; }
Martin v. Löwisa3fb4f72002-06-09 13:33:54 +000017421
Neil Schemenauera35c6882001-02-27 04:45:05 +000017422# Check for Python-specific malloc support
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017423{ $as_echo "$as_me:$LINENO: checking for --with-tsc" >&5
17424$as_echo_n "checking for --with-tsc... " >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017425
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017426# Check whether --with-tsc was given.
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017427if test "${with_tsc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017428 withval=$with_tsc;
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017429if test "$withval" != no
17430then
17431
17432cat >>confdefs.h <<\_ACEOF
17433#define WITH_TSC 1
17434_ACEOF
17435
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017436 { $as_echo "$as_me:$LINENO: result: yes" >&5
17437$as_echo "yes" >&6; }
17438else { $as_echo "$as_me:$LINENO: result: no" >&5
17439$as_echo "no" >&6; }
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017440fi
17441else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017442 { $as_echo "$as_me:$LINENO: result: no" >&5
17443$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017444fi
17445
Martin v. Löwisf30d60e2004-06-08 08:17:44 +000017446
17447# Check for Python-specific malloc support
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017448{ $as_echo "$as_me:$LINENO: checking for --with-pymalloc" >&5
17449$as_echo_n "checking for --with-pymalloc... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017450
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017451# Check whether --with-pymalloc was given.
Neil Schemenauera35c6882001-02-27 04:45:05 +000017452if test "${with_pymalloc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017453 withval=$with_pymalloc;
17454fi
Michael W. Hudson54241132001-12-07 15:38:26 +000017455
Neil Schemenauera35c6882001-02-27 04:45:05 +000017456
Neil Schemenauer16c22972002-03-22 15:34:49 +000017457if test -z "$with_pymalloc"
17458then with_pymalloc="yes"
17459fi
17460if test "$with_pymalloc" != "no"
17461then
Martin v. Löwis11437992002-04-12 09:54:03 +000017462
17463cat >>confdefs.h <<\_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017464#define WITH_PYMALLOC 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017465_ACEOF
Neil Schemenauer16c22972002-03-22 15:34:49 +000017466
17467fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017468{ $as_echo "$as_me:$LINENO: result: $with_pymalloc" >&5
17469$as_echo "$with_pymalloc" >&6; }
Neil Schemenauer16c22972002-03-22 15:34:49 +000017470
Barry Warsawef82cd72000-06-30 16:21:01 +000017471# Check for --with-wctype-functions
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017472{ $as_echo "$as_me:$LINENO: checking for --with-wctype-functions" >&5
17473$as_echo_n "checking for --with-wctype-functions... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000017474
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017475# Check whether --with-wctype-functions was given.
Barry Warsawef82cd72000-06-30 16:21:01 +000017476if test "${with_wctype_functions+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017477 withval=$with_wctype_functions;
Barry Warsawef82cd72000-06-30 16:21:01 +000017478if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000017479then
17480
17481cat >>confdefs.h <<\_ACEOF
Barry Warsawef82cd72000-06-30 16:21:01 +000017482#define WANT_WCTYPE_FUNCTIONS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017483_ACEOF
17484
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017485 { $as_echo "$as_me:$LINENO: result: yes" >&5
17486$as_echo "yes" >&6; }
17487else { $as_echo "$as_me:$LINENO: result: no" >&5
17488$as_echo "no" >&6; }
Barry Warsawef82cd72000-06-30 16:21:01 +000017489fi
17490else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017491 { $as_echo "$as_me:$LINENO: result: no" >&5
17492$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017493fi
17494
Barry Warsawef82cd72000-06-30 16:21:01 +000017495
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000017496# -I${DLINCLDIR} is added to the compile rule for importdl.o
Guido van Rossum7f43da71994-08-01 12:15:30 +000017497
Guido van Rossum98935bf2001-09-05 19:13:16 +000017498DLINCLDIR=.
Guido van Rossum7f43da71994-08-01 12:15:30 +000017499
Guido van Rossume97ee181999-12-20 21:27:22 +000017500# the dlopen() function means we might want to use dynload_shlib.o. some
17501# platforms, such as AIX, have dlopen(), but don't want to use it.
Martin v. Löwis11437992002-04-12 09:54:03 +000017502
Thomas Wouters3a584202000-08-05 23:28:51 +000017503for ac_func in dlopen
17504do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017505as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17506{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
17507$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017508if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017509 $as_echo_n "(cached) " >&6
Guido van Rossume97ee181999-12-20 21:27:22 +000017510else
Martin v. Löwis11437992002-04-12 09:54:03 +000017511 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017512/* confdefs.h. */
17513_ACEOF
17514cat confdefs.h >>conftest.$ac_ext
17515cat >>conftest.$ac_ext <<_ACEOF
17516/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017517/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17518 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17519#define $ac_func innocuous_$ac_func
17520
Guido van Rossume97ee181999-12-20 21:27:22 +000017521/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017522 which can conflict with char $ac_func (); below.
17523 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017524 <limits.h> exists even on freestanding compilers. */
17525
17526#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017527# include <limits.h>
17528#else
17529# include <assert.h>
17530#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017531
17532#undef $ac_func
17533
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017534/* Override any GCC internal prototype to avoid an error.
17535 Use char because int might match the return type of a GCC
17536 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017537#ifdef __cplusplus
17538extern "C"
17539#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017540char $ac_func ();
Guido van Rossume97ee181999-12-20 21:27:22 +000017541/* The GNU C library defines this for functions which it implements
17542 to always fail with ENOSYS. Some functions are actually named
17543 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017544#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossume97ee181999-12-20 21:27:22 +000017545choke me
Guido van Rossume97ee181999-12-20 21:27:22 +000017546#endif
17547
Skip Montanaro6dead952003-09-25 14:50:04 +000017548int
17549main ()
17550{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017551return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017552 ;
17553 return 0;
17554}
17555_ACEOF
17556rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017557if { (ac_try="$ac_link"
17558case "(($ac_try" in
17559 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17560 *) ac_try_echo=$ac_try;;
17561esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017562eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17563$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017564 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017565 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017566 grep -v '^ *+' conftest.er1 >conftest.err
17567 rm -f conftest.er1
17568 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017569 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017570 (exit $ac_status); } && {
17571 test -z "$ac_c_werror_flag" ||
17572 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017573 } && test -s conftest$ac_exeext && {
17574 test "$cross_compiling" = yes ||
17575 $as_test_x conftest$ac_exeext
17576 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017577 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017578else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017579 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017580sed 's/^/| /' conftest.$ac_ext >&5
17581
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017582 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017583fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017584
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017585rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017586rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017587 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017588fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017589ac_res=`eval 'as_val=${'$as_ac_var'}
17590 $as_echo "$as_val"'`
17591 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
17592$as_echo "$ac_res" >&6; }
17593as_val=`eval 'as_val=${'$as_ac_var'}
17594 $as_echo "$as_val"'`
17595 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017596 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017597#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017598_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017599
Guido van Rossume97ee181999-12-20 21:27:22 +000017600fi
Thomas Wouters3a584202000-08-05 23:28:51 +000017601done
Guido van Rossume97ee181999-12-20 21:27:22 +000017602
Michael W. Hudson54241132001-12-07 15:38:26 +000017603
Guido van Rossume97ee181999-12-20 21:27:22 +000017604# DYNLOADFILE specifies which dynload_*.o file we will use for dynamic
17605# loading of modules.
17606
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017607{ $as_echo "$as_me:$LINENO: checking DYNLOADFILE" >&5
17608$as_echo_n "checking DYNLOADFILE... " >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017609if test -z "$DYNLOADFILE"
17610then
17611 case $ac_sys_system/$ac_sys_release in
Martin v. Löwisc19c5a62003-11-18 20:00:44 +000017612 AIX*) # Use dynload_shlib.c and dlopen() if we have it; otherwise dynload_aix.c
17613 if test "$ac_cv_func_dlopen" = yes
17614 then DYNLOADFILE="dynload_shlib.o"
17615 else DYNLOADFILE="dynload_aix.o"
17616 fi
17617 ;;
Guido van Rossume97ee181999-12-20 21:27:22 +000017618 hp*|HP*) DYNLOADFILE="dynload_hpux.o";;
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017619 # Use dynload_next.c only on 10.2 and below, which don't have native dlopen()
17620 Darwin/[0156]\..*) DYNLOADFILE="dynload_next.o";;
Martin v. Löwisf90ae202002-06-11 06:22:31 +000017621 atheos*) DYNLOADFILE="dynload_atheos.o";;
Guido van Rossume97ee181999-12-20 21:27:22 +000017622 *)
17623 # use dynload_shlib.c and dlopen() if we have it; otherwise stub
17624 # out any dynamic loading
17625 if test "$ac_cv_func_dlopen" = yes
17626 then DYNLOADFILE="dynload_shlib.o"
17627 else DYNLOADFILE="dynload_stub.o"
17628 fi
17629 ;;
17630 esac
17631fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017632{ $as_echo "$as_me:$LINENO: result: $DYNLOADFILE" >&5
17633$as_echo "$DYNLOADFILE" >&6; }
Guido van Rossume97ee181999-12-20 21:27:22 +000017634if test "$DYNLOADFILE" != "dynload_stub.o"
17635then
Martin v. Löwis11437992002-04-12 09:54:03 +000017636
17637cat >>confdefs.h <<\_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017638#define HAVE_DYNAMIC_LOADING 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017639_ACEOF
Guido van Rossume97ee181999-12-20 21:27:22 +000017640
17641fi
17642
Neil Schemenauer4e425612001-06-19 15:44:15 +000017643# MACHDEP_OBJS can be set to platform-specific object files needed by Python
17644
Michael W. Hudson54241132001-12-07 15:38:26 +000017645
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017646{ $as_echo "$as_me:$LINENO: checking MACHDEP_OBJS" >&5
17647$as_echo_n "checking MACHDEP_OBJS... " >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017648if test -z "$MACHDEP_OBJS"
17649then
Jack Jansene578a632001-08-15 01:27:14 +000017650 MACHDEP_OBJS=$extra_machdep_objs
17651else
17652 MACHDEP_OBJS="$MACHDEP_OBJS $extra_machdep_objs"
Neil Schemenauer4e425612001-06-19 15:44:15 +000017653fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017654{ $as_echo "$as_me:$LINENO: result: MACHDEP_OBJS" >&5
17655$as_echo "MACHDEP_OBJS" >&6; }
Neil Schemenauer4e425612001-06-19 15:44:15 +000017656
Guido van Rossum627b2d71993-12-24 10:39:16 +000017657# checks for library functions
Martin v. Löwis11437992002-04-12 09:54:03 +000017658
17659
17660
17661
17662
17663
17664
17665
17666
17667
17668
17669
17670
17671
17672
17673
17674
17675
17676
17677
17678
17679
17680
17681
17682
17683
17684
17685
17686
17687
17688
17689
17690
17691
17692
17693
17694
17695
17696
17697
17698
17699
17700
17701
17702
17703
17704
17705
17706
17707
17708
17709
17710
17711
17712
17713
17714
17715
17716
17717
17718
17719
17720
17721
17722
17723
17724
17725
17726
17727
17728
Martin v. Löwisd6320502004-08-12 13:45:08 +000017729
Martin v. Löwisc3001752005-01-23 09:27:24 +000017730
17731
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000017732
17733
Thomas Wouterscf297e42007-02-23 15:07:44 +000017734
17735
Gregory P. Smith25523d22007-09-03 16:44:55 +000017736
Christian Heimes4e30a842007-11-30 22:12:06 +000017737
Martin v. Löwis92fab752008-03-08 10:40:41 +000017738
Martin v. Löwis823725e2008-03-24 13:39:54 +000017739
17740
Benjamin Peterson965ce872009-04-05 21:24:58 +000017741
17742
17743
17744
Martin v. Löwis011e8422009-05-05 04:43:17 +000017745
Martin v. Löwis113a0852009-05-29 17:25:39 +000017746
Martin v. Löwis823725e2008-03-24 13:39:54 +000017747for ac_func in alarm setitimer getitimer bind_textdomain_codeset chown \
17748 clock confstr ctermid execv fchmod fchown fork fpathconf ftime ftruncate \
Martin v. Löwis438b5342002-12-27 10:16:42 +000017749 gai_strerror getgroups getlogin getloadavg getpeername getpgid getpid \
Martin v. Löwisc3001752005-01-23 09:27:24 +000017750 getpriority getpwent getspnam getspent getsid getwd \
Martin v. Löwis011e8422009-05-05 04:43:17 +000017751 kill killpg lchmod lchown lstat mbrtowc mkfifo mknod mktime \
Martin v. Löwisa5f09072002-10-11 05:37:59 +000017752 mremap nice pathconf pause plock poll pthread_init \
Guido van Rossum162e38c2003-02-19 15:25:10 +000017753 putenv readlink realpath \
Benjamin Peterson965ce872009-04-05 21:24:58 +000017754 select sem_open sem_timedwait sem_getvalue sem_unlink setegid seteuid \
17755 setgid \
Martin v. Löwis4daacb12003-03-28 18:37:01 +000017756 setlocale setregid setreuid setsid setpgid setpgrp setuid setvbuf snprintf \
Gregory P. Smith25523d22007-09-03 16:44:55 +000017757 sigaction siginterrupt sigrelse strftime strlcpy \
Michael W. Hudson34f20ea2002-05-27 15:08:24 +000017758 sysconf tcgetpgrp tcsetpgrp tempnam timegm times tmpfile tmpnam tmpnam_r \
Martin v. Löwis113a0852009-05-29 17:25:39 +000017759 truncate uname unsetenv utimes waitpid wait3 wait4 \
17760 wcscoll wcsftime wcsxfrm _getpty
Guido van Rossum627b2d71993-12-24 10:39:16 +000017761do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017762as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17763{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
17764$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017765if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017766 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017767else
Martin v. Löwis11437992002-04-12 09:54:03 +000017768 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017769/* confdefs.h. */
17770_ACEOF
17771cat confdefs.h >>conftest.$ac_ext
17772cat >>conftest.$ac_ext <<_ACEOF
17773/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017774/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17775 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17776#define $ac_func innocuous_$ac_func
17777
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000017778/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000017779 which can conflict with char $ac_func (); below.
17780 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017781 <limits.h> exists even on freestanding compilers. */
17782
17783#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000017784# include <limits.h>
17785#else
17786# include <assert.h>
17787#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000017788
17789#undef $ac_func
17790
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017791/* Override any GCC internal prototype to avoid an error.
17792 Use char because int might match the return type of a GCC
17793 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000017794#ifdef __cplusplus
17795extern "C"
17796#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000017797char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000017798/* The GNU C library defines this for functions which it implements
17799 to always fail with ENOSYS. Some functions are actually named
17800 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017801#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000017802choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000017803#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000017804
Skip Montanaro6dead952003-09-25 14:50:04 +000017805int
17806main ()
17807{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017808return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000017809 ;
17810 return 0;
17811}
17812_ACEOF
17813rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017814if { (ac_try="$ac_link"
17815case "(($ac_try" in
17816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17817 *) ac_try_echo=$ac_try;;
17818esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017819eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17820$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017821 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000017822 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017823 grep -v '^ *+' conftest.er1 >conftest.err
17824 rm -f conftest.er1
17825 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017826 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017827 (exit $ac_status); } && {
17828 test -z "$ac_c_werror_flag" ||
17829 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017830 } && test -s conftest$ac_exeext && {
17831 test "$cross_compiling" = yes ||
17832 $as_test_x conftest$ac_exeext
17833 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017834 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000017835else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017836 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017837sed 's/^/| /' conftest.$ac_ext >&5
17838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017839 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000017840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017841
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017842rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017843rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000017844 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000017845fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017846ac_res=`eval 'as_val=${'$as_ac_var'}
17847 $as_echo "$as_val"'`
17848 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
17849$as_echo "$ac_res" >&6; }
17850as_val=`eval 'as_val=${'$as_ac_var'}
17851 $as_echo "$as_val"'`
17852 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000017853 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017854#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000017855_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000017856
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000017857fi
17858done
17859
Michael W. Hudson54241132001-12-07 15:38:26 +000017860
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017861# For some functions, having a definition is not sufficient, since
17862# we want to take their address.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017863{ $as_echo "$as_me:$LINENO: checking for chroot" >&5
17864$as_echo_n "checking for chroot... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017865cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017866/* confdefs.h. */
17867_ACEOF
17868cat confdefs.h >>conftest.$ac_ext
17869cat >>conftest.$ac_ext <<_ACEOF
17870/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017871#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017872int
17873main ()
17874{
17875void *x=chroot
17876 ;
17877 return 0;
17878}
17879_ACEOF
17880rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017881if { (ac_try="$ac_compile"
17882case "(($ac_try" in
17883 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17884 *) ac_try_echo=$ac_try;;
17885esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017886eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17887$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017888 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017889 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017890 grep -v '^ *+' conftest.er1 >conftest.err
17891 rm -f conftest.er1
17892 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017893 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017894 (exit $ac_status); } && {
17895 test -z "$ac_c_werror_flag" ||
17896 test ! -s conftest.err
17897 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017898
17899cat >>confdefs.h <<\_ACEOF
17900#define HAVE_CHROOT 1
17901_ACEOF
17902
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017903 { $as_echo "$as_me:$LINENO: result: yes" >&5
17904$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017905else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017906 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017907sed 's/^/| /' conftest.$ac_ext >&5
17908
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017909 { $as_echo "$as_me:$LINENO: result: no" >&5
17910$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017911
17912fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017913
17914rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017915{ $as_echo "$as_me:$LINENO: checking for link" >&5
17916$as_echo_n "checking for link... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017917cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017918/* confdefs.h. */
17919_ACEOF
17920cat confdefs.h >>conftest.$ac_ext
17921cat >>conftest.$ac_ext <<_ACEOF
17922/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017923#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017924int
17925main ()
17926{
17927void *x=link
17928 ;
17929 return 0;
17930}
17931_ACEOF
17932rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017933if { (ac_try="$ac_compile"
17934case "(($ac_try" in
17935 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17936 *) ac_try_echo=$ac_try;;
17937esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017938eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17939$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017940 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017941 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017942 grep -v '^ *+' conftest.er1 >conftest.err
17943 rm -f conftest.er1
17944 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017945 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017946 (exit $ac_status); } && {
17947 test -z "$ac_c_werror_flag" ||
17948 test ! -s conftest.err
17949 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017950
17951cat >>confdefs.h <<\_ACEOF
17952#define HAVE_LINK 1
17953_ACEOF
17954
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017955 { $as_echo "$as_me:$LINENO: result: yes" >&5
17956$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017957else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017958 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000017959sed 's/^/| /' conftest.$ac_ext >&5
17960
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017961 { $as_echo "$as_me:$LINENO: result: no" >&5
17962$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017963
17964fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017965
17966rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017967{ $as_echo "$as_me:$LINENO: checking for symlink" >&5
17968$as_echo_n "checking for symlink... " >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017969cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000017970/* confdefs.h. */
17971_ACEOF
17972cat confdefs.h >>conftest.$ac_ext
17973cat >>conftest.$ac_ext <<_ACEOF
17974/* end confdefs.h. */
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017975#include <unistd.h>
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017976int
17977main ()
17978{
17979void *x=symlink
17980 ;
17981 return 0;
17982}
17983_ACEOF
17984rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017985if { (ac_try="$ac_compile"
17986case "(($ac_try" in
17987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17988 *) ac_try_echo=$ac_try;;
17989esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017990eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
17991$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017992 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000017993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000017994 grep -v '^ *+' conftest.er1 >conftest.err
17995 rm -f conftest.er1
17996 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000017997 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000017998 (exit $ac_status); } && {
17999 test -z "$ac_c_werror_flag" ||
18000 test ! -s conftest.err
18001 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018002
18003cat >>confdefs.h <<\_ACEOF
18004#define HAVE_SYMLINK 1
18005_ACEOF
18006
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018007 { $as_echo "$as_me:$LINENO: result: yes" >&5
18008$as_echo "yes" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018009else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018010 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018011sed 's/^/| /' conftest.$ac_ext >&5
18012
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018013 { $as_echo "$as_me:$LINENO: result: no" >&5
18014$as_echo "no" >&6; }
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018015
18016fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018017
18018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018019{ $as_echo "$as_me:$LINENO: checking for fchdir" >&5
18020$as_echo_n "checking for fchdir... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018021cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018022/* confdefs.h. */
18023_ACEOF
18024cat confdefs.h >>conftest.$ac_ext
18025cat >>conftest.$ac_ext <<_ACEOF
18026/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018027#include <unistd.h>
18028int
18029main ()
18030{
18031void *x=fchdir
18032 ;
18033 return 0;
18034}
18035_ACEOF
18036rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018037if { (ac_try="$ac_compile"
18038case "(($ac_try" in
18039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18040 *) ac_try_echo=$ac_try;;
18041esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018042eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18043$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018044 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018045 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018046 grep -v '^ *+' conftest.er1 >conftest.err
18047 rm -f conftest.er1
18048 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018049 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018050 (exit $ac_status); } && {
18051 test -z "$ac_c_werror_flag" ||
18052 test ! -s conftest.err
18053 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018054
18055cat >>confdefs.h <<\_ACEOF
18056#define HAVE_FCHDIR 1
18057_ACEOF
18058
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018059 { $as_echo "$as_me:$LINENO: result: yes" >&5
18060$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018061else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018062 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018063sed 's/^/| /' conftest.$ac_ext >&5
18064
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018065 { $as_echo "$as_me:$LINENO: result: no" >&5
18066$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018067
18068fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018069
18070rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018071{ $as_echo "$as_me:$LINENO: checking for fsync" >&5
18072$as_echo_n "checking for fsync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018073cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018074/* confdefs.h. */
18075_ACEOF
18076cat confdefs.h >>conftest.$ac_ext
18077cat >>conftest.$ac_ext <<_ACEOF
18078/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018079#include <unistd.h>
18080int
18081main ()
18082{
18083void *x=fsync
18084 ;
18085 return 0;
18086}
18087_ACEOF
18088rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018089if { (ac_try="$ac_compile"
18090case "(($ac_try" in
18091 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18092 *) ac_try_echo=$ac_try;;
18093esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018094eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18095$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018096 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018097 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018098 grep -v '^ *+' conftest.er1 >conftest.err
18099 rm -f conftest.er1
18100 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018101 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018102 (exit $ac_status); } && {
18103 test -z "$ac_c_werror_flag" ||
18104 test ! -s conftest.err
18105 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018106
18107cat >>confdefs.h <<\_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018108#define HAVE_FSYNC 1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018109_ACEOF
18110
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018111 { $as_echo "$as_me:$LINENO: result: yes" >&5
18112$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018113else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018114 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018115sed 's/^/| /' conftest.$ac_ext >&5
18116
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018117 { $as_echo "$as_me:$LINENO: result: no" >&5
18118$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018119
18120fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018121
18122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018123{ $as_echo "$as_me:$LINENO: checking for fdatasync" >&5
18124$as_echo_n "checking for fdatasync... " >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018125cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018126/* confdefs.h. */
18127_ACEOF
18128cat confdefs.h >>conftest.$ac_ext
18129cat >>conftest.$ac_ext <<_ACEOF
18130/* end confdefs.h. */
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018131#include <unistd.h>
18132int
18133main ()
18134{
18135void *x=fdatasync
18136 ;
18137 return 0;
18138}
18139_ACEOF
18140rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018141if { (ac_try="$ac_compile"
18142case "(($ac_try" in
18143 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18144 *) ac_try_echo=$ac_try;;
18145esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018146eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18147$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018148 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018149 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018150 grep -v '^ *+' conftest.er1 >conftest.err
18151 rm -f conftest.er1
18152 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018153 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018154 (exit $ac_status); } && {
18155 test -z "$ac_c_werror_flag" ||
18156 test ! -s conftest.err
18157 } && test -s conftest.$ac_objext; then
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018158
18159cat >>confdefs.h <<\_ACEOF
18160#define HAVE_FDATASYNC 1
18161_ACEOF
18162
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018163 { $as_echo "$as_me:$LINENO: result: yes" >&5
18164$as_echo "yes" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018165else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018166 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018167sed 's/^/| /' conftest.$ac_ext >&5
18168
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018169 { $as_echo "$as_me:$LINENO: result: no" >&5
18170$as_echo "no" >&6; }
Martin v. Löwisa64988c2003-09-20 15:30:20 +000018171
18172fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018173
18174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018175{ $as_echo "$as_me:$LINENO: checking for epoll" >&5
18176$as_echo_n "checking for epoll... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018177cat >conftest.$ac_ext <<_ACEOF
18178/* confdefs.h. */
18179_ACEOF
18180cat confdefs.h >>conftest.$ac_ext
18181cat >>conftest.$ac_ext <<_ACEOF
18182/* end confdefs.h. */
18183#include <sys/epoll.h>
18184int
18185main ()
18186{
18187void *x=epoll_create
18188 ;
18189 return 0;
18190}
18191_ACEOF
18192rm -f conftest.$ac_objext
18193if { (ac_try="$ac_compile"
18194case "(($ac_try" in
18195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18196 *) ac_try_echo=$ac_try;;
18197esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018198eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18199$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018200 (eval "$ac_compile") 2>conftest.er1
18201 ac_status=$?
18202 grep -v '^ *+' conftest.er1 >conftest.err
18203 rm -f conftest.er1
18204 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018205 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018206 (exit $ac_status); } && {
18207 test -z "$ac_c_werror_flag" ||
18208 test ! -s conftest.err
18209 } && test -s conftest.$ac_objext; then
Martin v. Löwisc8ad7cc2002-11-11 13:23:45 +000018210
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018211cat >>confdefs.h <<\_ACEOF
18212#define HAVE_EPOLL 1
18213_ACEOF
18214
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018215 { $as_echo "$as_me:$LINENO: result: yes" >&5
18216$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018217else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018218 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018219sed 's/^/| /' conftest.$ac_ext >&5
18220
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018221 { $as_echo "$as_me:$LINENO: result: no" >&5
18222$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018223
18224fi
18225
18226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018227{ $as_echo "$as_me:$LINENO: checking for kqueue" >&5
18228$as_echo_n "checking for kqueue... " >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018229cat >conftest.$ac_ext <<_ACEOF
18230/* confdefs.h. */
18231_ACEOF
18232cat confdefs.h >>conftest.$ac_ext
18233cat >>conftest.$ac_ext <<_ACEOF
18234/* end confdefs.h. */
18235
18236#include <sys/types.h>
18237#include <sys/event.h>
18238
18239int
18240main ()
18241{
18242int x=kqueue()
18243 ;
18244 return 0;
18245}
18246_ACEOF
18247rm -f conftest.$ac_objext
18248if { (ac_try="$ac_compile"
18249case "(($ac_try" in
18250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18251 *) ac_try_echo=$ac_try;;
18252esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018253eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18254$as_echo "$ac_try_echo") >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018255 (eval "$ac_compile") 2>conftest.er1
18256 ac_status=$?
18257 grep -v '^ *+' conftest.er1 >conftest.err
18258 rm -f conftest.er1
18259 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018260 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018261 (exit $ac_status); } && {
18262 test -z "$ac_c_werror_flag" ||
18263 test ! -s conftest.err
18264 } && test -s conftest.$ac_objext; then
18265
18266cat >>confdefs.h <<\_ACEOF
18267#define HAVE_KQUEUE 1
18268_ACEOF
18269
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018270 { $as_echo "$as_me:$LINENO: result: yes" >&5
18271$as_echo "yes" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018272else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018273 $as_echo "$as_me: failed program was:" >&5
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018274sed 's/^/| /' conftest.$ac_ext >&5
18275
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018276 { $as_echo "$as_me:$LINENO: result: no" >&5
18277$as_echo "no" >&6; }
Christian Heimes4fbc72b2008-03-22 00:47:35 +000018278
18279fi
18280
18281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000018282# On some systems (eg. FreeBSD 5), we would find a definition of the
18283# functions ctermid_r, setgroups in the library, but no prototype
18284# (e.g. because we use _XOPEN_SOURCE). See whether we can take their
18285# address to avoid compiler warnings and potential miscompilations
18286# because of the missing prototypes.
18287
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018288{ $as_echo "$as_me:$LINENO: checking for ctermid_r" >&5
18289$as_echo_n "checking for ctermid_r... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018290cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018291/* confdefs.h. */
18292_ACEOF
18293cat confdefs.h >>conftest.$ac_ext
18294cat >>conftest.$ac_ext <<_ACEOF
18295/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000018296
18297#include "confdefs.h"
18298#include <stdio.h>
18299
Martin v. Löwisd5843682002-11-21 20:41:28 +000018300int
18301main ()
18302{
18303void* p = ctermid_r
18304 ;
18305 return 0;
18306}
18307_ACEOF
18308rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018309if { (ac_try="$ac_compile"
18310case "(($ac_try" in
18311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18312 *) ac_try_echo=$ac_try;;
18313esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018314eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18315$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018316 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000018317 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018318 grep -v '^ *+' conftest.er1 >conftest.err
18319 rm -f conftest.er1
18320 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018321 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018322 (exit $ac_status); } && {
18323 test -z "$ac_c_werror_flag" ||
18324 test ! -s conftest.err
18325 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000018326
18327cat >>confdefs.h <<\_ACEOF
18328#define HAVE_CTERMID_R 1
18329_ACEOF
18330
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018331 { $as_echo "$as_me:$LINENO: result: yes" >&5
18332$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018333else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018334 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018335sed 's/^/| /' conftest.$ac_ext >&5
18336
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018337 { $as_echo "$as_me:$LINENO: result: no" >&5
18338$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000018339
18340fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018341
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018342rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18343
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018344{ $as_echo "$as_me:$LINENO: checking for flock" >&5
18345$as_echo_n "checking for flock... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018346cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018347/* confdefs.h. */
18348_ACEOF
18349cat confdefs.h >>conftest.$ac_ext
18350cat >>conftest.$ac_ext <<_ACEOF
18351/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018352
18353#include "confdefs.h"
18354#include <sys/file.h>
18355
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018356int
18357main ()
18358{
18359void* p = flock
18360 ;
18361 return 0;
18362}
18363_ACEOF
18364rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018365if { (ac_try="$ac_compile"
18366case "(($ac_try" in
18367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18368 *) ac_try_echo=$ac_try;;
18369esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018370eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18371$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018372 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018374 grep -v '^ *+' conftest.er1 >conftest.err
18375 rm -f conftest.er1
18376 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018377 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018378 (exit $ac_status); } && {
18379 test -z "$ac_c_werror_flag" ||
18380 test ! -s conftest.err
18381 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018382
18383cat >>confdefs.h <<\_ACEOF
18384#define HAVE_FLOCK 1
18385_ACEOF
18386
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018387 { $as_echo "$as_me:$LINENO: result: yes" >&5
18388$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018389else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018390 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018391sed 's/^/| /' conftest.$ac_ext >&5
18392
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018393 { $as_echo "$as_me:$LINENO: result: no" >&5
18394$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018395
18396fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000018397
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018398rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18399
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018400{ $as_echo "$as_me:$LINENO: checking for getpagesize" >&5
18401$as_echo_n "checking for getpagesize... " >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018402cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018403/* confdefs.h. */
18404_ACEOF
18405cat confdefs.h >>conftest.$ac_ext
18406cat >>conftest.$ac_ext <<_ACEOF
18407/* end confdefs.h. */
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018408
18409#include "confdefs.h"
18410#include <unistd.h>
18411
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018412int
18413main ()
18414{
18415void* p = getpagesize
18416 ;
18417 return 0;
18418}
18419_ACEOF
18420rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018421if { (ac_try="$ac_compile"
18422case "(($ac_try" in
18423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18424 *) ac_try_echo=$ac_try;;
18425esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018426eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18427$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018428 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018429 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018430 grep -v '^ *+' conftest.er1 >conftest.err
18431 rm -f conftest.er1
18432 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018433 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018434 (exit $ac_status); } && {
18435 test -z "$ac_c_werror_flag" ||
18436 test ! -s conftest.err
18437 } && test -s conftest.$ac_objext; then
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018438
18439cat >>confdefs.h <<\_ACEOF
18440#define HAVE_GETPAGESIZE 1
18441_ACEOF
18442
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018443 { $as_echo "$as_me:$LINENO: result: yes" >&5
18444$as_echo "yes" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018445else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018446 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018447sed 's/^/| /' conftest.$ac_ext >&5
18448
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018449 { $as_echo "$as_me:$LINENO: result: no" >&5
18450$as_echo "no" >&6; }
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018451
18452fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018453
18454rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisf26d63b2003-03-30 17:23:49 +000018455
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018456for ac_prog in true
18457do
18458 # Extract the first word of "$ac_prog", so it can be a program name with args.
18459set dummy $ac_prog; ac_word=$2
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018460{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
18461$as_echo_n "checking for $ac_word... " >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018462if test "${ac_cv_prog_TRUE+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018463 $as_echo_n "(cached) " >&6
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018464else
18465 if test -n "$TRUE"; then
18466 ac_cv_prog_TRUE="$TRUE" # Let the user override the test.
18467else
18468as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18469for as_dir in $PATH
18470do
18471 IFS=$as_save_IFS
18472 test -z "$as_dir" && as_dir=.
18473 for ac_exec_ext in '' $ac_executable_extensions; do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018474 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 +000018475 ac_cv_prog_TRUE="$ac_prog"
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018476 $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018477 break 2
18478 fi
18479done
18480done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018481IFS=$as_save_IFS
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018482
18483fi
18484fi
18485TRUE=$ac_cv_prog_TRUE
18486if test -n "$TRUE"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018487 { $as_echo "$as_me:$LINENO: result: $TRUE" >&5
18488$as_echo "$TRUE" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018489else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018490 { $as_echo "$as_me:$LINENO: result: no" >&5
18491$as_echo "no" >&6; }
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018492fi
18493
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018494
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018495 test -n "$TRUE" && break
18496done
18497test -n "$TRUE" || TRUE="/bin/true"
18498
18499
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018500{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lc" >&5
18501$as_echo_n "checking for inet_aton in -lc... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018502if test "${ac_cv_lib_c_inet_aton+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018503 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018504else
18505 ac_check_lib_save_LIBS=$LIBS
18506LIBS="-lc $LIBS"
18507cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018508/* confdefs.h. */
18509_ACEOF
18510cat confdefs.h >>conftest.$ac_ext
18511cat >>conftest.$ac_ext <<_ACEOF
18512/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018513
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018514/* Override any GCC internal prototype to avoid an error.
18515 Use char because int might match the return type of a GCC
18516 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018517#ifdef __cplusplus
18518extern "C"
18519#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018520char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018521int
18522main ()
18523{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018524return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018525 ;
18526 return 0;
18527}
18528_ACEOF
18529rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018530if { (ac_try="$ac_link"
18531case "(($ac_try" in
18532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18533 *) ac_try_echo=$ac_try;;
18534esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018535eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18536$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018537 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018539 grep -v '^ *+' conftest.er1 >conftest.err
18540 rm -f conftest.er1
18541 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018542 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018543 (exit $ac_status); } && {
18544 test -z "$ac_c_werror_flag" ||
18545 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018546 } && test -s conftest$ac_exeext && {
18547 test "$cross_compiling" = yes ||
18548 $as_test_x conftest$ac_exeext
18549 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018550 ac_cv_lib_c_inet_aton=yes
18551else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018552 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018553sed 's/^/| /' conftest.$ac_ext >&5
18554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018555 ac_cv_lib_c_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018557
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018558rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018559rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018560 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018561LIBS=$ac_check_lib_save_LIBS
18562fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018563{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_c_inet_aton" >&5
18564$as_echo "$ac_cv_lib_c_inet_aton" >&6; }
18565if test "x$ac_cv_lib_c_inet_aton" = x""yes; then
Martin v. Löwis4ee6eef2003-05-26 05:37:51 +000018566 $ac_cv_prog_TRUE
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018567else
18568
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018569{ $as_echo "$as_me:$LINENO: checking for inet_aton in -lresolv" >&5
18570$as_echo_n "checking for inet_aton in -lresolv... " >&6; }
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018571if test "${ac_cv_lib_resolv_inet_aton+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018572 $as_echo_n "(cached) " >&6
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018573else
18574 ac_check_lib_save_LIBS=$LIBS
18575LIBS="-lresolv $LIBS"
18576cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018577/* confdefs.h. */
18578_ACEOF
18579cat confdefs.h >>conftest.$ac_ext
18580cat >>conftest.$ac_ext <<_ACEOF
18581/* end confdefs.h. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018582
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018583/* Override any GCC internal prototype to avoid an error.
18584 Use char because int might match the return type of a GCC
18585 builtin and then its argument prototype would still apply. */
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018586#ifdef __cplusplus
18587extern "C"
18588#endif
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018589char inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018590int
18591main ()
18592{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018593return inet_aton ();
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018594 ;
18595 return 0;
18596}
18597_ACEOF
18598rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018599if { (ac_try="$ac_link"
18600case "(($ac_try" in
18601 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18602 *) ac_try_echo=$ac_try;;
18603esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018604eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18605$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018606 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018607 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018608 grep -v '^ *+' conftest.er1 >conftest.err
18609 rm -f conftest.er1
18610 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018611 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018612 (exit $ac_status); } && {
18613 test -z "$ac_c_werror_flag" ||
18614 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018615 } && test -s conftest$ac_exeext && {
18616 test "$cross_compiling" = yes ||
18617 $as_test_x conftest$ac_exeext
18618 }; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018619 ac_cv_lib_resolv_inet_aton=yes
18620else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018621 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018622sed 's/^/| /' conftest.$ac_ext >&5
18623
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018624 ac_cv_lib_resolv_inet_aton=no
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018625fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018626
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018627rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018628rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018629 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018630LIBS=$ac_check_lib_save_LIBS
18631fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018632{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_inet_aton" >&5
18633$as_echo "$ac_cv_lib_resolv_inet_aton" >&6; }
18634if test "x$ac_cv_lib_resolv_inet_aton" = x""yes; then
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018635 cat >>confdefs.h <<_ACEOF
18636#define HAVE_LIBRESOLV 1
18637_ACEOF
18638
18639 LIBS="-lresolv $LIBS"
18640
18641fi
18642
18643
18644fi
18645
18646
Christian Heimesd0764e22007-12-04 15:00:33 +000018647# On Tru64, chflags seems to be present, but calling it will
18648# exit Python
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018649{ $as_echo "$as_me:$LINENO: checking for chflags" >&5
18650$as_echo_n "checking for chflags... " >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018651if test "${ac_cv_have_chflags+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018652 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018653else
18654 if test "$cross_compiling" = yes; then
18655 ac_cv_have_chflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018656else
18657 cat >conftest.$ac_ext <<_ACEOF
18658/* confdefs.h. */
18659_ACEOF
18660cat confdefs.h >>conftest.$ac_ext
18661cat >>conftest.$ac_ext <<_ACEOF
18662/* end confdefs.h. */
18663
18664#include <sys/stat.h>
18665#include <unistd.h>
18666int main(int argc, char*argv[])
18667{
18668 if(chflags(argv[0], 0) != 0)
18669 return 1;
18670 return 0;
18671}
18672
18673_ACEOF
18674rm -f conftest$ac_exeext
18675if { (ac_try="$ac_link"
18676case "(($ac_try" in
18677 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18678 *) ac_try_echo=$ac_try;;
18679esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018680eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18681$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018682 (eval "$ac_link") 2>&5
18683 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018684 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18686 { (case "(($ac_try" in
18687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18688 *) ac_try_echo=$ac_try;;
18689esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018690eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18691$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018692 (eval "$ac_try") 2>&5
18693 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018694 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018695 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018696 ac_cv_have_chflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018697else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018698 $as_echo "$as_me: program exited with status $ac_status" >&5
18699$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018700sed 's/^/| /' conftest.$ac_ext >&5
18701
18702( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018703ac_cv_have_chflags=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018704fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018705rm -rf conftest.dSYM
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018706rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000018707fi
18708
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018709
18710
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018711fi
18712
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018713{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_chflags" >&5
18714$as_echo "$ac_cv_have_chflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018715if test $ac_cv_have_chflags = yes
18716then
18717
18718cat >>confdefs.h <<\_ACEOF
18719#define HAVE_CHFLAGS 1
18720_ACEOF
18721
18722fi
18723
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018724{ $as_echo "$as_me:$LINENO: checking for lchflags" >&5
18725$as_echo_n "checking for lchflags... " >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018726if test "${ac_cv_have_lchflags+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018727 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018728else
18729 if test "$cross_compiling" = yes; then
18730 ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018731else
18732 cat >conftest.$ac_ext <<_ACEOF
18733/* confdefs.h. */
18734_ACEOF
18735cat confdefs.h >>conftest.$ac_ext
18736cat >>conftest.$ac_ext <<_ACEOF
18737/* end confdefs.h. */
18738
18739#include <sys/stat.h>
18740#include <unistd.h>
18741int main(int argc, char*argv[])
18742{
18743 if(lchflags(argv[0], 0) != 0)
18744 return 1;
18745 return 0;
18746}
18747
18748_ACEOF
18749rm -f conftest$ac_exeext
18750if { (ac_try="$ac_link"
18751case "(($ac_try" in
18752 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18753 *) ac_try_echo=$ac_try;;
18754esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018755eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18756$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018757 (eval "$ac_link") 2>&5
18758 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018759 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018760 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18761 { (case "(($ac_try" in
18762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18763 *) ac_try_echo=$ac_try;;
18764esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018765eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18766$as_echo "$ac_try_echo") >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018767 (eval "$ac_try") 2>&5
18768 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018769 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesd0764e22007-12-04 15:00:33 +000018770 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018771 ac_cv_have_lchflags=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018772else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018773 $as_echo "$as_me: program exited with status $ac_status" >&5
18774$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018775sed 's/^/| /' conftest.$ac_ext >&5
18776
18777( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018778ac_cv_have_lchflags=no
Christian Heimesd0764e22007-12-04 15:00:33 +000018779fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018780rm -rf conftest.dSYM
Alexandre Vassalotti19142282009-07-17 23:11:52 +000018781rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18782fi
18783
18784
Christian Heimesd0764e22007-12-04 15:00:33 +000018785
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018786fi
18787
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018788{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_lchflags" >&5
18789$as_echo "$ac_cv_have_lchflags" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000018790if test $ac_cv_have_lchflags = yes
18791then
18792
18793cat >>confdefs.h <<\_ACEOF
18794#define HAVE_LCHFLAGS 1
18795_ACEOF
18796
18797fi
18798
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018799case $ac_sys_system/$ac_sys_release in
18800Darwin/*)
18801 _CUR_CFLAGS="${CFLAGS}"
18802 _CUR_LDFLAGS="${LDFLAGS}"
18803 CFLAGS="${CFLAGS} -Wl,-search_paths_first"
18804 LDFLAGS="${LDFLAGS} -Wl,-search_paths_first -L/usr/local/lib"
18805 ;;
18806esac
18807
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018808{ $as_echo "$as_me:$LINENO: checking for inflateCopy in -lz" >&5
18809$as_echo_n "checking for inflateCopy in -lz... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018810if test "${ac_cv_lib_z_inflateCopy+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018811 $as_echo_n "(cached) " >&6
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018812else
18813 ac_check_lib_save_LIBS=$LIBS
18814LIBS="-lz $LIBS"
18815cat >conftest.$ac_ext <<_ACEOF
18816/* confdefs.h. */
18817_ACEOF
18818cat confdefs.h >>conftest.$ac_ext
18819cat >>conftest.$ac_ext <<_ACEOF
18820/* end confdefs.h. */
18821
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018822/* Override any GCC internal prototype to avoid an error.
18823 Use char because int might match the return type of a GCC
18824 builtin and then its argument prototype would still apply. */
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018825#ifdef __cplusplus
18826extern "C"
18827#endif
18828char inflateCopy ();
18829int
18830main ()
18831{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018832return inflateCopy ();
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018833 ;
18834 return 0;
18835}
18836_ACEOF
18837rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018838if { (ac_try="$ac_link"
18839case "(($ac_try" in
18840 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18841 *) ac_try_echo=$ac_try;;
18842esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018843eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18844$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018845 (eval "$ac_link") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018846 ac_status=$?
18847 grep -v '^ *+' conftest.er1 >conftest.err
18848 rm -f conftest.er1
18849 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018850 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018851 (exit $ac_status); } && {
18852 test -z "$ac_c_werror_flag" ||
18853 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018854 } && test -s conftest$ac_exeext && {
18855 test "$cross_compiling" = yes ||
18856 $as_test_x conftest$ac_exeext
18857 }; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018858 ac_cv_lib_z_inflateCopy=yes
18859else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018860 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018861sed 's/^/| /' conftest.$ac_ext >&5
18862
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018863 ac_cv_lib_z_inflateCopy=no
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018864fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018865
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018866rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018867rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018868 conftest$ac_exeext conftest.$ac_ext
18869LIBS=$ac_check_lib_save_LIBS
18870fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018871{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateCopy" >&5
18872$as_echo "$ac_cv_lib_z_inflateCopy" >&6; }
18873if test "x$ac_cv_lib_z_inflateCopy" = x""yes; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000018874
18875cat >>confdefs.h <<\_ACEOF
18876#define HAVE_ZLIB_COPY 1
18877_ACEOF
18878
18879fi
18880
18881
18882case $ac_sys_system/$ac_sys_release in
18883Darwin/*)
18884 CFLAGS="${_CUR_CFLAGS}"
18885 LDFLAGS="${_CUR_LDFLAGS}"
18886 ;;
18887esac
18888
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018889{ $as_echo "$as_me:$LINENO: checking for hstrerror" >&5
18890$as_echo_n "checking for hstrerror... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018891cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018892/* confdefs.h. */
18893_ACEOF
18894cat confdefs.h >>conftest.$ac_ext
18895cat >>conftest.$ac_ext <<_ACEOF
18896/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018897
18898#include "confdefs.h"
18899#include <netdb.h>
18900
Martin v. Löwise9416172003-05-03 10:12:45 +000018901int
18902main ()
18903{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018904void* p = hstrerror; hstrerror(0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018905 ;
18906 return 0;
18907}
18908_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018909rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018910if { (ac_try="$ac_link"
18911case "(($ac_try" in
18912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18913 *) ac_try_echo=$ac_try;;
18914esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018915eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18916$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018917 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018918 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018919 grep -v '^ *+' conftest.er1 >conftest.err
18920 rm -f conftest.er1
18921 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018922 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018923 (exit $ac_status); } && {
18924 test -z "$ac_c_werror_flag" ||
18925 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018926 } && test -s conftest$ac_exeext && {
18927 test "$cross_compiling" = yes ||
18928 $as_test_x conftest$ac_exeext
18929 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018930
18931cat >>confdefs.h <<\_ACEOF
18932#define HAVE_HSTRERROR 1
18933_ACEOF
18934
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018935 { $as_echo "$as_me:$LINENO: result: yes" >&5
18936$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018937else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018938 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000018939sed 's/^/| /' conftest.$ac_ext >&5
18940
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018941 { $as_echo "$as_me:$LINENO: result: no" >&5
18942$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018943
18944fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018945
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018946rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018947rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000018948 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000018949
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018950{ $as_echo "$as_me:$LINENO: checking for inet_aton" >&5
18951$as_echo_n "checking for inet_aton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000018952cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000018953/* confdefs.h. */
18954_ACEOF
18955cat confdefs.h >>conftest.$ac_ext
18956cat >>conftest.$ac_ext <<_ACEOF
18957/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000018958
18959#include "confdefs.h"
Martin v. Löwis86d66262006-02-17 08:40:11 +000018960#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000018961#include <sys/socket.h>
18962#include <netinet/in.h>
18963#include <arpa/inet.h>
18964
Martin v. Löwise9416172003-05-03 10:12:45 +000018965int
18966main ()
18967{
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018968void* p = inet_aton;inet_aton(0,0)
Martin v. Löwise9416172003-05-03 10:12:45 +000018969 ;
18970 return 0;
18971}
18972_ACEOF
Martin v. Löwis95c419b2003-05-03 12:10:48 +000018973rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018974if { (ac_try="$ac_link"
18975case "(($ac_try" in
18976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18977 *) ac_try_echo=$ac_try;;
18978esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018979eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
18980$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018981 (eval "$ac_link") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000018982 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000018983 grep -v '^ *+' conftest.er1 >conftest.err
18984 rm -f conftest.er1
18985 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018986 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000018987 (exit $ac_status); } && {
18988 test -z "$ac_c_werror_flag" ||
18989 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018990 } && test -s conftest$ac_exeext && {
18991 test "$cross_compiling" = yes ||
18992 $as_test_x conftest$ac_exeext
18993 }; then
Martin v. Löwise9416172003-05-03 10:12:45 +000018994
18995cat >>confdefs.h <<\_ACEOF
18996#define HAVE_INET_ATON 1
18997_ACEOF
18998
Benjamin Peterson8719ad52009-09-11 22:24:02 +000018999 { $as_echo "$as_me:$LINENO: result: yes" >&5
19000$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019001else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019002 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019003sed 's/^/| /' conftest.$ac_ext >&5
19004
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019005 { $as_echo "$as_me:$LINENO: result: no" >&5
19006$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019007
19008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019009
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019010rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019011rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019012 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019013
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019014{ $as_echo "$as_me:$LINENO: checking for inet_pton" >&5
19015$as_echo_n "checking for inet_pton... " >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019016cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019017/* confdefs.h. */
19018_ACEOF
19019cat confdefs.h >>conftest.$ac_ext
19020cat >>conftest.$ac_ext <<_ACEOF
19021/* end confdefs.h. */
Martin v. Löwise9416172003-05-03 10:12:45 +000019022
19023#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019024#include <sys/types.h>
Martin v. Löwise9416172003-05-03 10:12:45 +000019025#include <sys/socket.h>
19026#include <netinet/in.h>
19027#include <arpa/inet.h>
19028
Martin v. Löwise9416172003-05-03 10:12:45 +000019029int
19030main ()
19031{
19032void* p = inet_pton
19033 ;
19034 return 0;
19035}
19036_ACEOF
19037rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019038if { (ac_try="$ac_compile"
19039case "(($ac_try" in
19040 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19041 *) ac_try_echo=$ac_try;;
19042esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019043eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19044$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019045 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwise9416172003-05-03 10:12:45 +000019046 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019047 grep -v '^ *+' conftest.er1 >conftest.err
19048 rm -f conftest.er1
19049 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019050 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019051 (exit $ac_status); } && {
19052 test -z "$ac_c_werror_flag" ||
19053 test ! -s conftest.err
19054 } && test -s conftest.$ac_objext; then
Martin v. Löwise9416172003-05-03 10:12:45 +000019055
19056cat >>confdefs.h <<\_ACEOF
19057#define HAVE_INET_PTON 1
19058_ACEOF
19059
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019060 { $as_echo "$as_me:$LINENO: result: yes" >&5
19061$as_echo "yes" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019062else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019063 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019064sed 's/^/| /' conftest.$ac_ext >&5
19065
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019066 { $as_echo "$as_me:$LINENO: result: no" >&5
19067$as_echo "no" >&6; }
Martin v. Löwise9416172003-05-03 10:12:45 +000019068
19069fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019070
19071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwise9416172003-05-03 10:12:45 +000019072
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019073# On some systems, setgroups is in unistd.h, on others, in grp.h
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019074{ $as_echo "$as_me:$LINENO: checking for setgroups" >&5
19075$as_echo_n "checking for setgroups... " >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019076cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019077/* confdefs.h. */
19078_ACEOF
19079cat confdefs.h >>conftest.$ac_ext
19080cat >>conftest.$ac_ext <<_ACEOF
19081/* end confdefs.h. */
Martin v. Löwisd5843682002-11-21 20:41:28 +000019082
19083#include "confdefs.h"
Martin v. Löwisf2e488d2003-05-05 22:00:11 +000019084#include <unistd.h>
Martin v. Löwisd6640d42003-07-06 09:29:52 +000019085#ifdef HAVE_GRP_H
19086#include <grp.h>
19087#endif
Martin v. Löwisd5843682002-11-21 20:41:28 +000019088
Martin v. Löwisd5843682002-11-21 20:41:28 +000019089int
19090main ()
19091{
19092void* p = setgroups
19093 ;
19094 return 0;
19095}
19096_ACEOF
19097rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019098if { (ac_try="$ac_compile"
19099case "(($ac_try" in
19100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19101 *) ac_try_echo=$ac_try;;
19102esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019103eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19104$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019105 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd5843682002-11-21 20:41:28 +000019106 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019107 grep -v '^ *+' conftest.er1 >conftest.err
19108 rm -f conftest.er1
19109 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019110 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019111 (exit $ac_status); } && {
19112 test -z "$ac_c_werror_flag" ||
19113 test ! -s conftest.err
19114 } && test -s conftest.$ac_objext; then
Martin v. Löwisd5843682002-11-21 20:41:28 +000019115
19116cat >>confdefs.h <<\_ACEOF
19117#define HAVE_SETGROUPS 1
19118_ACEOF
19119
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019120 { $as_echo "$as_me:$LINENO: result: yes" >&5
19121$as_echo "yes" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019122else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019123 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019124sed 's/^/| /' conftest.$ac_ext >&5
19125
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019126 { $as_echo "$as_me:$LINENO: result: no" >&5
19127$as_echo "no" >&6; }
Martin v. Löwisd5843682002-11-21 20:41:28 +000019128
19129fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019130
19131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd5843682002-11-21 20:41:28 +000019132
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019133# check for openpty and forkpty
19134
Martin v. Löwis11437992002-04-12 09:54:03 +000019135
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019136for ac_func in openpty
19137do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019138as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19139{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19140$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019141if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019142 $as_echo_n "(cached) " >&6
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019143else
Martin v. Löwis11437992002-04-12 09:54:03 +000019144 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019145/* confdefs.h. */
19146_ACEOF
19147cat confdefs.h >>conftest.$ac_ext
19148cat >>conftest.$ac_ext <<_ACEOF
19149/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019150/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19151 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19152#define $ac_func innocuous_$ac_func
19153
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019154/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019155 which can conflict with char $ac_func (); below.
19156 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019157 <limits.h> exists even on freestanding compilers. */
19158
19159#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019160# include <limits.h>
19161#else
19162# include <assert.h>
19163#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019164
19165#undef $ac_func
19166
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019167/* Override any GCC internal prototype to avoid an error.
19168 Use char because int might match the return type of a GCC
19169 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019170#ifdef __cplusplus
19171extern "C"
19172#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019173char $ac_func ();
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019174/* The GNU C library defines this for functions which it implements
19175 to always fail with ENOSYS. Some functions are actually named
19176 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019177#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019178choke me
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019179#endif
19180
Skip Montanaro6dead952003-09-25 14:50:04 +000019181int
19182main ()
19183{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019184return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019185 ;
19186 return 0;
19187}
19188_ACEOF
19189rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019190if { (ac_try="$ac_link"
19191case "(($ac_try" in
19192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19193 *) ac_try_echo=$ac_try;;
19194esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019195eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19196$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019197 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019198 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019199 grep -v '^ *+' conftest.er1 >conftest.err
19200 rm -f conftest.er1
19201 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019202 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019203 (exit $ac_status); } && {
19204 test -z "$ac_c_werror_flag" ||
19205 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019206 } && test -s conftest$ac_exeext && {
19207 test "$cross_compiling" = yes ||
19208 $as_test_x conftest$ac_exeext
19209 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019210 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019211else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019212 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019213sed 's/^/| /' conftest.$ac_ext >&5
19214
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019215 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019216fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019217
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019218rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019219rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019220 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019221fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019222ac_res=`eval 'as_val=${'$as_ac_var'}
19223 $as_echo "$as_val"'`
19224 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19225$as_echo "$ac_res" >&6; }
19226as_val=`eval 'as_val=${'$as_ac_var'}
19227 $as_echo "$as_val"'`
19228 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019229 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019230#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019231_ACEOF
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019232
Guido van Rossumd0b69ec2001-09-10 14:10:54 +000019233else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019234 { $as_echo "$as_me:$LINENO: checking for openpty in -lutil" >&5
19235$as_echo_n "checking for openpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019236if test "${ac_cv_lib_util_openpty+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019237 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019238else
Martin v. Löwis11437992002-04-12 09:54:03 +000019239 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019240LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019241cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019242/* confdefs.h. */
19243_ACEOF
19244cat confdefs.h >>conftest.$ac_ext
19245cat >>conftest.$ac_ext <<_ACEOF
19246/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019247
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019248/* Override any GCC internal prototype to avoid an error.
19249 Use char because int might match the return type of a GCC
19250 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019251#ifdef __cplusplus
19252extern "C"
19253#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019254char openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019255int
19256main ()
19257{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019258return openpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019259 ;
19260 return 0;
19261}
19262_ACEOF
19263rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019264if { (ac_try="$ac_link"
19265case "(($ac_try" in
19266 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19267 *) ac_try_echo=$ac_try;;
19268esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019269eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19270$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019271 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019272 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019273 grep -v '^ *+' conftest.er1 >conftest.err
19274 rm -f conftest.er1
19275 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019276 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019277 (exit $ac_status); } && {
19278 test -z "$ac_c_werror_flag" ||
19279 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019280 } && test -s conftest$ac_exeext && {
19281 test "$cross_compiling" = yes ||
19282 $as_test_x conftest$ac_exeext
19283 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019284 ac_cv_lib_util_openpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019285else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019286 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019287sed 's/^/| /' conftest.$ac_ext >&5
19288
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019289 ac_cv_lib_util_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019290fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019291
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019292rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019293rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019294 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019295LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019296fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019297{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_openpty" >&5
19298$as_echo "$ac_cv_lib_util_openpty" >&6; }
19299if test "x$ac_cv_lib_util_openpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019300 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019301#define HAVE_OPENPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019302_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019303 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019304else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019305 { $as_echo "$as_me:$LINENO: checking for openpty in -lbsd" >&5
19306$as_echo_n "checking for openpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019307if test "${ac_cv_lib_bsd_openpty+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019308 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019309else
19310 ac_check_lib_save_LIBS=$LIBS
19311LIBS="-lbsd $LIBS"
19312cat >conftest.$ac_ext <<_ACEOF
19313/* confdefs.h. */
19314_ACEOF
19315cat confdefs.h >>conftest.$ac_ext
19316cat >>conftest.$ac_ext <<_ACEOF
19317/* end confdefs.h. */
19318
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019319/* Override any GCC internal prototype to avoid an error.
19320 Use char because int might match the return type of a GCC
19321 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019322#ifdef __cplusplus
19323extern "C"
19324#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019325char openpty ();
19326int
19327main ()
19328{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019329return openpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019330 ;
19331 return 0;
19332}
19333_ACEOF
19334rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019335if { (ac_try="$ac_link"
19336case "(($ac_try" in
19337 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19338 *) ac_try_echo=$ac_try;;
19339esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019340eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19341$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019342 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019343 ac_status=$?
19344 grep -v '^ *+' conftest.er1 >conftest.err
19345 rm -f conftest.er1
19346 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019347 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019348 (exit $ac_status); } && {
19349 test -z "$ac_c_werror_flag" ||
19350 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019351 } && test -s conftest$ac_exeext && {
19352 test "$cross_compiling" = yes ||
19353 $as_test_x conftest$ac_exeext
19354 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019355 ac_cv_lib_bsd_openpty=yes
19356else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019357 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019358sed 's/^/| /' conftest.$ac_ext >&5
19359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019360 ac_cv_lib_bsd_openpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019362
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019363rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019364rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019365 conftest$ac_exeext conftest.$ac_ext
19366LIBS=$ac_check_lib_save_LIBS
19367fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019368{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_openpty" >&5
19369$as_echo "$ac_cv_lib_bsd_openpty" >&6; }
19370if test "x$ac_cv_lib_bsd_openpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019371 cat >>confdefs.h <<\_ACEOF
19372#define HAVE_OPENPTY 1
19373_ACEOF
19374 LIBS="$LIBS -lbsd"
19375fi
19376
19377
19378fi
19379
Fred Drake8cef4cf2000-06-28 16:40:38 +000019380
19381fi
19382done
19383
Martin v. Löwis11437992002-04-12 09:54:03 +000019384
Fred Drake8cef4cf2000-06-28 16:40:38 +000019385for ac_func in forkpty
19386do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019387as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19388{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19389$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019390if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019391 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019392else
Martin v. Löwis11437992002-04-12 09:54:03 +000019393 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019394/* confdefs.h. */
19395_ACEOF
19396cat confdefs.h >>conftest.$ac_ext
19397cat >>conftest.$ac_ext <<_ACEOF
19398/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019399/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19400 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19401#define $ac_func innocuous_$ac_func
19402
Fred Drake8cef4cf2000-06-28 16:40:38 +000019403/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019404 which can conflict with char $ac_func (); below.
19405 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019406 <limits.h> exists even on freestanding compilers. */
19407
19408#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019409# include <limits.h>
19410#else
19411# include <assert.h>
19412#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019413
19414#undef $ac_func
19415
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019416/* Override any GCC internal prototype to avoid an error.
19417 Use char because int might match the return type of a GCC
19418 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019419#ifdef __cplusplus
19420extern "C"
19421#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019422char $ac_func ();
Fred Drake8cef4cf2000-06-28 16:40:38 +000019423/* The GNU C library defines this for functions which it implements
19424 to always fail with ENOSYS. Some functions are actually named
19425 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019426#if defined __stub_$ac_func || defined __stub___$ac_func
Fred Drake8cef4cf2000-06-28 16:40:38 +000019427choke me
Fred Drake8cef4cf2000-06-28 16:40:38 +000019428#endif
19429
Skip Montanaro6dead952003-09-25 14:50:04 +000019430int
19431main ()
19432{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019433return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019434 ;
19435 return 0;
19436}
19437_ACEOF
19438rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019439if { (ac_try="$ac_link"
19440case "(($ac_try" in
19441 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19442 *) ac_try_echo=$ac_try;;
19443esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019444eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19445$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019446 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019447 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019448 grep -v '^ *+' conftest.er1 >conftest.err
19449 rm -f conftest.er1
19450 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019451 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019452 (exit $ac_status); } && {
19453 test -z "$ac_c_werror_flag" ||
19454 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019455 } && test -s conftest$ac_exeext && {
19456 test "$cross_compiling" = yes ||
19457 $as_test_x conftest$ac_exeext
19458 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019459 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000019460else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019461 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019462sed 's/^/| /' conftest.$ac_ext >&5
19463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019464 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019466
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019467rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019468rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019469 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019470fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019471ac_res=`eval 'as_val=${'$as_ac_var'}
19472 $as_echo "$as_val"'`
19473 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19474$as_echo "$ac_res" >&6; }
19475as_val=`eval 'as_val=${'$as_ac_var'}
19476 $as_echo "$as_val"'`
19477 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019478 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019479#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019480_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019481
Fred Drake8cef4cf2000-06-28 16:40:38 +000019482else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019483 { $as_echo "$as_me:$LINENO: checking for forkpty in -lutil" >&5
19484$as_echo_n "checking for forkpty in -lutil... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000019485if test "${ac_cv_lib_util_forkpty+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019486 $as_echo_n "(cached) " >&6
Fred Drake8cef4cf2000-06-28 16:40:38 +000019487else
Martin v. Löwis11437992002-04-12 09:54:03 +000019488 ac_check_lib_save_LIBS=$LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019489LIBS="-lutil $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000019490cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019491/* confdefs.h. */
19492_ACEOF
19493cat confdefs.h >>conftest.$ac_ext
19494cat >>conftest.$ac_ext <<_ACEOF
19495/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019496
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019497/* Override any GCC internal prototype to avoid an error.
19498 Use char because int might match the return type of a GCC
19499 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019500#ifdef __cplusplus
19501extern "C"
19502#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019503char forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019504int
19505main ()
19506{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019507return forkpty ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019508 ;
19509 return 0;
19510}
19511_ACEOF
19512rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019513if { (ac_try="$ac_link"
19514case "(($ac_try" in
19515 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19516 *) ac_try_echo=$ac_try;;
19517esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019518eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19519$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019520 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019521 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019522 grep -v '^ *+' conftest.er1 >conftest.err
19523 rm -f conftest.er1
19524 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019525 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019526 (exit $ac_status); } && {
19527 test -z "$ac_c_werror_flag" ||
19528 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019529 } && test -s conftest$ac_exeext && {
19530 test "$cross_compiling" = yes ||
19531 $as_test_x conftest$ac_exeext
19532 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019533 ac_cv_lib_util_forkpty=yes
Fred Drake8cef4cf2000-06-28 16:40:38 +000019534else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019535 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019536sed 's/^/| /' conftest.$ac_ext >&5
19537
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019538 ac_cv_lib_util_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019539fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019540
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019541rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019543 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000019544LIBS=$ac_check_lib_save_LIBS
Fred Drake8cef4cf2000-06-28 16:40:38 +000019545fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019546{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_util_forkpty" >&5
19547$as_echo "$ac_cv_lib_util_forkpty" >&6; }
19548if test "x$ac_cv_lib_util_forkpty" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019549 cat >>confdefs.h <<\_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019550#define HAVE_FORKPTY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019551_ACEOF
Fred Drake8cef4cf2000-06-28 16:40:38 +000019552 LIBS="$LIBS -lutil"
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019553else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019554 { $as_echo "$as_me:$LINENO: checking for forkpty in -lbsd" >&5
19555$as_echo_n "checking for forkpty in -lbsd... " >&6; }
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019556if test "${ac_cv_lib_bsd_forkpty+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019557 $as_echo_n "(cached) " >&6
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019558else
19559 ac_check_lib_save_LIBS=$LIBS
19560LIBS="-lbsd $LIBS"
19561cat >conftest.$ac_ext <<_ACEOF
19562/* confdefs.h. */
19563_ACEOF
19564cat confdefs.h >>conftest.$ac_ext
19565cat >>conftest.$ac_ext <<_ACEOF
19566/* end confdefs.h. */
19567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019568/* Override any GCC internal prototype to avoid an error.
19569 Use char because int might match the return type of a GCC
19570 builtin and then its argument prototype would still apply. */
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019571#ifdef __cplusplus
19572extern "C"
19573#endif
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019574char forkpty ();
19575int
19576main ()
19577{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019578return forkpty ();
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019579 ;
19580 return 0;
19581}
19582_ACEOF
19583rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019584if { (ac_try="$ac_link"
19585case "(($ac_try" in
19586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19587 *) ac_try_echo=$ac_try;;
19588esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019589eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19590$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019591 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019592 ac_status=$?
19593 grep -v '^ *+' conftest.er1 >conftest.err
19594 rm -f conftest.er1
19595 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019596 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019597 (exit $ac_status); } && {
19598 test -z "$ac_c_werror_flag" ||
19599 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019600 } && test -s conftest$ac_exeext && {
19601 test "$cross_compiling" = yes ||
19602 $as_test_x conftest$ac_exeext
19603 }; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019604 ac_cv_lib_bsd_forkpty=yes
19605else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019606 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019607sed 's/^/| /' conftest.$ac_ext >&5
19608
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019609 ac_cv_lib_bsd_forkpty=no
Fred Drake8cef4cf2000-06-28 16:40:38 +000019610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019611
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019612rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019613rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019614 conftest$ac_exeext conftest.$ac_ext
19615LIBS=$ac_check_lib_save_LIBS
19616fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019617{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_forkpty" >&5
19618$as_echo "$ac_cv_lib_bsd_forkpty" >&6; }
19619if test "x$ac_cv_lib_bsd_forkpty" = x""yes; then
Martin v. Löwisfd9a72a2006-01-08 10:07:33 +000019620 cat >>confdefs.h <<\_ACEOF
19621#define HAVE_FORKPTY 1
19622_ACEOF
19623 LIBS="$LIBS -lbsd"
19624fi
19625
19626
19627fi
19628
Fred Drake8cef4cf2000-06-28 16:40:38 +000019629
19630fi
19631done
19632
Jack Jansendd19cf82001-12-06 22:36:17 +000019633
Christian Heimesb186d002008-03-18 15:15:01 +000019634# Stuff for expat.
19635
19636for ac_func in memmove
19637do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019638as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19639{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19640$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimesb186d002008-03-18 15:15:01 +000019641if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019642 $as_echo_n "(cached) " >&6
Christian Heimesb186d002008-03-18 15:15:01 +000019643else
19644 cat >conftest.$ac_ext <<_ACEOF
19645/* confdefs.h. */
19646_ACEOF
19647cat confdefs.h >>conftest.$ac_ext
19648cat >>conftest.$ac_ext <<_ACEOF
19649/* end confdefs.h. */
19650/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19651 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19652#define $ac_func innocuous_$ac_func
19653
19654/* System header to define __stub macros and hopefully few prototypes,
19655 which can conflict with char $ac_func (); below.
19656 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19657 <limits.h> exists even on freestanding compilers. */
19658
19659#ifdef __STDC__
19660# include <limits.h>
19661#else
19662# include <assert.h>
19663#endif
19664
19665#undef $ac_func
19666
19667/* Override any GCC internal prototype to avoid an error.
19668 Use char because int might match the return type of a GCC
19669 builtin and then its argument prototype would still apply. */
19670#ifdef __cplusplus
19671extern "C"
19672#endif
19673char $ac_func ();
19674/* The GNU C library defines this for functions which it implements
19675 to always fail with ENOSYS. Some functions are actually named
19676 something starting with __ and the normal name is an alias. */
19677#if defined __stub_$ac_func || defined __stub___$ac_func
19678choke me
19679#endif
19680
19681int
19682main ()
19683{
19684return $ac_func ();
19685 ;
19686 return 0;
19687}
19688_ACEOF
19689rm -f conftest.$ac_objext conftest$ac_exeext
19690if { (ac_try="$ac_link"
19691case "(($ac_try" in
19692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19693 *) ac_try_echo=$ac_try;;
19694esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019695eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19696$as_echo "$ac_try_echo") >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019697 (eval "$ac_link") 2>conftest.er1
19698 ac_status=$?
19699 grep -v '^ *+' conftest.er1 >conftest.err
19700 rm -f conftest.er1
19701 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019702 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019703 (exit $ac_status); } && {
19704 test -z "$ac_c_werror_flag" ||
19705 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019706 } && test -s conftest$ac_exeext && {
19707 test "$cross_compiling" = yes ||
19708 $as_test_x conftest$ac_exeext
19709 }; then
Christian Heimesb186d002008-03-18 15:15:01 +000019710 eval "$as_ac_var=yes"
19711else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019712 $as_echo "$as_me: failed program was:" >&5
Christian Heimesb186d002008-03-18 15:15:01 +000019713sed 's/^/| /' conftest.$ac_ext >&5
19714
19715 eval "$as_ac_var=no"
19716fi
19717
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019718rm -rf conftest.dSYM
Christian Heimesb186d002008-03-18 15:15:01 +000019719rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19720 conftest$ac_exeext conftest.$ac_ext
19721fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019722ac_res=`eval 'as_val=${'$as_ac_var'}
19723 $as_echo "$as_val"'`
19724 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19725$as_echo "$ac_res" >&6; }
19726as_val=`eval 'as_val=${'$as_ac_var'}
19727 $as_echo "$as_val"'`
19728 if test "x$as_val" = x""yes; then
Christian Heimesb186d002008-03-18 15:15:01 +000019729 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019730#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimesb186d002008-03-18 15:15:01 +000019731_ACEOF
19732
19733fi
19734done
19735
19736
Michael W. Hudson54241132001-12-07 15:38:26 +000019737# check for long file support functions
Martin v. Löwis11437992002-04-12 09:54:03 +000019738
19739
19740
19741
19742
19743
Fred Drake8cef4cf2000-06-28 16:40:38 +000019744for ac_func in fseek64 fseeko fstatvfs ftell64 ftello statvfs
19745do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019746as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19747{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19748$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019749if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019750 $as_echo_n "(cached) " >&6
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019751else
Martin v. Löwis11437992002-04-12 09:54:03 +000019752 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019753/* confdefs.h. */
19754_ACEOF
19755cat confdefs.h >>conftest.$ac_ext
19756cat >>conftest.$ac_ext <<_ACEOF
19757/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019758/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19759 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19760#define $ac_func innocuous_$ac_func
19761
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019762/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019763 which can conflict with char $ac_func (); below.
19764 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019765 <limits.h> exists even on freestanding compilers. */
19766
19767#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019768# include <limits.h>
19769#else
19770# include <assert.h>
19771#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019772
19773#undef $ac_func
19774
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019775/* Override any GCC internal prototype to avoid an error.
19776 Use char because int might match the return type of a GCC
19777 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019778#ifdef __cplusplus
19779extern "C"
19780#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019781char $ac_func ();
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019782/* The GNU C library defines this for functions which it implements
19783 to always fail with ENOSYS. Some functions are actually named
19784 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019785#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019786choke me
Guido van Rossumf98e2a71999-01-06 18:53:34 +000019787#endif
19788
Skip Montanaro6dead952003-09-25 14:50:04 +000019789int
19790main ()
19791{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019792return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019793 ;
19794 return 0;
19795}
19796_ACEOF
19797rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019798if { (ac_try="$ac_link"
19799case "(($ac_try" in
19800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19801 *) ac_try_echo=$ac_try;;
19802esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019803eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19804$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019805 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019806 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019807 grep -v '^ *+' conftest.er1 >conftest.err
19808 rm -f conftest.er1
19809 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019810 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019811 (exit $ac_status); } && {
19812 test -z "$ac_c_werror_flag" ||
19813 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019814 } && test -s conftest$ac_exeext && {
19815 test "$cross_compiling" = yes ||
19816 $as_test_x conftest$ac_exeext
19817 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019818 eval "$as_ac_var=yes"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019819else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019820 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019821sed 's/^/| /' conftest.$ac_ext >&5
19822
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019823 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000019824fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019825
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019826rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019827rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019828 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000019829fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019830ac_res=`eval 'as_val=${'$as_ac_var'}
19831 $as_echo "$as_val"'`
19832 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19833$as_echo "$ac_res" >&6; }
19834as_val=`eval 'as_val=${'$as_ac_var'}
19835 $as_echo "$as_val"'`
19836 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019837 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019838#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019839_ACEOF
Michael W. Hudson54241132001-12-07 15:38:26 +000019840
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019841fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000019842done
19843
Michael W. Hudson54241132001-12-07 15:38:26 +000019844
Martin v. Löwis11437992002-04-12 09:54:03 +000019845
19846
19847
Christian Heimesb186d002008-03-18 15:15:01 +000019848for ac_func in dup2 getcwd strdup
Thomas Wouters3a584202000-08-05 23:28:51 +000019849do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019850as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19851{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19852$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019853if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019854 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019855else
Martin v. Löwis11437992002-04-12 09:54:03 +000019856 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019857/* confdefs.h. */
19858_ACEOF
19859cat confdefs.h >>conftest.$ac_ext
19860cat >>conftest.$ac_ext <<_ACEOF
19861/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019862/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19863 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19864#define $ac_func innocuous_$ac_func
19865
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000019866/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019867 which can conflict with char $ac_func (); below.
19868 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019869 <limits.h> exists even on freestanding compilers. */
19870
19871#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019872# include <limits.h>
19873#else
19874# include <assert.h>
19875#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019876
19877#undef $ac_func
19878
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019879/* Override any GCC internal prototype to avoid an error.
19880 Use char because int might match the return type of a GCC
19881 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019882#ifdef __cplusplus
19883extern "C"
19884#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019885char $ac_func ();
Guido van Rossum627b2d71993-12-24 10:39:16 +000019886/* The GNU C library defines this for functions which it implements
19887 to always fail with ENOSYS. Some functions are actually named
19888 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019889#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum627b2d71993-12-24 10:39:16 +000019890choke me
Guido van Rossum627b2d71993-12-24 10:39:16 +000019891#endif
Guido van Rossum76be6ed1995-01-02 18:33:54 +000019892
Skip Montanaro6dead952003-09-25 14:50:04 +000019893int
19894main ()
19895{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019896return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000019897 ;
19898 return 0;
19899}
19900_ACEOF
19901rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019902if { (ac_try="$ac_link"
19903case "(($ac_try" in
19904 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19905 *) ac_try_echo=$ac_try;;
19906esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019907eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
19908$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019909 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000019910 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000019911 grep -v '^ *+' conftest.er1 >conftest.err
19912 rm -f conftest.er1
19913 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019914 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019915 (exit $ac_status); } && {
19916 test -z "$ac_c_werror_flag" ||
19917 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019918 } && test -s conftest$ac_exeext && {
19919 test "$cross_compiling" = yes ||
19920 $as_test_x conftest$ac_exeext
19921 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019922 eval "$as_ac_var=yes"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019923else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019924 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000019925sed 's/^/| /' conftest.$ac_ext >&5
19926
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019927 eval "$as_ac_var=no"
Martin v. Löwis1142de32002-03-29 16:28:31 +000019928fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019929
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019930rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019931rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000019932 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis1142de32002-03-29 16:28:31 +000019933fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019934ac_res=`eval 'as_val=${'$as_ac_var'}
19935 $as_echo "$as_val"'`
19936 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
19937$as_echo "$ac_res" >&6; }
19938as_val=`eval 'as_val=${'$as_ac_var'}
19939 $as_echo "$as_val"'`
19940 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000019941 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019942#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000019943_ACEOF
Martin v. Löwis1142de32002-03-29 16:28:31 +000019944
Martin v. Löwis1142de32002-03-29 16:28:31 +000019945else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019946 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000019947 *" $ac_func.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019948 *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
19949 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000019950esac
19951
Martin v. Löwis1142de32002-03-29 16:28:31 +000019952fi
19953done
19954
19955
Martin v. Löwis11437992002-04-12 09:54:03 +000019956
Martin v. Löwis1142de32002-03-29 16:28:31 +000019957for ac_func in getpgrp
19958do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019959as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
19960{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
19961$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019962if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000019963 $as_echo_n "(cached) " >&6
Martin v. Löwis1142de32002-03-29 16:28:31 +000019964else
Martin v. Löwis11437992002-04-12 09:54:03 +000019965 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000019966/* confdefs.h. */
19967_ACEOF
19968cat confdefs.h >>conftest.$ac_ext
19969cat >>conftest.$ac_ext <<_ACEOF
19970/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019971/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19972 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19973#define $ac_func innocuous_$ac_func
19974
Martin v. Löwis1142de32002-03-29 16:28:31 +000019975/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000019976 which can conflict with char $ac_func (); below.
19977 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019978 <limits.h> exists even on freestanding compilers. */
19979
19980#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000019981# include <limits.h>
19982#else
19983# include <assert.h>
19984#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000019985
19986#undef $ac_func
19987
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019988/* Override any GCC internal prototype to avoid an error.
19989 Use char because int might match the return type of a GCC
19990 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000019991#ifdef __cplusplus
19992extern "C"
19993#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000019994char $ac_func ();
Martin v. Löwis1142de32002-03-29 16:28:31 +000019995/* The GNU C library defines this for functions which it implements
19996 to always fail with ENOSYS. Some functions are actually named
19997 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000019998#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis1142de32002-03-29 16:28:31 +000019999choke me
Martin v. Löwis1142de32002-03-29 16:28:31 +000020000#endif
20001
Skip Montanaro6dead952003-09-25 14:50:04 +000020002int
20003main ()
20004{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020005return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020006 ;
20007 return 0;
20008}
20009_ACEOF
20010rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020011if { (ac_try="$ac_link"
20012case "(($ac_try" in
20013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20014 *) ac_try_echo=$ac_try;;
20015esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020016eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20017$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020018 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020019 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020020 grep -v '^ *+' conftest.er1 >conftest.err
20021 rm -f conftest.er1
20022 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020023 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020024 (exit $ac_status); } && {
20025 test -z "$ac_c_werror_flag" ||
20026 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020027 } && test -s conftest$ac_exeext && {
20028 test "$cross_compiling" = yes ||
20029 $as_test_x conftest$ac_exeext
20030 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020031 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020032else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020033 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020034sed 's/^/| /' conftest.$ac_ext >&5
20035
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020036 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020037fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020038
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020039rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020040rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020041 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020042fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020043ac_res=`eval 'as_val=${'$as_ac_var'}
20044 $as_echo "$as_val"'`
20045 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20046$as_echo "$ac_res" >&6; }
20047as_val=`eval 'as_val=${'$as_ac_var'}
20048 $as_echo "$as_val"'`
20049 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020050 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020051#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020052_ACEOF
20053 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020054/* confdefs.h. */
20055_ACEOF
20056cat confdefs.h >>conftest.$ac_ext
20057cat >>conftest.$ac_ext <<_ACEOF
20058/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020059#include <unistd.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020060int
20061main ()
20062{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020063getpgrp(0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020064 ;
20065 return 0;
20066}
20067_ACEOF
20068rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020069if { (ac_try="$ac_compile"
20070case "(($ac_try" in
20071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20072 *) ac_try_echo=$ac_try;;
20073esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020074eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20075$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020076 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020077 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020078 grep -v '^ *+' conftest.er1 >conftest.err
20079 rm -f conftest.er1
20080 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020081 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020082 (exit $ac_status); } && {
20083 test -z "$ac_c_werror_flag" ||
20084 test ! -s conftest.err
20085 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020086
20087cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020088#define GETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020089_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020090
Martin v. Löwis11437992002-04-12 09:54:03 +000020091
Guido van Rossumf78abae1997-01-21 22:02:36 +000020092else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020093 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020094sed 's/^/| /' conftest.$ac_ext >&5
20095
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020096
Guido van Rossum627b2d71993-12-24 10:39:16 +000020097fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020098
20099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020100
Guido van Rossum627b2d71993-12-24 10:39:16 +000020101fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020102done
Guido van Rossum627b2d71993-12-24 10:39:16 +000020103
Jack Jansen150753c2003-03-29 22:07:47 +000020104
20105for ac_func in setpgrp
20106do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020107as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20108{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20109$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020110if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020111 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020112else
Martin v. Löwis11437992002-04-12 09:54:03 +000020113 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020114/* confdefs.h. */
20115_ACEOF
20116cat confdefs.h >>conftest.$ac_ext
20117cat >>conftest.$ac_ext <<_ACEOF
20118/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020119/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20120 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20121#define $ac_func innocuous_$ac_func
20122
Jack Jansen150753c2003-03-29 22:07:47 +000020123/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020124 which can conflict with char $ac_func (); below.
20125 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020126 <limits.h> exists even on freestanding compilers. */
20127
20128#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020129# include <limits.h>
20130#else
20131# include <assert.h>
20132#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020133
20134#undef $ac_func
20135
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020136/* Override any GCC internal prototype to avoid an error.
20137 Use char because int might match the return type of a GCC
20138 builtin and then its argument prototype would still apply. */
Jack Jansen150753c2003-03-29 22:07:47 +000020139#ifdef __cplusplus
20140extern "C"
Martin v. Löwis11437992002-04-12 09:54:03 +000020141#endif
Jack Jansen150753c2003-03-29 22:07:47 +000020142char $ac_func ();
Jack Jansen150753c2003-03-29 22:07:47 +000020143/* The GNU C library defines this for functions which it implements
20144 to always fail with ENOSYS. Some functions are actually named
20145 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020146#if defined __stub_$ac_func || defined __stub___$ac_func
Jack Jansen150753c2003-03-29 22:07:47 +000020147choke me
Jack Jansen150753c2003-03-29 22:07:47 +000020148#endif
20149
Skip Montanaro6dead952003-09-25 14:50:04 +000020150int
20151main ()
20152{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020153return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020154 ;
20155 return 0;
20156}
20157_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020158rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020159if { (ac_try="$ac_link"
20160case "(($ac_try" in
20161 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20162 *) ac_try_echo=$ac_try;;
20163esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020164eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20165$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020166 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020167 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020168 grep -v '^ *+' conftest.er1 >conftest.err
20169 rm -f conftest.er1
20170 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020171 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020172 (exit $ac_status); } && {
20173 test -z "$ac_c_werror_flag" ||
20174 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020175 } && test -s conftest$ac_exeext && {
20176 test "$cross_compiling" = yes ||
20177 $as_test_x conftest$ac_exeext
20178 }; then
Jack Jansen150753c2003-03-29 22:07:47 +000020179 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020180else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020181 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020182sed 's/^/| /' conftest.$ac_ext >&5
20183
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020184 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020185fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020186
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020187rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020188rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020189 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020190fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020191ac_res=`eval 'as_val=${'$as_ac_var'}
20192 $as_echo "$as_val"'`
20193 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20194$as_echo "$ac_res" >&6; }
20195as_val=`eval 'as_val=${'$as_ac_var'}
20196 $as_echo "$as_val"'`
20197 if test "x$as_val" = x""yes; then
Jack Jansen150753c2003-03-29 22:07:47 +000020198 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020199#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Jack Jansen150753c2003-03-29 22:07:47 +000020200_ACEOF
20201 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020202/* confdefs.h. */
20203_ACEOF
20204cat confdefs.h >>conftest.$ac_ext
20205cat >>conftest.$ac_ext <<_ACEOF
20206/* end confdefs.h. */
Jack Jansen150753c2003-03-29 22:07:47 +000020207#include <unistd.h>
Jack Jansen150753c2003-03-29 22:07:47 +000020208int
20209main ()
20210{
20211setpgrp(0,0);
20212 ;
20213 return 0;
20214}
20215_ACEOF
20216rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020217if { (ac_try="$ac_compile"
20218case "(($ac_try" in
20219 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20220 *) ac_try_echo=$ac_try;;
20221esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020222eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20223$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020224 (eval "$ac_compile") 2>conftest.er1
Jack Jansen150753c2003-03-29 22:07:47 +000020225 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020226 grep -v '^ *+' conftest.er1 >conftest.err
20227 rm -f conftest.er1
20228 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020229 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020230 (exit $ac_status); } && {
20231 test -z "$ac_c_werror_flag" ||
20232 test ! -s conftest.err
20233 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020234
20235cat >>confdefs.h <<\_ACEOF
Jack Jansen150753c2003-03-29 22:07:47 +000020236#define SETPGRP_HAVE_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020237_ACEOF
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020238
Jack Jansen150753c2003-03-29 22:07:47 +000020239
20240else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020241 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020242sed 's/^/| /' conftest.$ac_ext >&5
20243
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020244
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020245fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020246
20247rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Jack Jansen150753c2003-03-29 22:07:47 +000020248
20249fi
20250done
Guido van Rossum8eee56f1994-10-20 22:18:37 +000020251
Martin v. Löwis11437992002-04-12 09:54:03 +000020252
Thomas Wouters3a584202000-08-05 23:28:51 +000020253for ac_func in gettimeofday
20254do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020255as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20256{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20257$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020258if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020259 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020260else
Martin v. Löwis11437992002-04-12 09:54:03 +000020261 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020262/* confdefs.h. */
20263_ACEOF
20264cat confdefs.h >>conftest.$ac_ext
20265cat >>conftest.$ac_ext <<_ACEOF
20266/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020267/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20268 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20269#define $ac_func innocuous_$ac_func
20270
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000020271/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020272 which can conflict with char $ac_func (); below.
20273 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020274 <limits.h> exists even on freestanding compilers. */
20275
20276#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020277# include <limits.h>
20278#else
20279# include <assert.h>
20280#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020281
20282#undef $ac_func
20283
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020284/* Override any GCC internal prototype to avoid an error.
20285 Use char because int might match the return type of a GCC
20286 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020287#ifdef __cplusplus
20288extern "C"
20289#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020290char $ac_func ();
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020291/* The GNU C library defines this for functions which it implements
20292 to always fail with ENOSYS. Some functions are actually named
20293 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020294#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020295choke me
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020296#endif
20297
Skip Montanaro6dead952003-09-25 14:50:04 +000020298int
20299main ()
20300{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020301return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020302 ;
20303 return 0;
20304}
20305_ACEOF
20306rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020307if { (ac_try="$ac_link"
20308case "(($ac_try" in
20309 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20310 *) ac_try_echo=$ac_try;;
20311esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020312eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20313$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020314 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020315 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020316 grep -v '^ *+' conftest.er1 >conftest.err
20317 rm -f conftest.er1
20318 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020319 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020320 (exit $ac_status); } && {
20321 test -z "$ac_c_werror_flag" ||
20322 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020323 } && test -s conftest$ac_exeext && {
20324 test "$cross_compiling" = yes ||
20325 $as_test_x conftest$ac_exeext
20326 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020327 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020328else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020329 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020330sed 's/^/| /' conftest.$ac_ext >&5
20331
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020332 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020333fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020334
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020335rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020336rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020337 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020338fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020339ac_res=`eval 'as_val=${'$as_ac_var'}
20340 $as_echo "$as_val"'`
20341 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20342$as_echo "$ac_res" >&6; }
20343as_val=`eval 'as_val=${'$as_ac_var'}
20344 $as_echo "$as_val"'`
20345 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020346 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020347#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020348_ACEOF
20349 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020350/* confdefs.h. */
20351_ACEOF
20352cat confdefs.h >>conftest.$ac_ext
20353cat >>conftest.$ac_ext <<_ACEOF
20354/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000020355#include <sys/time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020356int
20357main ()
20358{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020359gettimeofday((struct timeval*)0,(struct timezone*)0);
Martin v. Löwis11437992002-04-12 09:54:03 +000020360 ;
20361 return 0;
20362}
20363_ACEOF
20364rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020365if { (ac_try="$ac_compile"
20366case "(($ac_try" in
20367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20368 *) ac_try_echo=$ac_try;;
20369esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020370eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20371$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020372 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020373 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020374 grep -v '^ *+' conftest.er1 >conftest.err
20375 rm -f conftest.er1
20376 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020377 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020378 (exit $ac_status); } && {
20379 test -z "$ac_c_werror_flag" ||
20380 test ! -s conftest.err
20381 } && test -s conftest.$ac_objext; then
Guido van Rossum627b2d71993-12-24 10:39:16 +000020382 :
20383else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020384 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020385sed 's/^/| /' conftest.$ac_ext >&5
20386
Martin v. Löwis11437992002-04-12 09:54:03 +000020387
20388cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020389#define GETTIMEOFDAY_NO_TZ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020390_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000020391
Martin v. Löwis11437992002-04-12 09:54:03 +000020392
Guido van Rossum627b2d71993-12-24 10:39:16 +000020393fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020394
20395rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisc45929e2002-04-06 10:10:49 +000020396
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020397fi
Thomas Wouters3a584202000-08-05 23:28:51 +000020398done
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020399
Michael W. Hudson54241132001-12-07 15:38:26 +000020400
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020401{ $as_echo "$as_me:$LINENO: checking for major" >&5
20402$as_echo_n "checking for major... " >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020403cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020404/* confdefs.h. */
20405_ACEOF
20406cat confdefs.h >>conftest.$ac_ext
20407cat >>conftest.$ac_ext <<_ACEOF
20408/* end confdefs.h. */
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020409
Neal Norwitz6eb37f02003-02-23 23:28:15 +000020410#if defined(MAJOR_IN_MKDEV)
20411#include <sys/mkdev.h>
20412#elif defined(MAJOR_IN_SYSMACROS)
20413#include <sys/sysmacros.h>
20414#else
20415#include <sys/types.h>
20416#endif
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020417
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020418int
20419main ()
20420{
20421
20422 makedev(major(0),minor(0));
20423
20424 ;
20425 return 0;
20426}
20427_ACEOF
Martin v. Löwise3271202002-11-07 07:42:30 +000020428rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020429if { (ac_try="$ac_link"
20430case "(($ac_try" in
20431 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20432 *) ac_try_echo=$ac_try;;
20433esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020434eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20435$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020436 (eval "$ac_link") 2>conftest.er1
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020437 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020438 grep -v '^ *+' conftest.er1 >conftest.err
20439 rm -f conftest.er1
20440 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020441 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020442 (exit $ac_status); } && {
20443 test -z "$ac_c_werror_flag" ||
20444 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020445 } && test -s conftest$ac_exeext && {
20446 test "$cross_compiling" = yes ||
20447 $as_test_x conftest$ac_exeext
20448 }; then
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020449
20450
20451cat >>confdefs.h <<\_ACEOF
20452#define HAVE_DEVICE_MACROS 1
20453_ACEOF
20454
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020455 { $as_echo "$as_me:$LINENO: result: yes" >&5
20456$as_echo "yes" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020457
20458else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020459 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020460sed 's/^/| /' conftest.$ac_ext >&5
20461
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020462
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020463 { $as_echo "$as_me:$LINENO: result: no" >&5
20464$as_echo "no" >&6; }
Martin v. Löwisdbe3f762002-10-10 14:27:30 +000020465
20466fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020467
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020468rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020469rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020470 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020471
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020472# On OSF/1 V5.1, getaddrinfo is available, but a define
Martin v. Löwis11437992002-04-12 09:54:03 +000020473# for [no]getaddrinfo in netdb.h.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020474{ $as_echo "$as_me:$LINENO: checking for getaddrinfo" >&5
20475$as_echo_n "checking for getaddrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020476cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020477/* confdefs.h. */
20478_ACEOF
20479cat confdefs.h >>conftest.$ac_ext
20480cat >>conftest.$ac_ext <<_ACEOF
20481/* end confdefs.h. */
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020482
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020483#include <sys/types.h>
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020484#include <sys/socket.h>
20485#include <netdb.h>
Martin v. Löwisc010b6d2001-11-09 17:50:52 +000020486#include <stdio.h>
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020487
Martin v. Löwis11437992002-04-12 09:54:03 +000020488int
20489main ()
20490{
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020491getaddrinfo(NULL, NULL, NULL, NULL);
Martin v. Löwis11437992002-04-12 09:54:03 +000020492 ;
20493 return 0;
20494}
20495_ACEOF
20496rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020497if { (ac_try="$ac_link"
20498case "(($ac_try" in
20499 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20500 *) ac_try_echo=$ac_try;;
20501esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020502eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20503$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020504 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020505 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020506 grep -v '^ *+' conftest.er1 >conftest.err
20507 rm -f conftest.er1
20508 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020509 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020510 (exit $ac_status); } && {
20511 test -z "$ac_c_werror_flag" ||
20512 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020513 } && test -s conftest$ac_exeext && {
20514 test "$cross_compiling" = yes ||
20515 $as_test_x conftest$ac_exeext
20516 }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020517 have_getaddrinfo=yes
20518else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020519 $as_echo "$as_me: failed program was:" >&5
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020520sed 's/^/| /' conftest.$ac_ext >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020521
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020522 have_getaddrinfo=no
20523fi
20524
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020525rm -rf conftest.dSYM
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020526rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
20527 conftest$ac_exeext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020528{ $as_echo "$as_me:$LINENO: result: $have_getaddrinfo" >&5
20529$as_echo "$have_getaddrinfo" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020530if test $have_getaddrinfo = yes
20531then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020532 { $as_echo "$as_me:$LINENO: checking getaddrinfo bug" >&5
20533$as_echo_n "checking getaddrinfo bug... " >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020534 if test "${ac_cv_buggy_getaddrinfo+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020535 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020536else
20537 if test "$cross_compiling" = yes; then
20538 ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020539else
Martin v. Löwis11437992002-04-12 09:54:03 +000020540 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020541/* confdefs.h. */
20542_ACEOF
20543cat confdefs.h >>conftest.$ac_ext
20544cat >>conftest.$ac_ext <<_ACEOF
20545/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020546
20547#include <sys/types.h>
20548#include <netdb.h>
20549#include <string.h>
20550#include <sys/socket.h>
20551#include <netinet/in.h>
20552
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020553int main()
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020554{
20555 int passive, gaierr, inet4 = 0, inet6 = 0;
20556 struct addrinfo hints, *ai, *aitop;
20557 char straddr[INET6_ADDRSTRLEN], strport[16];
20558
20559 for (passive = 0; passive <= 1; passive++) {
20560 memset(&hints, 0, sizeof(hints));
20561 hints.ai_family = AF_UNSPEC;
20562 hints.ai_flags = passive ? AI_PASSIVE : 0;
20563 hints.ai_socktype = SOCK_STREAM;
Hye-Shik Chang54f94392004-04-14 07:55:31 +000020564 hints.ai_protocol = IPPROTO_TCP;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020565 if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20566 (void)gai_strerror(gaierr);
20567 goto bad;
20568 }
20569 for (ai = aitop; ai; ai = ai->ai_next) {
20570 if (ai->ai_addr == NULL ||
20571 ai->ai_addrlen == 0 ||
20572 getnameinfo(ai->ai_addr, ai->ai_addrlen,
20573 straddr, sizeof(straddr), strport, sizeof(strport),
20574 NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20575 goto bad;
20576 }
20577 switch (ai->ai_family) {
20578 case AF_INET:
20579 if (strcmp(strport, "54321") != 0) {
20580 goto bad;
20581 }
20582 if (passive) {
20583 if (strcmp(straddr, "0.0.0.0") != 0) {
20584 goto bad;
20585 }
20586 } else {
20587 if (strcmp(straddr, "127.0.0.1") != 0) {
20588 goto bad;
20589 }
20590 }
20591 inet4++;
20592 break;
20593 case AF_INET6:
20594 if (strcmp(strport, "54321") != 0) {
20595 goto bad;
20596 }
20597 if (passive) {
20598 if (strcmp(straddr, "::") != 0) {
20599 goto bad;
20600 }
20601 } else {
20602 if (strcmp(straddr, "::1") != 0) {
20603 goto bad;
20604 }
20605 }
20606 inet6++;
20607 break;
20608 case AF_UNSPEC:
20609 goto bad;
20610 break;
20611 default:
20612 /* another family support? */
20613 break;
20614 }
20615 }
20616 }
20617
20618 if (!(inet4 == 0 || inet4 == 2))
20619 goto bad;
20620 if (!(inet6 == 0 || inet6 == 2))
20621 goto bad;
20622
20623 if (aitop)
20624 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020625 return 0;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020626
20627 bad:
20628 if (aitop)
20629 freeaddrinfo(aitop);
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020630 return 1;
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020631}
20632
Martin v. Löwis11437992002-04-12 09:54:03 +000020633_ACEOF
20634rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020635if { (ac_try="$ac_link"
20636case "(($ac_try" in
20637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20638 *) ac_try_echo=$ac_try;;
20639esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020640eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20641$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020642 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020643 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020644 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020645 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020646 { (case "(($ac_try" in
20647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20648 *) ac_try_echo=$ac_try;;
20649esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020650eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20651$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020652 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020653 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020654 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000020655 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020656 ac_cv_buggy_getaddrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020657else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020658 $as_echo "$as_me: program exited with status $ac_status" >&5
20659$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020660sed 's/^/| /' conftest.$ac_ext >&5
20661
Martin v. Löwis11437992002-04-12 09:54:03 +000020662( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020663ac_cv_buggy_getaddrinfo=yes
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020664fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020665rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020666rm -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 +000020667fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020668
20669
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020670fi
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020671
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020672fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020673
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000020674if test $have_getaddrinfo = no -o $ac_cv_buggy_getaddrinfo = yes
20675then
20676 if test $ipv6 = yes
20677 then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020678 echo 'Fatal: You must get working getaddrinfo() function.'
20679 echo ' or you can specify "--disable-ipv6"'.
20680 exit 1
20681 fi
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020682else
Martin v. Löwis11437992002-04-12 09:54:03 +000020683
20684cat >>confdefs.h <<\_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020685#define HAVE_GETADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020686_ACEOF
Martin v. Löwis861a65b2001-10-24 14:36:00 +000020687
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020688fi
Martin v. Löwis11437992002-04-12 09:54:03 +000020689
Jack Jansen9a66b6d2001-08-08 13:56:14 +000020690for ac_func in getnameinfo
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020691do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020692as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20693{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
20694$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020695if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020696 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020697else
Martin v. Löwis11437992002-04-12 09:54:03 +000020698 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020699/* confdefs.h. */
20700_ACEOF
20701cat confdefs.h >>conftest.$ac_ext
20702cat >>conftest.$ac_ext <<_ACEOF
20703/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020704/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
20705 For example, HP-UX 11i <limits.h> declares gettimeofday. */
20706#define $ac_func innocuous_$ac_func
20707
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020708/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000020709 which can conflict with char $ac_func (); below.
20710 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020711 <limits.h> exists even on freestanding compilers. */
20712
20713#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000020714# include <limits.h>
20715#else
20716# include <assert.h>
20717#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000020718
20719#undef $ac_func
20720
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020721/* Override any GCC internal prototype to avoid an error.
20722 Use char because int might match the return type of a GCC
20723 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000020724#ifdef __cplusplus
20725extern "C"
20726#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000020727char $ac_func ();
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020728/* The GNU C library defines this for functions which it implements
20729 to always fail with ENOSYS. Some functions are actually named
20730 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020731#if defined __stub_$ac_func || defined __stub___$ac_func
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020732choke me
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020733#endif
20734
Skip Montanaro6dead952003-09-25 14:50:04 +000020735int
20736main ()
20737{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020738return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000020739 ;
20740 return 0;
20741}
20742_ACEOF
20743rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020744if { (ac_try="$ac_link"
20745case "(($ac_try" in
20746 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20747 *) ac_try_echo=$ac_try;;
20748esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020749eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20750$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020751 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020752 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020753 grep -v '^ *+' conftest.er1 >conftest.err
20754 rm -f conftest.er1
20755 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020756 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020757 (exit $ac_status); } && {
20758 test -z "$ac_c_werror_flag" ||
20759 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020760 } && test -s conftest$ac_exeext && {
20761 test "$cross_compiling" = yes ||
20762 $as_test_x conftest$ac_exeext
20763 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020764 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000020765else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020766 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020767sed 's/^/| /' conftest.$ac_ext >&5
20768
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020769 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000020770fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020771
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020772rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020773rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000020774 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000020775fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020776ac_res=`eval 'as_val=${'$as_ac_var'}
20777 $as_echo "$as_val"'`
20778 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
20779$as_echo "$ac_res" >&6; }
20780as_val=`eval 'as_val=${'$as_ac_var'}
20781 $as_echo "$as_val"'`
20782 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020783 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020784#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020785_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020786
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000020787fi
20788done
20789
Michael W. Hudson54241132001-12-07 15:38:26 +000020790
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020791# checks for structures
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020792{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
20793$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 +000020794if test "${ac_cv_header_time+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020795 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020796else
Martin v. Löwis11437992002-04-12 09:54:03 +000020797 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020798/* confdefs.h. */
20799_ACEOF
20800cat confdefs.h >>conftest.$ac_ext
20801cat >>conftest.$ac_ext <<_ACEOF
20802/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020803#include <sys/types.h>
20804#include <sys/time.h>
20805#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020806
Martin v. Löwis11437992002-04-12 09:54:03 +000020807int
20808main ()
20809{
20810if ((struct tm *) 0)
20811return 0;
20812 ;
20813 return 0;
20814}
20815_ACEOF
20816rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020817if { (ac_try="$ac_compile"
20818case "(($ac_try" in
20819 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20820 *) ac_try_echo=$ac_try;;
20821esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020822eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20823$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020824 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020825 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020826 grep -v '^ *+' conftest.er1 >conftest.err
20827 rm -f conftest.er1
20828 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020829 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020830 (exit $ac_status); } && {
20831 test -z "$ac_c_werror_flag" ||
20832 test ! -s conftest.err
20833 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020834 ac_cv_header_time=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000020835else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020836 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020837sed 's/^/| /' conftest.$ac_ext >&5
20838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020839 ac_cv_header_time=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000020840fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020841
20842rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020843fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020844{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
20845$as_echo "$ac_cv_header_time" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020846if test $ac_cv_header_time = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020847
20848cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020849#define TIME_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020850_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020851
20852fi
20853
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020854{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
20855$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 +000020856if test "${ac_cv_struct_tm+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020857 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020858else
Martin v. Löwis11437992002-04-12 09:54:03 +000020859 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020860/* confdefs.h. */
20861_ACEOF
20862cat confdefs.h >>conftest.$ac_ext
20863cat >>conftest.$ac_ext <<_ACEOF
20864/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020865#include <sys/types.h>
20866#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000020867
Martin v. Löwis11437992002-04-12 09:54:03 +000020868int
20869main ()
20870{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020871struct tm tm;
20872 int *p = &tm.tm_sec;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020873 return !p;
Martin v. Löwis11437992002-04-12 09:54:03 +000020874 ;
20875 return 0;
20876}
20877_ACEOF
20878rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020879if { (ac_try="$ac_compile"
20880case "(($ac_try" in
20881 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20882 *) ac_try_echo=$ac_try;;
20883esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020884eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20885$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020886 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020887 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020888 grep -v '^ *+' conftest.er1 >conftest.err
20889 rm -f conftest.er1
20890 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020891 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020892 (exit $ac_status); } && {
20893 test -z "$ac_c_werror_flag" ||
20894 test ! -s conftest.err
20895 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020896 ac_cv_struct_tm=time.h
20897else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020898 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020899sed 's/^/| /' conftest.$ac_ext >&5
20900
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020901 ac_cv_struct_tm=sys/time.h
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020902fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020903
20904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020905fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020906{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
20907$as_echo "$ac_cv_struct_tm" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000020908if test $ac_cv_struct_tm = sys/time.h; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020909
20910cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020911#define TM_IN_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000020912_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020913
20914fi
20915
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020916{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
20917$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000020918if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020919 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020920else
Martin v. Löwis11437992002-04-12 09:54:03 +000020921 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020922/* confdefs.h. */
20923_ACEOF
20924cat confdefs.h >>conftest.$ac_ext
20925cat >>conftest.$ac_ext <<_ACEOF
20926/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000020927#include <sys/types.h>
20928#include <$ac_cv_struct_tm>
Martin v. Löwis11437992002-04-12 09:54:03 +000020929
20930
Martin v. Löwis11437992002-04-12 09:54:03 +000020931int
20932main ()
20933{
20934static struct tm ac_aggr;
20935if (ac_aggr.tm_zone)
20936return 0;
20937 ;
20938 return 0;
20939}
20940_ACEOF
20941rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020942if { (ac_try="$ac_compile"
20943case "(($ac_try" in
20944 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20945 *) ac_try_echo=$ac_try;;
20946esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020947eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20948$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020949 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000020950 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020951 grep -v '^ *+' conftest.er1 >conftest.err
20952 rm -f conftest.er1
20953 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020954 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020955 (exit $ac_status); } && {
20956 test -z "$ac_c_werror_flag" ||
20957 test ! -s conftest.err
20958 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000020959 ac_cv_member_struct_tm_tm_zone=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000020960else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020961 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000020962sed 's/^/| /' conftest.$ac_ext >&5
20963
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020964 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000020965/* confdefs.h. */
20966_ACEOF
20967cat confdefs.h >>conftest.$ac_ext
20968cat >>conftest.$ac_ext <<_ACEOF
20969/* end confdefs.h. */
20970#include <sys/types.h>
20971#include <$ac_cv_struct_tm>
20972
20973
20974int
20975main ()
20976{
20977static struct tm ac_aggr;
20978if (sizeof ac_aggr.tm_zone)
20979return 0;
20980 ;
20981 return 0;
20982}
20983_ACEOF
20984rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020985if { (ac_try="$ac_compile"
20986case "(($ac_try" in
20987 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20988 *) ac_try_echo=$ac_try;;
20989esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020990eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
20991$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020992 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000020993 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000020994 grep -v '^ *+' conftest.er1 >conftest.err
20995 rm -f conftest.er1
20996 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000020997 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000020998 (exit $ac_status); } && {
20999 test -z "$ac_c_werror_flag" ||
21000 test ! -s conftest.err
21001 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021002 ac_cv_member_struct_tm_tm_zone=yes
21003else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021004 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021005sed 's/^/| /' conftest.$ac_ext >&5
21006
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021007 ac_cv_member_struct_tm_tm_zone=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021008fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021009
21010rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021011fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021012
21013rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021014fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021015{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
21016$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
21017if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021018
21019cat >>confdefs.h <<_ACEOF
21020#define HAVE_STRUCT_TM_TM_ZONE 1
21021_ACEOF
21022
21023
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021024fi
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000021025
Martin v. Löwis11437992002-04-12 09:54:03 +000021026if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
21027
21028cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021029#define HAVE_TM_ZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021030_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021031
21032else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021033 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
21034$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021035if test "${ac_cv_have_decl_tzname+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021036 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021037else
21038 cat >conftest.$ac_ext <<_ACEOF
21039/* confdefs.h. */
21040_ACEOF
21041cat confdefs.h >>conftest.$ac_ext
21042cat >>conftest.$ac_ext <<_ACEOF
21043/* end confdefs.h. */
21044#include <time.h>
21045
21046int
21047main ()
21048{
21049#ifndef tzname
21050 (void) tzname;
21051#endif
21052
21053 ;
21054 return 0;
21055}
21056_ACEOF
21057rm -f conftest.$ac_objext
21058if { (ac_try="$ac_compile"
21059case "(($ac_try" in
21060 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21061 *) ac_try_echo=$ac_try;;
21062esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021063eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21064$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021065 (eval "$ac_compile") 2>conftest.er1
21066 ac_status=$?
21067 grep -v '^ *+' conftest.er1 >conftest.err
21068 rm -f conftest.er1
21069 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021070 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021071 (exit $ac_status); } && {
21072 test -z "$ac_c_werror_flag" ||
21073 test ! -s conftest.err
21074 } && test -s conftest.$ac_objext; then
21075 ac_cv_have_decl_tzname=yes
21076else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021077 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021078sed 's/^/| /' conftest.$ac_ext >&5
21079
21080 ac_cv_have_decl_tzname=no
21081fi
21082
21083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21084fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021085{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
21086$as_echo "$ac_cv_have_decl_tzname" >&6; }
21087if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021088
21089cat >>confdefs.h <<_ACEOF
21090#define HAVE_DECL_TZNAME 1
21091_ACEOF
21092
21093
21094else
21095 cat >>confdefs.h <<_ACEOF
21096#define HAVE_DECL_TZNAME 0
21097_ACEOF
21098
21099
21100fi
21101
21102
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021103 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
21104$as_echo_n "checking for tzname... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021105if test "${ac_cv_var_tzname+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021106 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021107else
Martin v. Löwis11437992002-04-12 09:54:03 +000021108 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021109/* confdefs.h. */
21110_ACEOF
21111cat confdefs.h >>conftest.$ac_ext
21112cat >>conftest.$ac_ext <<_ACEOF
21113/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000021114#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021115#if !HAVE_DECL_TZNAME
21116extern char *tzname[];
Guido van Rossum627b2d71993-12-24 10:39:16 +000021117#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000021118
Martin v. Löwis11437992002-04-12 09:54:03 +000021119int
21120main ()
21121{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021122return tzname[0][0];
Martin v. Löwis11437992002-04-12 09:54:03 +000021123 ;
21124 return 0;
21125}
21126_ACEOF
21127rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021128if { (ac_try="$ac_link"
21129case "(($ac_try" in
21130 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21131 *) ac_try_echo=$ac_try;;
21132esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021133eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21134$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021135 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021136 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021137 grep -v '^ *+' conftest.er1 >conftest.err
21138 rm -f conftest.er1
21139 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021140 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021141 (exit $ac_status); } && {
21142 test -z "$ac_c_werror_flag" ||
21143 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021144 } && test -s conftest$ac_exeext && {
21145 test "$cross_compiling" = yes ||
21146 $as_test_x conftest$ac_exeext
21147 }; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021148 ac_cv_var_tzname=yes
21149else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021150 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021151sed 's/^/| /' conftest.$ac_ext >&5
21152
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021153 ac_cv_var_tzname=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000021154fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021155
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021156rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021157rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000021158 conftest$ac_exeext conftest.$ac_ext
Guido van Rossum627b2d71993-12-24 10:39:16 +000021159fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021160{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
21161$as_echo "$ac_cv_var_tzname" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000021162 if test $ac_cv_var_tzname = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021163
21164cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021165#define HAVE_TZNAME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021166_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000021167
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021168 fi
21169fi
21170
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021171{ $as_echo "$as_me:$LINENO: checking for struct stat.st_rdev" >&5
21172$as_echo_n "checking for struct stat.st_rdev... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021173if test "${ac_cv_member_struct_stat_st_rdev+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021174 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000021175else
21176 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021177/* confdefs.h. */
21178_ACEOF
21179cat confdefs.h >>conftest.$ac_ext
21180cat >>conftest.$ac_ext <<_ACEOF
21181/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021182$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021183int
21184main ()
21185{
21186static struct stat ac_aggr;
21187if (ac_aggr.st_rdev)
21188return 0;
21189 ;
21190 return 0;
21191}
21192_ACEOF
21193rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021194if { (ac_try="$ac_compile"
21195case "(($ac_try" in
21196 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21197 *) ac_try_echo=$ac_try;;
21198esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021199eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21200$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021201 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021202 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021203 grep -v '^ *+' conftest.er1 >conftest.err
21204 rm -f conftest.er1
21205 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021206 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021207 (exit $ac_status); } && {
21208 test -z "$ac_c_werror_flag" ||
21209 test ! -s conftest.err
21210 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021211 ac_cv_member_struct_stat_st_rdev=yes
21212else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021213 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021214sed 's/^/| /' conftest.$ac_ext >&5
21215
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021216 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021217/* confdefs.h. */
21218_ACEOF
21219cat confdefs.h >>conftest.$ac_ext
21220cat >>conftest.$ac_ext <<_ACEOF
21221/* end confdefs.h. */
21222$ac_includes_default
21223int
21224main ()
21225{
21226static struct stat ac_aggr;
21227if (sizeof ac_aggr.st_rdev)
21228return 0;
21229 ;
21230 return 0;
21231}
21232_ACEOF
21233rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021234if { (ac_try="$ac_compile"
21235case "(($ac_try" in
21236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21237 *) ac_try_echo=$ac_try;;
21238esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021239eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21240$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021241 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021242 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021243 grep -v '^ *+' conftest.er1 >conftest.err
21244 rm -f conftest.er1
21245 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021246 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021247 (exit $ac_status); } && {
21248 test -z "$ac_c_werror_flag" ||
21249 test ! -s conftest.err
21250 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021251 ac_cv_member_struct_stat_st_rdev=yes
21252else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021253 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021254sed 's/^/| /' conftest.$ac_ext >&5
21255
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021256 ac_cv_member_struct_stat_st_rdev=no
Martin v. Löwis11437992002-04-12 09:54:03 +000021257fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021258
21259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000021260fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021261
21262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021263fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021264{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_rdev" >&5
21265$as_echo "$ac_cv_member_struct_stat_st_rdev" >&6; }
21266if test "x$ac_cv_member_struct_stat_st_rdev" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021267
21268cat >>confdefs.h <<_ACEOF
21269#define HAVE_STRUCT_STAT_ST_RDEV 1
21270_ACEOF
21271
21272
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021273fi
21274
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021275{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5
21276$as_echo_n "checking for struct stat.st_blksize... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021277if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021278 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021279else
Martin v. Löwis11437992002-04-12 09:54:03 +000021280 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021281/* confdefs.h. */
21282_ACEOF
21283cat confdefs.h >>conftest.$ac_ext
21284cat >>conftest.$ac_ext <<_ACEOF
21285/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021286$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021287int
21288main ()
21289{
21290static struct stat ac_aggr;
21291if (ac_aggr.st_blksize)
21292return 0;
21293 ;
21294 return 0;
21295}
21296_ACEOF
21297rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021298if { (ac_try="$ac_compile"
21299case "(($ac_try" in
21300 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21301 *) ac_try_echo=$ac_try;;
21302esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021303eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21304$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021305 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021306 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021307 grep -v '^ *+' conftest.er1 >conftest.err
21308 rm -f conftest.er1
21309 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021310 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021311 (exit $ac_status); } && {
21312 test -z "$ac_c_werror_flag" ||
21313 test ! -s conftest.err
21314 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021315 ac_cv_member_struct_stat_st_blksize=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021316else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021317 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021318sed 's/^/| /' conftest.$ac_ext >&5
21319
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021320 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021321/* confdefs.h. */
21322_ACEOF
21323cat confdefs.h >>conftest.$ac_ext
21324cat >>conftest.$ac_ext <<_ACEOF
21325/* end confdefs.h. */
21326$ac_includes_default
21327int
21328main ()
21329{
21330static struct stat ac_aggr;
21331if (sizeof ac_aggr.st_blksize)
21332return 0;
21333 ;
21334 return 0;
21335}
21336_ACEOF
21337rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021338if { (ac_try="$ac_compile"
21339case "(($ac_try" in
21340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21341 *) ac_try_echo=$ac_try;;
21342esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021343eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21344$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021345 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021346 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021347 grep -v '^ *+' conftest.er1 >conftest.err
21348 rm -f conftest.er1
21349 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021350 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021351 (exit $ac_status); } && {
21352 test -z "$ac_c_werror_flag" ||
21353 test ! -s conftest.err
21354 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021355 ac_cv_member_struct_stat_st_blksize=yes
21356else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021357 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021358sed 's/^/| /' conftest.$ac_ext >&5
21359
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021360 ac_cv_member_struct_stat_st_blksize=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021361fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021362
21363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021364fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021365
21366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021367fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021368{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
21369$as_echo "$ac_cv_member_struct_stat_st_blksize" >&6; }
21370if test "x$ac_cv_member_struct_stat_st_blksize" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021371
Martin v. Löwis11437992002-04-12 09:54:03 +000021372cat >>confdefs.h <<_ACEOF
21373#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
21374_ACEOF
21375
21376
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021377fi
21378
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021379{ $as_echo "$as_me:$LINENO: checking for struct stat.st_flags" >&5
21380$as_echo_n "checking for struct stat.st_flags... " >&6; }
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021381if test "${ac_cv_member_struct_stat_st_flags+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021382 $as_echo_n "(cached) " >&6
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021383else
21384 cat >conftest.$ac_ext <<_ACEOF
21385/* confdefs.h. */
21386_ACEOF
21387cat confdefs.h >>conftest.$ac_ext
21388cat >>conftest.$ac_ext <<_ACEOF
21389/* end confdefs.h. */
21390$ac_includes_default
21391int
21392main ()
21393{
21394static struct stat ac_aggr;
21395if (ac_aggr.st_flags)
21396return 0;
21397 ;
21398 return 0;
21399}
21400_ACEOF
21401rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021402if { (ac_try="$ac_compile"
21403case "(($ac_try" in
21404 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21405 *) ac_try_echo=$ac_try;;
21406esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021407eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21408$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021409 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021410 ac_status=$?
21411 grep -v '^ *+' conftest.er1 >conftest.err
21412 rm -f conftest.er1
21413 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021414 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021415 (exit $ac_status); } && {
21416 test -z "$ac_c_werror_flag" ||
21417 test ! -s conftest.err
21418 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021419 ac_cv_member_struct_stat_st_flags=yes
21420else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021421 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021422sed 's/^/| /' conftest.$ac_ext >&5
21423
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021424 cat >conftest.$ac_ext <<_ACEOF
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021425/* confdefs.h. */
21426_ACEOF
21427cat confdefs.h >>conftest.$ac_ext
21428cat >>conftest.$ac_ext <<_ACEOF
21429/* end confdefs.h. */
21430$ac_includes_default
21431int
21432main ()
21433{
21434static struct stat ac_aggr;
21435if (sizeof ac_aggr.st_flags)
21436return 0;
21437 ;
21438 return 0;
21439}
21440_ACEOF
21441rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021442if { (ac_try="$ac_compile"
21443case "(($ac_try" in
21444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21445 *) ac_try_echo=$ac_try;;
21446esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021447eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21448$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021449 (eval "$ac_compile") 2>conftest.er1
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021450 ac_status=$?
21451 grep -v '^ *+' conftest.er1 >conftest.err
21452 rm -f conftest.er1
21453 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021454 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021455 (exit $ac_status); } && {
21456 test -z "$ac_c_werror_flag" ||
21457 test ! -s conftest.err
21458 } && test -s conftest.$ac_objext; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021459 ac_cv_member_struct_stat_st_flags=yes
21460else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021461 $as_echo "$as_me: failed program was:" >&5
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021462sed 's/^/| /' conftest.$ac_ext >&5
21463
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021464 ac_cv_member_struct_stat_st_flags=no
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021465fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021466
21467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021468fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021469
21470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021471fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021472{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_flags" >&5
21473$as_echo "$ac_cv_member_struct_stat_st_flags" >&6; }
21474if test "x$ac_cv_member_struct_stat_st_flags" = x""yes; then
Hye-Shik Chang5f937a72005-06-02 13:09:30 +000021475
21476cat >>confdefs.h <<_ACEOF
21477#define HAVE_STRUCT_STAT_ST_FLAGS 1
21478_ACEOF
21479
21480
21481fi
21482
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021483{ $as_echo "$as_me:$LINENO: checking for struct stat.st_gen" >&5
21484$as_echo_n "checking for struct stat.st_gen... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021485if test "${ac_cv_member_struct_stat_st_gen+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021486 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021487else
21488 cat >conftest.$ac_ext <<_ACEOF
21489/* confdefs.h. */
21490_ACEOF
21491cat confdefs.h >>conftest.$ac_ext
21492cat >>conftest.$ac_ext <<_ACEOF
21493/* end confdefs.h. */
21494$ac_includes_default
21495int
21496main ()
21497{
21498static struct stat ac_aggr;
21499if (ac_aggr.st_gen)
21500return 0;
21501 ;
21502 return 0;
21503}
21504_ACEOF
21505rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021506if { (ac_try="$ac_compile"
21507case "(($ac_try" in
21508 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21509 *) ac_try_echo=$ac_try;;
21510esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021511eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21512$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021513 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021514 ac_status=$?
21515 grep -v '^ *+' conftest.er1 >conftest.err
21516 rm -f conftest.er1
21517 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021518 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021519 (exit $ac_status); } && {
21520 test -z "$ac_c_werror_flag" ||
21521 test ! -s conftest.err
21522 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021523 ac_cv_member_struct_stat_st_gen=yes
21524else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021525 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021526sed 's/^/| /' conftest.$ac_ext >&5
21527
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021528 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021529/* confdefs.h. */
21530_ACEOF
21531cat confdefs.h >>conftest.$ac_ext
21532cat >>conftest.$ac_ext <<_ACEOF
21533/* end confdefs.h. */
21534$ac_includes_default
21535int
21536main ()
21537{
21538static struct stat ac_aggr;
21539if (sizeof ac_aggr.st_gen)
21540return 0;
21541 ;
21542 return 0;
21543}
21544_ACEOF
21545rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021546if { (ac_try="$ac_compile"
21547case "(($ac_try" in
21548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21549 *) ac_try_echo=$ac_try;;
21550esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021551eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21552$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021553 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021554 ac_status=$?
21555 grep -v '^ *+' conftest.er1 >conftest.err
21556 rm -f conftest.er1
21557 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021558 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021559 (exit $ac_status); } && {
21560 test -z "$ac_c_werror_flag" ||
21561 test ! -s conftest.err
21562 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021563 ac_cv_member_struct_stat_st_gen=yes
21564else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021565 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021566sed 's/^/| /' conftest.$ac_ext >&5
21567
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021568 ac_cv_member_struct_stat_st_gen=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021569fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021570
21571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021572fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021573
21574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021575fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021576{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_gen" >&5
21577$as_echo "$ac_cv_member_struct_stat_st_gen" >&6; }
21578if test "x$ac_cv_member_struct_stat_st_gen" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021579
21580cat >>confdefs.h <<_ACEOF
21581#define HAVE_STRUCT_STAT_ST_GEN 1
21582_ACEOF
21583
21584
21585fi
21586
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021587{ $as_echo "$as_me:$LINENO: checking for struct stat.st_birthtime" >&5
21588$as_echo_n "checking for struct stat.st_birthtime... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021589if test "${ac_cv_member_struct_stat_st_birthtime+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021590 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021591else
21592 cat >conftest.$ac_ext <<_ACEOF
21593/* confdefs.h. */
21594_ACEOF
21595cat confdefs.h >>conftest.$ac_ext
21596cat >>conftest.$ac_ext <<_ACEOF
21597/* end confdefs.h. */
21598$ac_includes_default
21599int
21600main ()
21601{
21602static struct stat ac_aggr;
21603if (ac_aggr.st_birthtime)
21604return 0;
21605 ;
21606 return 0;
21607}
21608_ACEOF
21609rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021610if { (ac_try="$ac_compile"
21611case "(($ac_try" in
21612 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21613 *) ac_try_echo=$ac_try;;
21614esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021615eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21616$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021617 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021618 ac_status=$?
21619 grep -v '^ *+' conftest.er1 >conftest.err
21620 rm -f conftest.er1
21621 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021622 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021623 (exit $ac_status); } && {
21624 test -z "$ac_c_werror_flag" ||
21625 test ! -s conftest.err
21626 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021627 ac_cv_member_struct_stat_st_birthtime=yes
21628else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021629 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021630sed 's/^/| /' conftest.$ac_ext >&5
21631
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021632 cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021633/* confdefs.h. */
21634_ACEOF
21635cat confdefs.h >>conftest.$ac_ext
21636cat >>conftest.$ac_ext <<_ACEOF
21637/* end confdefs.h. */
21638$ac_includes_default
21639int
21640main ()
21641{
21642static struct stat ac_aggr;
21643if (sizeof ac_aggr.st_birthtime)
21644return 0;
21645 ;
21646 return 0;
21647}
21648_ACEOF
21649rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021650if { (ac_try="$ac_compile"
21651case "(($ac_try" in
21652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21653 *) ac_try_echo=$ac_try;;
21654esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021655eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21656$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021657 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021658 ac_status=$?
21659 grep -v '^ *+' conftest.er1 >conftest.err
21660 rm -f conftest.er1
21661 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021662 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021663 (exit $ac_status); } && {
21664 test -z "$ac_c_werror_flag" ||
21665 test ! -s conftest.err
21666 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021667 ac_cv_member_struct_stat_st_birthtime=yes
21668else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021669 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021670sed 's/^/| /' conftest.$ac_ext >&5
21671
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021672 ac_cv_member_struct_stat_st_birthtime=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021673fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021674
21675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021676fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021677
21678rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021679fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021680{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_birthtime" >&5
21681$as_echo "$ac_cv_member_struct_stat_st_birthtime" >&6; }
21682if test "x$ac_cv_member_struct_stat_st_birthtime" = x""yes; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000021683
21684cat >>confdefs.h <<_ACEOF
21685#define HAVE_STRUCT_STAT_ST_BIRTHTIME 1
21686_ACEOF
21687
21688
21689fi
21690
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021691{ $as_echo "$as_me:$LINENO: checking for struct stat.st_blocks" >&5
21692$as_echo_n "checking for struct stat.st_blocks... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021693if test "${ac_cv_member_struct_stat_st_blocks+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021694 $as_echo_n "(cached) " >&6
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021695else
Martin v. Löwis11437992002-04-12 09:54:03 +000021696 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021697/* confdefs.h. */
21698_ACEOF
21699cat confdefs.h >>conftest.$ac_ext
21700cat >>conftest.$ac_ext <<_ACEOF
21701/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000021702$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000021703int
21704main ()
21705{
21706static struct stat ac_aggr;
21707if (ac_aggr.st_blocks)
21708return 0;
21709 ;
21710 return 0;
21711}
21712_ACEOF
21713rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021714if { (ac_try="$ac_compile"
21715case "(($ac_try" in
21716 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21717 *) ac_try_echo=$ac_try;;
21718esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021719eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21720$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021721 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021722 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021723 grep -v '^ *+' conftest.er1 >conftest.err
21724 rm -f conftest.er1
21725 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021726 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021727 (exit $ac_status); } && {
21728 test -z "$ac_c_werror_flag" ||
21729 test ! -s conftest.err
21730 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021731 ac_cv_member_struct_stat_st_blocks=yes
Michael W. Hudson54241132001-12-07 15:38:26 +000021732else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021733 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021734sed 's/^/| /' conftest.$ac_ext >&5
21735
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021736 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021737/* confdefs.h. */
21738_ACEOF
21739cat confdefs.h >>conftest.$ac_ext
21740cat >>conftest.$ac_ext <<_ACEOF
21741/* end confdefs.h. */
21742$ac_includes_default
21743int
21744main ()
21745{
21746static struct stat ac_aggr;
21747if (sizeof ac_aggr.st_blocks)
21748return 0;
21749 ;
21750 return 0;
21751}
21752_ACEOF
21753rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021754if { (ac_try="$ac_compile"
21755case "(($ac_try" in
21756 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21757 *) ac_try_echo=$ac_try;;
21758esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021759eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21760$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021761 (eval "$ac_compile") 2>conftest.er1
Skip Montanaro6dead952003-09-25 14:50:04 +000021762 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021763 grep -v '^ *+' conftest.er1 >conftest.err
21764 rm -f conftest.er1
21765 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021766 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021767 (exit $ac_status); } && {
21768 test -z "$ac_c_werror_flag" ||
21769 test ! -s conftest.err
21770 } && test -s conftest.$ac_objext; then
Skip Montanaro6dead952003-09-25 14:50:04 +000021771 ac_cv_member_struct_stat_st_blocks=yes
21772else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021773 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021774sed 's/^/| /' conftest.$ac_ext >&5
21775
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021776 ac_cv_member_struct_stat_st_blocks=no
Michael W. Hudson54241132001-12-07 15:38:26 +000021777fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021778
21779rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000021780fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021781
21782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Skip Montanaro6dead952003-09-25 14:50:04 +000021783fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021784{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blocks" >&5
21785$as_echo "$ac_cv_member_struct_stat_st_blocks" >&6; }
21786if test "x$ac_cv_member_struct_stat_st_blocks" = x""yes; then
Jack Jansendd19cf82001-12-06 22:36:17 +000021787
Martin v. Löwis11437992002-04-12 09:54:03 +000021788cat >>confdefs.h <<_ACEOF
21789#define HAVE_STRUCT_STAT_ST_BLOCKS 1
21790_ACEOF
21791
21792
21793cat >>confdefs.h <<\_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021794#define HAVE_ST_BLOCKS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021795_ACEOF
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021796
21797else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021798 case " $LIBOBJS " in
Skip Montanarof0d5f792004-08-15 14:08:23 +000021799 *" fileblocks.$ac_objext "* ) ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021800 *) LIBOBJS="$LIBOBJS fileblocks.$ac_objext"
21801 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000021802esac
21803
Guido van Rossum98bf58f2001-10-18 20:34:25 +000021804fi
21805
Michael W. Hudson54241132001-12-07 15:38:26 +000021806
Martin v. Löwis11437992002-04-12 09:54:03 +000021807
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021808{ $as_echo "$as_me:$LINENO: checking for time.h that defines altzone" >&5
21809$as_echo_n "checking for time.h that defines altzone... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021810if test "${ac_cv_header_time_altzone+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021811 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021812else
Martin v. Löwis11437992002-04-12 09:54:03 +000021813 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021814/* confdefs.h. */
21815_ACEOF
21816cat confdefs.h >>conftest.$ac_ext
21817cat >>conftest.$ac_ext <<_ACEOF
21818/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021819#include <time.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021820int
21821main ()
21822{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021823return altzone;
Martin v. Löwis11437992002-04-12 09:54:03 +000021824 ;
21825 return 0;
21826}
21827_ACEOF
21828rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021829if { (ac_try="$ac_compile"
21830case "(($ac_try" in
21831 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21832 *) ac_try_echo=$ac_try;;
21833esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021834eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21835$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021836 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021837 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021838 grep -v '^ *+' conftest.er1 >conftest.err
21839 rm -f conftest.er1
21840 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021841 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021842 (exit $ac_status); } && {
21843 test -z "$ac_c_werror_flag" ||
21844 test ! -s conftest.err
21845 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021846 ac_cv_header_time_altzone=yes
21847else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021848 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021849sed 's/^/| /' conftest.$ac_ext >&5
21850
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021851 ac_cv_header_time_altzone=no
Guido van Rossum7f43da71994-08-01 12:15:30 +000021852fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021853
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21855fi
21856
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021857{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time_altzone" >&5
21858$as_echo "$ac_cv_header_time_altzone" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021859if test $ac_cv_header_time_altzone = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021860
21861cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021862#define HAVE_ALTZONE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021863_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021864
21865fi
21866
Guido van Rossumda88dad1995-01-26 00:46:29 +000021867was_it_defined=no
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021868{ $as_echo "$as_me:$LINENO: checking whether sys/select.h and sys/time.h may both be included" >&5
21869$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 +000021870cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021871/* confdefs.h. */
21872_ACEOF
21873cat confdefs.h >>conftest.$ac_ext
21874cat >>conftest.$ac_ext <<_ACEOF
21875/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000021876
21877#include <sys/types.h>
21878#include <sys/select.h>
21879#include <sys/time.h>
21880
Martin v. Löwis11437992002-04-12 09:54:03 +000021881int
21882main ()
21883{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021884;
Martin v. Löwis11437992002-04-12 09:54:03 +000021885 ;
21886 return 0;
21887}
21888_ACEOF
21889rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021890if { (ac_try="$ac_compile"
21891case "(($ac_try" in
21892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21893 *) ac_try_echo=$ac_try;;
21894esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021895eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21896$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021897 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021898 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021899 grep -v '^ *+' conftest.er1 >conftest.err
21900 rm -f conftest.er1
21901 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021902 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021903 (exit $ac_status); } && {
21904 test -z "$ac_c_werror_flag" ||
21905 test ! -s conftest.err
21906 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021907
21908
21909cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000021910#define SYS_SELECT_WITH_SYS_TIME 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021911_ACEOF
21912
Martin v. Löwisc45929e2002-04-06 10:10:49 +000021913 was_it_defined=yes
21914
Guido van Rossumf78abae1997-01-21 22:02:36 +000021915else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021916 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021917sed 's/^/| /' conftest.$ac_ext >&5
21918
Thomas Wouters477c8d52006-05-27 19:21:47 +000021919
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021920fi
21921
21922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021923{ $as_echo "$as_me:$LINENO: result: $was_it_defined" >&5
21924$as_echo "$was_it_defined" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021925
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021926{ $as_echo "$as_me:$LINENO: checking for addrinfo" >&5
21927$as_echo_n "checking for addrinfo... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021928if test "${ac_cv_struct_addrinfo+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021929 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021930else
Martin v. Löwis11437992002-04-12 09:54:03 +000021931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021932/* confdefs.h. */
21933_ACEOF
21934cat confdefs.h >>conftest.$ac_ext
21935cat >>conftest.$ac_ext <<_ACEOF
21936/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021937
21938# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000021939int
21940main ()
21941{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021942struct addrinfo a
Martin v. Löwis11437992002-04-12 09:54:03 +000021943 ;
21944 return 0;
21945}
21946_ACEOF
21947rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021948if { (ac_try="$ac_compile"
21949case "(($ac_try" in
21950 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21951 *) ac_try_echo=$ac_try;;
21952esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021953eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
21954$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021955 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000021956 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000021957 grep -v '^ *+' conftest.er1 >conftest.err
21958 rm -f conftest.er1
21959 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021960 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021961 (exit $ac_status); } && {
21962 test -z "$ac_c_werror_flag" ||
21963 test ! -s conftest.err
21964 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021965 ac_cv_struct_addrinfo=yes
21966else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021967 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000021968sed 's/^/| /' conftest.$ac_ext >&5
21969
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021970 ac_cv_struct_addrinfo=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021971fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000021972
Thomas Wouters47b49bf2007-08-30 22:15:33 +000021973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21974fi
21975
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021976{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_addrinfo" >&5
21977$as_echo "$ac_cv_struct_addrinfo" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021978if test $ac_cv_struct_addrinfo = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000021979
21980cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021981#define HAVE_ADDRINFO 1
Martin v. Löwis11437992002-04-12 09:54:03 +000021982_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021983
21984fi
21985
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021986{ $as_echo "$as_me:$LINENO: checking for sockaddr_storage" >&5
21987$as_echo_n "checking for sockaddr_storage... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000021988if test "${ac_cv_struct_sockaddr_storage+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000021989 $as_echo_n "(cached) " >&6
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021990else
Martin v. Löwis11437992002-04-12 09:54:03 +000021991 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000021992/* confdefs.h. */
21993_ACEOF
21994cat confdefs.h >>conftest.$ac_ext
21995cat >>conftest.$ac_ext <<_ACEOF
21996/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000021997
21998# include <sys/types.h>
21999# include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022000int
22001main ()
22002{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022003struct sockaddr_storage s
Martin v. Löwis11437992002-04-12 09:54:03 +000022004 ;
22005 return 0;
22006}
22007_ACEOF
22008rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022009if { (ac_try="$ac_compile"
22010case "(($ac_try" in
22011 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22012 *) ac_try_echo=$ac_try;;
22013esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022014eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22015$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022016 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022017 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022018 grep -v '^ *+' conftest.er1 >conftest.err
22019 rm -f conftest.er1
22020 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022021 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022022 (exit $ac_status); } && {
22023 test -z "$ac_c_werror_flag" ||
22024 test ! -s conftest.err
22025 } && test -s conftest.$ac_objext; then
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022026 ac_cv_struct_sockaddr_storage=yes
22027else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022028 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022029sed 's/^/| /' conftest.$ac_ext >&5
22030
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022031 ac_cv_struct_sockaddr_storage=no
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022032fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000022033
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22035fi
22036
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022037{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_sockaddr_storage" >&5
22038$as_echo "$ac_cv_struct_sockaddr_storage" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022039if test $ac_cv_struct_sockaddr_storage = yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022040
22041cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022042#define HAVE_SOCKADDR_STORAGE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022043_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022044
22045fi
22046
Guido van Rossum627b2d71993-12-24 10:39:16 +000022047# checks for compiler characteristics
Guido van Rossum7f43da71994-08-01 12:15:30 +000022048
Michael W. Hudson54241132001-12-07 15:38:26 +000022049
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022050{ $as_echo "$as_me:$LINENO: checking whether char is unsigned" >&5
22051$as_echo_n "checking whether char is unsigned... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022052if test "${ac_cv_c_char_unsigned+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022053 $as_echo_n "(cached) " >&6
Jack Jansendd19cf82001-12-06 22:36:17 +000022054else
Martin v. Löwis11437992002-04-12 09:54:03 +000022055 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022056/* confdefs.h. */
22057_ACEOF
22058cat confdefs.h >>conftest.$ac_ext
22059cat >>conftest.$ac_ext <<_ACEOF
22060/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022061$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000022062int
22063main ()
22064{
22065static int test_array [1 - 2 * !(((char) -1) < 0)];
22066test_array [0] = 0
22067
22068 ;
22069 return 0;
Michael W. Hudson54241132001-12-07 15:38:26 +000022070}
Martin v. Löwis11437992002-04-12 09:54:03 +000022071_ACEOF
22072rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022073if { (ac_try="$ac_compile"
22074case "(($ac_try" in
22075 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22076 *) ac_try_echo=$ac_try;;
22077esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022078eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22079$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022080 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022081 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022082 grep -v '^ *+' conftest.er1 >conftest.err
22083 rm -f conftest.er1
22084 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022085 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022086 (exit $ac_status); } && {
22087 test -z "$ac_c_werror_flag" ||
22088 test ! -s conftest.err
22089 } && test -s conftest.$ac_objext; then
Michael W. Hudson54241132001-12-07 15:38:26 +000022090 ac_cv_c_char_unsigned=no
Martin v. Löwis11437992002-04-12 09:54:03 +000022091else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022092 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022093sed 's/^/| /' conftest.$ac_ext >&5
22094
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022095 ac_cv_c_char_unsigned=yes
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022096fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022097
22098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000022099fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022100{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_char_unsigned" >&5
22101$as_echo "$ac_cv_c_char_unsigned" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022102if test $ac_cv_c_char_unsigned = yes && test "$GCC" != yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022103 cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022104#define __CHAR_UNSIGNED__ 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022105_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022106
22107fi
Guido van Rossum7f43da71994-08-01 12:15:30 +000022108
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022109{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
22110$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022111if test "${ac_cv_c_const+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022112 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000022113else
22114 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022115/* confdefs.h. */
22116_ACEOF
22117cat confdefs.h >>conftest.$ac_ext
22118cat >>conftest.$ac_ext <<_ACEOF
22119/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022120
Martin v. Löwis11437992002-04-12 09:54:03 +000022121int
22122main ()
22123{
22124/* FIXME: Include the comments suggested by Paul. */
22125#ifndef __cplusplus
22126 /* Ultrix mips cc rejects this. */
22127 typedef int charset[2];
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022128 const charset cs;
Martin v. Löwis11437992002-04-12 09:54:03 +000022129 /* SunOS 4.1.1 cc rejects this. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022130 char const *const *pcpcc;
22131 char **ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022132 /* NEC SVR4.0.2 mips cc rejects this. */
22133 struct point {int x, y;};
22134 static struct point const zero = {0,0};
22135 /* AIX XL C 1.02.0.0 rejects this.
22136 It does not let you subtract one const X* pointer from another in
22137 an arm of an if-expression whose if-part is not a constant
22138 expression */
22139 const char *g = "string";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022140 pcpcc = &g + (g ? g-g : 0);
Martin v. Löwis11437992002-04-12 09:54:03 +000022141 /* HPUX 7.0 cc rejects these. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022142 ++pcpcc;
22143 ppc = (char**) pcpcc;
22144 pcpcc = (char const *const *) ppc;
Martin v. Löwis11437992002-04-12 09:54:03 +000022145 { /* SCO 3.2v4 cc rejects this. */
22146 char *t;
22147 char const *s = 0 ? (char *) 0 : (char const *) 0;
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022148
Martin v. Löwis11437992002-04-12 09:54:03 +000022149 *t++ = 0;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022150 if (s) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022151 }
22152 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
22153 int x[] = {25, 17};
22154 const int *foo = &x[0];
22155 ++foo;
22156 }
22157 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22158 typedef const int *iptr;
22159 iptr p = 0;
22160 ++p;
22161 }
22162 { /* AIX XL C 1.02.0.0 rejects this saying
22163 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22164 struct s { int j; const int *ap[3]; };
22165 struct s *b; b->j = 5;
22166 }
22167 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22168 const int foo = 10;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022169 if (!foo) return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022170 }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022171 return !cs[0] && !zero.x;
Martin v. Löwis11437992002-04-12 09:54:03 +000022172#endif
Guido van Rossum627b2d71993-12-24 10:39:16 +000022173
Martin v. Löwis11437992002-04-12 09:54:03 +000022174 ;
22175 return 0;
Guido van Rossum627b2d71993-12-24 10:39:16 +000022176}
Martin v. Löwis11437992002-04-12 09:54:03 +000022177_ACEOF
22178rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022179if { (ac_try="$ac_compile"
22180case "(($ac_try" in
22181 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22182 *) ac_try_echo=$ac_try;;
22183esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022184eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22185$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022186 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022187 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022188 grep -v '^ *+' conftest.er1 >conftest.err
22189 rm -f conftest.er1
22190 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022191 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022192 (exit $ac_status); } && {
22193 test -z "$ac_c_werror_flag" ||
22194 test ! -s conftest.err
22195 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022196 ac_cv_c_const=yes
22197else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022198 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022199sed 's/^/| /' conftest.$ac_ext >&5
22200
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022201 ac_cv_c_const=no
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022202fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022203
22204rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022205fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022206{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
22207$as_echo "$ac_cv_c_const" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022208if test $ac_cv_c_const = no; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022209
22210cat >>confdefs.h <<\_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022211#define const /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000022212_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022213
22214fi
22215
Michael W. Hudson54241132001-12-07 15:38:26 +000022216
Guido van Rossumda88dad1995-01-26 00:46:29 +000022217works=no
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022218{ $as_echo "$as_me:$LINENO: checking for working volatile" >&5
22219$as_echo_n "checking for working volatile... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022220cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022221/* confdefs.h. */
22222_ACEOF
22223cat confdefs.h >>conftest.$ac_ext
22224cat >>conftest.$ac_ext <<_ACEOF
22225/* end confdefs.h. */
Guido van Rossum627b2d71993-12-24 10:39:16 +000022226
Martin v. Löwis11437992002-04-12 09:54:03 +000022227int
22228main ()
22229{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022230volatile int x; x = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022231 ;
22232 return 0;
22233}
22234_ACEOF
22235rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022236if { (ac_try="$ac_compile"
22237case "(($ac_try" in
22238 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22239 *) ac_try_echo=$ac_try;;
22240esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022241eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22242$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022243 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022244 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022245 grep -v '^ *+' conftest.er1 >conftest.err
22246 rm -f conftest.er1
22247 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022248 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022249 (exit $ac_status); } && {
22250 test -z "$ac_c_werror_flag" ||
22251 test ! -s conftest.err
22252 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022253 works=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000022254else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022255 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022256sed 's/^/| /' conftest.$ac_ext >&5
22257
Martin v. Löwis11437992002-04-12 09:54:03 +000022258
22259cat >>confdefs.h <<\_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022260#define volatile /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000022261_ACEOF
Guido van Rossum627b2d71993-12-24 10:39:16 +000022262
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022263
Guido van Rossum627b2d71993-12-24 10:39:16 +000022264fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022265
22266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022267{ $as_echo "$as_me:$LINENO: result: $works" >&5
22268$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022269
Guido van Rossumda88dad1995-01-26 00:46:29 +000022270works=no
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022271{ $as_echo "$as_me:$LINENO: checking for working signed char" >&5
22272$as_echo_n "checking for working signed char... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022273cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022274/* confdefs.h. */
22275_ACEOF
22276cat confdefs.h >>conftest.$ac_ext
22277cat >>conftest.$ac_ext <<_ACEOF
22278/* end confdefs.h. */
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022279
Martin v. Löwis11437992002-04-12 09:54:03 +000022280int
22281main ()
22282{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022283signed char c;
Martin v. Löwis11437992002-04-12 09:54:03 +000022284 ;
22285 return 0;
22286}
22287_ACEOF
22288rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022289if { (ac_try="$ac_compile"
22290case "(($ac_try" in
22291 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22292 *) ac_try_echo=$ac_try;;
22293esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022294eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22295$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022296 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022297 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022298 grep -v '^ *+' conftest.er1 >conftest.err
22299 rm -f conftest.er1
22300 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022301 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022302 (exit $ac_status); } && {
22303 test -z "$ac_c_werror_flag" ||
22304 test ! -s conftest.err
22305 } && test -s conftest.$ac_objext; then
Guido van Rossumda88dad1995-01-26 00:46:29 +000022306 works=yes
Guido van Rossumdabb11b1994-10-11 15:04:27 +000022307else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022308 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022309sed 's/^/| /' conftest.$ac_ext >&5
22310
Martin v. Löwis11437992002-04-12 09:54:03 +000022311
22312cat >>confdefs.h <<\_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022313#define signed /**/
Martin v. Löwis11437992002-04-12 09:54:03 +000022314_ACEOF
Guido van Rossum7f43da71994-08-01 12:15:30 +000022315
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022316
Guido van Rossum7f43da71994-08-01 12:15:30 +000022317fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022318
22319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022320{ $as_echo "$as_me:$LINENO: result: $works" >&5
22321$as_echo "$works" >&6; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000022322
Guido van Rossumda88dad1995-01-26 00:46:29 +000022323have_prototypes=no
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022324{ $as_echo "$as_me:$LINENO: checking for prototypes" >&5
22325$as_echo_n "checking for prototypes... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022326cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022327/* confdefs.h. */
22328_ACEOF
22329cat confdefs.h >>conftest.$ac_ext
22330cat >>conftest.$ac_ext <<_ACEOF
22331/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022332int foo(int x) { return 0; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022333int
22334main ()
22335{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022336return foo(10);
Martin v. Löwis11437992002-04-12 09:54:03 +000022337 ;
22338 return 0;
22339}
22340_ACEOF
22341rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022342if { (ac_try="$ac_compile"
22343case "(($ac_try" in
22344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22345 *) ac_try_echo=$ac_try;;
22346esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022347eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22348$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022349 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022350 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022351 grep -v '^ *+' conftest.er1 >conftest.err
22352 rm -f conftest.er1
22353 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022354 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022355 (exit $ac_status); } && {
22356 test -z "$ac_c_werror_flag" ||
22357 test ! -s conftest.err
22358 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022359
22360
22361cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022362#define HAVE_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022363_ACEOF
22364
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022365 have_prototypes=yes
22366
Guido van Rossumf78abae1997-01-21 22:02:36 +000022367else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022368 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022369sed 's/^/| /' conftest.$ac_ext >&5
22370
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022371
Guido van Rossum7f43da71994-08-01 12:15:30 +000022372fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022373
22374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022375{ $as_echo "$as_me:$LINENO: result: $have_prototypes" >&5
22376$as_echo "$have_prototypes" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022377
Guido van Rossumda88dad1995-01-26 00:46:29 +000022378works=no
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022379{ $as_echo "$as_me:$LINENO: checking for variable length prototypes and stdarg.h" >&5
22380$as_echo_n "checking for variable length prototypes and stdarg.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022381cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022382/* confdefs.h. */
22383_ACEOF
22384cat confdefs.h >>conftest.$ac_ext
22385cat >>conftest.$ac_ext <<_ACEOF
22386/* end confdefs.h. */
Guido van Rossum7f43da71994-08-01 12:15:30 +000022387
22388#include <stdarg.h>
Guido van Rossum90eea071996-08-30 20:58:57 +000022389int foo(int x, ...) {
22390 va_list va;
22391 va_start(va, x);
22392 va_arg(va, int);
22393 va_arg(va, char *);
22394 va_arg(va, double);
22395 return 0;
22396}
Guido van Rossum7f43da71994-08-01 12:15:30 +000022397
Martin v. Löwis11437992002-04-12 09:54:03 +000022398int
22399main ()
22400{
Guido van Rossum90eea071996-08-30 20:58:57 +000022401return foo(10, "", 3.14);
Martin v. Löwis11437992002-04-12 09:54:03 +000022402 ;
22403 return 0;
22404}
22405_ACEOF
22406rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022407if { (ac_try="$ac_compile"
22408case "(($ac_try" in
22409 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22410 *) ac_try_echo=$ac_try;;
22411esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022412eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22413$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022414 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022415 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022416 grep -v '^ *+' conftest.er1 >conftest.err
22417 rm -f conftest.er1
22418 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022419 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022420 (exit $ac_status); } && {
22421 test -z "$ac_c_werror_flag" ||
22422 test ! -s conftest.err
22423 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022424
22425
22426cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022427#define HAVE_STDARG_PROTOTYPES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022428_ACEOF
22429
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022430 works=yes
22431
Guido van Rossumf78abae1997-01-21 22:02:36 +000022432else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022433 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022434sed 's/^/| /' conftest.$ac_ext >&5
22435
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022436
Guido van Rossum627b2d71993-12-24 10:39:16 +000022437fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022438
22439rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022440{ $as_echo "$as_me:$LINENO: result: $works" >&5
22441$as_echo "$works" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022442
Martin v. Löwisd6320502004-08-12 13:45:08 +000022443# check for socketpair
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022444{ $as_echo "$as_me:$LINENO: checking for socketpair" >&5
22445$as_echo_n "checking for socketpair... " >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022446cat >conftest.$ac_ext <<_ACEOF
Martin v. Löwisd6320502004-08-12 13:45:08 +000022447/* confdefs.h. */
22448_ACEOF
22449cat confdefs.h >>conftest.$ac_ext
22450cat >>conftest.$ac_ext <<_ACEOF
22451/* end confdefs.h. */
22452
22453#include <sys/types.h>
22454#include <sys/socket.h>
22455
22456int
22457main ()
22458{
22459void *x=socketpair
22460 ;
22461 return 0;
22462}
22463_ACEOF
22464rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022465if { (ac_try="$ac_compile"
22466case "(($ac_try" in
22467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22468 *) ac_try_echo=$ac_try;;
22469esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022470eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22471$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022472 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisd6320502004-08-12 13:45:08 +000022473 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022474 grep -v '^ *+' conftest.er1 >conftest.err
22475 rm -f conftest.er1
22476 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022477 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022478 (exit $ac_status); } && {
22479 test -z "$ac_c_werror_flag" ||
22480 test ! -s conftest.err
22481 } && test -s conftest.$ac_objext; then
Martin v. Löwisd6320502004-08-12 13:45:08 +000022482
22483cat >>confdefs.h <<\_ACEOF
22484#define HAVE_SOCKETPAIR 1
22485_ACEOF
22486
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022487 { $as_echo "$as_me:$LINENO: result: yes" >&5
22488$as_echo "yes" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022489else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022490 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisd6320502004-08-12 13:45:08 +000022491sed 's/^/| /' conftest.$ac_ext >&5
22492
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022493 { $as_echo "$as_me:$LINENO: result: no" >&5
22494$as_echo "no" >&6; }
Martin v. Löwisd6320502004-08-12 13:45:08 +000022495
22496fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022497
22498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwisd6320502004-08-12 13:45:08 +000022499
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022500# check if sockaddr has sa_len member
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022501{ $as_echo "$as_me:$LINENO: checking if sockaddr has sa_len member" >&5
22502$as_echo_n "checking if sockaddr has sa_len member... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022503cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022504/* confdefs.h. */
22505_ACEOF
22506cat confdefs.h >>conftest.$ac_ext
22507cat >>conftest.$ac_ext <<_ACEOF
22508/* end confdefs.h. */
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022509#include <sys/types.h>
22510#include <sys/socket.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022511int
22512main ()
22513{
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022514struct sockaddr x;
22515x.sa_len = 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000022516 ;
22517 return 0;
22518}
22519_ACEOF
22520rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022521if { (ac_try="$ac_compile"
22522case "(($ac_try" in
22523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22524 *) ac_try_echo=$ac_try;;
22525esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022526eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22527$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022528 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022529 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022530 grep -v '^ *+' conftest.er1 >conftest.err
22531 rm -f conftest.er1
22532 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022533 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022534 (exit $ac_status); } && {
22535 test -z "$ac_c_werror_flag" ||
22536 test ! -s conftest.err
22537 } && test -s conftest.$ac_objext; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022538 { $as_echo "$as_me:$LINENO: result: yes" >&5
22539$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022540
22541cat >>confdefs.h <<\_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022542#define HAVE_SOCKADDR_SA_LEN 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022543_ACEOF
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022544
22545else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022546 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022547sed 's/^/| /' conftest.$ac_ext >&5
22548
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022549 { $as_echo "$as_me:$LINENO: result: no" >&5
22550$as_echo "no" >&6; }
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022551fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022552
22553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis01dfdb32001-06-23 16:30:13 +000022554
Guido van Rossumda88dad1995-01-26 00:46:29 +000022555va_list_is_array=no
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022556{ $as_echo "$as_me:$LINENO: checking whether va_list is an array" >&5
22557$as_echo_n "checking whether va_list is an array... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022558cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022559/* confdefs.h. */
22560_ACEOF
22561cat confdefs.h >>conftest.$ac_ext
22562cat >>conftest.$ac_ext <<_ACEOF
22563/* end confdefs.h. */
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022564
22565#ifdef HAVE_STDARG_PROTOTYPES
22566#include <stdarg.h>
22567#else
22568#include <varargs.h>
22569#endif
22570
Martin v. Löwis11437992002-04-12 09:54:03 +000022571int
22572main ()
22573{
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022574va_list list1, list2; list1 = list2;
Martin v. Löwis11437992002-04-12 09:54:03 +000022575 ;
22576 return 0;
22577}
22578_ACEOF
22579rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022580if { (ac_try="$ac_compile"
22581case "(($ac_try" in
22582 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22583 *) ac_try_echo=$ac_try;;
22584esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022585eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22586$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022587 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022588 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022589 grep -v '^ *+' conftest.er1 >conftest.err
22590 rm -f conftest.er1
22591 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022592 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022593 (exit $ac_status); } && {
22594 test -z "$ac_c_werror_flag" ||
22595 test ! -s conftest.err
22596 } && test -s conftest.$ac_objext; then
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022597 :
22598else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022599 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022600sed 's/^/| /' conftest.$ac_ext >&5
22601
Martin v. Löwis11437992002-04-12 09:54:03 +000022602
22603
22604cat >>confdefs.h <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022605#define VA_LIST_IS_ARRAY 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022606_ACEOF
22607
Guido van Rossumda88dad1995-01-26 00:46:29 +000022608 va_list_is_array=yes
Martin v. Löwisc45929e2002-04-06 10:10:49 +000022609
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022610fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022611
22612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022613{ $as_echo "$as_me:$LINENO: result: $va_list_is_array" >&5
22614$as_echo "$va_list_is_array" >&6; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000022615
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022616# sigh -- gethostbyname_r is a mess; it can have 3, 5 or 6 arguments :-(
Martin v. Löwis11437992002-04-12 09:54:03 +000022617
22618
22619
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022620{ $as_echo "$as_me:$LINENO: checking for gethostbyname_r" >&5
22621$as_echo_n "checking for gethostbyname_r... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022622if test "${ac_cv_func_gethostbyname_r+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022623 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022624else
Martin v. Löwis11437992002-04-12 09:54:03 +000022625 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022626/* confdefs.h. */
22627_ACEOF
22628cat confdefs.h >>conftest.$ac_ext
22629cat >>conftest.$ac_ext <<_ACEOF
22630/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022631/* Define gethostbyname_r to an innocuous variant, in case <limits.h> declares gethostbyname_r.
22632 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22633#define gethostbyname_r innocuous_gethostbyname_r
22634
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022635/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022636 which can conflict with char gethostbyname_r (); below.
22637 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022638 <limits.h> exists even on freestanding compilers. */
22639
22640#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022641# include <limits.h>
22642#else
22643# include <assert.h>
22644#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022645
22646#undef gethostbyname_r
22647
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022648/* Override any GCC internal prototype to avoid an error.
22649 Use char because int might match the return type of a GCC
22650 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022651#ifdef __cplusplus
22652extern "C"
22653#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022654char gethostbyname_r ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022655/* The GNU C library defines this for functions which it implements
22656 to always fail with ENOSYS. Some functions are actually named
22657 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022658#if defined __stub_gethostbyname_r || defined __stub___gethostbyname_r
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022659choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022660#endif
22661
Skip Montanaro6dead952003-09-25 14:50:04 +000022662int
22663main ()
22664{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022665return gethostbyname_r ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022666 ;
22667 return 0;
22668}
22669_ACEOF
22670rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022671if { (ac_try="$ac_link"
22672case "(($ac_try" in
22673 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22674 *) ac_try_echo=$ac_try;;
22675esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022676eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22677$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022678 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022679 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022680 grep -v '^ *+' conftest.er1 >conftest.err
22681 rm -f conftest.er1
22682 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022683 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022684 (exit $ac_status); } && {
22685 test -z "$ac_c_werror_flag" ||
22686 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022687 } && test -s conftest$ac_exeext && {
22688 test "$cross_compiling" = yes ||
22689 $as_test_x conftest$ac_exeext
22690 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022691 ac_cv_func_gethostbyname_r=yes
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022692else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022693 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022694sed 's/^/| /' conftest.$ac_ext >&5
22695
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022696 ac_cv_func_gethostbyname_r=no
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022697fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022698
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022699rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022700rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000022701 conftest$ac_exeext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022702fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022703{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname_r" >&5
22704$as_echo "$ac_cv_func_gethostbyname_r" >&6; }
22705if test "x$ac_cv_func_gethostbyname_r" = x""yes; then
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022706
Martin v. Löwis11437992002-04-12 09:54:03 +000022707 cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022708#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022709_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022710
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022711 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 6 args" >&5
22712$as_echo_n "checking gethostbyname_r with 6 args... " >&6; }
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022713 OLD_CFLAGS=$CFLAGS
22714 CFLAGS="$CFLAGS $MY_CPPFLAGS $MY_THREAD_CPPFLAGS $MY_CFLAGS"
Martin v. Löwis11437992002-04-12 09:54:03 +000022715 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022716/* confdefs.h. */
22717_ACEOF
22718cat confdefs.h >>conftest.$ac_ext
22719cat >>conftest.$ac_ext <<_ACEOF
22720/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022721
22722# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022723
Martin v. Löwis11437992002-04-12 09:54:03 +000022724int
22725main ()
22726{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022727
22728 char *name;
22729 struct hostent *he, *res;
22730 char buffer[2048];
22731 int buflen = 2048;
22732 int h_errnop;
22733
22734 (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022735
22736 ;
22737 return 0;
22738}
22739_ACEOF
22740rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022741if { (ac_try="$ac_compile"
22742case "(($ac_try" in
22743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22744 *) ac_try_echo=$ac_try;;
22745esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022746eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22747$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022748 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022749 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022750 grep -v '^ *+' conftest.er1 >conftest.err
22751 rm -f conftest.er1
22752 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022753 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022754 (exit $ac_status); } && {
22755 test -z "$ac_c_werror_flag" ||
22756 test ! -s conftest.err
22757 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022758
22759 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022760#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022761_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022762
Martin v. Löwis11437992002-04-12 09:54:03 +000022763
22764cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022765#define HAVE_GETHOSTBYNAME_R_6_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022766_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022767
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022768 { $as_echo "$as_me:$LINENO: result: yes" >&5
22769$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022770
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022771else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022772 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022773sed 's/^/| /' conftest.$ac_ext >&5
22774
Martin v. Löwis11437992002-04-12 09:54:03 +000022775
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022776 { $as_echo "$as_me:$LINENO: result: no" >&5
22777$as_echo "no" >&6; }
22778 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 5 args" >&5
22779$as_echo_n "checking gethostbyname_r with 5 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022780 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022781/* confdefs.h. */
22782_ACEOF
22783cat confdefs.h >>conftest.$ac_ext
22784cat >>conftest.$ac_ext <<_ACEOF
22785/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022786
22787# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022788
Martin v. Löwis11437992002-04-12 09:54:03 +000022789int
22790main ()
22791{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022792
22793 char *name;
22794 struct hostent *he;
22795 char buffer[2048];
22796 int buflen = 2048;
22797 int h_errnop;
22798
22799 (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop)
Martin v. Löwis11437992002-04-12 09:54:03 +000022800
22801 ;
22802 return 0;
22803}
22804_ACEOF
22805rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022806if { (ac_try="$ac_compile"
22807case "(($ac_try" in
22808 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22809 *) ac_try_echo=$ac_try;;
22810esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022811eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22812$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022813 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022814 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022815 grep -v '^ *+' conftest.er1 >conftest.err
22816 rm -f conftest.er1
22817 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022818 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022819 (exit $ac_status); } && {
22820 test -z "$ac_c_werror_flag" ||
22821 test ! -s conftest.err
22822 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022823
22824 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022825#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022826_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022827
Martin v. Löwis11437992002-04-12 09:54:03 +000022828
22829cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022830#define HAVE_GETHOSTBYNAME_R_5_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022831_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022832
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022833 { $as_echo "$as_me:$LINENO: result: yes" >&5
22834$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022835
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022836else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022837 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022838sed 's/^/| /' conftest.$ac_ext >&5
22839
Martin v. Löwis11437992002-04-12 09:54:03 +000022840
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022841 { $as_echo "$as_me:$LINENO: result: no" >&5
22842$as_echo "no" >&6; }
22843 { $as_echo "$as_me:$LINENO: checking gethostbyname_r with 3 args" >&5
22844$as_echo_n "checking gethostbyname_r with 3 args... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022845 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022846/* confdefs.h. */
22847_ACEOF
22848cat confdefs.h >>conftest.$ac_ext
22849cat >>conftest.$ac_ext <<_ACEOF
22850/* end confdefs.h. */
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022851
22852# include <netdb.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000022853
Martin v. Löwis11437992002-04-12 09:54:03 +000022854int
22855main ()
22856{
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022857
22858 char *name;
22859 struct hostent *he;
22860 struct hostent_data data;
22861
22862 (void) gethostbyname_r(name, he, &data);
Martin v. Löwis11437992002-04-12 09:54:03 +000022863
22864 ;
22865 return 0;
22866}
22867_ACEOF
22868rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022869if { (ac_try="$ac_compile"
22870case "(($ac_try" in
22871 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22872 *) ac_try_echo=$ac_try;;
22873esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022874eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22875$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022876 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022877 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022878 grep -v '^ *+' conftest.er1 >conftest.err
22879 rm -f conftest.er1
22880 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022881 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022882 (exit $ac_status); } && {
22883 test -z "$ac_c_werror_flag" ||
22884 test ! -s conftest.err
22885 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022886
22887 cat >>confdefs.h <<\_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022888#define HAVE_GETHOSTBYNAME_R 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022889_ACEOF
Guido van Rossum8db7d8b1999-03-23 16:40:33 +000022890
Martin v. Löwis11437992002-04-12 09:54:03 +000022891
22892cat >>confdefs.h <<\_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022893#define HAVE_GETHOSTBYNAME_R_3_ARG 1
Martin v. Löwis11437992002-04-12 09:54:03 +000022894_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022895
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022896 { $as_echo "$as_me:$LINENO: result: yes" >&5
22897$as_echo "yes" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022898
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022899else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022900 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000022901sed 's/^/| /' conftest.$ac_ext >&5
22902
Martin v. Löwis11437992002-04-12 09:54:03 +000022903
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022904 { $as_echo "$as_me:$LINENO: result: no" >&5
22905$as_echo "no" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000022906
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022907fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022908
22909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022910
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022911fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022912
22913rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000022914
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022915fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022916
22917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022918 CFLAGS=$OLD_CFLAGS
22919
22920else
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022921
Martin v. Löwis11437992002-04-12 09:54:03 +000022922
22923for ac_func in gethostbyname
Thomas Wouters3a584202000-08-05 23:28:51 +000022924do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022925as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
22926{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
22927$as_echo_n "checking for $ac_func... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022928if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022929 $as_echo_n "(cached) " >&6
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022930else
Martin v. Löwis11437992002-04-12 09:54:03 +000022931 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000022932/* confdefs.h. */
22933_ACEOF
22934cat confdefs.h >>conftest.$ac_ext
22935cat >>conftest.$ac_ext <<_ACEOF
22936/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022937/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
22938 For example, HP-UX 11i <limits.h> declares gettimeofday. */
22939#define $ac_func innocuous_$ac_func
22940
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022941/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000022942 which can conflict with char $ac_func (); below.
22943 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022944 <limits.h> exists even on freestanding compilers. */
22945
22946#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000022947# include <limits.h>
22948#else
22949# include <assert.h>
22950#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000022951
22952#undef $ac_func
22953
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022954/* Override any GCC internal prototype to avoid an error.
22955 Use char because int might match the return type of a GCC
22956 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000022957#ifdef __cplusplus
22958extern "C"
22959#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000022960char $ac_func ();
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022961/* The GNU C library defines this for functions which it implements
22962 to always fail with ENOSYS. Some functions are actually named
22963 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022964#if defined __stub_$ac_func || defined __stub___$ac_func
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022965choke me
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000022966#endif
22967
Skip Montanaro6dead952003-09-25 14:50:04 +000022968int
22969main ()
22970{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022971return $ac_func ();
Martin v. Löwis11437992002-04-12 09:54:03 +000022972 ;
22973 return 0;
22974}
22975_ACEOF
22976rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022977if { (ac_try="$ac_link"
22978case "(($ac_try" in
22979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22980 *) ac_try_echo=$ac_try;;
22981esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022982eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
22983$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022984 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000022985 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000022986 grep -v '^ *+' conftest.er1 >conftest.err
22987 rm -f conftest.er1
22988 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022989 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000022990 (exit $ac_status); } && {
22991 test -z "$ac_c_werror_flag" ||
22992 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022993 } && test -s conftest$ac_exeext && {
22994 test "$cross_compiling" = yes ||
22995 $as_test_x conftest$ac_exeext
22996 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000022997 eval "$as_ac_var=yes"
Michael W. Hudson54241132001-12-07 15:38:26 +000022998else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000022999 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023000sed 's/^/| /' conftest.$ac_ext >&5
23001
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023002 eval "$as_ac_var=no"
Michael W. Hudson54241132001-12-07 15:38:26 +000023003fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023004
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023005rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023006rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023007 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson54241132001-12-07 15:38:26 +000023008fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023009ac_res=`eval 'as_val=${'$as_ac_var'}
23010 $as_echo "$as_val"'`
23011 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
23012$as_echo "$ac_res" >&6; }
23013as_val=`eval 'as_val=${'$as_ac_var'}
23014 $as_echo "$as_val"'`
23015 if test "x$as_val" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023016 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023017#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023018_ACEOF
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023019
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023020fi
Thomas Wouters3a584202000-08-05 23:28:51 +000023021done
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023022
Michael W. Hudson54241132001-12-07 15:38:26 +000023023
Guido van Rossuma96f0ba1999-03-22 21:49:51 +000023024fi
23025
Michael W. Hudson54241132001-12-07 15:38:26 +000023026
23027
23028
23029
23030
23031
Guido van Rossum627b2d71993-12-24 10:39:16 +000023032# checks for system services
23033# (none yet)
23034
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023035# Linux requires this for correct f.p. operations
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023036{ $as_echo "$as_me:$LINENO: checking for __fpu_control" >&5
23037$as_echo_n "checking for __fpu_control... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023038if test "${ac_cv_func___fpu_control+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023039 $as_echo_n "(cached) " >&6
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023040else
Martin v. Löwis11437992002-04-12 09:54:03 +000023041 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023042/* confdefs.h. */
23043_ACEOF
23044cat confdefs.h >>conftest.$ac_ext
23045cat >>conftest.$ac_ext <<_ACEOF
23046/* end confdefs.h. */
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023047/* Define __fpu_control to an innocuous variant, in case <limits.h> declares __fpu_control.
23048 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23049#define __fpu_control innocuous___fpu_control
23050
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023051/* System header to define __stub macros and hopefully few prototypes,
Skip Montanaro6dead952003-09-25 14:50:04 +000023052 which can conflict with char __fpu_control (); below.
23053 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023054 <limits.h> exists even on freestanding compilers. */
23055
23056#ifdef __STDC__
Skip Montanaro6dead952003-09-25 14:50:04 +000023057# include <limits.h>
23058#else
23059# include <assert.h>
23060#endif
Martin v. Löwis4ddc78a2006-01-29 09:53:44 +000023061
23062#undef __fpu_control
23063
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023064/* Override any GCC internal prototype to avoid an error.
23065 Use char because int might match the return type of a GCC
23066 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023067#ifdef __cplusplus
23068extern "C"
23069#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023070char __fpu_control ();
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023071/* The GNU C library defines this for functions which it implements
23072 to always fail with ENOSYS. Some functions are actually named
23073 something starting with __ and the normal name is an alias. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023074#if defined __stub___fpu_control || defined __stub_____fpu_control
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023075choke me
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023076#endif
23077
Skip Montanaro6dead952003-09-25 14:50:04 +000023078int
23079main ()
23080{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023081return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023082 ;
23083 return 0;
23084}
23085_ACEOF
23086rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023087if { (ac_try="$ac_link"
23088case "(($ac_try" in
23089 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23090 *) ac_try_echo=$ac_try;;
23091esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023092eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23093$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023094 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023095 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023096 grep -v '^ *+' conftest.er1 >conftest.err
23097 rm -f conftest.er1
23098 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023099 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023100 (exit $ac_status); } && {
23101 test -z "$ac_c_werror_flag" ||
23102 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023103 } && test -s conftest$ac_exeext && {
23104 test "$cross_compiling" = yes ||
23105 $as_test_x conftest$ac_exeext
23106 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023107 ac_cv_func___fpu_control=yes
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023108else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023109 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023110sed 's/^/| /' conftest.$ac_ext >&5
23111
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023112 ac_cv_func___fpu_control=no
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023113fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023114
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023115rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023116rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023117 conftest$ac_exeext conftest.$ac_ext
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023118fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023119{ $as_echo "$as_me:$LINENO: result: $ac_cv_func___fpu_control" >&5
23120$as_echo "$ac_cv_func___fpu_control" >&6; }
23121if test "x$ac_cv_func___fpu_control" = x""yes; then
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023122 :
23123else
Martin v. Löwis11437992002-04-12 09:54:03 +000023124
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023125{ $as_echo "$as_me:$LINENO: checking for __fpu_control in -lieee" >&5
23126$as_echo_n "checking for __fpu_control in -lieee... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023127if test "${ac_cv_lib_ieee___fpu_control+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023128 $as_echo_n "(cached) " >&6
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023129else
Martin v. Löwis11437992002-04-12 09:54:03 +000023130 ac_check_lib_save_LIBS=$LIBS
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023131LIBS="-lieee $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000023132cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000023133/* confdefs.h. */
23134_ACEOF
23135cat confdefs.h >>conftest.$ac_ext
23136cat >>conftest.$ac_ext <<_ACEOF
23137/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023138
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023139/* Override any GCC internal prototype to avoid an error.
23140 Use char because int might match the return type of a GCC
23141 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000023142#ifdef __cplusplus
23143extern "C"
23144#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000023145char __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023146int
23147main ()
23148{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023149return __fpu_control ();
Martin v. Löwis11437992002-04-12 09:54:03 +000023150 ;
23151 return 0;
23152}
23153_ACEOF
23154rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023155if { (ac_try="$ac_link"
23156case "(($ac_try" in
23157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23158 *) ac_try_echo=$ac_try;;
23159esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023160eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23161$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023162 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000023163 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000023164 grep -v '^ *+' conftest.er1 >conftest.err
23165 rm -f conftest.er1
23166 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023167 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023168 (exit $ac_status); } && {
23169 test -z "$ac_c_werror_flag" ||
23170 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023171 } && test -s conftest$ac_exeext && {
23172 test "$cross_compiling" = yes ||
23173 $as_test_x conftest$ac_exeext
23174 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023175 ac_cv_lib_ieee___fpu_control=yes
Guido van Rossum627b2d71993-12-24 10:39:16 +000023176else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023177 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000023178sed 's/^/| /' conftest.$ac_ext >&5
23179
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023180 ac_cv_lib_ieee___fpu_control=no
Guido van Rossum627b2d71993-12-24 10:39:16 +000023181fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023182
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023183rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000023185 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000023186LIBS=$ac_check_lib_save_LIBS
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023187fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023188{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ieee___fpu_control" >&5
23189$as_echo "$ac_cv_lib_ieee___fpu_control" >&6; }
23190if test "x$ac_cv_lib_ieee___fpu_control" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000023191 cat >>confdefs.h <<_ACEOF
23192#define HAVE_LIBIEEE 1
23193_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023194
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000023195 LIBS="-lieee $LIBS"
Guido van Rossum76be6ed1995-01-02 18:33:54 +000023196
Guido van Rossum627b2d71993-12-24 10:39:16 +000023197fi
23198
Michael W. Hudson54241132001-12-07 15:38:26 +000023199
Jeremy Hyltonbe28f5b2000-07-27 21:03:04 +000023200fi
23201
Michael W. Hudson54241132001-12-07 15:38:26 +000023202
Guido van Rossum7f253911997-05-09 02:42:48 +000023203# Check for --with-fpectl
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023204{ $as_echo "$as_me:$LINENO: checking for --with-fpectl" >&5
23205$as_echo_n "checking for --with-fpectl... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023206
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023207# Check whether --with-fpectl was given.
Guido van Rossum7f253911997-05-09 02:42:48 +000023208if test "${with_fpectl+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023209 withval=$with_fpectl;
Guido van Rossum7f253911997-05-09 02:42:48 +000023210if test "$withval" != no
Martin v. Löwis11437992002-04-12 09:54:03 +000023211then
23212
23213cat >>confdefs.h <<\_ACEOF
Guido van Rossum7f253911997-05-09 02:42:48 +000023214#define WANT_SIGFPE_HANDLER 1
Martin v. Löwis11437992002-04-12 09:54:03 +000023215_ACEOF
23216
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023217 { $as_echo "$as_me:$LINENO: result: yes" >&5
23218$as_echo "yes" >&6; }
23219else { $as_echo "$as_me:$LINENO: result: no" >&5
23220$as_echo "no" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023221fi
Guido van Rossumef2255b2000-03-10 22:30:29 +000023222else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023223 { $as_echo "$as_me:$LINENO: result: no" >&5
23224$as_echo "no" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023225fi
23226
Guido van Rossum7f253911997-05-09 02:42:48 +000023227
Guido van Rossum7f43da71994-08-01 12:15:30 +000023228# check for --with-libm=...
23229
Guido van Rossum563e7081996-09-10 18:20:48 +000023230case $ac_sys_system in
Guido van Rossum3dc0a512000-10-05 18:00:06 +000023231Darwin) ;;
Guido van Rossum563e7081996-09-10 18:20:48 +000023232*) LIBM=-lm
23233esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023234{ $as_echo "$as_me:$LINENO: checking for --with-libm=STRING" >&5
23235$as_echo_n "checking for --with-libm=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023236
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023237# Check whether --with-libm was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023238if test "${with_libm+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023239 withval=$with_libm;
Guido van Rossum7f253911997-05-09 02:42:48 +000023240if test "$withval" = no
23241then LIBM=
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023242 { $as_echo "$as_me:$LINENO: result: force LIBM empty" >&5
23243$as_echo "force LIBM empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023244elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023245then LIBM=$withval
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023246 { $as_echo "$as_me:$LINENO: result: set LIBM=\"$withval\"" >&5
23247$as_echo "set LIBM=\"$withval\"" >&6; }
23248else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libm=STRING" >&5
23249$as_echo "$as_me: error: proper usage is --with-libm=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023250 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023251fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023252else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023253 { $as_echo "$as_me:$LINENO: result: default LIBM=\"$LIBM\"" >&5
23254$as_echo "default LIBM=\"$LIBM\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023255fi
23256
Guido van Rossum7f43da71994-08-01 12:15:30 +000023257
23258# check for --with-libc=...
23259
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023260{ $as_echo "$as_me:$LINENO: checking for --with-libc=STRING" >&5
23261$as_echo_n "checking for --with-libc=STRING... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000023262
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023263# Check whether --with-libc was given.
Guido van Rossum48bdbfc1996-05-28 22:53:48 +000023264if test "${with_libc+set}" = set; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023265 withval=$with_libc;
Guido van Rossum7f253911997-05-09 02:42:48 +000023266if test "$withval" = no
23267then LIBC=
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023268 { $as_echo "$as_me:$LINENO: result: force LIBC empty" >&5
23269$as_echo "force LIBC empty" >&6; }
Guido van Rossum7f253911997-05-09 02:42:48 +000023270elif test "$withval" != yes
Guido van Rossum7f43da71994-08-01 12:15:30 +000023271then LIBC=$withval
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023272 { $as_echo "$as_me:$LINENO: result: set LIBC=\"$withval\"" >&5
23273$as_echo "set LIBC=\"$withval\"" >&6; }
23274else { { $as_echo "$as_me:$LINENO: error: proper usage is --with-libc=STRING" >&5
23275$as_echo "$as_me: error: proper usage is --with-libc=STRING" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000023276 { (exit 1); exit 1; }; }
Guido van Rossum7f43da71994-08-01 12:15:30 +000023277fi
Guido van Rossum7f253911997-05-09 02:42:48 +000023278else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023279 { $as_echo "$as_me:$LINENO: result: default LIBC=\"$LIBC\"" >&5
23280$as_echo "default LIBC=\"$LIBC\"" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000023281fi
23282
Guido van Rossum7f43da71994-08-01 12:15:30 +000023283
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023284# **************************************************
23285# * Check for various properties of floating point *
23286# **************************************************
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023287
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023288{ $as_echo "$as_me:$LINENO: checking whether C doubles are little-endian IEEE 754 binary64" >&5
23289$as_echo_n "checking whether C doubles are little-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023290if test "${ac_cv_little_endian_double+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023291 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023292else
23293
23294if test "$cross_compiling" = yes; then
23295 ac_cv_little_endian_double=no
23296else
23297 cat >conftest.$ac_ext <<_ACEOF
23298/* confdefs.h. */
23299_ACEOF
23300cat confdefs.h >>conftest.$ac_ext
23301cat >>conftest.$ac_ext <<_ACEOF
23302/* end confdefs.h. */
23303
23304#include <string.h>
23305int main() {
23306 double x = 9006104071832581.0;
23307 if (memcmp(&x, "\x05\x04\x03\x02\x01\xff\x3f\x43", 8) == 0)
23308 return 0;
23309 else
23310 return 1;
23311}
23312
23313_ACEOF
23314rm -f conftest$ac_exeext
23315if { (ac_try="$ac_link"
23316case "(($ac_try" in
23317 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23318 *) ac_try_echo=$ac_try;;
23319esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023320eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23321$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023322 (eval "$ac_link") 2>&5
23323 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023324 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023325 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23326 { (case "(($ac_try" in
23327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23328 *) ac_try_echo=$ac_try;;
23329esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023330eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23331$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023332 (eval "$ac_try") 2>&5
23333 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023334 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023335 (exit $ac_status); }; }; then
23336 ac_cv_little_endian_double=yes
23337else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023338 $as_echo "$as_me: program exited with status $ac_status" >&5
23339$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023340sed 's/^/| /' conftest.$ac_ext >&5
23341
23342( exit $ac_status )
23343ac_cv_little_endian_double=no
23344fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023345rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023346rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23347fi
23348
23349
23350fi
23351
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023352{ $as_echo "$as_me:$LINENO: result: $ac_cv_little_endian_double" >&5
23353$as_echo "$ac_cv_little_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023354if test "$ac_cv_little_endian_double" = yes
23355then
23356
23357cat >>confdefs.h <<\_ACEOF
23358#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 1
23359_ACEOF
23360
23361fi
23362
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023363{ $as_echo "$as_me:$LINENO: checking whether C doubles are big-endian IEEE 754 binary64" >&5
23364$as_echo_n "checking whether C doubles are big-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023365if test "${ac_cv_big_endian_double+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023366 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023367else
23368
23369if test "$cross_compiling" = yes; then
23370 ac_cv_big_endian_double=no
23371else
23372 cat >conftest.$ac_ext <<_ACEOF
23373/* confdefs.h. */
23374_ACEOF
23375cat confdefs.h >>conftest.$ac_ext
23376cat >>conftest.$ac_ext <<_ACEOF
23377/* end confdefs.h. */
23378
23379#include <string.h>
23380int main() {
23381 double x = 9006104071832581.0;
23382 if (memcmp(&x, "\x43\x3f\xff\x01\x02\x03\x04\x05", 8) == 0)
23383 return 0;
23384 else
23385 return 1;
23386}
23387
23388_ACEOF
23389rm -f conftest$ac_exeext
23390if { (ac_try="$ac_link"
23391case "(($ac_try" in
23392 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23393 *) ac_try_echo=$ac_try;;
23394esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023395eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23396$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023397 (eval "$ac_link") 2>&5
23398 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023399 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023400 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23401 { (case "(($ac_try" in
23402 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23403 *) ac_try_echo=$ac_try;;
23404esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023405eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23406$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023407 (eval "$ac_try") 2>&5
23408 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023409 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023410 (exit $ac_status); }; }; then
23411 ac_cv_big_endian_double=yes
23412else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023413 $as_echo "$as_me: program exited with status $ac_status" >&5
23414$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023415sed 's/^/| /' conftest.$ac_ext >&5
23416
23417( exit $ac_status )
23418ac_cv_big_endian_double=no
23419fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023420rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23422fi
23423
23424
23425fi
23426
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023427{ $as_echo "$as_me:$LINENO: result: $ac_cv_big_endian_double" >&5
23428$as_echo "$ac_cv_big_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023429if test "$ac_cv_big_endian_double" = yes
23430then
23431
23432cat >>confdefs.h <<\_ACEOF
23433#define DOUBLE_IS_BIG_ENDIAN_IEEE754 1
23434_ACEOF
23435
23436fi
23437
23438# Some ARM platforms use a mixed-endian representation for doubles.
23439# While Python doesn't currently have full support for these platforms
23440# (see e.g., issue 1762561), we can at least make sure that float <-> string
23441# conversions work.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023442{ $as_echo "$as_me:$LINENO: checking whether C doubles are ARM mixed-endian IEEE 754 binary64" >&5
23443$as_echo_n "checking whether C doubles are ARM mixed-endian IEEE 754 binary64... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023444if test "${ac_cv_mixed_endian_double+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023445 $as_echo_n "(cached) " >&6
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023446else
23447
23448if test "$cross_compiling" = yes; then
23449 ac_cv_mixed_endian_double=no
23450else
23451 cat >conftest.$ac_ext <<_ACEOF
23452/* confdefs.h. */
23453_ACEOF
23454cat confdefs.h >>conftest.$ac_ext
23455cat >>conftest.$ac_ext <<_ACEOF
23456/* end confdefs.h. */
23457
23458#include <string.h>
23459int main() {
23460 double x = 9006104071832581.0;
23461 if (memcmp(&x, "\x01\xff\x3f\x43\x05\x04\x03\x02", 8) == 0)
23462 return 0;
23463 else
23464 return 1;
23465}
23466
23467_ACEOF
23468rm -f conftest$ac_exeext
23469if { (ac_try="$ac_link"
23470case "(($ac_try" in
23471 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23472 *) ac_try_echo=$ac_try;;
23473esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023474eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23475$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023476 (eval "$ac_link") 2>&5
23477 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023478 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023479 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23480 { (case "(($ac_try" in
23481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23482 *) ac_try_echo=$ac_try;;
23483esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023484eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23485$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023486 (eval "$ac_try") 2>&5
23487 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023488 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023489 (exit $ac_status); }; }; then
23490 ac_cv_mixed_endian_double=yes
23491else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023492 $as_echo "$as_me: program exited with status $ac_status" >&5
23493$as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023494sed 's/^/| /' conftest.$ac_ext >&5
23495
23496( exit $ac_status )
23497ac_cv_mixed_endian_double=no
23498fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023499rm -rf conftest.dSYM
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23501fi
23502
23503
23504fi
23505
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023506{ $as_echo "$as_me:$LINENO: result: $ac_cv_mixed_endian_double" >&5
23507$as_echo "$ac_cv_mixed_endian_double" >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023508if test "$ac_cv_mixed_endian_double" = yes
23509then
23510
23511cat >>confdefs.h <<\_ACEOF
23512#define DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 1
23513_ACEOF
23514
23515fi
23516
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023517# The short float repr introduced in Python 3.1 requires the
Mark Dickinson10683072009-04-18 21:18:19 +000023518# correctly-rounded string <-> double conversion functions from
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023519# Python/dtoa.c, which in turn require that the FPU uses 53-bit
Mark Dickinson10683072009-04-18 21:18:19 +000023520# rounding; this is a problem on x86, where the x87 FPU has a default
23521# rounding precision of 64 bits. For gcc/x86, we try to fix this by
23522# using inline assembler to get and set the x87 FPU control word.
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023523if test "$GCC" = yes && test -n "`$CC -dM -E - </dev/null | grep i386`"
23524then
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023525 # Check that it's okay to use gcc inline assembler to get and set
Mark Dickinson10683072009-04-18 21:18:19 +000023526 # x87 control word. It should be, but you never know...
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023527 { $as_echo "$as_me:$LINENO: checking whether we can use gcc inline assembler to get and set x87 control word" >&5
23528$as_echo_n "checking whether we can use gcc inline assembler to get and set x87 control word... " >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023529 cat >conftest.$ac_ext <<_ACEOF
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023530/* confdefs.h. */
23531_ACEOF
23532cat confdefs.h >>conftest.$ac_ext
23533cat >>conftest.$ac_ext <<_ACEOF
23534/* end confdefs.h. */
23535
23536int
23537main ()
23538{
23539
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023540 unsigned short cw;
23541 __asm__ __volatile__ ("fnstcw %0" : "=m" (cw));
23542 __asm__ __volatile__ ("fldcw %0" : : "m" (cw));
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023543
23544 ;
23545 return 0;
23546}
23547_ACEOF
23548rm -f conftest.$ac_objext
23549if { (ac_try="$ac_compile"
23550case "(($ac_try" in
23551 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23552 *) ac_try_echo=$ac_try;;
23553esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023554eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23555$as_echo "$ac_try_echo") >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023556 (eval "$ac_compile") 2>conftest.er1
23557 ac_status=$?
23558 grep -v '^ *+' conftest.er1 >conftest.err
23559 rm -f conftest.er1
23560 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023561 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023562 (exit $ac_status); } && {
23563 test -z "$ac_c_werror_flag" ||
23564 test ! -s conftest.err
23565 } && test -s conftest.$ac_objext; then
23566 have_gcc_asm_for_x87=yes
23567else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023568 $as_echo "$as_me: failed program was:" >&5
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023569sed 's/^/| /' conftest.$ac_ext >&5
23570
23571 have_gcc_asm_for_x87=no
23572fi
23573
23574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023575 { $as_echo "$as_me:$LINENO: result: $have_gcc_asm_for_x87" >&5
23576$as_echo "$have_gcc_asm_for_x87" >&6; }
Mark Dickinson7abf8d42009-04-18 20:17:52 +000023577 if test "$have_gcc_asm_for_x87" = yes
23578 then
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023579
23580cat >>confdefs.h <<\_ACEOF
23581#define HAVE_GCC_ASM_FOR_X87 1
23582_ACEOF
23583
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023584 fi
23585fi
Martin v. Löwis11437992002-04-12 09:54:03 +000023586
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023587# Detect whether system arithmetic is subject to x87-style double
23588# rounding issues. The result of this test has little meaning on non
23589# IEEE 754 platforms. On IEEE 754, test should return 1 if rounding
23590# mode is round-to-nearest and double rounding issues are present, and
23591# 0 otherwise. See http://bugs.python.org/issue2937 for more info.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023592{ $as_echo "$as_me:$LINENO: checking for x87-style double rounding" >&5
23593$as_echo_n "checking for x87-style double rounding... " >&6; }
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023594# $BASECFLAGS may affect the result
23595ac_save_cc="$CC"
23596CC="$CC $BASECFLAGS"
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023597if test "$cross_compiling" = yes; then
23598 ac_cv_x87_double_rounding=no
23599else
23600 cat >conftest.$ac_ext <<_ACEOF
23601/* confdefs.h. */
23602_ACEOF
23603cat confdefs.h >>conftest.$ac_ext
23604cat >>conftest.$ac_ext <<_ACEOF
23605/* end confdefs.h. */
23606
23607#include <stdlib.h>
23608#include <math.h>
23609int main() {
23610 volatile double x, y, z;
23611 /* 1./(1-2**-53) -> 1+2**-52 (correct), 1.0 (double rounding) */
23612 x = 0.99999999999999989; /* 1-2**-53 */
23613 y = 1./x;
23614 if (y != 1.)
23615 exit(0);
23616 /* 1e16+2.99999 -> 1e16+2. (correct), 1e16+4. (double rounding) */
23617 x = 1e16;
23618 y = 2.99999;
23619 z = x + y;
23620 if (z != 1e16+4.)
23621 exit(0);
23622 /* both tests show evidence of double rounding */
23623 exit(1);
23624}
23625
23626_ACEOF
23627rm -f conftest$ac_exeext
23628if { (ac_try="$ac_link"
23629case "(($ac_try" in
23630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23631 *) ac_try_echo=$ac_try;;
23632esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023633eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23634$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023635 (eval "$ac_link") 2>&5
23636 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023637 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023638 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23639 { (case "(($ac_try" in
23640 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23641 *) ac_try_echo=$ac_try;;
23642esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023643eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23644$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023645 (eval "$ac_try") 2>&5
23646 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023647 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023648 (exit $ac_status); }; }; then
23649 ac_cv_x87_double_rounding=no
23650else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023651 $as_echo "$as_me: program exited with status $ac_status" >&5
23652$as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023653sed 's/^/| /' conftest.$ac_ext >&5
23654
23655( exit $ac_status )
23656ac_cv_x87_double_rounding=yes
23657fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023658rm -rf conftest.dSYM
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023659rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23660fi
23661
23662
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023663CC="$ac_save_cc"
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023664{ $as_echo "$as_me:$LINENO: result: $ac_cv_x87_double_rounding" >&5
23665$as_echo "$ac_cv_x87_double_rounding" >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023666if test "$ac_cv_x87_double_rounding" = yes
23667then
23668
23669cat >>confdefs.h <<\_ACEOF
23670#define X87_DOUBLE_ROUNDING 1
23671_ACEOF
23672
23673fi
23674
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000023675# ************************************
23676# * Check for mathematical functions *
23677# ************************************
23678
23679LIBS_SAVE=$LIBS
23680LIBS="$LIBS $LIBM"
23681
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023682# On FreeBSD 6.2, it appears that tanh(-0.) returns 0. instead of
23683# -0. on some architectures.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023684{ $as_echo "$as_me:$LINENO: checking whether tanh preserves the sign of zero" >&5
23685$as_echo_n "checking whether tanh preserves the sign of zero... " >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023686if test "${ac_cv_tanh_preserves_zero_sign+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023687 $as_echo_n "(cached) " >&6
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023688else
23689
23690if test "$cross_compiling" = yes; then
23691 ac_cv_tanh_preserves_zero_sign=no
23692else
23693 cat >conftest.$ac_ext <<_ACEOF
23694/* confdefs.h. */
23695_ACEOF
23696cat confdefs.h >>conftest.$ac_ext
23697cat >>conftest.$ac_ext <<_ACEOF
23698/* end confdefs.h. */
23699
23700#include <math.h>
23701#include <stdlib.h>
23702int main() {
23703 /* return 0 if either negative zeros don't exist
23704 on this platform or if negative zeros exist
23705 and tanh(-0.) == -0. */
23706 if (atan2(0., -1.) == atan2(-0., -1.) ||
23707 atan2(tanh(-0.), -1.) == atan2(-0., -1.)) exit(0);
23708 else exit(1);
23709}
23710
23711_ACEOF
23712rm -f conftest$ac_exeext
23713if { (ac_try="$ac_link"
23714case "(($ac_try" in
23715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23716 *) ac_try_echo=$ac_try;;
23717esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023718eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23719$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023720 (eval "$ac_link") 2>&5
23721 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023722 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023723 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
23724 { (case "(($ac_try" in
23725 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23726 *) ac_try_echo=$ac_try;;
23727esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023728eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23729$as_echo "$ac_try_echo") >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023730 (eval "$ac_try") 2>&5
23731 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023732 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023733 (exit $ac_status); }; }; then
23734 ac_cv_tanh_preserves_zero_sign=yes
23735else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023736 $as_echo "$as_me: program exited with status $ac_status" >&5
23737$as_echo "$as_me: failed program was:" >&5
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023738sed 's/^/| /' conftest.$ac_ext >&5
23739
23740( exit $ac_status )
23741ac_cv_tanh_preserves_zero_sign=no
23742fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023743rm -rf conftest.dSYM
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023744rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
23745fi
23746
23747
23748fi
23749
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023750{ $as_echo "$as_me:$LINENO: result: $ac_cv_tanh_preserves_zero_sign" >&5
23751$as_echo "$ac_cv_tanh_preserves_zero_sign" >&6; }
Christian Heimes81ee3ef2008-05-04 22:42:01 +000023752if test "$ac_cv_tanh_preserves_zero_sign" = yes
23753then
23754
23755cat >>confdefs.h <<\_ACEOF
23756#define TANH_PRESERVES_ZERO_SIGN 1
23757_ACEOF
23758
23759fi
23760
23761
Guido van Rossum2b3ac691996-08-30 15:18:41 +000023762
Michael W. Hudson54241132001-12-07 15:38:26 +000023763
Christian Heimes99170a52007-12-19 02:07:34 +000023764
23765
23766
23767
23768
Mark Dickinsonf2537862009-04-18 13:58:18 +000023769
Mark Dickinson9c113362009-09-05 10:36:23 +000023770for ac_func in acosh asinh atanh copysign erf erfc expm1 finite gamma
23771do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023772as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23773{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
23774$as_echo_n "checking for $ac_func... " >&6; }
Mark Dickinson9c113362009-09-05 10:36:23 +000023775if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023776 $as_echo_n "(cached) " >&6
Mark Dickinson9c113362009-09-05 10:36:23 +000023777else
23778 cat >conftest.$ac_ext <<_ACEOF
23779/* confdefs.h. */
23780_ACEOF
23781cat confdefs.h >>conftest.$ac_ext
23782cat >>conftest.$ac_ext <<_ACEOF
23783/* end confdefs.h. */
23784/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23785 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23786#define $ac_func innocuous_$ac_func
23787
23788/* System header to define __stub macros and hopefully few prototypes,
23789 which can conflict with char $ac_func (); below.
23790 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23791 <limits.h> exists even on freestanding compilers. */
23792
23793#ifdef __STDC__
23794# include <limits.h>
23795#else
23796# include <assert.h>
23797#endif
23798
23799#undef $ac_func
23800
23801/* Override any GCC internal prototype to avoid an error.
23802 Use char because int might match the return type of a GCC
23803 builtin and then its argument prototype would still apply. */
23804#ifdef __cplusplus
23805extern "C"
23806#endif
23807char $ac_func ();
23808/* The GNU C library defines this for functions which it implements
23809 to always fail with ENOSYS. Some functions are actually named
23810 something starting with __ and the normal name is an alias. */
23811#if defined __stub_$ac_func || defined __stub___$ac_func
23812choke me
23813#endif
23814
23815int
23816main ()
23817{
23818return $ac_func ();
23819 ;
23820 return 0;
23821}
23822_ACEOF
23823rm -f conftest.$ac_objext conftest$ac_exeext
23824if { (ac_try="$ac_link"
23825case "(($ac_try" in
23826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23827 *) ac_try_echo=$ac_try;;
23828esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023829eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23830$as_echo "$ac_try_echo") >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023831 (eval "$ac_link") 2>conftest.er1
23832 ac_status=$?
23833 grep -v '^ *+' conftest.er1 >conftest.err
23834 rm -f conftest.er1
23835 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023836 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023837 (exit $ac_status); } && {
23838 test -z "$ac_c_werror_flag" ||
23839 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023840 } && test -s conftest$ac_exeext && {
23841 test "$cross_compiling" = yes ||
23842 $as_test_x conftest$ac_exeext
23843 }; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023844 eval "$as_ac_var=yes"
23845else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023846 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson9c113362009-09-05 10:36:23 +000023847sed 's/^/| /' conftest.$ac_ext >&5
23848
23849 eval "$as_ac_var=no"
23850fi
23851
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023852rm -rf conftest.dSYM
Mark Dickinson9c113362009-09-05 10:36:23 +000023853rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23854 conftest$ac_exeext conftest.$ac_ext
23855fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023856ac_res=`eval 'as_val=${'$as_ac_var'}
23857 $as_echo "$as_val"'`
23858 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
23859$as_echo "$ac_res" >&6; }
23860as_val=`eval 'as_val=${'$as_ac_var'}
23861 $as_echo "$as_val"'`
23862 if test "x$as_val" = x""yes; then
Mark Dickinson9c113362009-09-05 10:36:23 +000023863 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023864#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Mark Dickinson9c113362009-09-05 10:36:23 +000023865_ACEOF
23866
23867fi
23868done
23869
23870
23871
23872
23873
23874
23875for ac_func in hypot lgamma log1p round tgamma
Christian Heimes99170a52007-12-19 02:07:34 +000023876do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023877as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
23878{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
23879$as_echo_n "checking for $ac_func... " >&6; }
Christian Heimes99170a52007-12-19 02:07:34 +000023880if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023881 $as_echo_n "(cached) " >&6
Christian Heimes99170a52007-12-19 02:07:34 +000023882else
23883 cat >conftest.$ac_ext <<_ACEOF
23884/* confdefs.h. */
23885_ACEOF
23886cat confdefs.h >>conftest.$ac_ext
23887cat >>conftest.$ac_ext <<_ACEOF
23888/* end confdefs.h. */
23889/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
23890 For example, HP-UX 11i <limits.h> declares gettimeofday. */
23891#define $ac_func innocuous_$ac_func
23892
23893/* System header to define __stub macros and hopefully few prototypes,
23894 which can conflict with char $ac_func (); below.
23895 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
23896 <limits.h> exists even on freestanding compilers. */
23897
23898#ifdef __STDC__
23899# include <limits.h>
23900#else
23901# include <assert.h>
23902#endif
23903
23904#undef $ac_func
23905
23906/* Override any GCC internal prototype to avoid an error.
23907 Use char because int might match the return type of a GCC
23908 builtin and then its argument prototype would still apply. */
23909#ifdef __cplusplus
23910extern "C"
23911#endif
23912char $ac_func ();
23913/* The GNU C library defines this for functions which it implements
23914 to always fail with ENOSYS. Some functions are actually named
23915 something starting with __ and the normal name is an alias. */
23916#if defined __stub_$ac_func || defined __stub___$ac_func
23917choke me
23918#endif
23919
23920int
23921main ()
23922{
23923return $ac_func ();
23924 ;
23925 return 0;
23926}
23927_ACEOF
23928rm -f conftest.$ac_objext conftest$ac_exeext
23929if { (ac_try="$ac_link"
23930case "(($ac_try" in
23931 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23932 *) ac_try_echo=$ac_try;;
23933esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023934eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
23935$as_echo "$ac_try_echo") >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023936 (eval "$ac_link") 2>conftest.er1
23937 ac_status=$?
23938 grep -v '^ *+' conftest.er1 >conftest.err
23939 rm -f conftest.er1
23940 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023941 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023942 (exit $ac_status); } && {
23943 test -z "$ac_c_werror_flag" ||
23944 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023945 } && test -s conftest$ac_exeext && {
23946 test "$cross_compiling" = yes ||
23947 $as_test_x conftest$ac_exeext
23948 }; then
Christian Heimes99170a52007-12-19 02:07:34 +000023949 eval "$as_ac_var=yes"
23950else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023951 $as_echo "$as_me: failed program was:" >&5
Christian Heimes99170a52007-12-19 02:07:34 +000023952sed 's/^/| /' conftest.$ac_ext >&5
23953
23954 eval "$as_ac_var=no"
23955fi
23956
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023957rm -rf conftest.dSYM
Christian Heimes99170a52007-12-19 02:07:34 +000023958rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
23959 conftest$ac_exeext conftest.$ac_ext
23960fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023961ac_res=`eval 'as_val=${'$as_ac_var'}
23962 $as_echo "$as_val"'`
23963 { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
23964$as_echo "$ac_res" >&6; }
23965as_val=`eval 'as_val=${'$as_ac_var'}
23966 $as_echo "$as_val"'`
23967 if test "x$as_val" = x""yes; then
Christian Heimes99170a52007-12-19 02:07:34 +000023968 cat >>confdefs.h <<_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023969#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Christian Heimes99170a52007-12-19 02:07:34 +000023970_ACEOF
23971
23972fi
23973done
23974
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023975{ $as_echo "$as_me:$LINENO: checking whether isinf is declared" >&5
23976$as_echo_n "checking whether isinf is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023977if test "${ac_cv_have_decl_isinf+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000023978 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000023979else
23980 cat >conftest.$ac_ext <<_ACEOF
23981/* confdefs.h. */
23982_ACEOF
23983cat confdefs.h >>conftest.$ac_ext
23984cat >>conftest.$ac_ext <<_ACEOF
23985/* end confdefs.h. */
23986#include <math.h>
23987
23988int
23989main ()
23990{
23991#ifndef isinf
23992 (void) isinf;
23993#endif
23994
23995 ;
23996 return 0;
23997}
23998_ACEOF
23999rm -f conftest.$ac_objext
24000if { (ac_try="$ac_compile"
24001case "(($ac_try" in
24002 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24003 *) ac_try_echo=$ac_try;;
24004esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024005eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24006$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024007 (eval "$ac_compile") 2>conftest.er1
24008 ac_status=$?
24009 grep -v '^ *+' conftest.er1 >conftest.err
24010 rm -f conftest.er1
24011 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024012 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024013 (exit $ac_status); } && {
24014 test -z "$ac_c_werror_flag" ||
24015 test ! -s conftest.err
24016 } && test -s conftest.$ac_objext; then
24017 ac_cv_have_decl_isinf=yes
24018else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024019 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024020sed 's/^/| /' conftest.$ac_ext >&5
24021
24022 ac_cv_have_decl_isinf=no
24023fi
24024
24025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24026fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024027{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isinf" >&5
24028$as_echo "$ac_cv_have_decl_isinf" >&6; }
24029if test "x$ac_cv_have_decl_isinf" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024030
24031cat >>confdefs.h <<_ACEOF
24032#define HAVE_DECL_ISINF 1
24033_ACEOF
24034
24035
24036else
24037 cat >>confdefs.h <<_ACEOF
24038#define HAVE_DECL_ISINF 0
24039_ACEOF
24040
24041
24042fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024043{ $as_echo "$as_me:$LINENO: checking whether isnan is declared" >&5
24044$as_echo_n "checking whether isnan is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024045if test "${ac_cv_have_decl_isnan+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024046 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024047else
24048 cat >conftest.$ac_ext <<_ACEOF
24049/* confdefs.h. */
24050_ACEOF
24051cat confdefs.h >>conftest.$ac_ext
24052cat >>conftest.$ac_ext <<_ACEOF
24053/* end confdefs.h. */
24054#include <math.h>
24055
24056int
24057main ()
24058{
24059#ifndef isnan
24060 (void) isnan;
24061#endif
24062
24063 ;
24064 return 0;
24065}
24066_ACEOF
24067rm -f conftest.$ac_objext
24068if { (ac_try="$ac_compile"
24069case "(($ac_try" in
24070 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24071 *) ac_try_echo=$ac_try;;
24072esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024073eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24074$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024075 (eval "$ac_compile") 2>conftest.er1
24076 ac_status=$?
24077 grep -v '^ *+' conftest.er1 >conftest.err
24078 rm -f conftest.er1
24079 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024080 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024081 (exit $ac_status); } && {
24082 test -z "$ac_c_werror_flag" ||
24083 test ! -s conftest.err
24084 } && test -s conftest.$ac_objext; then
24085 ac_cv_have_decl_isnan=yes
24086else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024087 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024088sed 's/^/| /' conftest.$ac_ext >&5
24089
24090 ac_cv_have_decl_isnan=no
24091fi
24092
24093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24094fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024095{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isnan" >&5
24096$as_echo "$ac_cv_have_decl_isnan" >&6; }
24097if test "x$ac_cv_have_decl_isnan" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024098
24099cat >>confdefs.h <<_ACEOF
24100#define HAVE_DECL_ISNAN 1
24101_ACEOF
24102
24103
24104else
24105 cat >>confdefs.h <<_ACEOF
24106#define HAVE_DECL_ISNAN 0
24107_ACEOF
24108
24109
24110fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024111{ $as_echo "$as_me:$LINENO: checking whether isfinite is declared" >&5
24112$as_echo_n "checking whether isfinite is declared... " >&6; }
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024113if test "${ac_cv_have_decl_isfinite+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024114 $as_echo_n "(cached) " >&6
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024115else
24116 cat >conftest.$ac_ext <<_ACEOF
24117/* confdefs.h. */
24118_ACEOF
24119cat confdefs.h >>conftest.$ac_ext
24120cat >>conftest.$ac_ext <<_ACEOF
24121/* end confdefs.h. */
24122#include <math.h>
24123
24124int
24125main ()
24126{
24127#ifndef isfinite
24128 (void) isfinite;
24129#endif
24130
24131 ;
24132 return 0;
24133}
24134_ACEOF
24135rm -f conftest.$ac_objext
24136if { (ac_try="$ac_compile"
24137case "(($ac_try" in
24138 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24139 *) ac_try_echo=$ac_try;;
24140esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024141eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24142$as_echo "$ac_try_echo") >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024143 (eval "$ac_compile") 2>conftest.er1
24144 ac_status=$?
24145 grep -v '^ *+' conftest.er1 >conftest.err
24146 rm -f conftest.er1
24147 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024148 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024149 (exit $ac_status); } && {
24150 test -z "$ac_c_werror_flag" ||
24151 test ! -s conftest.err
24152 } && test -s conftest.$ac_objext; then
24153 ac_cv_have_decl_isfinite=yes
24154else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024155 $as_echo "$as_me: failed program was:" >&5
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024156sed 's/^/| /' conftest.$ac_ext >&5
24157
24158 ac_cv_have_decl_isfinite=no
24159fi
24160
24161rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24162fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024163{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_isfinite" >&5
24164$as_echo "$ac_cv_have_decl_isfinite" >&6; }
24165if test "x$ac_cv_have_decl_isfinite" = x""yes; then
Mark Dickinson3dc7c6a2009-01-04 15:09:02 +000024166
24167cat >>confdefs.h <<_ACEOF
24168#define HAVE_DECL_ISFINITE 1
24169_ACEOF
24170
24171
24172else
24173 cat >>confdefs.h <<_ACEOF
24174#define HAVE_DECL_ISFINITE 0
24175_ACEOF
24176
24177
24178fi
24179
24180
Christian Heimes99170a52007-12-19 02:07:34 +000024181
Guido van Rossumaf5b83e1995-01-04 19:02:35 +000024182LIBS=$LIBS_SAVE
24183
Mark Dickinson10683072009-04-18 21:18:19 +000024184# Multiprocessing check for broken sem_getvalue
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024185{ $as_echo "$as_me:$LINENO: checking for broken sem_getvalue" >&5
24186$as_echo_n "checking for broken sem_getvalue... " >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024187if test "${ac_cv_broken_sem_getvalue+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024188 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024189else
24190 if test "$cross_compiling" = yes; then
24191 ac_cv_broken_sem_getvalue=yes
Mark Dickinson10683072009-04-18 21:18:19 +000024192else
24193 cat >conftest.$ac_ext <<_ACEOF
24194/* confdefs.h. */
24195_ACEOF
24196cat confdefs.h >>conftest.$ac_ext
24197cat >>conftest.$ac_ext <<_ACEOF
24198/* end confdefs.h. */
24199
24200#include <unistd.h>
24201#include <fcntl.h>
24202#include <stdio.h>
24203#include <semaphore.h>
24204#include <sys/stat.h>
24205
24206int main(void){
24207 sem_t *a = sem_open("/autoconf", O_CREAT, S_IRUSR|S_IWUSR, 0);
24208 int count;
24209 int res;
24210 if(a==SEM_FAILED){
24211 perror("sem_open");
24212 return 1;
24213
24214 }
24215 res = sem_getvalue(a, &count);
24216 sem_close(a);
24217 return res==-1 ? 1 : 0;
24218}
24219
Mark Dickinson10683072009-04-18 21:18:19 +000024220_ACEOF
24221rm -f conftest$ac_exeext
24222if { (ac_try="$ac_link"
24223case "(($ac_try" in
24224 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24225 *) ac_try_echo=$ac_try;;
24226esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024227eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24228$as_echo "$ac_try_echo") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024229 (eval "$ac_link") 2>&5
24230 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024231 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024232 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24233 { (case "(($ac_try" in
24234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24235 *) ac_try_echo=$ac_try;;
24236esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024237eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24238$as_echo "$ac_try_echo") >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024239 (eval "$ac_try") 2>&5
24240 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024241 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024242 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024243 ac_cv_broken_sem_getvalue=no
Mark Dickinson10683072009-04-18 21:18:19 +000024244else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024245 $as_echo "$as_me: program exited with status $ac_status" >&5
24246$as_echo "$as_me: failed program was:" >&5
Mark Dickinson10683072009-04-18 21:18:19 +000024247sed 's/^/| /' conftest.$ac_ext >&5
24248
24249( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024250ac_cv_broken_sem_getvalue=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024251fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024252rm -rf conftest.dSYM
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000024254fi
24255
Alexandre Vassalotti19142282009-07-17 23:11:52 +000024256
24257
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024258fi
24259
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024260{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_sem_getvalue" >&5
24261$as_echo "$ac_cv_broken_sem_getvalue" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000024262if test $ac_cv_broken_sem_getvalue = yes
24263then
24264
24265cat >>confdefs.h <<\_ACEOF
24266#define HAVE_BROKEN_SEM_GETVALUE 1
24267_ACEOF
24268
24269fi
24270
Mark Dickinsonbd792642009-03-18 20:06:12 +000024271# determine what size digit to use for Python's longs
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024272{ $as_echo "$as_me:$LINENO: checking digit size for Python's longs" >&5
24273$as_echo_n "checking digit size for Python's longs... " >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024274# Check whether --enable-big-digits was given.
24275if test "${enable_big_digits+set}" = set; then
24276 enableval=$enable_big_digits; case $enable_big_digits in
24277yes)
24278 enable_big_digits=30 ;;
24279no)
24280 enable_big_digits=15 ;;
2428115|30)
24282 ;;
24283*)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024284 { { $as_echo "$as_me:$LINENO: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&5
24285$as_echo "$as_me: error: bad value $enable_big_digits for --enable-big-digits; value should be 15 or 30" >&2;}
Mark Dickinsonbd792642009-03-18 20:06:12 +000024286 { (exit 1); exit 1; }; } ;;
24287esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024288{ $as_echo "$as_me:$LINENO: result: $enable_big_digits" >&5
24289$as_echo "$enable_big_digits" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024290
24291cat >>confdefs.h <<_ACEOF
24292#define PYLONG_BITS_IN_DIGIT $enable_big_digits
24293_ACEOF
24294
24295
24296else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024297 { $as_echo "$as_me:$LINENO: result: no value specified" >&5
24298$as_echo "no value specified" >&6; }
Mark Dickinsonbd792642009-03-18 20:06:12 +000024299fi
24300
24301
Guido van Rossumef2255b2000-03-10 22:30:29 +000024302# check for wchar.h
Martin v. Löwis11437992002-04-12 09:54:03 +000024303if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024304 { $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
24305$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024306if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024307 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024308fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024309{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24310$as_echo "$ac_cv_header_wchar_h" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000024311else
Martin v. Löwis11437992002-04-12 09:54:03 +000024312 # Is the header compilable?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024313{ $as_echo "$as_me:$LINENO: checking wchar.h usability" >&5
24314$as_echo_n "checking wchar.h usability... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024315cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024316/* confdefs.h. */
24317_ACEOF
24318cat confdefs.h >>conftest.$ac_ext
24319cat >>conftest.$ac_ext <<_ACEOF
24320/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024321$ac_includes_default
24322#include <wchar.h>
24323_ACEOF
24324rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024325if { (ac_try="$ac_compile"
24326case "(($ac_try" in
24327 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24328 *) ac_try_echo=$ac_try;;
24329esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024330eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24331$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024332 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024333 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024334 grep -v '^ *+' conftest.er1 >conftest.err
24335 rm -f conftest.er1
24336 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024337 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024338 (exit $ac_status); } && {
24339 test -z "$ac_c_werror_flag" ||
24340 test ! -s conftest.err
24341 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024342 ac_header_compiler=yes
24343else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024344 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024345sed 's/^/| /' conftest.$ac_ext >&5
24346
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024347 ac_header_compiler=no
Martin v. Löwis11437992002-04-12 09:54:03 +000024348fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024349
24350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024351{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
24352$as_echo "$ac_header_compiler" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024353
24354# Is the header present?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024355{ $as_echo "$as_me:$LINENO: checking wchar.h presence" >&5
24356$as_echo_n "checking wchar.h presence... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024357cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024358/* confdefs.h. */
24359_ACEOF
24360cat confdefs.h >>conftest.$ac_ext
24361cat >>conftest.$ac_ext <<_ACEOF
24362/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000024363#include <wchar.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024364_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024365if { (ac_try="$ac_cpp conftest.$ac_ext"
24366case "(($ac_try" in
24367 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24368 *) ac_try_echo=$ac_try;;
24369esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024370eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24371$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024372 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024373 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000024374 grep -v '^ *+' conftest.er1 >conftest.err
Martin v. Löwis11437992002-04-12 09:54:03 +000024375 rm -f conftest.er1
24376 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024377 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024378 (exit $ac_status); } >/dev/null && {
24379 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
24380 test ! -s conftest.err
24381 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024382 ac_header_preproc=yes
24383else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024384 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024385sed 's/^/| /' conftest.$ac_ext >&5
24386
Martin v. Löwis11437992002-04-12 09:54:03 +000024387 ac_header_preproc=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000024388fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024389
Martin v. Löwis11437992002-04-12 09:54:03 +000024390rm -f conftest.err conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024391{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
24392$as_echo "$ac_header_preproc" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024393
24394# So? What about this header?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024395case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
24396 yes:no: )
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024397 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&5
24398$as_echo "$as_me: WARNING: wchar.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
24399 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the compiler's result" >&5
24400$as_echo "$as_me: WARNING: wchar.h: proceeding with the compiler's result" >&2;}
Skip Montanarof0d5f792004-08-15 14:08:23 +000024401 ac_header_preproc=yes
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000024402 ;;
Skip Montanarof0d5f792004-08-15 14:08:23 +000024403 no:yes:* )
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024404 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: present but cannot be compiled" >&5
24405$as_echo "$as_me: WARNING: wchar.h: present but cannot be compiled" >&2;}
24406 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: check for missing prerequisite headers?" >&5
24407$as_echo "$as_me: WARNING: wchar.h: check for missing prerequisite headers?" >&2;}
24408 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: see the Autoconf documentation" >&5
24409$as_echo "$as_me: WARNING: wchar.h: see the Autoconf documentation" >&2;}
24410 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&5
24411$as_echo "$as_me: WARNING: wchar.h: section \"Present But Cannot Be Compiled\"" >&2;}
24412 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: proceeding with the preprocessor's result" >&5
24413$as_echo "$as_me: WARNING: wchar.h: proceeding with the preprocessor's result" >&2;}
24414 { $as_echo "$as_me:$LINENO: WARNING: wchar.h: in the future, the compiler will take precedence" >&5
24415$as_echo "$as_me: WARNING: wchar.h: in the future, the compiler will take precedence" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024416 ( cat <<\_ASBOX
Georg Brandle2e15612009-05-20 18:25:10 +000024417## -------------------------------------- ##
24418## Report this to http://bugs.python.org/ ##
24419## -------------------------------------- ##
Skip Montanaro6dead952003-09-25 14:50:04 +000024420_ASBOX
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024421 ) | sed "s/^/$as_me: WARNING: /" >&2
Skip Montanaro6dead952003-09-25 14:50:04 +000024422 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024423esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024424{ $as_echo "$as_me:$LINENO: checking for wchar.h" >&5
24425$as_echo_n "checking for wchar.h... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024426if test "${ac_cv_header_wchar_h+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024427 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024428else
24429 ac_cv_header_wchar_h=$ac_header_preproc
Guido van Rossumef2255b2000-03-10 22:30:29 +000024430fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024431{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_wchar_h" >&5
24432$as_echo "$ac_cv_header_wchar_h" >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024433
24434fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024435if test "x$ac_cv_header_wchar_h" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024436
24437
24438cat >>confdefs.h <<\_ACEOF
Guido van Rossumef2255b2000-03-10 22:30:29 +000024439#define HAVE_WCHAR_H 1
Martin v. Löwis11437992002-04-12 09:54:03 +000024440_ACEOF
24441
Martin v. Löwisc45929e2002-04-06 10:10:49 +000024442 wchar_h="yes"
24443
Guido van Rossumef2255b2000-03-10 22:30:29 +000024444else
Martin v. Löwis11437992002-04-12 09:54:03 +000024445 wchar_h="no"
Guido van Rossumef2255b2000-03-10 22:30:29 +000024446
24447fi
24448
Michael W. Hudson54241132001-12-07 15:38:26 +000024449
Martin v. Löwis11437992002-04-12 09:54:03 +000024450
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024451# determine wchar_t size
24452if test "$wchar_h" = yes
24453then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024454 # The cast to long int works around a bug in the HP C Compiler
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024455# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
24456# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
24457# This bug is HP SR number 8606223364.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024458{ $as_echo "$as_me:$LINENO: checking size of wchar_t" >&5
24459$as_echo_n "checking size of wchar_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000024460if test "${ac_cv_sizeof_wchar_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024461 $as_echo_n "(cached) " >&6
Martin v. Löwis11437992002-04-12 09:54:03 +000024462else
Martin v. Löwis11437992002-04-12 09:54:03 +000024463 if test "$cross_compiling" = yes; then
24464 # Depending upon the size, compute the lo and hi bounds.
24465cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024466/* confdefs.h. */
24467_ACEOF
24468cat confdefs.h >>conftest.$ac_ext
24469cat >>conftest.$ac_ext <<_ACEOF
24470/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024471#include <wchar.h>
24472
Martin v. Löwis11437992002-04-12 09:54:03 +000024473int
24474main ()
24475{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024476static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024477test_array [0] = 0
24478
24479 ;
24480 return 0;
24481}
24482_ACEOF
24483rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024484if { (ac_try="$ac_compile"
24485case "(($ac_try" in
24486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24487 *) ac_try_echo=$ac_try;;
24488esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024489eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24490$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024491 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024492 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024493 grep -v '^ *+' conftest.er1 >conftest.err
24494 rm -f conftest.er1
24495 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024496 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024497 (exit $ac_status); } && {
24498 test -z "$ac_c_werror_flag" ||
24499 test ! -s conftest.err
24500 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024501 ac_lo=0 ac_mid=0
24502 while :; do
24503 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024504/* confdefs.h. */
24505_ACEOF
24506cat confdefs.h >>conftest.$ac_ext
24507cat >>conftest.$ac_ext <<_ACEOF
24508/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024509#include <wchar.h>
24510
Martin v. Löwis11437992002-04-12 09:54:03 +000024511int
24512main ()
24513{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024514static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024515test_array [0] = 0
24516
24517 ;
24518 return 0;
24519}
24520_ACEOF
24521rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024522if { (ac_try="$ac_compile"
24523case "(($ac_try" in
24524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24525 *) ac_try_echo=$ac_try;;
24526esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024527eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24528$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024529 (eval "$ac_compile") 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 Peterson8719ad52009-09-11 22:24:02 +000024534 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024535 (exit $ac_status); } && {
24536 test -z "$ac_c_werror_flag" ||
24537 test ! -s conftest.err
24538 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024539 ac_hi=$ac_mid; break
24540else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024541 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024542sed 's/^/| /' conftest.$ac_ext >&5
24543
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024544 ac_lo=`expr $ac_mid + 1`
24545 if test $ac_lo -le $ac_mid; then
24546 ac_lo= ac_hi=
24547 break
24548 fi
24549 ac_mid=`expr 2 '*' $ac_mid + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024550fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024551
24552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024553 done
24554else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024555 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024556sed 's/^/| /' conftest.$ac_ext >&5
24557
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024558 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024559/* confdefs.h. */
24560_ACEOF
24561cat confdefs.h >>conftest.$ac_ext
24562cat >>conftest.$ac_ext <<_ACEOF
24563/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024564#include <wchar.h>
24565
Martin v. Löwis11437992002-04-12 09:54:03 +000024566int
24567main ()
24568{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024569static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) < 0)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024570test_array [0] = 0
24571
24572 ;
24573 return 0;
24574}
24575_ACEOF
24576rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024577if { (ac_try="$ac_compile"
24578case "(($ac_try" in
24579 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24580 *) ac_try_echo=$ac_try;;
24581esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024582eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24583$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024584 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024585 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024586 grep -v '^ *+' conftest.er1 >conftest.err
24587 rm -f conftest.er1
24588 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024589 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024590 (exit $ac_status); } && {
24591 test -z "$ac_c_werror_flag" ||
24592 test ! -s conftest.err
24593 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024594 ac_hi=-1 ac_mid=-1
24595 while :; do
24596 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024597/* confdefs.h. */
24598_ACEOF
24599cat confdefs.h >>conftest.$ac_ext
24600cat >>conftest.$ac_ext <<_ACEOF
24601/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024602#include <wchar.h>
24603
Martin v. Löwis11437992002-04-12 09:54:03 +000024604int
24605main ()
24606{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024607static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) >= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024608test_array [0] = 0
24609
24610 ;
24611 return 0;
24612}
24613_ACEOF
24614rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024615if { (ac_try="$ac_compile"
24616case "(($ac_try" in
24617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24618 *) ac_try_echo=$ac_try;;
24619esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024620eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24621$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024622 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024623 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024624 grep -v '^ *+' conftest.er1 >conftest.err
24625 rm -f conftest.er1
24626 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024627 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024628 (exit $ac_status); } && {
24629 test -z "$ac_c_werror_flag" ||
24630 test ! -s conftest.err
24631 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024632 ac_lo=$ac_mid; break
24633else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024634 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024635sed 's/^/| /' conftest.$ac_ext >&5
24636
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024637 ac_hi=`expr '(' $ac_mid ')' - 1`
24638 if test $ac_mid -le $ac_hi; then
24639 ac_lo= ac_hi=
24640 break
24641 fi
24642 ac_mid=`expr 2 '*' $ac_mid`
Martin v. Löwis11437992002-04-12 09:54:03 +000024643fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024644
24645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024646 done
24647else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024648 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024649sed 's/^/| /' conftest.$ac_ext >&5
24650
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024651 ac_lo= ac_hi=
Martin v. Löwis11437992002-04-12 09:54:03 +000024652fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024653
24654rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024655fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024656
24657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024658# Binary search between lo and hi bounds.
24659while test "x$ac_lo" != "x$ac_hi"; do
24660 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
24661 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024662/* confdefs.h. */
24663_ACEOF
24664cat confdefs.h >>conftest.$ac_ext
24665cat >>conftest.$ac_ext <<_ACEOF
24666/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024667#include <wchar.h>
24668
Martin v. Löwis11437992002-04-12 09:54:03 +000024669int
24670main ()
24671{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024672static int test_array [1 - 2 * !(((long int) (sizeof (wchar_t))) <= $ac_mid)];
Martin v. Löwis11437992002-04-12 09:54:03 +000024673test_array [0] = 0
24674
24675 ;
24676 return 0;
24677}
24678_ACEOF
24679rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024680if { (ac_try="$ac_compile"
24681case "(($ac_try" in
24682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24683 *) ac_try_echo=$ac_try;;
24684esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024685eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24686$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024687 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000024688 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024689 grep -v '^ *+' conftest.er1 >conftest.err
24690 rm -f conftest.er1
24691 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024692 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024693 (exit $ac_status); } && {
24694 test -z "$ac_c_werror_flag" ||
24695 test ! -s conftest.err
24696 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000024697 ac_hi=$ac_mid
24698else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024699 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024700sed 's/^/| /' conftest.$ac_ext >&5
24701
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024702 ac_lo=`expr '(' $ac_mid ')' + 1`
Martin v. Löwis11437992002-04-12 09:54:03 +000024703fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024704
24705rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000024706done
24707case $ac_lo in
24708?*) ac_cv_sizeof_wchar_t=$ac_lo;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024709'') if test "$ac_cv_type_wchar_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024710 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24711$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24712{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024713See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024714$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024715See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024716 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024717 else
24718 ac_cv_sizeof_wchar_t=0
24719 fi ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000024720esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024721else
Martin v. Löwis11437992002-04-12 09:54:03 +000024722 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024723/* confdefs.h. */
24724_ACEOF
24725cat confdefs.h >>conftest.$ac_ext
24726cat >>conftest.$ac_ext <<_ACEOF
24727/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000024728#include <wchar.h>
24729
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024730static long int longval () { return (long int) (sizeof (wchar_t)); }
24731static unsigned long int ulongval () { return (long int) (sizeof (wchar_t)); }
Michael W. Hudson54241132001-12-07 15:38:26 +000024732#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024733#include <stdlib.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000024734int
24735main ()
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024736{
Martin v. Löwis11437992002-04-12 09:54:03 +000024737
24738 FILE *f = fopen ("conftest.val", "w");
24739 if (! f)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024740 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024741 if (((long int) (sizeof (wchar_t))) < 0)
Martin v. Löwis11437992002-04-12 09:54:03 +000024742 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024743 long int i = longval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024744 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024745 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024746 fprintf (f, "%ld", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024747 }
24748 else
24749 {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024750 unsigned long int i = ulongval ();
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024751 if (i != ((long int) (sizeof (wchar_t))))
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024752 return 1;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024753 fprintf (f, "%lu", i);
Martin v. Löwis11437992002-04-12 09:54:03 +000024754 }
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024755 /* Do not output a trailing newline, as this causes \r\n confusion
24756 on some platforms. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024757 return ferror (f) || fclose (f) != 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000024758
24759 ;
24760 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000024761}
Martin v. Löwis11437992002-04-12 09:54:03 +000024762_ACEOF
24763rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024764if { (ac_try="$ac_link"
24765case "(($ac_try" in
24766 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24767 *) ac_try_echo=$ac_try;;
24768esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024769eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24770$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024771 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024772 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024773 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024774 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024775 { (case "(($ac_try" in
24776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24777 *) ac_try_echo=$ac_try;;
24778esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024779eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24780$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024781 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024782 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024783 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000024784 (exit $ac_status); }; }; then
24785 ac_cv_sizeof_wchar_t=`cat conftest.val`
Guido van Rossumef2255b2000-03-10 22:30:29 +000024786else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024787 $as_echo "$as_me: program exited with status $ac_status" >&5
24788$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024789sed 's/^/| /' conftest.$ac_ext >&5
24790
Martin v. Löwis11437992002-04-12 09:54:03 +000024791( exit $ac_status )
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024792if test "$ac_cv_type_wchar_t" = yes; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024793 { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
24794$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24795{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024796See \`config.log' for more details." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024797$as_echo "$as_me: error: cannot compute sizeof (wchar_t)
Skip Montanaro6dead952003-09-25 14:50:04 +000024798See \`config.log' for more details." >&2;}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024799 { (exit 77); exit 77; }; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024800 else
24801 ac_cv_sizeof_wchar_t=0
24802 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000024803fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024804rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024805rm -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 +000024806fi
24807rm -f conftest.val
Guido van Rossumef2255b2000-03-10 22:30:29 +000024808fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024809{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_wchar_t" >&5
24810$as_echo "$ac_cv_sizeof_wchar_t" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024811
24812
24813
Martin v. Löwis11437992002-04-12 09:54:03 +000024814cat >>confdefs.h <<_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024815#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024816_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024817
Michael W. Hudson54241132001-12-07 15:38:26 +000024818
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024819fi
24820
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024821{ $as_echo "$as_me:$LINENO: checking for UCS-4 tcl" >&5
24822$as_echo_n "checking for UCS-4 tcl... " >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024823have_ucs4_tcl=no
24824cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024825/* confdefs.h. */
24826_ACEOF
24827cat confdefs.h >>conftest.$ac_ext
24828cat >>conftest.$ac_ext <<_ACEOF
24829/* end confdefs.h. */
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024830
24831#include <tcl.h>
24832#if TCL_UTF_MAX != 6
24833# error "NOT UCS4_TCL"
24834#endif
24835int
24836main ()
24837{
24838
24839 ;
24840 return 0;
24841}
24842_ACEOF
24843rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024844if { (ac_try="$ac_compile"
24845case "(($ac_try" in
24846 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24847 *) ac_try_echo=$ac_try;;
24848esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024849eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24850$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024851 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024852 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000024853 grep -v '^ *+' conftest.er1 >conftest.err
24854 rm -f conftest.er1
24855 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024856 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024857 (exit $ac_status); } && {
24858 test -z "$ac_c_werror_flag" ||
24859 test ! -s conftest.err
24860 } && test -s conftest.$ac_objext; then
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024861
24862
24863cat >>confdefs.h <<\_ACEOF
24864#define HAVE_UCS4_TCL 1
24865_ACEOF
24866
24867 have_ucs4_tcl=yes
24868
24869else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024870 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024871sed 's/^/| /' conftest.$ac_ext >&5
24872
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024873
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024874fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024875
24876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024877{ $as_echo "$as_me:$LINENO: result: $have_ucs4_tcl" >&5
24878$as_echo "$have_ucs4_tcl" >&6; }
Martin v. Löwisfa3bdea2003-09-04 18:50:54 +000024879
Skip Montanaro6dead952003-09-25 14:50:04 +000024880# check whether wchar_t is signed or not
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024881if test "$wchar_h" = yes
24882then
24883 # check whether wchar_t is signed or not
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024884 { $as_echo "$as_me:$LINENO: checking whether wchar_t is signed" >&5
24885$as_echo_n "checking whether wchar_t is signed... " >&6; }
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024886 if test "${ac_cv_wchar_t_signed+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024887 $as_echo_n "(cached) " >&6
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024888else
24889
24890 if test "$cross_compiling" = yes; then
24891 ac_cv_wchar_t_signed=yes
24892else
24893 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000024894/* confdefs.h. */
24895_ACEOF
24896cat confdefs.h >>conftest.$ac_ext
24897cat >>conftest.$ac_ext <<_ACEOF
24898/* end confdefs.h. */
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024899
24900 #include <wchar.h>
24901 int main()
24902 {
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000024903 /* Success: exit code 0 */
24904 exit((((wchar_t) -1) < ((wchar_t) 0)) ? 0 : 1);
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024905 }
24906
24907_ACEOF
24908rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024909if { (ac_try="$ac_link"
24910case "(($ac_try" in
24911 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24912 *) ac_try_echo=$ac_try;;
24913esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024914eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24915$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024916 (eval "$ac_link") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024917 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024918 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024919 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024920 { (case "(($ac_try" in
24921 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24922 *) ac_try_echo=$ac_try;;
24923esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024924eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
24925$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024926 (eval "$ac_try") 2>&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024927 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024928 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024929 (exit $ac_status); }; }; then
24930 ac_cv_wchar_t_signed=yes
24931else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024932 $as_echo "$as_me: program exited with status $ac_status" >&5
24933$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000024934sed 's/^/| /' conftest.$ac_ext >&5
24935
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024936( exit $ac_status )
24937ac_cv_wchar_t_signed=no
24938fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024939rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024940rm -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 +000024941fi
24942
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024943
Marc-André Lemburgd7160f82003-09-22 11:14:40 +000024944fi
24945
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024946 { $as_echo "$as_me:$LINENO: result: $ac_cv_wchar_t_signed" >&5
24947$as_echo "$ac_cv_wchar_t_signed" >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024948fi
24949
Benjamin Peterson8719ad52009-09-11 22:24:02 +000024950{ $as_echo "$as_me:$LINENO: checking what type to use for str" >&5
24951$as_echo_n "checking what type to use for str... " >&6; }
Georg Brandl52d168a2008-01-07 18:10:24 +000024952
24953# Check whether --with-wide-unicode was given.
24954if test "${with_wide_unicode+set}" = set; then
24955 withval=$with_wide_unicode;
24956if test "$withval" != no
24957then unicode_size="4"
24958else unicode_size="2"
24959fi
24960
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024961else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000024962
Georg Brandl52d168a2008-01-07 18:10:24 +000024963case "$have_ucs4_tcl" in
24964 yes) unicode_size="4" ;;
24965 *) unicode_size="2" ;;
24966esac
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024967
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024968fi
24969
Martin v. Löwis0036cba2002-04-12 09:58:45 +000024970
24971
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024972
Georg Brandl52d168a2008-01-07 18:10:24 +000024973case "$unicode_size" in
24974 4) cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024975#define Py_UNICODE_SIZE 4
Martin v. Löwis11437992002-04-12 09:54:03 +000024976_ACEOF
Georg Brandl52d168a2008-01-07 18:10:24 +000024977 ;;
24978 *) cat >>confdefs.h <<\_ACEOF
24979#define Py_UNICODE_SIZE 2
24980_ACEOF
24981 ;;
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024982esac
24983
Michael W. Hudson54241132001-12-07 15:38:26 +000024984
Martin v. Löwis11437992002-04-12 09:54:03 +000024985
24986
Georg Brandl52d168a2008-01-07 18:10:24 +000024987# wchar_t is only usable if it maps to an unsigned type
24988if test "$unicode_size" = "$ac_cv_sizeof_wchar_t" \
Matthias Klose7dbeed72004-12-24 08:22:17 +000024989 -a "$ac_cv_wchar_t_signed" = "no"
Georg Brandl52d168a2008-01-07 18:10:24 +000024990then
24991 PY_UNICODE_TYPE="wchar_t"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024992
Martin v. Löwis11437992002-04-12 09:54:03 +000024993cat >>confdefs.h <<\_ACEOF
24994#define HAVE_USABLE_WCHAR_T 1
24995_ACEOF
24996
Georg Brandl52d168a2008-01-07 18:10:24 +000024997 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000024998#define PY_UNICODE_TYPE wchar_t
Martin v. Löwis11437992002-04-12 09:54:03 +000024999_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025000
Georg Brandl52d168a2008-01-07 18:10:24 +000025001elif test "$ac_cv_sizeof_short" = "$unicode_size"
25002then
25003 PY_UNICODE_TYPE="unsigned short"
25004 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025005#define PY_UNICODE_TYPE unsigned short
Martin v. Löwis11437992002-04-12 09:54:03 +000025006_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025007
Georg Brandl52d168a2008-01-07 18:10:24 +000025008elif test "$ac_cv_sizeof_long" = "$unicode_size"
25009then
25010 PY_UNICODE_TYPE="unsigned long"
25011 cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025012#define PY_UNICODE_TYPE unsigned long
Martin v. Löwis11437992002-04-12 09:54:03 +000025013_ACEOF
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025014
Georg Brandl52d168a2008-01-07 18:10:24 +000025015else
25016 PY_UNICODE_TYPE="no type found"
Martin v. Löwis0ba70cc2001-06-26 22:22:37 +000025017fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025018{ $as_echo "$as_me:$LINENO: result: $PY_UNICODE_TYPE" >&5
25019$as_echo "$PY_UNICODE_TYPE" >&6; }
Guido van Rossumef2255b2000-03-10 22:30:29 +000025020
25021# check for endianness
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025022
25023 { $as_echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
25024$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025025if test "${ac_cv_c_bigendian+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025026 $as_echo_n "(cached) " >&6
Guido van Rossumef2255b2000-03-10 22:30:29 +000025027else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025028 ac_cv_c_bigendian=unknown
25029 # See if we're dealing with a universal compiler.
25030 cat >conftest.$ac_ext <<_ACEOF
25031/* confdefs.h. */
25032_ACEOF
25033cat confdefs.h >>conftest.$ac_ext
25034cat >>conftest.$ac_ext <<_ACEOF
25035/* end confdefs.h. */
25036#ifndef __APPLE_CC__
25037 not a universal capable compiler
25038 #endif
25039 typedef int dummy;
25040
25041_ACEOF
25042rm -f conftest.$ac_objext
25043if { (ac_try="$ac_compile"
25044case "(($ac_try" in
25045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25046 *) ac_try_echo=$ac_try;;
25047esac
25048eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25049$as_echo "$ac_try_echo") >&5
25050 (eval "$ac_compile") 2>conftest.er1
25051 ac_status=$?
25052 grep -v '^ *+' conftest.er1 >conftest.err
25053 rm -f conftest.er1
25054 cat conftest.err >&5
25055 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25056 (exit $ac_status); } && {
25057 test -z "$ac_c_werror_flag" ||
25058 test ! -s conftest.err
25059 } && test -s conftest.$ac_objext; then
25060
25061 # Check for potential -arch flags. It is not universal unless
25062 # there are some -arch flags. Note that *ppc* also matches
25063 # ppc64. This check is also rather less than ideal.
25064 case "${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}" in #(
25065 *-arch*ppc*|*-arch*i386*|*-arch*x86_64*) ac_cv_c_bigendian=universal;;
25066 esac
25067else
25068 $as_echo "$as_me: failed program was:" >&5
25069sed 's/^/| /' conftest.$ac_ext >&5
25070
25071
25072fi
25073
25074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25075 if test $ac_cv_c_bigendian = unknown; then
25076 # See if sys/param.h defines the BYTE_ORDER macro.
25077 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025078/* confdefs.h. */
25079_ACEOF
25080cat confdefs.h >>conftest.$ac_ext
25081cat >>conftest.$ac_ext <<_ACEOF
25082/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025083#include <sys/types.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025084 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025085
Martin v. Löwis11437992002-04-12 09:54:03 +000025086int
25087main ()
25088{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025089#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
25090 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
25091 && LITTLE_ENDIAN)
25092 bogus endian macros
25093 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025094
25095 ;
25096 return 0;
25097}
25098_ACEOF
25099rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025100if { (ac_try="$ac_compile"
25101case "(($ac_try" in
25102 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25103 *) ac_try_echo=$ac_try;;
25104esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025105eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25106$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025107 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025108 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025109 grep -v '^ *+' conftest.er1 >conftest.err
25110 rm -f conftest.er1
25111 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025112 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025113 (exit $ac_status); } && {
25114 test -z "$ac_c_werror_flag" ||
25115 test ! -s conftest.err
25116 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025117 # It does; now see whether it defined to BIG_ENDIAN or not.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025118 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025119/* confdefs.h. */
25120_ACEOF
25121cat confdefs.h >>conftest.$ac_ext
25122cat >>conftest.$ac_ext <<_ACEOF
25123/* end confdefs.h. */
Guido van Rossumef2255b2000-03-10 22:30:29 +000025124#include <sys/types.h>
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025125 #include <sys/param.h>
Guido van Rossumef2255b2000-03-10 22:30:29 +000025126
Martin v. Löwis11437992002-04-12 09:54:03 +000025127int
25128main ()
25129{
Guido van Rossumef2255b2000-03-10 22:30:29 +000025130#if BYTE_ORDER != BIG_ENDIAN
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025131 not big endian
25132 #endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025133
25134 ;
25135 return 0;
25136}
25137_ACEOF
25138rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025139if { (ac_try="$ac_compile"
25140case "(($ac_try" in
25141 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25142 *) ac_try_echo=$ac_try;;
25143esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025144eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25145$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025146 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025147 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025148 grep -v '^ *+' conftest.er1 >conftest.err
25149 rm -f conftest.er1
25150 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025151 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025152 (exit $ac_status); } && {
25153 test -z "$ac_c_werror_flag" ||
25154 test ! -s conftest.err
25155 } && test -s conftest.$ac_objext; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025156 ac_cv_c_bigendian=yes
25157else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025158 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025159sed 's/^/| /' conftest.$ac_ext >&5
25160
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025161 ac_cv_c_bigendian=no
Guido van Rossumef2255b2000-03-10 22:30:29 +000025162fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025163
25164rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Guido van Rossumef2255b2000-03-10 22:30:29 +000025165else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025166 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025167sed 's/^/| /' conftest.$ac_ext >&5
25168
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025169
25170fi
25171
25172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25173 fi
25174 if test $ac_cv_c_bigendian = unknown; then
25175 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
25176 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025177/* confdefs.h. */
25178_ACEOF
25179cat confdefs.h >>conftest.$ac_ext
25180cat >>conftest.$ac_ext <<_ACEOF
25181/* end confdefs.h. */
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025182#include <limits.h>
25183
Martin v. Löwis11437992002-04-12 09:54:03 +000025184int
25185main ()
25186{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025187#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
25188 bogus endian macros
25189 #endif
25190
Martin v. Löwis11437992002-04-12 09:54:03 +000025191 ;
25192 return 0;
25193}
25194_ACEOF
25195rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025196if { (ac_try="$ac_compile"
25197case "(($ac_try" in
25198 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25199 *) ac_try_echo=$ac_try;;
25200esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025201eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25202$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025203 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025204 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025205 grep -v '^ *+' conftest.er1 >conftest.err
25206 rm -f conftest.er1
25207 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025208 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025209 (exit $ac_status); } && {
25210 test -z "$ac_c_werror_flag" ||
25211 test ! -s conftest.err
25212 } && test -s conftest.$ac_objext; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025213 # It does; now see whether it defined to _BIG_ENDIAN or not.
25214 cat >conftest.$ac_ext <<_ACEOF
25215/* confdefs.h. */
25216_ACEOF
25217cat confdefs.h >>conftest.$ac_ext
25218cat >>conftest.$ac_ext <<_ACEOF
25219/* end confdefs.h. */
25220#include <limits.h>
25221
25222int
25223main ()
25224{
25225#ifndef _BIG_ENDIAN
25226 not big endian
25227 #endif
25228
25229 ;
25230 return 0;
25231}
25232_ACEOF
25233rm -f conftest.$ac_objext
25234if { (ac_try="$ac_compile"
25235case "(($ac_try" in
25236 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25237 *) ac_try_echo=$ac_try;;
25238esac
25239eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25240$as_echo "$ac_try_echo") >&5
25241 (eval "$ac_compile") 2>conftest.er1
25242 ac_status=$?
25243 grep -v '^ *+' conftest.er1 >conftest.err
25244 rm -f conftest.er1
25245 cat conftest.err >&5
25246 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25247 (exit $ac_status); } && {
25248 test -z "$ac_c_werror_flag" ||
25249 test ! -s conftest.err
25250 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025251 ac_cv_c_bigendian=yes
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025252else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025253 $as_echo "$as_me: failed program was:" >&5
25254sed 's/^/| /' conftest.$ac_ext >&5
25255
25256 ac_cv_c_bigendian=no
25257fi
25258
25259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25260else
25261 $as_echo "$as_me: failed program was:" >&5
25262sed 's/^/| /' conftest.$ac_ext >&5
25263
25264
25265fi
25266
25267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25268 fi
25269 if test $ac_cv_c_bigendian = unknown; then
25270 # Compile a test program.
25271 if test "$cross_compiling" = yes; then
25272 # Try to guess by grepping values from an object file.
25273 cat >conftest.$ac_ext <<_ACEOF
25274/* confdefs.h. */
25275_ACEOF
25276cat confdefs.h >>conftest.$ac_ext
25277cat >>conftest.$ac_ext <<_ACEOF
25278/* end confdefs.h. */
25279short int ascii_mm[] =
25280 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
25281 short int ascii_ii[] =
25282 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
25283 int use_ascii (int i) {
25284 return ascii_mm[i] + ascii_ii[i];
25285 }
25286 short int ebcdic_ii[] =
25287 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
25288 short int ebcdic_mm[] =
25289 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
25290 int use_ebcdic (int i) {
25291 return ebcdic_mm[i] + ebcdic_ii[i];
25292 }
25293 extern int foo;
25294
25295int
25296main ()
25297{
25298return use_ascii (foo) == use_ebcdic (foo);
25299 ;
25300 return 0;
25301}
25302_ACEOF
25303rm -f conftest.$ac_objext
25304if { (ac_try="$ac_compile"
25305case "(($ac_try" in
25306 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25307 *) ac_try_echo=$ac_try;;
25308esac
25309eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25310$as_echo "$ac_try_echo") >&5
25311 (eval "$ac_compile") 2>conftest.er1
25312 ac_status=$?
25313 grep -v '^ *+' conftest.er1 >conftest.err
25314 rm -f conftest.er1
25315 cat conftest.err >&5
25316 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
25317 (exit $ac_status); } && {
25318 test -z "$ac_c_werror_flag" ||
25319 test ! -s conftest.err
25320 } && test -s conftest.$ac_objext; then
25321 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
25322 ac_cv_c_bigendian=yes
25323 fi
25324 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
25325 if test "$ac_cv_c_bigendian" = unknown; then
25326 ac_cv_c_bigendian=no
25327 else
25328 # finding both strings is unlikely to happen, but who knows?
25329 ac_cv_c_bigendian=unknown
25330 fi
25331 fi
25332else
25333 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025334sed 's/^/| /' conftest.$ac_ext >&5
25335
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025336
Martin v. Löwis11437992002-04-12 09:54:03 +000025337fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025338
25339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025340else
25341 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025342/* confdefs.h. */
25343_ACEOF
25344cat confdefs.h >>conftest.$ac_ext
25345cat >>conftest.$ac_ext <<_ACEOF
25346/* end confdefs.h. */
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025347$ac_includes_default
Martin v. Löwis11437992002-04-12 09:54:03 +000025348int
25349main ()
25350{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025351
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025352 /* Are we little or big endian? From Harbison&Steele. */
25353 union
25354 {
25355 long int l;
25356 char c[sizeof (long int)];
25357 } u;
25358 u.l = 1;
25359 return u.c[sizeof (long int) - 1] == 1;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025360
25361 ;
25362 return 0;
Guido van Rossumef2255b2000-03-10 22:30:29 +000025363}
Martin v. Löwis11437992002-04-12 09:54:03 +000025364_ACEOF
25365rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025366if { (ac_try="$ac_link"
25367case "(($ac_try" in
25368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25369 *) ac_try_echo=$ac_try;;
25370esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025371eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25372$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025373 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025374 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025375 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025376 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025377 { (case "(($ac_try" in
25378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25379 *) ac_try_echo=$ac_try;;
25380esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025381eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25382$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025383 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025384 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025385 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025386 (exit $ac_status); }; }; then
Guido van Rossumef2255b2000-03-10 22:30:29 +000025387 ac_cv_c_bigendian=no
25388else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025389 $as_echo "$as_me: program exited with status $ac_status" >&5
25390$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025391sed 's/^/| /' conftest.$ac_ext >&5
25392
Martin v. Löwis11437992002-04-12 09:54:03 +000025393( exit $ac_status )
25394ac_cv_c_bigendian=yes
Guido van Rossumef2255b2000-03-10 22:30:29 +000025395fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025396rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025397rm -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 +000025398fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025399
25400
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025401 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000025402fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025403{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
25404$as_echo "$ac_cv_c_bigendian" >&6; }
25405 case $ac_cv_c_bigendian in #(
25406 yes)
25407 cat >>confdefs.h <<\_ACEOF
Alexandre Vassalotti19142282009-07-17 23:11:52 +000025408#define WORDS_BIGENDIAN 1
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000025409_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025410;; #(
25411 no)
25412 ;; #(
25413 universal)
25414
25415cat >>confdefs.h <<\_ACEOF
25416#define AC_APPLE_UNIVERSAL_BUILD 1
25417_ACEOF
25418
25419 ;; #(
25420 *)
25421 { { $as_echo "$as_me:$LINENO: error: unknown endianness
25422 presetting ac_cv_c_bigendian=no (or yes) will help" >&5
25423$as_echo "$as_me: error: unknown endianness
25424 presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000025425 { (exit 1); exit 1; }; } ;;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025426 esac
Guido van Rossumef2255b2000-03-10 22:30:29 +000025427
Michael W. Hudson54241132001-12-07 15:38:26 +000025428
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025429# Check whether right shifting a negative integer extends the sign bit
25430# or fills with zeros (like the Cray J90, according to Tim Peters).
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025431{ $as_echo "$as_me:$LINENO: checking whether right shift extends the sign bit" >&5
25432$as_echo_n "checking whether right shift extends the sign bit... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025433if test "${ac_cv_rshift_extends_sign+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025434 $as_echo_n "(cached) " >&6
Vladimir Marangozova6180282000-07-12 05:05:06 +000025435else
Martin v. Löwis11437992002-04-12 09:54:03 +000025436
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025437if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000025438 ac_cv_rshift_extends_sign=yes
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025439else
Martin v. Löwis11437992002-04-12 09:54:03 +000025440 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025441/* confdefs.h. */
25442_ACEOF
25443cat confdefs.h >>conftest.$ac_ext
25444cat >>conftest.$ac_ext <<_ACEOF
25445/* end confdefs.h. */
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025446
25447int main()
25448{
Vladimir Marangozova6180282000-07-12 05:05:06 +000025449 exit(((-1)>>3 == -1) ? 0 : 1);
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025450}
25451
Martin v. Löwis11437992002-04-12 09:54:03 +000025452_ACEOF
25453rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025454if { (ac_try="$ac_link"
25455case "(($ac_try" in
25456 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25457 *) ac_try_echo=$ac_try;;
25458esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025459eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25460$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025461 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025462 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025463 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025464 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025465 { (case "(($ac_try" in
25466 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25467 *) ac_try_echo=$ac_try;;
25468esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025469eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25470$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025471 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025472 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025473 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000025474 (exit $ac_status); }; }; then
Vladimir Marangozova6180282000-07-12 05:05:06 +000025475 ac_cv_rshift_extends_sign=yes
25476else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025477 $as_echo "$as_me: program exited with status $ac_status" >&5
25478$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025479sed 's/^/| /' conftest.$ac_ext >&5
25480
Martin v. Löwis11437992002-04-12 09:54:03 +000025481( exit $ac_status )
25482ac_cv_rshift_extends_sign=no
Vladimir Marangozova6180282000-07-12 05:05:06 +000025483fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025484rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025485rm -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 +000025486fi
25487
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025488
25489fi
25490
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025491{ $as_echo "$as_me:$LINENO: result: $ac_cv_rshift_extends_sign" >&5
25492$as_echo "$ac_cv_rshift_extends_sign" >&6; }
Vladimir Marangozova6180282000-07-12 05:05:06 +000025493if test "$ac_cv_rshift_extends_sign" = no
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025494then
Martin v. Löwis11437992002-04-12 09:54:03 +000025495
25496cat >>confdefs.h <<\_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025497#define SIGNED_RIGHT_SHIFT_ZERO_FILLS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025498_ACEOF
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025499
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025500fi
25501
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025502# check for getc_unlocked and related locking functions
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025503{ $as_echo "$as_me:$LINENO: checking for getc_unlocked() and friends" >&5
25504$as_echo_n "checking for getc_unlocked() and friends... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025505if test "${ac_cv_have_getc_unlocked+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025506 $as_echo_n "(cached) " >&6
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025507else
Martin v. Löwis11437992002-04-12 09:54:03 +000025508
25509cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025510/* confdefs.h. */
25511_ACEOF
25512cat confdefs.h >>conftest.$ac_ext
25513cat >>conftest.$ac_ext <<_ACEOF
25514/* end confdefs.h. */
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025515#include <stdio.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000025516int
25517main ()
25518{
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025519
25520 FILE *f = fopen("/dev/null", "r");
25521 flockfile(f);
25522 getc_unlocked(f);
25523 funlockfile(f);
25524
Martin v. Löwis11437992002-04-12 09:54:03 +000025525 ;
25526 return 0;
25527}
25528_ACEOF
25529rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025530if { (ac_try="$ac_link"
25531case "(($ac_try" in
25532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25533 *) ac_try_echo=$ac_try;;
25534esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025535eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25536$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025537 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025538 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025539 grep -v '^ *+' conftest.er1 >conftest.err
25540 rm -f conftest.er1
25541 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025542 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025543 (exit $ac_status); } && {
25544 test -z "$ac_c_werror_flag" ||
25545 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025546 } && test -s conftest$ac_exeext && {
25547 test "$cross_compiling" = yes ||
25548 $as_test_x conftest$ac_exeext
25549 }; then
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025550 ac_cv_have_getc_unlocked=yes
25551else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025552 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025553sed 's/^/| /' conftest.$ac_ext >&5
25554
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025555 ac_cv_have_getc_unlocked=no
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025556fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025557
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025558rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025559rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025560 conftest$ac_exeext conftest.$ac_ext
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025561fi
25562
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025563{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_getc_unlocked" >&5
25564$as_echo "$ac_cv_have_getc_unlocked" >&6; }
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025565if test "$ac_cv_have_getc_unlocked" = yes
25566then
Martin v. Löwis11437992002-04-12 09:54:03 +000025567
25568cat >>confdefs.h <<\_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025569#define HAVE_GETC_UNLOCKED 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025570_ACEOF
Guido van Rossumcadfaec2001-01-05 14:45:49 +000025571
25572fi
Vladimir Marangozov676aa882000-07-12 03:02:43 +000025573
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025574# check where readline lives
Martin v. Löwis82bca632006-02-10 20:49:30 +000025575# save the value of LIBS so we don't actually link Python with readline
25576LIBS_no_readline=$LIBS
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025577
Gregory P. Smith18820942008-09-07 06:24:49 +000025578# On some systems we need to link readline to a termcap compatible
25579# library. NOTE: Keep the precedence of listed libraries synchronised
25580# with setup.py.
25581py_cv_lib_readline=no
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025582{ $as_echo "$as_me:$LINENO: checking how to link readline libs" >&5
25583$as_echo_n "checking how to link readline libs... " >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025584for py_libtermcap in "" ncursesw ncurses curses termcap; do
25585 if test -z "$py_libtermcap"; then
25586 READLINE_LIBS="-lreadline"
25587 else
25588 READLINE_LIBS="-lreadline -l$py_libtermcap"
25589 fi
25590 LIBS="$READLINE_LIBS $LIBS_no_readline"
25591 cat >conftest.$ac_ext <<_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025592/* confdefs.h. */
25593_ACEOF
25594cat confdefs.h >>conftest.$ac_ext
25595cat >>conftest.$ac_ext <<_ACEOF
25596/* end confdefs.h. */
25597
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025598/* Override any GCC internal prototype to avoid an error.
25599 Use char because int might match the return type of a GCC
25600 builtin and then its argument prototype would still apply. */
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025601#ifdef __cplusplus
25602extern "C"
25603#endif
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025604char readline ();
25605int
25606main ()
25607{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025608return readline ();
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025609 ;
25610 return 0;
25611}
25612_ACEOF
25613rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025614if { (ac_try="$ac_link"
25615case "(($ac_try" in
25616 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25617 *) ac_try_echo=$ac_try;;
25618esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025619eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25620$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025621 (eval "$ac_link") 2>conftest.er1
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025622 ac_status=$?
25623 grep -v '^ *+' conftest.er1 >conftest.err
25624 rm -f conftest.er1
25625 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025626 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025627 (exit $ac_status); } && {
25628 test -z "$ac_c_werror_flag" ||
25629 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025630 } && test -s conftest$ac_exeext && {
25631 test "$cross_compiling" = yes ||
25632 $as_test_x conftest$ac_exeext
25633 }; then
Gregory P. Smith18820942008-09-07 06:24:49 +000025634 py_cv_lib_readline=yes
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025635else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025636 $as_echo "$as_me: failed program was:" >&5
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025637sed 's/^/| /' conftest.$ac_ext >&5
25638
Gregory P. Smith18820942008-09-07 06:24:49 +000025639
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025640fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025641
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025642rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025643rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025644 conftest$ac_exeext conftest.$ac_ext
Gregory P. Smith18820942008-09-07 06:24:49 +000025645 if test $py_cv_lib_readline = yes; then
25646 break
25647 fi
25648done
25649# Uncomment this line if you want to use READINE_LIBS in Makefile or scripts
25650#AC_SUBST([READLINE_LIBS])
Gregory P. Smith3856c372008-09-07 19:24:00 +000025651if test $py_cv_lib_readline = no; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025652 { $as_echo "$as_me:$LINENO: result: none" >&5
25653$as_echo "none" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025654else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025655 { $as_echo "$as_me:$LINENO: result: $READLINE_LIBS" >&5
25656$as_echo "$READLINE_LIBS" >&6; }
Gregory P. Smith18820942008-09-07 06:24:49 +000025657
25658cat >>confdefs.h <<\_ACEOF
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025659#define HAVE_LIBREADLINE 1
25660_ACEOF
25661
Neal Norwitzfe8e3d92006-01-07 21:07:20 +000025662fi
25663
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025664# check for readline 2.1
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025665{ $as_echo "$as_me:$LINENO: checking for rl_callback_handler_install in -lreadline" >&5
25666$as_echo_n "checking for rl_callback_handler_install in -lreadline... " >&6; }
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025667if test "${ac_cv_lib_readline_rl_callback_handler_install+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025668 $as_echo_n "(cached) " >&6
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025669else
25670 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025671LIBS="-lreadline $READLINE_LIBS $LIBS"
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025672cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025673/* confdefs.h. */
25674_ACEOF
25675cat confdefs.h >>conftest.$ac_ext
25676cat >>conftest.$ac_ext <<_ACEOF
25677/* end confdefs.h. */
25678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025679/* Override any GCC internal prototype to avoid an error.
25680 Use char because int might match the return type of a GCC
25681 builtin and then its argument prototype would still apply. */
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025682#ifdef __cplusplus
25683extern "C"
25684#endif
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025685char rl_callback_handler_install ();
25686int
25687main ()
25688{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025689return rl_callback_handler_install ();
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025690 ;
25691 return 0;
25692}
25693_ACEOF
25694rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025695if { (ac_try="$ac_link"
25696case "(($ac_try" in
25697 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25698 *) ac_try_echo=$ac_try;;
25699esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025700eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25701$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025702 (eval "$ac_link") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025703 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025704 grep -v '^ *+' conftest.er1 >conftest.err
25705 rm -f conftest.er1
25706 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025707 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025708 (exit $ac_status); } && {
25709 test -z "$ac_c_werror_flag" ||
25710 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025711 } && test -s conftest$ac_exeext && {
25712 test "$cross_compiling" = yes ||
25713 $as_test_x conftest$ac_exeext
25714 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025715 ac_cv_lib_readline_rl_callback_handler_install=yes
25716else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025717 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025718sed 's/^/| /' conftest.$ac_ext >&5
25719
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025720 ac_cv_lib_readline_rl_callback_handler_install=no
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025721fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025722
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025723rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025724rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025725 conftest$ac_exeext conftest.$ac_ext
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025726LIBS=$ac_check_lib_save_LIBS
25727fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025728{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_callback_handler_install" >&5
25729$as_echo "$ac_cv_lib_readline_rl_callback_handler_install" >&6; }
25730if test "x$ac_cv_lib_readline_rl_callback_handler_install" = x""yes; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000025731
25732cat >>confdefs.h <<\_ACEOF
25733#define HAVE_RL_CALLBACK 1
25734_ACEOF
25735
25736fi
25737
25738
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025739# check for readline 2.2
25740cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025741/* confdefs.h. */
25742_ACEOF
25743cat confdefs.h >>conftest.$ac_ext
25744cat >>conftest.$ac_ext <<_ACEOF
25745/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025746#include <readline/readline.h>
25747_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025748if { (ac_try="$ac_cpp conftest.$ac_ext"
25749case "(($ac_try" in
25750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25751 *) ac_try_echo=$ac_try;;
25752esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025753eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25754$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025755 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025756 ac_status=$?
Skip Montanaro6dead952003-09-25 14:50:04 +000025757 grep -v '^ *+' conftest.er1 >conftest.err
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025758 rm -f conftest.er1
25759 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025760 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025761 (exit $ac_status); } >/dev/null && {
25762 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
25763 test ! -s conftest.err
25764 }; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025765 have_readline=yes
25766else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025767 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025768sed 's/^/| /' conftest.$ac_ext >&5
25769
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025770 have_readline=no
25771fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025772
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025773rm -f conftest.err conftest.$ac_ext
25774if test $have_readline = yes
25775then
25776 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025777/* confdefs.h. */
25778_ACEOF
25779cat confdefs.h >>conftest.$ac_ext
25780cat >>conftest.$ac_ext <<_ACEOF
25781/* end confdefs.h. */
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025782#include <readline/readline.h>
25783
25784_ACEOF
25785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Skip Montanaro6dead952003-09-25 14:50:04 +000025786 $EGREP "extern int rl_completion_append_character;" >/dev/null 2>&1; then
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025787
25788cat >>confdefs.h <<\_ACEOF
25789#define HAVE_RL_COMPLETION_APPEND_CHARACTER 1
25790_ACEOF
25791
25792fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025793rm -f conftest*
Guido van Rossumfaf5e4d2002-12-30 16:25:41 +000025794
25795fi
25796
Martin v. Löwis0daad592001-09-30 21:09:59 +000025797# check for readline 4.0
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025798{ $as_echo "$as_me:$LINENO: checking for rl_pre_input_hook in -lreadline" >&5
25799$as_echo_n "checking for rl_pre_input_hook in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025800if test "${ac_cv_lib_readline_rl_pre_input_hook+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025801 $as_echo_n "(cached) " >&6
Guido van Rossum353ae582001-07-10 16:45:32 +000025802else
Martin v. Löwis11437992002-04-12 09:54:03 +000025803 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025804LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025805cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025806/* confdefs.h. */
25807_ACEOF
25808cat confdefs.h >>conftest.$ac_ext
25809cat >>conftest.$ac_ext <<_ACEOF
25810/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025811
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025812/* Override any GCC internal prototype to avoid an error.
25813 Use char because int might match the return type of a GCC
25814 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025815#ifdef __cplusplus
25816extern "C"
25817#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025818char rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025819int
25820main ()
25821{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025822return rl_pre_input_hook ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025823 ;
25824 return 0;
25825}
25826_ACEOF
25827rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025828if { (ac_try="$ac_link"
25829case "(($ac_try" in
25830 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25831 *) ac_try_echo=$ac_try;;
25832esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025833eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25834$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025835 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025836 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025837 grep -v '^ *+' conftest.er1 >conftest.err
25838 rm -f conftest.er1
25839 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025840 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025841 (exit $ac_status); } && {
25842 test -z "$ac_c_werror_flag" ||
25843 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025844 } && test -s conftest$ac_exeext && {
25845 test "$cross_compiling" = yes ||
25846 $as_test_x conftest$ac_exeext
25847 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025848 ac_cv_lib_readline_rl_pre_input_hook=yes
Martin v. Löwis0daad592001-09-30 21:09:59 +000025849else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025850 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000025851sed 's/^/| /' conftest.$ac_ext >&5
25852
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025853 ac_cv_lib_readline_rl_pre_input_hook=no
Martin v. Löwis0daad592001-09-30 21:09:59 +000025854fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025855
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025856rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025857rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000025858 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000025859LIBS=$ac_check_lib_save_LIBS
25860fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025861{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_pre_input_hook" >&5
25862$as_echo "$ac_cv_lib_readline_rl_pre_input_hook" >&6; }
25863if test "x$ac_cv_lib_readline_rl_pre_input_hook" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000025864
Martin v. Löwis11437992002-04-12 09:54:03 +000025865cat >>confdefs.h <<\_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025866#define HAVE_RL_PRE_INPUT_HOOK 1
Martin v. Löwis11437992002-04-12 09:54:03 +000025867_ACEOF
Martin v. Löwis0daad592001-09-30 21:09:59 +000025868
Martin v. Löwis0daad592001-09-30 21:09:59 +000025869fi
25870
Michael W. Hudson54241132001-12-07 15:38:26 +000025871
Thomas Wouters89d996e2007-09-08 17:39:28 +000025872# also in 4.0
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025873{ $as_echo "$as_me:$LINENO: checking for rl_completion_display_matches_hook in -lreadline" >&5
25874$as_echo_n "checking for rl_completion_display_matches_hook in -lreadline... " >&6; }
Thomas Wouters89d996e2007-09-08 17:39:28 +000025875if test "${ac_cv_lib_readline_rl_completion_display_matches_hook+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025876 $as_echo_n "(cached) " >&6
Thomas Wouters89d996e2007-09-08 17:39:28 +000025877else
25878 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025879LIBS="-lreadline $READLINE_LIBS $LIBS"
Thomas Wouters89d996e2007-09-08 17:39:28 +000025880cat >conftest.$ac_ext <<_ACEOF
25881/* confdefs.h. */
25882_ACEOF
25883cat confdefs.h >>conftest.$ac_ext
25884cat >>conftest.$ac_ext <<_ACEOF
25885/* end confdefs.h. */
25886
25887/* Override any GCC internal prototype to avoid an error.
25888 Use char because int might match the return type of a GCC
25889 builtin and then its argument prototype would still apply. */
25890#ifdef __cplusplus
25891extern "C"
25892#endif
25893char rl_completion_display_matches_hook ();
25894int
25895main ()
25896{
25897return rl_completion_display_matches_hook ();
25898 ;
25899 return 0;
25900}
25901_ACEOF
25902rm -f conftest.$ac_objext conftest$ac_exeext
25903if { (ac_try="$ac_link"
25904case "(($ac_try" in
25905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25906 *) ac_try_echo=$ac_try;;
25907esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025908eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25909$as_echo "$ac_try_echo") >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025910 (eval "$ac_link") 2>conftest.er1
25911 ac_status=$?
25912 grep -v '^ *+' conftest.er1 >conftest.err
25913 rm -f conftest.er1
25914 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025915 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025916 (exit $ac_status); } && {
25917 test -z "$ac_c_werror_flag" ||
25918 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025919 } && test -s conftest$ac_exeext && {
25920 test "$cross_compiling" = yes ||
25921 $as_test_x conftest$ac_exeext
25922 }; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025923 ac_cv_lib_readline_rl_completion_display_matches_hook=yes
25924else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025925 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters89d996e2007-09-08 17:39:28 +000025926sed 's/^/| /' conftest.$ac_ext >&5
25927
25928 ac_cv_lib_readline_rl_completion_display_matches_hook=no
25929fi
25930
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025931rm -rf conftest.dSYM
Thomas Wouters89d996e2007-09-08 17:39:28 +000025932rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
25933 conftest$ac_exeext conftest.$ac_ext
25934LIBS=$ac_check_lib_save_LIBS
25935fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025936{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_display_matches_hook" >&5
25937$as_echo "$ac_cv_lib_readline_rl_completion_display_matches_hook" >&6; }
25938if test "x$ac_cv_lib_readline_rl_completion_display_matches_hook" = x""yes; then
Thomas Wouters89d996e2007-09-08 17:39:28 +000025939
25940cat >>confdefs.h <<\_ACEOF
25941#define HAVE_RL_COMPLETION_DISPLAY_MATCHES_HOOK 1
25942_ACEOF
25943
25944fi
25945
25946
Martin v. Löwis0daad592001-09-30 21:09:59 +000025947# check for readline 4.2
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025948{ $as_echo "$as_me:$LINENO: checking for rl_completion_matches in -lreadline" >&5
25949$as_echo_n "checking for rl_completion_matches in -lreadline... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000025950if test "${ac_cv_lib_readline_rl_completion_matches+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025951 $as_echo_n "(cached) " >&6
Martin v. Löwis0daad592001-09-30 21:09:59 +000025952else
Martin v. Löwis11437992002-04-12 09:54:03 +000025953 ac_check_lib_save_LIBS=$LIBS
Gregory P. Smith18820942008-09-07 06:24:49 +000025954LIBS="-lreadline $READLINE_LIBS $LIBS"
Martin v. Löwis11437992002-04-12 09:54:03 +000025955cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000025956/* confdefs.h. */
25957_ACEOF
25958cat confdefs.h >>conftest.$ac_ext
25959cat >>conftest.$ac_ext <<_ACEOF
25960/* end confdefs.h. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025961
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025962/* Override any GCC internal prototype to avoid an error.
25963 Use char because int might match the return type of a GCC
25964 builtin and then its argument prototype would still apply. */
Martin v. Löwis11437992002-04-12 09:54:03 +000025965#ifdef __cplusplus
25966extern "C"
25967#endif
Martin v. Löwis11437992002-04-12 09:54:03 +000025968char rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025969int
25970main ()
25971{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025972return rl_completion_matches ();
Martin v. Löwis11437992002-04-12 09:54:03 +000025973 ;
25974 return 0;
25975}
25976_ACEOF
25977rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025978if { (ac_try="$ac_link"
25979case "(($ac_try" in
25980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25981 *) ac_try_echo=$ac_try;;
25982esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025983eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
25984$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025985 (eval "$ac_link") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000025986 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000025987 grep -v '^ *+' conftest.er1 >conftest.err
25988 rm -f conftest.er1
25989 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025990 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000025991 (exit $ac_status); } && {
25992 test -z "$ac_c_werror_flag" ||
25993 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000025994 } && test -s conftest$ac_exeext && {
25995 test "$cross_compiling" = yes ||
25996 $as_test_x conftest$ac_exeext
25997 }; then
Martin v. Löwis11437992002-04-12 09:54:03 +000025998 ac_cv_lib_readline_rl_completion_matches=yes
Guido van Rossum353ae582001-07-10 16:45:32 +000025999else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026000 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026001sed 's/^/| /' conftest.$ac_ext >&5
26002
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026003 ac_cv_lib_readline_rl_completion_matches=no
Guido van Rossum353ae582001-07-10 16:45:32 +000026004fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026005
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026006rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026007rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Skip Montanarof0d5f792004-08-15 14:08:23 +000026008 conftest$ac_exeext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000026009LIBS=$ac_check_lib_save_LIBS
26010fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026011{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_readline_rl_completion_matches" >&5
26012$as_echo "$ac_cv_lib_readline_rl_completion_matches" >&6; }
26013if test "x$ac_cv_lib_readline_rl_completion_matches" = x""yes; then
Michael W. Hudson54241132001-12-07 15:38:26 +000026014
Martin v. Löwis11437992002-04-12 09:54:03 +000026015cat >>confdefs.h <<\_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026016#define HAVE_RL_COMPLETION_MATCHES 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026017_ACEOF
Guido van Rossum353ae582001-07-10 16:45:32 +000026018
Guido van Rossum353ae582001-07-10 16:45:32 +000026019fi
26020
Jack Jansendd19cf82001-12-06 22:36:17 +000026021
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026022# also in readline 4.2
26023cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026024/* confdefs.h. */
26025_ACEOF
26026cat confdefs.h >>conftest.$ac_ext
26027cat >>conftest.$ac_ext <<_ACEOF
26028/* end confdefs.h. */
26029#include <readline/readline.h>
26030_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026031if { (ac_try="$ac_cpp conftest.$ac_ext"
26032case "(($ac_try" in
26033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26034 *) ac_try_echo=$ac_try;;
26035esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026036eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26037$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026038 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026039 ac_status=$?
26040 grep -v '^ *+' conftest.er1 >conftest.err
26041 rm -f conftest.er1
26042 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026043 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026044 (exit $ac_status); } >/dev/null && {
26045 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
26046 test ! -s conftest.err
26047 }; then
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026048 have_readline=yes
26049else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026050 $as_echo "$as_me: failed program was:" >&5
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026051sed 's/^/| /' conftest.$ac_ext >&5
26052
26053 have_readline=no
26054fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026055
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026056rm -f conftest.err conftest.$ac_ext
26057if test $have_readline = yes
26058then
26059 cat >conftest.$ac_ext <<_ACEOF
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026060/* confdefs.h. */
26061_ACEOF
26062cat confdefs.h >>conftest.$ac_ext
26063cat >>conftest.$ac_ext <<_ACEOF
26064/* end confdefs.h. */
26065#include <readline/readline.h>
26066
26067_ACEOF
26068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26069 $EGREP "extern int rl_catch_signals;" >/dev/null 2>&1; then
26070
26071cat >>confdefs.h <<\_ACEOF
26072#define HAVE_RL_CATCH_SIGNAL 1
26073_ACEOF
26074
26075fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026076rm -f conftest*
Michael W. Hudson30ea2f22004-07-07 17:44:12 +000026077
26078fi
26079
Martin v. Löwis82bca632006-02-10 20:49:30 +000026080# End of readline checks: restore LIBS
26081LIBS=$LIBS_no_readline
26082
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026083{ $as_echo "$as_me:$LINENO: checking for broken nice()" >&5
26084$as_echo_n "checking for broken nice()... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026085if test "${ac_cv_broken_nice+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026086 $as_echo_n "(cached) " >&6
Michael W. Hudson54241132001-12-07 15:38:26 +000026087else
Martin v. Löwis11437992002-04-12 09:54:03 +000026088
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026089if test "$cross_compiling" = yes; then
Guido van Rossum3065c942001-09-17 04:03:14 +000026090 ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026091else
Martin v. Löwis11437992002-04-12 09:54:03 +000026092 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026093/* confdefs.h. */
26094_ACEOF
26095cat confdefs.h >>conftest.$ac_ext
26096cat >>conftest.$ac_ext <<_ACEOF
26097/* end confdefs.h. */
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026098
26099int main()
26100{
26101 int val1 = nice(1);
26102 if (val1 != -1 && val1 == nice(2))
26103 exit(0);
26104 exit(1);
26105}
26106
Martin v. Löwis11437992002-04-12 09:54:03 +000026107_ACEOF
26108rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026109if { (ac_try="$ac_link"
26110case "(($ac_try" in
26111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26112 *) ac_try_echo=$ac_try;;
26113esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026114eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26115$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026116 (eval "$ac_link") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026117 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026118 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026119 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026120 { (case "(($ac_try" in
26121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26122 *) ac_try_echo=$ac_try;;
26123esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026124eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26125$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026126 (eval "$ac_try") 2>&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026127 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026128 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000026129 (exit $ac_status); }; }; then
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026130 ac_cv_broken_nice=yes
26131else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026132 $as_echo "$as_me: program exited with status $ac_status" >&5
26133$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026134sed 's/^/| /' conftest.$ac_ext >&5
26135
Martin v. Löwis11437992002-04-12 09:54:03 +000026136( exit $ac_status )
26137ac_cv_broken_nice=no
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026138fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026139rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026140rm -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 +000026141fi
26142
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026143
26144fi
26145
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026146{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_nice" >&5
26147$as_echo "$ac_cv_broken_nice" >&6; }
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026148if test "$ac_cv_broken_nice" = yes
26149then
Martin v. Löwis11437992002-04-12 09:54:03 +000026150
26151cat >>confdefs.h <<\_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026152#define HAVE_BROKEN_NICE 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026153_ACEOF
Thomas Wouterse38b2f12001-07-11 22:35:31 +000026154
26155fi
26156
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026157{ $as_echo "$as_me:$LINENO: checking for broken poll()" >&5
26158$as_echo_n "checking for broken poll()... " >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026159if test "${ac_cv_broken_poll+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026160 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026161else
26162 if test "$cross_compiling" = yes; then
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026163 ac_cv_broken_poll=no
26164else
26165 cat >conftest.$ac_ext <<_ACEOF
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026166/* confdefs.h. */
26167_ACEOF
26168cat confdefs.h >>conftest.$ac_ext
26169cat >>conftest.$ac_ext <<_ACEOF
26170/* end confdefs.h. */
26171
26172#include <poll.h>
26173
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026174int main()
26175{
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026176 struct pollfd poll_struct = { 42, POLLIN|POLLPRI|POLLOUT, 0 };
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026177 int poll_test;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026178
26179 close (42);
26180
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026181 poll_test = poll(&poll_struct, 1, 0);
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026182 if (poll_test < 0)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026183 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026184 else if (poll_test == 0 && poll_struct.revents != POLLNVAL)
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026185 return 0;
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026186 else
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026187 return 1;
26188}
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026189
26190_ACEOF
26191rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026192if { (ac_try="$ac_link"
26193case "(($ac_try" in
26194 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26195 *) ac_try_echo=$ac_try;;
26196esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026197eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26198$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026199 (eval "$ac_link") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026200 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026201 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026202 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026203 { (case "(($ac_try" in
26204 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26205 *) ac_try_echo=$ac_try;;
26206esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026207eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26208$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026209 (eval "$ac_try") 2>&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026210 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026211 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026212 (exit $ac_status); }; }; then
26213 ac_cv_broken_poll=yes
26214else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026215 $as_echo "$as_me: program exited with status $ac_status" >&5
26216$as_echo "$as_me: failed program was:" >&5
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026217sed 's/^/| /' conftest.$ac_ext >&5
26218
26219( exit $ac_status )
26220ac_cv_broken_poll=no
26221fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026222rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026223rm -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 +000026224fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026225
26226
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000026227fi
26228
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026229{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_poll" >&5
26230$as_echo "$ac_cv_broken_poll" >&6; }
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026231if test "$ac_cv_broken_poll" = yes
26232then
26233
26234cat >>confdefs.h <<\_ACEOF
26235#define HAVE_BROKEN_POLL 1
26236_ACEOF
26237
26238fi
26239
Brett Cannon43802422005-02-10 20:48:03 +000026240# 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 +000026241# (which is not required by ISO C or UNIX spec) and/or if we support
26242# tzname[]
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026243{ $as_echo "$as_me:$LINENO: checking for struct tm.tm_zone" >&5
26244$as_echo_n "checking for struct tm.tm_zone... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026245if test "${ac_cv_member_struct_tm_tm_zone+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026246 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000026247else
26248 cat >conftest.$ac_ext <<_ACEOF
26249/* confdefs.h. */
26250_ACEOF
26251cat confdefs.h >>conftest.$ac_ext
26252cat >>conftest.$ac_ext <<_ACEOF
26253/* end confdefs.h. */
26254#include <sys/types.h>
26255#include <$ac_cv_struct_tm>
26256
26257
26258int
26259main ()
26260{
26261static struct tm ac_aggr;
26262if (ac_aggr.tm_zone)
26263return 0;
26264 ;
26265 return 0;
26266}
26267_ACEOF
26268rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026269if { (ac_try="$ac_compile"
26270case "(($ac_try" in
26271 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26272 *) ac_try_echo=$ac_try;;
26273esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026274eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26275$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026276 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026277 ac_status=$?
26278 grep -v '^ *+' conftest.er1 >conftest.err
26279 rm -f conftest.er1
26280 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026281 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026282 (exit $ac_status); } && {
26283 test -z "$ac_c_werror_flag" ||
26284 test ! -s conftest.err
26285 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026286 ac_cv_member_struct_tm_tm_zone=yes
26287else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026288 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026289sed 's/^/| /' conftest.$ac_ext >&5
26290
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026291 cat >conftest.$ac_ext <<_ACEOF
Brett Cannon43802422005-02-10 20:48:03 +000026292/* confdefs.h. */
26293_ACEOF
26294cat confdefs.h >>conftest.$ac_ext
26295cat >>conftest.$ac_ext <<_ACEOF
26296/* end confdefs.h. */
26297#include <sys/types.h>
26298#include <$ac_cv_struct_tm>
26299
26300
26301int
26302main ()
26303{
26304static struct tm ac_aggr;
26305if (sizeof ac_aggr.tm_zone)
26306return 0;
26307 ;
26308 return 0;
26309}
26310_ACEOF
26311rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026312if { (ac_try="$ac_compile"
26313case "(($ac_try" in
26314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26315 *) ac_try_echo=$ac_try;;
26316esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026317eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26318$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026319 (eval "$ac_compile") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026320 ac_status=$?
26321 grep -v '^ *+' conftest.er1 >conftest.err
26322 rm -f conftest.er1
26323 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026324 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026325 (exit $ac_status); } && {
26326 test -z "$ac_c_werror_flag" ||
26327 test ! -s conftest.err
26328 } && test -s conftest.$ac_objext; then
Brett Cannon43802422005-02-10 20:48:03 +000026329 ac_cv_member_struct_tm_tm_zone=yes
26330else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026331 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026332sed 's/^/| /' conftest.$ac_ext >&5
26333
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026334 ac_cv_member_struct_tm_tm_zone=no
Brett Cannon43802422005-02-10 20:48:03 +000026335fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026336
26337rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026338fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026339
26340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Brett Cannon43802422005-02-10 20:48:03 +000026341fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026342{ $as_echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_zone" >&5
26343$as_echo "$ac_cv_member_struct_tm_tm_zone" >&6; }
26344if test "x$ac_cv_member_struct_tm_tm_zone" = x""yes; then
Brett Cannon43802422005-02-10 20:48:03 +000026345
26346cat >>confdefs.h <<_ACEOF
26347#define HAVE_STRUCT_TM_TM_ZONE 1
26348_ACEOF
26349
26350
26351fi
26352
26353if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
26354
26355cat >>confdefs.h <<\_ACEOF
26356#define HAVE_TM_ZONE 1
26357_ACEOF
26358
26359else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026360 { $as_echo "$as_me:$LINENO: checking whether tzname is declared" >&5
26361$as_echo_n "checking whether tzname is declared... " >&6; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026362if test "${ac_cv_have_decl_tzname+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026363 $as_echo_n "(cached) " >&6
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026364else
26365 cat >conftest.$ac_ext <<_ACEOF
26366/* confdefs.h. */
26367_ACEOF
26368cat confdefs.h >>conftest.$ac_ext
26369cat >>conftest.$ac_ext <<_ACEOF
26370/* end confdefs.h. */
26371#include <time.h>
26372
26373int
26374main ()
26375{
26376#ifndef tzname
26377 (void) tzname;
26378#endif
26379
26380 ;
26381 return 0;
26382}
26383_ACEOF
26384rm -f conftest.$ac_objext
26385if { (ac_try="$ac_compile"
26386case "(($ac_try" in
26387 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26388 *) ac_try_echo=$ac_try;;
26389esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026390eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26391$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026392 (eval "$ac_compile") 2>conftest.er1
26393 ac_status=$?
26394 grep -v '^ *+' conftest.er1 >conftest.err
26395 rm -f conftest.er1
26396 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026397 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026398 (exit $ac_status); } && {
26399 test -z "$ac_c_werror_flag" ||
26400 test ! -s conftest.err
26401 } && test -s conftest.$ac_objext; then
26402 ac_cv_have_decl_tzname=yes
26403else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026404 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026405sed 's/^/| /' conftest.$ac_ext >&5
26406
26407 ac_cv_have_decl_tzname=no
26408fi
26409
26410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26411fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026412{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_decl_tzname" >&5
26413$as_echo "$ac_cv_have_decl_tzname" >&6; }
26414if test "x$ac_cv_have_decl_tzname" = x""yes; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026415
26416cat >>confdefs.h <<_ACEOF
26417#define HAVE_DECL_TZNAME 1
26418_ACEOF
26419
26420
26421else
26422 cat >>confdefs.h <<_ACEOF
26423#define HAVE_DECL_TZNAME 0
26424_ACEOF
26425
26426
26427fi
26428
26429
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026430 { $as_echo "$as_me:$LINENO: checking for tzname" >&5
26431$as_echo_n "checking for tzname... " >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026432if test "${ac_cv_var_tzname+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026433 $as_echo_n "(cached) " >&6
Brett Cannon43802422005-02-10 20:48:03 +000026434else
26435 cat >conftest.$ac_ext <<_ACEOF
26436/* confdefs.h. */
26437_ACEOF
26438cat confdefs.h >>conftest.$ac_ext
26439cat >>conftest.$ac_ext <<_ACEOF
26440/* end confdefs.h. */
26441#include <time.h>
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026442#if !HAVE_DECL_TZNAME
26443extern char *tzname[];
Brett Cannon43802422005-02-10 20:48:03 +000026444#endif
26445
26446int
26447main ()
26448{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026449return tzname[0][0];
Brett Cannon43802422005-02-10 20:48:03 +000026450 ;
26451 return 0;
26452}
26453_ACEOF
26454rm -f conftest.$ac_objext conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026455if { (ac_try="$ac_link"
26456case "(($ac_try" in
26457 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26458 *) ac_try_echo=$ac_try;;
26459esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026460eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26461$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026462 (eval "$ac_link") 2>conftest.er1
Brett Cannon43802422005-02-10 20:48:03 +000026463 ac_status=$?
26464 grep -v '^ *+' conftest.er1 >conftest.err
26465 rm -f conftest.er1
26466 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026467 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026468 (exit $ac_status); } && {
26469 test -z "$ac_c_werror_flag" ||
26470 test ! -s conftest.err
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026471 } && test -s conftest$ac_exeext && {
26472 test "$cross_compiling" = yes ||
26473 $as_test_x conftest$ac_exeext
26474 }; then
Brett Cannon43802422005-02-10 20:48:03 +000026475 ac_cv_var_tzname=yes
26476else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026477 $as_echo "$as_me: failed program was:" >&5
Brett Cannon43802422005-02-10 20:48:03 +000026478sed 's/^/| /' conftest.$ac_ext >&5
26479
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026480 ac_cv_var_tzname=no
Brett Cannon43802422005-02-10 20:48:03 +000026481fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026482
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026483rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026484rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
Brett Cannon43802422005-02-10 20:48:03 +000026485 conftest$ac_exeext conftest.$ac_ext
26486fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026487{ $as_echo "$as_me:$LINENO: result: $ac_cv_var_tzname" >&5
26488$as_echo "$ac_cv_var_tzname" >&6; }
Brett Cannon43802422005-02-10 20:48:03 +000026489 if test $ac_cv_var_tzname = yes; then
26490
26491cat >>confdefs.h <<\_ACEOF
26492#define HAVE_TZNAME 1
26493_ACEOF
26494
26495 fi
26496fi
26497
Nicholas Bastine62c5c82004-03-21 23:45:42 +000026498
Martin v. Löwis1d459062005-03-14 21:23:33 +000026499# check tzset(3) exists and works like we expect it to
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026500{ $as_echo "$as_me:$LINENO: checking for working tzset()" >&5
26501$as_echo_n "checking for working tzset()... " >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026502if test "${ac_cv_working_tzset+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026503 $as_echo_n "(cached) " >&6
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026504else
26505
26506if test "$cross_compiling" = yes; then
26507 ac_cv_working_tzset=no
26508else
26509 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026510/* confdefs.h. */
26511_ACEOF
26512cat confdefs.h >>conftest.$ac_ext
26513cat >>conftest.$ac_ext <<_ACEOF
26514/* end confdefs.h. */
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026515
26516#include <stdlib.h>
26517#include <time.h>
Brett Cannon18367812003-09-19 00:59:16 +000026518#include <string.h>
Brett Cannon43802422005-02-10 20:48:03 +000026519
26520#if HAVE_TZNAME
26521extern char *tzname[];
26522#endif
26523
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026524int main()
26525{
Brett Cannon18367812003-09-19 00:59:16 +000026526 /* Note that we need to ensure that not only does tzset(3)
26527 do 'something' with localtime, but it works as documented
26528 in the library reference and as expected by the test suite.
Martin v. Löwis1d459062005-03-14 21:23:33 +000026529 This includes making sure that tzname is set properly if
26530 tm->tm_zone does not exist since it is the alternative way
26531 of getting timezone info.
Brett Cannon18367812003-09-19 00:59:16 +000026532
26533 Red Hat 6.2 doesn't understand the southern hemisphere
Martin v. Löwis1d459062005-03-14 21:23:33 +000026534 after New Year's Day.
Brett Cannon18367812003-09-19 00:59:16 +000026535 */
26536
Martin v. Löwis1d459062005-03-14 21:23:33 +000026537 time_t groundhogday = 1044144000; /* GMT-based */
Brett Cannon18367812003-09-19 00:59:16 +000026538 time_t midyear = groundhogday + (365 * 24 * 3600 / 2);
26539
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026540 putenv("TZ=UTC+0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026541 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026542 if (localtime(&groundhogday)->tm_hour != 0)
26543 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026544#if HAVE_TZNAME
26545 /* For UTC, tzname[1] is sometimes "", sometimes " " */
26546 if (strcmp(tzname[0], "UTC") ||
26547 (tzname[1][0] != 0 && tzname[1][0] != ' '))
26548 exit(1);
26549#endif
Brett Cannon18367812003-09-19 00:59:16 +000026550
Neal Norwitz7f2588c2003-04-11 15:35:53 +000026551 putenv("TZ=EST+5EDT,M4.1.0,M10.5.0");
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026552 tzset();
Brett Cannon18367812003-09-19 00:59:16 +000026553 if (localtime(&groundhogday)->tm_hour != 19)
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026554 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026555#if HAVE_TZNAME
26556 if (strcmp(tzname[0], "EST") || strcmp(tzname[1], "EDT"))
26557 exit(1);
26558#endif
Brett Cannon18367812003-09-19 00:59:16 +000026559
26560 putenv("TZ=AEST-10AEDT-11,M10.5.0,M3.5.0");
26561 tzset();
26562 if (localtime(&groundhogday)->tm_hour != 11)
26563 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026564#if HAVE_TZNAME
26565 if (strcmp(tzname[0], "AEST") || strcmp(tzname[1], "AEDT"))
26566 exit(1);
26567#endif
26568
26569#if HAVE_STRUCT_TM_TM_ZONE
Brett Cannon18367812003-09-19 00:59:16 +000026570 if (strcmp(localtime(&groundhogday)->tm_zone, "AEDT"))
26571 exit(1);
26572 if (strcmp(localtime(&midyear)->tm_zone, "AEST"))
26573 exit(1);
Brett Cannon43802422005-02-10 20:48:03 +000026574#endif
Brett Cannon18367812003-09-19 00:59:16 +000026575
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026576 exit(0);
26577}
26578
26579_ACEOF
26580rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026581if { (ac_try="$ac_link"
26582case "(($ac_try" in
26583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26584 *) ac_try_echo=$ac_try;;
26585esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026586eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26587$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026588 (eval "$ac_link") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026589 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026590 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026591 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026592 { (case "(($ac_try" in
26593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26594 *) ac_try_echo=$ac_try;;
26595esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026596eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26597$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026598 (eval "$ac_try") 2>&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026599 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026600 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026601 (exit $ac_status); }; }; then
26602 ac_cv_working_tzset=yes
26603else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026604 $as_echo "$as_me: program exited with status $ac_status" >&5
26605$as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026606sed 's/^/| /' conftest.$ac_ext >&5
26607
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026608( exit $ac_status )
26609ac_cv_working_tzset=no
26610fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026611rm -rf conftest.dSYM
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026612rm -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 +000026613fi
26614
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026615
26616fi
26617
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026618{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_tzset" >&5
26619$as_echo "$ac_cv_working_tzset" >&6; }
Guido van Rossumd11b62e2003-03-14 21:51:36 +000026620if test "$ac_cv_working_tzset" = yes
26621then
26622
26623cat >>confdefs.h <<\_ACEOF
26624#define HAVE_WORKING_TZSET 1
26625_ACEOF
26626
26627fi
26628
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026629# Look for subsecond timestamps in struct stat
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026630{ $as_echo "$as_me:$LINENO: checking for tv_nsec in struct stat" >&5
26631$as_echo_n "checking for tv_nsec in struct stat... " >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026632if test "${ac_cv_stat_tv_nsec+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026633 $as_echo_n "(cached) " >&6
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026634else
26635 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026636/* confdefs.h. */
26637_ACEOF
26638cat confdefs.h >>conftest.$ac_ext
26639cat >>conftest.$ac_ext <<_ACEOF
26640/* end confdefs.h. */
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026641#include <sys/stat.h>
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026642int
26643main ()
26644{
26645
26646struct stat st;
26647st.st_mtim.tv_nsec = 1;
26648
26649 ;
26650 return 0;
26651}
26652_ACEOF
26653rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026654if { (ac_try="$ac_compile"
26655case "(($ac_try" in
26656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26657 *) ac_try_echo=$ac_try;;
26658esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026659eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26660$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026661 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026662 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026663 grep -v '^ *+' conftest.er1 >conftest.err
26664 rm -f conftest.er1
26665 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026666 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026667 (exit $ac_status); } && {
26668 test -z "$ac_c_werror_flag" ||
26669 test ! -s conftest.err
26670 } && test -s conftest.$ac_objext; then
Martin v. Löwisa32c9942002-09-09 16:17:47 +000026671 ac_cv_stat_tv_nsec=yes
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026672else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026673 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026674sed 's/^/| /' conftest.$ac_ext >&5
26675
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026676 ac_cv_stat_tv_nsec=no
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026677fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026678
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26680fi
26681
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026682{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec" >&5
26683$as_echo "$ac_cv_stat_tv_nsec" >&6; }
Martin v. Löwis94717ed2002-09-09 14:24:16 +000026684if test "$ac_cv_stat_tv_nsec" = yes
26685then
26686
26687cat >>confdefs.h <<\_ACEOF
26688#define HAVE_STAT_TV_NSEC 1
26689_ACEOF
26690
26691fi
26692
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026693# Look for BSD style subsecond timestamps in struct stat
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026694{ $as_echo "$as_me:$LINENO: checking for tv_nsec2 in struct stat" >&5
26695$as_echo_n "checking for tv_nsec2 in struct stat... " >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026696if test "${ac_cv_stat_tv_nsec2+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026697 $as_echo_n "(cached) " >&6
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026698else
26699 cat >conftest.$ac_ext <<_ACEOF
26700/* confdefs.h. */
26701_ACEOF
26702cat confdefs.h >>conftest.$ac_ext
26703cat >>conftest.$ac_ext <<_ACEOF
26704/* end confdefs.h. */
26705#include <sys/stat.h>
26706int
26707main ()
26708{
26709
26710struct stat st;
26711st.st_mtimespec.tv_nsec = 1;
26712
26713 ;
26714 return 0;
26715}
26716_ACEOF
26717rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026718if { (ac_try="$ac_compile"
26719case "(($ac_try" in
26720 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26721 *) ac_try_echo=$ac_try;;
26722esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026723eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26724$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026725 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026726 ac_status=$?
26727 grep -v '^ *+' conftest.er1 >conftest.err
26728 rm -f conftest.er1
26729 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026730 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026731 (exit $ac_status); } && {
26732 test -z "$ac_c_werror_flag" ||
26733 test ! -s conftest.err
26734 } && test -s conftest.$ac_objext; then
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026735 ac_cv_stat_tv_nsec2=yes
26736else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026737 $as_echo "$as_me: failed program was:" >&5
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026738sed 's/^/| /' conftest.$ac_ext >&5
26739
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026740 ac_cv_stat_tv_nsec2=no
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026741fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026742
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26744fi
26745
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026746{ $as_echo "$as_me:$LINENO: result: $ac_cv_stat_tv_nsec2" >&5
26747$as_echo "$ac_cv_stat_tv_nsec2" >&6; }
Martin v. Löwisebd9d5b2005-08-09 15:00:59 +000026748if test "$ac_cv_stat_tv_nsec2" = yes
26749then
26750
26751cat >>confdefs.h <<\_ACEOF
26752#define HAVE_STAT_TV_NSEC2 1
26753_ACEOF
26754
26755fi
26756
Jack Jansen666b1e72001-10-31 12:11:48 +000026757# On HP/UX 11.0, mvwdelch is a block with a return statement
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026758{ $as_echo "$as_me:$LINENO: checking whether mvwdelch is an expression" >&5
26759$as_echo_n "checking whether mvwdelch is an expression... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026760if test "${ac_cv_mvwdelch_is_expression+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026761 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026762else
Martin v. Löwis11437992002-04-12 09:54:03 +000026763 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026764/* confdefs.h. */
26765_ACEOF
26766cat confdefs.h >>conftest.$ac_ext
26767cat >>conftest.$ac_ext <<_ACEOF
26768/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026769#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026770int
26771main ()
26772{
Jack Jansen666b1e72001-10-31 12:11:48 +000026773
26774 int rtn;
26775 rtn = mvwdelch(0,0,0);
26776
Martin v. Löwis11437992002-04-12 09:54:03 +000026777 ;
26778 return 0;
26779}
26780_ACEOF
26781rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026782if { (ac_try="$ac_compile"
26783case "(($ac_try" in
26784 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26785 *) ac_try_echo=$ac_try;;
26786esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026787eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26788$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026789 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026790 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026791 grep -v '^ *+' conftest.er1 >conftest.err
26792 rm -f conftest.er1
26793 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026794 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026795 (exit $ac_status); } && {
26796 test -z "$ac_c_werror_flag" ||
26797 test ! -s conftest.err
26798 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026799 ac_cv_mvwdelch_is_expression=yes
26800else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026801 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026802sed 's/^/| /' conftest.$ac_ext >&5
26803
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026804 ac_cv_mvwdelch_is_expression=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026805fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26808fi
26809
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026810{ $as_echo "$as_me:$LINENO: result: $ac_cv_mvwdelch_is_expression" >&5
26811$as_echo "$ac_cv_mvwdelch_is_expression" >&6; }
Jack Jansen666b1e72001-10-31 12:11:48 +000026812
26813if test "$ac_cv_mvwdelch_is_expression" = yes
26814then
Martin v. Löwis11437992002-04-12 09:54:03 +000026815
26816cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026817#define MVWDELCH_IS_EXPRESSION 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026818_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026819
26820fi
26821
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026822{ $as_echo "$as_me:$LINENO: checking whether WINDOW has _flags" >&5
26823$as_echo_n "checking whether WINDOW has _flags... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000026824if test "${ac_cv_window_has_flags+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026825 $as_echo_n "(cached) " >&6
Jack Jansen666b1e72001-10-31 12:11:48 +000026826else
Martin v. Löwis11437992002-04-12 09:54:03 +000026827 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000026828/* confdefs.h. */
26829_ACEOF
26830cat confdefs.h >>conftest.$ac_ext
26831cat >>conftest.$ac_ext <<_ACEOF
26832/* end confdefs.h. */
Jack Jansen666b1e72001-10-31 12:11:48 +000026833#include <curses.h>
Martin v. Löwis11437992002-04-12 09:54:03 +000026834int
26835main ()
26836{
Jack Jansen666b1e72001-10-31 12:11:48 +000026837
26838 WINDOW *w;
26839 w->_flags = 0;
26840
Martin v. Löwis11437992002-04-12 09:54:03 +000026841 ;
26842 return 0;
26843}
26844_ACEOF
26845rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026846if { (ac_try="$ac_compile"
26847case "(($ac_try" in
26848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26849 *) ac_try_echo=$ac_try;;
26850esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026851eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26852$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026853 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000026854 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000026855 grep -v '^ *+' conftest.er1 >conftest.err
26856 rm -f conftest.er1
26857 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026858 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026859 (exit $ac_status); } && {
26860 test -z "$ac_c_werror_flag" ||
26861 test ! -s conftest.err
26862 } && test -s conftest.$ac_objext; then
Jack Jansen666b1e72001-10-31 12:11:48 +000026863 ac_cv_window_has_flags=yes
26864else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026865 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000026866sed 's/^/| /' conftest.$ac_ext >&5
26867
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026868 ac_cv_window_has_flags=no
Jack Jansen666b1e72001-10-31 12:11:48 +000026869fi
Thomas Wouters477c8d52006-05-27 19:21:47 +000026870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26872fi
26873
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026874{ $as_echo "$as_me:$LINENO: result: $ac_cv_window_has_flags" >&5
26875$as_echo "$ac_cv_window_has_flags" >&6; }
Michael W. Hudson54241132001-12-07 15:38:26 +000026876
Jack Jansen666b1e72001-10-31 12:11:48 +000026877
26878if test "$ac_cv_window_has_flags" = yes
26879then
Martin v. Löwis11437992002-04-12 09:54:03 +000026880
26881cat >>confdefs.h <<\_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026882#define WINDOW_HAS_FLAGS 1
Martin v. Löwis11437992002-04-12 09:54:03 +000026883_ACEOF
Jack Jansen666b1e72001-10-31 12:11:48 +000026884
26885fi
26886
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026887{ $as_echo "$as_me:$LINENO: checking for is_term_resized" >&5
26888$as_echo_n "checking for is_term_resized... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026889cat >conftest.$ac_ext <<_ACEOF
26890/* confdefs.h. */
26891_ACEOF
26892cat confdefs.h >>conftest.$ac_ext
26893cat >>conftest.$ac_ext <<_ACEOF
26894/* end confdefs.h. */
26895#include <curses.h>
26896int
26897main ()
26898{
26899void *x=is_term_resized
26900 ;
26901 return 0;
26902}
26903_ACEOF
26904rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026905if { (ac_try="$ac_compile"
26906case "(($ac_try" in
26907 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26908 *) ac_try_echo=$ac_try;;
26909esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026910eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26911$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026912 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026913 ac_status=$?
26914 grep -v '^ *+' conftest.er1 >conftest.err
26915 rm -f conftest.er1
26916 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026917 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026918 (exit $ac_status); } && {
26919 test -z "$ac_c_werror_flag" ||
26920 test ! -s conftest.err
26921 } && test -s conftest.$ac_objext; then
Martin v. Löwis24a880b2002-12-31 12:55:15 +000026922
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026923cat >>confdefs.h <<\_ACEOF
26924#define HAVE_CURSES_IS_TERM_RESIZED 1
26925_ACEOF
26926
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026927 { $as_echo "$as_me:$LINENO: result: yes" >&5
26928$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026929else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026930 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026931sed 's/^/| /' conftest.$ac_ext >&5
26932
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026933 { $as_echo "$as_me:$LINENO: result: no" >&5
26934$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026935
26936fi
26937
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026938rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26939
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026940{ $as_echo "$as_me:$LINENO: checking for resize_term" >&5
26941$as_echo_n "checking for resize_term... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026942cat >conftest.$ac_ext <<_ACEOF
26943/* confdefs.h. */
26944_ACEOF
26945cat confdefs.h >>conftest.$ac_ext
26946cat >>conftest.$ac_ext <<_ACEOF
26947/* end confdefs.h. */
26948#include <curses.h>
26949int
26950main ()
26951{
26952void *x=resize_term
26953 ;
26954 return 0;
26955}
26956_ACEOF
26957rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026958if { (ac_try="$ac_compile"
26959case "(($ac_try" in
26960 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26961 *) ac_try_echo=$ac_try;;
26962esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026963eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
26964$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026965 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026966 ac_status=$?
26967 grep -v '^ *+' conftest.er1 >conftest.err
26968 rm -f conftest.er1
26969 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026970 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026971 (exit $ac_status); } && {
26972 test -z "$ac_c_werror_flag" ||
26973 test ! -s conftest.err
26974 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026975
26976cat >>confdefs.h <<\_ACEOF
26977#define HAVE_CURSES_RESIZE_TERM 1
26978_ACEOF
26979
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026980 { $as_echo "$as_me:$LINENO: result: yes" >&5
26981$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026982else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026983 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026984sed 's/^/| /' conftest.$ac_ext >&5
26985
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026986 { $as_echo "$as_me:$LINENO: result: no" >&5
26987$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026988
26989fi
26990
Thomas Wouters47b49bf2007-08-30 22:15:33 +000026991rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26992
Benjamin Peterson8719ad52009-09-11 22:24:02 +000026993{ $as_echo "$as_me:$LINENO: checking for resizeterm" >&5
26994$as_echo_n "checking for resizeterm... " >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000026995cat >conftest.$ac_ext <<_ACEOF
26996/* confdefs.h. */
26997_ACEOF
26998cat confdefs.h >>conftest.$ac_ext
26999cat >>conftest.$ac_ext <<_ACEOF
27000/* end confdefs.h. */
27001#include <curses.h>
27002int
27003main ()
27004{
27005void *x=resizeterm
27006 ;
27007 return 0;
27008}
27009_ACEOF
27010rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027011if { (ac_try="$ac_compile"
27012case "(($ac_try" in
27013 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27014 *) ac_try_echo=$ac_try;;
27015esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027016eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27017$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027018 (eval "$ac_compile") 2>conftest.er1
Thomas Wouters0e3f5912006-08-11 14:57:12 +000027019 ac_status=$?
27020 grep -v '^ *+' conftest.er1 >conftest.err
27021 rm -f conftest.er1
27022 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027023 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027024 (exit $ac_status); } && {
27025 test -z "$ac_c_werror_flag" ||
27026 test ! -s conftest.err
27027 } && test -s conftest.$ac_objext; then
Thomas Wouters0e3f5912006-08-11 14:57:12 +000027028
27029cat >>confdefs.h <<\_ACEOF
27030#define HAVE_CURSES_RESIZETERM 1
27031_ACEOF
27032
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027033 { $as_echo "$as_me:$LINENO: result: yes" >&5
27034$as_echo "yes" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000027035else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027036 $as_echo "$as_me: failed program was:" >&5
Thomas Wouters0e3f5912006-08-11 14:57:12 +000027037sed 's/^/| /' conftest.$ac_ext >&5
27038
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027039 { $as_echo "$as_me:$LINENO: result: no" >&5
27040$as_echo "no" >&6; }
Thomas Wouters0e3f5912006-08-11 14:57:12 +000027041
27042fi
27043
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27045
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027046{ $as_echo "$as_me:$LINENO: checking for /dev/ptmx" >&5
27047$as_echo_n "checking for /dev/ptmx... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000027048
27049if test -r /dev/ptmx
27050then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027051 { $as_echo "$as_me:$LINENO: result: yes" >&5
27052$as_echo "yes" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027053
27054cat >>confdefs.h <<\_ACEOF
27055#define HAVE_DEV_PTMX 1
27056_ACEOF
27057
Thomas Wouters89f507f2006-12-13 04:49:30 +000027058else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027059 { $as_echo "$as_me:$LINENO: result: no" >&5
27060$as_echo "no" >&6; }
Martin v. Löwis24a880b2002-12-31 12:55:15 +000027061fi
27062
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027063{ $as_echo "$as_me:$LINENO: checking for /dev/ptc" >&5
27064$as_echo_n "checking for /dev/ptc... " >&6; }
Thomas Wouters89f507f2006-12-13 04:49:30 +000027065
27066if test -r /dev/ptc
27067then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027068 { $as_echo "$as_me:$LINENO: result: yes" >&5
27069$as_echo "yes" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027070
27071cat >>confdefs.h <<\_ACEOF
27072#define HAVE_DEV_PTC 1
27073_ACEOF
27074
Thomas Wouters89f507f2006-12-13 04:49:30 +000027075else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027076 { $as_echo "$as_me:$LINENO: result: no" >&5
27077$as_echo "no" >&6; }
Neal Norwitz865400f2003-03-21 01:42:58 +000027078fi
27079
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027080{ $as_echo "$as_me:$LINENO: checking for %zd printf() format support" >&5
27081$as_echo_n "checking for %zd printf() format support... " >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027082if test "${ac_cv_have_size_t_format+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027083 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027084else
27085 if test "$cross_compiling" = yes; then
27086 ac_cv_have_size_t_format=no
Thomas Wouters477c8d52006-05-27 19:21:47 +000027087else
27088 cat >conftest.$ac_ext <<_ACEOF
27089/* confdefs.h. */
27090_ACEOF
27091cat confdefs.h >>conftest.$ac_ext
27092cat >>conftest.$ac_ext <<_ACEOF
27093/* end confdefs.h. */
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027094
Thomas Wouters477c8d52006-05-27 19:21:47 +000027095#include <stdio.h>
27096#include <stddef.h>
27097#include <string.h>
27098
Christian Heimes2c181612007-12-17 20:04:13 +000027099#ifdef HAVE_SYS_TYPES_H
27100#include <sys/types.h>
27101#endif
Thomas Wouters89f507f2006-12-13 04:49:30 +000027102
27103#ifdef HAVE_SSIZE_T
27104typedef ssize_t Py_ssize_t;
27105#elif SIZEOF_VOID_P == SIZEOF_LONG
27106typedef long Py_ssize_t;
27107#else
27108typedef int Py_ssize_t;
27109#endif
Thomas Wouters477c8d52006-05-27 19:21:47 +000027110
Christian Heimes2c181612007-12-17 20:04:13 +000027111int main()
27112{
27113 char buffer[256];
27114
Thomas Wouters477c8d52006-05-27 19:21:47 +000027115 if(sprintf(buffer, "%zd", (size_t)123) < 0)
27116 return 1;
27117
Thomas Wouters89f507f2006-12-13 04:49:30 +000027118 if (strcmp(buffer, "123"))
27119 return 1;
27120
27121 if (sprintf(buffer, "%zd", (Py_ssize_t)-123) < 0)
27122 return 1;
27123
27124 if (strcmp(buffer, "-123"))
Thomas Wouters477c8d52006-05-27 19:21:47 +000027125 return 1;
27126
27127 return 0;
27128}
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027129
Thomas Wouters477c8d52006-05-27 19:21:47 +000027130_ACEOF
27131rm -f conftest$ac_exeext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027132if { (ac_try="$ac_link"
27133case "(($ac_try" in
27134 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27135 *) ac_try_echo=$ac_try;;
27136esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027137eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27138$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027139 (eval "$ac_link") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027140 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027141 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027142 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027143 { (case "(($ac_try" in
27144 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27145 *) ac_try_echo=$ac_try;;
27146esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027147eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27148$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027149 (eval "$ac_try") 2>&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027150 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027151 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters477c8d52006-05-27 19:21:47 +000027152 (exit $ac_status); }; }; then
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027153 ac_cv_have_size_t_format=yes
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027154else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027155 $as_echo "$as_me: program exited with status $ac_status" >&5
27156$as_echo "$as_me: failed program was:" >&5
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027157sed 's/^/| /' conftest.$ac_ext >&5
27158
27159( exit $ac_status )
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027160ac_cv_have_size_t_format=no
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027161fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027162rm -rf conftest.dSYM
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027163rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
Alexandre Vassalotti302825b2009-07-17 07:49:53 +000027164fi
27165
Alexandre Vassalotti19142282009-07-17 23:11:52 +000027166
27167
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027168fi
27169
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027170{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_size_t_format" >&5
27171$as_echo "$ac_cv_have_size_t_format" >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027172if test $ac_cv_have_size_t_format = yes
27173then
27174
27175cat >>confdefs.h <<\_ACEOF
27176#define PY_FORMAT_SIZE_T "z"
27177_ACEOF
27178
27179fi
27180
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027181{ $as_echo "$as_me:$LINENO: checking for socklen_t" >&5
27182$as_echo_n "checking for socklen_t... " >&6; }
Martin v. Löwis11437992002-04-12 09:54:03 +000027183if test "${ac_cv_type_socklen_t+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027184 $as_echo_n "(cached) " >&6
Guido van Rossum95713eb2000-05-18 20:53:31 +000027185else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027186 ac_cv_type_socklen_t=no
27187cat >conftest.$ac_ext <<_ACEOF
27188/* confdefs.h. */
27189_ACEOF
27190cat confdefs.h >>conftest.$ac_ext
27191cat >>conftest.$ac_ext <<_ACEOF
27192/* end confdefs.h. */
27193
27194#ifdef HAVE_SYS_TYPES_H
27195#include <sys/types.h>
27196#endif
27197#ifdef HAVE_SYS_SOCKET_H
27198#include <sys/socket.h>
27199#endif
27200
27201
27202int
27203main ()
27204{
27205if (sizeof (socklen_t))
27206 return 0;
27207 ;
27208 return 0;
27209}
27210_ACEOF
27211rm -f conftest.$ac_objext
27212if { (ac_try="$ac_compile"
27213case "(($ac_try" in
27214 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27215 *) ac_try_echo=$ac_try;;
27216esac
27217eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27218$as_echo "$ac_try_echo") >&5
27219 (eval "$ac_compile") 2>conftest.er1
27220 ac_status=$?
27221 grep -v '^ *+' conftest.er1 >conftest.err
27222 rm -f conftest.er1
27223 cat conftest.err >&5
27224 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
27225 (exit $ac_status); } && {
27226 test -z "$ac_c_werror_flag" ||
27227 test ! -s conftest.err
27228 } && test -s conftest.$ac_objext; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027229 cat >conftest.$ac_ext <<_ACEOF
Skip Montanaro6dead952003-09-25 14:50:04 +000027230/* confdefs.h. */
27231_ACEOF
27232cat confdefs.h >>conftest.$ac_ext
27233cat >>conftest.$ac_ext <<_ACEOF
27234/* end confdefs.h. */
Martin v. Löwis01c04012002-11-11 14:58:44 +000027235
27236#ifdef HAVE_SYS_TYPES_H
27237#include <sys/types.h>
27238#endif
27239#ifdef HAVE_SYS_SOCKET_H
27240#include <sys/socket.h>
27241#endif
27242
27243
Martin v. Löwis11437992002-04-12 09:54:03 +000027244int
27245main ()
27246{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027247if (sizeof ((socklen_t)))
27248 return 0;
Martin v. Löwis11437992002-04-12 09:54:03 +000027249 ;
27250 return 0;
27251}
27252_ACEOF
27253rm -f conftest.$ac_objext
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027254if { (ac_try="$ac_compile"
27255case "(($ac_try" in
27256 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27257 *) ac_try_echo=$ac_try;;
27258esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027259eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27260$as_echo "$ac_try_echo") >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027261 (eval "$ac_compile") 2>conftest.er1
Martin v. Löwis11437992002-04-12 09:54:03 +000027262 ac_status=$?
Skip Montanarof0d5f792004-08-15 14:08:23 +000027263 grep -v '^ *+' conftest.er1 >conftest.err
27264 rm -f conftest.er1
27265 cat conftest.err >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027266 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027267 (exit $ac_status); } && {
27268 test -z "$ac_c_werror_flag" ||
27269 test ! -s conftest.err
27270 } && test -s conftest.$ac_objext; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027271 :
Guido van Rossum95713eb2000-05-18 20:53:31 +000027272else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027273 $as_echo "$as_me: failed program was:" >&5
Skip Montanaro6dead952003-09-25 14:50:04 +000027274sed 's/^/| /' conftest.$ac_ext >&5
27275
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027276 ac_cv_type_socklen_t=yes
27277fi
27278
27279rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27280else
27281 $as_echo "$as_me: failed program was:" >&5
27282sed 's/^/| /' conftest.$ac_ext >&5
27283
27284
Guido van Rossum95713eb2000-05-18 20:53:31 +000027285fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027286
27287rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Martin v. Löwis11437992002-04-12 09:54:03 +000027288fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027289{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
27290$as_echo "$ac_cv_type_socklen_t" >&6; }
27291if test "x$ac_cv_type_socklen_t" = x""yes; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027292 :
27293else
Guido van Rossum95713eb2000-05-18 20:53:31 +000027294
Martin v. Löwis01c04012002-11-11 14:58:44 +000027295cat >>confdefs.h <<\_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027296#define socklen_t int
Martin v. Löwis11437992002-04-12 09:54:03 +000027297_ACEOF
Guido van Rossum95713eb2000-05-18 20:53:31 +000027298
27299fi
27300
Michael W. Hudson54241132001-12-07 15:38:26 +000027301
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027302{ $as_echo "$as_me:$LINENO: checking for broken mbstowcs" >&5
27303$as_echo_n "checking for broken mbstowcs... " >&6; }
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027304if test "${ac_cv_broken_mbstowcs+set}" = set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027305 $as_echo_n "(cached) " >&6
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027306else
27307 if test "$cross_compiling" = yes; then
Antoine Pitroufff95302008-09-03 18:58:51 +000027308 ac_cv_broken_mbstowcs=no
27309else
27310 cat >conftest.$ac_ext <<_ACEOF
27311/* confdefs.h. */
27312_ACEOF
27313cat confdefs.h >>conftest.$ac_ext
27314cat >>conftest.$ac_ext <<_ACEOF
27315/* end confdefs.h. */
27316
27317#include<stdlib.h>
27318int main() {
27319 size_t len = -1;
27320 const char *str = "text";
27321 len = mbstowcs(NULL, str, 0);
27322 return (len != 4);
27323}
27324
27325_ACEOF
27326rm -f conftest$ac_exeext
27327if { (ac_try="$ac_link"
27328case "(($ac_try" in
27329 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27330 *) ac_try_echo=$ac_try;;
27331esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027332eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27333$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027334 (eval "$ac_link") 2>&5
27335 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027336 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027337 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27338 { (case "(($ac_try" in
27339 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27340 *) ac_try_echo=$ac_try;;
27341esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027342eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
27343$as_echo "$ac_try_echo") >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027344 (eval "$ac_try") 2>&5
27345 ac_status=$?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027346 $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027347 (exit $ac_status); }; }; then
27348 ac_cv_broken_mbstowcs=no
27349else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027350 $as_echo "$as_me: program exited with status $ac_status" >&5
27351$as_echo "$as_me: failed program was:" >&5
Antoine Pitroufff95302008-09-03 18:58:51 +000027352sed 's/^/| /' conftest.$ac_ext >&5
27353
27354( exit $ac_status )
27355ac_cv_broken_mbstowcs=yes
27356fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027357rm -rf conftest.dSYM
Antoine Pitroufff95302008-09-03 18:58:51 +000027358rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27359fi
27360
27361
Alexandre Vassalottib0a61d72009-07-17 23:19:37 +000027362fi
27363
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027364{ $as_echo "$as_me:$LINENO: result: $ac_cv_broken_mbstowcs" >&5
27365$as_echo "$ac_cv_broken_mbstowcs" >&6; }
Antoine Pitroufff95302008-09-03 18:58:51 +000027366if test "$ac_cv_broken_mbstowcs" = yes
27367then
27368
27369cat >>confdefs.h <<\_ACEOF
27370#define HAVE_BROKEN_MBSTOWCS 1
27371_ACEOF
27372
27373fi
27374
Antoine Pitroub52ec782009-01-25 16:34:23 +000027375# Check for --with-computed-gotos
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027376{ $as_echo "$as_me:$LINENO: checking for --with-computed-gotos" >&5
27377$as_echo_n "checking for --with-computed-gotos... " >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027378
27379# Check whether --with-computed-gotos was given.
27380if test "${with_computed_gotos+set}" = set; then
27381 withval=$with_computed_gotos;
27382if test "$withval" != no
27383then
27384
27385cat >>confdefs.h <<\_ACEOF
27386#define USE_COMPUTED_GOTOS 1
27387_ACEOF
27388
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027389 { $as_echo "$as_me:$LINENO: result: yes" >&5
27390$as_echo "yes" >&6; }
27391else { $as_echo "$as_me:$LINENO: result: no" >&5
27392$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027393fi
27394else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027395 { $as_echo "$as_me:$LINENO: result: no" >&5
27396$as_echo "no" >&6; }
Antoine Pitroub52ec782009-01-25 16:34:23 +000027397fi
27398
27399
27400
Michael W. Hudson54241132001-12-07 15:38:26 +000027401
27402
Martin v. Löwis06f15bb2001-12-02 13:02:32 +000027403for h in `(cd $srcdir;echo Python/thread_*.h)`
27404do
27405 THREADHEADERS="$THREADHEADERS \$(srcdir)/$h"
27406done
27407
Michael W. Hudson54241132001-12-07 15:38:26 +000027408
Neal Norwitzd24499d2005-12-18 21:36:39 +000027409SRCDIRS="Parser Grammar Objects Python Modules Mac"
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027410{ $as_echo "$as_me:$LINENO: checking for build directories" >&5
27411$as_echo_n "checking for build directories... " >&6; }
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027412for dir in $SRCDIRS; do
27413 if test ! -d $dir; then
27414 mkdir $dir
Guido van Rossum262cf202000-11-02 19:33:53 +000027415 fi
Neil Schemenauerd32c2492001-01-24 17:25:28 +000027416done
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027417{ $as_echo "$as_me:$LINENO: result: done" >&5
27418$as_echo "done" >&6; }
Fred Drake036144d2000-10-26 17:09:35 +000027419
Guido van Rossum627b2d71993-12-24 10:39:16 +000027420# generate output files
Antoine Pitrou20327222009-05-24 20:39:11 +000027421ac_config_files="$ac_config_files Makefile.pre Modules/Setup.config Misc/python.pc"
Martin v. Löwis88afe662002-10-26 13:47:44 +000027422
Martin v. Löwis11437992002-04-12 09:54:03 +000027423cat >confcache <<\_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027424# This file is a shell script that caches the results of configure
27425# tests run on this system so they can be shared between configure
Martin v. Löwis11437992002-04-12 09:54:03 +000027426# scripts and configure runs, see configure's option --config-cache.
27427# It is not useful on other systems. If it contains results you don't
27428# want to keep, you may remove or edit it.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027429#
Martin v. Löwis11437992002-04-12 09:54:03 +000027430# config.status only pays attention to the cache file if you give it
27431# the --recheck option to rerun configure.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027432#
Skip Montanaro6dead952003-09-25 14:50:04 +000027433# `ac_cv_env_foo' variables (set or unset) will be overridden when
Martin v. Löwis11437992002-04-12 09:54:03 +000027434# loading this file, other *unset* `ac_cv_foo' will be assigned the
27435# following values.
27436
27437_ACEOF
27438
Guido van Rossumf78abae1997-01-21 22:02:36 +000027439# The following way of writing the cache mishandles newlines in values,
27440# but we know of no workaround that is simple, portable, and efficient.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027441# So, we kill variables containing newlines.
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027442# Ultrix sh set writes to stderr and can't be redirected directly,
27443# and sets the high bit in the cache file unless we assign to the vars.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027444(
27445 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
27446 eval ac_val=\$$ac_var
27447 case $ac_val in #(
27448 *${as_nl}*)
27449 case $ac_var in #(
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027450 *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
27451$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027452 esac
27453 case $ac_var in #(
27454 _ | IFS | as_nl) ;; #(
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027455 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027456 *) $as_unset $ac_var ;;
27457 esac ;;
27458 esac
27459 done
27460
Martin v. Löwis11437992002-04-12 09:54:03 +000027461 (set) 2>&1 |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027462 case $as_nl`(ac_space=' '; set) 2>&1` in #(
27463 *${as_nl}ac_space=\ *)
Martin v. Löwis11437992002-04-12 09:54:03 +000027464 # `set' does not quote correctly, so add quotes (double-quote
27465 # substitution turns \\\\ into \\, and sed turns \\ into \).
27466 sed -n \
Skip Montanarof0d5f792004-08-15 14:08:23 +000027467 "s/'/'\\\\''/g;
27468 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027469 ;; #(
Martin v. Löwis11437992002-04-12 09:54:03 +000027470 *)
27471 # `set' quotes correctly as required by POSIX, so do not add quotes.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027472 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
Martin v. Löwis11437992002-04-12 09:54:03 +000027473 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027474 esac |
27475 sort
27476) |
Martin v. Löwis11437992002-04-12 09:54:03 +000027477 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027478 /^ac_cv_env_/b end
Martin v. Löwis11437992002-04-12 09:54:03 +000027479 t clear
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027480 :clear
Martin v. Löwis11437992002-04-12 09:54:03 +000027481 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
27482 t end
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027483 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
27484 :end' >>confcache
27485if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
27486 if test -w "$cache_file"; then
27487 test "x$cache_file" != "x/dev/null" &&
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027488 { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
27489$as_echo "$as_me: updating cache $cache_file" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000027490 cat confcache >$cache_file
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027491 else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027492 { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
27493$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027494 fi
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027495fi
Guido van Rossum8ddd0ad1995-06-14 23:10:28 +000027496rm -f confcache
Guido van Rossum0a516c91994-09-12 10:58:40 +000027497
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027498test "x$prefix" = xNONE && prefix=$ac_default_prefix
27499# Let make expand exec_prefix.
27500test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
Guido van Rossum0a516c91994-09-12 10:58:40 +000027501
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027502DEFS=-DHAVE_CONFIG_H
27503
Skip Montanaro6dead952003-09-25 14:50:04 +000027504ac_libobjs=
27505ac_ltlibobjs=
27506for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
27507 # 1. Remove the extension, and $U if already installed.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027508 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027509 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027510 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
27511 # will be set to the directory where LIBOBJS objects are built.
27512 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
27513 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
Skip Montanaro6dead952003-09-25 14:50:04 +000027514done
27515LIBOBJS=$ac_libobjs
27516
27517LTLIBOBJS=$ac_ltlibobjs
27518
27519
Martin v. Löwis11437992002-04-12 09:54:03 +000027520
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027521
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027522: ${CONFIG_STATUS=./config.status}
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027523ac_write_fail=0
Martin v. Löwis11437992002-04-12 09:54:03 +000027524ac_clean_files_save=$ac_clean_files
27525ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027526{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
27527$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
27528cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027529#! $SHELL
27530# Generated by $as_me.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027531# Run this file to recreate the current configuration.
Guido van Rossum76be6ed1995-01-02 18:33:54 +000027532# Compiler output produced by configure, useful for debugging
Martin v. Löwis11437992002-04-12 09:54:03 +000027533# configure, is in config.log if it exists.
Guido van Rossum627b2d71993-12-24 10:39:16 +000027534
Martin v. Löwis11437992002-04-12 09:54:03 +000027535debug=false
Skip Montanaro6dead952003-09-25 14:50:04 +000027536ac_cs_recheck=false
27537ac_cs_silent=false
Martin v. Löwis11437992002-04-12 09:54:03 +000027538SHELL=\${CONFIG_SHELL-$SHELL}
27539_ACEOF
Jack Jansendd19cf82001-12-06 22:36:17 +000027540
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027541cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027542## --------------------- ##
27543## M4sh Initialization. ##
27544## --------------------- ##
Jack Jansendd19cf82001-12-06 22:36:17 +000027545
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027546# Be more Bourne compatible
27547DUALCASE=1; export DUALCASE # for MKS sh
Martin v. Löwis11437992002-04-12 09:54:03 +000027548if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27549 emulate sh
27550 NULLCMD=:
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027551 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Skip Montanaro6dead952003-09-25 14:50:04 +000027552 # is contrary to our usage. Disable this feature.
27553 alias -g '${1+"$@"}'='"$@"'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027554 setopt NO_GLOB_SUBST
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027555else
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027556 case `(set -o) 2>/dev/null` in
27557 *posix*) set -o posix ;;
27558esac
27559
Michael W. Hudson54241132001-12-07 15:38:26 +000027560fi
Thomas Wouters89f507f2006-12-13 04:49:30 +000027561
27562
Michael W. Hudson54241132001-12-07 15:38:26 +000027563
Michael W. Hudson54241132001-12-07 15:38:26 +000027564
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027565# PATH needs CR
Martin v. Löwis11437992002-04-12 09:54:03 +000027566# Avoid depending upon Character Ranges.
27567as_cr_letters='abcdefghijklmnopqrstuvwxyz'
27568as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
27569as_cr_Letters=$as_cr_letters$as_cr_LETTERS
27570as_cr_digits='0123456789'
27571as_cr_alnum=$as_cr_Letters$as_cr_digits
27572
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027573as_nl='
27574'
27575export as_nl
27576# Printing a long string crashes Solaris 7 /usr/bin/printf.
27577as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
27578as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
27579as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
27580if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
27581 as_echo='printf %s\n'
27582 as_echo_n='printf %s'
27583else
27584 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
27585 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
27586 as_echo_n='/usr/ucb/echo -n'
27587 else
27588 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
27589 as_echo_n_body='eval
27590 arg=$1;
27591 case $arg in
27592 *"$as_nl"*)
27593 expr "X$arg" : "X\\(.*\\)$as_nl";
27594 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
27595 esac;
27596 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
27597 '
27598 export as_echo_n_body
27599 as_echo_n='sh -c $as_echo_n_body as_echo'
27600 fi
27601 export as_echo_body
27602 as_echo='sh -c $as_echo_body as_echo'
27603fi
27604
Martin v. Löwis11437992002-04-12 09:54:03 +000027605# The user is always right.
27606if test "${PATH_SEPARATOR+set}" != set; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027607 PATH_SEPARATOR=:
27608 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
27609 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
27610 PATH_SEPARATOR=';'
27611 }
Martin v. Löwis11437992002-04-12 09:54:03 +000027612fi
27613
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027614# Support unset when possible.
27615if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
27616 as_unset=unset
27617else
27618 as_unset=false
27619fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027620
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027621
27622# IFS
27623# We need space, tab and new line, in precisely that order. Quoting is
27624# there to prevent editors from complaining about space-tab.
27625# (If _AS_PATH_WALK were called with IFS unset, it would disable word
27626# splitting by setting IFS to empty value.)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027627IFS=" "" $as_nl"
27628
27629# Find who we are. Look in the path if we contain no directory separator.
27630case $0 in
27631 *[\\/]* ) as_myself=$0 ;;
27632 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Martin v. Löwis11437992002-04-12 09:54:03 +000027633for as_dir in $PATH
27634do
27635 IFS=$as_save_IFS
27636 test -z "$as_dir" && as_dir=.
27637 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
27638done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027639IFS=$as_save_IFS
Martin v. Löwis11437992002-04-12 09:54:03 +000027640
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027641 ;;
27642esac
27643# We did not find ourselves, most probably we were run as `sh COMMAND'
27644# in which case we are not to be found in the path.
27645if test "x$as_myself" = x; then
27646 as_myself=$0
27647fi
27648if test ! -f "$as_myself"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027649 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027650 { (exit 1); exit 1; }
27651fi
27652
27653# Work around bugs in pre-3.0 UWIN ksh.
27654for as_var in ENV MAIL MAILPATH
27655do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
27656done
27657PS1='$ '
27658PS2='> '
27659PS4='+ '
27660
27661# NLS nuisances.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027662LC_ALL=C
27663export LC_ALL
27664LANGUAGE=C
27665export LANGUAGE
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027666
27667# Required to use basename.
27668if expr a : '\(a\)' >/dev/null 2>&1 &&
27669 test "X`expr 00001 : '.*\(...\)'`" = X001; then
27670 as_expr=expr
27671else
27672 as_expr=false
27673fi
27674
27675if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
27676 as_basename=basename
27677else
27678 as_basename=false
27679fi
27680
27681
27682# Name of the executable.
27683as_me=`$as_basename -- "$0" ||
27684$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
27685 X"$0" : 'X\(//\)$' \| \
27686 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027687$as_echo X/"$0" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027688 sed '/^.*\/\([^/][^/]*\)\/*$/{
27689 s//\1/
27690 q
27691 }
27692 /^X\/\(\/\/\)$/{
27693 s//\1/
27694 q
27695 }
27696 /^X\/\(\/\).*/{
27697 s//\1/
27698 q
27699 }
27700 s/.*/./; q'`
27701
27702# CDPATH.
27703$as_unset CDPATH
27704
27705
27706
Martin v. Löwis11437992002-04-12 09:54:03 +000027707 as_lineno_1=$LINENO
27708 as_lineno_2=$LINENO
Martin v. Löwis11437992002-04-12 09:54:03 +000027709 test "x$as_lineno_1" != "x$as_lineno_2" &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027710 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
Jack Jansendd19cf82001-12-06 22:36:17 +000027711
Martin v. Löwis11437992002-04-12 09:54:03 +000027712 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
27713 # uniformly replaced by the line number. The first 'sed' inserts a
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027714 # line-number line after each line using $LINENO; the second 'sed'
27715 # does the real work. The second script uses 'N' to pair each
27716 # line-number line with the line containing $LINENO, and appends
27717 # trailing '-' during substitution so that $LINENO is not a special
27718 # case at line end.
Martin v. Löwis11437992002-04-12 09:54:03 +000027719 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027720 # scripts with optimization help from Paolo Bonzini. Blame Lee
27721 # E. McMahon (1931-1989) for sed's syntax. :-)
27722 sed -n '
27723 p
27724 /[$]LINENO/=
27725 ' <$as_myself |
Martin v. Löwis11437992002-04-12 09:54:03 +000027726 sed '
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027727 s/[$]LINENO.*/&-/
27728 t lineno
27729 b
27730 :lineno
Martin v. Löwis11437992002-04-12 09:54:03 +000027731 N
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027732 :loop
27733 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
Martin v. Löwis11437992002-04-12 09:54:03 +000027734 t loop
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027735 s/-\n.*//
Martin v. Löwis11437992002-04-12 09:54:03 +000027736 ' >$as_me.lineno &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027737 chmod +x "$as_me.lineno" ||
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027738 { $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 +000027739 { (exit 1); exit 1; }; }
Michael W. Hudson54241132001-12-07 15:38:26 +000027740
Martin v. Löwis11437992002-04-12 09:54:03 +000027741 # Don't try to exec as it changes $[0], causing all sort of problems
27742 # (the dirname of $[0] is not the place where we might find the
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027743 # original and so on. Autoconf is especially sensitive to this).
27744 . "./$as_me.lineno"
Martin v. Löwis11437992002-04-12 09:54:03 +000027745 # Exit status is that of the last command.
27746 exit
27747}
27748
27749
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027750if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
27751 as_dirname=dirname
27752else
27753 as_dirname=false
27754fi
27755
27756ECHO_C= ECHO_N= ECHO_T=
27757case `echo -n x` in
27758-n*)
27759 case `echo 'x\c'` in
27760 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
27761 *) ECHO_C='\c';;
27762 esac;;
27763*)
27764 ECHO_N='-n';;
Martin v. Löwis11437992002-04-12 09:54:03 +000027765esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027766if expr a : '\(a\)' >/dev/null 2>&1 &&
27767 test "X`expr 00001 : '.*\(...\)'`" = X001; then
Martin v. Löwis11437992002-04-12 09:54:03 +000027768 as_expr=expr
27769else
27770 as_expr=false
27771fi
27772
27773rm -f conf$$ conf$$.exe conf$$.file
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027774if test -d conf$$.dir; then
27775 rm -f conf$$.dir/conf$$.file
27776else
27777 rm -f conf$$.dir
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027778 mkdir conf$$.dir 2>/dev/null
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027779fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027780if (echo >conf$$.file) 2>/dev/null; then
27781 if ln -s conf$$.file conf$$ 2>/dev/null; then
27782 as_ln_s='ln -s'
27783 # ... but there are two gotchas:
27784 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
27785 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
27786 # In both cases, we have to default to `cp -p'.
27787 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
27788 as_ln_s='cp -p'
27789 elif ln conf$$.file conf$$ 2>/dev/null; then
27790 as_ln_s=ln
27791 else
Martin v. Löwis11437992002-04-12 09:54:03 +000027792 as_ln_s='cp -p'
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027793 fi
Martin v. Löwis11437992002-04-12 09:54:03 +000027794else
27795 as_ln_s='cp -p'
27796fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027797rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
27798rmdir conf$$.dir 2>/dev/null
Martin v. Löwis11437992002-04-12 09:54:03 +000027799
Skip Montanaro6dead952003-09-25 14:50:04 +000027800if mkdir -p . 2>/dev/null; then
27801 as_mkdir_p=:
27802else
Skip Montanarof0d5f792004-08-15 14:08:23 +000027803 test -d ./-p && rmdir ./-p
Skip Montanaro6dead952003-09-25 14:50:04 +000027804 as_mkdir_p=false
27805fi
27806
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027807if test -x / >/dev/null 2>&1; then
27808 as_test_x='test -x'
27809else
27810 if ls -dL / >/dev/null 2>&1; then
27811 as_ls_L_option=L
27812 else
27813 as_ls_L_option=
27814 fi
27815 as_test_x='
27816 eval sh -c '\''
27817 if test -d "$1"; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027818 test -d "$1/.";
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027819 else
27820 case $1 in
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027821 -*)set "./$1";;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027822 esac;
27823 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
27824 ???[sx]*):;;*)false;;esac;fi
27825 '\'' sh
27826 '
27827fi
27828as_executable_p=$as_test_x
Martin v. Löwis11437992002-04-12 09:54:03 +000027829
27830# Sed expression to map a string onto a valid CPP name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027831as_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 +000027832
27833# Sed expression to map a string onto a valid variable name.
Skip Montanarof0d5f792004-08-15 14:08:23 +000027834as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027835
27836
Martin v. Löwis11437992002-04-12 09:54:03 +000027837exec 6>&1
27838
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027839# Save the log message, to keep $[0] and so on meaningful, and to
Martin v. Löwis11437992002-04-12 09:54:03 +000027840# report actual input values of CONFIG_FILES etc. instead of their
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027841# values after options handling.
27842ac_log="
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027843This file was extended by python $as_me 3.2, which was
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027844generated by GNU Autoconf 2.63. Invocation command line was
Martin v. Löwis11437992002-04-12 09:54:03 +000027845
27846 CONFIG_FILES = $CONFIG_FILES
27847 CONFIG_HEADERS = $CONFIG_HEADERS
27848 CONFIG_LINKS = $CONFIG_LINKS
27849 CONFIG_COMMANDS = $CONFIG_COMMANDS
27850 $ $0 $@
27851
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027852on `(hostname || uname -n) 2>/dev/null | sed 1q`
27853"
27854
Martin v. Löwis11437992002-04-12 09:54:03 +000027855_ACEOF
27856
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027857case $ac_config_files in *"
27858"*) set x $ac_config_files; shift; ac_config_files=$*;;
27859esac
27860
27861case $ac_config_headers in *"
27862"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
27863esac
27864
27865
27866cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027867# Files that config.status was made for.
Martin v. Löwis113a0852009-05-29 17:25:39 +000027868config_files="$ac_config_files"
27869config_headers="$ac_config_headers"
Martin v. Löwis11437992002-04-12 09:54:03 +000027870
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027871_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000027872
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027873cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027874ac_cs_usage="\
27875\`$as_me' instantiates files from templates according to the
27876current configuration.
27877
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027878Usage: $0 [OPTION]... [FILE]...
Martin v. Löwis11437992002-04-12 09:54:03 +000027879
27880 -h, --help print this help, then exit
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027881 -V, --version print version number and configuration settings, then exit
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027882 -q, --quiet, --silent
27883 do not print progress messages
Martin v. Löwis11437992002-04-12 09:54:03 +000027884 -d, --debug don't remove temporary files
27885 --recheck update $as_me by reconfiguring in the same conditions
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027886 --file=FILE[:TEMPLATE]
27887 instantiate the configuration file FILE
27888 --header=FILE[:TEMPLATE]
27889 instantiate the configuration header FILE
Martin v. Löwis11437992002-04-12 09:54:03 +000027890
27891Configuration files:
27892$config_files
27893
27894Configuration headers:
27895$config_headers
27896
27897Report bugs to <bug-autoconf@gnu.org>."
Skip Montanaroeb33e5a2007-08-17 12:57:41 +000027898
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027899_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027900cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000027901ac_cs_version="\\
Benjamin Peterson46ea4f72009-06-27 21:40:27 +000027902python config.status 3.2
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027903configured by $0, generated by GNU Autoconf 2.63,
27904 with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
Martin v. Löwis11437992002-04-12 09:54:03 +000027905
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027906Copyright (C) 2008 Free Software Foundation, Inc.
Martin v. Löwis11437992002-04-12 09:54:03 +000027907This config.status script is free software; the Free Software Foundation
27908gives unlimited permission to copy, distribute and modify it."
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027909
27910ac_pwd='$ac_pwd'
27911srcdir='$srcdir'
27912INSTALL='$INSTALL'
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027913test -n "\$AWK" || AWK=awk
Martin v. Löwis11437992002-04-12 09:54:03 +000027914_ACEOF
27915
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027916cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
27917# The default lists apply if the user does not specify any file.
Martin v. Löwis11437992002-04-12 09:54:03 +000027918ac_need_defaults=:
27919while test $# != 0
27920do
27921 case $1 in
27922 --*=*)
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027923 ac_option=`expr "X$1" : 'X\([^=]*\)='`
27924 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
Skip Montanaro6dead952003-09-25 14:50:04 +000027925 ac_shift=:
Martin v. Löwis11437992002-04-12 09:54:03 +000027926 ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027927 *)
Skip Montanaro6dead952003-09-25 14:50:04 +000027928 ac_option=$1
27929 ac_optarg=$2
27930 ac_shift=shift
27931 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027932 esac
27933
Skip Montanaro6dead952003-09-25 14:50:04 +000027934 case $ac_option in
Martin v. Löwis11437992002-04-12 09:54:03 +000027935 # Handling of the options.
Skip Montanaro6dead952003-09-25 14:50:04 +000027936 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
27937 ac_cs_recheck=: ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027938 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027939 $as_echo "$ac_cs_version"; exit ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027940 --debug | --debu | --deb | --de | --d | -d )
Martin v. Löwis11437992002-04-12 09:54:03 +000027941 debug=: ;;
27942 --file | --fil | --fi | --f )
Skip Montanaro6dead952003-09-25 14:50:04 +000027943 $ac_shift
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027944 case $ac_optarg in
27945 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27946 esac
27947 CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027948 ac_need_defaults=false;;
27949 --header | --heade | --head | --hea )
Skip Montanaro6dead952003-09-25 14:50:04 +000027950 $ac_shift
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027951 case $ac_optarg in
27952 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
27953 esac
27954 CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
Martin v. Löwis11437992002-04-12 09:54:03 +000027955 ac_need_defaults=false;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027956 --he | --h)
27957 # Conflict between --help and --header
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027958 { $as_echo "$as_me: error: ambiguous option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027959Try \`$0 --help' for more information." >&2
27960 { (exit 1); exit 1; }; };;
27961 --help | --hel | -h )
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027962 $as_echo "$ac_cs_usage"; exit ;;
Skip Montanaro6dead952003-09-25 14:50:04 +000027963 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
27964 | -silent | --silent | --silen | --sile | --sil | --si | --s)
27965 ac_cs_silent=: ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027966
27967 # This is an error.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027968 -*) { $as_echo "$as_me: error: unrecognized option: $1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027969Try \`$0 --help' for more information." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000027970 { (exit 1); exit 1; }; } ;;
27971
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027972 *) ac_config_targets="$ac_config_targets $1"
27973 ac_need_defaults=false ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000027974
27975 esac
27976 shift
27977done
27978
Skip Montanaro6dead952003-09-25 14:50:04 +000027979ac_configure_extra_args=
27980
27981if $ac_cs_silent; then
27982 exec 6>/dev/null
27983 ac_configure_extra_args="$ac_configure_extra_args --silent"
27984fi
27985
27986_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027987cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Skip Montanaro6dead952003-09-25 14:50:04 +000027988if \$ac_cs_recheck; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027989 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
27990 shift
27991 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
27992 CONFIG_SHELL='$SHELL'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027993 export CONFIG_SHELL
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027994 exec "\$@"
Skip Montanaro6dead952003-09-25 14:50:04 +000027995fi
27996
Martin v. Löwis11437992002-04-12 09:54:03 +000027997_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000027998cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000027999exec 5>>config.log
28000{
28001 echo
28002 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
28003## Running $as_me. ##
28004_ASBOX
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028005 $as_echo "$ac_log"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028006} >&5
Martin v. Löwis11437992002-04-12 09:54:03 +000028007
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028008_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028009cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028010_ACEOF
Martin v. Löwis11437992002-04-12 09:54:03 +000028011
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028012cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028013
28014# Handling of arguments.
Martin v. Löwis11437992002-04-12 09:54:03 +000028015for ac_config_target in $ac_config_targets
28016do
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028017 case $ac_config_target in
28018 "pyconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS pyconfig.h" ;;
28019 "Mac/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/Makefile" ;;
28020 "Mac/PythonLauncher/Makefile") CONFIG_FILES="$CONFIG_FILES Mac/PythonLauncher/Makefile" ;;
Christian Heimes81ee3ef2008-05-04 22:42:01 +000028021 "Mac/Resources/framework/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/framework/Info.plist" ;;
28022 "Mac/Resources/app/Info.plist") CONFIG_FILES="$CONFIG_FILES Mac/Resources/app/Info.plist" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028023 "Makefile.pre") CONFIG_FILES="$CONFIG_FILES Makefile.pre" ;;
28024 "Modules/Setup.config") CONFIG_FILES="$CONFIG_FILES Modules/Setup.config" ;;
Antoine Pitrou20327222009-05-24 20:39:11 +000028025 "Misc/python.pc") CONFIG_FILES="$CONFIG_FILES Misc/python.pc" ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028026
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028027 *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
28028$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028029 { (exit 1); exit 1; }; };;
28030 esac
28031done
28032
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028033
Martin v. Löwis11437992002-04-12 09:54:03 +000028034# If the user did not use the arguments to specify the items to instantiate,
28035# then the envvar interface is used. Set only those that are not.
28036# We use the long form for the default assignment because of an extremely
28037# bizarre bug on SunOS 4.1.3.
28038if $ac_need_defaults; then
28039 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
28040 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
28041fi
28042
Skip Montanaro6dead952003-09-25 14:50:04 +000028043# Have a temporary directory for convenience. Make it in the build tree
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028044# simply because there is no reason against having it here, and in addition,
Skip Montanaro6dead952003-09-25 14:50:04 +000028045# creating and moving files from /tmp can sometimes cause problems.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028046# Hook for its removal unless debugging.
28047# Note that there is a small window in which the directory will not be cleaned:
28048# after its creation but before its name has been assigned to `$tmp'.
Martin v. Löwis11437992002-04-12 09:54:03 +000028049$debug ||
28050{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028051 tmp=
28052 trap 'exit_status=$?
28053 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
28054' 0
Martin v. Löwis11437992002-04-12 09:54:03 +000028055 trap '{ (exit 1); exit 1; }' 1 2 13 15
28056}
Martin v. Löwis11437992002-04-12 09:54:03 +000028057# Create a (secure) tmp directory for tmp files.
Skip Montanaro6dead952003-09-25 14:50:04 +000028058
Martin v. Löwis11437992002-04-12 09:54:03 +000028059{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028060 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028061 test -n "$tmp" && test -d "$tmp"
28062} ||
28063{
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028064 tmp=./conf$$-$RANDOM
28065 (umask 077 && mkdir "$tmp")
Martin v. Löwis11437992002-04-12 09:54:03 +000028066} ||
28067{
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028068 $as_echo "$as_me: cannot create a temporary directory in ." >&2
Martin v. Löwis11437992002-04-12 09:54:03 +000028069 { (exit 1); exit 1; }
28070}
28071
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028072# Set up the scripts for CONFIG_FILES section.
28073# No need to generate them if there are no CONFIG_FILES.
28074# This happens for instance with `./config.status config.h'.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028075if test -n "$CONFIG_FILES"; then
Martin v. Löwis11437992002-04-12 09:54:03 +000028076
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028077
28078ac_cr='
28079'
28080ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
28081if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
28082 ac_cs_awk_cr='\\r'
28083else
28084 ac_cs_awk_cr=$ac_cr
28085fi
28086
28087echo 'BEGIN {' >"$tmp/subs1.awk" &&
Martin v. Löwis11437992002-04-12 09:54:03 +000028088_ACEOF
28089
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028090
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028091{
28092 echo "cat >conf$$subs.awk <<_ACEOF" &&
28093 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
28094 echo "_ACEOF"
28095} >conf$$subs.sh ||
28096 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28097$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
28098 { (exit 1); exit 1; }; }
28099ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028100ac_delim='%!_!# '
28101for ac_last_try in false false false false false :; do
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028102 . ./conf$$subs.sh ||
28103 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28104$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
28105 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028106
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028107 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
28108 if test $ac_delim_n = $ac_delim_num; then
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028109 break
28110 elif $ac_last_try; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028111 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
28112$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028113 { (exit 1); exit 1; }; }
28114 else
28115 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
Martin v. Löwis11437992002-04-12 09:54:03 +000028116 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028117done
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028118rm -f conf$$subs.sh
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028119
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028120cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28121cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028122_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028123sed -n '
28124h
28125s/^/S["/; s/!.*/"]=/
28126p
28127g
28128s/^[^!]*!//
28129:repl
28130t repl
28131s/'"$ac_delim"'$//
28132t delim
28133:nl
28134h
28135s/\(.\{148\}\).*/\1/
28136t more1
28137s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
28138p
28139n
28140b repl
28141:more1
28142s/["\\]/\\&/g; s/^/"/; s/$/"\\/
28143p
28144g
28145s/.\{148\}//
28146t nl
28147:delim
28148h
28149s/\(.\{148\}\).*/\1/
28150t more2
28151s/["\\]/\\&/g; s/^/"/; s/$/"/
28152p
28153b
28154:more2
28155s/["\\]/\\&/g; s/^/"/; s/$/"\\/
28156p
28157g
28158s/.\{148\}//
28159t delim
28160' <conf$$subs.awk | sed '
28161/^[^""]/{
28162 N
28163 s/\n//
28164}
28165' >>$CONFIG_STATUS || ac_write_fail=1
28166rm -f conf$$subs.awk
28167cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28168_ACAWK
28169cat >>"\$tmp/subs1.awk" <<_ACAWK &&
28170 for (key in S) S_is_set[key] = 1
28171 FS = ""
28172
28173}
28174{
28175 line = $ 0
28176 nfields = split(line, field, "@")
28177 substed = 0
28178 len = length(field[1])
28179 for (i = 2; i < nfields; i++) {
28180 key = field[i]
28181 keylen = length(key)
28182 if (S_is_set[key]) {
28183 value = S[key]
28184 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
28185 len += length(value) + length(field[++i])
28186 substed = 1
28187 } else
28188 len += 1 + keylen
28189 }
28190
28191 print line
28192}
28193
28194_ACAWK
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028195_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028196cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28197if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
28198 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
28199else
28200 cat
28201fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
28202 || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
28203$as_echo "$as_me: error: could not setup config files machinery" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028204 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028205_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028206
28207# VPATH may cause trouble with some makes, so we remove $(srcdir),
28208# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
28209# trailing colons and then remove the whole line if VPATH becomes empty
28210# (actually we leave an empty line to preserve line numbers).
28211if test "x$srcdir" = x.; then
28212 ac_vpsub='/^[ ]*VPATH[ ]*=/{
28213s/:*\$(srcdir):*/:/
28214s/:*\${srcdir}:*/:/
28215s/:*@srcdir@:*/:/
28216s/^\([^=]*=[ ]*\):*/\1/
28217s/:*$//
28218s/^[^=]*=[ ]*$//
28219}'
28220fi
28221
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028222cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000028223fi # test -n "$CONFIG_FILES"
28224
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028225# Set up the scripts for CONFIG_HEADERS section.
28226# No need to generate them if there are no CONFIG_HEADERS.
28227# This happens for instance with `./config.status Makefile'.
28228if test -n "$CONFIG_HEADERS"; then
28229cat >"$tmp/defines.awk" <<\_ACAWK ||
28230BEGIN {
28231_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028232
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028233# Transform confdefs.h into an awk script `defines.awk', embedded as
28234# here-document in config.status, that substitutes the proper values into
28235# config.h.in to produce config.h.
28236
28237# Create a delimiter string that does not exist in confdefs.h, to ease
28238# handling of long lines.
28239ac_delim='%!_!# '
28240for ac_last_try in false false :; do
28241 ac_t=`sed -n "/$ac_delim/p" confdefs.h`
28242 if test -z "$ac_t"; then
28243 break
28244 elif $ac_last_try; then
28245 { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
28246$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
28247 { (exit 1); exit 1; }; }
28248 else
28249 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
28250 fi
28251done
28252
28253# For the awk script, D is an array of macro values keyed by name,
28254# likewise P contains macro parameters if any. Preserve backslash
28255# newline sequences.
28256
28257ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
28258sed -n '
28259s/.\{148\}/&'"$ac_delim"'/g
28260t rset
28261:rset
28262s/^[ ]*#[ ]*define[ ][ ]*/ /
28263t def
28264d
28265:def
28266s/\\$//
28267t bsnl
28268s/["\\]/\\&/g
28269s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
28270D["\1"]=" \3"/p
28271s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
28272d
28273:bsnl
28274s/["\\]/\\&/g
28275s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
28276D["\1"]=" \3\\\\\\n"\\/p
28277t cont
28278s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
28279t cont
28280d
28281:cont
28282n
28283s/.\{148\}/&'"$ac_delim"'/g
28284t clear
28285:clear
28286s/\\$//
28287t bsnlc
28288s/["\\]/\\&/g; s/^/"/; s/$/"/p
28289d
28290:bsnlc
28291s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
28292b cont
28293' <confdefs.h | sed '
28294s/'"$ac_delim"'/"\\\
28295"/g' >>$CONFIG_STATUS || ac_write_fail=1
28296
28297cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28298 for (key in D) D_is_set[key] = 1
28299 FS = ""
28300}
28301/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
28302 line = \$ 0
28303 split(line, arg, " ")
28304 if (arg[1] == "#") {
28305 defundef = arg[2]
28306 mac1 = arg[3]
28307 } else {
28308 defundef = substr(arg[1], 2)
28309 mac1 = arg[2]
28310 }
28311 split(mac1, mac2, "(") #)
28312 macro = mac2[1]
28313 prefix = substr(line, 1, index(line, defundef) - 1)
28314 if (D_is_set[macro]) {
28315 # Preserve the white space surrounding the "#".
28316 print prefix "define", macro P[macro] D[macro]
28317 next
28318 } else {
28319 # Replace #undef with comments. This is necessary, for example,
28320 # in the case of _POSIX_SOURCE, which is predefined and required
28321 # on some systems where configure will not decide to define it.
28322 if (defundef == "undef") {
28323 print "/*", prefix defundef, macro, "*/"
28324 next
28325 }
28326 }
28327}
28328{ print }
28329_ACAWK
28330_ACEOF
28331cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
28332 { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
28333$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
28334 { (exit 1); exit 1; }; }
28335fi # test -n "$CONFIG_HEADERS"
28336
28337
28338eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
28339shift
28340for ac_tag
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028341do
28342 case $ac_tag in
28343 :[FHLC]) ac_mode=$ac_tag; continue;;
28344 esac
28345 case $ac_mode$ac_tag in
28346 :[FHL]*:*);;
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028347 :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
28348$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028349 { (exit 1); exit 1; }; };;
28350 :[FH]-) ac_tag=-:-;;
28351 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
28352 esac
28353 ac_save_IFS=$IFS
28354 IFS=:
28355 set x $ac_tag
28356 IFS=$ac_save_IFS
28357 shift
28358 ac_file=$1
28359 shift
28360
28361 case $ac_mode in
28362 :L) ac_source=$1;;
28363 :[FH])
28364 ac_file_inputs=
28365 for ac_f
28366 do
28367 case $ac_f in
28368 -) ac_f="$tmp/stdin";;
28369 *) # Look for the file first in the build tree, then in the source tree
28370 # (if the path is not absolute). The absolute path cannot be DOS-style,
28371 # because $ac_f cannot contain `:'.
28372 test -f "$ac_f" ||
28373 case $ac_f in
28374 [\\/$]*) false;;
28375 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
28376 esac ||
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028377 { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
28378$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028379 { (exit 1); exit 1; }; };;
28380 esac
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028381 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
28382 ac_file_inputs="$ac_file_inputs '$ac_f'"
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028383 done
28384
28385 # Let's still pretend it is `configure' which instantiates (i.e., don't
28386 # use $as_me), people would be surprised to read:
28387 # /* config.h. Generated by config.status. */
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028388 configure_input='Generated from '`
28389 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
28390 `' by configure.'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028391 if test x"$ac_file" != x-; then
28392 configure_input="$ac_file. $configure_input"
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028393 { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
28394$as_echo "$as_me: creating $ac_file" >&6;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028395 fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028396 # Neutralize special characters interpreted by sed in replacement strings.
28397 case $configure_input in #(
28398 *\&* | *\|* | *\\* )
28399 ac_sed_conf_input=`$as_echo "$configure_input" |
28400 sed 's/[\\\\&|]/\\\\&/g'`;; #(
28401 *) ac_sed_conf_input=$configure_input;;
28402 esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028403
28404 case $ac_tag in
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028405 *:-:* | *:-) cat >"$tmp/stdin" \
28406 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
28407$as_echo "$as_me: error: could not create $ac_file" >&2;}
28408 { (exit 1); exit 1; }; } ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028409 esac
28410 ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028411 esac
28412
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028413 ac_dir=`$as_dirname -- "$ac_file" ||
Martin v. Löwis11437992002-04-12 09:54:03 +000028414$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028415 X"$ac_file" : 'X\(//\)[^/]' \| \
28416 X"$ac_file" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028417 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028418$as_echo X"$ac_file" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028419 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28420 s//\1/
28421 q
28422 }
28423 /^X\(\/\/\)[^/].*/{
28424 s//\1/
28425 q
28426 }
28427 /^X\(\/\/\)$/{
28428 s//\1/
28429 q
28430 }
28431 /^X\(\/\).*/{
28432 s//\1/
28433 q
28434 }
28435 s/.*/./; q'`
28436 { as_dir="$ac_dir"
28437 case $as_dir in #(
28438 -*) as_dir=./$as_dir;;
28439 esac
28440 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
Skip Montanaro6dead952003-09-25 14:50:04 +000028441 as_dirs=
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028442 while :; do
28443 case $as_dir in #(
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028444 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028445 *) as_qdir=$as_dir;;
28446 esac
28447 as_dirs="'$as_qdir' $as_dirs"
28448 as_dir=`$as_dirname -- "$as_dir" ||
Skip Montanaro6dead952003-09-25 14:50:04 +000028449$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
Skip Montanarof0d5f792004-08-15 14:08:23 +000028450 X"$as_dir" : 'X\(//\)[^/]' \| \
28451 X"$as_dir" : 'X\(//\)$' \| \
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028452 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028453$as_echo X"$as_dir" |
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028454 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
28455 s//\1/
28456 q
28457 }
28458 /^X\(\/\/\)[^/].*/{
28459 s//\1/
28460 q
28461 }
28462 /^X\(\/\/\)$/{
28463 s//\1/
28464 q
28465 }
28466 /^X\(\/\).*/{
28467 s//\1/
28468 q
28469 }
28470 s/.*/./; q'`
28471 test -d "$as_dir" && break
Skip Montanaro6dead952003-09-25 14:50:04 +000028472 done
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028473 test -z "$as_dirs" || eval "mkdir $as_dirs"
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028474 } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
28475$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
Skip Montanaro6dead952003-09-25 14:50:04 +000028476 { (exit 1); exit 1; }; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028477 ac_builddir=.
28478
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028479case "$ac_dir" in
28480.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
28481*)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028482 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028483 # A ".." for each directory in $ac_dir_suffix.
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028484 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028485 case $ac_top_builddir_sub in
28486 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
28487 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
28488 esac ;;
28489esac
28490ac_abs_top_builddir=$ac_pwd
28491ac_abs_builddir=$ac_pwd$ac_dir_suffix
28492# for backward compatibility:
28493ac_top_builddir=$ac_top_build_prefix
Martin v. Löwis11437992002-04-12 09:54:03 +000028494
28495case $srcdir in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028496 .) # We are building in place.
Martin v. Löwis11437992002-04-12 09:54:03 +000028497 ac_srcdir=.
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028498 ac_top_srcdir=$ac_top_builddir_sub
28499 ac_abs_top_srcdir=$ac_pwd ;;
28500 [\\/]* | ?:[\\/]* ) # Absolute name.
Martin v. Löwis11437992002-04-12 09:54:03 +000028501 ac_srcdir=$srcdir$ac_dir_suffix;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028502 ac_top_srcdir=$srcdir
28503 ac_abs_top_srcdir=$srcdir ;;
28504 *) # Relative name.
28505 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
28506 ac_top_srcdir=$ac_top_build_prefix$srcdir
28507 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028508esac
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028509ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
Skip Montanarof0d5f792004-08-15 14:08:23 +000028510
Martin v. Löwis11437992002-04-12 09:54:03 +000028511
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028512 case $ac_mode in
28513 :F)
28514 #
28515 # CONFIG_FILE
28516 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028517
28518 case $INSTALL in
28519 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028520 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
Martin v. Löwis11437992002-04-12 09:54:03 +000028521 esac
Thomas Wouters477c8d52006-05-27 19:21:47 +000028522_ACEOF
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028523
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028524cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028525# If the template does not know about datarootdir, expand it.
28526# FIXME: This hack should be removed a few years after 2.60.
28527ac_datarootdir_hack=; ac_datarootdir_seen=
28528
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028529ac_sed_dataroot='
28530/datarootdir/ {
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028531 p
28532 q
28533}
28534/@datadir@/p
28535/@docdir@/p
28536/@infodir@/p
28537/@localedir@/p
28538/@mandir@/p
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028539'
28540case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028541*datarootdir*) ac_datarootdir_seen=yes;;
28542*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028543 { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
28544$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028545_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028546cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028547 ac_datarootdir_hack='
28548 s&@datadir@&$datadir&g
28549 s&@docdir@&$docdir&g
28550 s&@infodir@&$infodir&g
28551 s&@localedir@&$localedir&g
28552 s&@mandir@&$mandir&g
28553 s&\\\${datarootdir}&$datarootdir&g' ;;
28554esac
28555_ACEOF
28556
28557# Neutralize VPATH when `$srcdir' = `.'.
28558# Shell code in configure.ac might set extrasub.
28559# FIXME: do we really want to maintain this feature?
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028560cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
28561ac_sed_extra="$ac_vpsub
Martin v. Löwis11437992002-04-12 09:54:03 +000028562$extrasub
28563_ACEOF
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028564cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Martin v. Löwis11437992002-04-12 09:54:03 +000028565:t
28566/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028567s|@configure_input@|$ac_sed_conf_input|;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028568s&@top_builddir@&$ac_top_builddir_sub&;t t
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028569s&@top_build_prefix@&$ac_top_build_prefix&;t t
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028570s&@srcdir@&$ac_srcdir&;t t
28571s&@abs_srcdir@&$ac_abs_srcdir&;t t
28572s&@top_srcdir@&$ac_top_srcdir&;t t
28573s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
28574s&@builddir@&$ac_builddir&;t t
28575s&@abs_builddir@&$ac_abs_builddir&;t t
28576s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
28577s&@INSTALL@&$ac_INSTALL&;t t
28578$ac_datarootdir_hack
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028579"
28580eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
28581 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
28582$as_echo "$as_me: error: could not create $ac_file" >&2;}
28583 { (exit 1); exit 1; }; }
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028584
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028585test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
28586 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
28587 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028588 { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028589which seems to be undefined. Please make sure it is defined." >&5
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028590$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028591which seems to be undefined. Please make sure it is defined." >&2;}
Thomas Wouters1ba5b3b2006-06-08 14:52:47 +000028592
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028593 rm -f "$tmp/stdin"
Martin v. Löwis11437992002-04-12 09:54:03 +000028594 case $ac_file in
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028595 -) cat "$tmp/out" && rm -f "$tmp/out";;
28596 *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
28597 esac \
28598 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
28599$as_echo "$as_me: error: could not create $ac_file" >&2;}
28600 { (exit 1); exit 1; }; }
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028601 ;;
28602 :H)
28603 #
28604 # CONFIG_HEADER
28605 #
Martin v. Löwis11437992002-04-12 09:54:03 +000028606 if test x"$ac_file" != x-; then
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028607 {
28608 $as_echo "/* $configure_input */" \
28609 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
28610 } >"$tmp/config.h" \
28611 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
28612$as_echo "$as_me: error: could not create $ac_file" >&2;}
28613 { (exit 1); exit 1; }; }
28614 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
28615 { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
28616$as_echo "$as_me: $ac_file is unchanged" >&6;}
Martin v. Löwis11437992002-04-12 09:54:03 +000028617 else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028618 rm -f "$ac_file"
28619 mv "$tmp/config.h" "$ac_file" \
28620 || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
28621$as_echo "$as_me: error: could not create $ac_file" >&2;}
28622 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028623 fi
28624 else
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028625 $as_echo "/* $configure_input */" \
28626 && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
28627 || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
28628$as_echo "$as_me: error: could not create -" >&2;}
28629 { (exit 1); exit 1; }; }
Martin v. Löwis11437992002-04-12 09:54:03 +000028630 fi
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028631 ;;
Guido van Rossum7f43da71994-08-01 12:15:30 +000028632
Thomas Wouters47b49bf2007-08-30 22:15:33 +000028633
28634 esac
28635
28636done # for ac_tag
28637
Guido van Rossum627b2d71993-12-24 10:39:16 +000028638
Martin v. Löwis11437992002-04-12 09:54:03 +000028639{ (exit 0); exit 0; }
28640_ACEOF
Guido van Rossum76be6ed1995-01-02 18:33:54 +000028641chmod +x $CONFIG_STATUS
Martin v. Löwis11437992002-04-12 09:54:03 +000028642ac_clean_files=$ac_clean_files_save
28643
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028644test $ac_write_fail = 0 ||
28645 { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
28646$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
28647 { (exit 1); exit 1; }; }
28648
Martin v. Löwis11437992002-04-12 09:54:03 +000028649
28650# configure is writing to config.log, and then calls config.status.
28651# config.status does its own redirection, appending to config.log.
28652# Unfortunately, on DOS this fails, as config.log is still kept open
28653# by configure, so config.status won't be able to write to it; its
28654# output is simply discarded. So we exec the FD to /dev/null,
28655# effectively closing config.log, so it can be properly (re)opened and
28656# appended to by config.status. When coming back to configure, we
28657# need to make the FD available again.
28658if test "$no_create" != yes; then
28659 ac_cs_success=:
Skip Montanaro6dead952003-09-25 14:50:04 +000028660 ac_config_status_args=
28661 test "$silent" = yes &&
28662 ac_config_status_args="$ac_config_status_args --quiet"
Martin v. Löwis11437992002-04-12 09:54:03 +000028663 exec 5>/dev/null
Skip Montanaro6dead952003-09-25 14:50:04 +000028664 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
Martin v. Löwis11437992002-04-12 09:54:03 +000028665 exec 5>>config.log
28666 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
28667 # would make configure fail if this is the last instruction.
28668 $ac_cs_success || { (exit 1); exit 1; }
28669fi
Benjamin Peterson8719ad52009-09-11 22:24:02 +000028670if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
28671 { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
28672$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
28673fi
Guido van Rossum627b2d71993-12-24 10:39:16 +000028674
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028675
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028676echo "creating Modules/Setup"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028677if test ! -f Modules/Setup
28678then
28679 cp $srcdir/Modules/Setup.dist Modules/Setup
28680fi
28681
Thomas Wouters49fd7fa2006-04-21 10:40:58 +000028682echo "creating Modules/Setup.local"
Neil Schemenauer3ecf0aa2001-01-26 16:15:20 +000028683if test ! -f Modules/Setup.local
28684then
28685 echo "# Edit this file for local setup changes" >Modules/Setup.local
28686fi
28687
28688echo "creating Makefile"
28689$SHELL $srcdir/Modules/makesetup -c $srcdir/Modules/config.c.in \
28690 -s Modules Modules/Setup.config \
Neil Schemenauerf8b71c52001-04-21 17:41:16 +000028691 Modules/Setup.local Modules/Setup
Neil Schemenauerc761fc82001-02-19 04:50:49 +000028692mv config.c Modules